class Google::Apis::DriveV3::File
The metadata for a file.
Attributes
A collection of arbitrary key-value pairs which are private to the requesting app. Entries with null values are cleared in update and copy requests. These properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties. Corresponds to the JSON property `appProperties` @return [Hash<String,String>]
Capabilities
the current user has on this file. Each capability corresponds to a fine-grained action that a user may take. Corresponds to the JSON property `capabilities` @return [Google::Apis::DriveV3::File::Capabilities]
Additional information about the content of the file. These fields are never populated in responses. Corresponds to the JSON property `contentHints` @return [Google::Apis::DriveV3::File::ContentHints]
Restrictions for accessing the content of the file. Only populated if such a restriction exists. Corresponds to the JSON property `contentRestrictions` @return [Array<Google::Apis::DriveV3::ContentRestriction>]
Whether the options to copy, print, or download this file, should be disabled for readers and commenters. Corresponds to the JSON property `copyRequiresWriterPermission` @return [Boolean]
Whether the options to copy, print, or download this file, should be disabled for readers and commenters. Corresponds to the JSON property `copyRequiresWriterPermission` @return [Boolean]
The time at which the file was created (RFC 3339 date-time). Corresponds to the JSON property `createdTime` @return [DateTime]
A short description of the file. Corresponds to the JSON property `description` @return [String]
ID of the shared drive the file resides in. Only populated for items in shared drives. Corresponds to the JSON property `driveId` @return [String]
Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder. Corresponds to the JSON property `explicitlyTrashed` @return [Boolean]
Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder. Corresponds to the JSON property `explicitlyTrashed` @return [Boolean]
Links for exporting Docs Editors files to specific formats. Corresponds to the JSON property `exportLinks` @return [Hash<String,String>]
The color for a folder or shortcut to a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About
resource. If an unsupported color is specified, the closest color in the palette will be used instead. Corresponds to the JSON property `folderColorRgb` @return [String]
The full file extension extracted from the name field. May contain multiple concatenated extensions, such as “tar.gz”. This is only available for files with binary content in Google
Drive
. This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension. Corresponds to the JSON property `fullFileExtension` @return [String]
Whether there are permissions directly on this file. This field is only populated for items in shared drives. Corresponds to the JSON property `hasAugmentedPermissions` @return [Boolean]
Whether there are permissions directly on this file. This field is only populated for items in shared drives. Corresponds to the JSON property `hasAugmentedPermissions` @return [Boolean]
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. Corresponds to the JSON property `hasThumbnail` @return [Boolean]
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. Corresponds to the JSON property `hasThumbnail` @return [Boolean]
A static, unauthenticated 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]
Additional metadata about image media, if available. Corresponds to the JSON property `imageMediaMetadata` @return [Google::Apis::DriveV3::File::ImageMediaMetadata]
Identifies what kind of resource this is. Value: the fixed string “drive#file”. Corresponds to the JSON property `kind` @return [String]
Information about a Drive
user. Corresponds to the JSON property `lastModifyingUser` @return [Google::Apis::DriveV3::User]
The MIME type of the file. Google
Drive
will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded. If a file is created with a Google
Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About
resource. Corresponds to the JSON property `mimeType` @return [String]
Whether the file has been modified by this user. Corresponds to the JSON property `modifiedByMe` @return [Boolean]
Whether the file has been modified by this user. Corresponds to the JSON property `modifiedByMe` @return [Boolean]
The last time the file was modified by the user (RFC 3339 date-time). Corresponds to the JSON property `modifiedByMeTime` @return [DateTime]
The last time the file was modified by anyone (RFC 3339 date-time). Note that setting modifiedTime will also update modifiedByMeTime for the user. Corresponds to the JSON property `modifiedTime` @return [DateTime]
The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive
root folder, and Application Data folder the name is constant. Corresponds to the JSON property `name` @return [String]
Whether the user owns the file. Not populated for items in shared drives. Corresponds to the JSON property `ownedByMe` @return [Boolean]
Whether the user owns the file. Not populated for items in shared drives. Corresponds to the JSON property `ownedByMe` @return [Boolean]
The owner of this file. Only certain legacy files may have more than one owner. This field isn't populated for items in shared drives. Corresponds to the JSON property `owners` @return [Array<Google::Apis::DriveV3::User>]
The IDs of the parent folders which contain the file. If not specified as part of a create 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 must use the addParents and removeParents parameters to modify the parents list. Corresponds to the JSON property `parents` @return [Array<String>]
List of permission IDs for users with access to this file. Corresponds to the JSON property `permissionIds` @return [Array<String>]
The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives. Corresponds to the JSON property `permissions` @return [Array<Google::Apis::DriveV3::Permission>]
A collection of arbitrary key-value pairs which are visible to all apps. Entries with null values are cleared in update and copy requests. Corresponds to the JSON property `properties` @return [Hash<String,String>]
The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled. Corresponds to the JSON property `quotaBytesUsed` @return [Fixnum]
A key needed to access the item via a shared link. Corresponds to the JSON property `resourceKey` @return [String]
Information about a Drive
user. Corresponds to the JSON property `sharingUser` @return [Google::Apis::DriveV3::User]
Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut. Corresponds to the JSON property `shortcutDetails` @return [Google::Apis::DriveV3::File::ShortcutDetails]
The list of spaces which contain the file. The currently supported values are ' drive', 'appDataFolder' and 'photos'. Corresponds to the JSON property `spaces` @return [Array<String>]
Whether the user has starred the file. Corresponds to the JSON property `starred` @return [Boolean]
Whether the user has starred the file. Corresponds to the JSON property `starred` @return [Boolean]
Deprecated - use driveId instead. Corresponds to the JSON property `teamDriveId` @return [String]
A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file' s content. If the file isn't shared publicly, the URL returned in Files. thumbnailLink must be fetched using a credentialed request. Corresponds to the JSON property `thumbnailLink` @return [String]
The thumbnail version for use in thumbnail cache invalidation. Corresponds to the JSON property `thumbnailVersion` @return [Fixnum]
Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file. Corresponds to the JSON property `trashed` @return [Boolean]
Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file. Corresponds to the JSON property `trashed` @return [Boolean]
The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives. Corresponds to the JSON property `trashedTime` @return [DateTime]
Information about a Drive
user. Corresponds to the JSON property `trashingUser` @return [Google::Apis::DriveV3::User]
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 user. Corresponds to the JSON property `version` @return [Fixnum]
Additional metadata about video media. This may not be available immediately upon upload. Corresponds to the JSON property `videoMediaMetadata` @return [Google::Apis::DriveV3::File::VideoMediaMetadata]
Whether the file has been viewed by this user. Corresponds to the JSON property `viewedByMe` @return [Boolean]
Whether the file has been viewed by this user. Corresponds to the JSON property `viewedByMe` @return [Boolean]
The last time the file was viewed by the user (RFC 3339 date-time). Corresponds to the JSON property `viewedByMeTime` @return [DateTime]
Deprecated - use copyRequiresWriterPermission instead. Corresponds to the JSON property `viewersCanCopyContent` @return [Boolean]
Deprecated - use copyRequiresWriterPermission instead. Corresponds to the JSON property `viewersCanCopyContent` @return [Boolean]
A link for opening the file in a relevant Google
editor or viewer in a browser. Corresponds to the JSON property `webViewLink` @return [String]
Public Class Methods
# File lib/google/apis/drive_v3/classes.rb, line 1377 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File lib/google/apis/drive_v3/classes.rb, line 1382 def update!(**args) @app_properties = args[:app_properties] if args.key?(:app_properties) @capabilities = args[:capabilities] if args.key?(:capabilities) @content_hints = args[:content_hints] if args.key?(:content_hints) @content_restrictions = args[:content_restrictions] if args.key?(:content_restrictions) @copy_requires_writer_permission = args[:copy_requires_writer_permission] if args.key?(:copy_requires_writer_permission) @created_time = args[:created_time] if args.key?(:created_time) @description = args[:description] if args.key?(:description) @drive_id = args[:drive_id] if args.key?(:drive_id) @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) @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) @has_augmented_permissions = args[:has_augmented_permissions] if args.key?(:has_augmented_permissions) @has_thumbnail = args[:has_thumbnail] if args.key?(:has_thumbnail) @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) @is_app_authorized = args[:is_app_authorized] if args.key?(:is_app_authorized) @kind = args[:kind] if args.key?(:kind) @last_modifying_user = args[:last_modifying_user] if args.key?(:last_modifying_user) @link_share_metadata = args[:link_share_metadata] if args.key?(:link_share_metadata) @md5_checksum = args[:md5_checksum] if args.key?(:md5_checksum) @mime_type = args[:mime_type] if args.key?(:mime_type) @modified_by_me = args[:modified_by_me] if args.key?(:modified_by_me) @modified_by_me_time = args[:modified_by_me_time] if args.key?(:modified_by_me_time) @modified_time = args[:modified_time] if args.key?(:modified_time) @name = args[:name] if args.key?(:name) @original_filename = args[:original_filename] if args.key?(:original_filename) @owned_by_me = args[:owned_by_me] if args.key?(:owned_by_me) @owners = args[:owners] if args.key?(:owners) @parents = args[:parents] if args.key?(:parents) @permission_ids = args[:permission_ids] if args.key?(:permission_ids) @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) @resource_key = args[:resource_key] if args.key?(:resource_key) @shared = args[:shared] if args.key?(:shared) @shared_with_me_time = args[:shared_with_me_time] if args.key?(:shared_with_me_time) @sharing_user = args[:sharing_user] if args.key?(:sharing_user) @shortcut_details = args[:shortcut_details] if args.key?(:shortcut_details) @size = args[:size] if args.key?(:size) @spaces = args[:spaces] if args.key?(:spaces) @starred = args[:starred] if args.key?(:starred) @team_drive_id = args[:team_drive_id] if args.key?(:team_drive_id) @thumbnail_link = args[:thumbnail_link] if args.key?(:thumbnail_link) @thumbnail_version = args[:thumbnail_version] if args.key?(:thumbnail_version) @trashed = args[:trashed] if args.key?(:trashed) @trashed_time = args[:trashed_time] if args.key?(:trashed_time) @trashing_user = args[:trashing_user] if args.key?(:trashing_user) @version = args[:version] if args.key?(:version) @video_media_metadata = args[:video_media_metadata] if args.key?(:video_media_metadata) @viewed_by_me = args[:viewed_by_me] if args.key?(:viewed_by_me) @viewed_by_me_time = args[:viewed_by_me_time] if args.key?(:viewed_by_me_time) @viewers_can_copy_content = args[:viewers_can_copy_content] if args.key?(:viewers_can_copy_content) @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