Struct google_drive2::File[][src]

pub struct File {
    pub has_thumbnail: Option<bool>,
    pub app_data_contents: Option<bool>,
    pub thumbnail_link: Option<String>,
    pub labels: Option<FileLabels>,
    pub spaces: Option<Vec<String>>,
    pub is_app_authorized: Option<bool>,
    pub last_modifying_user_name: Option<String>,
    pub writers_can_share: Option<bool>,
    pub sharing_user: Option<User>,
    pub last_modifying_user: Option<User>,
    pub copyable: Option<bool>,
    pub capabilities: Option<FileCapabilities>,
    pub web_view_link: Option<String>,
    pub last_viewed_by_me_date: Option<String>,
    pub parents: Option<Vec<ParentReference>>,
    pub icon_link: Option<String>,
    pub full_file_extension: Option<String>,
    pub trashed_date: Option<String>,
    pub can_read_revisions: Option<bool>,
    pub default_open_with_link: Option<String>,
    pub editable: Option<bool>,
    pub embed_link: Option<String>,
    pub can_comment: Option<bool>,
    pub modified_date: Option<String>,
    pub created_date: Option<String>,
    pub team_drive_id: Option<String>,
    pub md5_checksum: Option<String>,
    pub permissions: Option<Vec<Permission>>,
    pub image_media_metadata: Option<FileImageMediaMetadata>,
    pub kind: Option<String>,
    pub alternate_link: Option<String>,
    pub download_url: Option<String>,
    pub user_permission: Option<Permission>,
    pub shareable: Option<bool>,
    pub original_filename: Option<String>,
    pub file_extension: Option<String>,
    pub has_augmented_permissions: Option<bool>,
    pub head_revision_id: Option<String>,
    pub mime_type: Option<String>,
    pub indexable_text: Option<FileIndexableText>,
    pub thumbnail_version: Option<String>,
    pub explicitly_trashed: Option<bool>,
    pub etag: Option<String>,
    pub owned_by_me: Option<bool>,
    pub id: Option<String>,
    pub video_media_metadata: Option<FileVideoMediaMetadata>,
    pub folder_color_rgb: Option<String>,
    pub owner_names: Option<Vec<String>>,
    pub shared_with_me_date: Option<String>,
    pub version: Option<String>,
    pub export_links: Option<HashMap<String, String>>,
    pub shared: Option<bool>,
    pub thumbnail: Option<FileThumbnail>,
    pub open_with_links: Option<HashMap<String, String>>,
    pub description: Option<String>,
    pub web_content_link: Option<String>,
    pub marked_viewed_by_me_date: Option<String>,
    pub file_size: Option<String>,
    pub properties: Option<Vec<Property>>,
    pub owners: Option<Vec<User>>,
    pub title: Option<String>,
    pub modified_by_me_date: Option<String>,
    pub trashing_user: Option<User>,
    pub permission_ids: Option<Vec<String>>,
    pub quota_bytes_used: Option<String>,
    pub self_link: Option<String>,
}

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).

Fields

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.

Whether this file is in the Application Data folder.

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.

A group of labels for the file.

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.

Name of the last user to modify this file.

Whether writers can share the document with other users. Not populated for Team Drive files.

User that shared the item with the current user, if available.

The last user to modify this file.

Deprecated: use capabilities/canCopy.

Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.

A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.

Last time this file was viewed by the user (formatted RFC 3339 timestamp).

Collection of parent folders which contain this file. Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.

A link to the file's icon.

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 Drive; it is not populated for Google Docs or shortcut files.

The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for Team Drive files.

Deprecated: use capabilities/canReadRevisions.

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.

Deprecated: use capabilities/canEdit.

A link for embedding the file.

Deprecated: use capabilities/canComment.

Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.

Create time for this file (formatted RFC 3339 timestamp).

ID of the Team Drive the file resides in.

An MD5 checksum for the content of this file. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.

The list of permissions for users with access to this file. Not populated for Team Drive files.

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.

The type of file. This is always drive#file.

A link for opening the file in a relevant Google editor or viewer.

no description provided

The permissions for the authenticated user on this file.

Deprecated: use capabilities/canShare.

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 Drive.

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 Drive; it is not populated for Google Docs or shortcut files.

Whether any users are granted file access directly on this file. This field is only populated for Team Drive files.

The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.

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 attributes for the file (can only be written)

The thumbnail version for use in thumbnail cache invalidation.

Whether this file has been explicitly trashed, as opposed to recursively trashed.

ETag of the file.

Whether the file is owned by the current user. Not populated for Team Drive files.

The ID of the file.

Metadata about video media. This will only be present for video types.

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 Team Drive files.

Name(s) of the owner(s) of this file. Not populated for Team Drive files.

Time at which this file was shared with the user (formatted RFC 3339 timestamp).

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.

Links for exporting Google Docs to specific formats.

Whether the file has been shared. Not populated for Team Drive files.

A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail.

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.

A short description of the file.

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.

Deprecated.

The size of the file in bytes. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.

The list of properties.

The owner(s) of this file. Not populated for Team Drive files.

The title of this file. Note that for immutable items such as the top level folders of Team Drives, My Drive root folder, and Application Data folder the title is constant.

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.

If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files.

List of permission IDs for users with access to this file.

The number of quota bytes used by this file.

A link back to this file.

Trait Implementations

impl Default for File
[src]

Returns the "default value" for a type. Read more

impl Clone for File
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for File
[src]

Formats the value using the given formatter. Read more

impl RequestValue for File
[src]

impl Resource for File
[src]

impl ResponseResult for File
[src]

Auto Trait Implementations

impl Send for File

impl Sync for File