public final class File
extends com.google.api.client.json.GenericJson
This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Drive API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json
Modifier and Type | Class and Description |
---|---|
static class |
File.Capabilities
Capabilities the current user has on this file.
|
static class |
File.ContentHints
Additional information about the content of the file.
|
static class |
File.ImageMediaMetadata
Additional metadata about image media, if available.
|
static class |
File.VideoMediaMetadata
Additional metadata about video media.
|
com.google.api.client.util.GenericData.Flags
Constructor and Description |
---|
File() |
Modifier and Type | Method and Description |
---|---|
File |
clone() |
java.util.Map<java.lang.String,java.lang.String> |
getAppProperties()
A collection of arbitrary key-value pairs which are private to the requesting app.
|
File.Capabilities |
getCapabilities()
Capabilities the current user has on this file.
|
File.ContentHints |
getContentHints()
Additional information about the content of the file.
|
java.lang.Boolean |
getCopyRequiresWriterPermission()
Whether the options to copy, print, or download this file, should be disabled for readers and
commenters.
|
com.google.api.client.util.DateTime |
getCreatedTime()
The time at which the file was created (RFC 3339 date-time).
|
java.lang.String |
getDescription()
A short description of the file.
|
java.lang.String |
getDriveId()
ID of the shared drive the file resides in.
|
java.lang.Boolean |
getExplicitlyTrashed()
Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent
folder.
|
java.util.Map<java.lang.String,java.lang.String> |
getExportLinks()
Links for exporting Google Docs to specific formats.
|
java.lang.String |
getFileExtension()
The final component of fullFileExtension.
|
java.lang.String |
getFolderColorRgb()
The color for a folder as an RGB hex string.
|
java.lang.String |
getFullFileExtension()
The full file extension extracted from the name field.
|
java.lang.Boolean |
getHasAugmentedPermissions()
Whether any users are granted file access directly on this file.
|
java.lang.Boolean |
getHasThumbnail()
Whether this file has a thumbnail.
|
java.lang.String |
getHeadRevisionId()
The ID of the file's head revision.
|
java.lang.String |
getIconLink()
A static, unauthenticated link to the file's icon.
|
java.lang.String |
getId()
The ID of the file.
|
File.ImageMediaMetadata |
getImageMediaMetadata()
Additional metadata about image media, if available.
|
java.lang.Boolean |
getIsAppAuthorized()
Whether the file was created or opened by the requesting app.
|
java.lang.String |
getKind()
Identifies what kind of resource this is.
|
User |
getLastModifyingUser()
The last user to modify the file.
|
java.lang.String |
getMd5Checksum()
The MD5 checksum for the content of the file.
|
java.lang.String |
getMimeType()
The MIME type of the file.
|
java.lang.Boolean |
getModifiedByMe()
Whether the file has been modified by this user.
|
com.google.api.client.util.DateTime |
getModifiedByMeTime()
The last time the file was modified by the user (RFC 3339 date-time).
|
com.google.api.client.util.DateTime |
getModifiedTime()
The last time the file was modified by anyone (RFC 3339 date-time).
|
java.lang.String |
getName()
The name of the file.
|
java.lang.String |
getOriginalFilename()
The original filename of the uploaded content if available, or else the original value of the
name field.
|
java.lang.Boolean |
getOwnedByMe()
Whether the user owns the file.
|
java.util.List<User> |
getOwners()
The owners of the file.
|
java.util.List<java.lang.String> |
getParents()
The IDs of the parent folders which contain the file.
|
java.util.List<java.lang.String> |
getPermissionIds()
List of permission IDs for users with access to this file.
|
java.util.List<Permission> |
getPermissions()
The full list of permissions for the file.
|
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
A collection of arbitrary key-value pairs which are visible to all apps.
|
java.lang.Long |
getQuotaBytesUsed()
The number of storage quota bytes used by the file.
|
java.lang.Boolean |
getShared()
Whether the file has been shared.
|
com.google.api.client.util.DateTime |
getSharedWithMeTime()
The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
|
User |
getSharingUser()
The user who shared the file with the requesting user, if applicable.
|
java.lang.Long |
getSize()
The size of the file's content in bytes.
|
java.util.List<java.lang.String> |
getSpaces()
The list of spaces which contain the file.
|
java.lang.Boolean |
getStarred()
Whether the user has starred the file.
|
java.lang.String |
getTeamDriveId()
Deprecated - use driveId instead.
|
java.lang.String |
getThumbnailLink()
A short-lived link to the file's thumbnail, if available.
|
java.lang.Long |
getThumbnailVersion()
The thumbnail version for use in thumbnail cache invalidation.
|
java.lang.Boolean |
getTrashed()
Whether the file has been trashed, either explicitly or from a trashed parent folder.
|
com.google.api.client.util.DateTime |
getTrashedTime()
The time that the item was trashed (RFC 3339 date-time).
|
User |
getTrashingUser()
If the file has been explicitly trashed, the user who trashed it.
|
java.lang.Long |
getVersion()
A monotonically increasing version number for the file.
|
File.VideoMediaMetadata |
getVideoMediaMetadata()
Additional metadata about video media.
|
java.lang.Boolean |
getViewedByMe()
Whether the file has been viewed by this user.
|
com.google.api.client.util.DateTime |
getViewedByMeTime()
The last time the file was viewed by the user (RFC 3339 date-time).
|
java.lang.Boolean |
getViewersCanCopyContent()
Deprecated - use copyRequiresWriterPermission instead.
|
java.lang.String |
getWebContentLink()
A link for downloading the content of the file in a browser.
|
java.lang.String |
getWebViewLink()
A link for opening the file in a relevant Google editor or viewer in a browser.
|
java.lang.Boolean |
getWritersCanShare()
Whether users with only writer permission can modify the file's permissions.
|
File |
set(java.lang.String fieldName,
java.lang.Object value) |
File |
setAppProperties(java.util.Map<java.lang.String,java.lang.String> appProperties)
A collection of arbitrary key-value pairs which are private to the requesting app.
|
File |
setCapabilities(File.Capabilities capabilities)
Capabilities the current user has on this file.
|
File |
setContentHints(File.ContentHints contentHints)
Additional information about the content of the file.
|
File |
setCopyRequiresWriterPermission(java.lang.Boolean copyRequiresWriterPermission)
Whether the options to copy, print, or download this file, should be disabled for readers and
commenters.
|
File |
setCreatedTime(com.google.api.client.util.DateTime createdTime)
The time at which the file was created (RFC 3339 date-time).
|
File |
setDescription(java.lang.String description)
A short description of the file.
|
File |
setDriveId(java.lang.String driveId)
ID of the shared drive the file resides in.
|
File |
setExplicitlyTrashed(java.lang.Boolean explicitlyTrashed)
Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent
folder.
|
File |
setExportLinks(java.util.Map<java.lang.String,java.lang.String> exportLinks)
Links for exporting Google Docs to specific formats.
|
File |
setFileExtension(java.lang.String fileExtension)
The final component of fullFileExtension.
|
File |
setFolderColorRgb(java.lang.String folderColorRgb)
The color for a folder as an RGB hex string.
|
File |
setFullFileExtension(java.lang.String fullFileExtension)
The full file extension extracted from the name field.
|
File |
setHasAugmentedPermissions(java.lang.Boolean hasAugmentedPermissions)
Whether any users are granted file access directly on this file.
|
File |
setHasThumbnail(java.lang.Boolean hasThumbnail)
Whether this file has a thumbnail.
|
File |
setHeadRevisionId(java.lang.String headRevisionId)
The ID of the file's head revision.
|
File |
setIconLink(java.lang.String iconLink)
A static, unauthenticated link to the file's icon.
|
File |
setId(java.lang.String id)
The ID of the file.
|
File |
setImageMediaMetadata(File.ImageMediaMetadata imageMediaMetadata)
Additional metadata about image media, if available.
|
File |
setIsAppAuthorized(java.lang.Boolean isAppAuthorized)
Whether the file was created or opened by the requesting app.
|
File |
setKind(java.lang.String kind)
Identifies what kind of resource this is.
|
File |
setLastModifyingUser(User lastModifyingUser)
The last user to modify the file.
|
File |
setMd5Checksum(java.lang.String md5Checksum)
The MD5 checksum for the content of the file.
|
File |
setMimeType(java.lang.String mimeType)
The MIME type of the file.
|
File |
setModifiedByMe(java.lang.Boolean modifiedByMe)
Whether the file has been modified by this user.
|
File |
setModifiedByMeTime(com.google.api.client.util.DateTime modifiedByMeTime)
The last time the file was modified by the user (RFC 3339 date-time).
|
File |
setModifiedTime(com.google.api.client.util.DateTime modifiedTime)
The last time the file was modified by anyone (RFC 3339 date-time).
|
File |
setName(java.lang.String name)
The name of the file.
|
File |
setOriginalFilename(java.lang.String originalFilename)
The original filename of the uploaded content if available, or else the original value of the
name field.
|
File |
setOwnedByMe(java.lang.Boolean ownedByMe)
Whether the user owns the file.
|
File |
setOwners(java.util.List<User> owners)
The owners of the file.
|
File |
setParents(java.util.List<java.lang.String> parents)
The IDs of the parent folders which contain the file.
|
File |
setPermissionIds(java.util.List<java.lang.String> permissionIds)
List of permission IDs for users with access to this file.
|
File |
setPermissions(java.util.List<Permission> permissions)
The full list of permissions for the file.
|
File |
setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
A collection of arbitrary key-value pairs which are visible to all apps.
|
File |
setQuotaBytesUsed(java.lang.Long quotaBytesUsed)
The number of storage quota bytes used by the file.
|
File |
setShared(java.lang.Boolean shared)
Whether the file has been shared.
|
File |
setSharedWithMeTime(com.google.api.client.util.DateTime sharedWithMeTime)
The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
|
File |
setSharingUser(User sharingUser)
The user who shared the file with the requesting user, if applicable.
|
File |
setSize(java.lang.Long size)
The size of the file's content in bytes.
|
File |
setSpaces(java.util.List<java.lang.String> spaces)
The list of spaces which contain the file.
|
File |
setStarred(java.lang.Boolean starred)
Whether the user has starred the file.
|
File |
setTeamDriveId(java.lang.String teamDriveId)
Deprecated - use driveId instead.
|
File |
setThumbnailLink(java.lang.String thumbnailLink)
A short-lived link to the file's thumbnail, if available.
|
File |
setThumbnailVersion(java.lang.Long thumbnailVersion)
The thumbnail version for use in thumbnail cache invalidation.
|
File |
setTrashed(java.lang.Boolean trashed)
Whether the file has been trashed, either explicitly or from a trashed parent folder.
|
File |
setTrashedTime(com.google.api.client.util.DateTime trashedTime)
The time that the item was trashed (RFC 3339 date-time).
|
File |
setTrashingUser(User trashingUser)
If the file has been explicitly trashed, the user who trashed it.
|
File |
setVersion(java.lang.Long version)
A monotonically increasing version number for the file.
|
File |
setVideoMediaMetadata(File.VideoMediaMetadata videoMediaMetadata)
Additional metadata about video media.
|
File |
setViewedByMe(java.lang.Boolean viewedByMe)
Whether the file has been viewed by this user.
|
File |
setViewedByMeTime(com.google.api.client.util.DateTime viewedByMeTime)
The last time the file was viewed by the user (RFC 3339 date-time).
|
File |
setViewersCanCopyContent(java.lang.Boolean viewersCanCopyContent)
Deprecated - use copyRequiresWriterPermission instead.
|
File |
setWebContentLink(java.lang.String webContentLink)
A link for downloading the content of the file in a browser.
|
File |
setWebViewLink(java.lang.String webViewLink)
A link for opening the file in a relevant Google editor or viewer in a browser.
|
File |
setWritersCanShare(java.lang.Boolean writersCanShare)
Whether users with only writer permission can modify the file's permissions.
|
getFactory, setFactory, toPrettyString, toString
entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeys
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, values
public java.util.Map<java.lang.String,java.lang.String> getAppProperties()
null
for nonepublic File setAppProperties(java.util.Map<java.lang.String,java.lang.String> appProperties)
appProperties
- appProperties or null
for nonepublic File.Capabilities getCapabilities()
null
for nonepublic File setCapabilities(File.Capabilities capabilities)
capabilities
- capabilities or null
for nonepublic File.ContentHints getContentHints()
null
for nonepublic File setContentHints(File.ContentHints contentHints)
contentHints
- contentHints or null
for nonepublic java.lang.Boolean getCopyRequiresWriterPermission()
null
for nonepublic File setCopyRequiresWriterPermission(java.lang.Boolean copyRequiresWriterPermission)
copyRequiresWriterPermission
- copyRequiresWriterPermission or null
for nonepublic com.google.api.client.util.DateTime getCreatedTime()
null
for nonepublic File setCreatedTime(com.google.api.client.util.DateTime createdTime)
createdTime
- createdTime or null
for nonepublic java.lang.String getDescription()
null
for nonepublic File setDescription(java.lang.String description)
description
- description or null
for nonepublic java.lang.String getDriveId()
null
for nonepublic File setDriveId(java.lang.String driveId)
driveId
- driveId or null
for nonepublic java.lang.Boolean getExplicitlyTrashed()
null
for nonepublic File setExplicitlyTrashed(java.lang.Boolean explicitlyTrashed)
explicitlyTrashed
- explicitlyTrashed or null
for nonepublic java.util.Map<java.lang.String,java.lang.String> getExportLinks()
null
for nonepublic File setExportLinks(java.util.Map<java.lang.String,java.lang.String> exportLinks)
exportLinks
- exportLinks or null
for nonepublic java.lang.String getFileExtension()
null
for nonepublic File setFileExtension(java.lang.String fileExtension)
fileExtension
- fileExtension or null
for nonepublic java.lang.String getFolderColorRgb()
null
for nonepublic File setFolderColorRgb(java.lang.String folderColorRgb)
folderColorRgb
- folderColorRgb or null
for nonepublic java.lang.String getFullFileExtension()
null
for nonepublic File setFullFileExtension(java.lang.String fullFileExtension)
fullFileExtension
- fullFileExtension or null
for nonepublic java.lang.Boolean getHasAugmentedPermissions()
null
for nonepublic File setHasAugmentedPermissions(java.lang.Boolean hasAugmentedPermissions)
hasAugmentedPermissions
- hasAugmentedPermissions or null
for nonepublic java.lang.Boolean getHasThumbnail()
null
for nonepublic File setHasThumbnail(java.lang.Boolean hasThumbnail)
hasThumbnail
- hasThumbnail or null
for nonepublic java.lang.String getHeadRevisionId()
null
for nonepublic File setHeadRevisionId(java.lang.String headRevisionId)
headRevisionId
- headRevisionId or null
for nonepublic java.lang.String getIconLink()
null
for nonepublic File setIconLink(java.lang.String iconLink)
iconLink
- iconLink or null
for nonepublic java.lang.String getId()
null
for nonepublic File setId(java.lang.String id)
id
- id or null
for nonepublic File.ImageMediaMetadata getImageMediaMetadata()
null
for nonepublic File setImageMediaMetadata(File.ImageMediaMetadata imageMediaMetadata)
imageMediaMetadata
- imageMediaMetadata or null
for nonepublic java.lang.Boolean getIsAppAuthorized()
null
for nonepublic File setIsAppAuthorized(java.lang.Boolean isAppAuthorized)
isAppAuthorized
- isAppAuthorized or null
for nonepublic java.lang.String getKind()
null
for nonepublic File setKind(java.lang.String kind)
kind
- kind or null
for nonepublic User getLastModifyingUser()
null
for nonepublic File setLastModifyingUser(User lastModifyingUser)
lastModifyingUser
- lastModifyingUser or null
for nonepublic java.lang.String getMd5Checksum()
null
for nonepublic File setMd5Checksum(java.lang.String md5Checksum)
md5Checksum
- md5Checksum or null
for nonepublic java.lang.String getMimeType()
null
for nonepublic File setMimeType(java.lang.String mimeType)
mimeType
- mimeType or null
for nonepublic java.lang.Boolean getModifiedByMe()
null
for nonepublic File setModifiedByMe(java.lang.Boolean modifiedByMe)
modifiedByMe
- modifiedByMe or null
for nonepublic com.google.api.client.util.DateTime getModifiedByMeTime()
null
for nonepublic File setModifiedByMeTime(com.google.api.client.util.DateTime modifiedByMeTime)
modifiedByMeTime
- modifiedByMeTime or null
for nonepublic com.google.api.client.util.DateTime getModifiedTime()
null
for nonepublic File setModifiedTime(com.google.api.client.util.DateTime modifiedTime)
modifiedTime
- modifiedTime or null
for nonepublic java.lang.String getName()
null
for nonepublic File setName(java.lang.String name)
name
- name or null
for nonepublic java.lang.String getOriginalFilename()
null
for nonepublic File setOriginalFilename(java.lang.String originalFilename)
originalFilename
- originalFilename or null
for nonepublic java.lang.Boolean getOwnedByMe()
null
for nonepublic File setOwnedByMe(java.lang.Boolean ownedByMe)
ownedByMe
- ownedByMe or null
for nonepublic java.util.List<User> getOwners()
null
for nonepublic File setOwners(java.util.List<User> owners)
owners
- owners or null
for nonepublic java.util.List<java.lang.String> getParents()
null
for nonepublic File setParents(java.util.List<java.lang.String> parents)
parents
- parents or null
for nonepublic java.util.List<java.lang.String> getPermissionIds()
null
for nonepublic File setPermissionIds(java.util.List<java.lang.String> permissionIds)
permissionIds
- permissionIds or null
for nonepublic java.util.List<Permission> getPermissions()
null
for nonepublic File setPermissions(java.util.List<Permission> permissions)
permissions
- permissions or null
for nonepublic java.util.Map<java.lang.String,java.lang.String> getProperties()
null
for nonepublic File setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
properties
- properties or null
for nonepublic java.lang.Long getQuotaBytesUsed()
null
for nonepublic File setQuotaBytesUsed(java.lang.Long quotaBytesUsed)
quotaBytesUsed
- quotaBytesUsed or null
for nonepublic java.lang.Boolean getShared()
null
for nonepublic File setShared(java.lang.Boolean shared)
shared
- shared or null
for nonepublic com.google.api.client.util.DateTime getSharedWithMeTime()
null
for nonepublic File setSharedWithMeTime(com.google.api.client.util.DateTime sharedWithMeTime)
sharedWithMeTime
- sharedWithMeTime or null
for nonepublic User getSharingUser()
null
for nonepublic File setSharingUser(User sharingUser)
sharingUser
- sharingUser or null
for nonepublic java.lang.Long getSize()
null
for nonepublic File setSize(java.lang.Long size)
size
- size or null
for nonepublic java.util.List<java.lang.String> getSpaces()
null
for nonepublic File setSpaces(java.util.List<java.lang.String> spaces)
spaces
- spaces or null
for nonepublic java.lang.Boolean getStarred()
null
for nonepublic File setStarred(java.lang.Boolean starred)
starred
- starred or null
for nonepublic java.lang.String getTeamDriveId()
null
for nonepublic File setTeamDriveId(java.lang.String teamDriveId)
teamDriveId
- teamDriveId or null
for nonepublic java.lang.String getThumbnailLink()
null
for nonepublic File setThumbnailLink(java.lang.String thumbnailLink)
thumbnailLink
- thumbnailLink or null
for nonepublic java.lang.Long getThumbnailVersion()
null
for nonepublic File setThumbnailVersion(java.lang.Long thumbnailVersion)
thumbnailVersion
- thumbnailVersion or null
for nonepublic java.lang.Boolean getTrashed()
null
for nonepublic File setTrashed(java.lang.Boolean trashed)
trashed
- trashed or null
for nonepublic com.google.api.client.util.DateTime getTrashedTime()
null
for nonepublic File setTrashedTime(com.google.api.client.util.DateTime trashedTime)
trashedTime
- trashedTime or null
for nonepublic User getTrashingUser()
null
for nonepublic File setTrashingUser(User trashingUser)
trashingUser
- trashingUser or null
for nonepublic java.lang.Long getVersion()
null
for nonepublic File setVersion(java.lang.Long version)
version
- version or null
for nonepublic File.VideoMediaMetadata getVideoMediaMetadata()
null
for nonepublic File setVideoMediaMetadata(File.VideoMediaMetadata videoMediaMetadata)
videoMediaMetadata
- videoMediaMetadata or null
for nonepublic java.lang.Boolean getViewedByMe()
null
for nonepublic File setViewedByMe(java.lang.Boolean viewedByMe)
viewedByMe
- viewedByMe or null
for nonepublic com.google.api.client.util.DateTime getViewedByMeTime()
null
for nonepublic File setViewedByMeTime(com.google.api.client.util.DateTime viewedByMeTime)
viewedByMeTime
- viewedByMeTime or null
for nonepublic java.lang.Boolean getViewersCanCopyContent()
null
for nonepublic File setViewersCanCopyContent(java.lang.Boolean viewersCanCopyContent)
viewersCanCopyContent
- viewersCanCopyContent or null
for nonepublic java.lang.String getWebContentLink()
null
for nonepublic File setWebContentLink(java.lang.String webContentLink)
webContentLink
- webContentLink or null
for nonepublic java.lang.String getWebViewLink()
null
for nonepublic File setWebViewLink(java.lang.String webViewLink)
webViewLink
- webViewLink or null
for nonepublic java.lang.Boolean getWritersCanShare()
null
for nonepublic File setWritersCanShare(java.lang.Boolean writersCanShare)
writersCanShare
- writersCanShare or null
for nonepublic File set(java.lang.String fieldName, java.lang.Object value)
set
in class com.google.api.client.json.GenericJson
public File clone()
clone
in class com.google.api.client.json.GenericJson