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 Google 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
Output only.
|
static class |
File.ContentHints
Additional information about the content of the file.
|
static class |
File.ImageMediaMetadata
Output only.
|
static class |
File.LabelInfo
Output only.
|
static class |
File.LinkShareMetadata
Contains details about the link URLs that clients are using to refer to this item.
|
static class |
File.ShortcutDetails
Shortcut file details.
|
static class |
File.VideoMediaMetadata
Output only.
|
com.google.api.client.util.GenericData.Flags
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
File() |
Modifier and Type | Method and Description |
---|---|
File |
clone() |
Map<String,String> |
getAppProperties()
A collection of arbitrary key-value pairs which are private to the requesting app.
|
File.Capabilities |
getCapabilities()
Output only.
|
File.ContentHints |
getContentHints()
Additional information about the content of the file.
|
List<ContentRestriction> |
getContentRestrictions()
Restrictions for accessing the content of the file.
|
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).
|
String |
getDescription()
A short description of the file.
|
String |
getDriveId()
Output only.
|
Boolean |
getExplicitlyTrashed()
Output only.
|
Map<String,String> |
getExportLinks()
Output only.
|
String |
getFileExtension()
Output only.
|
String |
getFolderColorRgb()
The color for a folder or a shortcut to a folder as an RGB hex string.
|
String |
getFullFileExtension()
Output only.
|
Boolean |
getHasAugmentedPermissions()
Output only.
|
Boolean |
getHasThumbnail()
Output only.
|
String |
getHeadRevisionId()
Output only.
|
String |
getIconLink()
Output only.
|
String |
getId()
The ID of the file.
|
File.ImageMediaMetadata |
getImageMediaMetadata()
Output only.
|
Boolean |
getIsAppAuthorized()
Output only.
|
String |
getKind()
Output only.
|
File.LabelInfo |
getLabelInfo()
Output only.
|
User |
getLastModifyingUser()
Output only.
|
File.LinkShareMetadata |
getLinkShareMetadata()
Contains details about the link URLs that clients are using to refer to this item.
|
String |
getMd5Checksum()
Output only.
|
String |
getMimeType()
The MIME type of the file.
|
Boolean |
getModifiedByMe()
Output only.
|
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()
he last time the file was modified by anyone (RFC 3339 date-time).
|
String |
getName()
The name of the file.
|
String |
getOriginalFilename()
The original filename of the uploaded content if available, or else the original value of the
`name` field.
|
Boolean |
getOwnedByMe()
Output only.
|
List<User> |
getOwners()
Output only.
|
List<String> |
getParents()
The ID of the parent folder containing the file.
|
List<String> |
getPermissionIds()
Output only.
|
List<Permission> |
getPermissions()
Output only.
|
Map<String,String> |
getProperties()
A collection of arbitrary key-value pairs which are visible to all apps.
|
Long |
getQuotaBytesUsed()
Output only.
|
String |
getResourceKey()
Output only.
|
String |
getSha1Checksum()
Output only.
|
String |
getSha256Checksum()
Output only.
|
Boolean |
getShared()
Output only.
|
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()
Output only.
|
File.ShortcutDetails |
getShortcutDetails()
Shortcut file details.
|
Long |
getSize()
Output only.
|
List<String> |
getSpaces()
Output only.
|
Boolean |
getStarred()
Whether the user has starred the file.
|
String |
getTeamDriveId()
Deprecated: Output only.
|
String |
getThumbnailLink()
Output only.
|
Long |
getThumbnailVersion()
Output only.
|
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()
Output only.
|
Long |
getVersion()
Output only.
|
File.VideoMediaMetadata |
getVideoMediaMetadata()
Output only.
|
Boolean |
getViewedByMe()
Output only.
|
com.google.api.client.util.DateTime |
getViewedByMeTime()
The last time the file was viewed by the user (RFC 3339 date-time).
|
Boolean |
getViewersCanCopyContent()
Deprecated: Use `copyRequiresWriterPermission` instead.
|
String |
getWebContentLink()
Output only.
|
String |
getWebViewLink()
Output only.
|
Boolean |
getWritersCanShare()
Whether users with only `writer` permission can modify the file's permissions.
|
File |
set(String fieldName,
Object value) |
File |
setAppProperties(Map<String,String> appProperties)
A collection of arbitrary key-value pairs which are private to the requesting app.
|
File |
setCapabilities(File.Capabilities capabilities)
Output only.
|
File |
setContentHints(File.ContentHints contentHints)
Additional information about the content of the file.
|
File |
setContentRestrictions(List<ContentRestriction> contentRestrictions)
Restrictions for accessing the content of the file.
|
File |
setCopyRequiresWriterPermission(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(String description)
A short description of the file.
|
File |
setDriveId(String driveId)
Output only.
|
File |
setExplicitlyTrashed(Boolean explicitlyTrashed)
Output only.
|
File |
setExportLinks(Map<String,String> exportLinks)
Output only.
|
File |
setFileExtension(String fileExtension)
Output only.
|
File |
setFolderColorRgb(String folderColorRgb)
The color for a folder or a shortcut to a folder as an RGB hex string.
|
File |
setFullFileExtension(String fullFileExtension)
Output only.
|
File |
setHasAugmentedPermissions(Boolean hasAugmentedPermissions)
Output only.
|
File |
setHasThumbnail(Boolean hasThumbnail)
Output only.
|
File |
setHeadRevisionId(String headRevisionId)
Output only.
|
File |
setIconLink(String iconLink)
Output only.
|
File |
setId(String id)
The ID of the file.
|
File |
setImageMediaMetadata(File.ImageMediaMetadata imageMediaMetadata)
Output only.
|
File |
setIsAppAuthorized(Boolean isAppAuthorized)
Output only.
|
File |
setKind(String kind)
Output only.
|
File |
setLabelInfo(File.LabelInfo labelInfo)
Output only.
|
File |
setLastModifyingUser(User lastModifyingUser)
Output only.
|
File |
setLinkShareMetadata(File.LinkShareMetadata linkShareMetadata)
Contains details about the link URLs that clients are using to refer to this item.
|
File |
setMd5Checksum(String md5Checksum)
Output only.
|
File |
setMimeType(String mimeType)
The MIME type of the file.
|
File |
setModifiedByMe(Boolean modifiedByMe)
Output only.
|
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)
he last time the file was modified by anyone (RFC 3339 date-time).
|
File |
setName(String name)
The name of the file.
|
File |
setOriginalFilename(String originalFilename)
The original filename of the uploaded content if available, or else the original value of the
`name` field.
|
File |
setOwnedByMe(Boolean ownedByMe)
Output only.
|
File |
setOwners(List<User> owners)
Output only.
|
File |
setParents(List<String> parents)
The ID of the parent folder containing the file.
|
File |
setPermissionIds(List<String> permissionIds)
Output only.
|
File |
setPermissions(List<Permission> permissions)
Output only.
|
File |
setProperties(Map<String,String> properties)
A collection of arbitrary key-value pairs which are visible to all apps.
|
File |
setQuotaBytesUsed(Long quotaBytesUsed)
Output only.
|
File |
setResourceKey(String resourceKey)
Output only.
|
File |
setSha1Checksum(String sha1Checksum)
Output only.
|
File |
setSha256Checksum(String sha256Checksum)
Output only.
|
File |
setShared(Boolean shared)
Output only.
|
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)
Output only.
|
File |
setShortcutDetails(File.ShortcutDetails shortcutDetails)
Shortcut file details.
|
File |
setSize(Long size)
Output only.
|
File |
setSpaces(List<String> spaces)
Output only.
|
File |
setStarred(Boolean starred)
Whether the user has starred the file.
|
File |
setTeamDriveId(String teamDriveId)
Deprecated: Output only.
|
File |
setThumbnailLink(String thumbnailLink)
Output only.
|
File |
setThumbnailVersion(Long thumbnailVersion)
Output only.
|
File |
setTrashed(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)
Output only.
|
File |
setVersion(Long version)
Output only.
|
File |
setVideoMediaMetadata(File.VideoMediaMetadata videoMediaMetadata)
Output only.
|
File |
setViewedByMe(Boolean viewedByMe)
Output only.
|
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(Boolean viewersCanCopyContent)
Deprecated: Use `copyRequiresWriterPermission` instead.
|
File |
setWebContentLink(String webContentLink)
Output only.
|
File |
setWebViewLink(String webViewLink)
Output only.
|
File |
setWritersCanShare(Boolean writersCanShare)
Whether users with only `writer` permission can modify the file's permissions.
|
getFactory, setFactory, toPrettyString, toString
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
clear, containsKey, containsValue, isEmpty, keySet, size, values
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public Map<String,String> getAppProperties()
null
for nonepublic File setAppProperties(Map<String,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 List<ContentRestriction> getContentRestrictions()
null
for nonepublic File setContentRestrictions(List<ContentRestriction> contentRestrictions)
contentRestrictions
- contentRestrictions or null
for nonepublic Boolean getCopyRequiresWriterPermission()
null
for nonepublic File setCopyRequiresWriterPermission(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 String getDescription()
null
for nonepublic File setDescription(String description)
description
- description or null
for nonepublic String getDriveId()
null
for nonepublic File setDriveId(String driveId)
driveId
- driveId or 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 String getFolderColorRgb()
null
for nonepublic File setFolderColorRgb(String folderColorRgb)
folderColorRgb
- folderColorRgb or null
for nonepublic String getFullFileExtension()
null
for nonepublic File setFullFileExtension(String fullFileExtension)
fullFileExtension
- fullFileExtension or null
for nonepublic Boolean getHasAugmentedPermissions()
null
for nonepublic File setHasAugmentedPermissions(Boolean hasAugmentedPermissions)
hasAugmentedPermissions
- hasAugmentedPermissions or null
for nonepublic Boolean getHasThumbnail()
null
for nonepublic File setHasThumbnail(Boolean hasThumbnail)
hasThumbnail
- hasThumbnail 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 Boolean getIsAppAuthorized()
null
for nonepublic File setIsAppAuthorized(Boolean isAppAuthorized)
isAppAuthorized
- isAppAuthorized or null
for nonepublic String getKind()
null
for nonepublic File setKind(String kind)
kind
- kind or null
for nonepublic File.LabelInfo getLabelInfo()
null
for nonepublic File setLabelInfo(File.LabelInfo labelInfo)
labelInfo
- labelInfo or null
for nonepublic User getLastModifyingUser()
null
for nonepublic File setLastModifyingUser(User lastModifyingUser)
lastModifyingUser
- lastModifyingUser or null
for nonepublic File.LinkShareMetadata getLinkShareMetadata()
null
for nonepublic File setLinkShareMetadata(File.LinkShareMetadata linkShareMetadata)
linkShareMetadata
- linkShareMetadata 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 Boolean getModifiedByMe()
null
for nonepublic File setModifiedByMe(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 String getName()
null
for nonepublic File setName(String name)
name
- name or null
for nonepublic String getOriginalFilename()
null
for nonepublic File setOriginalFilename(String originalFilename)
originalFilename
- originalFilename or null
for nonepublic Boolean getOwnedByMe()
null
for nonepublic File setOwnedByMe(Boolean ownedByMe)
ownedByMe
- ownedByMe or null
for nonepublic List<User> getOwners()
null
for nonepublic File setOwners(List<User> owners)
owners
- owners or null
for nonepublic List<String> getParents()
null
for nonepublic File setParents(List<String> parents)
parents
- parents or null
for nonepublic List<String> getPermissionIds()
null
for nonepublic File setPermissionIds(List<String> permissionIds)
permissionIds
- permissionIds or null
for nonepublic List<Permission> getPermissions()
null
for nonepublic File setPermissions(List<Permission> permissions)
permissions
- permissions or null
for nonepublic Map<String,String> getProperties()
null
for nonepublic File setProperties(Map<String,String> properties)
properties
- properties or null
for nonepublic Long getQuotaBytesUsed()
null
for nonepublic File setQuotaBytesUsed(Long quotaBytesUsed)
quotaBytesUsed
- quotaBytesUsed or null
for nonepublic String getResourceKey()
null
for nonepublic File setResourceKey(String resourceKey)
resourceKey
- resourceKey or null
for nonepublic String getSha1Checksum()
null
for nonepublic File setSha1Checksum(String sha1Checksum)
sha1Checksum
- sha1Checksum or null
for nonepublic String getSha256Checksum()
null
for nonepublic File setSha256Checksum(String sha256Checksum)
sha256Checksum
- sha256Checksum or null
for nonepublic Boolean getShared()
null
for nonepublic File setShared(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 File.ShortcutDetails getShortcutDetails()
null
for nonepublic File setShortcutDetails(File.ShortcutDetails shortcutDetails)
shortcutDetails
- shortcutDetails or null
for nonepublic Long getSize()
null
for nonepublic File setSize(Long size)
size
- size or null
for nonepublic List<String> getSpaces()
null
for nonepublic File setSpaces(List<String> spaces)
spaces
- spaces or null
for nonepublic Boolean getStarred()
null
for nonepublic File setStarred(Boolean starred)
starred
- starred or null
for nonepublic String getTeamDriveId()
null
for nonepublic File setTeamDriveId(String teamDriveId)
teamDriveId
- teamDriveId or null
for nonepublic String getThumbnailLink()
null
for nonepublic File setThumbnailLink(String thumbnailLink)
thumbnailLink
- thumbnailLink or null
for nonepublic Long getThumbnailVersion()
null
for nonepublic File setThumbnailVersion(Long thumbnailVersion)
thumbnailVersion
- thumbnailVersion or null
for nonepublic Boolean getTrashed()
null
for nonepublic File setTrashed(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 Long getVersion()
null
for nonepublic File setVersion(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 Boolean getViewedByMe()
null
for nonepublic File setViewedByMe(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 Boolean getViewersCanCopyContent()
null
for nonepublic File setViewersCanCopyContent(Boolean viewersCanCopyContent)
viewersCanCopyContent
- viewersCanCopyContent 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 com.google.api.client.json.GenericJson
public File clone()
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.