[−][src]Struct google_drive2::File
The metadata for a file.
Activities
This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).
- watch files (none)
- empty trash files (none)
- generate ids files (none)
- copy files (request|response)
- list files (none)
- delete files (none)
- patch files (request|response)
- update files (request|response)
- insert files (request|response)
- untrash files (response)
- trash files (response)
- touch files (response)
- get files (response)
- export files (none)
Fields
has_thumbnail: Option<bool>
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.
app_data_contents: Option<bool>
Whether this file is in the Application Data folder.
thumbnail_link: Option<String>
A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
labels: Option<FileLabels>
A group of labels for the file.
spaces: Option<Vec<String>>
The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Whether the file was created or opened by the requesting app.
last_modifying_user_name: Option<String>
Name of the last user to modify this file.
Whether writers can share the document with other users. Not populated for items in shared drives.
sharing_user: Option<User>
User that shared the item with the current user, if available.
last_modifying_user: Option<User>
The last user to modify this file.
copyable: Option<bool>
Deprecated: use capabilities/canCopy.
capabilities: Option<FileCapabilities>
Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
web_view_link: Option<String>
A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
last_viewed_by_me_date: Option<String>
Last time this file was viewed by the user (formatted RFC 3339 timestamp).
parents: Option<Vec<ParentReference>>
Collection of parent folders which contain this file. If not specified as part of an insert request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
copy_requires_writer_permission: Option<bool>
Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
full_file_extension: Option<String>
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 Google Docs or shortcut files.
trashed_date: Option<String>
The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
can_read_revisions: Option<bool>
Deprecated: use capabilities/canReadRevisions.
default_open_with_link: Option<String>
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.
editable: Option<bool>
Deprecated: use capabilities/canEdit.
embed_link: Option<String>
A link for embedding the file.
can_comment: Option<bool>
Deprecated: use capabilities/canComment.
modified_date: Option<String>
Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
created_date: Option<String>
Create time for this file (formatted RFC 3339 timestamp).
team_drive_id: Option<String>
Deprecated - use driveId instead.
md5_checksum: Option<String>
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 Google Docs or shortcut files.
icon_link: Option<String>
A link to the file's icon.
image_media_metadata: Option<FileImageMediaMetadata>
Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
kind: Option<String>
The type of file. This is always drive#file.
alternate_link: Option<String>
A link for opening the file in a relevant Google editor or viewer.
drive_id: Option<String>
ID of the shared drive the file resides in. Only populated for items in shared drives.
user_permission: Option<Permission>
The permissions for the authenticated user on this file.
Deprecated: use capabilities/canShare.
original_filename: Option<String>
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.
file_extension: Option<String>
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 Google Docs or shortcut files.
has_augmented_permissions: Option<bool>
Whether there are permissions directly on this file. This field is only populated for items in shared drives.
permissions: Option<Vec<Permission>>
The list of permissions for users with access to this file. Not populated for items in shared drives.
head_revision_id: Option<String>
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 Google Docs or shortcut files.
mime_type: Option<String>
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.
indexable_text: Option<FileIndexableText>
Indexable text attributes for the file (can only be written)
thumbnail_version: Option<String>
The thumbnail version for use in thumbnail cache invalidation.
explicitly_trashed: Option<bool>
Whether this file has been explicitly trashed, as opposed to recursively trashed.
etag: Option<String>
ETag of the file.
owned_by_me: Option<bool>
Whether the file is owned by the current user. Not populated for items in shared drives.
id: Option<String>
The ID of the file.
shortcut_details: Option<FileShortcutDetails>
Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
download_url: Option<String>
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.
video_media_metadata: Option<FileVideoMediaMetadata>
Metadata about video media. This will only be present for video types.
folder_color_rgb: Option<String>
Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
owner_names: Option<Vec<String>>
Name(s) of the owner(s) of this file. Not populated for items in shared drives.
Time at which this file was shared with the user (formatted RFC 3339 timestamp).
version: Option<String>
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.
export_links: Option<HashMap<String, String>>
Links for exporting Google Docs to specific formats.
Whether the file has been shared. Not populated for items in shared drives.
thumbnail: Option<FileThumbnail>
A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
open_with_links: Option<HashMap<String, String>>
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.
description: Option<String>
A short description of the file.
web_content_link: Option<String>
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.
marked_viewed_by_me_date: Option<String>
Deprecated.
file_size: Option<String>
The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
properties: Option<Vec<Property>>
The list of properties.
owners: Option<Vec<User>>
The owner(s) of this file. Not populated for items in shared drives.
title: Option<String>
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.
modified_by_me_date: Option<String>
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.
trashing_user: Option<User>
If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
permission_ids: Option<Vec<String>>
List of permission IDs for users with access to this file.
quota_bytes_used: Option<String>
The number of quota bytes used by this file.
self_link: Option<String>
A link back to this file.
Trait Implementations
impl Clone for File
[src]
impl Debug for File
[src]
impl Default for File
[src]
impl<'de> Deserialize<'de> for File
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl RequestValue for File
[src]
impl Resource for File
[src]
impl ResponseResult for File
[src]
impl Serialize for File
[src]
Auto Trait Implementations
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnwindSafe for File
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,