public final class File extends 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: http://code.google.com/p/google-http-java-client/wiki/JSON
Modifier and Type | Class and Description |
---|---|
static class |
File.ImageMediaMetadata
Metadata about image media.
|
static class |
File.IndexableText
Indexable text attributes for the file (can only be written)
|
static class |
File.Labels
A group of labels for the file.
|
static class |
File.Thumbnail
Thumbnail for the file.
|
GenericData.Flags
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
File() |
Modifier and Type | Method and Description |
---|---|
File |
clone() |
String |
getAlternateLink()
A link for opening the file in using a relevant Google editor or viewer.
|
Boolean |
getAppDataContents()
Whether this file is in the appdata folder.
|
Boolean |
getCopyable()
Whether the file can be copied by the current user.
|
DateTime |
getCreatedDate()
Create time for this file (formatted ISO8601 timestamp).
|
String |
getDefaultOpenWithLink()
A link to open this file with the user's default app for this file.
|
String |
getDescription()
A short description of the file.
|
String |
getDownloadUrl()
Short lived download URL for the file.
|
Boolean |
getEditable()
Whether the file can be edited by the current user.
|
String |
getEmbedLink()
A link for embedding the file.
|
String |
getEtag()
ETag of the file.
|
Boolean |
getExplicitlyTrashed()
Whether this file has been explicitly trashed, as opposed to recursively trashed.
|
Map<String,String> |
getExportLinks()
Links for exporting Google Docs to specific formats.
|
String |
getFileExtension()
The file extension used when downloading this file.
|
Long |
getFileSize()
The size of the file in bytes.
|
String |
getHeadRevisionId()
The ID of the file's head revision.
|
String |
getIconLink()
A link to the file's icon.
|
String |
getId()
The ID of the file.
|
File.ImageMediaMetadata |
getImageMediaMetadata()
Metadata about image media.
|
File.IndexableText |
getIndexableText()
Indexable text attributes for the file (can only be written)
|
String |
getKind()
The type of file.
|
File.Labels |
getLabels()
A group of labels for the file.
|
User |
getLastModifyingUser()
The last user to modify this file.
|
String |
getLastModifyingUserName()
Name of the last user to modify this file.
|
DateTime |
getLastViewedByMeDate()
Last time this file was viewed by the user (formatted RFC 3339 timestamp).
|
String |
getMd5Checksum()
An MD5 checksum for the content of this file.
|
String |
getMimeType()
The MIME type of the file.
|
DateTime |
getModifiedByMeDate()
Last time this file was modified by the user (formatted RFC 3339 timestamp).
|
DateTime |
getModifiedDate()
Last time this file was modified by anyone (formatted RFC 3339 timestamp).
|
Map<String,String> |
getOpenWithLinks()
A map of the id of each of the user's apps to a link to open this file with that app.
|
String |
getOriginalFilename()
The original filename if the file was uploaded manually, or the original title if the file was
inserted through the API.
|
List<String> |
getOwnerNames()
Name(s) of the owner(s) of this file.
|
List<User> |
getOwners()
The owner(s) of this file.
|
List<ParentReference> |
getParents()
Collection of parent folders which contain this file.
|
List<Property> |
getProperties()
The list of properties.
|
Long |
getQuotaBytesUsed()
The number of quota bytes used by this file.
|
String |
getSelfLink()
A link back to this file.
|
Boolean |
getShared()
Whether the file has been shared.
|
DateTime |
getSharedWithMeDate()
Time at which this file was shared with the user (formatted RFC 3339 timestamp).
|
File.Thumbnail |
getThumbnail()
Thumbnail for the file.
|
String |
getThumbnailLink()
A link to the file's thumbnail.
|
String |
getTitle()
The title of this file.
|
Permission |
getUserPermission()
The permissions for the authenticated user on this file.
|
String |
getWebContentLink()
A link for downloading the content of the file in a browser using cookie based authentication.
|
String |
getWebViewLink()
A link only available on public folders for viewing their static web assets (HTML, CSS, JS,
etc) via Google Drive's Website Hosting.
|
Boolean |
getWritersCanShare()
Whether writers can share the document with other users.
|
File |
set(String fieldName,
Object value) |
File |
setAlternateLink(String alternateLink)
A link for opening the file in using a relevant Google editor or viewer.
|
File |
setAppDataContents(Boolean appDataContents)
Whether this file is in the appdata folder.
|
File |
setCopyable(Boolean copyable)
Whether the file can be copied by the current user.
|
File |
setCreatedDate(DateTime createdDate)
Create time for this file (formatted ISO8601 timestamp).
|
File |
setDefaultOpenWithLink(String defaultOpenWithLink)
A link to open this file with the user's default app for this file.
|
File |
setDescription(String description)
A short description of the file.
|
File |
setDownloadUrl(String downloadUrl)
Short lived download URL for the file.
|
File |
setEditable(Boolean editable)
Whether the file can be edited by the current user.
|
File |
setEmbedLink(String embedLink)
A link for embedding the file.
|
File |
setEtag(String etag)
ETag of the file.
|
File |
setExplicitlyTrashed(Boolean explicitlyTrashed)
Whether this file has been explicitly trashed, as opposed to recursively trashed.
|
File |
setExportLinks(Map<String,String> exportLinks)
Links for exporting Google Docs to specific formats.
|
File |
setFileExtension(String fileExtension)
The file extension used when downloading this file.
|
File |
setFileSize(Long fileSize)
The size of the file in bytes.
|
File |
setHeadRevisionId(String headRevisionId)
The ID of the file's head revision.
|
File |
setIconLink(String iconLink)
A link to the file's icon.
|
File |
setId(String id)
The ID of the file.
|
File |
setImageMediaMetadata(File.ImageMediaMetadata imageMediaMetadata)
Metadata about image media.
|
File |
setIndexableText(File.IndexableText indexableText)
Indexable text attributes for the file (can only be written)
|
File |
setKind(String kind)
The type of file.
|
File |
setLabels(File.Labels labels)
A group of labels for the file.
|
File |
setLastModifyingUser(User lastModifyingUser)
The last user to modify this file.
|
File |
setLastModifyingUserName(String lastModifyingUserName)
Name of the last user to modify this file.
|
File |
setLastViewedByMeDate(DateTime lastViewedByMeDate)
Last time this file was viewed by the user (formatted RFC 3339 timestamp).
|
File |
setMd5Checksum(String md5Checksum)
An MD5 checksum for the content of this file.
|
File |
setMimeType(String mimeType)
The MIME type of the file.
|
File |
setModifiedByMeDate(DateTime modifiedByMeDate)
Last time this file was modified by the user (formatted RFC 3339 timestamp).
|
File |
setModifiedDate(DateTime modifiedDate)
Last time this file was modified by anyone (formatted RFC 3339 timestamp).
|
File |
setOpenWithLinks(Map<String,String> openWithLinks)
A map of the id of each of the user's apps to a link to open this file with that app.
|
File |
setOriginalFilename(String originalFilename)
The original filename if the file was uploaded manually, or the original title if the file was
inserted through the API.
|
File |
setOwnerNames(List<String> ownerNames)
Name(s) of the owner(s) of this file.
|
File |
setOwners(List<User> owners)
The owner(s) of this file.
|
File |
setParents(List<ParentReference> parents)
Collection of parent folders which contain this file.
|
File |
setProperties(List<Property> properties)
The list of properties.
|
File |
setQuotaBytesUsed(Long quotaBytesUsed)
The number of quota bytes used by this file.
|
File |
setSelfLink(String selfLink)
A link back to this file.
|
File |
setShared(Boolean shared)
Whether the file has been shared.
|
File |
setSharedWithMeDate(DateTime sharedWithMeDate)
Time at which this file was shared with the user (formatted RFC 3339 timestamp).
|
File |
setThumbnail(File.Thumbnail thumbnail)
Thumbnail for the file.
|
File |
setThumbnailLink(String thumbnailLink)
A link to the file's thumbnail.
|
File |
setTitle(String title)
The title of this file.
|
File |
setUserPermission(Permission userPermission)
The permissions for the authenticated user on this file.
|
File |
setWebContentLink(String webContentLink)
A link for downloading the content of the file in a browser using cookie based authentication.
|
File |
setWebViewLink(String webViewLink)
A link only available on public folders for viewing their static web assets (HTML, CSS, JS,
etc) via Google Drive's Website Hosting.
|
File |
setWritersCanShare(Boolean writersCanShare)
Whether writers can share the document with other users.
|
getFactory, setFactory, toPrettyString, toString
entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeys
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, values
public String getAlternateLink()
null
for nonepublic File setAlternateLink(String alternateLink)
alternateLink
- alternateLink or null
for nonepublic Boolean getAppDataContents()
null
for nonepublic File setAppDataContents(Boolean appDataContents)
appDataContents
- appDataContents or null
for nonepublic Boolean getCopyable()
null
for nonepublic File setCopyable(Boolean copyable)
copyable
- copyable or null
for nonepublic DateTime getCreatedDate()
null
for nonepublic File setCreatedDate(DateTime createdDate)
createdDate
- createdDate or null
for nonepublic String getDefaultOpenWithLink()
null
for nonepublic File setDefaultOpenWithLink(String defaultOpenWithLink)
defaultOpenWithLink
- defaultOpenWithLink or null
for nonepublic String getDescription()
null
for nonepublic File setDescription(String description)
description
- description or null
for nonepublic String getDownloadUrl()
null
for nonepublic File setDownloadUrl(String downloadUrl)
downloadUrl
- downloadUrl or null
for nonepublic Boolean getEditable()
null
for nonepublic File setEditable(Boolean editable)
editable
- editable or null
for nonepublic String getEmbedLink()
null
for nonepublic File setEmbedLink(String embedLink)
embedLink
- embedLink or null
for nonepublic String getEtag()
null
for nonepublic Boolean getExplicitlyTrashed()
null
for nonepublic File setExplicitlyTrashed(Boolean explicitlyTrashed)
explicitlyTrashed
- explicitlyTrashed or null
for nonepublic Map<String,String> getExportLinks()
null
for nonepublic File setExportLinks(Map<String,String> exportLinks)
exportLinks
- exportLinks or null
for nonepublic String getFileExtension()
null
for nonepublic File setFileExtension(String fileExtension)
fileExtension
- fileExtension or null
for nonepublic Long getFileSize()
null
for nonepublic File setFileSize(Long fileSize)
fileSize
- fileSize or null
for nonepublic String getHeadRevisionId()
null
for nonepublic File setHeadRevisionId(String headRevisionId)
headRevisionId
- headRevisionId or null
for nonepublic String getIconLink()
null
for nonepublic File setIconLink(String iconLink)
iconLink
- iconLink or null
for nonepublic String getId()
null
for nonepublic File.ImageMediaMetadata getImageMediaMetadata()
null
for nonepublic File setImageMediaMetadata(File.ImageMediaMetadata imageMediaMetadata)
imageMediaMetadata
- imageMediaMetadata or null
for nonepublic File.IndexableText getIndexableText()
null
for nonepublic File setIndexableText(File.IndexableText indexableText)
indexableText
- indexableText or null
for nonepublic String getKind()
null
for nonepublic File setKind(String kind)
kind
- kind or null
for nonepublic File.Labels getLabels()
null
for nonepublic File setLabels(File.Labels labels)
labels
- labels or null
for nonepublic User getLastModifyingUser()
null
for nonepublic File setLastModifyingUser(User lastModifyingUser)
lastModifyingUser
- lastModifyingUser or null
for nonepublic String getLastModifyingUserName()
null
for nonepublic File setLastModifyingUserName(String lastModifyingUserName)
lastModifyingUserName
- lastModifyingUserName or null
for nonepublic DateTime getLastViewedByMeDate()
null
for nonepublic File setLastViewedByMeDate(DateTime lastViewedByMeDate)
lastViewedByMeDate
- lastViewedByMeDate or null
for nonepublic String getMd5Checksum()
null
for nonepublic File setMd5Checksum(String md5Checksum)
md5Checksum
- md5Checksum or null
for nonepublic String getMimeType()
null
for nonepublic File setMimeType(String mimeType)
mimeType
- mimeType or null
for nonepublic DateTime getModifiedByMeDate()
null
for nonepublic File setModifiedByMeDate(DateTime modifiedByMeDate)
modifiedByMeDate
- modifiedByMeDate or null
for nonepublic DateTime getModifiedDate()
null
for nonepublic File setModifiedDate(DateTime modifiedDate)
modifiedDate
- modifiedDate or null
for nonepublic Map<String,String> getOpenWithLinks()
null
for nonepublic File setOpenWithLinks(Map<String,String> openWithLinks)
openWithLinks
- openWithLinks or null
for nonepublic String getOriginalFilename()
null
for nonepublic File setOriginalFilename(String originalFilename)
originalFilename
- originalFilename or null
for nonepublic List<String> getOwnerNames()
null
for nonepublic File setOwnerNames(List<String> ownerNames)
ownerNames
- ownerNames or null
for nonepublic File setOwners(List<User> owners)
owners
- owners or null
for nonepublic List<ParentReference> getParents()
null
for nonepublic File setParents(List<ParentReference> parents)
parents
- parents or null
for nonepublic List<Property> getProperties()
null
for nonepublic File setProperties(List<Property> properties)
properties
- properties or null
for nonepublic Long getQuotaBytesUsed()
null
for nonepublic File setQuotaBytesUsed(Long quotaBytesUsed)
quotaBytesUsed
- quotaBytesUsed or null
for nonepublic String getSelfLink()
null
for nonepublic File setSelfLink(String selfLink)
selfLink
- selfLink or null
for nonepublic Boolean getShared()
null
for nonepublic File setShared(Boolean shared)
shared
- shared or null
for nonepublic DateTime getSharedWithMeDate()
null
for nonepublic File setSharedWithMeDate(DateTime sharedWithMeDate)
sharedWithMeDate
- sharedWithMeDate or null
for nonepublic File.Thumbnail getThumbnail()
null
for nonepublic File setThumbnail(File.Thumbnail thumbnail)
thumbnail
- thumbnail or null
for nonepublic String getThumbnailLink()
null
for nonepublic File setThumbnailLink(String thumbnailLink)
thumbnailLink
- thumbnailLink or null
for nonepublic String getTitle()
null
for nonepublic File setTitle(String title)
title
- title or null
for nonepublic Permission getUserPermission()
null
for nonepublic File setUserPermission(Permission userPermission)
userPermission
- userPermission or null
for nonepublic String getWebContentLink()
null
for nonepublic File setWebContentLink(String webContentLink)
webContentLink
- webContentLink or null
for nonepublic String getWebViewLink()
null
for nonepublic File setWebViewLink(String webViewLink)
webViewLink
- webViewLink or null
for nonepublic Boolean getWritersCanShare()
null
for nonepublic File setWritersCanShare(Boolean writersCanShare)
writersCanShare
- writersCanShare or null
for nonepublic File set(String fieldName, Object value)
set
in class GenericJson
public File clone()
clone
in class GenericJson