class Google::Apis::DriveV2::File
The metadata for a file.
Attributes
A link for opening the file in a relevant Google editor or viewer. Corresponds to the JSON property `alternateLink` @return [String]
Whether this file is in the Application Data folder. Corresponds to the JSON property `appDataContents` @return [Boolean]
Whether this file is in the Application Data folder. Corresponds to the JSON property `appDataContents` @return [Boolean]
Whether the current user can comment on the file. Corresponds to the JSON property `canComment` @return [Boolean]
Whether the current user can comment on the file. Corresponds to the JSON property `canComment` @return [Boolean]
Whether the current user has read access to the Revisions resource of the file. Corresponds to the JSON property `canReadRevisions` @return [Boolean]
Whether the current user has read access to the Revisions resource of the file. Corresponds to the JSON property `canReadRevisions` @return [Boolean]
Whether the file can be copied by the current user. Corresponds to the JSON property `copyable` @return [Boolean]
Whether the file can be copied by the current user. Corresponds to the JSON property `copyable` @return [Boolean]
Create time for this file (formatted RFC 3339 timestamp). Corresponds to the JSON property `createdDate` @return [DateTime]
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. Corresponds to the JSON property `defaultOpenWithLink` @return [String]
A short description of the file. Corresponds to the JSON property `description` @return [String]
Corresponds to the JSON property `downloadUrl` @return [String]
Whether the file can be edited by the current user. Corresponds to the JSON property `editable` @return [Boolean]
Whether the file can be edited by the current user. Corresponds to the JSON property `editable` @return [Boolean]
A link for embedding the file. Corresponds to the JSON property `embedLink` @return [String]
ETag of the file. Corresponds to the JSON property `etag` @return [String]
Whether this file has been explicitly trashed, as opposed to recursively trashed. Corresponds to the JSON property `explicitlyTrashed` @return [Boolean]
Whether this file has been explicitly trashed, as opposed to recursively trashed. Corresponds to the JSON property `explicitlyTrashed` @return [Boolean]
Links for exporting Google Docs to specific formats. Corresponds to the JSON property `exportLinks` @return [Hash<String,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 Drive; it is not populated for Google Docs or shortcut files. Corresponds to the JSON property `fileExtension` @return [String]
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. Corresponds to the JSON property `fileSize` @return [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. Corresponds to the JSON property `folderColorRgb` @return [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 Drive; it is not populated for Google Docs or shortcut files. Corresponds to the JSON property `fullFileExtension` @return [String]
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. Corresponds to the JSON property `headRevisionId` @return [String]
A link to the file's icon. Corresponds to the JSON property `iconLink` @return [String]
The ID of the file. Corresponds to the JSON property `id` @return [String]
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. Corresponds to the JSON property `imageMediaMetadata` @return [Google::Apis::DriveV2::File::ImageMediaMetadata]
Indexable text attributes for the file (can only be written) Corresponds to the JSON property `indexableText` @return [Google::Apis::DriveV2::File::IndexableText]
The type of file. This is always drive#file. Corresponds to the JSON property `kind` @return [String]
A group of labels for the file. Corresponds to the JSON property `labels` @return [Google::Apis::DriveV2::File::Labels]
Information about a Drive user. Corresponds to the JSON property `lastModifyingUser` @return [Google::Apis::DriveV2::User]
Name of the last user to modify this file. Corresponds to the JSON property `lastModifyingUserName` @return [String]
Last time this file was viewed by the user (formatted RFC 3339 timestamp). Corresponds to the JSON property `lastViewedByMeDate` @return [DateTime]
Deprecated. Corresponds to the JSON property `markedViewedByMeDate` @return [DateTime]
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. Corresponds to the JSON property `md5Checksum` @return [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. Corresponds to the JSON property `mimeType` @return [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. Corresponds to the JSON property `modifiedByMeDate` @return [DateTime]
Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set. Corresponds to the JSON property `modifiedDate` @return [DateTime]
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. Corresponds to the JSON property `openWithLinks` @return [Hash<String,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 Drive. Corresponds to the JSON property `originalFilename` @return [String]
Whether the file is owned by the current user. Corresponds to the JSON property `ownedByMe` @return [Boolean]
Whether the file is owned by the current user. Corresponds to the JSON property `ownedByMe` @return [Boolean]
Name(s) of the owner(s) of this file. Corresponds to the JSON property `ownerNames` @return [Array<String>]
The owner(s) of this file. Corresponds to the JSON property `owners` @return [Array<Google::Apis::DriveV2::User>]
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. Corresponds to the JSON property `parents` @return [Array<Google::Apis::DriveV2::ParentReference>]
The list of permissions for users with access to this file. Corresponds to the JSON property `permissions` @return [Array<Google::Apis::DriveV2::Permission>]
The list of properties. Corresponds to the JSON property `properties` @return [Array<Google::Apis::DriveV2::Property>]
The number of quota bytes used by this file. Corresponds to the JSON property `quotaBytesUsed` @return [String]
A link back to this file. Corresponds to the JSON property `selfLink` @return [String]
Information about a Drive user. Corresponds to the JSON property `sharingUser` @return [Google::Apis::DriveV2::User]
The list of spaces which contain the file. Supported values are 'drive', ' appDataFolder' and 'photos'. Corresponds to the JSON property `spaces` @return [Array<String>]
A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Corresponds to the JSON property `thumbnailLink` @return [String]
The title of this file. Corresponds to the JSON property `title` @return [String]
A permission for a file. Corresponds to the JSON property `userPermission` @return [Google::Apis::DriveV2::Permission]
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. Corresponds to the JSON property `version` @return [String]
Metadata about video media. This will only be present for video types. Corresponds to the JSON property `videoMediaMetadata` @return [Google::Apis::DriveV2::File::VideoMediaMetadata]
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. Corresponds to the JSON property `webContentLink` @return [String]
A link only available on public folders for viewing their static web assets ( HTML, CSS, JS, etc) via Google Drive's Website Hosting. Corresponds to the JSON property `webViewLink` @return [String]
Public Class Methods
# File generated/google/apis/drive_v2/classes.rb, line 1537 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File generated/google/apis/drive_v2/classes.rb, line 1542 def update!(**args) @alternate_link = args[:alternate_link] if args.key?(:alternate_link) @app_data_contents = args[:app_data_contents] if args.key?(:app_data_contents) @can_comment = args[:can_comment] if args.key?(:can_comment) @can_read_revisions = args[:can_read_revisions] if args.key?(:can_read_revisions) @copyable = args[:copyable] if args.key?(:copyable) @created_date = args[:created_date] if args.key?(:created_date) @default_open_with_link = args[:default_open_with_link] if args.key?(:default_open_with_link) @description = args[:description] if args.key?(:description) @download_url = args[:download_url] if args.key?(:download_url) @editable = args[:editable] if args.key?(:editable) @embed_link = args[:embed_link] if args.key?(:embed_link) @etag = args[:etag] if args.key?(:etag) @explicitly_trashed = args[:explicitly_trashed] if args.key?(:explicitly_trashed) @export_links = args[:export_links] if args.key?(:export_links) @file_extension = args[:file_extension] if args.key?(:file_extension) @file_size = args[:file_size] if args.key?(:file_size) @folder_color_rgb = args[:folder_color_rgb] if args.key?(:folder_color_rgb) @full_file_extension = args[:full_file_extension] if args.key?(:full_file_extension) @head_revision_id = args[:head_revision_id] if args.key?(:head_revision_id) @icon_link = args[:icon_link] if args.key?(:icon_link) @id = args[:id] if args.key?(:id) @image_media_metadata = args[:image_media_metadata] if args.key?(:image_media_metadata) @indexable_text = args[:indexable_text] if args.key?(:indexable_text) @is_app_authorized = args[:is_app_authorized] if args.key?(:is_app_authorized) @kind = args[:kind] if args.key?(:kind) @labels = args[:labels] if args.key?(:labels) @last_modifying_user = args[:last_modifying_user] if args.key?(:last_modifying_user) @last_modifying_user_name = args[:last_modifying_user_name] if args.key?(:last_modifying_user_name) @last_viewed_by_me_date = args[:last_viewed_by_me_date] if args.key?(:last_viewed_by_me_date) @marked_viewed_by_me_date = args[:marked_viewed_by_me_date] if args.key?(:marked_viewed_by_me_date) @md5_checksum = args[:md5_checksum] if args.key?(:md5_checksum) @mime_type = args[:mime_type] if args.key?(:mime_type) @modified_by_me_date = args[:modified_by_me_date] if args.key?(:modified_by_me_date) @modified_date = args[:modified_date] if args.key?(:modified_date) @open_with_links = args[:open_with_links] if args.key?(:open_with_links) @original_filename = args[:original_filename] if args.key?(:original_filename) @owned_by_me = args[:owned_by_me] if args.key?(:owned_by_me) @owner_names = args[:owner_names] if args.key?(:owner_names) @owners = args[:owners] if args.key?(:owners) @parents = args[:parents] if args.key?(:parents) @permissions = args[:permissions] if args.key?(:permissions) @properties = args[:properties] if args.key?(:properties) @quota_bytes_used = args[:quota_bytes_used] if args.key?(:quota_bytes_used) @self_link = args[:self_link] if args.key?(:self_link) @shareable = args[:shareable] if args.key?(:shareable) @shared = args[:shared] if args.key?(:shared) @shared_with_me_date = args[:shared_with_me_date] if args.key?(:shared_with_me_date) @sharing_user = args[:sharing_user] if args.key?(:sharing_user) @spaces = args[:spaces] if args.key?(:spaces) @thumbnail = args[:thumbnail] if args.key?(:thumbnail) @thumbnail_link = args[:thumbnail_link] if args.key?(:thumbnail_link) @title = args[:title] if args.key?(:title) @user_permission = args[:user_permission] if args.key?(:user_permission) @version = args[:version] if args.key?(:version) @video_media_metadata = args[:video_media_metadata] if args.key?(:video_media_metadata) @web_content_link = args[:web_content_link] if args.key?(:web_content_link) @web_view_link = args[:web_view_link] if args.key?(:web_view_link) @writers_can_share = args[:writers_can_share] if args.key?(:writers_can_share) end