drive
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package drive provides access to the Google Drive API.
For product documentation, see:https://developers.google.com/workspace/drive/
Library status¶
These client libraries are officially supported by Google. However, thislibrary is considered complete and is in maintenance mode. This meansthat we will address critical bugs and security issues but will not addany new features.
When possible, we recommend using our newer[Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)that are still actively being worked and iterated on.
Creating a client¶
Usage example:
import "google.golang.org/api/drive/v2"...ctx := context.Background()driveService, err := drive.NewService(ctx)
In this example, Google Application Default Credentials are used forauthentication. For information on how to create and obtain ApplicationDefault Credentials, seehttps://developers.google.com/identity/protocols/application-default-credentials.
Other authentication options¶
By default, all available scopes (see "Constants") are used to authenticate.To restrict scopes, usegoogle.golang.org/api/option.WithScopes:
driveService, err := drive.NewService(ctx, option.WithScopes(drive.DriveScriptsScope))
To use an API key for authentication (note: some APIs do not support APIkeys), usegoogle.golang.org/api/option.WithAPIKey:
driveService, err := drive.NewService(ctx, option.WithAPIKey("AIza..."))To use an OAuth token (e.g., a user token obtained via a three-legged OAuthflow, usegoogle.golang.org/api/option.WithTokenSource:
config := &oauth2.Config{...}// ...token, err := config.Exchange(ctx, ...)driveService, err := drive.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))Seegoogle.golang.org/api/option.ClientOption for details on options.
Index¶
- Constants
- type About
- type AboutAdditionalRoleInfo
- type AboutAdditionalRoleInfoRoleSets
- type AboutDriveThemes
- type AboutExportFormats
- type AboutFeatures
- type AboutGetCall
- func (c *AboutGetCall) Context(ctx context.Context) *AboutGetCall
- func (c *AboutGetCall) Do(opts ...googleapi.CallOption) (*About, error)
- func (c *AboutGetCall) Fields(s ...googleapi.Field) *AboutGetCall
- func (c *AboutGetCall) Header() http.Header
- func (c *AboutGetCall) IfNoneMatch(entityTag string) *AboutGetCall
- func (c *AboutGetCall) IncludeSubscribed(includeSubscribed bool) *AboutGetCall
- func (c *AboutGetCall) MaxChangeIdCount(maxChangeIdCount int64) *AboutGetCall
- func (c *AboutGetCall) StartChangeId(startChangeId int64) *AboutGetCall
- type AboutImportFormats
- type AboutMaxUploadSizes
- type AboutQuotaBytesByService
- type AboutService
- type AboutTeamDriveThemes
- type App
- type AppIcons
- type AppList
- type AppsGetCall
- func (c *AppsGetCall) Context(ctx context.Context) *AppsGetCall
- func (c *AppsGetCall) Do(opts ...googleapi.CallOption) (*App, error)
- func (c *AppsGetCall) Fields(s ...googleapi.Field) *AppsGetCall
- func (c *AppsGetCall) Header() http.Header
- func (c *AppsGetCall) IfNoneMatch(entityTag string) *AppsGetCall
- type AppsListCall
- func (c *AppsListCall) AppFilterExtensions(appFilterExtensions string) *AppsListCall
- func (c *AppsListCall) AppFilterMimeTypes(appFilterMimeTypes string) *AppsListCall
- func (c *AppsListCall) Context(ctx context.Context) *AppsListCall
- func (c *AppsListCall) Do(opts ...googleapi.CallOption) (*AppList, error)
- func (c *AppsListCall) Fields(s ...googleapi.Field) *AppsListCall
- func (c *AppsListCall) Header() http.Header
- func (c *AppsListCall) IfNoneMatch(entityTag string) *AppsListCall
- func (c *AppsListCall) LanguageCode(languageCode string) *AppsListCall
- type AppsService
- type Change
- type ChangeList
- type ChangesGetCall
- func (c *ChangesGetCall) Context(ctx context.Context) *ChangesGetCall
- func (c *ChangesGetCall) Do(opts ...googleapi.CallOption) (*Change, error)
- func (c *ChangesGetCall) DriveId(driveId string) *ChangesGetCall
- func (c *ChangesGetCall) Fields(s ...googleapi.Field) *ChangesGetCall
- func (c *ChangesGetCall) Header() http.Header
- func (c *ChangesGetCall) IfNoneMatch(entityTag string) *ChangesGetCall
- func (c *ChangesGetCall) SupportsAllDrives(supportsAllDrives bool) *ChangesGetCall
- func (c *ChangesGetCall) SupportsTeamDrives(supportsTeamDrives bool) *ChangesGetCall
- func (c *ChangesGetCall) TeamDriveId(teamDriveId string) *ChangesGetCall
- type ChangesGetStartPageTokenCall
- func (c *ChangesGetStartPageTokenCall) Context(ctx context.Context) *ChangesGetStartPageTokenCall
- func (c *ChangesGetStartPageTokenCall) Do(opts ...googleapi.CallOption) (*StartPageToken, error)
- func (c *ChangesGetStartPageTokenCall) DriveId(driveId string) *ChangesGetStartPageTokenCall
- func (c *ChangesGetStartPageTokenCall) Fields(s ...googleapi.Field) *ChangesGetStartPageTokenCall
- func (c *ChangesGetStartPageTokenCall) Header() http.Header
- func (c *ChangesGetStartPageTokenCall) IfNoneMatch(entityTag string) *ChangesGetStartPageTokenCall
- func (c *ChangesGetStartPageTokenCall) SupportsAllDrives(supportsAllDrives bool) *ChangesGetStartPageTokenCall
- func (c *ChangesGetStartPageTokenCall) SupportsTeamDrives(supportsTeamDrives bool) *ChangesGetStartPageTokenCall
- func (c *ChangesGetStartPageTokenCall) TeamDriveId(teamDriveId string) *ChangesGetStartPageTokenCall
- type ChangesListCall
- func (c *ChangesListCall) Context(ctx context.Context) *ChangesListCall
- func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangeList, error)
- func (c *ChangesListCall) DriveId(driveId string) *ChangesListCall
- func (c *ChangesListCall) Fields(s ...googleapi.Field) *ChangesListCall
- func (c *ChangesListCall) Header() http.Header
- func (c *ChangesListCall) IfNoneMatch(entityTag string) *ChangesListCall
- func (c *ChangesListCall) IncludeCorpusRemovals(includeCorpusRemovals bool) *ChangesListCall
- func (c *ChangesListCall) IncludeDeleted(includeDeleted bool) *ChangesListCall
- func (c *ChangesListCall) IncludeItemsFromAllDrives(includeItemsFromAllDrives bool) *ChangesListCall
- func (c *ChangesListCall) IncludeLabels(includeLabels string) *ChangesListCall
- func (c *ChangesListCall) IncludePermissionsForView(includePermissionsForView string) *ChangesListCall
- func (c *ChangesListCall) IncludeSubscribed(includeSubscribed bool) *ChangesListCall
- func (c *ChangesListCall) IncludeTeamDriveItems(includeTeamDriveItems bool) *ChangesListCall
- func (c *ChangesListCall) MaxResults(maxResults int64) *ChangesListCall
- func (c *ChangesListCall) PageToken(pageToken string) *ChangesListCall
- func (c *ChangesListCall) Pages(ctx context.Context, f func(*ChangeList) error) error
- func (c *ChangesListCall) Spaces(spaces string) *ChangesListCall
- func (c *ChangesListCall) StartChangeId(startChangeId int64) *ChangesListCall
- func (c *ChangesListCall) SupportsAllDrives(supportsAllDrives bool) *ChangesListCall
- func (c *ChangesListCall) SupportsTeamDrives(supportsTeamDrives bool) *ChangesListCall
- func (c *ChangesListCall) TeamDriveId(teamDriveId string) *ChangesListCall
- type ChangesService
- type ChangesWatchCall
- func (c *ChangesWatchCall) Context(ctx context.Context) *ChangesWatchCall
- func (c *ChangesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error)
- func (c *ChangesWatchCall) DriveId(driveId string) *ChangesWatchCall
- func (c *ChangesWatchCall) Fields(s ...googleapi.Field) *ChangesWatchCall
- func (c *ChangesWatchCall) Header() http.Header
- func (c *ChangesWatchCall) IncludeCorpusRemovals(includeCorpusRemovals bool) *ChangesWatchCall
- func (c *ChangesWatchCall) IncludeDeleted(includeDeleted bool) *ChangesWatchCall
- func (c *ChangesWatchCall) IncludeItemsFromAllDrives(includeItemsFromAllDrives bool) *ChangesWatchCall
- func (c *ChangesWatchCall) IncludeLabels(includeLabels string) *ChangesWatchCall
- func (c *ChangesWatchCall) IncludePermissionsForView(includePermissionsForView string) *ChangesWatchCall
- func (c *ChangesWatchCall) IncludeSubscribed(includeSubscribed bool) *ChangesWatchCall
- func (c *ChangesWatchCall) IncludeTeamDriveItems(includeTeamDriveItems bool) *ChangesWatchCall
- func (c *ChangesWatchCall) MaxResults(maxResults int64) *ChangesWatchCall
- func (c *ChangesWatchCall) PageToken(pageToken string) *ChangesWatchCall
- func (c *ChangesWatchCall) Spaces(spaces string) *ChangesWatchCall
- func (c *ChangesWatchCall) StartChangeId(startChangeId int64) *ChangesWatchCall
- func (c *ChangesWatchCall) SupportsAllDrives(supportsAllDrives bool) *ChangesWatchCall
- func (c *ChangesWatchCall) SupportsTeamDrives(supportsTeamDrives bool) *ChangesWatchCall
- func (c *ChangesWatchCall) TeamDriveId(teamDriveId string) *ChangesWatchCall
- type Channel
- type ChannelsService
- type ChannelsStopCall
- type ChildList
- type ChildReference
- type ChildrenDeleteCall
- func (c *ChildrenDeleteCall) Context(ctx context.Context) *ChildrenDeleteCall
- func (c *ChildrenDeleteCall) Do(opts ...googleapi.CallOption) error
- func (c *ChildrenDeleteCall) EnforceSingleParent(enforceSingleParent bool) *ChildrenDeleteCall
- func (c *ChildrenDeleteCall) Fields(s ...googleapi.Field) *ChildrenDeleteCall
- func (c *ChildrenDeleteCall) Header() http.Header
- type ChildrenGetCall
- func (c *ChildrenGetCall) Context(ctx context.Context) *ChildrenGetCall
- func (c *ChildrenGetCall) Do(opts ...googleapi.CallOption) (*ChildReference, error)
- func (c *ChildrenGetCall) Fields(s ...googleapi.Field) *ChildrenGetCall
- func (c *ChildrenGetCall) Header() http.Header
- func (c *ChildrenGetCall) IfNoneMatch(entityTag string) *ChildrenGetCall
- type ChildrenInsertCall
- func (c *ChildrenInsertCall) Context(ctx context.Context) *ChildrenInsertCall
- func (c *ChildrenInsertCall) Do(opts ...googleapi.CallOption) (*ChildReference, error)
- func (c *ChildrenInsertCall) EnforceSingleParent(enforceSingleParent bool) *ChildrenInsertCall
- func (c *ChildrenInsertCall) Fields(s ...googleapi.Field) *ChildrenInsertCall
- func (c *ChildrenInsertCall) Header() http.Header
- func (c *ChildrenInsertCall) SupportsAllDrives(supportsAllDrives bool) *ChildrenInsertCall
- func (c *ChildrenInsertCall) SupportsTeamDrives(supportsTeamDrives bool) *ChildrenInsertCall
- type ChildrenListCall
- func (c *ChildrenListCall) Context(ctx context.Context) *ChildrenListCall
- func (c *ChildrenListCall) Do(opts ...googleapi.CallOption) (*ChildList, error)
- func (c *ChildrenListCall) Fields(s ...googleapi.Field) *ChildrenListCall
- func (c *ChildrenListCall) Header() http.Header
- func (c *ChildrenListCall) IfNoneMatch(entityTag string) *ChildrenListCall
- func (c *ChildrenListCall) MaxResults(maxResults int64) *ChildrenListCall
- func (c *ChildrenListCall) OrderBy(orderBy string) *ChildrenListCall
- func (c *ChildrenListCall) PageToken(pageToken string) *ChildrenListCall
- func (c *ChildrenListCall) Pages(ctx context.Context, f func(*ChildList) error) error
- func (c *ChildrenListCall) Q(q string) *ChildrenListCall
- type ChildrenService
- func (r *ChildrenService) Delete(folderId string, childId string) *ChildrenDeleteCall
- func (r *ChildrenService) Get(folderId string, childId string) *ChildrenGetCall
- func (r *ChildrenService) Insert(folderId string, childreference *ChildReference) *ChildrenInsertCall
- func (r *ChildrenService) List(folderId string) *ChildrenListCall
- type Comment
- type CommentContext
- type CommentList
- type CommentReply
- type CommentReplyList
- type CommentsDeleteCall
- type CommentsGetCall
- func (c *CommentsGetCall) Context(ctx context.Context) *CommentsGetCall
- func (c *CommentsGetCall) Do(opts ...googleapi.CallOption) (*Comment, error)
- func (c *CommentsGetCall) Fields(s ...googleapi.Field) *CommentsGetCall
- func (c *CommentsGetCall) Header() http.Header
- func (c *CommentsGetCall) IfNoneMatch(entityTag string) *CommentsGetCall
- func (c *CommentsGetCall) IncludeDeleted(includeDeleted bool) *CommentsGetCall
- type CommentsInsertCall
- type CommentsListCall
- func (c *CommentsListCall) Context(ctx context.Context) *CommentsListCall
- func (c *CommentsListCall) Do(opts ...googleapi.CallOption) (*CommentList, error)
- func (c *CommentsListCall) Fields(s ...googleapi.Field) *CommentsListCall
- func (c *CommentsListCall) Header() http.Header
- func (c *CommentsListCall) IfNoneMatch(entityTag string) *CommentsListCall
- func (c *CommentsListCall) IncludeDeleted(includeDeleted bool) *CommentsListCall
- func (c *CommentsListCall) MaxResults(maxResults int64) *CommentsListCall
- func (c *CommentsListCall) PageToken(pageToken string) *CommentsListCall
- func (c *CommentsListCall) Pages(ctx context.Context, f func(*CommentList) error) error
- func (c *CommentsListCall) UpdatedMin(updatedMin string) *CommentsListCall
- type CommentsPatchCall
- type CommentsService
- func (r *CommentsService) Delete(fileId string, commentId string) *CommentsDeleteCall
- func (r *CommentsService) Get(fileId string, commentId string) *CommentsGetCall
- func (r *CommentsService) Insert(fileId string, comment *Comment) *CommentsInsertCall
- func (r *CommentsService) List(fileId string) *CommentsListCall
- func (r *CommentsService) Patch(fileId string, commentId string, comment *Comment) *CommentsPatchCall
- func (r *CommentsService) Update(fileId string, commentId string, comment *Comment) *CommentsUpdateCall
- type CommentsUpdateCall
- type ContentRestriction
- type Drive
- type DriveBackgroundImageFile
- type DriveCapabilities
- type DriveList
- type DriveRestrictions
- type DrivesDeleteCall
- func (c *DrivesDeleteCall) AllowItemDeletion(allowItemDeletion bool) *DrivesDeleteCall
- func (c *DrivesDeleteCall) Context(ctx context.Context) *DrivesDeleteCall
- func (c *DrivesDeleteCall) Do(opts ...googleapi.CallOption) error
- func (c *DrivesDeleteCall) Fields(s ...googleapi.Field) *DrivesDeleteCall
- func (c *DrivesDeleteCall) Header() http.Header
- func (c *DrivesDeleteCall) UseDomainAdminAccess(useDomainAdminAccess bool) *DrivesDeleteCall
- type DrivesGetCall
- func (c *DrivesGetCall) Context(ctx context.Context) *DrivesGetCall
- func (c *DrivesGetCall) Do(opts ...googleapi.CallOption) (*Drive, error)
- func (c *DrivesGetCall) Fields(s ...googleapi.Field) *DrivesGetCall
- func (c *DrivesGetCall) Header() http.Header
- func (c *DrivesGetCall) IfNoneMatch(entityTag string) *DrivesGetCall
- func (c *DrivesGetCall) UseDomainAdminAccess(useDomainAdminAccess bool) *DrivesGetCall
- type DrivesHideCall
- type DrivesInsertCall
- type DrivesListCall
- func (c *DrivesListCall) Context(ctx context.Context) *DrivesListCall
- func (c *DrivesListCall) Do(opts ...googleapi.CallOption) (*DriveList, error)
- func (c *DrivesListCall) Fields(s ...googleapi.Field) *DrivesListCall
- func (c *DrivesListCall) Header() http.Header
- func (c *DrivesListCall) IfNoneMatch(entityTag string) *DrivesListCall
- func (c *DrivesListCall) MaxResults(maxResults int64) *DrivesListCall
- func (c *DrivesListCall) PageToken(pageToken string) *DrivesListCall
- func (c *DrivesListCall) Pages(ctx context.Context, f func(*DriveList) error) error
- func (c *DrivesListCall) Q(q string) *DrivesListCall
- func (c *DrivesListCall) UseDomainAdminAccess(useDomainAdminAccess bool) *DrivesListCall
- type DrivesService
- func (r *DrivesService) Delete(driveId string) *DrivesDeleteCall
- func (r *DrivesService) Get(driveId string) *DrivesGetCall
- func (r *DrivesService) Hide(driveId string) *DrivesHideCall
- func (r *DrivesService) Insert(requestId string, drive *Drive) *DrivesInsertCall
- func (r *DrivesService) List() *DrivesListCall
- func (r *DrivesService) Unhide(driveId string) *DrivesUnhideCall
- func (r *DrivesService) Update(driveId string, drive *Drive) *DrivesUpdateCall
- type DrivesUnhideCall
- type DrivesUpdateCall
- func (c *DrivesUpdateCall) Context(ctx context.Context) *DrivesUpdateCall
- func (c *DrivesUpdateCall) Do(opts ...googleapi.CallOption) (*Drive, error)
- func (c *DrivesUpdateCall) Fields(s ...googleapi.Field) *DrivesUpdateCall
- func (c *DrivesUpdateCall) Header() http.Header
- func (c *DrivesUpdateCall) UseDomainAdminAccess(useDomainAdminAccess bool) *DrivesUpdateCall
- type File
- type FileCapabilities
- type FileImageMediaMetadata
- type FileImageMediaMetadataLocation
- type FileIndexableText
- type FileLabelInfo
- type FileLabels
- type FileLinkShareMetadata
- type FileList
- type FileShortcutDetails
- type FileThumbnail
- type FileVideoMediaMetadata
- type FilesCopyCall
- func (c *FilesCopyCall) Context(ctx context.Context) *FilesCopyCall
- func (c *FilesCopyCall) Convert(convert bool) *FilesCopyCall
- func (c *FilesCopyCall) Do(opts ...googleapi.CallOption) (*File, error)
- func (c *FilesCopyCall) EnforceSingleParent(enforceSingleParent bool) *FilesCopyCall
- func (c *FilesCopyCall) Fields(s ...googleapi.Field) *FilesCopyCall
- func (c *FilesCopyCall) Header() http.Header
- func (c *FilesCopyCall) IncludeLabels(includeLabels string) *FilesCopyCall
- func (c *FilesCopyCall) IncludePermissionsForView(includePermissionsForView string) *FilesCopyCall
- func (c *FilesCopyCall) Ocr(ocr bool) *FilesCopyCall
- func (c *FilesCopyCall) OcrLanguage(ocrLanguage string) *FilesCopyCall
- func (c *FilesCopyCall) Pinned(pinned bool) *FilesCopyCall
- func (c *FilesCopyCall) SupportsAllDrives(supportsAllDrives bool) *FilesCopyCall
- func (c *FilesCopyCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesCopyCall
- func (c *FilesCopyCall) TimedTextLanguage(timedTextLanguage string) *FilesCopyCall
- func (c *FilesCopyCall) TimedTextTrackName(timedTextTrackName string) *FilesCopyCall
- func (c *FilesCopyCall) Visibility(visibility string) *FilesCopyCall
- type FilesDeleteCall
- func (c *FilesDeleteCall) Context(ctx context.Context) *FilesDeleteCall
- func (c *FilesDeleteCall) Do(opts ...googleapi.CallOption) error
- func (c *FilesDeleteCall) EnforceSingleParent(enforceSingleParent bool) *FilesDeleteCall
- func (c *FilesDeleteCall) Fields(s ...googleapi.Field) *FilesDeleteCall
- func (c *FilesDeleteCall) Header() http.Header
- func (c *FilesDeleteCall) SupportsAllDrives(supportsAllDrives bool) *FilesDeleteCall
- func (c *FilesDeleteCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesDeleteCall
- type FilesEmptyTrashCall
- func (c *FilesEmptyTrashCall) Context(ctx context.Context) *FilesEmptyTrashCall
- func (c *FilesEmptyTrashCall) Do(opts ...googleapi.CallOption) error
- func (c *FilesEmptyTrashCall) DriveId(driveId string) *FilesEmptyTrashCall
- func (c *FilesEmptyTrashCall) EnforceSingleParent(enforceSingleParent bool) *FilesEmptyTrashCall
- func (c *FilesEmptyTrashCall) Fields(s ...googleapi.Field) *FilesEmptyTrashCall
- func (c *FilesEmptyTrashCall) Header() http.Header
- type FilesExportCall
- func (c *FilesExportCall) Context(ctx context.Context) *FilesExportCall
- func (c *FilesExportCall) Do(opts ...googleapi.CallOption) error
- func (c *FilesExportCall) Download(opts ...googleapi.CallOption) (*http.Response, error)
- func (c *FilesExportCall) Fields(s ...googleapi.Field) *FilesExportCall
- func (c *FilesExportCall) Header() http.Header
- func (c *FilesExportCall) IfNoneMatch(entityTag string) *FilesExportCall
- type FilesGenerateIdsCall
- func (c *FilesGenerateIdsCall) Context(ctx context.Context) *FilesGenerateIdsCall
- func (c *FilesGenerateIdsCall) Do(opts ...googleapi.CallOption) (*GeneratedIds, error)
- func (c *FilesGenerateIdsCall) Fields(s ...googleapi.Field) *FilesGenerateIdsCall
- func (c *FilesGenerateIdsCall) Header() http.Header
- func (c *FilesGenerateIdsCall) IfNoneMatch(entityTag string) *FilesGenerateIdsCall
- func (c *FilesGenerateIdsCall) MaxResults(maxResults int64) *FilesGenerateIdsCall
- func (c *FilesGenerateIdsCall) Space(space string) *FilesGenerateIdsCall
- func (c *FilesGenerateIdsCall) Type(type_ string) *FilesGenerateIdsCall
- type FilesGetCall
- func (c *FilesGetCall) AcknowledgeAbuse(acknowledgeAbuse bool) *FilesGetCall
- func (c *FilesGetCall) Context(ctx context.Context) *FilesGetCall
- func (c *FilesGetCall) Do(opts ...googleapi.CallOption) (*File, error)
- func (c *FilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error)
- func (c *FilesGetCall) Fields(s ...googleapi.Field) *FilesGetCall
- func (c *FilesGetCall) Header() http.Header
- func (c *FilesGetCall) IfNoneMatch(entityTag string) *FilesGetCall
- func (c *FilesGetCall) IncludeLabels(includeLabels string) *FilesGetCall
- func (c *FilesGetCall) IncludePermissionsForView(includePermissionsForView string) *FilesGetCall
- func (c *FilesGetCall) Projection(projection string) *FilesGetCall
- func (c *FilesGetCall) RevisionId(revisionId string) *FilesGetCall
- func (c *FilesGetCall) SupportsAllDrives(supportsAllDrives bool) *FilesGetCall
- func (c *FilesGetCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesGetCall
- func (c *FilesGetCall) UpdateViewedDate(updateViewedDate bool) *FilesGetCall
- type FilesInsertCall
- func (c *FilesInsertCall) Context(ctx context.Context) *FilesInsertCall
- func (c *FilesInsertCall) Convert(convert bool) *FilesInsertCall
- func (c *FilesInsertCall) Do(opts ...googleapi.CallOption) (*File, error)
- func (c *FilesInsertCall) EnforceSingleParent(enforceSingleParent bool) *FilesInsertCall
- func (c *FilesInsertCall) Fields(s ...googleapi.Field) *FilesInsertCall
- func (c *FilesInsertCall) Header() http.Header
- func (c *FilesInsertCall) IncludeLabels(includeLabels string) *FilesInsertCall
- func (c *FilesInsertCall) IncludePermissionsForView(includePermissionsForView string) *FilesInsertCall
- func (c *FilesInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *FilesInsertCall
- func (c *FilesInsertCall) Ocr(ocr bool) *FilesInsertCall
- func (c *FilesInsertCall) OcrLanguage(ocrLanguage string) *FilesInsertCall
- func (c *FilesInsertCall) Pinned(pinned bool) *FilesInsertCall
- func (c *FilesInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *FilesInsertCall
- func (c *FilesInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *FilesInsertCalldeprecated
- func (c *FilesInsertCall) SupportsAllDrives(supportsAllDrives bool) *FilesInsertCall
- func (c *FilesInsertCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesInsertCall
- func (c *FilesInsertCall) TimedTextLanguage(timedTextLanguage string) *FilesInsertCall
- func (c *FilesInsertCall) TimedTextTrackName(timedTextTrackName string) *FilesInsertCall
- func (c *FilesInsertCall) UseContentAsIndexableText(useContentAsIndexableText bool) *FilesInsertCall
- func (c *FilesInsertCall) Visibility(visibility string) *FilesInsertCall
- type FilesListCall
- func (c *FilesListCall) Context(ctx context.Context) *FilesListCall
- func (c *FilesListCall) Corpora(corpora string) *FilesListCall
- func (c *FilesListCall) Corpus(corpus string) *FilesListCall
- func (c *FilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error)
- func (c *FilesListCall) DriveId(driveId string) *FilesListCall
- func (c *FilesListCall) Fields(s ...googleapi.Field) *FilesListCall
- func (c *FilesListCall) Header() http.Header
- func (c *FilesListCall) IfNoneMatch(entityTag string) *FilesListCall
- func (c *FilesListCall) IncludeItemsFromAllDrives(includeItemsFromAllDrives bool) *FilesListCall
- func (c *FilesListCall) IncludeLabels(includeLabels string) *FilesListCall
- func (c *FilesListCall) IncludePermissionsForView(includePermissionsForView string) *FilesListCall
- func (c *FilesListCall) IncludeTeamDriveItems(includeTeamDriveItems bool) *FilesListCall
- func (c *FilesListCall) MaxResults(maxResults int64) *FilesListCall
- func (c *FilesListCall) OrderBy(orderBy string) *FilesListCall
- func (c *FilesListCall) PageToken(pageToken string) *FilesListCall
- func (c *FilesListCall) Pages(ctx context.Context, f func(*FileList) error) error
- func (c *FilesListCall) Projection(projection string) *FilesListCall
- func (c *FilesListCall) Q(q string) *FilesListCall
- func (c *FilesListCall) Spaces(spaces string) *FilesListCall
- func (c *FilesListCall) SupportsAllDrives(supportsAllDrives bool) *FilesListCall
- func (c *FilesListCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesListCall
- func (c *FilesListCall) TeamDriveId(teamDriveId string) *FilesListCall
- type FilesListLabelsCall
- func (c *FilesListLabelsCall) Context(ctx context.Context) *FilesListLabelsCall
- func (c *FilesListLabelsCall) Do(opts ...googleapi.CallOption) (*LabelList, error)
- func (c *FilesListLabelsCall) Fields(s ...googleapi.Field) *FilesListLabelsCall
- func (c *FilesListLabelsCall) Header() http.Header
- func (c *FilesListLabelsCall) IfNoneMatch(entityTag string) *FilesListLabelsCall
- func (c *FilesListLabelsCall) MaxResults(maxResults int64) *FilesListLabelsCall
- func (c *FilesListLabelsCall) PageToken(pageToken string) *FilesListLabelsCall
- func (c *FilesListLabelsCall) Pages(ctx context.Context, f func(*LabelList) error) error
- type FilesModifyLabelsCall
- func (c *FilesModifyLabelsCall) Context(ctx context.Context) *FilesModifyLabelsCall
- func (c *FilesModifyLabelsCall) Do(opts ...googleapi.CallOption) (*ModifyLabelsResponse, error)
- func (c *FilesModifyLabelsCall) Fields(s ...googleapi.Field) *FilesModifyLabelsCall
- func (c *FilesModifyLabelsCall) Header() http.Header
- type FilesPatchCall
- func (c *FilesPatchCall) AddParents(addParents string) *FilesPatchCall
- func (c *FilesPatchCall) Context(ctx context.Context) *FilesPatchCall
- func (c *FilesPatchCall) Convert(convert bool) *FilesPatchCall
- func (c *FilesPatchCall) Do(opts ...googleapi.CallOption) (*File, error)
- func (c *FilesPatchCall) EnforceSingleParent(enforceSingleParent bool) *FilesPatchCall
- func (c *FilesPatchCall) Fields(s ...googleapi.Field) *FilesPatchCall
- func (c *FilesPatchCall) Header() http.Header
- func (c *FilesPatchCall) IncludeLabels(includeLabels string) *FilesPatchCall
- func (c *FilesPatchCall) IncludePermissionsForView(includePermissionsForView string) *FilesPatchCall
- func (c *FilesPatchCall) ModifiedDateBehavior(modifiedDateBehavior string) *FilesPatchCall
- func (c *FilesPatchCall) NewRevision(newRevision bool) *FilesPatchCall
- func (c *FilesPatchCall) Ocr(ocr bool) *FilesPatchCall
- func (c *FilesPatchCall) OcrLanguage(ocrLanguage string) *FilesPatchCall
- func (c *FilesPatchCall) Pinned(pinned bool) *FilesPatchCall
- func (c *FilesPatchCall) RemoveParents(removeParents string) *FilesPatchCall
- func (c *FilesPatchCall) SetModifiedDate(setModifiedDate bool) *FilesPatchCall
- func (c *FilesPatchCall) SupportsAllDrives(supportsAllDrives bool) *FilesPatchCall
- func (c *FilesPatchCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesPatchCall
- func (c *FilesPatchCall) TimedTextLanguage(timedTextLanguage string) *FilesPatchCall
- func (c *FilesPatchCall) TimedTextTrackName(timedTextTrackName string) *FilesPatchCall
- func (c *FilesPatchCall) UpdateViewedDate(updateViewedDate bool) *FilesPatchCall
- func (c *FilesPatchCall) UseContentAsIndexableText(useContentAsIndexableText bool) *FilesPatchCall
- type FilesService
- func (r *FilesService) Copy(fileId string, file *File) *FilesCopyCall
- func (r *FilesService) Delete(fileId string) *FilesDeleteCall
- func (r *FilesService) EmptyTrash() *FilesEmptyTrashCall
- func (r *FilesService) Export(fileId string, mimeType string) *FilesExportCall
- func (r *FilesService) GenerateIds() *FilesGenerateIdsCall
- func (r *FilesService) Get(fileId string) *FilesGetCall
- func (r *FilesService) Insert(file *File) *FilesInsertCall
- func (r *FilesService) List() *FilesListCall
- func (r *FilesService) ListLabels(fileId string) *FilesListLabelsCall
- func (r *FilesService) ModifyLabels(fileId string, modifylabelsrequest *ModifyLabelsRequest) *FilesModifyLabelsCall
- func (r *FilesService) Patch(fileId string, file *File) *FilesPatchCall
- func (r *FilesService) Touch(fileId string) *FilesTouchCall
- func (r *FilesService) Trash(fileId string) *FilesTrashCall
- func (r *FilesService) Untrash(fileId string) *FilesUntrashCall
- func (r *FilesService) Update(fileId string, file *File) *FilesUpdateCall
- func (r *FilesService) Watch(fileId string, channel *Channel) *FilesWatchCall
- type FilesTouchCall
- func (c *FilesTouchCall) Context(ctx context.Context) *FilesTouchCall
- func (c *FilesTouchCall) Do(opts ...googleapi.CallOption) (*File, error)
- func (c *FilesTouchCall) Fields(s ...googleapi.Field) *FilesTouchCall
- func (c *FilesTouchCall) Header() http.Header
- func (c *FilesTouchCall) IncludeLabels(includeLabels string) *FilesTouchCall
- func (c *FilesTouchCall) IncludePermissionsForView(includePermissionsForView string) *FilesTouchCall
- func (c *FilesTouchCall) SupportsAllDrives(supportsAllDrives bool) *FilesTouchCall
- func (c *FilesTouchCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesTouchCall
- type FilesTrashCall
- func (c *FilesTrashCall) Context(ctx context.Context) *FilesTrashCall
- func (c *FilesTrashCall) Do(opts ...googleapi.CallOption) (*File, error)
- func (c *FilesTrashCall) Fields(s ...googleapi.Field) *FilesTrashCall
- func (c *FilesTrashCall) Header() http.Header
- func (c *FilesTrashCall) IncludeLabels(includeLabels string) *FilesTrashCall
- func (c *FilesTrashCall) IncludePermissionsForView(includePermissionsForView string) *FilesTrashCall
- func (c *FilesTrashCall) SupportsAllDrives(supportsAllDrives bool) *FilesTrashCall
- func (c *FilesTrashCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesTrashCall
- type FilesUntrashCall
- func (c *FilesUntrashCall) Context(ctx context.Context) *FilesUntrashCall
- func (c *FilesUntrashCall) Do(opts ...googleapi.CallOption) (*File, error)
- func (c *FilesUntrashCall) Fields(s ...googleapi.Field) *FilesUntrashCall
- func (c *FilesUntrashCall) Header() http.Header
- func (c *FilesUntrashCall) IncludeLabels(includeLabels string) *FilesUntrashCall
- func (c *FilesUntrashCall) IncludePermissionsForView(includePermissionsForView string) *FilesUntrashCall
- func (c *FilesUntrashCall) SupportsAllDrives(supportsAllDrives bool) *FilesUntrashCall
- func (c *FilesUntrashCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesUntrashCall
- type FilesUpdateCall
- func (c *FilesUpdateCall) AddParents(addParents string) *FilesUpdateCall
- func (c *FilesUpdateCall) Context(ctx context.Context) *FilesUpdateCall
- func (c *FilesUpdateCall) Convert(convert bool) *FilesUpdateCall
- func (c *FilesUpdateCall) Do(opts ...googleapi.CallOption) (*File, error)
- func (c *FilesUpdateCall) EnforceSingleParent(enforceSingleParent bool) *FilesUpdateCall
- func (c *FilesUpdateCall) Fields(s ...googleapi.Field) *FilesUpdateCall
- func (c *FilesUpdateCall) Header() http.Header
- func (c *FilesUpdateCall) IncludeLabels(includeLabels string) *FilesUpdateCall
- func (c *FilesUpdateCall) IncludePermissionsForView(includePermissionsForView string) *FilesUpdateCall
- func (c *FilesUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption) *FilesUpdateCall
- func (c *FilesUpdateCall) ModifiedDateBehavior(modifiedDateBehavior string) *FilesUpdateCall
- func (c *FilesUpdateCall) NewRevision(newRevision bool) *FilesUpdateCall
- func (c *FilesUpdateCall) Ocr(ocr bool) *FilesUpdateCall
- func (c *FilesUpdateCall) OcrLanguage(ocrLanguage string) *FilesUpdateCall
- func (c *FilesUpdateCall) Pinned(pinned bool) *FilesUpdateCall
- func (c *FilesUpdateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *FilesUpdateCall
- func (c *FilesUpdateCall) RemoveParents(removeParents string) *FilesUpdateCall
- func (c *FilesUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *FilesUpdateCalldeprecated
- func (c *FilesUpdateCall) SetModifiedDate(setModifiedDate bool) *FilesUpdateCall
- func (c *FilesUpdateCall) SupportsAllDrives(supportsAllDrives bool) *FilesUpdateCall
- func (c *FilesUpdateCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesUpdateCall
- func (c *FilesUpdateCall) TimedTextLanguage(timedTextLanguage string) *FilesUpdateCall
- func (c *FilesUpdateCall) TimedTextTrackName(timedTextTrackName string) *FilesUpdateCall
- func (c *FilesUpdateCall) UpdateViewedDate(updateViewedDate bool) *FilesUpdateCall
- func (c *FilesUpdateCall) UseContentAsIndexableText(useContentAsIndexableText bool) *FilesUpdateCall
- type FilesWatchCall
- func (c *FilesWatchCall) AcknowledgeAbuse(acknowledgeAbuse bool) *FilesWatchCall
- func (c *FilesWatchCall) Context(ctx context.Context) *FilesWatchCall
- func (c *FilesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error)
- func (c *FilesWatchCall) Fields(s ...googleapi.Field) *FilesWatchCall
- func (c *FilesWatchCall) Header() http.Header
- func (c *FilesWatchCall) IncludeLabels(includeLabels string) *FilesWatchCall
- func (c *FilesWatchCall) IncludePermissionsForView(includePermissionsForView string) *FilesWatchCall
- func (c *FilesWatchCall) Projection(projection string) *FilesWatchCall
- func (c *FilesWatchCall) RevisionId(revisionId string) *FilesWatchCall
- func (c *FilesWatchCall) SupportsAllDrives(supportsAllDrives bool) *FilesWatchCall
- func (c *FilesWatchCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesWatchCall
- func (c *FilesWatchCall) UpdateViewedDate(updateViewedDate bool) *FilesWatchCall
- type GeneratedIds
- type Label
- type LabelField
- type LabelFieldModification
- type LabelList
- type LabelModification
- type ModifyLabelsRequest
- type ModifyLabelsResponse
- type ParentList
- type ParentReference
- type ParentsDeleteCall
- func (c *ParentsDeleteCall) Context(ctx context.Context) *ParentsDeleteCall
- func (c *ParentsDeleteCall) Do(opts ...googleapi.CallOption) error
- func (c *ParentsDeleteCall) EnforceSingleParent(enforceSingleParent bool) *ParentsDeleteCall
- func (c *ParentsDeleteCall) Fields(s ...googleapi.Field) *ParentsDeleteCall
- func (c *ParentsDeleteCall) Header() http.Header
- type ParentsGetCall
- func (c *ParentsGetCall) Context(ctx context.Context) *ParentsGetCall
- func (c *ParentsGetCall) Do(opts ...googleapi.CallOption) (*ParentReference, error)
- func (c *ParentsGetCall) Fields(s ...googleapi.Field) *ParentsGetCall
- func (c *ParentsGetCall) Header() http.Header
- func (c *ParentsGetCall) IfNoneMatch(entityTag string) *ParentsGetCall
- type ParentsInsertCall
- func (c *ParentsInsertCall) Context(ctx context.Context) *ParentsInsertCall
- func (c *ParentsInsertCall) Do(opts ...googleapi.CallOption) (*ParentReference, error)
- func (c *ParentsInsertCall) EnforceSingleParent(enforceSingleParent bool) *ParentsInsertCall
- func (c *ParentsInsertCall) Fields(s ...googleapi.Field) *ParentsInsertCall
- func (c *ParentsInsertCall) Header() http.Header
- func (c *ParentsInsertCall) SupportsAllDrives(supportsAllDrives bool) *ParentsInsertCall
- func (c *ParentsInsertCall) SupportsTeamDrives(supportsTeamDrives bool) *ParentsInsertCall
- type ParentsListCall
- func (c *ParentsListCall) Context(ctx context.Context) *ParentsListCall
- func (c *ParentsListCall) Do(opts ...googleapi.CallOption) (*ParentList, error)
- func (c *ParentsListCall) Fields(s ...googleapi.Field) *ParentsListCall
- func (c *ParentsListCall) Header() http.Header
- func (c *ParentsListCall) IfNoneMatch(entityTag string) *ParentsListCall
- type ParentsService
- func (r *ParentsService) Delete(fileId string, parentId string) *ParentsDeleteCall
- func (r *ParentsService) Get(fileId string, parentId string) *ParentsGetCall
- func (r *ParentsService) Insert(fileId string, parentreference *ParentReference) *ParentsInsertCall
- func (r *ParentsService) List(fileId string) *ParentsListCall
- type Permission
- type PermissionId
- type PermissionList
- type PermissionPermissionDetails
- type PermissionTeamDrivePermissionDetails
- type PermissionsDeleteCall
- func (c *PermissionsDeleteCall) Context(ctx context.Context) *PermissionsDeleteCall
- func (c *PermissionsDeleteCall) Do(opts ...googleapi.CallOption) error
- func (c *PermissionsDeleteCall) EnforceExpansiveAccess(enforceExpansiveAccess bool) *PermissionsDeleteCall
- func (c *PermissionsDeleteCall) Fields(s ...googleapi.Field) *PermissionsDeleteCall
- func (c *PermissionsDeleteCall) Header() http.Header
- func (c *PermissionsDeleteCall) SupportsAllDrives(supportsAllDrives bool) *PermissionsDeleteCall
- func (c *PermissionsDeleteCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsDeleteCall
- func (c *PermissionsDeleteCall) UseDomainAdminAccess(useDomainAdminAccess bool) *PermissionsDeleteCall
- type PermissionsGetCall
- func (c *PermissionsGetCall) Context(ctx context.Context) *PermissionsGetCall
- func (c *PermissionsGetCall) Do(opts ...googleapi.CallOption) (*Permission, error)
- func (c *PermissionsGetCall) Fields(s ...googleapi.Field) *PermissionsGetCall
- func (c *PermissionsGetCall) Header() http.Header
- func (c *PermissionsGetCall) IfNoneMatch(entityTag string) *PermissionsGetCall
- func (c *PermissionsGetCall) SupportsAllDrives(supportsAllDrives bool) *PermissionsGetCall
- func (c *PermissionsGetCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsGetCall
- func (c *PermissionsGetCall) UseDomainAdminAccess(useDomainAdminAccess bool) *PermissionsGetCall
- type PermissionsGetIdForEmailCall
- func (c *PermissionsGetIdForEmailCall) Context(ctx context.Context) *PermissionsGetIdForEmailCall
- func (c *PermissionsGetIdForEmailCall) Do(opts ...googleapi.CallOption) (*PermissionId, error)
- func (c *PermissionsGetIdForEmailCall) Fields(s ...googleapi.Field) *PermissionsGetIdForEmailCall
- func (c *PermissionsGetIdForEmailCall) Header() http.Header
- func (c *PermissionsGetIdForEmailCall) IfNoneMatch(entityTag string) *PermissionsGetIdForEmailCall
- type PermissionsInsertCall
- func (c *PermissionsInsertCall) Context(ctx context.Context) *PermissionsInsertCall
- func (c *PermissionsInsertCall) Do(opts ...googleapi.CallOption) (*Permission, error)
- func (c *PermissionsInsertCall) EmailMessage(emailMessage string) *PermissionsInsertCall
- func (c *PermissionsInsertCall) EnforceExpansiveAccess(enforceExpansiveAccess bool) *PermissionsInsertCall
- func (c *PermissionsInsertCall) EnforceSingleParent(enforceSingleParent bool) *PermissionsInsertCall
- func (c *PermissionsInsertCall) Fields(s ...googleapi.Field) *PermissionsInsertCall
- func (c *PermissionsInsertCall) Header() http.Header
- func (c *PermissionsInsertCall) MoveToNewOwnersRoot(moveToNewOwnersRoot bool) *PermissionsInsertCall
- func (c *PermissionsInsertCall) SendNotificationEmails(sendNotificationEmails bool) *PermissionsInsertCall
- func (c *PermissionsInsertCall) SupportsAllDrives(supportsAllDrives bool) *PermissionsInsertCall
- func (c *PermissionsInsertCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsInsertCall
- func (c *PermissionsInsertCall) UseDomainAdminAccess(useDomainAdminAccess bool) *PermissionsInsertCall
- type PermissionsListCall
- func (c *PermissionsListCall) Context(ctx context.Context) *PermissionsListCall
- func (c *PermissionsListCall) Do(opts ...googleapi.CallOption) (*PermissionList, error)
- func (c *PermissionsListCall) Fields(s ...googleapi.Field) *PermissionsListCall
- func (c *PermissionsListCall) Header() http.Header
- func (c *PermissionsListCall) IfNoneMatch(entityTag string) *PermissionsListCall
- func (c *PermissionsListCall) IncludePermissionsForView(includePermissionsForView string) *PermissionsListCall
- func (c *PermissionsListCall) MaxResults(maxResults int64) *PermissionsListCall
- func (c *PermissionsListCall) PageToken(pageToken string) *PermissionsListCall
- func (c *PermissionsListCall) Pages(ctx context.Context, f func(*PermissionList) error) error
- func (c *PermissionsListCall) SupportsAllDrives(supportsAllDrives bool) *PermissionsListCall
- func (c *PermissionsListCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsListCall
- func (c *PermissionsListCall) UseDomainAdminAccess(useDomainAdminAccess bool) *PermissionsListCall
- type PermissionsPatchCall
- func (c *PermissionsPatchCall) Context(ctx context.Context) *PermissionsPatchCall
- func (c *PermissionsPatchCall) Do(opts ...googleapi.CallOption) (*Permission, error)
- func (c *PermissionsPatchCall) EnforceExpansiveAccess(enforceExpansiveAccess bool) *PermissionsPatchCall
- func (c *PermissionsPatchCall) Fields(s ...googleapi.Field) *PermissionsPatchCall
- func (c *PermissionsPatchCall) Header() http.Header
- func (c *PermissionsPatchCall) RemoveExpiration(removeExpiration bool) *PermissionsPatchCall
- func (c *PermissionsPatchCall) SupportsAllDrives(supportsAllDrives bool) *PermissionsPatchCall
- func (c *PermissionsPatchCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsPatchCall
- func (c *PermissionsPatchCall) TransferOwnership(transferOwnership bool) *PermissionsPatchCall
- func (c *PermissionsPatchCall) UseDomainAdminAccess(useDomainAdminAccess bool) *PermissionsPatchCall
- type PermissionsService
- func (r *PermissionsService) Delete(fileId string, permissionId string) *PermissionsDeleteCall
- func (r *PermissionsService) Get(fileId string, permissionId string) *PermissionsGetCall
- func (r *PermissionsService) GetIdForEmail(email string) *PermissionsGetIdForEmailCall
- func (r *PermissionsService) Insert(fileId string, permission *Permission) *PermissionsInsertCall
- func (r *PermissionsService) List(fileId string) *PermissionsListCall
- func (r *PermissionsService) Patch(fileId string, permissionId string, permission *Permission) *PermissionsPatchCall
- func (r *PermissionsService) Update(fileId string, permissionId string, permission *Permission) *PermissionsUpdateCall
- type PermissionsUpdateCall
- func (c *PermissionsUpdateCall) Context(ctx context.Context) *PermissionsUpdateCall
- func (c *PermissionsUpdateCall) Do(opts ...googleapi.CallOption) (*Permission, error)
- func (c *PermissionsUpdateCall) EnforceExpansiveAccess(enforceExpansiveAccess bool) *PermissionsUpdateCall
- func (c *PermissionsUpdateCall) Fields(s ...googleapi.Field) *PermissionsUpdateCall
- func (c *PermissionsUpdateCall) Header() http.Header
- func (c *PermissionsUpdateCall) RemoveExpiration(removeExpiration bool) *PermissionsUpdateCall
- func (c *PermissionsUpdateCall) SupportsAllDrives(supportsAllDrives bool) *PermissionsUpdateCall
- func (c *PermissionsUpdateCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsUpdateCall
- func (c *PermissionsUpdateCall) TransferOwnership(transferOwnership bool) *PermissionsUpdateCall
- func (c *PermissionsUpdateCall) UseDomainAdminAccess(useDomainAdminAccess bool) *PermissionsUpdateCall
- type PropertiesDeleteCall
- func (c *PropertiesDeleteCall) Context(ctx context.Context) *PropertiesDeleteCall
- func (c *PropertiesDeleteCall) Do(opts ...googleapi.CallOption) error
- func (c *PropertiesDeleteCall) Fields(s ...googleapi.Field) *PropertiesDeleteCall
- func (c *PropertiesDeleteCall) Header() http.Header
- func (c *PropertiesDeleteCall) Visibility(visibility string) *PropertiesDeleteCall
- type PropertiesGetCall
- func (c *PropertiesGetCall) Context(ctx context.Context) *PropertiesGetCall
- func (c *PropertiesGetCall) Do(opts ...googleapi.CallOption) (*Property, error)
- func (c *PropertiesGetCall) Fields(s ...googleapi.Field) *PropertiesGetCall
- func (c *PropertiesGetCall) Header() http.Header
- func (c *PropertiesGetCall) IfNoneMatch(entityTag string) *PropertiesGetCall
- func (c *PropertiesGetCall) Visibility(visibility string) *PropertiesGetCall
- type PropertiesInsertCall
- type PropertiesListCall
- func (c *PropertiesListCall) Context(ctx context.Context) *PropertiesListCall
- func (c *PropertiesListCall) Do(opts ...googleapi.CallOption) (*PropertyList, error)
- func (c *PropertiesListCall) Fields(s ...googleapi.Field) *PropertiesListCall
- func (c *PropertiesListCall) Header() http.Header
- func (c *PropertiesListCall) IfNoneMatch(entityTag string) *PropertiesListCall
- type PropertiesPatchCall
- func (c *PropertiesPatchCall) Context(ctx context.Context) *PropertiesPatchCall
- func (c *PropertiesPatchCall) Do(opts ...googleapi.CallOption) (*Property, error)
- func (c *PropertiesPatchCall) Fields(s ...googleapi.Field) *PropertiesPatchCall
- func (c *PropertiesPatchCall) Header() http.Header
- func (c *PropertiesPatchCall) Visibility(visibility string) *PropertiesPatchCall
- type PropertiesService
- func (r *PropertiesService) Delete(fileId string, propertyKey string) *PropertiesDeleteCall
- func (r *PropertiesService) Get(fileId string, propertyKey string) *PropertiesGetCall
- func (r *PropertiesService) Insert(fileId string, property *Property) *PropertiesInsertCall
- func (r *PropertiesService) List(fileId string) *PropertiesListCall
- func (r *PropertiesService) Patch(fileId string, propertyKey string, property *Property) *PropertiesPatchCall
- func (r *PropertiesService) Update(fileId string, propertyKey string, property *Property) *PropertiesUpdateCall
- type PropertiesUpdateCall
- func (c *PropertiesUpdateCall) Context(ctx context.Context) *PropertiesUpdateCall
- func (c *PropertiesUpdateCall) Do(opts ...googleapi.CallOption) (*Property, error)
- func (c *PropertiesUpdateCall) Fields(s ...googleapi.Field) *PropertiesUpdateCall
- func (c *PropertiesUpdateCall) Header() http.Header
- func (c *PropertiesUpdateCall) Visibility(visibility string) *PropertiesUpdateCall
- type Property
- type PropertyList
- type RepliesDeleteCall
- type RepliesGetCall
- func (c *RepliesGetCall) Context(ctx context.Context) *RepliesGetCall
- func (c *RepliesGetCall) Do(opts ...googleapi.CallOption) (*CommentReply, error)
- func (c *RepliesGetCall) Fields(s ...googleapi.Field) *RepliesGetCall
- func (c *RepliesGetCall) Header() http.Header
- func (c *RepliesGetCall) IfNoneMatch(entityTag string) *RepliesGetCall
- func (c *RepliesGetCall) IncludeDeleted(includeDeleted bool) *RepliesGetCall
- type RepliesInsertCall
- type RepliesListCall
- func (c *RepliesListCall) Context(ctx context.Context) *RepliesListCall
- func (c *RepliesListCall) Do(opts ...googleapi.CallOption) (*CommentReplyList, error)
- func (c *RepliesListCall) Fields(s ...googleapi.Field) *RepliesListCall
- func (c *RepliesListCall) Header() http.Header
- func (c *RepliesListCall) IfNoneMatch(entityTag string) *RepliesListCall
- func (c *RepliesListCall) IncludeDeleted(includeDeleted bool) *RepliesListCall
- func (c *RepliesListCall) MaxResults(maxResults int64) *RepliesListCall
- func (c *RepliesListCall) PageToken(pageToken string) *RepliesListCall
- func (c *RepliesListCall) Pages(ctx context.Context, f func(*CommentReplyList) error) error
- type RepliesPatchCall
- type RepliesService
- func (r *RepliesService) Delete(fileId string, commentId string, replyId string) *RepliesDeleteCall
- func (r *RepliesService) Get(fileId string, commentId string, replyId string) *RepliesGetCall
- func (r *RepliesService) Insert(fileId string, commentId string, commentreply *CommentReply) *RepliesInsertCall
- func (r *RepliesService) List(fileId string, commentId string) *RepliesListCall
- func (r *RepliesService) Patch(fileId string, commentId string, replyId string, commentreply *CommentReply) *RepliesPatchCall
- func (r *RepliesService) Update(fileId string, commentId string, replyId string, commentreply *CommentReply) *RepliesUpdateCall
- type RepliesUpdateCall
- type Revision
- type RevisionList
- type RevisionsDeleteCall
- type RevisionsGetCall
- func (c *RevisionsGetCall) Context(ctx context.Context) *RevisionsGetCall
- func (c *RevisionsGetCall) Do(opts ...googleapi.CallOption) (*Revision, error)
- func (c *RevisionsGetCall) Fields(s ...googleapi.Field) *RevisionsGetCall
- func (c *RevisionsGetCall) Header() http.Header
- func (c *RevisionsGetCall) IfNoneMatch(entityTag string) *RevisionsGetCall
- type RevisionsListCall
- func (c *RevisionsListCall) Context(ctx context.Context) *RevisionsListCall
- func (c *RevisionsListCall) Do(opts ...googleapi.CallOption) (*RevisionList, error)
- func (c *RevisionsListCall) Fields(s ...googleapi.Field) *RevisionsListCall
- func (c *RevisionsListCall) Header() http.Header
- func (c *RevisionsListCall) IfNoneMatch(entityTag string) *RevisionsListCall
- func (c *RevisionsListCall) MaxResults(maxResults int64) *RevisionsListCall
- func (c *RevisionsListCall) PageToken(pageToken string) *RevisionsListCall
- func (c *RevisionsListCall) Pages(ctx context.Context, f func(*RevisionList) error) error
- type RevisionsPatchCall
- type RevisionsService
- func (r *RevisionsService) Delete(fileId string, revisionId string) *RevisionsDeleteCall
- func (r *RevisionsService) Get(fileId string, revisionId string) *RevisionsGetCall
- func (r *RevisionsService) List(fileId string) *RevisionsListCall
- func (r *RevisionsService) Patch(fileId string, revisionId string, revision *Revision) *RevisionsPatchCall
- func (r *RevisionsService) Update(fileId string, revisionId string, revision *Revision) *RevisionsUpdateCall
- type RevisionsUpdateCall
- type Service
- type StartPageToken
- type TeamDrive
- type TeamDriveBackgroundImageFile
- type TeamDriveCapabilities
- type TeamDriveList
- type TeamDriveRestrictions
- type TeamdrivesDeleteCall
- type TeamdrivesGetCall
- func (c *TeamdrivesGetCall) Context(ctx context.Context) *TeamdrivesGetCall
- func (c *TeamdrivesGetCall) Do(opts ...googleapi.CallOption) (*TeamDrive, error)
- func (c *TeamdrivesGetCall) Fields(s ...googleapi.Field) *TeamdrivesGetCall
- func (c *TeamdrivesGetCall) Header() http.Header
- func (c *TeamdrivesGetCall) IfNoneMatch(entityTag string) *TeamdrivesGetCall
- func (c *TeamdrivesGetCall) UseDomainAdminAccess(useDomainAdminAccess bool) *TeamdrivesGetCall
- type TeamdrivesInsertCall
- type TeamdrivesListCall
- func (c *TeamdrivesListCall) Context(ctx context.Context) *TeamdrivesListCall
- func (c *TeamdrivesListCall) Do(opts ...googleapi.CallOption) (*TeamDriveList, error)
- func (c *TeamdrivesListCall) Fields(s ...googleapi.Field) *TeamdrivesListCall
- func (c *TeamdrivesListCall) Header() http.Header
- func (c *TeamdrivesListCall) IfNoneMatch(entityTag string) *TeamdrivesListCall
- func (c *TeamdrivesListCall) MaxResults(maxResults int64) *TeamdrivesListCall
- func (c *TeamdrivesListCall) PageToken(pageToken string) *TeamdrivesListCall
- func (c *TeamdrivesListCall) Pages(ctx context.Context, f func(*TeamDriveList) error) error
- func (c *TeamdrivesListCall) Q(q string) *TeamdrivesListCall
- func (c *TeamdrivesListCall) UseDomainAdminAccess(useDomainAdminAccess bool) *TeamdrivesListCall
- type TeamdrivesService
- func (r *TeamdrivesService) Delete(teamDriveId string) *TeamdrivesDeleteCall
- func (r *TeamdrivesService) Get(teamDriveId string) *TeamdrivesGetCall
- func (r *TeamdrivesService) Insert(requestId string, teamdrive *TeamDrive) *TeamdrivesInsertCall
- func (r *TeamdrivesService) List() *TeamdrivesListCall
- func (r *TeamdrivesService) Update(teamDriveId string, teamdrive *TeamDrive) *TeamdrivesUpdateCall
- type TeamdrivesUpdateCall
- func (c *TeamdrivesUpdateCall) Context(ctx context.Context) *TeamdrivesUpdateCall
- func (c *TeamdrivesUpdateCall) Do(opts ...googleapi.CallOption) (*TeamDrive, error)
- func (c *TeamdrivesUpdateCall) Fields(s ...googleapi.Field) *TeamdrivesUpdateCall
- func (c *TeamdrivesUpdateCall) Header() http.Header
- func (c *TeamdrivesUpdateCall) UseDomainAdminAccess(useDomainAdminAccess bool) *TeamdrivesUpdateCall
- type User
- type UserPicture
Constants¶
const (// See, edit, create, and delete all of your Google Drive filesDriveScope = "https://www.googleapis.com/auth/drive"// See, create, and delete its own configuration data in your Google DriveDriveAppdataScope = "https://www.googleapis.com/auth/drive.appdata"// View your Google Drive appsDriveAppsReadonlyScope = "https://www.googleapis.com/auth/drive.apps.readonly"// See, edit, create, and delete only the specific Google Drive files you use// with this appDriveFileScope = "https://www.googleapis.com/auth/drive.file"// See and download your Google Drive files that were created or edited by// Google Meet.DriveMeetReadonlyScope = "https://www.googleapis.com/auth/drive.meet.readonly"// View and manage metadata of files in your Google DriveDriveMetadataScope = "https://www.googleapis.com/auth/drive.metadata"// See information about your Google Drive filesDriveMetadataReadonlyScope = "https://www.googleapis.com/auth/drive.metadata.readonly"// View the photos, videos and albums in your Google PhotosDrivePhotosReadonlyScope = "https://www.googleapis.com/auth/drive.photos.readonly"// See and download all your Google Drive filesDriveReadonlyScope = "https://www.googleapis.com/auth/drive.readonly"// Modify your Google Apps Script scripts' behaviorDriveScriptsScope = "https://www.googleapis.com/auth/drive.scripts")
OAuth2 scopes used by this API.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeAbout¶
type About struct {// AdditionalRoleInfo: Information about supported additional roles per file// type. The most specific type takes precedence.AdditionalRoleInfo []*AboutAdditionalRoleInfo `json:"additionalRoleInfo,omitempty"`// CanCreateDrives: Whether the user can create shared drives.CanCreateDrivesbool `json:"canCreateDrives,omitempty"`// CanCreateTeamDrives: Deprecated: Use `canCreateDrives` instead.CanCreateTeamDrivesbool `json:"canCreateTeamDrives,omitempty"`// DomainSharingPolicy: The domain sharing policy for the current user.// Possible values are: * `allowed` * `allowedWithWarning` * `incomingOnly` *// `disallowed`DomainSharingPolicystring `json:"domainSharingPolicy,omitempty"`// DriveThemes: A list of themes that are supported for shared drives.DriveThemes []*AboutDriveThemes `json:"driveThemes,omitempty"`// Etag: The ETag of the item.Etagstring `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.IsCurrentAppInstalledbool `json:"isCurrentAppInstalled,omitempty"`// Kind: This is always `drive#about`.Kindstring `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/).LanguageCodestring `json:"languageCode,omitempty"`// LargestChangeId: The largest change id.LargestChangeIdint64 `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.Namestring `json:"name,omitempty"`// PermissionId: The current user's ID as visible in the permissions// collection.PermissionIdstring `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. This is only relevant when// quotaType is LIMITED.QuotaBytesTotalint64 `json:"quotaBytesTotal,omitempty,string"`// QuotaBytesUsed: The number of quota bytes used by Google Drive.QuotaBytesUsedint64 `json:"quotaBytesUsed,omitempty,string"`// QuotaBytesUsedAggregate: The number of quota bytes used by all Google apps// (Drive, Picasa, etc.).QuotaBytesUsedAggregateint64 `json:"quotaBytesUsedAggregate,omitempty,string"`// QuotaBytesUsedInTrash: The number of quota bytes used by trashed items.QuotaBytesUsedInTrashint64 `json:"quotaBytesUsedInTrash,omitempty,string"`// QuotaType: The type of the user's storage quota. Possible values are: *// `LIMITED` * `UNLIMITED`QuotaTypestring `json:"quotaType,omitempty"`// RemainingChangeIds: The number of remaining change ids, limited to no more// than 2500.RemainingChangeIdsint64 `json:"remainingChangeIds,omitempty,string"`// RootFolderId: The id of the root folder.RootFolderIdstring `json:"rootFolderId,omitempty"`// SelfLink: A link back to this item.SelfLinkstring `json:"selfLink,omitempty"`// TeamDriveThemes: Deprecated: Use `driveThemes` instead.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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}About: An item with user information and settings.
func (About)MarshalJSON¶
typeAboutAdditionalRoleInfo¶
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.Typestring `json:"type,omitempty"`// ForceSendFields is a list of field names (e.g. "RoleSets") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}func (AboutAdditionalRoleInfo)MarshalJSON¶
func (sAboutAdditionalRoleInfo) MarshalJSON() ([]byte,error)
typeAboutAdditionalRoleInfoRoleSets¶
type AboutAdditionalRoleInfoRoleSets struct {// AdditionalRoles: The supported additional roles with the primary role.AdditionalRoles []string `json:"additionalRoles,omitempty"`// PrimaryRole: A primary permission role.PrimaryRolestring `json:"primaryRole,omitempty"`// ForceSendFields is a list of field names (e.g. "AdditionalRoles") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}func (AboutAdditionalRoleInfoRoleSets)MarshalJSON¶
func (sAboutAdditionalRoleInfoRoleSets) MarshalJSON() ([]byte,error)
typeAboutDriveThemes¶added inv0.4.0
type AboutDriveThemes struct {// BackgroundImageLink: A link to this theme's background image.BackgroundImageLinkstring `json:"backgroundImageLink,omitempty"`// ColorRgb: The color of this theme as an RGB hex string.ColorRgbstring `json:"colorRgb,omitempty"`// Id: The ID of the theme.Idstring `json:"id,omitempty"`// ForceSendFields is a list of field names (e.g. "BackgroundImageLink") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}func (AboutDriveThemes)MarshalJSON¶added inv0.4.0
func (sAboutDriveThemes) MarshalJSON() ([]byte,error)
typeAboutExportFormats¶
type AboutExportFormats struct {// Source: The content type to convert from.Sourcestring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}func (AboutExportFormats)MarshalJSON¶
func (sAboutExportFormats) MarshalJSON() ([]byte,error)
typeAboutFeatures¶
type AboutFeatures struct {// FeatureName: The name of the feature.FeatureNamestring `json:"featureName,omitempty"`// FeatureRate: The request limit rate for this feature, in queries per second.FeatureRatefloat64 `json:"featureRate,omitempty"`// ForceSendFields is a list of field names (e.g. "FeatureName") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}func (AboutFeatures)MarshalJSON¶
func (sAboutFeatures) MarshalJSON() ([]byte,error)
func (*AboutFeatures)UnmarshalJSON¶
func (s *AboutFeatures) UnmarshalJSON(data []byte)error
typeAboutGetCall¶
type AboutGetCall struct {// contains filtered or unexported fields}func (*AboutGetCall)Context¶
func (c *AboutGetCall) Context(ctxcontext.Context) *AboutGetCall
Context sets the context to be used in this call's Do method.
func (*AboutGetCall)Do¶
func (c *AboutGetCall) Do(opts ...googleapi.CallOption) (*About,error)
Do executes the "drive.about.get" call.Any non-2xx status code is an error. Response headers are in either*About.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*AboutGetCall)Fields¶
func (c *AboutGetCall) Fields(s ...googleapi.Field) *AboutGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*AboutGetCall)Header¶
func (c *AboutGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*AboutGetCall)IfNoneMatch¶
func (c *AboutGetCall) IfNoneMatch(entityTagstring) *AboutGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*AboutGetCall)IncludeSubscribed¶
func (c *AboutGetCall) IncludeSubscribed(includeSubscribedbool) *AboutGetCall
IncludeSubscribed sets the optional parameter "includeSubscribed": Whetherto count changes outside the My Drive hierarchy. When set to false, changesto files such as those in the Application Data folder or shared files whichhave not been added to My Drive will be omitted from the `maxChangeIdCount`.
func (*AboutGetCall)MaxChangeIdCount¶
func (c *AboutGetCall) MaxChangeIdCount(maxChangeIdCountint64) *AboutGetCall
MaxChangeIdCount sets the optional parameter "maxChangeIdCount": Maximumnumber of remaining change IDs to count
func (*AboutGetCall)StartChangeId¶
func (c *AboutGetCall) StartChangeId(startChangeIdint64) *AboutGetCall
StartChangeId sets the optional parameter "startChangeId": Change ID tostart counting from when calculating number of remaining change IDs
typeAboutImportFormats¶
type AboutImportFormats struct {// Source: The imported file's content type to convert from.Sourcestring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}func (AboutImportFormats)MarshalJSON¶
func (sAboutImportFormats) MarshalJSON() ([]byte,error)
typeAboutMaxUploadSizes¶
type AboutMaxUploadSizes struct {// Size: The max upload size for this type.Sizeint64 `json:"size,omitempty,string"`// Type: The file type.Typestring `json:"type,omitempty"`// ForceSendFields is a list of field names (e.g. "Size") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}func (AboutMaxUploadSizes)MarshalJSON¶
func (sAboutMaxUploadSizes) MarshalJSON() ([]byte,error)
typeAboutQuotaBytesByService¶
type AboutQuotaBytesByService struct {// BytesUsed: The storage quota bytes used by the service.BytesUsedint64 `json:"bytesUsed,omitempty,string"`// ServiceName: The service's name, e.g. DRIVE, GMAIL, or PHOTOS.ServiceNamestring `json:"serviceName,omitempty"`// ForceSendFields is a list of field names (e.g. "BytesUsed") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}func (AboutQuotaBytesByService)MarshalJSON¶
func (sAboutQuotaBytesByService) MarshalJSON() ([]byte,error)
typeAboutService¶
type AboutService struct {// contains filtered or unexported fields}funcNewAboutService¶
func NewAboutService(s *Service) *AboutService
func (*AboutService)Get¶
func (r *AboutService) Get() *AboutGetCall
Get: Gets the information about the current user along with Drive APIsettings
typeAboutTeamDriveThemes¶
type AboutTeamDriveThemes struct {// BackgroundImageLink: Deprecated: Use `driveThemes/backgroundImageLink`// instead.BackgroundImageLinkstring `json:"backgroundImageLink,omitempty"`// ColorRgb: Deprecated: Use `driveThemes/colorRgb` instead.ColorRgbstring `json:"colorRgb,omitempty"`// Id: Deprecated: Use `driveThemes/id` instead.Idstring `json:"id,omitempty"`// ForceSendFields is a list of field names (e.g. "BackgroundImageLink") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}func (AboutTeamDriveThemes)MarshalJSON¶
func (sAboutTeamDriveThemes) MarshalJSON() ([]byte,error)
typeApp¶
type App struct {// Authorized: Whether the app is authorized to access data on the user's// Drive.Authorizedbool `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.CreateInFolderTemplatestring `json:"createInFolderTemplate,omitempty"`// CreateUrl: The url to create a new file with this app.CreateUrlstring `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.HasDriveWideScopebool `json:"hasDriveWideScope,omitempty"`// Icons: The various icons for the app.Icons []*AppIcons `json:"icons,omitempty"`// Id: The ID of the app.Idstring `json:"id,omitempty"`// Installed: Whether the app is installed.Installedbool `json:"installed,omitempty"`// Kind: This is always `drive#app`.Kindstring `json:"kind,omitempty"`// LongDescription: A long description of the app.LongDescriptionstring `json:"longDescription,omitempty"`// Name: The name of the app.Namestring `json:"name,omitempty"`// ObjectType: The type of object this app creates (e.g. Chart). If empty, the// app name should be used instead.ObjectTypestring `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.OpenUrlTemplatestring `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.ProductIdstring `json:"productId,omitempty"`// ProductUrl: A link to the product listing for this app.ProductUrlstring `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.ShortDescriptionstring `json:"shortDescription,omitempty"`// SupportsCreate: Whether this app supports creating new objects.SupportsCreatebool `json:"supportsCreate,omitempty"`// SupportsImport: Whether this app supports importing from Docs Editors.SupportsImportbool `json:"supportsImport,omitempty"`// SupportsMultiOpen: Whether this app supports opening more than one file.SupportsMultiOpenbool `json:"supportsMultiOpen,omitempty"`// SupportsOfflineCreate: Whether this app supports creating new files when// offline.SupportsOfflineCreatebool `json:"supportsOfflineCreate,omitempty"`// UseByDefault: Whether the app is selected as the default handler for the// types it supports.UseByDefaultbool `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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}App: The apps resource provides a list of the apps that a user hasinstalled, with information about each app's supported MIME types, fileextensions, and other details. Some resource methods (such as `apps.get`)require an `appId`. Use the `apps.list` method to retrieve the ID for aninstalled application.
func (App)MarshalJSON¶
typeAppIcons¶
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 appCategorystring `json:"category,omitempty"`// IconUrl: URL for the icon.IconUrlstring `json:"iconUrl,omitempty"`// Size: Size of the icon. Represented as the maximum of the width and height.Sizeint64 `json:"size,omitempty"`// ForceSendFields is a list of field names (e.g. "Category") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}func (AppIcons)MarshalJSON¶
typeAppList¶
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.Etagstring `json:"etag,omitempty"`// Items: The list of apps.Items []*App `json:"items,omitempty"`// Kind: This is always `drive#appList`.Kindstring `json:"kind,omitempty"`// SelfLink: A link back to this list.SelfLinkstring `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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}AppList: A list of third-party applications which the user has installed orgiven access to Google Drive.
func (AppList)MarshalJSON¶
typeAppsGetCall¶
type AppsGetCall struct {// contains filtered or unexported fields}func (*AppsGetCall)Context¶
func (c *AppsGetCall) Context(ctxcontext.Context) *AppsGetCall
Context sets the context to be used in this call's Do method.
func (*AppsGetCall)Do¶
func (c *AppsGetCall) Do(opts ...googleapi.CallOption) (*App,error)
Do executes the "drive.apps.get" call.Any non-2xx status code is an error. Response headers are in either*App.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*AppsGetCall)Fields¶
func (c *AppsGetCall) Fields(s ...googleapi.Field) *AppsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*AppsGetCall)Header¶
func (c *AppsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*AppsGetCall)IfNoneMatch¶
func (c *AppsGetCall) IfNoneMatch(entityTagstring) *AppsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeAppsListCall¶
type AppsListCall struct {// contains filtered or unexported fields}func (*AppsListCall)AppFilterExtensions¶
func (c *AppsListCall) AppFilterExtensions(appFilterExtensionsstring) *AppsListCall
AppFilterExtensions sets the optional parameter "appFilterExtensions": Acomma-separated list of file extensions for open with filtering. All appswithin the given app query scope which can open any of the given fileextensions will be included in the response. If `appFilterMimeTypes` areprovided as well, the result is a union of the two resulting app lists.
func (*AppsListCall)AppFilterMimeTypes¶
func (c *AppsListCall) AppFilterMimeTypes(appFilterMimeTypesstring) *AppsListCall
AppFilterMimeTypes sets the optional parameter "appFilterMimeTypes": Acomma-separated list of MIME types for open with filtering. All apps withinthe given app query scope which can open any of the given MIME types will beincluded in the response. If `appFilterExtensions` are provided as well, theresult is a union of the two resulting app lists.
func (*AppsListCall)Context¶
func (c *AppsListCall) Context(ctxcontext.Context) *AppsListCall
Context sets the context to be used in this call's Do method.
func (*AppsListCall)Do¶
func (c *AppsListCall) Do(opts ...googleapi.CallOption) (*AppList,error)
Do executes the "drive.apps.list" call.Any non-2xx status code is an error. Response headers are in either*AppList.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*AppsListCall)Fields¶
func (c *AppsListCall) Fields(s ...googleapi.Field) *AppsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*AppsListCall)Header¶
func (c *AppsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*AppsListCall)IfNoneMatch¶
func (c *AppsListCall) IfNoneMatch(entityTagstring) *AppsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*AppsListCall)LanguageCode¶
func (c *AppsListCall) LanguageCode(languageCodestring) *AppsListCall
LanguageCode sets the optional parameter "languageCode": A language orlocale code, as defined by BCP 47, with some extensions from Unicode's LDMLformat (http://www.unicode.org/reports/tr35/).
typeAppsService¶
type AppsService struct {// contains filtered or unexported fields}funcNewAppsService¶
func NewAppsService(s *Service) *AppsService
func (*AppsService)Get¶
func (r *AppsService) Get(appIdstring) *AppsGetCall
Get: Gets a specific app.
- appId: The ID of the app.
func (*AppsService)List¶
func (r *AppsService) List() *AppsListCall
List: Lists a user's installed apps.
typeChange¶
type Change struct {// ChangeType: The type of the change. Possible values are `file` and `drive`.ChangeTypestring `json:"changeType,omitempty"`// Deleted: Whether the file or shared drive has been removed from this list of// changes, for example by deletion or loss of access.Deletedbool `json:"deleted,omitempty"`// Drive: The updated state of the shared drive. Present if the changeType is// drive, the user is still a member of the shared drive, and the shared drive// has not been deleted.Drive *Drive `json:"drive,omitempty"`// DriveId: The ID of the shared drive associated with this change.DriveIdstring `json:"driveId,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.FileIdstring `json:"fileId,omitempty"`// Id: The ID of the change.Idint64 `json:"id,omitempty,string"`// Kind: This is always `drive#change`.Kindstring `json:"kind,omitempty"`// ModificationDate: The time of this modification.ModificationDatestring `json:"modificationDate,omitempty"`// SelfLink: A link back to this change.SelfLinkstring `json:"selfLink,omitempty"`// TeamDrive: Deprecated: Use `drive` instead.TeamDrive *TeamDrive `json:"teamDrive,omitempty"`// TeamDriveId: Deprecated: Use `driveId` instead.TeamDriveIdstring `json:"teamDriveId,omitempty"`// Type: Deprecated: Use `changeType` instead.Typestring `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. "ChangeType") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ChangeType") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Change: Representation of a change to a file or shared drive.
func (Change)MarshalJSON¶
typeChangeList¶
type ChangeList struct {// Etag: The ETag of the list.Etagstring `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`.Kindstring `json:"kind,omitempty"`// LargestChangeId: The current largest change ID.LargestChangeIdint64 `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.NewStartPageTokenstring `json:"newStartPageToken,omitempty"`// NextLink: A link to the next page of changes.NextLinkstring `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.NextPageTokenstring `json:"nextPageToken,omitempty"`// SelfLink: A link back to this list.SelfLinkstring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ChangeList: A list of changes for a user.
func (ChangeList)MarshalJSON¶
func (sChangeList) MarshalJSON() ([]byte,error)
typeChangesGetCall¶
type ChangesGetCall struct {// contains filtered or unexported fields}func (*ChangesGetCall)Context¶
func (c *ChangesGetCall) Context(ctxcontext.Context) *ChangesGetCall
Context sets the context to be used in this call's Do method.
func (*ChangesGetCall)Do¶
func (c *ChangesGetCall) Do(opts ...googleapi.CallOption) (*Change,error)
Do executes the "drive.changes.get" call.Any non-2xx status code is an error. Response headers are in either*Change.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ChangesGetCall)DriveId¶added inv0.4.0
func (c *ChangesGetCall) DriveId(driveIdstring) *ChangesGetCall
DriveId sets the optional parameter "driveId": The shared drive from whichthe change will be returned.
func (*ChangesGetCall)Fields¶
func (c *ChangesGetCall) Fields(s ...googleapi.Field) *ChangesGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ChangesGetCall)Header¶
func (c *ChangesGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ChangesGetCall)IfNoneMatch¶
func (c *ChangesGetCall) IfNoneMatch(entityTagstring) *ChangesGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ChangesGetCall)SupportsAllDrives¶added inv0.4.0
func (c *ChangesGetCall) SupportsAllDrives(supportsAllDrivesbool) *ChangesGetCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*ChangesGetCall)SupportsTeamDrives¶
func (c *ChangesGetCall) SupportsTeamDrives(supportsTeamDrivesbool) *ChangesGetCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
func (*ChangesGetCall)TeamDriveId¶
func (c *ChangesGetCall) TeamDriveId(teamDriveIdstring) *ChangesGetCall
TeamDriveId sets the optional parameter "teamDriveId": Deprecated: Use`driveId` instead.
typeChangesGetStartPageTokenCall¶
type ChangesGetStartPageTokenCall struct {// contains filtered or unexported fields}func (*ChangesGetStartPageTokenCall)Context¶
func (c *ChangesGetStartPageTokenCall) Context(ctxcontext.Context) *ChangesGetStartPageTokenCall
Context sets the context to be used in this call's Do method.
func (*ChangesGetStartPageTokenCall)Do¶
func (c *ChangesGetStartPageTokenCall) Do(opts ...googleapi.CallOption) (*StartPageToken,error)
Do executes the "drive.changes.getStartPageToken" call.Any non-2xx status code is an error. Response headers are in either*StartPageToken.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ChangesGetStartPageTokenCall)DriveId¶added inv0.4.0
func (c *ChangesGetStartPageTokenCall) DriveId(driveIdstring) *ChangesGetStartPageTokenCall
DriveId sets the optional parameter "driveId": The ID of the shared drivefor which the starting pageToken for listing future changes from that shareddrive will be returned.
func (*ChangesGetStartPageTokenCall)Fields¶
func (c *ChangesGetStartPageTokenCall) Fields(s ...googleapi.Field) *ChangesGetStartPageTokenCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ChangesGetStartPageTokenCall)Header¶
func (c *ChangesGetStartPageTokenCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ChangesGetStartPageTokenCall)IfNoneMatch¶
func (c *ChangesGetStartPageTokenCall) IfNoneMatch(entityTagstring) *ChangesGetStartPageTokenCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ChangesGetStartPageTokenCall)SupportsAllDrives¶added inv0.4.0
func (c *ChangesGetStartPageTokenCall) SupportsAllDrives(supportsAllDrivesbool) *ChangesGetStartPageTokenCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*ChangesGetStartPageTokenCall)SupportsTeamDrives¶
func (c *ChangesGetStartPageTokenCall) SupportsTeamDrives(supportsTeamDrivesbool) *ChangesGetStartPageTokenCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
func (*ChangesGetStartPageTokenCall)TeamDriveId¶
func (c *ChangesGetStartPageTokenCall) TeamDriveId(teamDriveIdstring) *ChangesGetStartPageTokenCall
TeamDriveId sets the optional parameter "teamDriveId": Deprecated: Use`driveId` instead.
typeChangesListCall¶
type ChangesListCall struct {// contains filtered or unexported fields}func (*ChangesListCall)Context¶
func (c *ChangesListCall) Context(ctxcontext.Context) *ChangesListCall
Context sets the context to be used in this call's Do method.
func (*ChangesListCall)Do¶
func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangeList,error)
Do executes the "drive.changes.list" call.Any non-2xx status code is an error. Response headers are in either*ChangeList.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ChangesListCall)DriveId¶added inv0.4.0
func (c *ChangesListCall) DriveId(driveIdstring) *ChangesListCall
DriveId sets the optional parameter "driveId": The shared drive from whichchanges will be returned. If specified the change IDs will be reflective ofthe shared drive; use the combined drive ID and change ID as an identifier.
func (*ChangesListCall)Fields¶
func (c *ChangesListCall) Fields(s ...googleapi.Field) *ChangesListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ChangesListCall)Header¶
func (c *ChangesListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ChangesListCall)IfNoneMatch¶
func (c *ChangesListCall) IfNoneMatch(entityTagstring) *ChangesListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ChangesListCall)IncludeCorpusRemovals¶
func (c *ChangesListCall) IncludeCorpusRemovals(includeCorpusRemovalsbool) *ChangesListCall
IncludeCorpusRemovals sets the optional parameter "includeCorpusRemovals":Whether changes should include the file resource if the file is stillaccessible by the user at the time of the request, even when a file wasremoved from the list of changes and there will be no further change entriesfor this file.
func (*ChangesListCall)IncludeDeleted¶
func (c *ChangesListCall) IncludeDeleted(includeDeletedbool) *ChangesListCall
IncludeDeleted sets the optional parameter "includeDeleted": Whether toinclude changes indicating that items have been removed from the list ofchanges, for example by deletion or loss of access.
func (*ChangesListCall)IncludeItemsFromAllDrives¶added inv0.4.0
func (c *ChangesListCall) IncludeItemsFromAllDrives(includeItemsFromAllDrivesbool) *ChangesListCall
IncludeItemsFromAllDrives sets the optional parameter"includeItemsFromAllDrives": Whether both My Drive and shared drive itemsshould be included in results.
func (*ChangesListCall)IncludeLabels¶added inv0.88.0
func (c *ChangesListCall) IncludeLabels(includeLabelsstring) *ChangesListCall
IncludeLabels sets the optional parameter "includeLabels": A comma-separatedlist of IDs of labels to include in the `labelInfo` part of the response.
func (*ChangesListCall)IncludePermissionsForView¶added inv0.31.0
func (c *ChangesListCall) IncludePermissionsForView(includePermissionsForViewstring) *ChangesListCall
IncludePermissionsForView sets the optional parameter"includePermissionsForView": Specifies which additional view's permissionsto include in the response. Only `published` is supported.
func (*ChangesListCall)IncludeSubscribed¶
func (c *ChangesListCall) IncludeSubscribed(includeSubscribedbool) *ChangesListCall
IncludeSubscribed sets the optional parameter "includeSubscribed": Whetherto include changes outside the My Drive hierarchy in the result. When set tofalse, changes to files such as those in the Application Data folder orshared files which have not been added to My Drive will be omitted from theresult.
func (*ChangesListCall)IncludeTeamDriveItems¶
func (c *ChangesListCall) IncludeTeamDriveItems(includeTeamDriveItemsbool) *ChangesListCall
IncludeTeamDriveItems sets the optional parameter "includeTeamDriveItems":Deprecated: Use `includeItemsFromAllDrives` instead.
func (*ChangesListCall)MaxResults¶
func (c *ChangesListCall) MaxResults(maxResultsint64) *ChangesListCall
MaxResults sets the optional parameter "maxResults": Maximum number ofchanges to return.
func (*ChangesListCall)PageToken¶
func (c *ChangesListCall) PageToken(pageTokenstring) *ChangesListCall
PageToken sets the optional parameter "pageToken": The token for continuinga previous list request on the next page. This should be set to the value of`nextPageToken` from the previous response or to the response from thegetStartPageToken method.
func (*ChangesListCall)Pages¶
func (c *ChangesListCall) Pages(ctxcontext.Context, f func(*ChangeList)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
func (*ChangesListCall)Spaces¶
func (c *ChangesListCall) Spaces(spacesstring) *ChangesListCall
Spaces sets the optional parameter "spaces": A comma-separated list ofspaces to query. Supported values are `drive`, `appDataFolder` and `photos`.
func (*ChangesListCall)StartChangeId¶
func (c *ChangesListCall) StartChangeId(startChangeIdint64) *ChangesListCall
StartChangeId sets the optional parameter "startChangeId": Deprecated: Use`pageToken` instead.
func (*ChangesListCall)SupportsAllDrives¶added inv0.4.0
func (c *ChangesListCall) SupportsAllDrives(supportsAllDrivesbool) *ChangesListCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*ChangesListCall)SupportsTeamDrives¶
func (c *ChangesListCall) SupportsTeamDrives(supportsTeamDrivesbool) *ChangesListCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
func (*ChangesListCall)TeamDriveId¶
func (c *ChangesListCall) TeamDriveId(teamDriveIdstring) *ChangesListCall
TeamDriveId sets the optional parameter "teamDriveId": Deprecated: Use`driveId` instead.
typeChangesService¶
type ChangesService struct {// contains filtered or unexported fields}funcNewChangesService¶
func NewChangesService(s *Service) *ChangesService
func (*ChangesService)Get¶
func (r *ChangesService) Get(changeIdstring) *ChangesGetCall
Get: Deprecated: Use `changes.getStartPageToken` and `changes.list` toretrieve recent changes.
- changeId: The ID of the change.
func (*ChangesService)GetStartPageToken¶
func (r *ChangesService) GetStartPageToken() *ChangesGetStartPageTokenCall
GetStartPageToken: Gets the starting pageToken for listing future changes.
func (*ChangesService)List¶
func (r *ChangesService) List() *ChangesListCall
List: Lists the changes for a user or shared drive.
func (*ChangesService)Watch¶
func (r *ChangesService) Watch(channel *Channel) *ChangesWatchCall
Watch: Subscribe to changes for a user.
typeChangesWatchCall¶
type ChangesWatchCall struct {// contains filtered or unexported fields}func (*ChangesWatchCall)Context¶
func (c *ChangesWatchCall) Context(ctxcontext.Context) *ChangesWatchCall
Context sets the context to be used in this call's Do method.
func (*ChangesWatchCall)Do¶
func (c *ChangesWatchCall) Do(opts ...googleapi.CallOption) (*Channel,error)
Do executes the "drive.changes.watch" call.Any non-2xx status code is an error. Response headers are in either*Channel.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ChangesWatchCall)DriveId¶added inv0.4.0
func (c *ChangesWatchCall) DriveId(driveIdstring) *ChangesWatchCall
DriveId sets the optional parameter "driveId": The shared drive from whichchanges will be returned. If specified the change IDs will be reflective ofthe shared drive; use the combined drive ID and change ID as an identifier.
func (*ChangesWatchCall)Fields¶
func (c *ChangesWatchCall) Fields(s ...googleapi.Field) *ChangesWatchCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ChangesWatchCall)Header¶
func (c *ChangesWatchCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ChangesWatchCall)IncludeCorpusRemovals¶
func (c *ChangesWatchCall) IncludeCorpusRemovals(includeCorpusRemovalsbool) *ChangesWatchCall
IncludeCorpusRemovals sets the optional parameter "includeCorpusRemovals":Whether changes should include the file resource if the file is stillaccessible by the user at the time of the request, even when a file wasremoved from the list of changes and there will be no further change entriesfor this file.
func (*ChangesWatchCall)IncludeDeleted¶
func (c *ChangesWatchCall) IncludeDeleted(includeDeletedbool) *ChangesWatchCall
IncludeDeleted sets the optional parameter "includeDeleted": Whether toinclude changes indicating that items have been removed from the list ofchanges, for example by deletion or loss of access.
func (*ChangesWatchCall)IncludeItemsFromAllDrives¶added inv0.4.0
func (c *ChangesWatchCall) IncludeItemsFromAllDrives(includeItemsFromAllDrivesbool) *ChangesWatchCall
IncludeItemsFromAllDrives sets the optional parameter"includeItemsFromAllDrives": Whether both My Drive and shared drive itemsshould be included in results.
func (*ChangesWatchCall)IncludeLabels¶added inv0.88.0
func (c *ChangesWatchCall) IncludeLabels(includeLabelsstring) *ChangesWatchCall
IncludeLabels sets the optional parameter "includeLabels": A comma-separatedlist of IDs of labels to include in the `labelInfo` part of the response.
func (*ChangesWatchCall)IncludePermissionsForView¶added inv0.31.0
func (c *ChangesWatchCall) IncludePermissionsForView(includePermissionsForViewstring) *ChangesWatchCall
IncludePermissionsForView sets the optional parameter"includePermissionsForView": Specifies which additional view's permissionsto include in the response. Only `published` is supported.
func (*ChangesWatchCall)IncludeSubscribed¶
func (c *ChangesWatchCall) IncludeSubscribed(includeSubscribedbool) *ChangesWatchCall
IncludeSubscribed sets the optional parameter "includeSubscribed": Whetherto include changes outside the My Drive hierarchy in the result. When set tofalse, changes to files such as those in the Application Data folder orshared files which have not been added to My Drive will be omitted from theresult.
func (*ChangesWatchCall)IncludeTeamDriveItems¶
func (c *ChangesWatchCall) IncludeTeamDriveItems(includeTeamDriveItemsbool) *ChangesWatchCall
IncludeTeamDriveItems sets the optional parameter "includeTeamDriveItems":Deprecated: Use `includeItemsFromAllDrives` instead.
func (*ChangesWatchCall)MaxResults¶
func (c *ChangesWatchCall) MaxResults(maxResultsint64) *ChangesWatchCall
MaxResults sets the optional parameter "maxResults": Maximum number ofchanges to return.
func (*ChangesWatchCall)PageToken¶
func (c *ChangesWatchCall) PageToken(pageTokenstring) *ChangesWatchCall
PageToken sets the optional parameter "pageToken": The token for continuinga previous list request on the next page. This should be set to the value of`nextPageToken` from the previous response or to the response from thegetStartPageToken method.
func (*ChangesWatchCall)Spaces¶
func (c *ChangesWatchCall) Spaces(spacesstring) *ChangesWatchCall
Spaces sets the optional parameter "spaces": A comma-separated list ofspaces to query. Supported values are `drive`, `appDataFolder` and `photos`.
func (*ChangesWatchCall)StartChangeId¶
func (c *ChangesWatchCall) StartChangeId(startChangeIdint64) *ChangesWatchCall
StartChangeId sets the optional parameter "startChangeId": Deprecated: Use`pageToken` instead.
func (*ChangesWatchCall)SupportsAllDrives¶added inv0.4.0
func (c *ChangesWatchCall) SupportsAllDrives(supportsAllDrivesbool) *ChangesWatchCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*ChangesWatchCall)SupportsTeamDrives¶
func (c *ChangesWatchCall) SupportsTeamDrives(supportsTeamDrivesbool) *ChangesWatchCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
func (*ChangesWatchCall)TeamDriveId¶
func (c *ChangesWatchCall) TeamDriveId(teamDriveIdstring) *ChangesWatchCall
TeamDriveId sets the optional parameter "teamDriveId": Deprecated: Use`driveId` instead.
typeChannel¶
type Channel struct {// Address: The address where notifications are delivered for this channel.Addressstring `json:"address,omitempty"`// Expiration: Date and time of notification channel expiration, expressed as a// Unix timestamp, in milliseconds. Optional.Expirationint64 `json:"expiration,omitempty,string"`// Id: A UUID or similar unique string that identifies this channel.Idstring `json:"id,omitempty"`// Kind: Identifies this as a notification channel used to watch for changes to// a resource, which is `api#channel`.Kindstring `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.Payloadbool `json:"payload,omitempty"`// ResourceId: An opaque ID that identifies the resource being watched on this// channel. Stable across different API versions.ResourceIdstring `json:"resourceId,omitempty"`// ResourceUri: A version-specific identifier for the watched resource.ResourceUristring `json:"resourceUri,omitempty"`// Token: An arbitrary string delivered to the target address with each// notification delivered over this channel. Optional.Tokenstring `json:"token,omitempty"`// Type: The type of delivery mechanism used for this channel. Valid values are// "web_hook" or "webhook".Typestring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Channel: A notification channel used to watch for resource changes.
func (Channel)MarshalJSON¶
typeChannelsService¶
type ChannelsService struct {// contains filtered or unexported fields}funcNewChannelsService¶
func NewChannelsService(s *Service) *ChannelsService
func (*ChannelsService)Stop¶
func (r *ChannelsService) Stop(channel *Channel) *ChannelsStopCall
Stop: Stops watching resources through this channel.
typeChannelsStopCall¶
type ChannelsStopCall struct {// contains filtered or unexported fields}func (*ChannelsStopCall)Context¶
func (c *ChannelsStopCall) Context(ctxcontext.Context) *ChannelsStopCall
Context sets the context to be used in this call's Do method.
func (*ChannelsStopCall)Do¶
func (c *ChannelsStopCall) Do(opts ...googleapi.CallOption)error
Do executes the "drive.channels.stop" call.
func (*ChannelsStopCall)Fields¶
func (c *ChannelsStopCall) Fields(s ...googleapi.Field) *ChannelsStopCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ChannelsStopCall)Header¶
func (c *ChannelsStopCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeChildList¶
type ChildList struct {// Etag: The ETag of the list.Etagstring `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`.Kindstring `json:"kind,omitempty"`// NextLink: A link to the next page of children.NextLinkstring `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.NextPageTokenstring `json:"nextPageToken,omitempty"`// SelfLink: A link back to this list.SelfLinkstring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ChildList: A list of children of a file.
func (ChildList)MarshalJSON¶
typeChildReference¶
type ChildReference struct {// ChildLink: Output only. A link to the child.ChildLinkstring `json:"childLink,omitempty"`// Id: The ID of the child.Idstring `json:"id,omitempty"`// Kind: Output only. This is always `drive#childReference`.Kindstring `json:"kind,omitempty"`// SelfLink: Output only. A link back to this reference.SelfLinkstring `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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ChildReference: A reference to a folder's child. Some resource methods (suchas `children.get`) require a `childId`. Use the `children.list` method toretrieve the ID of the child.
func (ChildReference)MarshalJSON¶
func (sChildReference) MarshalJSON() ([]byte,error)
typeChildrenDeleteCall¶
type ChildrenDeleteCall struct {// contains filtered or unexported fields}func (*ChildrenDeleteCall)Context¶
func (c *ChildrenDeleteCall) Context(ctxcontext.Context) *ChildrenDeleteCall
Context sets the context to be used in this call's Do method.
func (*ChildrenDeleteCall)Do¶
func (c *ChildrenDeleteCall) Do(opts ...googleapi.CallOption)error
Do executes the "drive.children.delete" call.
func (*ChildrenDeleteCall)EnforceSingleParent¶added inv0.21.0
func (c *ChildrenDeleteCall) EnforceSingleParent(enforceSingleParentbool) *ChildrenDeleteCall
EnforceSingleParent sets the optional parameter "enforceSingleParent":Deprecated: If an item is not in a shared drive and its last parent isremoved, the item is placed under its owner's root.
func (*ChildrenDeleteCall)Fields¶
func (c *ChildrenDeleteCall) Fields(s ...googleapi.Field) *ChildrenDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ChildrenDeleteCall)Header¶
func (c *ChildrenDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeChildrenGetCall¶
type ChildrenGetCall struct {// contains filtered or unexported fields}func (*ChildrenGetCall)Context¶
func (c *ChildrenGetCall) Context(ctxcontext.Context) *ChildrenGetCall
Context sets the context to be used in this call's Do method.
func (*ChildrenGetCall)Do¶
func (c *ChildrenGetCall) Do(opts ...googleapi.CallOption) (*ChildReference,error)
Do executes the "drive.children.get" call.Any non-2xx status code is an error. Response headers are in either*ChildReference.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ChildrenGetCall)Fields¶
func (c *ChildrenGetCall) Fields(s ...googleapi.Field) *ChildrenGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ChildrenGetCall)Header¶
func (c *ChildrenGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ChildrenGetCall)IfNoneMatch¶
func (c *ChildrenGetCall) IfNoneMatch(entityTagstring) *ChildrenGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeChildrenInsertCall¶
type ChildrenInsertCall struct {// contains filtered or unexported fields}func (*ChildrenInsertCall)Context¶
func (c *ChildrenInsertCall) Context(ctxcontext.Context) *ChildrenInsertCall
Context sets the context to be used in this call's Do method.
func (*ChildrenInsertCall)Do¶
func (c *ChildrenInsertCall) Do(opts ...googleapi.CallOption) (*ChildReference,error)
Do executes the "drive.children.insert" call.Any non-2xx status code is an error. Response headers are in either*ChildReference.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ChildrenInsertCall)EnforceSingleParent¶added inv0.21.0
func (c *ChildrenInsertCall) EnforceSingleParent(enforceSingleParentbool) *ChildrenInsertCall
EnforceSingleParent sets the optional parameter "enforceSingleParent":Deprecated: Adding files to multiple folders is no longer supported. Use`shortcuts` instead.
func (*ChildrenInsertCall)Fields¶
func (c *ChildrenInsertCall) Fields(s ...googleapi.Field) *ChildrenInsertCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ChildrenInsertCall)Header¶
func (c *ChildrenInsertCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ChildrenInsertCall)SupportsAllDrives¶added inv0.4.0
func (c *ChildrenInsertCall) SupportsAllDrives(supportsAllDrivesbool) *ChildrenInsertCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*ChildrenInsertCall)SupportsTeamDrives¶
func (c *ChildrenInsertCall) SupportsTeamDrives(supportsTeamDrivesbool) *ChildrenInsertCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
typeChildrenListCall¶
type ChildrenListCall struct {// contains filtered or unexported fields}func (*ChildrenListCall)Context¶
func (c *ChildrenListCall) Context(ctxcontext.Context) *ChildrenListCall
Context sets the context to be used in this call's Do method.
func (*ChildrenListCall)Do¶
func (c *ChildrenListCall) Do(opts ...googleapi.CallOption) (*ChildList,error)
Do executes the "drive.children.list" call.Any non-2xx status code is an error. Response headers are in either*ChildList.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ChildrenListCall)Fields¶
func (c *ChildrenListCall) Fields(s ...googleapi.Field) *ChildrenListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ChildrenListCall)Header¶
func (c *ChildrenListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ChildrenListCall)IfNoneMatch¶
func (c *ChildrenListCall) IfNoneMatch(entityTagstring) *ChildrenListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ChildrenListCall)MaxResults¶
func (c *ChildrenListCall) MaxResults(maxResultsint64) *ChildrenListCall
MaxResults sets the optional parameter "maxResults": Maximum number ofchildren to return.
func (*ChildrenListCall)OrderBy¶
func (c *ChildrenListCall) OrderBy(orderBystring) *ChildrenListCall
OrderBy sets the optional parameter "orderBy": A comma-separated list ofsort keys. Valid keys are `createdDate`, `folder`, `lastViewedByMeDate`,`modifiedByMeDate`, `modifiedDate`, `quotaBytesUsed`, `recency`,`sharedWithMeDate`, `starred`, and `title`. Each key sorts ascending bydefault, but may be reversed with the `desc` modifier. Example usage:?orderBy=folder,modifiedDate desc,title. Please note that there is a currentlimitation for users with approximately one million files in which therequested sort order is ignored.
func (*ChildrenListCall)PageToken¶
func (c *ChildrenListCall) PageToken(pageTokenstring) *ChildrenListCall
PageToken sets the optional parameter "pageToken": Page token for children.
func (*ChildrenListCall)Pages¶
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
func (*ChildrenListCall)Q¶
func (c *ChildrenListCall) Q(qstring) *ChildrenListCall
Q sets the optional parameter "q": Query string for searching children.
typeChildrenService¶
type ChildrenService struct {// contains filtered or unexported fields}funcNewChildrenService¶
func NewChildrenService(s *Service) *ChildrenService
func (*ChildrenService)Delete¶
func (r *ChildrenService) Delete(folderIdstring, childIdstring) *ChildrenDeleteCall
Delete: Removes a child from a folder.
- childId: The ID of the child.- folderId: The ID of the folder.
func (*ChildrenService)Get¶
func (r *ChildrenService) Get(folderIdstring, childIdstring) *ChildrenGetCall
Get: Gets a specific child reference.
- childId: The ID of the child.- folderId: The ID of the folder.
func (*ChildrenService)Insert¶
func (r *ChildrenService) Insert(folderIdstring, childreference *ChildReference) *ChildrenInsertCall
Insert: Inserts a file into a folder.
- folderId: The ID of the folder.
func (*ChildrenService)List¶
func (r *ChildrenService) List(folderIdstring) *ChildrenListCall
List: Lists a folder's children.
- folderId: The ID of the folder.
typeComment¶
type Comment struct {// Anchor: A region of the document represented as a JSON string. For details// on defining anchor properties, refer to Manage comments and replies// (https://developers.google.com/workspace/drive/api/v3/manage-comments).Anchorstring `json:"anchor,omitempty"`// Author: The user who wrote this comment.Author *User `json:"author,omitempty"`// CommentId: The ID of the comment.CommentIdstring `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.Contentstring `json:"content,omitempty"`// Context: Context of a file which is being commented on.Context *CommentContext `json:"context,omitempty"`// CreatedDate: The date when this comment was first created.CreatedDatestring `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.Deletedbool `json:"deleted,omitempty"`// FileId: The file which this comment is addressing.FileIdstring `json:"fileId,omitempty"`// FileTitle: The title of the file which this comment is addressing.FileTitlestring `json:"fileTitle,omitempty"`// HtmlContent: HTML formatted content for this comment.HtmlContentstring `json:"htmlContent,omitempty"`// Kind: This is always drive#comment.Kindstring `json:"kind,omitempty"`// ModifiedDate: The date when this comment or any of its replies were last// modified.ModifiedDatestring `json:"modifiedDate,omitempty"`// Replies: Replies to this post.Replies []*CommentReply `json:"replies,omitempty"`// SelfLink: A link back to this comment.SelfLinkstring `json:"selfLink,omitempty"`// Status: The status of this comment. Status can be changed by posting a reply// to a comment with the desired status. Possible values are: * `open` - The// comment is still open. * `resolved` - The comment has been resolved by one// of its replies.Statusstring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Comment: A comment on a file in Google Drive.
func (Comment)MarshalJSON¶
typeCommentContext¶
type CommentContext struct {// Type: The MIME type of the context snippet.Typestring `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.Valuestring `json:"value,omitempty"`// ForceSendFields is a list of field names (e.g. "Type") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}CommentContext: Context of a file which is being commented on.
func (CommentContext)MarshalJSON¶
func (sCommentContext) MarshalJSON() ([]byte,error)
typeCommentList¶
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.Kindstring `json:"kind,omitempty"`// NextLink: A link to the next page of comments.NextLinkstring `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.NextPageTokenstring `json:"nextPageToken,omitempty"`// SelfLink: A link back to this list.SelfLinkstring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}CommentList: A list of comments on a file in Google Drive.
func (CommentList)MarshalJSON¶
func (sCommentList) MarshalJSON() ([]byte,error)
typeCommentReply¶
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).Contentstring `json:"content,omitempty"`// CreatedDate: The date when this reply was first created.CreatedDatestring `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.Deletedbool `json:"deleted,omitempty"`// HtmlContent: HTML formatted content for this reply.HtmlContentstring `json:"htmlContent,omitempty"`// Kind: This is always drive#commentReply.Kindstring `json:"kind,omitempty"`// ModifiedDate: The date when this reply was last modified.ModifiedDatestring `json:"modifiedDate,omitempty"`// ReplyId: The ID of the reply.ReplyIdstring `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 tSo the parent comment. Possible// values are: * `resolve` - To resolve a comment. * `reopen` - To reopen// (un-resolve) a comment.Verbstring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}CommentReply: A reply to a comment on a file in Google Drive.
func (CommentReply)MarshalJSON¶
func (sCommentReply) MarshalJSON() ([]byte,error)
typeCommentReplyList¶
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`.Kindstring `json:"kind,omitempty"`// NextLink: A link to the next page of replies.NextLinkstring `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.NextPageTokenstring `json:"nextPageToken,omitempty"`// SelfLink: A link back to this list.SelfLinkstring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}CommentReplyList: A list of replies to a comment on a file in Google Drive.
func (CommentReplyList)MarshalJSON¶
func (sCommentReplyList) MarshalJSON() ([]byte,error)
typeCommentsDeleteCall¶
type CommentsDeleteCall struct {// contains filtered or unexported fields}func (*CommentsDeleteCall)Context¶
func (c *CommentsDeleteCall) Context(ctxcontext.Context) *CommentsDeleteCall
Context sets the context to be used in this call's Do method.
func (*CommentsDeleteCall)Do¶
func (c *CommentsDeleteCall) Do(opts ...googleapi.CallOption)error
Do executes the "drive.comments.delete" call.
func (*CommentsDeleteCall)Fields¶
func (c *CommentsDeleteCall) Fields(s ...googleapi.Field) *CommentsDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*CommentsDeleteCall)Header¶
func (c *CommentsDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeCommentsGetCall¶
type CommentsGetCall struct {// contains filtered or unexported fields}func (*CommentsGetCall)Context¶
func (c *CommentsGetCall) Context(ctxcontext.Context) *CommentsGetCall
Context sets the context to be used in this call's Do method.
func (*CommentsGetCall)Do¶
func (c *CommentsGetCall) Do(opts ...googleapi.CallOption) (*Comment,error)
Do executes the "drive.comments.get" call.Any non-2xx status code is an error. Response headers are in either*Comment.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*CommentsGetCall)Fields¶
func (c *CommentsGetCall) Fields(s ...googleapi.Field) *CommentsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*CommentsGetCall)Header¶
func (c *CommentsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*CommentsGetCall)IfNoneMatch¶
func (c *CommentsGetCall) IfNoneMatch(entityTagstring) *CommentsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*CommentsGetCall)IncludeDeleted¶
func (c *CommentsGetCall) IncludeDeleted(includeDeletedbool) *CommentsGetCall
IncludeDeleted sets the optional parameter "includeDeleted": If set, thiswill succeed when retrieving a deleted comment, and will include any deletedreplies.
typeCommentsInsertCall¶
type CommentsInsertCall struct {// contains filtered or unexported fields}func (*CommentsInsertCall)Context¶
func (c *CommentsInsertCall) Context(ctxcontext.Context) *CommentsInsertCall
Context sets the context to be used in this call's Do method.
func (*CommentsInsertCall)Do¶
func (c *CommentsInsertCall) Do(opts ...googleapi.CallOption) (*Comment,error)
Do executes the "drive.comments.insert" call.Any non-2xx status code is an error. Response headers are in either*Comment.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*CommentsInsertCall)Fields¶
func (c *CommentsInsertCall) Fields(s ...googleapi.Field) *CommentsInsertCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*CommentsInsertCall)Header¶
func (c *CommentsInsertCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeCommentsListCall¶
type CommentsListCall struct {// contains filtered or unexported fields}func (*CommentsListCall)Context¶
func (c *CommentsListCall) Context(ctxcontext.Context) *CommentsListCall
Context sets the context to be used in this call's Do method.
func (*CommentsListCall)Do¶
func (c *CommentsListCall) Do(opts ...googleapi.CallOption) (*CommentList,error)
Do executes the "drive.comments.list" call.Any non-2xx status code is an error. Response headers are in either*CommentList.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*CommentsListCall)Fields¶
func (c *CommentsListCall) Fields(s ...googleapi.Field) *CommentsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*CommentsListCall)Header¶
func (c *CommentsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*CommentsListCall)IfNoneMatch¶
func (c *CommentsListCall) IfNoneMatch(entityTagstring) *CommentsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*CommentsListCall)IncludeDeleted¶
func (c *CommentsListCall) IncludeDeleted(includeDeletedbool) *CommentsListCall
IncludeDeleted sets the optional parameter "includeDeleted": If set, allcomments and replies, including deleted comments and replies (with contentstripped) will be returned.
func (*CommentsListCall)MaxResults¶
func (c *CommentsListCall) MaxResults(maxResultsint64) *CommentsListCall
MaxResults sets the optional parameter "maxResults": The maximum number ofdiscussions to include in the response, used for paging.
func (*CommentsListCall)PageToken¶
func (c *CommentsListCall) PageToken(pageTokenstring) *CommentsListCall
PageToken sets the optional parameter "pageToken": The continuation token,used to page through large result sets. To get the next page of results, setthis parameter to the value of "nextPageToken" from the previous response.
func (*CommentsListCall)Pages¶
func (c *CommentsListCall) Pages(ctxcontext.Context, f func(*CommentList)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
func (*CommentsListCall)UpdatedMin¶
func (c *CommentsListCall) UpdatedMin(updatedMinstring) *CommentsListCall
UpdatedMin sets the optional parameter "updatedMin": Only discussions thatwere updated after this timestamp will be returned. Formatted as anRFC 3339timestamp.
typeCommentsPatchCall¶
type CommentsPatchCall struct {// contains filtered or unexported fields}func (*CommentsPatchCall)Context¶
func (c *CommentsPatchCall) Context(ctxcontext.Context) *CommentsPatchCall
Context sets the context to be used in this call's Do method.
func (*CommentsPatchCall)Do¶
func (c *CommentsPatchCall) Do(opts ...googleapi.CallOption) (*Comment,error)
Do executes the "drive.comments.patch" call.Any non-2xx status code is an error. Response headers are in either*Comment.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*CommentsPatchCall)Fields¶
func (c *CommentsPatchCall) Fields(s ...googleapi.Field) *CommentsPatchCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*CommentsPatchCall)Header¶
func (c *CommentsPatchCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeCommentsService¶
type CommentsService struct {// contains filtered or unexported fields}funcNewCommentsService¶
func NewCommentsService(s *Service) *CommentsService
func (*CommentsService)Delete¶
func (r *CommentsService) Delete(fileIdstring, commentIdstring) *CommentsDeleteCall
Delete: Deletes a comment.
- commentId: The ID of the comment.- fileId: The ID of the file.
func (*CommentsService)Get¶
func (r *CommentsService) Get(fileIdstring, commentIdstring) *CommentsGetCall
Get: Gets a comment by ID.
- commentId: The ID of the comment.- fileId: The ID of the file.
func (*CommentsService)Insert¶
func (r *CommentsService) Insert(fileIdstring, comment *Comment) *CommentsInsertCall
Insert: Creates a new comment on the given file.
- fileId: The ID of the file.
func (*CommentsService)List¶
func (r *CommentsService) List(fileIdstring) *CommentsListCall
List: Lists a file's comments.
- fileId: The ID of the file.
func (*CommentsService)Patch¶
func (r *CommentsService) Patch(fileIdstring, commentIdstring, comment *Comment) *CommentsPatchCall
Patch: Updates an existing comment.
- commentId: The ID of the comment.- fileId: The ID of the file.
func (*CommentsService)Update¶
func (r *CommentsService) Update(fileIdstring, commentIdstring, comment *Comment) *CommentsUpdateCall
Update: Updates an existing comment.
- commentId: The ID of the comment.- fileId: The ID of the file.
typeCommentsUpdateCall¶
type CommentsUpdateCall struct {// contains filtered or unexported fields}func (*CommentsUpdateCall)Context¶
func (c *CommentsUpdateCall) Context(ctxcontext.Context) *CommentsUpdateCall
Context sets the context to be used in this call's Do method.
func (*CommentsUpdateCall)Do¶
func (c *CommentsUpdateCall) Do(opts ...googleapi.CallOption) (*Comment,error)
Do executes the "drive.comments.update" call.Any non-2xx status code is an error. Response headers are in either*Comment.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*CommentsUpdateCall)Fields¶
func (c *CommentsUpdateCall) Fields(s ...googleapi.Field) *CommentsUpdateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*CommentsUpdateCall)Header¶
func (c *CommentsUpdateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeContentRestriction¶added inv0.30.0
type ContentRestriction struct {// OwnerRestricted: Whether the content restriction can only be modified or// removed by a user who owns the file. For files in shared drives, any user// with `organizer` capabilities can modify or remove this content restriction.OwnerRestrictedbool `json:"ownerRestricted,omitempty"`// ReadOnly: Whether the content of the file is read-only. If a file is// read-only, a new revision of the file may not be added, comments may not be// added or modified, and the title of the file may not be modified.ReadOnlybool `json:"readOnly,omitempty"`// Reason: Reason for why the content of the file is restricted. This is only// mutable on requests that also set `readOnly=true`.Reasonstring `json:"reason,omitempty"`// RestrictingUser: Output only. The user who set the content restriction. Only// populated if `readOnly` is true.RestrictingUser *User `json:"restrictingUser,omitempty"`// RestrictionDate: The time at which the content restriction was set// (formattedRFC 3339 timestamp). Only populated if readOnly is true.RestrictionDatestring `json:"restrictionDate,omitempty"`// SystemRestricted: Output only. Whether the content restriction was applied// by the system, for example due to an esignature. Users cannot modify or// remove system restricted content restrictions.SystemRestrictedbool `json:"systemRestricted,omitempty"`// Type: Output only. The type of the content restriction. Currently the only// possible value is `globalContentRestriction`.Typestring `json:"type,omitempty"`// ForceSendFields is a list of field names (e.g. "OwnerRestricted") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "OwnerRestricted") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ContentRestriction: A restriction for accessing the content of the file.
func (ContentRestriction)MarshalJSON¶added inv0.30.0
func (sContentRestriction) MarshalJSON() ([]byte,error)
typeDrive¶added inv0.4.0
type Drive struct {// BackgroundImageFile: An image file and cropping parameters from which a// background image for this shared drive is set. This is a write only field;// it can only be set on `drive.drives.update` requests that don't set// `themeId`. When specified, all fields of the `backgroundImageFile` must be// set.BackgroundImageFile *DriveBackgroundImageFile `json:"backgroundImageFile,omitempty"`// BackgroundImageLink: Output only. A short-lived link to this shared drive's// background image.BackgroundImageLinkstring `json:"backgroundImageLink,omitempty"`// Capabilities: Output only. Capabilities the current user has on this shared// drive.Capabilities *DriveCapabilities `json:"capabilities,omitempty"`// ColorRgb: The color of this shared drive as an RGB hex string. It can only// be set on a `drive.drives.update` request that does not set `themeId`.ColorRgbstring `json:"colorRgb,omitempty"`// CreatedDate: The time at which the shared drive was created (RFC 3339// date-time).CreatedDatestring `json:"createdDate,omitempty"`// Hidden: Whether the shared drive is hidden from default view.Hiddenbool `json:"hidden,omitempty"`// Id: Output only. The ID of this shared drive which is also the ID of the top// level folder of this shared drive.Idstring `json:"id,omitempty"`// Kind: Output only. This is always `drive#drive`Kindstring `json:"kind,omitempty"`// Name: The name of this shared drive.Namestring `json:"name,omitempty"`// OrgUnitId: Output only. The organizational unit of this shared drive. This// field is only populated on `drives.list` responses when the// `useDomainAdminAccess` parameter is set to `true`.OrgUnitIdstring `json:"orgUnitId,omitempty"`// Restrictions: A set of restrictions that apply to this shared drive or items// inside this shared drive.Restrictions *DriveRestrictions `json:"restrictions,omitempty"`// ThemeId: The ID of the theme from which the background image and color will// be set. The set of possible `driveThemes` can be retrieved from a// `drive.about.get` response. When not specified on a `drive.drives.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`.ThemeIdstring `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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Drive: Representation of a shared drive. Some resource methods (such as`drives.update`) require a `driveId`. Use the `drives.list` method toretrieve the ID for a shared drive.
func (Drive)MarshalJSON¶added inv0.4.0
typeDriveBackgroundImageFile¶added inv0.4.0
type DriveBackgroundImageFile struct {// Id: The ID of an image file in Google Drive to use for the background image.Idstring `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.Widthfloat64 `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.XCoordinatefloat64 `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.YCoordinatefloat64 `json:"yCoordinate,omitempty"`// ForceSendFields is a list of field names (e.g. "Id") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}DriveBackgroundImageFile: An image file and cropping parameters from which abackground image for this shared drive is set. This is a write only field;it can only be set on `drive.drives.update` requests that don't set`themeId`. When specified, all fields of the `backgroundImageFile` must beset.
func (DriveBackgroundImageFile)MarshalJSON¶added inv0.4.0
func (sDriveBackgroundImageFile) MarshalJSON() ([]byte,error)
func (*DriveBackgroundImageFile)UnmarshalJSON¶added inv0.4.0
func (s *DriveBackgroundImageFile) UnmarshalJSON(data []byte)error
typeDriveCapabilities¶added inv0.4.0
type DriveCapabilities struct {// CanAddChildren: Output only. Whether the current user can add children to// folders in this shared drive.CanAddChildrenbool `json:"canAddChildren,omitempty"`// CanChangeCopyRequiresWriterPermissionRestriction: Output only. Whether the// current user can change the `copyRequiresWriterPermission` restriction of// this shared drive.CanChangeCopyRequiresWriterPermissionRestrictionbool `json:"canChangeCopyRequiresWriterPermissionRestriction,omitempty"`// CanChangeDomainUsersOnlyRestriction: Output only. Whether the current user// can change the `domainUsersOnly` restriction of this shared drive.CanChangeDomainUsersOnlyRestrictionbool `json:"canChangeDomainUsersOnlyRestriction,omitempty"`// CanChangeDriveBackground: Output only. Whether the current user can change// the background of this shared drive.CanChangeDriveBackgroundbool `json:"canChangeDriveBackground,omitempty"`// CanChangeDriveMembersOnlyRestriction: Output only. Whether the current user// can change the `driveMembersOnly` restriction of this shared drive.CanChangeDriveMembersOnlyRestrictionbool `json:"canChangeDriveMembersOnlyRestriction,omitempty"`// CanChangeSharingFoldersRequiresOrganizerPermissionRestriction: Output only.// Whether the current user can change the// `sharingFoldersRequiresOrganizerPermission` restriction of this shared// drive.CanChangeSharingFoldersRequiresOrganizerPermissionRestrictionbool `json:"canChangeSharingFoldersRequiresOrganizerPermissionRestriction,omitempty"`// CanComment: Output only. Whether the current user can comment on files in// this shared drive.CanCommentbool `json:"canComment,omitempty"`// CanCopy: Output only. Whether the current user can copy files in this shared// drive.CanCopybool `json:"canCopy,omitempty"`// CanDeleteChildren: Output only. Whether the current user can delete children// from folders in this shared drive.CanDeleteChildrenbool `json:"canDeleteChildren,omitempty"`// CanDeleteDrive: Output only. Whether the current user can delete this shared// drive. Attempting to delete the shared drive may still fail if there are// untrashed items inside the shared drive.CanDeleteDrivebool `json:"canDeleteDrive,omitempty"`// CanDownload: Output only. Whether the current user can download files in// this shared drive.CanDownloadbool `json:"canDownload,omitempty"`// CanEdit: Output only. Whether the current user can edit files in this shared// driveCanEditbool `json:"canEdit,omitempty"`// CanListChildren: Output only. Whether the current user can list the children// of folders in this shared drive.CanListChildrenbool `json:"canListChildren,omitempty"`// CanManageMembers: Output only. Whether the current user can add members to// this shared drive or remove them or change their role.CanManageMembersbool `json:"canManageMembers,omitempty"`// CanReadRevisions: Output only. Whether the current user can read the// revisions resource of files in this shared drive.CanReadRevisionsbool `json:"canReadRevisions,omitempty"`// CanRename: Output only. Whether the current user can rename files or folders// in this shared drive.CanRenamebool `json:"canRename,omitempty"`// CanRenameDrive: Output only. Whether the current user can rename this shared// drive.CanRenameDrivebool `json:"canRenameDrive,omitempty"`// CanResetDriveRestrictions: Output only. Whether the current user can reset// the shared drive restrictions to defaults.CanResetDriveRestrictionsbool `json:"canResetDriveRestrictions,omitempty"`// CanShare: Output only. Whether the current user can share files or folders// in this shared drive.CanSharebool `json:"canShare,omitempty"`// CanTrashChildren: Output only. Whether the current user can trash children// from folders in this shared drive.CanTrashChildrenbool `json:"canTrashChildren,omitempty"`// ForceSendFields is a list of field names (e.g. "CanAddChildren") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}DriveCapabilities: Output only. Capabilities the current user has on thisshared drive.
func (DriveCapabilities)MarshalJSON¶added inv0.4.0
func (sDriveCapabilities) MarshalJSON() ([]byte,error)
typeDriveList¶added inv0.4.0
type DriveList struct {// Items: The list of shared drives. If nextPageToken is populated, then this// list may be incomplete and an additional page of results should be fetched.Items []*Drive `json:"items,omitempty"`// Kind: This is always `drive#driveList`Kindstring `json:"kind,omitempty"`// NextPageToken: The page token for the next page of shared drives. This will// be absent if the end of the 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.NextPageTokenstring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}DriveList: A list of shared drives.
func (DriveList)MarshalJSON¶added inv0.4.0
typeDriveRestrictions¶added inv0.4.0
type DriveRestrictions struct {// AdminManagedRestrictions: Whether administrative privileges on this shared// drive are required to modify restrictions.AdminManagedRestrictionsbool `json:"adminManagedRestrictions,omitempty"`// CopyRequiresWriterPermission: Whether the options to copy, print, or// download files inside this shared 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 shared drive.CopyRequiresWriterPermissionbool `json:"copyRequiresWriterPermission,omitempty"`// DomainUsersOnly: Whether access to this shared drive and items inside this// shared drive is restricted to users of the domain to which this shared drive// belongs. This restriction may be overridden by other sharing policies// controlled outside of this shared drive.DomainUsersOnlybool `json:"domainUsersOnly,omitempty"`// DriveMembersOnly: Whether access to items inside this shared drive is// restricted to its members.DriveMembersOnlybool `json:"driveMembersOnly,omitempty"`// SharingFoldersRequiresOrganizerPermission: If true, only users with the// organizer role can share folders. If false, users with either the organizer// role or the file organizer role can share folders.SharingFoldersRequiresOrganizerPermissionbool `json:"sharingFoldersRequiresOrganizerPermission,omitempty"`// ForceSendFields is a list of field names (e.g. "AdminManagedRestrictions")// to unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}DriveRestrictions: A set of restrictions that apply to this shared drive oritems inside this shared drive.
func (DriveRestrictions)MarshalJSON¶added inv0.4.0
func (sDriveRestrictions) MarshalJSON() ([]byte,error)
typeDrivesDeleteCall¶added inv0.4.0
type DrivesDeleteCall struct {// contains filtered or unexported fields}func (*DrivesDeleteCall)AllowItemDeletion¶added inv0.76.0
func (c *DrivesDeleteCall) AllowItemDeletion(allowItemDeletionbool) *DrivesDeleteCall
AllowItemDeletion sets the optional parameter "allowItemDeletion": Whetherany items inside the shared drive should also be deleted. This option isonly supported when `useDomainAdminAccess` is also set to `true`.
func (*DrivesDeleteCall)Context¶added inv0.4.0
func (c *DrivesDeleteCall) Context(ctxcontext.Context) *DrivesDeleteCall
Context sets the context to be used in this call's Do method.
func (*DrivesDeleteCall)Do¶added inv0.4.0
func (c *DrivesDeleteCall) Do(opts ...googleapi.CallOption)error
Do executes the "drive.drives.delete" call.
func (*DrivesDeleteCall)Fields¶added inv0.4.0
func (c *DrivesDeleteCall) Fields(s ...googleapi.Field) *DrivesDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*DrivesDeleteCall)Header¶added inv0.4.0
func (c *DrivesDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*DrivesDeleteCall)UseDomainAdminAccess¶added inv0.76.0
func (c *DrivesDeleteCall) UseDomainAdminAccess(useDomainAdminAccessbool) *DrivesDeleteCall
UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":Issue the request as a domain administrator; if set to true, then therequester will be granted access if they are an administrator of the domainto which the shared drive belongs.
typeDrivesGetCall¶added inv0.4.0
type DrivesGetCall struct {// contains filtered or unexported fields}func (*DrivesGetCall)Context¶added inv0.4.0
func (c *DrivesGetCall) Context(ctxcontext.Context) *DrivesGetCall
Context sets the context to be used in this call's Do method.
func (*DrivesGetCall)Do¶added inv0.4.0
func (c *DrivesGetCall) Do(opts ...googleapi.CallOption) (*Drive,error)
Do executes the "drive.drives.get" call.Any non-2xx status code is an error. Response headers are in either*Drive.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*DrivesGetCall)Fields¶added inv0.4.0
func (c *DrivesGetCall) Fields(s ...googleapi.Field) *DrivesGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*DrivesGetCall)Header¶added inv0.4.0
func (c *DrivesGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*DrivesGetCall)IfNoneMatch¶added inv0.4.0
func (c *DrivesGetCall) IfNoneMatch(entityTagstring) *DrivesGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*DrivesGetCall)UseDomainAdminAccess¶added inv0.4.0
func (c *DrivesGetCall) UseDomainAdminAccess(useDomainAdminAccessbool) *DrivesGetCall
UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":Issue the request as a domain administrator; if set to true, then therequester will be granted access if they are an administrator of the domainto which the shared drive belongs.
typeDrivesHideCall¶added inv0.4.0
type DrivesHideCall struct {// contains filtered or unexported fields}func (*DrivesHideCall)Context¶added inv0.4.0
func (c *DrivesHideCall) Context(ctxcontext.Context) *DrivesHideCall
Context sets the context to be used in this call's Do method.
func (*DrivesHideCall)Do¶added inv0.4.0
func (c *DrivesHideCall) Do(opts ...googleapi.CallOption) (*Drive,error)
Do executes the "drive.drives.hide" call.Any non-2xx status code is an error. Response headers are in either*Drive.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*DrivesHideCall)Fields¶added inv0.4.0
func (c *DrivesHideCall) Fields(s ...googleapi.Field) *DrivesHideCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*DrivesHideCall)Header¶added inv0.4.0
func (c *DrivesHideCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeDrivesInsertCall¶added inv0.4.0
type DrivesInsertCall struct {// contains filtered or unexported fields}func (*DrivesInsertCall)Context¶added inv0.4.0
func (c *DrivesInsertCall) Context(ctxcontext.Context) *DrivesInsertCall
Context sets the context to be used in this call's Do method.
func (*DrivesInsertCall)Do¶added inv0.4.0
func (c *DrivesInsertCall) Do(opts ...googleapi.CallOption) (*Drive,error)
Do executes the "drive.drives.insert" call.Any non-2xx status code is an error. Response headers are in either*Drive.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*DrivesInsertCall)Fields¶added inv0.4.0
func (c *DrivesInsertCall) Fields(s ...googleapi.Field) *DrivesInsertCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*DrivesInsertCall)Header¶added inv0.4.0
func (c *DrivesInsertCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeDrivesListCall¶added inv0.4.0
type DrivesListCall struct {// contains filtered or unexported fields}func (*DrivesListCall)Context¶added inv0.4.0
func (c *DrivesListCall) Context(ctxcontext.Context) *DrivesListCall
Context sets the context to be used in this call's Do method.
func (*DrivesListCall)Do¶added inv0.4.0
func (c *DrivesListCall) Do(opts ...googleapi.CallOption) (*DriveList,error)
Do executes the "drive.drives.list" call.Any non-2xx status code is an error. Response headers are in either*DriveList.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*DrivesListCall)Fields¶added inv0.4.0
func (c *DrivesListCall) Fields(s ...googleapi.Field) *DrivesListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*DrivesListCall)Header¶added inv0.4.0
func (c *DrivesListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*DrivesListCall)IfNoneMatch¶added inv0.4.0
func (c *DrivesListCall) IfNoneMatch(entityTagstring) *DrivesListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*DrivesListCall)MaxResults¶added inv0.4.0
func (c *DrivesListCall) MaxResults(maxResultsint64) *DrivesListCall
MaxResults sets the optional parameter "maxResults": Maximum number ofshared drives to return per page.
func (*DrivesListCall)PageToken¶added inv0.4.0
func (c *DrivesListCall) PageToken(pageTokenstring) *DrivesListCall
PageToken sets the optional parameter "pageToken": Page token for shareddrives.
func (*DrivesListCall)Pages¶added inv0.4.0
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
func (*DrivesListCall)Q¶added inv0.4.0
func (c *DrivesListCall) Q(qstring) *DrivesListCall
Q sets the optional parameter "q": Query string for searching shared drives.
func (*DrivesListCall)UseDomainAdminAccess¶added inv0.4.0
func (c *DrivesListCall) UseDomainAdminAccess(useDomainAdminAccessbool) *DrivesListCall
UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":Issue the request as a domain administrator; if set to true, then all shareddrives of the domain in which the requester is an administrator arereturned.
typeDrivesService¶added inv0.4.0
type DrivesService struct {// contains filtered or unexported fields}funcNewDrivesService¶added inv0.4.0
func NewDrivesService(s *Service) *DrivesService
func (*DrivesService)Delete¶added inv0.4.0
func (r *DrivesService) Delete(driveIdstring) *DrivesDeleteCall
Delete: Permanently deletes a shared drive for which the user is an`organizer`. The shared drive cannot contain any untrashed items.
- driveId: The ID of the shared drive.
func (*DrivesService)Get¶added inv0.4.0
func (r *DrivesService) Get(driveIdstring) *DrivesGetCall
Get: Gets a shared drive's metadata by ID.
- driveId: The ID of the shared drive.
func (*DrivesService)Hide¶added inv0.4.0
func (r *DrivesService) Hide(driveIdstring) *DrivesHideCall
Hide: Hides a shared drive from the default view.
- driveId: The ID of the shared drive.
func (*DrivesService)Insert¶added inv0.4.0
func (r *DrivesService) Insert(requestIdstring, drive *Drive) *DrivesInsertCall
Insert: Creates a new shared drive.
- requestId: An ID, such as a random UUID, which uniquely identifies thisuser's request for idempotent creation of a shared drive. A repeatedrequest by the same user and with the same request ID will avoid creatingduplicates by attempting to create the same shared drive. If the shareddrive already exists a 409 error will be returned.
func (*DrivesService)List¶added inv0.4.0
func (r *DrivesService) List() *DrivesListCall
List: Lists the user's shared drives. This method accepts the `q`parameter, which is a search query combining one or more search terms. Formore information, see the Search for shared drives(/workspace/drive/api/guides/search-shareddrives) guide.
func (*DrivesService)Unhide¶added inv0.4.0
func (r *DrivesService) Unhide(driveIdstring) *DrivesUnhideCall
Unhide: Restores a shared drive to the default view.
- driveId: The ID of the shared drive.
func (*DrivesService)Update¶added inv0.4.0
func (r *DrivesService) Update(driveIdstring, drive *Drive) *DrivesUpdateCall
Update: Updates the metadata for a shared drive.
- driveId: The ID of the shared drive.
typeDrivesUnhideCall¶added inv0.4.0
type DrivesUnhideCall struct {// contains filtered or unexported fields}func (*DrivesUnhideCall)Context¶added inv0.4.0
func (c *DrivesUnhideCall) Context(ctxcontext.Context) *DrivesUnhideCall
Context sets the context to be used in this call's Do method.
func (*DrivesUnhideCall)Do¶added inv0.4.0
func (c *DrivesUnhideCall) Do(opts ...googleapi.CallOption) (*Drive,error)
Do executes the "drive.drives.unhide" call.Any non-2xx status code is an error. Response headers are in either*Drive.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*DrivesUnhideCall)Fields¶added inv0.4.0
func (c *DrivesUnhideCall) Fields(s ...googleapi.Field) *DrivesUnhideCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*DrivesUnhideCall)Header¶added inv0.4.0
func (c *DrivesUnhideCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeDrivesUpdateCall¶added inv0.4.0
type DrivesUpdateCall struct {// contains filtered or unexported fields}func (*DrivesUpdateCall)Context¶added inv0.4.0
func (c *DrivesUpdateCall) Context(ctxcontext.Context) *DrivesUpdateCall
Context sets the context to be used in this call's Do method.
func (*DrivesUpdateCall)Do¶added inv0.4.0
func (c *DrivesUpdateCall) Do(opts ...googleapi.CallOption) (*Drive,error)
Do executes the "drive.drives.update" call.Any non-2xx status code is an error. Response headers are in either*Drive.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*DrivesUpdateCall)Fields¶added inv0.4.0
func (c *DrivesUpdateCall) Fields(s ...googleapi.Field) *DrivesUpdateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*DrivesUpdateCall)Header¶added inv0.4.0
func (c *DrivesUpdateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*DrivesUpdateCall)UseDomainAdminAccess¶added inv0.4.0
func (c *DrivesUpdateCall) UseDomainAdminAccess(useDomainAdminAccessbool) *DrivesUpdateCall
UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":Issue the request as a domain administrator; if set to true, then therequester will be granted access if they are an administrator of the domainto which the shared drive belongs.
typeFile¶
type File struct {// AlternateLink: Output only. A link for opening the file in a relevant Google// editor or viewer.AlternateLinkstring `json:"alternateLink,omitempty"`// AppDataContents: Output only. Whether this file is in the Application Data// folder.AppDataContentsbool `json:"appDataContents,omitempty"`// CanComment: Output only. Deprecated: Use `capabilities/canComment` instead.CanCommentbool `json:"canComment,omitempty"`// CanReadRevisions: Output only. Deprecated: Use// `capabilities/canReadRevisions` instead.CanReadRevisionsbool `json:"canReadRevisions,omitempty"`// Capabilities: Output only. 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"`// ContentRestrictions: Restrictions for accessing the content of the file.// Only populated if such a restriction exists.ContentRestrictions []*ContentRestriction `json:"contentRestrictions,omitempty"`// CopyRequiresWriterPermission: Whether the options to copy, print, or// download this file, should be disabled for readers and commenters.CopyRequiresWriterPermissionbool `json:"copyRequiresWriterPermission,omitempty"`// Copyable: Output only. Deprecated: Use `capabilities/canCopy` instead.Copyablebool `json:"copyable,omitempty"`// CreatedDate: Create time for this file (formattedRFC 3339 timestamp).CreatedDatestring `json:"createdDate,omitempty"`// DefaultOpenWithLink: Output only. 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.DefaultOpenWithLinkstring `json:"defaultOpenWithLink,omitempty"`// Description: A short description of the file.Descriptionstring `json:"description,omitempty"`// DownloadUrl: Output only. Short lived download URL for the file. This field// is only populated for files with content stored in Google Drive; it is not// populated for Google Docs or shortcut files.DownloadUrlstring `json:"downloadUrl,omitempty"`// DriveId: Output only. ID of the shared drive the file resides in. Only// populated for items in shared drives.DriveIdstring `json:"driveId,omitempty"`// Editable: Output only. Deprecated: Use `capabilities/canEdit` instead.Editablebool `json:"editable,omitempty"`// EmbedLink: Output only. A link for embedding the file.EmbedLinkstring `json:"embedLink,omitempty"`// Etag: Output only. ETag of the file.Etagstring `json:"etag,omitempty"`// ExplicitlyTrashed: Output only. Whether this file has been explicitly// trashed, as opposed to recursively trashed.ExplicitlyTrashedbool `json:"explicitlyTrashed,omitempty"`// ExportLinks: Output only. Links for exporting Docs Editors files to specific// formats.ExportLinks map[string]string `json:"exportLinks,omitempty"`// FileExtension: Output only. 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 Google Drive; it is// not populated for Docs Editors or shortcut files.FileExtensionstring `json:"fileExtension,omitempty"`// FileSize: Output only. Size in bytes of blobs and first party editor files.// Won't be populated for files that have no size, like shortcuts and folders.FileSizeint64 `json:"fileSize,omitempty,string"`// FolderColorRgb: Folder color as an RGB hex string if the file is a folder or// a shortcut to 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.FolderColorRgbstring `json:"folderColorRgb,omitempty"`// FullFileExtension: Output only. 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 Google Drive; it is not// populated for Docs Editors or shortcut files.FullFileExtensionstring `json:"fullFileExtension,omitempty"`// HasAugmentedPermissions: Output only. Whether there are permissions directly// on this file. This field is only populated for items in shared drives.HasAugmentedPermissionsbool `json:"hasAugmentedPermissions,omitempty"`// HasThumbnail: Output only. 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.HasThumbnailbool `json:"hasThumbnail,omitempty"`// HeadRevisionId: Output only. The ID of the file's head revision. This field// is only populated for files with content stored in Google Drive; it is not// populated for Docs Editors or shortcut files.HeadRevisionIdstring `json:"headRevisionId,omitempty"`// IconLink: Output only. A link to the file's icon.IconLinkstring `json:"iconLink,omitempty"`// Id: The ID of the file.Idstring `json:"id,omitempty"`// ImageMediaMetadata: Output only. 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"`// InheritedPermissionsDisabled: Whether this file has inherited permissions// disabled. Inherited permissions are enabled by default.InheritedPermissionsDisabledbool `json:"inheritedPermissionsDisabled,omitempty"`// IsAppAuthorized: Output only. Whether the file was created or opened by the// requesting app.IsAppAuthorizedbool `json:"isAppAuthorized,omitempty"`// Kind: Output only. The type of file. This is always `drive#file`.Kindstring `json:"kind,omitempty"`// LabelInfo: Output only. An overview of the labels on the file.LabelInfo *FileLabelInfo `json:"labelInfo,omitempty"`// Labels: A group of labels for the file.Labels *FileLabels `json:"labels,omitempty"`// LastModifyingUser: Output only. The last user to modify this file. This// field is only populated when the last modification was performed by a// signed-in user.LastModifyingUser *User `json:"lastModifyingUser,omitempty"`// LastModifyingUserName: Output only. Name of the last user to modify this// file.LastModifyingUserNamestring `json:"lastModifyingUserName,omitempty"`// LastViewedByMeDate: Last time this file was viewed by the user (formatted//RFC 3339 timestamp).LastViewedByMeDatestring `json:"lastViewedByMeDate,omitempty"`// LinkShareMetadata: Contains details about the link URLs that clients are// using to refer to this item.LinkShareMetadata *FileLinkShareMetadata `json:"linkShareMetadata,omitempty"`// MarkedViewedByMeDate: Deprecated.MarkedViewedByMeDatestring `json:"markedViewedByMeDate,omitempty"`// Md5Checksum: Output only. An MD5 checksum for the content of this file. This// field is only populated for files with content stored in Google Drive; it is// not populated for Docs Editors or shortcut files.Md5Checksumstring `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.MimeTypestring `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.ModifiedByMeDatestring `json:"modifiedByMeDate,omitempty"`// ModifiedDate: Last time this file was modified by anyone (formattedRFC 3339// timestamp). This is only mutable on update when the setModifiedDate// parameter is set.ModifiedDatestring `json:"modifiedDate,omitempty"`// OpenWithLinks: Output only. 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 Google Drive.OriginalFilenamestring `json:"originalFilename,omitempty"`// OwnedByMe: Output only. Whether the file is owned by the current user. Not// populated for items in shared drives.OwnedByMebool `json:"ownedByMe,omitempty"`// OwnerNames: Output only. Name(s) of the owner(s) of this file. Not populated// for items in shared drives.OwnerNames []string `json:"ownerNames,omitempty"`// Owners: Output only. The owner of this file. Only certain legacy files may// have more than one owner. This field isn't populated for items in shared// drives.Owners []*User `json:"owners,omitempty"`// Parents: The ID of the parent folder containing the file. A file can only// have one parent folder; specifying multiple parents isn't supported. If not// specified as part of an insert request, the file is placed directly in the// user's My Drive folder. If not specified as part of a copy request, the file// inherits any discoverable parent of the source file. Update requests must// use the `addParents` and `removeParents` parameters to modify the parents// list.Parents []*ParentReference `json:"parents,omitempty"`// PermissionIds: Output only. List of permission IDs for users with access to// this file.PermissionIds []string `json:"permissionIds,omitempty"`// Permissions: Output only. The list of permissions for users with access to// this file. Not populated for items in shared drives.Permissions []*Permission `json:"permissions,omitempty"`// Properties: The list of properties.Properties []*Property `json:"properties,omitempty"`// QuotaBytesUsed: Output only. The number of quota bytes used by this file.QuotaBytesUsedint64 `json:"quotaBytesUsed,omitempty,string"`// ResourceKey: Output only. A key needed to access the item via a shared link.ResourceKeystring `json:"resourceKey,omitempty"`// SelfLink: Output only. A link back to this file.SelfLinkstring `json:"selfLink,omitempty"`// Sha1Checksum: Output only. The SHA1 checksum associated with this file, if// available. This field is only populated for files with content stored in// Google Drive; it is not populated for Docs Editors or shortcut files.Sha1Checksumstring `json:"sha1Checksum,omitempty"`// Sha256Checksum: Output only. The SHA256 checksum associated with this file,// if available. This field is only populated for files with content stored in// Google Drive; it is not populated for Docs Editors or shortcut files.Sha256Checksumstring `json:"sha256Checksum,omitempty"`// Shareable: Output only. Deprecated: Use `capabilities/canShare` instead.Shareablebool `json:"shareable,omitempty"`// Shared: Output only. Whether the file has been shared. Not populated for// items in shared drives.Sharedbool `json:"shared,omitempty"`// SharedWithMeDate: Time at which this file was shared with the user// (formattedRFC 3339 timestamp).SharedWithMeDatestring `json:"sharedWithMeDate,omitempty"`// SharingUser: Output only. User that shared the item with the current user,// if available.SharingUser *User `json:"sharingUser,omitempty"`// ShortcutDetails: Shortcut file details. Only populated for shortcut files,// which have the mimeType field set to `application/vnd.google-apps.shortcut`.// Can only be set on `files.insert` requests.ShortcutDetails *FileShortcutDetails `json:"shortcutDetails,omitempty"`// Spaces: Output only. The list of spaces which contain the file. Supported// values are `drive`, `appDataFolder` and `photos`.Spaces []string `json:"spaces,omitempty"`// TeamDriveId: Output only. Deprecated: Use `driveId` instead.TeamDriveIdstring `json:"teamDriveId,omitempty"`// Thumbnail: A thumbnail for the file. This will only be used if a standard// thumbnail cannot be generated.Thumbnail *FileThumbnail `json:"thumbnail,omitempty"`// ThumbnailLink: Output only. A short-lived link to the file's thumbnail, if// available. Typically lasts on the order of hours. Not intended for direct// usage on web applications due to Cross-Origin Resource Sharing (CORS)// (https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS), consider using a// proxy server. Only populated when the requesting app can access the file's// content. If the file isn't shared publicly, the URL returned in// `Files.thumbnailLink` must be fetched using a credentialed request.ThumbnailLinkstring `json:"thumbnailLink,omitempty"`// ThumbnailVersion: Output only. The thumbnail version for use in thumbnail// cache invalidation.ThumbnailVersionint64 `json:"thumbnailVersion,omitempty,string"`// Title: The title of this file. Note that for immutable items such as the top// level folders of shared drives, My Drive root folder, and Application Data// folder the title is constant.Titlestring `json:"title,omitempty"`// TrashedDate: The time that the item was trashed (formattedRFC 3339// timestamp). Only populated for items in shared drives.TrashedDatestring `json:"trashedDate,omitempty"`// TrashingUser: Output only. If the file has been explicitly trashed, the user// who trashed it. Only populated for items in shared drives.TrashingUser *User `json:"trashingUser,omitempty"`// UserPermission: Output only. The permissions for the authenticated user on// this file.UserPermission *Permission `json:"userPermission,omitempty"`// Version: Output only. 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.Versionint64 `json:"version,omitempty,string"`// VideoMediaMetadata: Output only. Metadata about video media. This will only// be present for video types.VideoMediaMetadata *FileVideoMediaMetadata `json:"videoMediaMetadata,omitempty"`// WebContentLink: Output only. 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.WebContentLinkstring `json:"webContentLink,omitempty"`// WebViewLink: Output only. A link only available on public folders for// viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's// Website Hosting.WebViewLinkstring `json:"webViewLink,omitempty"`// WritersCanShare: Whether writers can share the document with other users.// Not populated for items in shared drives.WritersCanSharebool `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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}File: The metadata for a file. Some resource methods (such as`files.update`) require a `fileId`. Use the `files.list` method to retrievethe ID for a file.
func (File)MarshalJSON¶
typeFileCapabilities¶
type FileCapabilities struct {// CanAcceptOwnership: Output only. Whether the current user is the pending// owner of the file. Not populated for shared drive files.CanAcceptOwnershipbool `json:"canAcceptOwnership,omitempty"`// CanAddChildren: Output only. Whether the current user can add children to// this folder. This is always false when the item is not a folder.CanAddChildrenbool `json:"canAddChildren,omitempty"`// CanAddFolderFromAnotherDrive: Output only. Whether the current user can add// a folder from another drive (different shared drive or My Drive) to this// folder. This is false when the item is not a folder. Only populated for// items in shared drives.CanAddFolderFromAnotherDrivebool `json:"canAddFolderFromAnotherDrive,omitempty"`// CanAddMyDriveParent: Output only. Whether the current user can add a parent// for the item without removing an existing parent in the same request. Not// populated for shared drive files.CanAddMyDriveParentbool `json:"canAddMyDriveParent,omitempty"`// CanChangeCopyRequiresWriterPermission: Output only. Whether the current user// can change the `copyRequiresWriterPermission` restriction of this file.CanChangeCopyRequiresWriterPermissionbool `json:"canChangeCopyRequiresWriterPermission,omitempty"`// CanChangeRestrictedDownload: Output only. Deprecated.CanChangeRestrictedDownloadbool `json:"canChangeRestrictedDownload,omitempty"`// CanChangeSecurityUpdateEnabled: Output only. Whether the current user can// change the securityUpdateEnabled field on link share metadata.CanChangeSecurityUpdateEnabledbool `json:"canChangeSecurityUpdateEnabled,omitempty"`// CanComment: Output only. Whether the current user can comment on this file.CanCommentbool `json:"canComment,omitempty"`// CanCopy: Output only. Whether the current user can copy this file. For an// item in a shared drive, whether the current user can copy non-folder// descendants of this item, or this item itself if it is not a folder.CanCopybool `json:"canCopy,omitempty"`// CanDelete: Output only. Whether the current user can delete this file.CanDeletebool `json:"canDelete,omitempty"`// CanDeleteChildren: Output only. Whether the current user can delete children// of this folder. This is false when the item is not a folder. Only populated// for items in shared drives.CanDeleteChildrenbool `json:"canDeleteChildren,omitempty"`// CanDisableInheritedPermissions: Output only. Whether a user can disable// inherited permissions.CanDisableInheritedPermissionsbool `json:"canDisableInheritedPermissions,omitempty"`// CanDownload: Output only. Whether the current user can download this file.CanDownloadbool `json:"canDownload,omitempty"`// CanEdit: Output only. Whether the current user can edit this file. Other// factors may limit the type of changes a user can make to a file. For// example, see `canChangeCopyRequiresWriterPermission` or `canModifyContent`.CanEditbool `json:"canEdit,omitempty"`// CanEnableInheritedPermissions: Output only. Whether a user can re-enable// inherited permissions.CanEnableInheritedPermissionsbool `json:"canEnableInheritedPermissions,omitempty"`// CanListChildren: Output only. Whether the current user can list the children// of this folder. This is always false when the item is not a folder.CanListChildrenbool `json:"canListChildren,omitempty"`// CanModifyContent: Output only. Whether the current user can modify the// content of this file.CanModifyContentbool `json:"canModifyContent,omitempty"`// CanModifyContentRestriction: Deprecated: Output only. Use one of// `canModifyEditorContentRestriction`, `canModifyOwnerContentRestriction` or// `canRemoveContentRestriction`.CanModifyContentRestrictionbool `json:"canModifyContentRestriction,omitempty"`// CanModifyEditorContentRestriction: Output only. Whether the current user can// add or modify content restrictions on the file which are editor restricted.CanModifyEditorContentRestrictionbool `json:"canModifyEditorContentRestriction,omitempty"`// CanModifyLabels: Output only. Whether the current user can modify the labels// on the file.CanModifyLabelsbool `json:"canModifyLabels,omitempty"`// CanModifyOwnerContentRestriction: Output only. Whether the current user can// add or modify content restrictions which are owner restricted.CanModifyOwnerContentRestrictionbool `json:"canModifyOwnerContentRestriction,omitempty"`// CanMoveChildrenOutOfDrive: Output only. Whether the current user can move// children of this folder outside of the shared drive. This is false when the// item is not a folder. Only populated for items in shared drives.CanMoveChildrenOutOfDrivebool `json:"canMoveChildrenOutOfDrive,omitempty"`// CanMoveChildrenOutOfTeamDrive: Output only. Deprecated: Use// `canMoveChildrenOutOfDrive` instead.CanMoveChildrenOutOfTeamDrivebool `json:"canMoveChildrenOutOfTeamDrive,omitempty"`// CanMoveChildrenWithinDrive: Output only. Whether the current user can move// children of this folder within this drive. This is false when the item is// not a folder. Note that a request to move the child may still fail depending// on the current user's access to the child and to the destination folder.CanMoveChildrenWithinDrivebool `json:"canMoveChildrenWithinDrive,omitempty"`// CanMoveChildrenWithinTeamDrive: Output only. Deprecated: Use// `canMoveChildrenWithinDrive` instead.CanMoveChildrenWithinTeamDrivebool `json:"canMoveChildrenWithinTeamDrive,omitempty"`// CanMoveItemIntoTeamDrive: Output only. Deprecated: Use// `canMoveItemOutOfDrive` instead.CanMoveItemIntoTeamDrivebool `json:"canMoveItemIntoTeamDrive,omitempty"`// CanMoveItemOutOfDrive: Output only. Whether the current user can move this// item outside of this 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.CanMoveItemOutOfDrivebool `json:"canMoveItemOutOfDrive,omitempty"`// CanMoveItemOutOfTeamDrive: Output only. Deprecated: Use// `canMoveItemOutOfDrive` instead.CanMoveItemOutOfTeamDrivebool `json:"canMoveItemOutOfTeamDrive,omitempty"`// CanMoveItemWithinDrive: Output only. Whether the current user can move this// item within this drive. Note that a request to change the parent of the item// may still fail depending on the new parent that is being added and the// parent that is being removed.CanMoveItemWithinDrivebool `json:"canMoveItemWithinDrive,omitempty"`// CanMoveItemWithinTeamDrive: Output only. Deprecated: Use// `canMoveItemWithinDrive` instead.CanMoveItemWithinTeamDrivebool `json:"canMoveItemWithinTeamDrive,omitempty"`// CanMoveTeamDriveItem: Output only. Deprecated: Use `canMoveItemWithinDrive`// or `canMoveItemOutOfDrive` instead.CanMoveTeamDriveItembool `json:"canMoveTeamDriveItem,omitempty"`// CanReadDrive: Output only. Whether the current user can read the shared// drive to which this file belongs. Only populated for items in shared drives.CanReadDrivebool `json:"canReadDrive,omitempty"`// CanReadLabels: Output only. Whether the current user can read the labels on// the file.CanReadLabelsbool `json:"canReadLabels,omitempty"`// CanReadRevisions: Output only. Whether the current user can read the// revisions resource of this file. For a shared drive item, whether revisions// of non-folder descendants of this item, or this item itself if it is not a// folder, can be read.CanReadRevisionsbool `json:"canReadRevisions,omitempty"`// CanReadTeamDrive: Output only. Deprecated: Use `canReadDrive` instead.CanReadTeamDrivebool `json:"canReadTeamDrive,omitempty"`// CanRemoveChildren: Output only. Whether the current user can remove children// from this folder. This is always false when the item is not a folder. For a// folder in a shared drive, use `canDeleteChildren` or `canTrashChildren`// instead.CanRemoveChildrenbool `json:"canRemoveChildren,omitempty"`// CanRemoveContentRestriction: Output only. Whether there is a content// restriction on the file that can be removed by the current user.CanRemoveContentRestrictionbool `json:"canRemoveContentRestriction,omitempty"`// CanRemoveMyDriveParent: Output only. Whether the current user can remove a// parent from the item without adding another parent in the same request. Not// populated for shared drive files.CanRemoveMyDriveParentbool `json:"canRemoveMyDriveParent,omitempty"`// CanRename: Output only. Whether the current user can rename this file.CanRenamebool `json:"canRename,omitempty"`// CanShare: Output only. Whether the current user can modify the sharing// settings for this file.CanSharebool `json:"canShare,omitempty"`// CanTrash: Output only. Whether the current user can move this file to trash.CanTrashbool `json:"canTrash,omitempty"`// CanTrashChildren: Output only. Whether the current user can trash children// of this folder. This is false when the item is not a folder. Only populated// for items in shared drives.CanTrashChildrenbool `json:"canTrashChildren,omitempty"`// CanUntrash: Output only. Whether the current user can restore this file from// trash.CanUntrashbool `json:"canUntrash,omitempty"`// ForceSendFields is a list of field names (e.g. "CanAcceptOwnership") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CanAcceptOwnership") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}FileCapabilities: Output only. Capabilities the current user has on thisfile. Each capability corresponds to a fine-grained action that a user maytake.
func (FileCapabilities)MarshalJSON¶
func (sFileCapabilities) MarshalJSON() ([]byte,error)
typeFileImageMediaMetadata¶
type FileImageMediaMetadata struct {// Aperture: Output only. The aperture used to create the photo (f-number).Aperturefloat64 `json:"aperture,omitempty"`// CameraMake: Output only. The make of the camera used to create the photo.CameraMakestring `json:"cameraMake,omitempty"`// CameraModel: Output only. The model of the camera used to create the photo.CameraModelstring `json:"cameraModel,omitempty"`// ColorSpace: Output only. The color space of the photo.ColorSpacestring `json:"colorSpace,omitempty"`// Date: Output only. The date and time the photo was taken (EXIF format// timestamp).Datestring `json:"date,omitempty"`// ExposureBias: Output only. The exposure bias of the photo (APEX value).ExposureBiasfloat64 `json:"exposureBias,omitempty"`// ExposureMode: Output only. The exposure mode used to create the photo.ExposureModestring `json:"exposureMode,omitempty"`// ExposureTime: Output only. The length of the exposure, in seconds.ExposureTimefloat64 `json:"exposureTime,omitempty"`// FlashUsed: Output only. Whether a flash was used to create the photo.FlashUsedbool `json:"flashUsed,omitempty"`// FocalLength: Output only. The focal length used to create the photo, in// millimeters.FocalLengthfloat64 `json:"focalLength,omitempty"`// Height: Output only. The height of the image in pixels.Heightint64 `json:"height,omitempty"`// IsoSpeed: Output only. The ISO speed used to create the photo.IsoSpeedint64 `json:"isoSpeed,omitempty"`// Lens: Output only. The lens used to create the photo.Lensstring `json:"lens,omitempty"`// Location: Output only. Geographic location information stored in the image.Location *FileImageMediaMetadataLocation `json:"location,omitempty"`// MaxApertureValue: Output only. The smallest f-number of the lens at the// focal length used to create the photo (APEX value).MaxApertureValuefloat64 `json:"maxApertureValue,omitempty"`// MeteringMode: Output only. The metering mode used to create the photo.MeteringModestring `json:"meteringMode,omitempty"`// Rotation: Output only. The number of clockwise 90 degree rotations applied// from the image's original orientation.Rotationint64 `json:"rotation,omitempty"`// Sensor: Output only. The type of sensor used to create the photo.Sensorstring `json:"sensor,omitempty"`// SubjectDistance: Output only. The distance to the subject of the photo, in// meters.SubjectDistanceint64 `json:"subjectDistance,omitempty"`// WhiteBalance: Output only. The white balance mode used to create the photo.WhiteBalancestring `json:"whiteBalance,omitempty"`// Width: Output only. The width of the image in pixels.Widthint64 `json:"width,omitempty"`// ForceSendFields is a list of field names (e.g. "Aperture") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}FileImageMediaMetadata: Output only. Metadata about image media. This willonly be present for image types, and its contents will depend on what can beparsed from the image content.
func (FileImageMediaMetadata)MarshalJSON¶
func (sFileImageMediaMetadata) MarshalJSON() ([]byte,error)
func (*FileImageMediaMetadata)UnmarshalJSON¶
func (s *FileImageMediaMetadata) UnmarshalJSON(data []byte)error
typeFileImageMediaMetadataLocation¶
type FileImageMediaMetadataLocation struct {// Altitude: Output only. The altitude stored in the image.Altitudefloat64 `json:"altitude,omitempty"`// Latitude: Output only. The latitude stored in the image.Latitudefloat64 `json:"latitude,omitempty"`// Longitude: Output only. The longitude stored in the image.Longitudefloat64 `json:"longitude,omitempty"`// ForceSendFields is a list of field names (e.g. "Altitude") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}FileImageMediaMetadataLocation: Output only. Geographic location informationstored in the image.
func (FileImageMediaMetadataLocation)MarshalJSON¶
func (sFileImageMediaMetadataLocation) MarshalJSON() ([]byte,error)
func (*FileImageMediaMetadataLocation)UnmarshalJSON¶
func (s *FileImageMediaMetadataLocation) UnmarshalJSON(data []byte)error
typeFileIndexableText¶
type FileIndexableText struct {// Text: The text to be indexed for this file.Textstring `json:"text,omitempty"`// ForceSendFields is a list of field names (e.g. "Text") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}FileIndexableText: Indexable text attributes for the file (can only bewritten)
func (FileIndexableText)MarshalJSON¶
func (sFileIndexableText) MarshalJSON() ([]byte,error)
typeFileLabelInfo¶added inv0.88.0
type FileLabelInfo struct {// Labels: Output only. The set of labels on the file as requested by the label// IDs in the `includeLabels` parameter. By default, no labels are returned.Labels []*Label `json:"labels,omitempty"`// ForceSendFields is a list of field names (e.g. "Labels") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Labels") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}FileLabelInfo: Output only. An overview of the labels on the file.
func (FileLabelInfo)MarshalJSON¶added inv0.88.0
func (sFileLabelInfo) MarshalJSON() ([]byte,error)
typeFileLabels¶
type FileLabels struct {// Hidden: Output only. Deprecated.Hiddenbool `json:"hidden,omitempty"`// Modified: Output only. Whether the file has been modified by this user.Modifiedbool `json:"modified,omitempty"`// Restricted: Output only. Deprecated: Use `copyRequiresWriterPermission`// instead.Restrictedbool `json:"restricted,omitempty"`// Starred: Whether this file is starred by the user.Starredbool `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.Trashedbool `json:"trashed,omitempty"`// Viewed: Whether this file has been viewed by this user.Viewedbool `json:"viewed,omitempty"`// ForceSendFields is a list of field names (e.g. "Hidden") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}FileLabels: A group of labels for the file.
func (FileLabels)MarshalJSON¶
func (sFileLabels) MarshalJSON() ([]byte,error)
typeFileLinkShareMetadata¶added inv0.49.0
type FileLinkShareMetadata struct {// SecurityUpdateEligible: Output only. Whether the file is eligible for// security update.SecurityUpdateEligiblebool `json:"securityUpdateEligible,omitempty"`// SecurityUpdateEnabled: Output only. Whether the security update is enabled// for this file.SecurityUpdateEnabledbool `json:"securityUpdateEnabled,omitempty"`// ForceSendFields is a list of field names (e.g. "SecurityUpdateEligible") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "SecurityUpdateEligible") to// include in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}FileLinkShareMetadata: Contains details about the link URLs that clients areusing to refer to this item.
func (FileLinkShareMetadata)MarshalJSON¶added inv0.49.0
func (sFileLinkShareMetadata) MarshalJSON() ([]byte,error)
typeFileList¶
type FileList struct {// Etag: The ETag of the list.Etagstring `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 drives with the "allDrives" 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 "drive".IncompleteSearchbool `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`.Kindstring `json:"kind,omitempty"`// NextLink: A link to the next page of files.NextLinkstring `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.NextPageTokenstring `json:"nextPageToken,omitempty"`// SelfLink: A link back to this list.SelfLinkstring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}FileList: A list of files.
func (FileList)MarshalJSON¶
typeFileShortcutDetails¶added inv0.22.0
type FileShortcutDetails struct {// TargetId: The ID of the file that this shortcut points to. Can only be set// on `files.insert` requests.TargetIdstring `json:"targetId,omitempty"`// TargetMimeType: Output only. The MIME type of the file that this shortcut// points to. The value of this field is a snapshot of the target's MIME type,// captured when the shortcut is created.TargetMimeTypestring `json:"targetMimeType,omitempty"`// TargetResourceKey: Output only. The ResourceKey for the target file.TargetResourceKeystring `json:"targetResourceKey,omitempty"`// ForceSendFields is a list of field names (e.g. "TargetId") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "TargetId") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}FileShortcutDetails: Shortcut file details. Only populated for shortcutfiles, which have the mimeType field set to`application/vnd.google-apps.shortcut`. Can only be set on `files.insert`requests.
func (FileShortcutDetails)MarshalJSON¶added inv0.22.0
func (sFileShortcutDetails) MarshalJSON() ([]byte,error)
typeFileThumbnail¶
type FileThumbnail struct {// Image: The URL-safe Base64 encoded bytes of the thumbnail image. It should// conform toRFC 4648 section 5.Imagestring `json:"image,omitempty"`// MimeType: The MIME type of the thumbnail.MimeTypestring `json:"mimeType,omitempty"`// ForceSendFields is a list of field names (e.g. "Image") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}FileThumbnail: A thumbnail for the file. This will only be used if astandard thumbnail cannot be generated.
func (FileThumbnail)MarshalJSON¶
func (sFileThumbnail) MarshalJSON() ([]byte,error)
typeFileVideoMediaMetadata¶
type FileVideoMediaMetadata struct {// DurationMillis: Output only. The duration of the video in milliseconds.DurationMillisint64 `json:"durationMillis,omitempty,string"`// Height: Output only. The height of the video in pixels.Heightint64 `json:"height,omitempty"`// Width: Output only. The width of the video in pixels.Widthint64 `json:"width,omitempty"`// ForceSendFields is a list of field names (e.g. "DurationMillis") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}FileVideoMediaMetadata: Output only. Metadata about video media. This willonly be present for video types.
func (FileVideoMediaMetadata)MarshalJSON¶
func (sFileVideoMediaMetadata) MarshalJSON() ([]byte,error)
typeFilesCopyCall¶
type FilesCopyCall struct {// contains filtered or unexported fields}func (*FilesCopyCall)Context¶
func (c *FilesCopyCall) Context(ctxcontext.Context) *FilesCopyCall
Context sets the context to be used in this call's Do method.
func (*FilesCopyCall)Convert¶
func (c *FilesCopyCall) Convert(convertbool) *FilesCopyCall
Convert sets the optional parameter "convert": Whether to convert this fileto the corresponding Docs Editors format.
func (*FilesCopyCall)Do¶
func (c *FilesCopyCall) Do(opts ...googleapi.CallOption) (*File,error)
Do executes the "drive.files.copy" call.Any non-2xx status code is an error. Response headers are in either*File.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*FilesCopyCall)EnforceSingleParent¶added inv0.21.0
func (c *FilesCopyCall) EnforceSingleParent(enforceSingleParentbool) *FilesCopyCall
EnforceSingleParent sets the optional parameter "enforceSingleParent":Deprecated: Copying files into multiple folders is no longer supported. Useshortcuts instead.
func (*FilesCopyCall)Fields¶
func (c *FilesCopyCall) Fields(s ...googleapi.Field) *FilesCopyCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FilesCopyCall)Header¶
func (c *FilesCopyCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*FilesCopyCall)IncludeLabels¶added inv0.88.0
func (c *FilesCopyCall) IncludeLabels(includeLabelsstring) *FilesCopyCall
IncludeLabels sets the optional parameter "includeLabels": A comma-separatedlist of IDs of labels to include in the `labelInfo` part of the response.
func (*FilesCopyCall)IncludePermissionsForView¶added inv0.31.0
func (c *FilesCopyCall) IncludePermissionsForView(includePermissionsForViewstring) *FilesCopyCall
IncludePermissionsForView sets the optional parameter"includePermissionsForView": Specifies which additional view's permissionsto include in the response. Only `published` is supported.
func (*FilesCopyCall)Ocr¶
func (c *FilesCopyCall) Ocr(ocrbool) *FilesCopyCall
Ocr sets the optional parameter "ocr": Whether to attempt OCR on .jpg, .png,.gif, or .pdf uploads.
func (*FilesCopyCall)OcrLanguage¶
func (c *FilesCopyCall) OcrLanguage(ocrLanguagestring) *FilesCopyCall
OcrLanguage sets the optional parameter "ocrLanguage": If `ocr` is true,hints at the language to use. Valid values are BCP 47 codes.
func (*FilesCopyCall)Pinned¶
func (c *FilesCopyCall) Pinned(pinnedbool) *FilesCopyCall
Pinned sets the optional parameter "pinned": Whether to pin the headrevision of the new copy. A file can have a maximum of 200 pinned revisions.
func (*FilesCopyCall)SupportsAllDrives¶added inv0.4.0
func (c *FilesCopyCall) SupportsAllDrives(supportsAllDrivesbool) *FilesCopyCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*FilesCopyCall)SupportsTeamDrives¶
func (c *FilesCopyCall) SupportsTeamDrives(supportsTeamDrivesbool) *FilesCopyCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
func (*FilesCopyCall)TimedTextLanguage¶
func (c *FilesCopyCall) TimedTextLanguage(timedTextLanguagestring) *FilesCopyCall
TimedTextLanguage sets the optional parameter "timedTextLanguage": Thelanguage of the timed text.
func (*FilesCopyCall)TimedTextTrackName¶
func (c *FilesCopyCall) TimedTextTrackName(timedTextTrackNamestring) *FilesCopyCall
TimedTextTrackName sets the optional parameter "timedTextTrackName": Thetimed text track name.
func (*FilesCopyCall)Visibility¶
func (c *FilesCopyCall) Visibility(visibilitystring) *FilesCopyCall
Visibility sets the optional parameter "visibility": The visibility of thenew file. This parameter is only relevant when the source is not a nativeGoogle Doc and convert=false.
Possible values:
"DEFAULT" (default) - The visibility of the new file is determined by the
user's default visibility/sharing policies.
"PRIVATE" - The new file will be visible to only the owner.
typeFilesDeleteCall¶
type FilesDeleteCall struct {// contains filtered or unexported fields}func (*FilesDeleteCall)Context¶
func (c *FilesDeleteCall) Context(ctxcontext.Context) *FilesDeleteCall
Context sets the context to be used in this call's Do method.
func (*FilesDeleteCall)Do¶
func (c *FilesDeleteCall) Do(opts ...googleapi.CallOption)error
Do executes the "drive.files.delete" call.
func (*FilesDeleteCall)EnforceSingleParent¶added inv0.31.0
func (c *FilesDeleteCall) EnforceSingleParent(enforceSingleParentbool) *FilesDeleteCall
EnforceSingleParent sets the optional parameter "enforceSingleParent":Deprecated: If an item is not in a shared drive and its last parent isdeleted but the item itself is not, the item is placed under its owner'sroot.
func (*FilesDeleteCall)Fields¶
func (c *FilesDeleteCall) Fields(s ...googleapi.Field) *FilesDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FilesDeleteCall)Header¶
func (c *FilesDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*FilesDeleteCall)SupportsAllDrives¶added inv0.4.0
func (c *FilesDeleteCall) SupportsAllDrives(supportsAllDrivesbool) *FilesDeleteCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*FilesDeleteCall)SupportsTeamDrives¶
func (c *FilesDeleteCall) SupportsTeamDrives(supportsTeamDrivesbool) *FilesDeleteCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
typeFilesEmptyTrashCall¶
type FilesEmptyTrashCall struct {// contains filtered or unexported fields}func (*FilesEmptyTrashCall)Context¶
func (c *FilesEmptyTrashCall) Context(ctxcontext.Context) *FilesEmptyTrashCall
Context sets the context to be used in this call's Do method.
func (*FilesEmptyTrashCall)Do¶
func (c *FilesEmptyTrashCall) Do(opts ...googleapi.CallOption)error
Do executes the "drive.files.emptyTrash" call.
func (*FilesEmptyTrashCall)DriveId¶added inv0.120.0
func (c *FilesEmptyTrashCall) DriveId(driveIdstring) *FilesEmptyTrashCall
DriveId sets the optional parameter "driveId": If set, empties the trash ofthe provided shared drive.
func (*FilesEmptyTrashCall)EnforceSingleParent¶added inv0.31.0
func (c *FilesEmptyTrashCall) EnforceSingleParent(enforceSingleParentbool) *FilesEmptyTrashCall
EnforceSingleParent sets the optional parameter "enforceSingleParent":Deprecated: If an item is not in a shared drive and its last parent isdeleted but the item itself is not, the item is placed under its owner'sroot.
func (*FilesEmptyTrashCall)Fields¶
func (c *FilesEmptyTrashCall) Fields(s ...googleapi.Field) *FilesEmptyTrashCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FilesEmptyTrashCall)Header¶
func (c *FilesEmptyTrashCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeFilesExportCall¶
type FilesExportCall struct {// contains filtered or unexported fields}func (*FilesExportCall)Context¶
func (c *FilesExportCall) Context(ctxcontext.Context) *FilesExportCall
Context sets the context to be used in this call's Do and Download methods.
func (*FilesExportCall)Do¶
func (c *FilesExportCall) Do(opts ...googleapi.CallOption)error
Do executes the "drive.files.export" call.
func (*FilesExportCall)Download¶
func (c *FilesExportCall) Download(opts ...googleapi.CallOption) (*http.Response,error)
Download fetches the API endpoint's "media" value, instead of the normalAPI response value. If the returned error is nil, the Response is guaranteed tohave a 2xx status code. Callers must close the Response.Body as usual.
func (*FilesExportCall)Fields¶
func (c *FilesExportCall) Fields(s ...googleapi.Field) *FilesExportCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FilesExportCall)Header¶
func (c *FilesExportCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*FilesExportCall)IfNoneMatch¶
func (c *FilesExportCall) IfNoneMatch(entityTagstring) *FilesExportCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeFilesGenerateIdsCall¶
type FilesGenerateIdsCall struct {// contains filtered or unexported fields}func (*FilesGenerateIdsCall)Context¶
func (c *FilesGenerateIdsCall) Context(ctxcontext.Context) *FilesGenerateIdsCall
Context sets the context to be used in this call's Do method.
func (*FilesGenerateIdsCall)Do¶
func (c *FilesGenerateIdsCall) Do(opts ...googleapi.CallOption) (*GeneratedIds,error)
Do executes the "drive.files.generateIds" call.Any non-2xx status code is an error. Response headers are in either*GeneratedIds.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*FilesGenerateIdsCall)Fields¶
func (c *FilesGenerateIdsCall) Fields(s ...googleapi.Field) *FilesGenerateIdsCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FilesGenerateIdsCall)Header¶
func (c *FilesGenerateIdsCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*FilesGenerateIdsCall)IfNoneMatch¶
func (c *FilesGenerateIdsCall) IfNoneMatch(entityTagstring) *FilesGenerateIdsCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*FilesGenerateIdsCall)MaxResults¶
func (c *FilesGenerateIdsCall) MaxResults(maxResultsint64) *FilesGenerateIdsCall
MaxResults sets the optional parameter "maxResults": Maximum number of IDsto return.
func (*FilesGenerateIdsCall)Space¶
func (c *FilesGenerateIdsCall) Space(spacestring) *FilesGenerateIdsCall
Space sets the optional parameter "space": The space in which the IDs can beused to create new files. Supported values are `drive` and `appDataFolder`.(Default: `drive`)
func (*FilesGenerateIdsCall)Type¶added inv0.47.0
func (c *FilesGenerateIdsCall) Type(type_string) *FilesGenerateIdsCall
Type sets the optional parameter "type": The type of items which the IDs canbe used for. Supported values are `files` and `shortcuts`. Note that`shortcuts` are only supported in the `drive` `space`. (Default: `files`)
typeFilesGetCall¶
type FilesGetCall struct {// contains filtered or unexported fields}func (*FilesGetCall)AcknowledgeAbuse¶
func (c *FilesGetCall) AcknowledgeAbuse(acknowledgeAbusebool) *FilesGetCall
AcknowledgeAbuse sets the optional parameter "acknowledgeAbuse": Whether theuser is acknowledging the risk of downloading known malware or other abusivefiles. This is only applicable when the `alt` parameter is set to `media`and the user is the owner of the file or an organizer of the shared drive inwhich the file resides.
func (*FilesGetCall)Context¶
func (c *FilesGetCall) Context(ctxcontext.Context) *FilesGetCall
Context sets the context to be used in this call's Do and Download methods.
func (*FilesGetCall)Do¶
func (c *FilesGetCall) Do(opts ...googleapi.CallOption) (*File,error)
Do executes the "drive.files.get" call.Any non-2xx status code is an error. Response headers are in either*File.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*FilesGetCall)Download¶
func (c *FilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response,error)
Download fetches the API endpoint's "media" value, instead of the normalAPI response value. If the returned error is nil, the Response is guaranteed tohave a 2xx status code. Callers must close the Response.Body as usual.
func (*FilesGetCall)Fields¶
func (c *FilesGetCall) Fields(s ...googleapi.Field) *FilesGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FilesGetCall)Header¶
func (c *FilesGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*FilesGetCall)IfNoneMatch¶
func (c *FilesGetCall) IfNoneMatch(entityTagstring) *FilesGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*FilesGetCall)IncludeLabels¶added inv0.88.0
func (c *FilesGetCall) IncludeLabels(includeLabelsstring) *FilesGetCall
IncludeLabels sets the optional parameter "includeLabels": A comma-separatedlist of IDs of labels to include in the `labelInfo` part of the response.
func (*FilesGetCall)IncludePermissionsForView¶added inv0.31.0
func (c *FilesGetCall) IncludePermissionsForView(includePermissionsForViewstring) *FilesGetCall
IncludePermissionsForView sets the optional parameter"includePermissionsForView": Specifies which additional view's permissionsto include in the response. Only `published` is supported.
func (*FilesGetCall)Projection¶
func (c *FilesGetCall) Projection(projectionstring) *FilesGetCall
Projection sets the optional parameter "projection": Deprecated: Thisparameter has no function.
Possible values:
"BASIC" - Deprecated."FULL" - Deprecated.
func (*FilesGetCall)RevisionId¶
func (c *FilesGetCall) RevisionId(revisionIdstring) *FilesGetCall
RevisionId sets the optional parameter "revisionId": Specifies the RevisionID that should be downloaded. Ignored unless alt=media is specified.
func (*FilesGetCall)SupportsAllDrives¶added inv0.4.0
func (c *FilesGetCall) SupportsAllDrives(supportsAllDrivesbool) *FilesGetCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*FilesGetCall)SupportsTeamDrives¶
func (c *FilesGetCall) SupportsTeamDrives(supportsTeamDrivesbool) *FilesGetCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
func (*FilesGetCall)UpdateViewedDate¶
func (c *FilesGetCall) UpdateViewedDate(updateViewedDatebool) *FilesGetCall
UpdateViewedDate sets the optional parameter "updateViewedDate": Deprecated:Use `files.update` with `modifiedDateBehavior=noChange,updateViewedDate=true` and an empty request body.
typeFilesInsertCall¶
type FilesInsertCall struct {// contains filtered or unexported fields}func (*FilesInsertCall)Context¶
func (c *FilesInsertCall) Context(ctxcontext.Context) *FilesInsertCall
Context sets the context to be used in this call's Do method.This context will supersede any context previously provided to theResumableMedia method.
func (*FilesInsertCall)Convert¶
func (c *FilesInsertCall) Convert(convertbool) *FilesInsertCall
Convert sets the optional parameter "convert": Whether to convert this fileto the corresponding Docs Editors format.
func (*FilesInsertCall)Do¶
func (c *FilesInsertCall) Do(opts ...googleapi.CallOption) (*File,error)
Do executes the "drive.files.insert" call.Any non-2xx status code is an error. Response headers are in either*File.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*FilesInsertCall)EnforceSingleParent¶added inv0.21.0
func (c *FilesInsertCall) EnforceSingleParent(enforceSingleParentbool) *FilesInsertCall
EnforceSingleParent sets the optional parameter "enforceSingleParent":Deprecated: Creating files in multiple folders is no longer supported.
func (*FilesInsertCall)Fields¶
func (c *FilesInsertCall) Fields(s ...googleapi.Field) *FilesInsertCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FilesInsertCall)Header¶
func (c *FilesInsertCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*FilesInsertCall)IncludeLabels¶added inv0.88.0
func (c *FilesInsertCall) IncludeLabels(includeLabelsstring) *FilesInsertCall
IncludeLabels sets the optional parameter "includeLabels": A comma-separatedlist of IDs of labels to include in the `labelInfo` part of the response.
func (*FilesInsertCall)IncludePermissionsForView¶added inv0.31.0
func (c *FilesInsertCall) IncludePermissionsForView(includePermissionsForViewstring) *FilesInsertCall
IncludePermissionsForView sets the optional parameter"includePermissionsForView": Specifies which additional view's permissionsto include in the response. Only `published` is supported.
func (*FilesInsertCall)Media¶
func (c *FilesInsertCall) Media(rio.Reader, options ...googleapi.MediaOption) *FilesInsertCall
Media specifies the media to upload in one or more chunks. The chunk sizemay be controlled by supplying a MediaOption generated bygoogleapi.ChunkSize. The chunk size defaults togoogleapi.DefaultUploadChunkSize.The Content-Type header used in the uploadrequest will be determined by sniffing the contents of r, unless aMediaOption generated by googleapi.ContentType is supplied.At most one of Media and ResumableMedia may be set.
func (*FilesInsertCall)Ocr¶
func (c *FilesInsertCall) Ocr(ocrbool) *FilesInsertCall
Ocr sets the optional parameter "ocr": Whether to attempt OCR on .jpg, .png,.gif, or .pdf uploads.
func (*FilesInsertCall)OcrLanguage¶
func (c *FilesInsertCall) OcrLanguage(ocrLanguagestring) *FilesInsertCall
OcrLanguage sets the optional parameter "ocrLanguage": If ocr is true, hintsat the language to use. Valid values are BCP 47 codes.
func (*FilesInsertCall)Pinned¶
func (c *FilesInsertCall) Pinned(pinnedbool) *FilesInsertCall
Pinned sets the optional parameter "pinned": Whether to pin the headrevision of the uploaded file. A file can have a maximum of 200 pinnedrevisions.
func (*FilesInsertCall)ProgressUpdater¶
func (c *FilesInsertCall) ProgressUpdater(pugoogleapi.ProgressUpdater) *FilesInsertCall
ProgressUpdater provides a callback function that will be called after everychunk. It should be a low-latency function in order to not slow down theupload operation. This should only be called when using ResumableMedia (asopposed to Media).
func (*FilesInsertCall)ResumableMediadeprecated
func (c *FilesInsertCall) ResumableMedia(ctxcontext.Context, rio.ReaderAt, sizeint64, mediaTypestring) *FilesInsertCall
ResumableMedia specifies the media to upload in chunks and can be canceledwith ctx.
Deprecated: use Media instead.
At most one of Media and ResumableMedia may be set. mediaType identifies theMIME media type of the upload, such as "image/png". If mediaType is "", itwill be auto-detected. The provided ctx will supersede any contextpreviously provided to the Context method.
func (*FilesInsertCall)SupportsAllDrives¶added inv0.4.0
func (c *FilesInsertCall) SupportsAllDrives(supportsAllDrivesbool) *FilesInsertCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*FilesInsertCall)SupportsTeamDrives¶
func (c *FilesInsertCall) SupportsTeamDrives(supportsTeamDrivesbool) *FilesInsertCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
func (*FilesInsertCall)TimedTextLanguage¶
func (c *FilesInsertCall) TimedTextLanguage(timedTextLanguagestring) *FilesInsertCall
TimedTextLanguage sets the optional parameter "timedTextLanguage": Thelanguage of the timed text.
func (*FilesInsertCall)TimedTextTrackName¶
func (c *FilesInsertCall) TimedTextTrackName(timedTextTrackNamestring) *FilesInsertCall
TimedTextTrackName sets the optional parameter "timedTextTrackName": Thetimed text track name.
func (*FilesInsertCall)UseContentAsIndexableText¶
func (c *FilesInsertCall) UseContentAsIndexableText(useContentAsIndexableTextbool) *FilesInsertCall
UseContentAsIndexableText sets the optional parameter"useContentAsIndexableText": Whether to use the content as indexable text.
func (*FilesInsertCall)Visibility¶
func (c *FilesInsertCall) Visibility(visibilitystring) *FilesInsertCall
Visibility sets the optional parameter "visibility": The visibility of thenew file. This parameter is only relevant when convert=false.
Possible values:
"DEFAULT" (default) - The visibility of the new file is determined by the
user's default visibility/sharing policies.
"PRIVATE" - The new file will be visible to only the owner.
typeFilesListCall¶
type FilesListCall struct {// contains filtered or unexported fields}func (*FilesListCall)Context¶
func (c *FilesListCall) Context(ctxcontext.Context) *FilesListCall
Context sets the context to be used in this call's Do method.
func (*FilesListCall)Corpora¶
func (c *FilesListCall) Corpora(corporastring) *FilesListCall
Corpora sets the optional parameter "corpora": Bodies of items(files/documents) to which the query applies. Supported bodies are`default`, `domain`, `drive` and `allDrives`. Prefer `default` or `drive` to`allDrives` for efficiency.
func (*FilesListCall)Corpus¶
func (c *FilesListCall) Corpus(corpusstring) *FilesListCall
Corpus sets the optional parameter "corpus": Deprecated: The body of items(files/documents) to which the query applies. Use `corpora` instead.
Possible values:
"DEFAULT" - The items that the user has accessed."DOMAIN" - Items shared to the user's domain.
func (*FilesListCall)Do¶
func (c *FilesListCall) Do(opts ...googleapi.CallOption) (*FileList,error)
Do executes the "drive.files.list" call.Any non-2xx status code is an error. Response headers are in either*FileList.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*FilesListCall)DriveId¶added inv0.4.0
func (c *FilesListCall) DriveId(driveIdstring) *FilesListCall
DriveId sets the optional parameter "driveId": ID of the shared drive tosearch.
func (*FilesListCall)Fields¶
func (c *FilesListCall) Fields(s ...googleapi.Field) *FilesListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FilesListCall)Header¶
func (c *FilesListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*FilesListCall)IfNoneMatch¶
func (c *FilesListCall) IfNoneMatch(entityTagstring) *FilesListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*FilesListCall)IncludeItemsFromAllDrives¶added inv0.4.0
func (c *FilesListCall) IncludeItemsFromAllDrives(includeItemsFromAllDrivesbool) *FilesListCall
IncludeItemsFromAllDrives sets the optional parameter"includeItemsFromAllDrives": Whether both My Drive and shared drive itemsshould be included in results.
func (*FilesListCall)IncludeLabels¶added inv0.88.0
func (c *FilesListCall) IncludeLabels(includeLabelsstring) *FilesListCall
IncludeLabels sets the optional parameter "includeLabels": A comma-separatedlist of IDs of labels to include in the `labelInfo` part of the response.
func (*FilesListCall)IncludePermissionsForView¶added inv0.31.0
func (c *FilesListCall) IncludePermissionsForView(includePermissionsForViewstring) *FilesListCall
IncludePermissionsForView sets the optional parameter"includePermissionsForView": Specifies which additional view's permissionsto include in the response. Only `published` is supported.
func (*FilesListCall)IncludeTeamDriveItems¶
func (c *FilesListCall) IncludeTeamDriveItems(includeTeamDriveItemsbool) *FilesListCall
IncludeTeamDriveItems sets the optional parameter "includeTeamDriveItems":Deprecated: Use `includeItemsFromAllDrives` instead.
func (*FilesListCall)MaxResults¶
func (c *FilesListCall) MaxResults(maxResultsint64) *FilesListCall
MaxResults sets the optional parameter "maxResults": The maximum number offiles to return per page. Partial or empty result pages are possible evenbefore the end of the files list has been reached.
func (*FilesListCall)OrderBy¶
func (c *FilesListCall) OrderBy(orderBystring) *FilesListCall
OrderBy sets the optional parameter "orderBy": A comma-separated list ofsort keys. Valid keys are: * `createdDate`: When the file was created. *`folder`: The folder ID. This field is sorted using alphabetical ordering. *`lastViewedByMeDate`: The last time the file was viewed by the user. *`modifiedByMeDate`: The last time the file was modified by the user. *`modifiedDate`: The last time the file was modified by anyone. *`quotaBytesUsed`: The number of storage quota bytes used by the file. *`recency`: The most recent timestamp from the file's date-time fields. *`sharedWithMeDate`: When the file was shared with the user, if applicable. *`starred`: Whether the user has starred the file. * `title`: The title ofthe file. This field is sorted using alphabetical ordering, so 1, 12, 2, 22.* `title_natural`: The title of the file. This field is sorted using naturalsort ordering, so 1, 2, 12, 22. Each key sorts ascending by default, but canbe reversed with the 'desc' modifier. Example usage:`?orderBy=folder,modifiedDate desc,title`. Note that there's a currentlimitation for users with approximately one million files in which therequested sort order is ignored.
func (*FilesListCall)PageToken¶
func (c *FilesListCall) PageToken(pageTokenstring) *FilesListCall
PageToken sets the optional parameter "pageToken": Page token for files.
func (*FilesListCall)Pages¶
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
func (*FilesListCall)Projection¶
func (c *FilesListCall) Projection(projectionstring) *FilesListCall
Projection sets the optional parameter "projection": Deprecated: Thisparameter has no function.
Possible values:
"BASIC" - Deprecated."FULL" - Deprecated.
func (*FilesListCall)Q¶
func (c *FilesListCall) Q(qstring) *FilesListCall
Q sets the optional parameter "q": Query string for searching files.
func (*FilesListCall)Spaces¶
func (c *FilesListCall) Spaces(spacesstring) *FilesListCall
Spaces sets the optional parameter "spaces": A comma-separated list ofspaces to query. Supported values are `drive`, and `appDataFolder`.
func (*FilesListCall)SupportsAllDrives¶added inv0.4.0
func (c *FilesListCall) SupportsAllDrives(supportsAllDrivesbool) *FilesListCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*FilesListCall)SupportsTeamDrives¶
func (c *FilesListCall) SupportsTeamDrives(supportsTeamDrivesbool) *FilesListCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
func (*FilesListCall)TeamDriveId¶
func (c *FilesListCall) TeamDriveId(teamDriveIdstring) *FilesListCall
TeamDriveId sets the optional parameter "teamDriveId": Deprecated: Use`driveId` instead.
typeFilesListLabelsCall¶added inv0.88.0
type FilesListLabelsCall struct {// contains filtered or unexported fields}func (*FilesListLabelsCall)Context¶added inv0.88.0
func (c *FilesListLabelsCall) Context(ctxcontext.Context) *FilesListLabelsCall
Context sets the context to be used in this call's Do method.
func (*FilesListLabelsCall)Do¶added inv0.88.0
func (c *FilesListLabelsCall) Do(opts ...googleapi.CallOption) (*LabelList,error)
Do executes the "drive.files.listLabels" call.Any non-2xx status code is an error. Response headers are in either*LabelList.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*FilesListLabelsCall)Fields¶added inv0.88.0
func (c *FilesListLabelsCall) Fields(s ...googleapi.Field) *FilesListLabelsCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FilesListLabelsCall)Header¶added inv0.88.0
func (c *FilesListLabelsCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*FilesListLabelsCall)IfNoneMatch¶added inv0.88.0
func (c *FilesListLabelsCall) IfNoneMatch(entityTagstring) *FilesListLabelsCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*FilesListLabelsCall)MaxResults¶added inv0.88.0
func (c *FilesListLabelsCall) MaxResults(maxResultsint64) *FilesListLabelsCall
MaxResults sets the optional parameter "maxResults": The maximum number oflabels to return per page. When not set, defaults to 100.
func (*FilesListLabelsCall)PageToken¶added inv0.88.0
func (c *FilesListLabelsCall) PageToken(pageTokenstring) *FilesListLabelsCall
PageToken sets the optional parameter "pageToken": The token for continuinga previous list request on the next page. This should be set to the value of`nextPageToken` from the previous response.
typeFilesModifyLabelsCall¶added inv0.88.0
type FilesModifyLabelsCall struct {// contains filtered or unexported fields}func (*FilesModifyLabelsCall)Context¶added inv0.88.0
func (c *FilesModifyLabelsCall) Context(ctxcontext.Context) *FilesModifyLabelsCall
Context sets the context to be used in this call's Do method.
func (*FilesModifyLabelsCall)Do¶added inv0.88.0
func (c *FilesModifyLabelsCall) Do(opts ...googleapi.CallOption) (*ModifyLabelsResponse,error)
Do executes the "drive.files.modifyLabels" call.Any non-2xx status code is an error. Response headers are in either*ModifyLabelsResponse.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*FilesModifyLabelsCall)Fields¶added inv0.88.0
func (c *FilesModifyLabelsCall) Fields(s ...googleapi.Field) *FilesModifyLabelsCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FilesModifyLabelsCall)Header¶added inv0.88.0
func (c *FilesModifyLabelsCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeFilesPatchCall¶
type FilesPatchCall struct {// contains filtered or unexported fields}func (*FilesPatchCall)AddParents¶
func (c *FilesPatchCall) AddParents(addParentsstring) *FilesPatchCall
AddParents sets the optional parameter "addParents": Comma-separated list ofparent IDs to add.
func (*FilesPatchCall)Context¶
func (c *FilesPatchCall) Context(ctxcontext.Context) *FilesPatchCall
Context sets the context to be used in this call's Do method.
func (*FilesPatchCall)Convert¶
func (c *FilesPatchCall) Convert(convertbool) *FilesPatchCall
Convert sets the optional parameter "convert": Deprecated: This parameterhas no function.
func (*FilesPatchCall)Do¶
func (c *FilesPatchCall) Do(opts ...googleapi.CallOption) (*File,error)
Do executes the "drive.files.patch" call.Any non-2xx status code is an error. Response headers are in either*File.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*FilesPatchCall)EnforceSingleParent¶added inv0.21.0
func (c *FilesPatchCall) EnforceSingleParent(enforceSingleParentbool) *FilesPatchCall
EnforceSingleParent sets the optional parameter "enforceSingleParent":Deprecated: Adding files to multiple folders is no longer supported. Use`shortcuts` instead.
func (*FilesPatchCall)Fields¶
func (c *FilesPatchCall) Fields(s ...googleapi.Field) *FilesPatchCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FilesPatchCall)Header¶
func (c *FilesPatchCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*FilesPatchCall)IncludeLabels¶added inv0.88.0
func (c *FilesPatchCall) IncludeLabels(includeLabelsstring) *FilesPatchCall
IncludeLabels sets the optional parameter "includeLabels": A comma-separatedlist of IDs of labels to include in the `labelInfo` part of the response.
func (*FilesPatchCall)IncludePermissionsForView¶added inv0.31.0
func (c *FilesPatchCall) IncludePermissionsForView(includePermissionsForViewstring) *FilesPatchCall
IncludePermissionsForView sets the optional parameter"includePermissionsForView": Specifies which additional view's permissionsto include in the response. Only `published` is supported.
func (*FilesPatchCall)ModifiedDateBehavior¶
func (c *FilesPatchCall) ModifiedDateBehavior(modifiedDateBehaviorstring) *FilesPatchCall
ModifiedDateBehavior sets the optional parameter "modifiedDateBehavior":Determines the behavior in which `modifiedDate` is updated. This overrides`setModifiedDate`.
Possible values:
"fromBody" - Set `modifiedDate` to the value provided in the body of the
request. No change if no value was provided.
"fromBodyIfNeeded" - Set `modifiedDate` to the value provided in the body
of the request depending on other contents of the update.
"fromBodyOrNow" - Set modifiedDate to the value provided in the body of
the request, or to the current time if no value was provided.
"noChange" - Maintain the previous value of `modifiedDate`."now" - Set `modifiedDate` to the current time."nowIfNeeded" - Set `modifiedDate` to the current time depending on
contents of the update.
func (*FilesPatchCall)NewRevision¶
func (c *FilesPatchCall) NewRevision(newRevisionbool) *FilesPatchCall
NewRevision sets the optional parameter "newRevision": Whether a blob uploadshould create a new revision. If false, the blob data in the current headrevision is replaced. If true or not set, a new blob is created as headrevision, and previous unpinned revisions are preserved for a short periodof time. Pinned revisions are stored indefinitely, using additional storagequota, up to a maximum of 200 revisions. For details on how revisions areretained, see the Drive Help Center(https://support.google.com/drive/answer/2409045). Note that this field isignored if there is no payload in the request.
func (*FilesPatchCall)Ocr¶
func (c *FilesPatchCall) Ocr(ocrbool) *FilesPatchCall
Ocr sets the optional parameter "ocr": Whether to attempt OCR on .jpg, .png,.gif, or .pdf uploads.
func (*FilesPatchCall)OcrLanguage¶
func (c *FilesPatchCall) OcrLanguage(ocrLanguagestring) *FilesPatchCall
OcrLanguage sets the optional parameter "ocrLanguage": If ocr is true, hintsat the language to use. Valid values are BCP 47 codes.
func (*FilesPatchCall)Pinned¶
func (c *FilesPatchCall) Pinned(pinnedbool) *FilesPatchCall
Pinned sets the optional parameter "pinned": Whether to pin the newrevision. A file can have a maximum of 200 pinned revisions. Note that thisfield is ignored if there is no payload in the request.
func (*FilesPatchCall)RemoveParents¶
func (c *FilesPatchCall) RemoveParents(removeParentsstring) *FilesPatchCall
RemoveParents sets the optional parameter "removeParents": Comma-separatedlist of parent IDs to remove.
func (*FilesPatchCall)SetModifiedDate¶
func (c *FilesPatchCall) SetModifiedDate(setModifiedDatebool) *FilesPatchCall
SetModifiedDate sets the optional parameter "setModifiedDate": Whether toset the modified date using the value supplied in the request body. Settingthis field to `true` is equivalent to `modifiedDateBehavior=fromBodyOrNow`,and `false` is equivalent to `modifiedDateBehavior=now`. To prevent anychanges to the modified date set `modifiedDateBehavior=noChange`.
func (*FilesPatchCall)SupportsAllDrives¶added inv0.4.0
func (c *FilesPatchCall) SupportsAllDrives(supportsAllDrivesbool) *FilesPatchCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*FilesPatchCall)SupportsTeamDrives¶
func (c *FilesPatchCall) SupportsTeamDrives(supportsTeamDrivesbool) *FilesPatchCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
func (*FilesPatchCall)TimedTextLanguage¶
func (c *FilesPatchCall) TimedTextLanguage(timedTextLanguagestring) *FilesPatchCall
TimedTextLanguage sets the optional parameter "timedTextLanguage": Thelanguage of the timed text.
func (*FilesPatchCall)TimedTextTrackName¶
func (c *FilesPatchCall) TimedTextTrackName(timedTextTrackNamestring) *FilesPatchCall
TimedTextTrackName sets the optional parameter "timedTextTrackName": Thetimed text track name.
func (*FilesPatchCall)UpdateViewedDate¶
func (c *FilesPatchCall) UpdateViewedDate(updateViewedDatebool) *FilesPatchCall
UpdateViewedDate sets the optional parameter "updateViewedDate": Whether toupdate the view date after successfully updating the file.
func (*FilesPatchCall)UseContentAsIndexableText¶
func (c *FilesPatchCall) UseContentAsIndexableText(useContentAsIndexableTextbool) *FilesPatchCall
UseContentAsIndexableText sets the optional parameter"useContentAsIndexableText": Whether to use the content as indexable text.
typeFilesService¶
type FilesService struct {// contains filtered or unexported fields}funcNewFilesService¶
func NewFilesService(s *Service) *FilesService
func (*FilesService)Copy¶
func (r *FilesService) Copy(fileIdstring, file *File) *FilesCopyCall
Copy: Creates a copy of the specified file.
- fileId: The ID of the file to copy.
func (*FilesService)Delete¶
func (r *FilesService) Delete(fileIdstring) *FilesDeleteCall
Delete: Permanently deletes a file owned by the user without moving it tothe trash. If the file belongs to a shared drive, the user must be an`organizer` on the parent folder. If the target is a folder, all descendantsowned by the user are also deleted.
- fileId: The ID of the file to delete.
func (*FilesService)EmptyTrash¶
func (r *FilesService) EmptyTrash() *FilesEmptyTrashCall
EmptyTrash: Permanently deletes all of the user's trashed files.
func (*FilesService)Export¶
func (r *FilesService) Export(fileIdstring, mimeTypestring) *FilesExportCall
Export: Exports a Google Workspace document to the requested MIME type andreturns exported byte content. Note that the exported content is limited to10MB.
- fileId: The ID of the file.- mimeType: The MIME type of the format requested for this export.
func (*FilesService)GenerateIds¶
func (r *FilesService) GenerateIds() *FilesGenerateIdsCall
GenerateIds: Generates a set of file IDs which can be provided in insert orcopy requests.
func (*FilesService)Get¶
func (r *FilesService) Get(fileIdstring) *FilesGetCall
Get: Gets a file's metadata or content by ID. If you provide the URLparameter `alt=media`, then the response includes the file contents in theresponse body. Downloading content with `alt=media` only works if the fileis stored in Drive. To download Google Docs, Sheets, and Slides use`files.export` (/workspace/drive/api/reference/rest/v2/files/export)instead. For more information, see Download & export files(/workspace/drive/api/guides/manage-downloads).
- fileId: The ID for the file in question.
func (*FilesService)Insert¶
func (r *FilesService) Insert(file *File) *FilesInsertCall
Insert: Inserts a new file. This method supports an */upload* URI andaccepts uploaded media with the following characteristics: - *Maximum filesize:* 5,120 GB - *Accepted Media MIME types:*`*/*` Note: Specify a validMIME type, rather than the literal `*/*` value. The literal `*/*` is onlyused to indicate that any valid MIME type can be uploaded. For moreinformation on uploading files, see Upload file data(/workspace/drive/api/guides/manage-uploads). Apps creating shortcuts with`files.insert` must specify the MIME type`application/vnd.google-apps.shortcut`. Apps should specify a file extensionin the `title` property when inserting files with the API. For example, anoperation to insert a JPEG file should specify something like "title":"cat.jpg" in the metadata. Subsequent `GET` requests include the read-only`fileExtension` property populated with the extension originally specifiedin the `title` property. When a Google Drive user requests to download afile, or when the file is downloaded through the sync client, Drive builds afull filename (with extension) based on the title. In cases where theextension is missing, Drive attempts to determine the extension based on thefile's MIME type.
func (*FilesService)List¶
func (r *FilesService) List() *FilesListCall
List: Lists the user's files. For more information, see Search for filesand folders (/workspace/drive/api/guides/search-files). This method acceptsthe `q` parameter, which is a search query combining one or more searchterms. This method returns *all* files by default, including trashed files.If you don't want trashed files to appear in the list, use the`trashed=false` query parameter to remove trashed files from the results.
func (*FilesService)ListLabels¶added inv0.88.0
func (r *FilesService) ListLabels(fileIdstring) *FilesListLabelsCall
ListLabels: Lists the labels on a file.
- fileId: The ID for the file.
func (*FilesService)ModifyLabels¶added inv0.88.0
func (r *FilesService) ModifyLabels(fileIdstring, modifylabelsrequest *ModifyLabelsRequest) *FilesModifyLabelsCall
ModifyLabels: Modifies the set of labels applied to a file. Returns a listof the labels that were added or modified.
- fileId: The ID of the file to which the labels belong.
func (*FilesService)Patch¶
func (r *FilesService) Patch(fileIdstring, file *File) *FilesPatchCall
Patch: Updates a file's metadata and/or content. When calling this method,only populate fields in the request that you want to modify. When updatingfields, some fields might change automatically, such as modifiedDate. Thismethod supports patch semantics.
- fileId: The ID of the file to update.
func (*FilesService)Touch¶
func (r *FilesService) Touch(fileIdstring) *FilesTouchCall
Touch: Set the file's updated time to the current server time.
- fileId: The ID of the file to update.
func (*FilesService)Trash¶
func (r *FilesService) Trash(fileIdstring) *FilesTrashCall
Trash: Moves a file to the trash. The currently authenticated user must ownthe file or be at least a `fileOrganizer` on the parent for shared drivefiles.
- fileId: The ID of the file to trash.
func (*FilesService)Untrash¶
func (r *FilesService) Untrash(fileIdstring) *FilesUntrashCall
Untrash: Restores a file from the trash. The currently authenticated usermust own the file or be at least a `fileOrganizer` on the parent for shareddrive files.
- fileId: The ID of the file to untrash.
func (*FilesService)Update¶
func (r *FilesService) Update(fileIdstring, file *File) *FilesUpdateCall
Update: Updates a file's metadata, content, or both. When calling thismethod, only populate fields in the request that you want to modify. Whenupdating fields, some fields might be changed automatically, such as`modifiedDate`. This method supports patch semantics. This method supportsan */upload* URI and accepts uploaded media with the followingcharacteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIMEtypes:* `*/*` (Specify a valid MIME type, rather than the literal `*/*`value. The literal `*/*` is only used to indicate that any valid MIME typecan be uploaded. For more information, see Google Workspace and Google Drivesupported MIME types (/workspace/drive/api/guides/mime-types).) For moreinformation on uploading files, see Upload file data(/workspace/drive/api/guides/manage-uploads).
- fileId: The ID of the file to update.
func (*FilesService)Watch¶
func (r *FilesService) Watch(fileIdstring, channel *Channel) *FilesWatchCall
Watch: Subscribes to changes to a file.
- fileId: The ID for the file in question.
typeFilesTouchCall¶
type FilesTouchCall struct {// contains filtered or unexported fields}func (*FilesTouchCall)Context¶
func (c *FilesTouchCall) Context(ctxcontext.Context) *FilesTouchCall
Context sets the context to be used in this call's Do method.
func (*FilesTouchCall)Do¶
func (c *FilesTouchCall) Do(opts ...googleapi.CallOption) (*File,error)
Do executes the "drive.files.touch" call.Any non-2xx status code is an error. Response headers are in either*File.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*FilesTouchCall)Fields¶
func (c *FilesTouchCall) Fields(s ...googleapi.Field) *FilesTouchCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FilesTouchCall)Header¶
func (c *FilesTouchCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*FilesTouchCall)IncludeLabels¶added inv0.88.0
func (c *FilesTouchCall) IncludeLabels(includeLabelsstring) *FilesTouchCall
IncludeLabels sets the optional parameter "includeLabels": A comma-separatedlist of IDs of labels to include in the `labelInfo` part of the response.
func (*FilesTouchCall)IncludePermissionsForView¶added inv0.31.0
func (c *FilesTouchCall) IncludePermissionsForView(includePermissionsForViewstring) *FilesTouchCall
IncludePermissionsForView sets the optional parameter"includePermissionsForView": Specifies which additional view's permissionsto include in the response. Only `published` is supported.
func (*FilesTouchCall)SupportsAllDrives¶added inv0.4.0
func (c *FilesTouchCall) SupportsAllDrives(supportsAllDrivesbool) *FilesTouchCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*FilesTouchCall)SupportsTeamDrives¶
func (c *FilesTouchCall) SupportsTeamDrives(supportsTeamDrivesbool) *FilesTouchCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
typeFilesTrashCall¶
type FilesTrashCall struct {// contains filtered or unexported fields}func (*FilesTrashCall)Context¶
func (c *FilesTrashCall) Context(ctxcontext.Context) *FilesTrashCall
Context sets the context to be used in this call's Do method.
func (*FilesTrashCall)Do¶
func (c *FilesTrashCall) Do(opts ...googleapi.CallOption) (*File,error)
Do executes the "drive.files.trash" call.Any non-2xx status code is an error. Response headers are in either*File.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*FilesTrashCall)Fields¶
func (c *FilesTrashCall) Fields(s ...googleapi.Field) *FilesTrashCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FilesTrashCall)Header¶
func (c *FilesTrashCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*FilesTrashCall)IncludeLabels¶added inv0.88.0
func (c *FilesTrashCall) IncludeLabels(includeLabelsstring) *FilesTrashCall
IncludeLabels sets the optional parameter "includeLabels": A comma-separatedlist of IDs of labels to include in the `labelInfo` part of the response.
func (*FilesTrashCall)IncludePermissionsForView¶added inv0.31.0
func (c *FilesTrashCall) IncludePermissionsForView(includePermissionsForViewstring) *FilesTrashCall
IncludePermissionsForView sets the optional parameter"includePermissionsForView": Specifies which additional view's permissionsto include in the response. Only `published` is supported.
func (*FilesTrashCall)SupportsAllDrives¶added inv0.4.0
func (c *FilesTrashCall) SupportsAllDrives(supportsAllDrivesbool) *FilesTrashCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*FilesTrashCall)SupportsTeamDrives¶
func (c *FilesTrashCall) SupportsTeamDrives(supportsTeamDrivesbool) *FilesTrashCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
typeFilesUntrashCall¶
type FilesUntrashCall struct {// contains filtered or unexported fields}func (*FilesUntrashCall)Context¶
func (c *FilesUntrashCall) Context(ctxcontext.Context) *FilesUntrashCall
Context sets the context to be used in this call's Do method.
func (*FilesUntrashCall)Do¶
func (c *FilesUntrashCall) Do(opts ...googleapi.CallOption) (*File,error)
Do executes the "drive.files.untrash" call.Any non-2xx status code is an error. Response headers are in either*File.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*FilesUntrashCall)Fields¶
func (c *FilesUntrashCall) Fields(s ...googleapi.Field) *FilesUntrashCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FilesUntrashCall)Header¶
func (c *FilesUntrashCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*FilesUntrashCall)IncludeLabels¶added inv0.88.0
func (c *FilesUntrashCall) IncludeLabels(includeLabelsstring) *FilesUntrashCall
IncludeLabels sets the optional parameter "includeLabels": A comma-separatedlist of IDs of labels to include in the `labelInfo` part of the response.
func (*FilesUntrashCall)IncludePermissionsForView¶added inv0.31.0
func (c *FilesUntrashCall) IncludePermissionsForView(includePermissionsForViewstring) *FilesUntrashCall
IncludePermissionsForView sets the optional parameter"includePermissionsForView": Specifies which additional view's permissionsto include in the response. Only `published` is supported.
func (*FilesUntrashCall)SupportsAllDrives¶added inv0.4.0
func (c *FilesUntrashCall) SupportsAllDrives(supportsAllDrivesbool) *FilesUntrashCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*FilesUntrashCall)SupportsTeamDrives¶
func (c *FilesUntrashCall) SupportsTeamDrives(supportsTeamDrivesbool) *FilesUntrashCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
typeFilesUpdateCall¶
type FilesUpdateCall struct {// contains filtered or unexported fields}func (*FilesUpdateCall)AddParents¶
func (c *FilesUpdateCall) AddParents(addParentsstring) *FilesUpdateCall
AddParents sets the optional parameter "addParents": Comma-separated list ofparent IDs to add.
func (*FilesUpdateCall)Context¶
func (c *FilesUpdateCall) Context(ctxcontext.Context) *FilesUpdateCall
Context sets the context to be used in this call's Do method.This context will supersede any context previously provided to theResumableMedia method.
func (*FilesUpdateCall)Convert¶
func (c *FilesUpdateCall) Convert(convertbool) *FilesUpdateCall
Convert sets the optional parameter "convert": Deprecated: This parameterhas no function.
func (*FilesUpdateCall)Do¶
func (c *FilesUpdateCall) Do(opts ...googleapi.CallOption) (*File,error)
Do executes the "drive.files.update" call.Any non-2xx status code is an error. Response headers are in either*File.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*FilesUpdateCall)EnforceSingleParent¶added inv0.21.0
func (c *FilesUpdateCall) EnforceSingleParent(enforceSingleParentbool) *FilesUpdateCall
EnforceSingleParent sets the optional parameter "enforceSingleParent":Deprecated: Adding files to multiple folders is no longer supported. Use`shortcuts` instead.
func (*FilesUpdateCall)Fields¶
func (c *FilesUpdateCall) Fields(s ...googleapi.Field) *FilesUpdateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FilesUpdateCall)Header¶
func (c *FilesUpdateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*FilesUpdateCall)IncludeLabels¶added inv0.88.0
func (c *FilesUpdateCall) IncludeLabels(includeLabelsstring) *FilesUpdateCall
IncludeLabels sets the optional parameter "includeLabels": A comma-separatedlist of IDs of labels to include in the `labelInfo` part of the response.
func (*FilesUpdateCall)IncludePermissionsForView¶added inv0.31.0
func (c *FilesUpdateCall) IncludePermissionsForView(includePermissionsForViewstring) *FilesUpdateCall
IncludePermissionsForView sets the optional parameter"includePermissionsForView": Specifies which additional view's permissionsto include in the response. Only `published` is supported.
func (*FilesUpdateCall)Media¶
func (c *FilesUpdateCall) Media(rio.Reader, options ...googleapi.MediaOption) *FilesUpdateCall
Media specifies the media to upload in one or more chunks. The chunk sizemay be controlled by supplying a MediaOption generated bygoogleapi.ChunkSize. The chunk size defaults togoogleapi.DefaultUploadChunkSize.The Content-Type header used in the uploadrequest will be determined by sniffing the contents of r, unless aMediaOption generated by googleapi.ContentType is supplied.At most one of Media and ResumableMedia may be set.
func (*FilesUpdateCall)ModifiedDateBehavior¶
func (c *FilesUpdateCall) ModifiedDateBehavior(modifiedDateBehaviorstring) *FilesUpdateCall
ModifiedDateBehavior sets the optional parameter "modifiedDateBehavior":Determines the behavior in which `modifiedDate` is updated. This overrides`setModifiedDate`.
Possible values:
"fromBody" - Set `modifiedDate` to the value provided in the body of the
request. No change if no value was provided.
"fromBodyIfNeeded" - Set `modifiedDate` to the value provided in the body
of the request depending on other contents of the update.
"fromBodyOrNow" - Set modifiedDate to the value provided in the body of
the request, or to the current time if no value was provided.
"noChange" - Maintain the previous value of `modifiedDate`."now" - Set `modifiedDate` to the current time."nowIfNeeded" - Set `modifiedDate` to the current time depending on
contents of the update.
func (*FilesUpdateCall)NewRevision¶
func (c *FilesUpdateCall) NewRevision(newRevisionbool) *FilesUpdateCall
NewRevision sets the optional parameter "newRevision": Whether a blob uploadshould create a new revision. If false, the blob data in the current headrevision is replaced. If true or not set, a new blob is created as headrevision, and previous unpinned revisions are preserved for a short periodof time. Pinned revisions are stored indefinitely, using additional storagequota, up to a maximum of 200 revisions. For details on how revisions areretained, see the Drive Help Center(https://support.google.com/drive/answer/2409045).
func (*FilesUpdateCall)Ocr¶
func (c *FilesUpdateCall) Ocr(ocrbool) *FilesUpdateCall
Ocr sets the optional parameter "ocr": Whether to attempt OCR on .jpg, .png,.gif, or .pdf uploads.
func (*FilesUpdateCall)OcrLanguage¶
func (c *FilesUpdateCall) OcrLanguage(ocrLanguagestring) *FilesUpdateCall
OcrLanguage sets the optional parameter "ocrLanguage": If ocr is true, hintsat the language to use. Valid values are BCP 47 codes.
func (*FilesUpdateCall)Pinned¶
func (c *FilesUpdateCall) Pinned(pinnedbool) *FilesUpdateCall
Pinned sets the optional parameter "pinned": Whether to pin the newrevision. A file can have a maximum of 200 pinned revisions.
func (*FilesUpdateCall)ProgressUpdater¶
func (c *FilesUpdateCall) ProgressUpdater(pugoogleapi.ProgressUpdater) *FilesUpdateCall
ProgressUpdater provides a callback function that will be called after everychunk. It should be a low-latency function in order to not slow down theupload operation. This should only be called when using ResumableMedia (asopposed to Media).
func (*FilesUpdateCall)RemoveParents¶
func (c *FilesUpdateCall) RemoveParents(removeParentsstring) *FilesUpdateCall
RemoveParents sets the optional parameter "removeParents": Comma-separatedlist of parent IDs to remove.
func (*FilesUpdateCall)ResumableMediadeprecated
func (c *FilesUpdateCall) ResumableMedia(ctxcontext.Context, rio.ReaderAt, sizeint64, mediaTypestring) *FilesUpdateCall
ResumableMedia specifies the media to upload in chunks and can be canceledwith ctx.
Deprecated: use Media instead.
At most one of Media and ResumableMedia may be set. mediaType identifies theMIME media type of the upload, such as "image/png". If mediaType is "", itwill be auto-detected. The provided ctx will supersede any contextpreviously provided to the Context method.
func (*FilesUpdateCall)SetModifiedDate¶
func (c *FilesUpdateCall) SetModifiedDate(setModifiedDatebool) *FilesUpdateCall
SetModifiedDate sets the optional parameter "setModifiedDate": Whether toset the modified date using the value supplied in the request body. Settingthis field to `true` is equivalent to `modifiedDateBehavior=fromBodyOrNow`,and `false` is equivalent to `modifiedDateBehavior=now`. To prevent anychanges to the modified date set `modifiedDateBehavior=noChange`.
func (*FilesUpdateCall)SupportsAllDrives¶added inv0.4.0
func (c *FilesUpdateCall) SupportsAllDrives(supportsAllDrivesbool) *FilesUpdateCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*FilesUpdateCall)SupportsTeamDrives¶
func (c *FilesUpdateCall) SupportsTeamDrives(supportsTeamDrivesbool) *FilesUpdateCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
func (*FilesUpdateCall)TimedTextLanguage¶
func (c *FilesUpdateCall) TimedTextLanguage(timedTextLanguagestring) *FilesUpdateCall
TimedTextLanguage sets the optional parameter "timedTextLanguage": Thelanguage of the timed text.
func (*FilesUpdateCall)TimedTextTrackName¶
func (c *FilesUpdateCall) TimedTextTrackName(timedTextTrackNamestring) *FilesUpdateCall
TimedTextTrackName sets the optional parameter "timedTextTrackName": Thetimed text track name.
func (*FilesUpdateCall)UpdateViewedDate¶
func (c *FilesUpdateCall) UpdateViewedDate(updateViewedDatebool) *FilesUpdateCall
UpdateViewedDate sets the optional parameter "updateViewedDate": Whether toupdate the view date after successfully updating the file.
func (*FilesUpdateCall)UseContentAsIndexableText¶
func (c *FilesUpdateCall) UseContentAsIndexableText(useContentAsIndexableTextbool) *FilesUpdateCall
UseContentAsIndexableText sets the optional parameter"useContentAsIndexableText": Whether to use the content as indexable text.
typeFilesWatchCall¶
type FilesWatchCall struct {// contains filtered or unexported fields}func (*FilesWatchCall)AcknowledgeAbuse¶
func (c *FilesWatchCall) AcknowledgeAbuse(acknowledgeAbusebool) *FilesWatchCall
AcknowledgeAbuse sets the optional parameter "acknowledgeAbuse": Whether theuser is acknowledging the risk of downloading known malware or other abusivefiles. This is only applicable when the `alt` parameter is set to `media`and the user is the owner of the file or an organizer of the shared drive inwhich the file resides.
func (*FilesWatchCall)Context¶
func (c *FilesWatchCall) Context(ctxcontext.Context) *FilesWatchCall
Context sets the context to be used in this call's Do method.
func (*FilesWatchCall)Do¶
func (c *FilesWatchCall) Do(opts ...googleapi.CallOption) (*Channel,error)
Do executes the "drive.files.watch" call.Any non-2xx status code is an error. Response headers are in either*Channel.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*FilesWatchCall)Fields¶
func (c *FilesWatchCall) Fields(s ...googleapi.Field) *FilesWatchCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*FilesWatchCall)Header¶
func (c *FilesWatchCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*FilesWatchCall)IncludeLabels¶added inv0.88.0
func (c *FilesWatchCall) IncludeLabels(includeLabelsstring) *FilesWatchCall
IncludeLabels sets the optional parameter "includeLabels": A comma-separatedlist of IDs of labels to include in the `labelInfo` part of the response.
func (*FilesWatchCall)IncludePermissionsForView¶added inv0.31.0
func (c *FilesWatchCall) IncludePermissionsForView(includePermissionsForViewstring) *FilesWatchCall
IncludePermissionsForView sets the optional parameter"includePermissionsForView": Specifies which additional view's permissionsto include in the response. Only `published` is supported.
func (*FilesWatchCall)Projection¶
func (c *FilesWatchCall) Projection(projectionstring) *FilesWatchCall
Projection sets the optional parameter "projection": Deprecated: Thisparameter has no function.
Possible values:
"BASIC" - Deprecated."FULL" - Deprecated.
func (*FilesWatchCall)RevisionId¶
func (c *FilesWatchCall) RevisionId(revisionIdstring) *FilesWatchCall
RevisionId sets the optional parameter "revisionId": Specifies the RevisionID that should be downloaded. Ignored unless alt=media is specified.
func (*FilesWatchCall)SupportsAllDrives¶added inv0.4.0
func (c *FilesWatchCall) SupportsAllDrives(supportsAllDrivesbool) *FilesWatchCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*FilesWatchCall)SupportsTeamDrives¶
func (c *FilesWatchCall) SupportsTeamDrives(supportsTeamDrivesbool) *FilesWatchCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
func (*FilesWatchCall)UpdateViewedDate¶
func (c *FilesWatchCall) UpdateViewedDate(updateViewedDatebool) *FilesWatchCall
UpdateViewedDate sets the optional parameter "updateViewedDate": Deprecated:Use files.update with modifiedDateBehavior=noChange, updateViewedDate=trueand an empty request body.
typeGeneratedIds¶
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`Kindstring `json:"kind,omitempty"`// Space: The type of file that can be created with these IDs.Spacestring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GeneratedIds: A list of generated IDs which can be provided in insertrequests
func (GeneratedIds)MarshalJSON¶
func (sGeneratedIds) MarshalJSON() ([]byte,error)
typeLabel¶added inv0.88.0
type Label struct {// Fields: A map of the fields on the label, keyed by the field's ID.Fields map[string]LabelField `json:"fields,omitempty"`// Id: The ID of the label.Idstring `json:"id,omitempty"`// Kind: This is always `drive#label`Kindstring `json:"kind,omitempty"`// RevisionId: The revision ID of the label.RevisionIdstring `json:"revisionId,omitempty"`// ForceSendFields is a list of field names (e.g. "Fields") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Fields") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Label: Representation of a label and label fields.
func (Label)MarshalJSON¶added inv0.88.0
typeLabelField¶added inv0.88.0
type LabelField struct {// DateString: Only present if valueType is dateString.RFC 3339 formatted// date: YYYY-MM-DD.DateString []string `json:"dateString,omitempty"`// Id: The identifier of this label field.Idstring `json:"id,omitempty"`// Integer: Only present if `valueType` is `integer`.Integergoogleapi.Int64s `json:"integer,omitempty"`// Kind: This is always `drive#labelField`.Kindstring `json:"kind,omitempty"`// Selection: Only present if `valueType` is `selection`Selection []string `json:"selection,omitempty"`// Text: Only present if `valueType` is `text`.Text []string `json:"text,omitempty"`// User: Only present if `valueType` is `user`.User []*User `json:"user,omitempty"`// ValueType: The field type. While new values may be supported in the future,// the following are currently allowed: * `dateString` * `integer` *// `selection` * `text` * `user`ValueTypestring `json:"valueType,omitempty"`// ForceSendFields is a list of field names (e.g. "DateString") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DateString") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}LabelField: Representation of field, which is a typed key-value pair.
func (LabelField)MarshalJSON¶added inv0.88.0
func (sLabelField) MarshalJSON() ([]byte,error)
typeLabelFieldModification¶added inv0.88.0
type LabelFieldModification struct {// FieldId: The ID of the field to be modified.FieldIdstring `json:"fieldId,omitempty"`// Kind: This is always `drive#labelFieldModification`.Kindstring `json:"kind,omitempty"`// SetDateValues: Replaces the value of a dateString Field with these new// values. The string must be in theRFC 3339 full-date format: YYYY-MM-DD.SetDateValues []string `json:"setDateValues,omitempty"`// SetIntegerValues: Replaces the value of an `integer` field with these new// values.SetIntegerValuesgoogleapi.Int64s `json:"setIntegerValues,omitempty"`// SetSelectionValues: Replaces a `selection` field with these new values.SetSelectionValues []string `json:"setSelectionValues,omitempty"`// SetTextValues: Sets the value of a `text` field.SetTextValues []string `json:"setTextValues,omitempty"`// SetUserValues: Replaces a `user` field with these new values. The values// must be valid email addresses.SetUserValues []string `json:"setUserValues,omitempty"`// UnsetValues: Unsets the values for this field.UnsetValuesbool `json:"unsetValues,omitempty"`// ForceSendFields is a list of field names (e.g. "FieldId") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "FieldId") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}LabelFieldModification: A modification to a label's field.
func (LabelFieldModification)MarshalJSON¶added inv0.88.0
func (sLabelFieldModification) MarshalJSON() ([]byte,error)
typeLabelList¶added inv0.88.0
type LabelList struct {// Items: The list of labels.Items []*Label `json:"items,omitempty"`// Kind: This is always `drive#labelList`Kindstring `json:"kind,omitempty"`// NextPageToken: The page token for the next page of labels. This field will// be absent if the end of the 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.NextPageTokenstring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}LabelList: A list of labels applied to a file.
func (LabelList)MarshalJSON¶added inv0.88.0
typeLabelModification¶added inv0.88.0
type LabelModification struct {// FieldModifications: The list of modifications to this label's fields.FieldModifications []*LabelFieldModification `json:"fieldModifications,omitempty"`// Kind: This is always `drive#labelModification`.Kindstring `json:"kind,omitempty"`// LabelId: The ID of the label to modify.LabelIdstring `json:"labelId,omitempty"`// RemoveLabel: If true, the label will be removed from the file.RemoveLabelbool `json:"removeLabel,omitempty"`// ForceSendFields is a list of field names (e.g. "FieldModifications") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "FieldModifications") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}LabelModification: A modification to a label on a file. A LabelModificationcan be used to apply a label to a file, update an existing label on a file,or remove a label from a file.
func (LabelModification)MarshalJSON¶added inv0.88.0
func (sLabelModification) MarshalJSON() ([]byte,error)
typeModifyLabelsRequest¶added inv0.88.0
type ModifyLabelsRequest struct {// Kind: This is always `drive#modifyLabelsRequest`.Kindstring `json:"kind,omitempty"`// LabelModifications: The list of modifications to apply to the labels on the// file.LabelModifications []*LabelModification `json:"labelModifications,omitempty"`// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ModifyLabelsRequest: A request to modify the set of labels on a file. Thisrequest may contain many modifications that will either all succeed or allfail atomically.
func (ModifyLabelsRequest)MarshalJSON¶added inv0.88.0
func (sModifyLabelsRequest) MarshalJSON() ([]byte,error)
typeModifyLabelsResponse¶added inv0.88.0
type ModifyLabelsResponse struct {// Kind: This is always `drive#modifyLabelsResponse`Kindstring `json:"kind,omitempty"`// ModifiedLabels: The list of labels which were added or updated by the// request.ModifiedLabels []*Label `json:"modifiedLabels,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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ModifyLabelsResponse: Response to a ModifyLabels request. This contains onlythose labels which were added or updated by the request.
func (ModifyLabelsResponse)MarshalJSON¶added inv0.88.0
func (sModifyLabelsResponse) MarshalJSON() ([]byte,error)
typeParentList¶
type ParentList struct {// Etag: The ETag of the list.Etagstring `json:"etag,omitempty"`// Items: The list of parents.Items []*ParentReference `json:"items,omitempty"`// Kind: This is always `drive#parentList`.Kindstring `json:"kind,omitempty"`// SelfLink: A link back to this list.SelfLinkstring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ParentList: A list of a file's parents.
func (ParentList)MarshalJSON¶
func (sParentList) MarshalJSON() ([]byte,error)
typeParentReference¶
type ParentReference struct {// Id: The ID of the parent.Idstring `json:"id,omitempty"`// IsRoot: Output only. Whether or not the parent is the root folder.IsRootbool `json:"isRoot,omitempty"`// Kind: Output only. This is always `drive#parentReference`.Kindstring `json:"kind,omitempty"`// ParentLink: Output only. A link to the parent.ParentLinkstring `json:"parentLink,omitempty"`// SelfLink: Output only. A link back to this reference.SelfLinkstring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ParentReference: A reference to a file's parent. A file can only have oneparent folder; specifying multiple parents isn't supported. Some resourcemethods (such as `parents.get`) require a `parentId`. Use the `parents.list`method to retrieve the ID for a parent.
func (ParentReference)MarshalJSON¶
func (sParentReference) MarshalJSON() ([]byte,error)
typeParentsDeleteCall¶
type ParentsDeleteCall struct {// contains filtered or unexported fields}func (*ParentsDeleteCall)Context¶
func (c *ParentsDeleteCall) Context(ctxcontext.Context) *ParentsDeleteCall
Context sets the context to be used in this call's Do method.
func (*ParentsDeleteCall)Do¶
func (c *ParentsDeleteCall) Do(opts ...googleapi.CallOption)error
Do executes the "drive.parents.delete" call.
func (*ParentsDeleteCall)EnforceSingleParent¶added inv0.21.0
func (c *ParentsDeleteCall) EnforceSingleParent(enforceSingleParentbool) *ParentsDeleteCall
EnforceSingleParent sets the optional parameter "enforceSingleParent":Deprecated: If an item is not in a shared drive and its last parent isremoved, the item is placed under its owner's root.
func (*ParentsDeleteCall)Fields¶
func (c *ParentsDeleteCall) Fields(s ...googleapi.Field) *ParentsDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ParentsDeleteCall)Header¶
func (c *ParentsDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeParentsGetCall¶
type ParentsGetCall struct {// contains filtered or unexported fields}func (*ParentsGetCall)Context¶
func (c *ParentsGetCall) Context(ctxcontext.Context) *ParentsGetCall
Context sets the context to be used in this call's Do method.
func (*ParentsGetCall)Do¶
func (c *ParentsGetCall) Do(opts ...googleapi.CallOption) (*ParentReference,error)
Do executes the "drive.parents.get" call.Any non-2xx status code is an error. Response headers are in either*ParentReference.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ParentsGetCall)Fields¶
func (c *ParentsGetCall) Fields(s ...googleapi.Field) *ParentsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ParentsGetCall)Header¶
func (c *ParentsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ParentsGetCall)IfNoneMatch¶
func (c *ParentsGetCall) IfNoneMatch(entityTagstring) *ParentsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeParentsInsertCall¶
type ParentsInsertCall struct {// contains filtered or unexported fields}func (*ParentsInsertCall)Context¶
func (c *ParentsInsertCall) Context(ctxcontext.Context) *ParentsInsertCall
Context sets the context to be used in this call's Do method.
func (*ParentsInsertCall)Do¶
func (c *ParentsInsertCall) Do(opts ...googleapi.CallOption) (*ParentReference,error)
Do executes the "drive.parents.insert" call.Any non-2xx status code is an error. Response headers are in either*ParentReference.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ParentsInsertCall)EnforceSingleParent¶added inv0.21.0
func (c *ParentsInsertCall) EnforceSingleParent(enforceSingleParentbool) *ParentsInsertCall
EnforceSingleParent sets the optional parameter "enforceSingleParent":Deprecated: Adding files to multiple folders is no longer supported. Use`shortcuts` instead.
func (*ParentsInsertCall)Fields¶
func (c *ParentsInsertCall) Fields(s ...googleapi.Field) *ParentsInsertCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ParentsInsertCall)Header¶
func (c *ParentsInsertCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ParentsInsertCall)SupportsAllDrives¶added inv0.4.0
func (c *ParentsInsertCall) SupportsAllDrives(supportsAllDrivesbool) *ParentsInsertCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*ParentsInsertCall)SupportsTeamDrives¶
func (c *ParentsInsertCall) SupportsTeamDrives(supportsTeamDrivesbool) *ParentsInsertCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
typeParentsListCall¶
type ParentsListCall struct {// contains filtered or unexported fields}func (*ParentsListCall)Context¶
func (c *ParentsListCall) Context(ctxcontext.Context) *ParentsListCall
Context sets the context to be used in this call's Do method.
func (*ParentsListCall)Do¶
func (c *ParentsListCall) Do(opts ...googleapi.CallOption) (*ParentList,error)
Do executes the "drive.parents.list" call.Any non-2xx status code is an error. Response headers are in either*ParentList.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ParentsListCall)Fields¶
func (c *ParentsListCall) Fields(s ...googleapi.Field) *ParentsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ParentsListCall)Header¶
func (c *ParentsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ParentsListCall)IfNoneMatch¶
func (c *ParentsListCall) IfNoneMatch(entityTagstring) *ParentsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeParentsService¶
type ParentsService struct {// contains filtered or unexported fields}funcNewParentsService¶
func NewParentsService(s *Service) *ParentsService
func (*ParentsService)Delete¶
func (r *ParentsService) Delete(fileIdstring, parentIdstring) *ParentsDeleteCall
Delete: Removes a parent from a file.
- fileId: The ID of the file.- parentId: The ID of the parent.
func (*ParentsService)Get¶
func (r *ParentsService) Get(fileIdstring, parentIdstring) *ParentsGetCall
Get: Gets a specific parent reference.
- fileId: The ID of the file.- parentId: The ID of the parent.
func (*ParentsService)Insert¶
func (r *ParentsService) Insert(fileIdstring, parentreference *ParentReference) *ParentsInsertCall
Insert: Adds a parent folder for a file.
- fileId: The ID of the file.
func (*ParentsService)List¶
func (r *ParentsService) List(fileIdstring) *ParentsListCall
List: Lists a file's parents.
- fileId: The ID of the file.
typePermission¶
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: Output only. Deprecated.AuthKeystring `json:"authKey,omitempty"`// Deleted: Output only. Whether the account associated with this permission// has been deleted. This field only pertains to user and group permissions.Deletedbool `json:"deleted,omitempty"`// Domain: Output only. 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`.Domainstring `json:"domain,omitempty"`// EmailAddress: Output only. 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`.EmailAddressstring `json:"emailAddress,omitempty"`// Etag: Output only. The ETag of the permission.Etagstring `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 requestsExpirationDatestring `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.Idstring `json:"id,omitempty"`// InheritedPermissionsDisabled: When true, only organizers, owners, and users// with permissions added directly on the item can access it.InheritedPermissionsDisabledbool `json:"inheritedPermissionsDisabled,omitempty"`// Kind: Output only. This is always `drive#permission`.Kindstring `json:"kind,omitempty"`// Name: Output only. The name for this permission.Namestring `json:"name,omitempty"`// PendingOwner: Whether the account associated with this permission is a// pending owner. Only populated for `user` type permissions for files that are// not in a shared drive.PendingOwnerbool `json:"pendingOwner,omitempty"`// PermissionDetails: Output only. Details of whether the permissions on this// item are inherited or directly on this item.PermissionDetails []*PermissionPermissionDetails `json:"permissionDetails,omitempty"`// PhotoLink: Output only. A link to the profile photo, if available.PhotoLinkstring `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`Rolestring `json:"role,omitempty"`// SelfLink: Output only. A link back to this permission.SelfLinkstring `json:"selfLink,omitempty"`// TeamDrivePermissionDetails: Output only. Deprecated: Use `permissionDetails`// instead.TeamDrivePermissionDetails []*PermissionTeamDrivePermissionDetails `json:"teamDrivePermissionDetails,omitempty"`// Type: The account type. Allowed values are: * `user` * `group` * `domain` *// `anyone`Typestring `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.Valuestring `json:"value,omitempty"`// View: Indicates the view for this permission. Only populated for permissions// that belong to a view. published and metadata are the only supported values.// - published: The permission's role is published_reader. - metadata: The item// is only visible to the metadata view because the item has limited access and// the scope has at least read access to the parent. Note: The metadata view is// currently only supported on folders.Viewstring `json:"view,omitempty"`// WithLink: Whether the link is required for this permission.WithLinkbool `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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Permission: A permission for a file. A permission grants a user, group,domain, or the world access to a file or a folder hierarchy. Some resourcemethods (such as `permissions.update`) require a `permissionId`. Use the`permissions.list` method to retrieve the ID for a file, folder, or shareddrive.
func (Permission)MarshalJSON¶
func (sPermission) MarshalJSON() ([]byte,error)
typePermissionId¶
type PermissionId struct {// Id: The permission ID.Idstring `json:"id,omitempty"`// Kind: This is always `drive#permissionId`.Kindstring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}PermissionId: An ID for a user or group as seen in Permission items.
func (PermissionId)MarshalJSON¶
func (sPermissionId) MarshalJSON() ([]byte,error)
typePermissionList¶
type PermissionList struct {// Etag: The ETag of the list.Etagstring `json:"etag,omitempty"`// Items: The list of permissions.Items []*Permission `json:"items,omitempty"`// Kind: This is always `drive#permissionList`.Kindstring `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.NextPageTokenstring `json:"nextPageToken,omitempty"`// SelfLink: A link back to this list.SelfLinkstring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}PermissionList: A list of permissions associated with a file.
func (PermissionList)MarshalJSON¶
func (sPermissionList) MarshalJSON() ([]byte,error)
typePermissionPermissionDetails¶added inv0.4.0
type PermissionPermissionDetails struct {// AdditionalRoles: Output only. Additional roles for this user. Only// `commenter` is currently possible, though more may be supported in the// future.AdditionalRoles []string `json:"additionalRoles,omitempty"`// Inherited: Output only. Whether this permission is inherited. This field is// always populated.Inheritedbool `json:"inherited,omitempty"`// InheritedFrom: Output only. The ID of the item from which this permission is// inherited. This is only populated for items in shared drives.InheritedFromstring `json:"inheritedFrom,omitempty"`// PermissionType: Output only. The permission type for this user. While new// values may be added in future, the following are currently possible: *// `file` * `member`PermissionTypestring `json:"permissionType,omitempty"`// Role: Output only. The primary role for this user. While new values may be// added in the future, the following are currently possible: * `organizer` *// `fileOrganizer` * `writer` * `reader`Rolestring `json:"role,omitempty"`// ForceSendFields is a list of field names (e.g. "AdditionalRoles") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}func (PermissionPermissionDetails)MarshalJSON¶added inv0.4.0
func (sPermissionPermissionDetails) MarshalJSON() ([]byte,error)
typePermissionTeamDrivePermissionDetails¶
type PermissionTeamDrivePermissionDetails struct {// AdditionalRoles: Output only. Deprecated: Use// `permissionDetails/additionalRoles` instead.AdditionalRoles []string `json:"additionalRoles,omitempty"`// Inherited: Output only. Deprecated: Use `permissionDetails/inherited`// instead.Inheritedbool `json:"inherited,omitempty"`// InheritedFrom: Output only. Deprecated: Use// `permissionDetails/inheritedFrom` instead.InheritedFromstring `json:"inheritedFrom,omitempty"`// Role: Output only. Deprecated: Use `permissionDetails/role` instead.Rolestring `json:"role,omitempty"`// TeamDrivePermissionType: Output only. Deprecated: Use// `permissionDetails/permissionType` instead.TeamDrivePermissionTypestring `json:"teamDrivePermissionType,omitempty"`// ForceSendFields is a list of field names (e.g. "AdditionalRoles") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}func (PermissionTeamDrivePermissionDetails)MarshalJSON¶
func (sPermissionTeamDrivePermissionDetails) MarshalJSON() ([]byte,error)
typePermissionsDeleteCall¶
type PermissionsDeleteCall struct {// contains filtered or unexported fields}func (*PermissionsDeleteCall)Context¶
func (c *PermissionsDeleteCall) Context(ctxcontext.Context) *PermissionsDeleteCall
Context sets the context to be used in this call's Do method.
func (*PermissionsDeleteCall)Do¶
func (c *PermissionsDeleteCall) Do(opts ...googleapi.CallOption)error
Do executes the "drive.permissions.delete" call.
func (*PermissionsDeleteCall)EnforceExpansiveAccess¶added inv0.223.0
func (c *PermissionsDeleteCall) EnforceExpansiveAccess(enforceExpansiveAccessbool) *PermissionsDeleteCall
EnforceExpansiveAccess sets the optional parameter "enforceExpansiveAccess":Whether the request should enforce expansive access rules.
func (*PermissionsDeleteCall)Fields¶
func (c *PermissionsDeleteCall) Fields(s ...googleapi.Field) *PermissionsDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*PermissionsDeleteCall)Header¶
func (c *PermissionsDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*PermissionsDeleteCall)SupportsAllDrives¶added inv0.4.0
func (c *PermissionsDeleteCall) SupportsAllDrives(supportsAllDrivesbool) *PermissionsDeleteCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*PermissionsDeleteCall)SupportsTeamDrives¶
func (c *PermissionsDeleteCall) SupportsTeamDrives(supportsTeamDrivesbool) *PermissionsDeleteCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
func (*PermissionsDeleteCall)UseDomainAdminAccess¶
func (c *PermissionsDeleteCall) UseDomainAdminAccess(useDomainAdminAccessbool) *PermissionsDeleteCall
UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":Issue the request as a domain administrator; if set to true, then therequester will be granted access if the file ID parameter refers to a shareddrive and the requester is an administrator of the domain to which theshared drive belongs.
typePermissionsGetCall¶
type PermissionsGetCall struct {// contains filtered or unexported fields}func (*PermissionsGetCall)Context¶
func (c *PermissionsGetCall) Context(ctxcontext.Context) *PermissionsGetCall
Context sets the context to be used in this call's Do method.
func (*PermissionsGetCall)Do¶
func (c *PermissionsGetCall) Do(opts ...googleapi.CallOption) (*Permission,error)
Do executes the "drive.permissions.get" call.Any non-2xx status code is an error. Response headers are in either*Permission.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*PermissionsGetCall)Fields¶
func (c *PermissionsGetCall) Fields(s ...googleapi.Field) *PermissionsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*PermissionsGetCall)Header¶
func (c *PermissionsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*PermissionsGetCall)IfNoneMatch¶
func (c *PermissionsGetCall) IfNoneMatch(entityTagstring) *PermissionsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*PermissionsGetCall)SupportsAllDrives¶added inv0.4.0
func (c *PermissionsGetCall) SupportsAllDrives(supportsAllDrivesbool) *PermissionsGetCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*PermissionsGetCall)SupportsTeamDrives¶
func (c *PermissionsGetCall) SupportsTeamDrives(supportsTeamDrivesbool) *PermissionsGetCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
func (*PermissionsGetCall)UseDomainAdminAccess¶
func (c *PermissionsGetCall) UseDomainAdminAccess(useDomainAdminAccessbool) *PermissionsGetCall
UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":Issue the request as a domain administrator; if set to true, then therequester will be granted access if the file ID parameter refers to a shareddrive and the requester is an administrator of the domain to which theshared drive belongs.
typePermissionsGetIdForEmailCall¶
type PermissionsGetIdForEmailCall struct {// contains filtered or unexported fields}func (*PermissionsGetIdForEmailCall)Context¶
func (c *PermissionsGetIdForEmailCall) Context(ctxcontext.Context) *PermissionsGetIdForEmailCall
Context sets the context to be used in this call's Do method.
func (*PermissionsGetIdForEmailCall)Do¶
func (c *PermissionsGetIdForEmailCall) Do(opts ...googleapi.CallOption) (*PermissionId,error)
Do executes the "drive.permissions.getIdForEmail" call.Any non-2xx status code is an error. Response headers are in either*PermissionId.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*PermissionsGetIdForEmailCall)Fields¶
func (c *PermissionsGetIdForEmailCall) Fields(s ...googleapi.Field) *PermissionsGetIdForEmailCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*PermissionsGetIdForEmailCall)Header¶
func (c *PermissionsGetIdForEmailCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*PermissionsGetIdForEmailCall)IfNoneMatch¶
func (c *PermissionsGetIdForEmailCall) IfNoneMatch(entityTagstring) *PermissionsGetIdForEmailCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typePermissionsInsertCall¶
type PermissionsInsertCall struct {// contains filtered or unexported fields}func (*PermissionsInsertCall)Context¶
func (c *PermissionsInsertCall) Context(ctxcontext.Context) *PermissionsInsertCall
Context sets the context to be used in this call's Do method.
func (*PermissionsInsertCall)Do¶
func (c *PermissionsInsertCall) Do(opts ...googleapi.CallOption) (*Permission,error)
Do executes the "drive.permissions.insert" call.Any non-2xx status code is an error. Response headers are in either*Permission.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*PermissionsInsertCall)EmailMessage¶
func (c *PermissionsInsertCall) EmailMessage(emailMessagestring) *PermissionsInsertCall
EmailMessage sets the optional parameter "emailMessage": A plain text custommessage to include in notification emails.
func (*PermissionsInsertCall)EnforceExpansiveAccess¶added inv0.233.0
func (c *PermissionsInsertCall) EnforceExpansiveAccess(enforceExpansiveAccessbool) *PermissionsInsertCall
EnforceExpansiveAccess sets the optional parameter "enforceExpansiveAccess":Whether the request should enforce expansive access rules.
func (*PermissionsInsertCall)EnforceSingleParent¶added inv0.21.0
func (c *PermissionsInsertCall) EnforceSingleParent(enforceSingleParentbool) *PermissionsInsertCall
EnforceSingleParent sets the optional parameter "enforceSingleParent":Deprecated: See `moveToNewOwnersRoot` for details.
func (*PermissionsInsertCall)Fields¶
func (c *PermissionsInsertCall) Fields(s ...googleapi.Field) *PermissionsInsertCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*PermissionsInsertCall)Header¶
func (c *PermissionsInsertCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*PermissionsInsertCall)MoveToNewOwnersRoot¶added inv0.21.0
func (c *PermissionsInsertCall) MoveToNewOwnersRoot(moveToNewOwnersRootbool) *PermissionsInsertCall
MoveToNewOwnersRoot sets the optional parameter "moveToNewOwnersRoot": Thisparameter will only take effect if the item is not in a shared drive and therequest is attempting to transfer the ownership of the item. If set to`true`, the item will be moved to the new owner's My Drive root folder andall prior parents removed. If set to `false`, parents are not changed.
func (*PermissionsInsertCall)SendNotificationEmails¶
func (c *PermissionsInsertCall) SendNotificationEmails(sendNotificationEmailsbool) *PermissionsInsertCall
SendNotificationEmails sets the optional parameter "sendNotificationEmails":Whether to send notification emails when sharing to users or groups. Thisparameter is ignored and an email is sent if the `role` is `owner`.
func (*PermissionsInsertCall)SupportsAllDrives¶added inv0.4.0
func (c *PermissionsInsertCall) SupportsAllDrives(supportsAllDrivesbool) *PermissionsInsertCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*PermissionsInsertCall)SupportsTeamDrives¶
func (c *PermissionsInsertCall) SupportsTeamDrives(supportsTeamDrivesbool) *PermissionsInsertCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
func (*PermissionsInsertCall)UseDomainAdminAccess¶
func (c *PermissionsInsertCall) UseDomainAdminAccess(useDomainAdminAccessbool) *PermissionsInsertCall
UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":Issue the request as a domain administrator; if set to true, then therequester will be granted access if the file ID parameter refers to a shareddrive and the requester is an administrator of the domain to which theshared drive belongs.
typePermissionsListCall¶
type PermissionsListCall struct {// contains filtered or unexported fields}func (*PermissionsListCall)Context¶
func (c *PermissionsListCall) Context(ctxcontext.Context) *PermissionsListCall
Context sets the context to be used in this call's Do method.
func (*PermissionsListCall)Do¶
func (c *PermissionsListCall) Do(opts ...googleapi.CallOption) (*PermissionList,error)
Do executes the "drive.permissions.list" call.Any non-2xx status code is an error. Response headers are in either*PermissionList.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*PermissionsListCall)Fields¶
func (c *PermissionsListCall) Fields(s ...googleapi.Field) *PermissionsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*PermissionsListCall)Header¶
func (c *PermissionsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*PermissionsListCall)IfNoneMatch¶
func (c *PermissionsListCall) IfNoneMatch(entityTagstring) *PermissionsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*PermissionsListCall)IncludePermissionsForView¶added inv0.31.0
func (c *PermissionsListCall) IncludePermissionsForView(includePermissionsForViewstring) *PermissionsListCall
IncludePermissionsForView sets the optional parameter"includePermissionsForView": Specifies which additional view's permissionsto include in the response. Only `published` is supported.
func (*PermissionsListCall)MaxResults¶
func (c *PermissionsListCall) MaxResults(maxResultsint64) *PermissionsListCall
MaxResults sets the optional parameter "maxResults": The maximum number ofpermissions to return per page. When not set for files in a shared drive, atmost 100 results will be returned. When not set for files that are not in ashared drive, the entire list will be returned.
func (*PermissionsListCall)PageToken¶
func (c *PermissionsListCall) PageToken(pageTokenstring) *PermissionsListCall
PageToken sets the optional parameter "pageToken": The token for continuinga previous list request on the next page. This should be set to the value of`nextPageToken` from the previous response.
func (*PermissionsListCall)Pages¶
func (c *PermissionsListCall) Pages(ctxcontext.Context, f func(*PermissionList)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
func (*PermissionsListCall)SupportsAllDrives¶added inv0.4.0
func (c *PermissionsListCall) SupportsAllDrives(supportsAllDrivesbool) *PermissionsListCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*PermissionsListCall)SupportsTeamDrives¶
func (c *PermissionsListCall) SupportsTeamDrives(supportsTeamDrivesbool) *PermissionsListCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
func (*PermissionsListCall)UseDomainAdminAccess¶
func (c *PermissionsListCall) UseDomainAdminAccess(useDomainAdminAccessbool) *PermissionsListCall
UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":Issue the request as a domain administrator; if set to true, then therequester will be granted access if the file ID parameter refers to a shareddrive and the requester is an administrator of the domain to which theshared drive belongs.
typePermissionsPatchCall¶
type PermissionsPatchCall struct {// contains filtered or unexported fields}func (*PermissionsPatchCall)Context¶
func (c *PermissionsPatchCall) Context(ctxcontext.Context) *PermissionsPatchCall
Context sets the context to be used in this call's Do method.
func (*PermissionsPatchCall)Do¶
func (c *PermissionsPatchCall) Do(opts ...googleapi.CallOption) (*Permission,error)
Do executes the "drive.permissions.patch" call.Any non-2xx status code is an error. Response headers are in either*Permission.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*PermissionsPatchCall)EnforceExpansiveAccess¶added inv0.223.0
func (c *PermissionsPatchCall) EnforceExpansiveAccess(enforceExpansiveAccessbool) *PermissionsPatchCall
EnforceExpansiveAccess sets the optional parameter "enforceExpansiveAccess":Whether the request should enforce expansive access rules.
func (*PermissionsPatchCall)Fields¶
func (c *PermissionsPatchCall) Fields(s ...googleapi.Field) *PermissionsPatchCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*PermissionsPatchCall)Header¶
func (c *PermissionsPatchCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*PermissionsPatchCall)RemoveExpiration¶
func (c *PermissionsPatchCall) RemoveExpiration(removeExpirationbool) *PermissionsPatchCall
RemoveExpiration sets the optional parameter "removeExpiration": Whether toremove the expiration date.
func (*PermissionsPatchCall)SupportsAllDrives¶added inv0.4.0
func (c *PermissionsPatchCall) SupportsAllDrives(supportsAllDrivesbool) *PermissionsPatchCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*PermissionsPatchCall)SupportsTeamDrives¶
func (c *PermissionsPatchCall) SupportsTeamDrives(supportsTeamDrivesbool) *PermissionsPatchCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
func (*PermissionsPatchCall)TransferOwnership¶
func (c *PermissionsPatchCall) TransferOwnership(transferOwnershipbool) *PermissionsPatchCall
TransferOwnership sets the optional parameter "transferOwnership": Whetherchanging a role to `owner` downgrades the current owners to writers. Doesnothing if the specified role is not `owner`.
func (*PermissionsPatchCall)UseDomainAdminAccess¶
func (c *PermissionsPatchCall) UseDomainAdminAccess(useDomainAdminAccessbool) *PermissionsPatchCall
UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":Issue the request as a domain administrator; if set to true, then therequester will be granted access if the file ID parameter refers to a shareddrive and the requester is an administrator of the domain to which theshared drive belongs.
typePermissionsService¶
type PermissionsService struct {// contains filtered or unexported fields}funcNewPermissionsService¶
func NewPermissionsService(s *Service) *PermissionsService
func (*PermissionsService)Delete¶
func (r *PermissionsService) Delete(fileIdstring, permissionIdstring) *PermissionsDeleteCall
Delete: Deletes a permission from a file or shared drive. **Warning:**Concurrent permissions operations on the same file are not supported; onlythe last update is applied.
- fileId: The ID for the file or shared drive.- permissionId: The ID for the permission.
func (*PermissionsService)Get¶
func (r *PermissionsService) Get(fileIdstring, permissionIdstring) *PermissionsGetCall
Get: Gets a permission by ID.
- fileId: The ID for the file or shared drive.- permissionId: The ID for the permission.
func (*PermissionsService)GetIdForEmail¶
func (r *PermissionsService) GetIdForEmail(emailstring) *PermissionsGetIdForEmailCall
GetIdForEmail: Returns the permission ID for an email address.
- email: The email address for which to return a permission ID.
func (*PermissionsService)Insert¶
func (r *PermissionsService) Insert(fileIdstring, permission *Permission) *PermissionsInsertCall
Insert: Inserts a permission for a file or shared drive. **Warning:**Concurrent permissions operations on the same file are not supported; onlythe last update is applied.
- fileId: The ID for the file or shared drive.
func (*PermissionsService)List¶
func (r *PermissionsService) List(fileIdstring) *PermissionsListCall
List: Lists a file's or shared drive's permissions.
- fileId: The ID for the file or shared drive.
func (*PermissionsService)Patch¶
func (r *PermissionsService) Patch(fileIdstring, permissionIdstring, permission *Permission) *PermissionsPatchCall
Patch: Updates a permission using patch semantics. **Warning:** Concurrentpermissions operations on the same file are not supported; only the lastupdate is applied.
- fileId: The ID for the file or shared drive.- permissionId: The ID for the permission.
func (*PermissionsService)Update¶
func (r *PermissionsService) Update(fileIdstring, permissionIdstring, permission *Permission) *PermissionsUpdateCall
Update: Updates a permission. **Warning:** Concurrent permissions operationson the same file are not supported; only the last update is applied.
- fileId: The ID for the file or shared drive.- permissionId: The ID for the permission.
typePermissionsUpdateCall¶
type PermissionsUpdateCall struct {// contains filtered or unexported fields}func (*PermissionsUpdateCall)Context¶
func (c *PermissionsUpdateCall) Context(ctxcontext.Context) *PermissionsUpdateCall
Context sets the context to be used in this call's Do method.
func (*PermissionsUpdateCall)Do¶
func (c *PermissionsUpdateCall) Do(opts ...googleapi.CallOption) (*Permission,error)
Do executes the "drive.permissions.update" call.Any non-2xx status code is an error. Response headers are in either*Permission.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*PermissionsUpdateCall)EnforceExpansiveAccess¶added inv0.223.0
func (c *PermissionsUpdateCall) EnforceExpansiveAccess(enforceExpansiveAccessbool) *PermissionsUpdateCall
EnforceExpansiveAccess sets the optional parameter "enforceExpansiveAccess":Whether the request should enforce expansive access rules.
func (*PermissionsUpdateCall)Fields¶
func (c *PermissionsUpdateCall) Fields(s ...googleapi.Field) *PermissionsUpdateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*PermissionsUpdateCall)Header¶
func (c *PermissionsUpdateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*PermissionsUpdateCall)RemoveExpiration¶
func (c *PermissionsUpdateCall) RemoveExpiration(removeExpirationbool) *PermissionsUpdateCall
RemoveExpiration sets the optional parameter "removeExpiration": Whether toremove the expiration date.
func (*PermissionsUpdateCall)SupportsAllDrives¶added inv0.4.0
func (c *PermissionsUpdateCall) SupportsAllDrives(supportsAllDrivesbool) *PermissionsUpdateCall
SupportsAllDrives sets the optional parameter "supportsAllDrives": Whetherthe requesting application supports both My Drives and shared drives.
func (*PermissionsUpdateCall)SupportsTeamDrives¶
func (c *PermissionsUpdateCall) SupportsTeamDrives(supportsTeamDrivesbool) *PermissionsUpdateCall
SupportsTeamDrives sets the optional parameter "supportsTeamDrives":Deprecated: Use `supportsAllDrives` instead.
func (*PermissionsUpdateCall)TransferOwnership¶
func (c *PermissionsUpdateCall) TransferOwnership(transferOwnershipbool) *PermissionsUpdateCall
TransferOwnership sets the optional parameter "transferOwnership": Whetherchanging a role to `owner` downgrades the current owners to writers. Doesnothing if the specified role is not `owner`.
func (*PermissionsUpdateCall)UseDomainAdminAccess¶
func (c *PermissionsUpdateCall) UseDomainAdminAccess(useDomainAdminAccessbool) *PermissionsUpdateCall
UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":Issue the request as a domain administrator; if set to true, then therequester will be granted access if the file ID parameter refers to a shareddrive and the requester is an administrator of the domain to which theshared drive belongs.
typePropertiesDeleteCall¶
type PropertiesDeleteCall struct {// contains filtered or unexported fields}func (*PropertiesDeleteCall)Context¶
func (c *PropertiesDeleteCall) Context(ctxcontext.Context) *PropertiesDeleteCall
Context sets the context to be used in this call's Do method.
func (*PropertiesDeleteCall)Do¶
func (c *PropertiesDeleteCall) Do(opts ...googleapi.CallOption)error
Do executes the "drive.properties.delete" call.
func (*PropertiesDeleteCall)Fields¶
func (c *PropertiesDeleteCall) Fields(s ...googleapi.Field) *PropertiesDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*PropertiesDeleteCall)Header¶
func (c *PropertiesDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*PropertiesDeleteCall)Visibility¶
func (c *PropertiesDeleteCall) Visibility(visibilitystring) *PropertiesDeleteCall
Visibility sets the optional parameter "visibility": The visibility of theproperty.
typePropertiesGetCall¶
type PropertiesGetCall struct {// contains filtered or unexported fields}func (*PropertiesGetCall)Context¶
func (c *PropertiesGetCall) Context(ctxcontext.Context) *PropertiesGetCall
Context sets the context to be used in this call's Do method.
func (*PropertiesGetCall)Do¶
func (c *PropertiesGetCall) Do(opts ...googleapi.CallOption) (*Property,error)
Do executes the "drive.properties.get" call.Any non-2xx status code is an error. Response headers are in either*Property.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*PropertiesGetCall)Fields¶
func (c *PropertiesGetCall) Fields(s ...googleapi.Field) *PropertiesGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*PropertiesGetCall)Header¶
func (c *PropertiesGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*PropertiesGetCall)IfNoneMatch¶
func (c *PropertiesGetCall) IfNoneMatch(entityTagstring) *PropertiesGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*PropertiesGetCall)Visibility¶
func (c *PropertiesGetCall) Visibility(visibilitystring) *PropertiesGetCall
Visibility sets the optional parameter "visibility": The visibility of theproperty.
typePropertiesInsertCall¶
type PropertiesInsertCall struct {// contains filtered or unexported fields}func (*PropertiesInsertCall)Context¶
func (c *PropertiesInsertCall) Context(ctxcontext.Context) *PropertiesInsertCall
Context sets the context to be used in this call's Do method.
func (*PropertiesInsertCall)Do¶
func (c *PropertiesInsertCall) Do(opts ...googleapi.CallOption) (*Property,error)
Do executes the "drive.properties.insert" call.Any non-2xx status code is an error. Response headers are in either*Property.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*PropertiesInsertCall)Fields¶
func (c *PropertiesInsertCall) Fields(s ...googleapi.Field) *PropertiesInsertCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*PropertiesInsertCall)Header¶
func (c *PropertiesInsertCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typePropertiesListCall¶
type PropertiesListCall struct {// contains filtered or unexported fields}func (*PropertiesListCall)Context¶
func (c *PropertiesListCall) Context(ctxcontext.Context) *PropertiesListCall
Context sets the context to be used in this call's Do method.
func (*PropertiesListCall)Do¶
func (c *PropertiesListCall) Do(opts ...googleapi.CallOption) (*PropertyList,error)
Do executes the "drive.properties.list" call.Any non-2xx status code is an error. Response headers are in either*PropertyList.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*PropertiesListCall)Fields¶
func (c *PropertiesListCall) Fields(s ...googleapi.Field) *PropertiesListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*PropertiesListCall)Header¶
func (c *PropertiesListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*PropertiesListCall)IfNoneMatch¶
func (c *PropertiesListCall) IfNoneMatch(entityTagstring) *PropertiesListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typePropertiesPatchCall¶
type PropertiesPatchCall struct {// contains filtered or unexported fields}func (*PropertiesPatchCall)Context¶
func (c *PropertiesPatchCall) Context(ctxcontext.Context) *PropertiesPatchCall
Context sets the context to be used in this call's Do method.
func (*PropertiesPatchCall)Do¶
func (c *PropertiesPatchCall) Do(opts ...googleapi.CallOption) (*Property,error)
Do executes the "drive.properties.patch" call.Any non-2xx status code is an error. Response headers are in either*Property.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*PropertiesPatchCall)Fields¶
func (c *PropertiesPatchCall) Fields(s ...googleapi.Field) *PropertiesPatchCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*PropertiesPatchCall)Header¶
func (c *PropertiesPatchCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*PropertiesPatchCall)Visibility¶
func (c *PropertiesPatchCall) Visibility(visibilitystring) *PropertiesPatchCall
Visibility sets the optional parameter "visibility": The visibility of theproperty. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
typePropertiesService¶
type PropertiesService struct {// contains filtered or unexported fields}funcNewPropertiesService¶
func NewPropertiesService(s *Service) *PropertiesService
func (*PropertiesService)Delete¶
func (r *PropertiesService) Delete(fileIdstring, propertyKeystring) *PropertiesDeleteCall
Delete: Deletes a property.
- fileId: The ID of the file.- propertyKey: The key of the property.
func (*PropertiesService)Get¶
func (r *PropertiesService) Get(fileIdstring, propertyKeystring) *PropertiesGetCall
Get: Gets a property by its key.
- fileId: The ID of the file.- propertyKey: The key of the property.
func (*PropertiesService)Insert¶
func (r *PropertiesService) Insert(fileIdstring, property *Property) *PropertiesInsertCall
Insert: Adds a property to a file, or updates it if it already exists.
- fileId: The ID of the file.
func (*PropertiesService)List¶
func (r *PropertiesService) List(fileIdstring) *PropertiesListCall
List: Lists a file's properties.
- fileId: The ID of the file.
func (*PropertiesService)Patch¶
func (r *PropertiesService) Patch(fileIdstring, propertyKeystring, property *Property) *PropertiesPatchCall
Patch: Updates a property.
- fileId: The ID of the file.- propertyKey: The key of the property.
func (*PropertiesService)Update¶
func (r *PropertiesService) Update(fileIdstring, propertyKeystring, property *Property) *PropertiesUpdateCall
Update: Updates a property.
- fileId: The ID of the file.- propertyKey: The key of the property.
typePropertiesUpdateCall¶
type PropertiesUpdateCall struct {// contains filtered or unexported fields}func (*PropertiesUpdateCall)Context¶
func (c *PropertiesUpdateCall) Context(ctxcontext.Context) *PropertiesUpdateCall
Context sets the context to be used in this call's Do method.
func (*PropertiesUpdateCall)Do¶
func (c *PropertiesUpdateCall) Do(opts ...googleapi.CallOption) (*Property,error)
Do executes the "drive.properties.update" call.Any non-2xx status code is an error. Response headers are in either*Property.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*PropertiesUpdateCall)Fields¶
func (c *PropertiesUpdateCall) Fields(s ...googleapi.Field) *PropertiesUpdateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*PropertiesUpdateCall)Header¶
func (c *PropertiesUpdateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*PropertiesUpdateCall)Visibility¶
func (c *PropertiesUpdateCall) Visibility(visibilitystring) *PropertiesUpdateCall
Visibility sets the optional parameter "visibility": The visibility of theproperty. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
typeProperty¶
type Property struct {// Etag: Output only. ETag of the property.Etagstring `json:"etag,omitempty"`// Key: The key of this property.Keystring `json:"key,omitempty"`// Kind: Output only. This is always `drive#property`.Kindstring `json:"kind,omitempty"`// SelfLink: Output only. The link back to this property.SelfLinkstring `json:"selfLink,omitempty"`// Value: The value of this property.Valuestring `json:"value,omitempty"`// Visibility: The visibility of this property. Allowed values are PRIVATE// (default) and PUBLIC. Private properties can only be retrieved using an// authenticated request. An authenticated request uses an access token// obtained with a OAuth 2 client ID. You cannot use an API key to retrieve// private properties.Visibilitystring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Property: A key-value pair attached to a file that is either public orprivate to an application. The following limits apply to file properties: *Maximum of 100 properties total per file * Maximum of 30 private propertiesper app * Maximum of 30 public properties * Maximum of 124 bytes size limiton (key + value) string in UTF-8 encoding for a single property Someresource methods (such as `properties.update`) require a `propertyKey`. Usethe `properties.list` method to retrieve the key for a property.
func (Property)MarshalJSON¶
typePropertyList¶
type PropertyList struct {// Etag: The ETag of the list.Etagstring `json:"etag,omitempty"`// Items: The list of properties.Items []*Property `json:"items,omitempty"`// Kind: This is always `drive#propertyList`.Kindstring `json:"kind,omitempty"`// SelfLink: The link back to this list.SelfLinkstring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}PropertyList: A collection of properties, key-value pairs that are eitherpublic or private to an application.
func (PropertyList)MarshalJSON¶
func (sPropertyList) MarshalJSON() ([]byte,error)
typeRepliesDeleteCall¶
type RepliesDeleteCall struct {// contains filtered or unexported fields}func (*RepliesDeleteCall)Context¶
func (c *RepliesDeleteCall) Context(ctxcontext.Context) *RepliesDeleteCall
Context sets the context to be used in this call's Do method.
func (*RepliesDeleteCall)Do¶
func (c *RepliesDeleteCall) Do(opts ...googleapi.CallOption)error
Do executes the "drive.replies.delete" call.
func (*RepliesDeleteCall)Fields¶
func (c *RepliesDeleteCall) Fields(s ...googleapi.Field) *RepliesDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*RepliesDeleteCall)Header¶
func (c *RepliesDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeRepliesGetCall¶
type RepliesGetCall struct {// contains filtered or unexported fields}func (*RepliesGetCall)Context¶
func (c *RepliesGetCall) Context(ctxcontext.Context) *RepliesGetCall
Context sets the context to be used in this call's Do method.
func (*RepliesGetCall)Do¶
func (c *RepliesGetCall) Do(opts ...googleapi.CallOption) (*CommentReply,error)
Do executes the "drive.replies.get" call.Any non-2xx status code is an error. Response headers are in either*CommentReply.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*RepliesGetCall)Fields¶
func (c *RepliesGetCall) Fields(s ...googleapi.Field) *RepliesGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*RepliesGetCall)Header¶
func (c *RepliesGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*RepliesGetCall)IfNoneMatch¶
func (c *RepliesGetCall) IfNoneMatch(entityTagstring) *RepliesGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*RepliesGetCall)IncludeDeleted¶
func (c *RepliesGetCall) IncludeDeleted(includeDeletedbool) *RepliesGetCall
IncludeDeleted sets the optional parameter "includeDeleted": If set, thiswill succeed when retrieving a deleted reply.
typeRepliesInsertCall¶
type RepliesInsertCall struct {// contains filtered or unexported fields}func (*RepliesInsertCall)Context¶
func (c *RepliesInsertCall) Context(ctxcontext.Context) *RepliesInsertCall
Context sets the context to be used in this call's Do method.
func (*RepliesInsertCall)Do¶
func (c *RepliesInsertCall) Do(opts ...googleapi.CallOption) (*CommentReply,error)
Do executes the "drive.replies.insert" call.Any non-2xx status code is an error. Response headers are in either*CommentReply.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*RepliesInsertCall)Fields¶
func (c *RepliesInsertCall) Fields(s ...googleapi.Field) *RepliesInsertCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*RepliesInsertCall)Header¶
func (c *RepliesInsertCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeRepliesListCall¶
type RepliesListCall struct {// contains filtered or unexported fields}func (*RepliesListCall)Context¶
func (c *RepliesListCall) Context(ctxcontext.Context) *RepliesListCall
Context sets the context to be used in this call's Do method.
func (*RepliesListCall)Do¶
func (c *RepliesListCall) Do(opts ...googleapi.CallOption) (*CommentReplyList,error)
Do executes the "drive.replies.list" call.Any non-2xx status code is an error. Response headers are in either*CommentReplyList.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*RepliesListCall)Fields¶
func (c *RepliesListCall) Fields(s ...googleapi.Field) *RepliesListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*RepliesListCall)Header¶
func (c *RepliesListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*RepliesListCall)IfNoneMatch¶
func (c *RepliesListCall) IfNoneMatch(entityTagstring) *RepliesListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*RepliesListCall)IncludeDeleted¶
func (c *RepliesListCall) IncludeDeleted(includeDeletedbool) *RepliesListCall
IncludeDeleted sets the optional parameter "includeDeleted": If set, allreplies, including deleted replies (with content stripped) will be returned.
func (*RepliesListCall)MaxResults¶
func (c *RepliesListCall) MaxResults(maxResultsint64) *RepliesListCall
MaxResults sets the optional parameter "maxResults": The maximum number ofreplies to include in the response, used for paging.
func (*RepliesListCall)PageToken¶
func (c *RepliesListCall) PageToken(pageTokenstring) *RepliesListCall
PageToken sets the optional parameter "pageToken": The continuation token,used to page through large result sets. To get the next page of results, setthis parameter to the value of "nextPageToken" from the previous response.
func (*RepliesListCall)Pages¶
func (c *RepliesListCall) Pages(ctxcontext.Context, f func(*CommentReplyList)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeRepliesPatchCall¶
type RepliesPatchCall struct {// contains filtered or unexported fields}func (*RepliesPatchCall)Context¶
func (c *RepliesPatchCall) Context(ctxcontext.Context) *RepliesPatchCall
Context sets the context to be used in this call's Do method.
func (*RepliesPatchCall)Do¶
func (c *RepliesPatchCall) Do(opts ...googleapi.CallOption) (*CommentReply,error)
Do executes the "drive.replies.patch" call.Any non-2xx status code is an error. Response headers are in either*CommentReply.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*RepliesPatchCall)Fields¶
func (c *RepliesPatchCall) Fields(s ...googleapi.Field) *RepliesPatchCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*RepliesPatchCall)Header¶
func (c *RepliesPatchCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeRepliesService¶
type RepliesService struct {// contains filtered or unexported fields}funcNewRepliesService¶
func NewRepliesService(s *Service) *RepliesService
func (*RepliesService)Delete¶
func (r *RepliesService) Delete(fileIdstring, commentIdstring, replyIdstring) *RepliesDeleteCall
Delete: Deletes a reply.
- commentId: The ID of the comment.- fileId: The ID of the file.- replyId: The ID of the reply.
func (*RepliesService)Get¶
func (r *RepliesService) Get(fileIdstring, commentIdstring, replyIdstring) *RepliesGetCall
Get: Gets a reply.
- commentId: The ID of the comment.- fileId: The ID of the file.- replyId: The ID of the reply.
func (*RepliesService)Insert¶
func (r *RepliesService) Insert(fileIdstring, commentIdstring, commentreply *CommentReply) *RepliesInsertCall
Insert: Creates a new reply to the given comment.
- commentId: The ID of the comment.- fileId: The ID of the file.
func (*RepliesService)List¶
func (r *RepliesService) List(fileIdstring, commentIdstring) *RepliesListCall
List: Lists all of the replies to a comment.
- commentId: The ID of the comment.- fileId: The ID of the file.
func (*RepliesService)Patch¶
func (r *RepliesService) Patch(fileIdstring, commentIdstring, replyIdstring, commentreply *CommentReply) *RepliesPatchCall
Patch: Updates an existing reply.
- commentId: The ID of the comment.- fileId: The ID of the file.- replyId: The ID of the reply.
func (*RepliesService)Update¶
func (r *RepliesService) Update(fileIdstring, commentIdstring, replyIdstring, commentreply *CommentReply) *RepliesUpdateCall
Update: Updates an existing reply.
- commentId: The ID of the comment.- fileId: The ID of the file.- replyId: The ID of the reply.
typeRepliesUpdateCall¶
type RepliesUpdateCall struct {// contains filtered or unexported fields}func (*RepliesUpdateCall)Context¶
func (c *RepliesUpdateCall) Context(ctxcontext.Context) *RepliesUpdateCall
Context sets the context to be used in this call's Do method.
func (*RepliesUpdateCall)Do¶
func (c *RepliesUpdateCall) Do(opts ...googleapi.CallOption) (*CommentReply,error)
Do executes the "drive.replies.update" call.Any non-2xx status code is an error. Response headers are in either*CommentReply.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*RepliesUpdateCall)Fields¶
func (c *RepliesUpdateCall) Fields(s ...googleapi.Field) *RepliesUpdateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*RepliesUpdateCall)Header¶
func (c *RepliesUpdateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeRevision¶
type Revision struct {// DownloadUrl: Output only. Short term download URL for the file. This will// only be populated on files with content stored in Drive.DownloadUrlstring `json:"downloadUrl,omitempty"`// Etag: Output only. The ETag of the revision.Etagstring `json:"etag,omitempty"`// ExportLinks: Output only. Links for exporting Docs Editors files to specific// formats.ExportLinks map[string]string `json:"exportLinks,omitempty"`// FileSize: Output only. The size of the revision in bytes. This will only be// populated on files with content stored in Drive.FileSizeint64 `json:"fileSize,omitempty,string"`// Id: Output only. The ID of the revision.Idstring `json:"id,omitempty"`// Kind: Output only. This is always `drive#revision`.Kindstring `json:"kind,omitempty"`// LastModifyingUser: Output only. The last user to modify this revision. This// field is only populated when the last modification was performed by a// signed-in user.LastModifyingUser *User `json:"lastModifyingUser,omitempty"`// LastModifyingUserName: Output only. Name of the last user to modify this// revision.LastModifyingUserNamestring `json:"lastModifyingUserName,omitempty"`// Md5Checksum: Output only. An MD5 checksum for the content of this revision.// This will only be populated on files with content stored in Drive.Md5Checksumstring `json:"md5Checksum,omitempty"`// MimeType: Output only. The MIME type of the revision.MimeTypestring `json:"mimeType,omitempty"`// ModifiedDate: Last time this revision was modified (formattedRFC 3339// timestamp).ModifiedDatestring `json:"modifiedDate,omitempty"`// OriginalFilename: Output only. The original filename when this revision was// created. This will only be populated on files with content stored in Drive.OriginalFilenamestring `json:"originalFilename,omitempty"`// Pinned: Whether this revision is pinned to prevent automatic purging. If not// set, the revision is automatically purged 30 days after newer content is// uploaded. This field can only be modified on files with content stored in// Drive, excluding Docs Editors files. Revisions can also be pinned when they// are created through the drive.files.insert/update/copy by using the pinned// query parameter. Pinned revisions are stored indefinitely using additional// storage quota, up to a maximum of 200 revisions.Pinnedbool `json:"pinned,omitempty"`// PublishAuto: Whether subsequent revisions will be automatically republished.// This is only populated and can only be modified for Docs Editors files.PublishAutobool `json:"publishAuto,omitempty"`// Published: Whether this revision is published. This is only populated and// can only be modified for Docs Editors files.Publishedbool `json:"published,omitempty"`// PublishedLink: Output only. A link to the published revision. This is only// populated for Docs Editors files.PublishedLinkstring `json:"publishedLink,omitempty"`// PublishedOutsideDomain: Whether this revision is published outside the// domain. This is only populated and can only be modified for Docs Editors// files.PublishedOutsideDomainbool `json:"publishedOutsideDomain,omitempty"`// SelfLink: Output only. A link back to this revision.SelfLinkstring `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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Revision: A revision of a file. Some resource methods (such as`revisions.update`) require a `revisionId`. Use the `revisions.list` methodto retrieve the ID for a revision.
func (Revision)MarshalJSON¶
typeRevisionList¶
type RevisionList struct {// Etag: The ETag of the list.Etagstring `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`.Kindstring `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.NextPageTokenstring `json:"nextPageToken,omitempty"`// SelfLink: A link back to this list.SelfLinkstring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}RevisionList: A list of revisions of a file.
func (RevisionList)MarshalJSON¶
func (sRevisionList) MarshalJSON() ([]byte,error)
typeRevisionsDeleteCall¶
type RevisionsDeleteCall struct {// contains filtered or unexported fields}func (*RevisionsDeleteCall)Context¶
func (c *RevisionsDeleteCall) Context(ctxcontext.Context) *RevisionsDeleteCall
Context sets the context to be used in this call's Do method.
func (*RevisionsDeleteCall)Do¶
func (c *RevisionsDeleteCall) Do(opts ...googleapi.CallOption)error
Do executes the "drive.revisions.delete" call.
func (*RevisionsDeleteCall)Fields¶
func (c *RevisionsDeleteCall) Fields(s ...googleapi.Field) *RevisionsDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*RevisionsDeleteCall)Header¶
func (c *RevisionsDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeRevisionsGetCall¶
type RevisionsGetCall struct {// contains filtered or unexported fields}func (*RevisionsGetCall)Context¶
func (c *RevisionsGetCall) Context(ctxcontext.Context) *RevisionsGetCall
Context sets the context to be used in this call's Do method.
func (*RevisionsGetCall)Do¶
func (c *RevisionsGetCall) Do(opts ...googleapi.CallOption) (*Revision,error)
Do executes the "drive.revisions.get" call.Any non-2xx status code is an error. Response headers are in either*Revision.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*RevisionsGetCall)Fields¶
func (c *RevisionsGetCall) Fields(s ...googleapi.Field) *RevisionsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*RevisionsGetCall)Header¶
func (c *RevisionsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*RevisionsGetCall)IfNoneMatch¶
func (c *RevisionsGetCall) IfNoneMatch(entityTagstring) *RevisionsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeRevisionsListCall¶
type RevisionsListCall struct {// contains filtered or unexported fields}func (*RevisionsListCall)Context¶
func (c *RevisionsListCall) Context(ctxcontext.Context) *RevisionsListCall
Context sets the context to be used in this call's Do method.
func (*RevisionsListCall)Do¶
func (c *RevisionsListCall) Do(opts ...googleapi.CallOption) (*RevisionList,error)
Do executes the "drive.revisions.list" call.Any non-2xx status code is an error. Response headers are in either*RevisionList.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*RevisionsListCall)Fields¶
func (c *RevisionsListCall) Fields(s ...googleapi.Field) *RevisionsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*RevisionsListCall)Header¶
func (c *RevisionsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*RevisionsListCall)IfNoneMatch¶
func (c *RevisionsListCall) IfNoneMatch(entityTagstring) *RevisionsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*RevisionsListCall)MaxResults¶
func (c *RevisionsListCall) MaxResults(maxResultsint64) *RevisionsListCall
MaxResults sets the optional parameter "maxResults": Maximum number ofrevisions to return.
func (*RevisionsListCall)PageToken¶
func (c *RevisionsListCall) PageToken(pageTokenstring) *RevisionsListCall
PageToken sets the optional parameter "pageToken": Page token for revisions.To get the next page of results, set this parameter to the value of"nextPageToken" from the previous response.
func (*RevisionsListCall)Pages¶
func (c *RevisionsListCall) Pages(ctxcontext.Context, f func(*RevisionList)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeRevisionsPatchCall¶
type RevisionsPatchCall struct {// contains filtered or unexported fields}func (*RevisionsPatchCall)Context¶
func (c *RevisionsPatchCall) Context(ctxcontext.Context) *RevisionsPatchCall
Context sets the context to be used in this call's Do method.
func (*RevisionsPatchCall)Do¶
func (c *RevisionsPatchCall) Do(opts ...googleapi.CallOption) (*Revision,error)
Do executes the "drive.revisions.patch" call.Any non-2xx status code is an error. Response headers are in either*Revision.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*RevisionsPatchCall)Fields¶
func (c *RevisionsPatchCall) Fields(s ...googleapi.Field) *RevisionsPatchCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*RevisionsPatchCall)Header¶
func (c *RevisionsPatchCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeRevisionsService¶
type RevisionsService struct {// contains filtered or unexported fields}funcNewRevisionsService¶
func NewRevisionsService(s *Service) *RevisionsService
func (*RevisionsService)Delete¶
func (r *RevisionsService) Delete(fileIdstring, revisionIdstring) *RevisionsDeleteCall
Delete: Permanently deletes a file version. You can only delete revisionsfor files with binary content, like images or videos. Revisions for otherfiles, like Google Docs or Sheets, and the last remaining file version can'tbe deleted.
- fileId: The ID of the file.- revisionId: The ID of the revision.
func (*RevisionsService)Get¶
func (r *RevisionsService) Get(fileIdstring, revisionIdstring) *RevisionsGetCall
Get: Gets a specific revision.
- fileId: The ID of the file.- revisionId: The ID of the revision.
func (*RevisionsService)List¶
func (r *RevisionsService) List(fileIdstring) *RevisionsListCall
List: Lists a file's revisions. **Important:** The list of revisionsreturned by this method might be incomplete for files with a large revisionhistory, including frequently edited Google Docs, Sheets, and Slides. Olderrevisions might be omitted from the response, meaning the first revisionreturned may not be the oldest existing revision. The revision historyvisible in the Workspace editor user interface might be more complete thanthe list returned by the API.
- fileId: The ID of the file.
func (*RevisionsService)Patch¶
func (r *RevisionsService) Patch(fileIdstring, revisionIdstring, revision *Revision) *RevisionsPatchCall
Patch: Updates a revision.
- fileId: The ID for the file.- revisionId: The ID for the revision.
func (*RevisionsService)Update¶
func (r *RevisionsService) Update(fileIdstring, revisionIdstring, revision *Revision) *RevisionsUpdateCall
Update: Updates a revision.
- fileId: The ID for the file.- revisionId: The ID for the revision.
typeRevisionsUpdateCall¶
type RevisionsUpdateCall struct {// contains filtered or unexported fields}func (*RevisionsUpdateCall)Context¶
func (c *RevisionsUpdateCall) Context(ctxcontext.Context) *RevisionsUpdateCall
Context sets the context to be used in this call's Do method.
func (*RevisionsUpdateCall)Do¶
func (c *RevisionsUpdateCall) Do(opts ...googleapi.CallOption) (*Revision,error)
Do executes the "drive.revisions.update" call.Any non-2xx status code is an error. Response headers are in either*Revision.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*RevisionsUpdateCall)Fields¶
func (c *RevisionsUpdateCall) Fields(s ...googleapi.Field) *RevisionsUpdateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*RevisionsUpdateCall)Header¶
func (c *RevisionsUpdateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeService¶
type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentAbout *AboutServiceApps *AppsServiceChanges *ChangesServiceChannels *ChannelsServiceChildren *ChildrenServiceComments *CommentsServiceDrives *DrivesServiceFiles *FilesServiceParents *ParentsServicePermissions *PermissionsServiceProperties *PropertiesServiceReplies *RepliesServiceRevisions *RevisionsServiceTeamdrives *TeamdrivesService// contains filtered or unexported fields} funcNewdeprecated
New creates a new Service. It uses the provided http.Client for requests.
Deprecated: please use NewService instead.To provide a custom HTTP client, use option.WithHTTPClient.If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
funcNewService¶added inv0.3.0
NewService creates a new Service.
typeStartPageToken¶
type StartPageToken struct {// Kind: Identifies what kind of resource this is. Value: the fixed string// "drive#startPageToken".Kindstring `json:"kind,omitempty"`// StartPageToken: The starting page token for listing changes.StartPageTokenstring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}func (StartPageToken)MarshalJSON¶
func (sStartPageToken) MarshalJSON() ([]byte,error)
typeTeamDrive¶
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.BackgroundImageLinkstring `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`.ColorRgbstring `json:"colorRgb,omitempty"`// CreatedDate: The time at which the Team Drive was created (RFC 3339// date-time).CreatedDatestring `json:"createdDate,omitempty"`// Id: The ID of this Team Drive which is also the ID of the top level folder// of this Team Drive.Idstring `json:"id,omitempty"`// Kind: This is always `drive#teamDrive`Kindstring `json:"kind,omitempty"`// Name: The name of this Team Drive.Namestring `json:"name,omitempty"`// OrgUnitId: The organizational unit of this shared drive. This field is only// populated on `drives.list` responses when the `useDomainAdminAccess`// parameter is set to `true`.OrgUnitIdstring `json:"orgUnitId,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`.ThemeIdstring `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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}TeamDrive: Deprecated: Use the `drive` collection instead.
func (TeamDrive)MarshalJSON¶
typeTeamDriveBackgroundImageFile¶
type TeamDriveBackgroundImageFile struct {// Id: The ID of an image file in Drive to use for the background image.Idstring `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.Widthfloat64 `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.XCoordinatefloat64 `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.YCoordinatefloat64 `json:"yCoordinate,omitempty"`// ForceSendFields is a list of field names (e.g. "Id") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}TeamDriveBackgroundImageFile: An image file and cropping parameters fromwhich a background image for this Team Drive is set. This is a write onlyfield; it can only be set on `drive.teamdrives.update` requests that don'tset `themeId`. When specified, all fields of the `backgroundImageFile` mustbe set.
func (TeamDriveBackgroundImageFile)MarshalJSON¶
func (sTeamDriveBackgroundImageFile) MarshalJSON() ([]byte,error)
func (*TeamDriveBackgroundImageFile)UnmarshalJSON¶
func (s *TeamDriveBackgroundImageFile) UnmarshalJSON(data []byte)error
typeTeamDriveCapabilities¶
type TeamDriveCapabilities struct {// CanAddChildren: Whether the current user can add children to folders in this// Team Drive.CanAddChildrenbool `json:"canAddChildren,omitempty"`// CanChangeCopyRequiresWriterPermissionRestriction: Whether the current user// can change the `copyRequiresWriterPermission` restriction of this Team// Drive.CanChangeCopyRequiresWriterPermissionRestrictionbool `json:"canChangeCopyRequiresWriterPermissionRestriction,omitempty"`// CanChangeDomainUsersOnlyRestriction: Whether the current user can change the// `domainUsersOnly` restriction of this Team Drive.CanChangeDomainUsersOnlyRestrictionbool `json:"canChangeDomainUsersOnlyRestriction,omitempty"`// CanChangeSharingFoldersRequiresOrganizerPermissionRestriction: Whether the// current user can change the `sharingFoldersRequiresOrganizerPermission`// restriction of this Team Drive.CanChangeSharingFoldersRequiresOrganizerPermissionRestrictionbool `json:"canChangeSharingFoldersRequiresOrganizerPermissionRestriction,omitempty"`// CanChangeTeamDriveBackground: Whether the current user can change the// background of this Team Drive.CanChangeTeamDriveBackgroundbool `json:"canChangeTeamDriveBackground,omitempty"`// CanChangeTeamMembersOnlyRestriction: Whether the current user can change the// `teamMembersOnly` restriction of this Team Drive.CanChangeTeamMembersOnlyRestrictionbool `json:"canChangeTeamMembersOnlyRestriction,omitempty"`// CanComment: Whether the current user can comment on files in this Team// Drive.CanCommentbool `json:"canComment,omitempty"`// CanCopy: Whether the current user can copy files in this Team Drive.CanCopybool `json:"canCopy,omitempty"`// CanDeleteChildren: Whether the current user can delete children from folders// in this Team Drive.CanDeleteChildrenbool `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.CanDeleteTeamDrivebool `json:"canDeleteTeamDrive,omitempty"`// CanDownload: Whether the current user can download files in this Team Drive.CanDownloadbool `json:"canDownload,omitempty"`// CanEdit: Whether the current user can edit files in this Team DriveCanEditbool `json:"canEdit,omitempty"`// CanListChildren: Whether the current user can list the children of folders// in this Team Drive.CanListChildrenbool `json:"canListChildren,omitempty"`// CanManageMembers: Whether the current user can add members to this Team// Drive or remove them or change their role.CanManageMembersbool `json:"canManageMembers,omitempty"`// CanReadRevisions: Whether the current user can read the revisions resource// of files in this Team Drive.CanReadRevisionsbool `json:"canReadRevisions,omitempty"`// CanRemoveChildren: Deprecated: Use `canDeleteChildren` or `canTrashChildren`// instead.CanRemoveChildrenbool `json:"canRemoveChildren,omitempty"`// CanRename: Whether the current user can rename files or folders in this Team// Drive.CanRenamebool `json:"canRename,omitempty"`// CanRenameTeamDrive: Whether the current user can rename this Team Drive.CanRenameTeamDrivebool `json:"canRenameTeamDrive,omitempty"`// CanResetTeamDriveRestrictions: Whether the current user can reset the Team// Drive restrictions to defaults.CanResetTeamDriveRestrictionsbool `json:"canResetTeamDriveRestrictions,omitempty"`// CanShare: Whether the current user can share files or folders in this Team// Drive.CanSharebool `json:"canShare,omitempty"`// CanTrashChildren: Whether the current user can trash children from folders// in this Team Drive.CanTrashChildrenbool `json:"canTrashChildren,omitempty"`// ForceSendFields is a list of field names (e.g. "CanAddChildren") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}TeamDriveCapabilities: Capabilities the current user has on this Team Drive.
func (TeamDriveCapabilities)MarshalJSON¶
func (sTeamDriveCapabilities) MarshalJSON() ([]byte,error)
typeTeamDriveList¶
type TeamDriveList struct {// Items: The list of Team Drives.Items []*TeamDrive `json:"items,omitempty"`// Kind: This is always `drive#teamDriveList`Kindstring `json:"kind,omitempty"`// NextPageToken: The page token for the next page of Team Drives.NextPageTokenstring `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 or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}TeamDriveList: A list of Team Drives.
func (TeamDriveList)MarshalJSON¶
func (sTeamDriveList) MarshalJSON() ([]byte,error)
typeTeamDriveRestrictions¶
type TeamDriveRestrictions struct {// AdminManagedRestrictions: Whether administrative privileges on this Team// Drive are required to modify restrictions.AdminManagedRestrictionsbool `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.CopyRequiresWriterPermissionbool `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.DomainUsersOnlybool `json:"domainUsersOnly,omitempty"`// SharingFoldersRequiresOrganizerPermission: If true, only users with the// organizer role can share folders. If false, users with either the organizer// role or the file organizer role can share folders.SharingFoldersRequiresOrganizerPermissionbool `json:"sharingFoldersRequiresOrganizerPermission,omitempty"`// TeamMembersOnly: Whether access to items inside this Team Drive is// restricted to members of this Team Drive.TeamMembersOnlybool `json:"teamMembersOnly,omitempty"`// ForceSendFields is a list of field names (e.g. "AdminManagedRestrictions")// to unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}TeamDriveRestrictions: A set of restrictions that apply to this Team Driveor items inside this Team Drive.
func (TeamDriveRestrictions)MarshalJSON¶
func (sTeamDriveRestrictions) MarshalJSON() ([]byte,error)
typeTeamdrivesDeleteCall¶
type TeamdrivesDeleteCall struct {// contains filtered or unexported fields}func (*TeamdrivesDeleteCall)Context¶
func (c *TeamdrivesDeleteCall) Context(ctxcontext.Context) *TeamdrivesDeleteCall
Context sets the context to be used in this call's Do method.
func (*TeamdrivesDeleteCall)Do¶
func (c *TeamdrivesDeleteCall) Do(opts ...googleapi.CallOption)error
Do executes the "drive.teamdrives.delete" call.
func (*TeamdrivesDeleteCall)Fields¶
func (c *TeamdrivesDeleteCall) Fields(s ...googleapi.Field) *TeamdrivesDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*TeamdrivesDeleteCall)Header¶
func (c *TeamdrivesDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeTeamdrivesGetCall¶
type TeamdrivesGetCall struct {// contains filtered or unexported fields}func (*TeamdrivesGetCall)Context¶
func (c *TeamdrivesGetCall) Context(ctxcontext.Context) *TeamdrivesGetCall
Context sets the context to be used in this call's Do method.
func (*TeamdrivesGetCall)Do¶
func (c *TeamdrivesGetCall) Do(opts ...googleapi.CallOption) (*TeamDrive,error)
Do executes the "drive.teamdrives.get" call.Any non-2xx status code is an error. Response headers are in either*TeamDrive.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*TeamdrivesGetCall)Fields¶
func (c *TeamdrivesGetCall) Fields(s ...googleapi.Field) *TeamdrivesGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*TeamdrivesGetCall)Header¶
func (c *TeamdrivesGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*TeamdrivesGetCall)IfNoneMatch¶
func (c *TeamdrivesGetCall) IfNoneMatch(entityTagstring) *TeamdrivesGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*TeamdrivesGetCall)UseDomainAdminAccess¶
func (c *TeamdrivesGetCall) UseDomainAdminAccess(useDomainAdminAccessbool) *TeamdrivesGetCall
UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":Issue the request as a domain administrator; if set to true, then therequester will be granted access if they are an administrator of the domainto which the Team Drive belongs.
typeTeamdrivesInsertCall¶
type TeamdrivesInsertCall struct {// contains filtered or unexported fields}func (*TeamdrivesInsertCall)Context¶
func (c *TeamdrivesInsertCall) Context(ctxcontext.Context) *TeamdrivesInsertCall
Context sets the context to be used in this call's Do method.
func (*TeamdrivesInsertCall)Do¶
func (c *TeamdrivesInsertCall) Do(opts ...googleapi.CallOption) (*TeamDrive,error)
Do executes the "drive.teamdrives.insert" call.Any non-2xx status code is an error. Response headers are in either*TeamDrive.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*TeamdrivesInsertCall)Fields¶
func (c *TeamdrivesInsertCall) Fields(s ...googleapi.Field) *TeamdrivesInsertCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*TeamdrivesInsertCall)Header¶
func (c *TeamdrivesInsertCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeTeamdrivesListCall¶
type TeamdrivesListCall struct {// contains filtered or unexported fields}func (*TeamdrivesListCall)Context¶
func (c *TeamdrivesListCall) Context(ctxcontext.Context) *TeamdrivesListCall
Context sets the context to be used in this call's Do method.
func (*TeamdrivesListCall)Do¶
func (c *TeamdrivesListCall) Do(opts ...googleapi.CallOption) (*TeamDriveList,error)
Do executes the "drive.teamdrives.list" call.Any non-2xx status code is an error. Response headers are in either*TeamDriveList.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*TeamdrivesListCall)Fields¶
func (c *TeamdrivesListCall) Fields(s ...googleapi.Field) *TeamdrivesListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*TeamdrivesListCall)Header¶
func (c *TeamdrivesListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*TeamdrivesListCall)IfNoneMatch¶
func (c *TeamdrivesListCall) IfNoneMatch(entityTagstring) *TeamdrivesListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*TeamdrivesListCall)MaxResults¶
func (c *TeamdrivesListCall) MaxResults(maxResultsint64) *TeamdrivesListCall
MaxResults sets the optional parameter "maxResults": Maximum number of TeamDrives to return.
func (*TeamdrivesListCall)PageToken¶
func (c *TeamdrivesListCall) PageToken(pageTokenstring) *TeamdrivesListCall
PageToken sets the optional parameter "pageToken": Page token for TeamDrives.
func (*TeamdrivesListCall)Pages¶
func (c *TeamdrivesListCall) Pages(ctxcontext.Context, f func(*TeamDriveList)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
func (*TeamdrivesListCall)Q¶
func (c *TeamdrivesListCall) Q(qstring) *TeamdrivesListCall
Q sets the optional parameter "q": Query string for searching Team Drives.
func (*TeamdrivesListCall)UseDomainAdminAccess¶
func (c *TeamdrivesListCall) UseDomainAdminAccess(useDomainAdminAccessbool) *TeamdrivesListCall
UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":Issue the request as a domain administrator; if set to true, then all TeamDrives of the domain in which the requester is an administrator arereturned.
typeTeamdrivesService¶
type TeamdrivesService struct {// contains filtered or unexported fields}funcNewTeamdrivesService¶
func NewTeamdrivesService(s *Service) *TeamdrivesService
func (*TeamdrivesService)Delete¶
func (r *TeamdrivesService) Delete(teamDriveIdstring) *TeamdrivesDeleteCall
Delete: Deprecated: Use `drives.delete` instead.
- teamDriveId: The ID of the Team Drive.
func (*TeamdrivesService)Get¶
func (r *TeamdrivesService) Get(teamDriveIdstring) *TeamdrivesGetCall
Get: Deprecated: Use `drives.get` instead.
- teamDriveId: The ID of the Team Drive.
func (*TeamdrivesService)Insert¶
func (r *TeamdrivesService) Insert(requestIdstring, teamdrive *TeamDrive) *TeamdrivesInsertCall
Insert: Deprecated: Use `drives.insert` instead.
- requestId: An ID, such as a random UUID, which uniquely identifies thisuser's request for idempotent creation of a Team Drive. A repeated requestby the same user and with the same request ID will avoid creatingduplicates by attempting to create the same Team Drive. If the Team Drivealready exists a 409 error will be returned.
func (*TeamdrivesService)List¶
func (r *TeamdrivesService) List() *TeamdrivesListCall
List: Deprecated: Use `drives.list` instead.
func (*TeamdrivesService)Update¶
func (r *TeamdrivesService) Update(teamDriveIdstring, teamdrive *TeamDrive) *TeamdrivesUpdateCall
Update: Deprecated: Use `drives.update` instead.
- teamDriveId: The ID of the Team Drive.
typeTeamdrivesUpdateCall¶
type TeamdrivesUpdateCall struct {// contains filtered or unexported fields}func (*TeamdrivesUpdateCall)Context¶
func (c *TeamdrivesUpdateCall) Context(ctxcontext.Context) *TeamdrivesUpdateCall
Context sets the context to be used in this call's Do method.
func (*TeamdrivesUpdateCall)Do¶
func (c *TeamdrivesUpdateCall) Do(opts ...googleapi.CallOption) (*TeamDrive,error)
Do executes the "drive.teamdrives.update" call.Any non-2xx status code is an error. Response headers are in either*TeamDrive.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*TeamdrivesUpdateCall)Fields¶
func (c *TeamdrivesUpdateCall) Fields(s ...googleapi.Field) *TeamdrivesUpdateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*TeamdrivesUpdateCall)Header¶
func (c *TeamdrivesUpdateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*TeamdrivesUpdateCall)UseDomainAdminAccess¶
func (c *TeamdrivesUpdateCall) UseDomainAdminAccess(useDomainAdminAccessbool) *TeamdrivesUpdateCall
UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":Issue the request as a domain administrator; if set to true, then therequester will be granted access if they are an administrator of the domainto which the Team Drive belongs.
typeUser¶
type User struct {// DisplayName: Output only. A plain text displayable name for this user.DisplayNamestring `json:"displayName,omitempty"`// EmailAddress: Output only. The email address of the user. This may not be// present in certain contexts if the user has not made their email address// visible to the requester.EmailAddressstring `json:"emailAddress,omitempty"`// IsAuthenticatedUser: Output only. Whether this user is the same as the// authenticated user for whom the request was made.IsAuthenticatedUserbool `json:"isAuthenticatedUser,omitempty"`// Kind: Output only. Identifies what kind of resource this is. Value: the// fixed string `drive#user`.Kindstring `json:"kind,omitempty"`// PermissionId: Output only. The user's ID as visible in Permission resources.PermissionIdstring `json:"permissionId,omitempty"`// Picture: Output only. 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 or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}User: Information about a Drive user.
func (User)MarshalJSON¶
typeUserPicture¶
type UserPicture struct {// Url: Output only. A URL that points to a profile picture of this user.Urlstring `json:"url,omitempty"`// ForceSendFields is a list of field names (e.g. "Url") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}UserPicture: Output only. The user's profile picture.
func (UserPicture)MarshalJSON¶
func (sUserPicture) MarshalJSON() ([]byte,error)