Class: Google::Apis::DriveV2::File
- Inherits:
-
Object
- Object
- Google::Apis::DriveV2::File
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/drive_v2/classes.rb,
lib/google/apis/drive_v2/representations.rb,
lib/google/apis/drive_v2/representations.rb
Overview
The metadata for a file. Some resource methods (such as files.update)
require a fileId. Use the files.list method to retrieve the ID for a file.
Defined Under Namespace
Classes: Capabilities, ImageMediaMetadata, IndexableText, LabelInfo, Labels, LinkShareMetadata, ShortcutDetails, Thumbnail, VideoMediaMetadata
Instance Attribute Summary collapse
-
#alternate_link ⇒ String
Output only.
-
#app_data_contents ⇒ Boolean
(also: #app_data_contents?)
Output only.
-
#can_comment ⇒ Boolean
(also: #can_comment?)
Output only.
-
#can_read_revisions ⇒ Boolean
(also: #can_read_revisions?)
Output only.
-
#capabilities ⇒ Google::Apis::DriveV2::File::Capabilities
Output only.
-
#client_encryption_details ⇒ Google::Apis::DriveV2::ClientEncryptionDetails
Details about the client-side encryption applied to the file.
-
#content_restrictions ⇒ Array<Google::Apis::DriveV2::ContentRestriction>
Restrictions for accessing the content of the file.
-
#copy_requires_writer_permission ⇒ Boolean
(also: #copy_requires_writer_permission?)
Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
-
#copyable ⇒ Boolean
(also: #copyable?)
Output only.
-
#created_date ⇒ DateTime
Create time for this file (formatted RFC 3339 timestamp).
-
#default_open_with_link ⇒ String
Output only.
-
#description ⇒ String
A short description of the file.
-
#download_url ⇒ String
Output only.
-
#drive_id ⇒ String
Output only.
-
#editable ⇒ Boolean
(also: #editable?)
Output only.
-
#embed_link ⇒ String
Output only.
-
#etag ⇒ String
Output only.
-
#explicitly_trashed ⇒ Boolean
(also: #explicitly_trashed?)
Output only.
-
#export_links ⇒ Hash<String,String>
Output only.
-
#file_extension ⇒ String
Output only.
-
#file_size ⇒ Fixnum
Output only.
-
#folder_color_rgb ⇒ String
Folder color as an RGB hex string if the file is a folder or a shortcut to a folder.
-
#full_file_extension ⇒ String
Output only.
-
#has_augmented_permissions ⇒ Boolean
(also: #has_augmented_permissions?)
Output only.
-
#has_thumbnail ⇒ Boolean
(also: #has_thumbnail?)
Output only.
-
#head_revision_id ⇒ String
Output only.
-
#icon_link ⇒ String
Output only.
-
#id ⇒ String
The ID of the file.
-
#image_media_metadata ⇒ Google::Apis::DriveV2::File::ImageMediaMetadata
Output only.
-
#indexable_text ⇒ Google::Apis::DriveV2::File::IndexableText
Indexable text attributes for the file (can only be written) Corresponds to the JSON property
indexableText. -
#inherited_permissions_disabled ⇒ Boolean
(also: #inherited_permissions_disabled?)
Whether this file has inherited permissions disabled.
-
#is_app_authorized ⇒ Boolean
(also: #is_app_authorized?)
Output only.
-
#kind ⇒ String
Output only.
-
#label_info ⇒ Google::Apis::DriveV2::File::LabelInfo
Output only.
-
#labels ⇒ Google::Apis::DriveV2::File::Labels
A group of labels for the file.
-
#last_modifying_user ⇒ Google::Apis::DriveV2::User
Information about a Drive user.
-
#last_modifying_user_name ⇒ String
Output only.
-
#last_viewed_by_me_date ⇒ DateTime
Last time this file was viewed by the user (formatted RFC 3339 timestamp).
-
#link_share_metadata ⇒ Google::Apis::DriveV2::File::LinkShareMetadata
Contains details about the link URLs that clients are using to refer to this item.
-
#marked_viewed_by_me_date ⇒ DateTime
Deprecated.
-
#md5_checksum ⇒ String
Output only.
-
#mime_type ⇒ String
The MIME type of the file.
-
#modified_by_me_date ⇒ DateTime
Last time this file was modified by the user (formatted RFC 3339 timestamp).
-
#modified_date ⇒ DateTime
Last time this file was modified by anyone (formatted RFC 3339 timestamp).
-
#open_with_links ⇒ Hash<String,String>
Output only.
-
#original_filename ⇒ String
The original filename of the uploaded content if available, or else the original value of the
titlefield. -
#owned_by_me ⇒ Boolean
(also: #owned_by_me?)
Output only.
-
#owner_names ⇒ Array<String>
Output only.
-
#owners ⇒ Array<Google::Apis::DriveV2::User>
Output only.
-
#parents ⇒ Array<Google::Apis::DriveV2::ParentReference>
The ID of the parent folder containing the file.
-
#permission_ids ⇒ Array<String>
Output only.
-
#permissions ⇒ Array<Google::Apis::DriveV2::Permission>
Output only.
-
#properties ⇒ Array<Google::Apis::DriveV2::Property>
The list of properties.
-
#quota_bytes_used ⇒ Fixnum
Output only.
-
#resource_key ⇒ String
Output only.
-
#self_link ⇒ String
Output only.
-
#sha1_checksum ⇒ String
Output only.
-
#sha256_checksum ⇒ String
Output only.
-
#shareable ⇒ Boolean
(also: #shareable?)
Output only.
-
#shared ⇒ Boolean
(also: #shared?)
Output only.
-
#shared_with_me_date ⇒ DateTime
Time at which this file was shared with the user (formatted RFC 3339 timestamp) .
-
#sharing_user ⇒ Google::Apis::DriveV2::User
Information about a Drive user.
-
#shortcut_details ⇒ Google::Apis::DriveV2::File::ShortcutDetails
Shortcut file details.
-
#spaces ⇒ Array<String>
Output only.
-
#team_drive_id ⇒ String
Output only.
-
#thumbnail ⇒ Google::Apis::DriveV2::File::Thumbnail
A thumbnail for the file.
-
#thumbnail_link ⇒ String
Output only.
-
#thumbnail_version ⇒ Fixnum
Output only.
-
#title ⇒ String
The title of this file.
-
#trashed_date ⇒ DateTime
The time that the item was trashed (formatted RFC 3339 timestamp).
-
#trashing_user ⇒ Google::Apis::DriveV2::User
Information about a Drive user.
-
#user_permission ⇒ Google::Apis::DriveV2::Permission
A permission for a file.
-
#version ⇒ Fixnum
Output only.
-
#video_media_metadata ⇒ Google::Apis::DriveV2::File::VideoMediaMetadata
Output only.
-
#web_content_link ⇒ String
Output only.
-
#web_view_link ⇒ String
Output only.
-
#writers_can_share ⇒ Boolean
(also: #writers_can_share?)
Whether writers can share the document with other users.
Instance Method Summary collapse
-
#initialize(**args) ⇒ File
constructor
A new instance of File.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ File
Returns a new instance of File.
2399 2400 2401 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2399 def initialize(**args) update!(**args) end |
Instance Attribute Details
#alternate_link ⇒ String
Output only. A link for opening the file in a relevant Google editor or viewer.
Corresponds to the JSON property alternateLink
1925 1926 1927 |
# File 'lib/google/apis/drive_v2/classes.rb', line 1925 def alternate_link @alternate_link end |
#app_data_contents ⇒ Boolean Also known as: app_data_contents?
Output only. Whether this file is in the Application Data folder.
Corresponds to the JSON property appDataContents
1930 1931 1932 |
# File 'lib/google/apis/drive_v2/classes.rb', line 1930 def app_data_contents @app_data_contents end |
#can_comment ⇒ Boolean Also known as: can_comment?
Output only. Deprecated: Use capabilities/canComment instead.
Corresponds to the JSON property canComment
1936 1937 1938 |
# File 'lib/google/apis/drive_v2/classes.rb', line 1936 def can_comment @can_comment end |
#can_read_revisions ⇒ Boolean Also known as: can_read_revisions?
Output only. Deprecated: Use capabilities/canReadRevisions instead.
Corresponds to the JSON property canReadRevisions
1942 1943 1944 |
# File 'lib/google/apis/drive_v2/classes.rb', line 1942 def can_read_revisions @can_read_revisions end |
#capabilities ⇒ Google::Apis::DriveV2::File::Capabilities
Output only. 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
1949 1950 1951 |
# File 'lib/google/apis/drive_v2/classes.rb', line 1949 def capabilities @capabilities end |
#client_encryption_details ⇒ Google::Apis::DriveV2::ClientEncryptionDetails
Details about the client-side encryption applied to the file.
Corresponds to the JSON property clientEncryptionDetails
1954 1955 1956 |
# File 'lib/google/apis/drive_v2/classes.rb', line 1954 def client_encryption_details @client_encryption_details end |
#content_restrictions ⇒ Array<Google::Apis::DriveV2::ContentRestriction>
Restrictions for accessing the content of the file. Only populated if such a
restriction exists.
Corresponds to the JSON property contentRestrictions
1960 1961 1962 |
# File 'lib/google/apis/drive_v2/classes.rb', line 1960 def content_restrictions @content_restrictions end |
#copy_requires_writer_permission ⇒ Boolean Also known as: copy_requires_writer_permission?
Whether the options to copy, print, or download this file, should be disabled
for readers and commenters.
Corresponds to the JSON property copyRequiresWriterPermission
1966 1967 1968 |
# File 'lib/google/apis/drive_v2/classes.rb', line 1966 def @copy_requires_writer_permission end |
#copyable ⇒ Boolean Also known as: copyable?
Output only. Deprecated: Use capabilities/canCopy instead.
Corresponds to the JSON property copyable
1972 1973 1974 |
# File 'lib/google/apis/drive_v2/classes.rb', line 1972 def copyable @copyable end |
#created_date ⇒ DateTime
Create time for this file (formatted RFC 3339 timestamp).
Corresponds to the JSON property createdDate
1978 1979 1980 |
# File 'lib/google/apis/drive_v2/classes.rb', line 1978 def created_date @created_date end |
#default_open_with_link ⇒ String
Output only. 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
1984 1985 1986 |
# File 'lib/google/apis/drive_v2/classes.rb', line 1984 def default_open_with_link @default_open_with_link end |
#description ⇒ String
A short description of the file.
Corresponds to the JSON property description
1989 1990 1991 |
# File 'lib/google/apis/drive_v2/classes.rb', line 1989 def description @description end |
#download_url ⇒ String
Output only. 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.
Corresponds to the JSON property downloadUrl
1996 1997 1998 |
# File 'lib/google/apis/drive_v2/classes.rb', line 1996 def download_url @download_url end |
#drive_id ⇒ String
Output only. ID of the shared drive the file resides in. Only populated for
items in shared drives.
Corresponds to the JSON property driveId
2002 2003 2004 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2002 def drive_id @drive_id end |
#editable ⇒ Boolean Also known as: editable?
Output only. Deprecated: Use capabilities/canEdit instead.
Corresponds to the JSON property editable
2007 2008 2009 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2007 def editable @editable end |
#embed_link ⇒ String
Output only. A link for embedding the file.
Corresponds to the JSON property embedLink
2013 2014 2015 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2013 def @embed_link end |
#etag ⇒ String
Output only. ETag of the file.
Corresponds to the JSON property etag
2018 2019 2020 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2018 def etag @etag end |
#explicitly_trashed ⇒ Boolean Also known as: explicitly_trashed?
Output only. Whether this file has been explicitly trashed, as opposed to
recursively trashed.
Corresponds to the JSON property explicitlyTrashed
2024 2025 2026 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2024 def explicitly_trashed @explicitly_trashed end |
#export_links ⇒ Hash<String,String>
Output only. Links for exporting Docs Editors files to specific formats.
Corresponds to the JSON property exportLinks
2030 2031 2032 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2030 def export_links @export_links end |
#file_extension ⇒ String
Output only. 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 Docs Editors or shortcut files.
Corresponds to the JSON property fileExtension
2038 2039 2040 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2038 def file_extension @file_extension end |
#file_size ⇒ Fixnum
Output only. Size in bytes of blobs and first party editor files. Won't be
populated for files that have no size, like shortcuts and folders.
Corresponds to the JSON property fileSize
2044 2045 2046 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2044 def file_size @file_size end |
#folder_color_rgb ⇒ String
Folder color as an RGB hex string if the file is a folder or a shortcut to 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
2052 2053 2054 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2052 def folder_color_rgb @folder_color_rgb end |
#full_file_extension ⇒ String
Output only. 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 Docs Editors or
shortcut files.
Corresponds to the JSON property fullFileExtension
2062 2063 2064 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2062 def full_file_extension @full_file_extension end |
#has_augmented_permissions ⇒ Boolean Also known as: has_augmented_permissions?
Output only. Whether there are permissions directly on this file. This field
is only populated for items in shared drives.
Corresponds to the JSON property hasAugmentedPermissions
2068 2069 2070 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2068 def @has_augmented_permissions end |
#has_thumbnail ⇒ Boolean Also known as: has_thumbnail?
Output only. 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
2076 2077 2078 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2076 def has_thumbnail @has_thumbnail end |
#head_revision_id ⇒ String
Output only. 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 Docs
Editors or shortcut files.
Corresponds to the JSON property headRevisionId
2084 2085 2086 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2084 def head_revision_id @head_revision_id end |
#icon_link ⇒ String
Output only. A link to the file's icon.
Corresponds to the JSON property iconLink
2089 2090 2091 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2089 def icon_link @icon_link end |
#id ⇒ String
The ID of the file.
Corresponds to the JSON property id
2094 2095 2096 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2094 def id @id end |
#image_media_metadata ⇒ Google::Apis::DriveV2::File::ImageMediaMetadata
Output only. 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
2101 2102 2103 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2101 def @image_media_metadata end |
#indexable_text ⇒ Google::Apis::DriveV2::File::IndexableText
Indexable text attributes for the file (can only be written)
Corresponds to the JSON property indexableText
2106 2107 2108 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2106 def indexable_text @indexable_text end |
#inherited_permissions_disabled ⇒ Boolean Also known as: inherited_permissions_disabled?
Whether this file has inherited permissions disabled. Inherited permissions
are enabled by default.
Corresponds to the JSON property inheritedPermissionsDisabled
2112 2113 2114 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2112 def @inherited_permissions_disabled end |
#is_app_authorized ⇒ Boolean Also known as:
Output only. Whether the file was created or opened by the requesting app.
Corresponds to the JSON property isAppAuthorized
2118 2119 2120 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2118 def @is_app_authorized end |
#kind ⇒ String
Output only. The type of file. This is always drive#file.
Corresponds to the JSON property kind
2124 2125 2126 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2124 def kind @kind end |
#label_info ⇒ Google::Apis::DriveV2::File::LabelInfo
Output only. An overview of the labels on the file.
Corresponds to the JSON property labelInfo
2129 2130 2131 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2129 def label_info @label_info end |
#labels ⇒ Google::Apis::DriveV2::File::Labels
A group of labels for the file.
Corresponds to the JSON property labels
2134 2135 2136 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2134 def labels @labels end |
#last_modifying_user ⇒ Google::Apis::DriveV2::User
Information about a Drive user.
Corresponds to the JSON property lastModifyingUser
2139 2140 2141 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2139 def @last_modifying_user end |
#last_modifying_user_name ⇒ String
Output only. Name of the last user to modify this file.
Corresponds to the JSON property lastModifyingUserName
2144 2145 2146 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2144 def @last_modifying_user_name end |
#last_viewed_by_me_date ⇒ DateTime
Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Corresponds to the JSON property lastViewedByMeDate
2149 2150 2151 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2149 def last_viewed_by_me_date @last_viewed_by_me_date end |
#link_share_metadata ⇒ Google::Apis::DriveV2::File::LinkShareMetadata
Contains details about the link URLs that clients are using to refer to this
item.
Corresponds to the JSON property linkShareMetadata
2155 2156 2157 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2155 def @link_share_metadata end |
#marked_viewed_by_me_date ⇒ DateTime
Deprecated.
Corresponds to the JSON property markedViewedByMeDate
2160 2161 2162 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2160 def marked_viewed_by_me_date @marked_viewed_by_me_date end |
#md5_checksum ⇒ String
Output only. 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 Docs Editors or shortcut files.
Corresponds to the JSON property md5Checksum
2167 2168 2169 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2167 def md5_checksum @md5_checksum end |
#mime_type ⇒ 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
2174 2175 2176 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2174 def mime_type @mime_type end |
#modified_by_me_date ⇒ DateTime
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
2181 2182 2183 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2181 def modified_by_me_date @modified_by_me_date end |
#modified_date ⇒ 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
2187 2188 2189 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2187 def modified_date @modified_date end |
#open_with_links ⇒ Hash<String,String>
Output only. 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
2193 2194 2195 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2193 def open_with_links @open_with_links end |
#original_filename ⇒ 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.
Corresponds to the JSON property originalFilename
2200 2201 2202 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2200 def original_filename @original_filename end |
#owned_by_me ⇒ Boolean Also known as: owned_by_me?
Output only. Whether the file is owned by the current user. Not populated for
items in shared drives.
Corresponds to the JSON property ownedByMe
2206 2207 2208 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2206 def owned_by_me @owned_by_me end |
#owner_names ⇒ Array<String>
Output only. Name(s) of the owner(s) of this file. Not populated for items in
shared drives.
Corresponds to the JSON property ownerNames
2213 2214 2215 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2213 def owner_names @owner_names end |
#owners ⇒ Array<Google::Apis::DriveV2::User>
Output only. 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
2219 2220 2221 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2219 def owners @owners end |
#parents ⇒ Array<Google::Apis::DriveV2::ParentReference>
The ID of the parent folder containing the file. A file can only have one
parent folder; specifying multiple parents isn't supported. If not specified
as part of an insert request, the file is placed directly in the user's My
Drive folder. If not specified as part of a copy request, the file inherits
any discoverable parent of the source file. Update requests must use the
addParents and removeParents parameters to modify the parents list.
Corresponds to the JSON property parents
2229 2230 2231 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2229 def parents @parents end |
#permission_ids ⇒ Array<String>
Output only. List of permission IDs for users with access to this file.
Corresponds to the JSON property permissionIds
2234 2235 2236 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2234 def @permission_ids end |
#permissions ⇒ Array<Google::Apis::DriveV2::Permission>
Output only. The list of permissions for users with access to this file. Not
populated for items in shared drives.
Corresponds to the JSON property permissions
2240 2241 2242 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2240 def @permissions end |
#properties ⇒ Array<Google::Apis::DriveV2::Property>
The list of properties.
Corresponds to the JSON property properties
2245 2246 2247 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2245 def properties @properties end |
#quota_bytes_used ⇒ Fixnum
Output only. The number of quota bytes used by this file.
Corresponds to the JSON property quotaBytesUsed
2250 2251 2252 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2250 def quota_bytes_used @quota_bytes_used end |
#resource_key ⇒ String
Output only. A key needed to access the item via a shared link.
Corresponds to the JSON property resourceKey
2255 2256 2257 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2255 def resource_key @resource_key end |
#self_link ⇒ String
Output only. A link back to this file.
Corresponds to the JSON property selfLink
2260 2261 2262 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2260 def self_link @self_link end |
#sha1_checksum ⇒ String
Output only. The SHA1 checksum associated with this file, if available. This
field is only populated for files with content stored in Google Drive; it is
not populated for Docs Editors or shortcut files.
Corresponds to the JSON property sha1Checksum
2267 2268 2269 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2267 def sha1_checksum @sha1_checksum end |
#sha256_checksum ⇒ String
Output only. The SHA256 checksum associated with this file, if available. This
field is only populated for files with content stored in Google Drive; it is
not populated for Docs Editors or shortcut files.
Corresponds to the JSON property sha256Checksum
2274 2275 2276 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2274 def sha256_checksum @sha256_checksum end |
#shareable ⇒ Boolean Also known as:
Output only. Deprecated: Use capabilities/canShare instead.
Corresponds to the JSON property shareable
2279 2280 2281 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2279 def shareable @shareable end |
#shared ⇒ Boolean Also known as:
Output only. Whether the file has been shared. Not populated for items in
shared drives.
Corresponds to the JSON property shared
2286 2287 2288 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2286 def shared @shared end |
#shared_with_me_date ⇒ DateTime
Time at which this file was shared with the user (formatted RFC 3339 timestamp)
.
Corresponds to the JSON property sharedWithMeDate
2293 2294 2295 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2293 def shared_with_me_date @shared_with_me_date end |
#sharing_user ⇒ Google::Apis::DriveV2::User
Information about a Drive user.
Corresponds to the JSON property sharingUser
2298 2299 2300 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2298 def sharing_user @sharing_user end |
#shortcut_details ⇒ Google::Apis::DriveV2::File::ShortcutDetails
Shortcut file details. Only populated for shortcut files, which have the
mimeType field set to application/vnd.google-apps.shortcut. Can only be set
on files.insert requests.
Corresponds to the JSON property shortcutDetails
2305 2306 2307 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2305 def shortcut_details @shortcut_details end |
#spaces ⇒ Array<String>
Output only. The list of spaces which contain the file. Supported values are
drive, appDataFolder and photos.
Corresponds to the JSON property spaces
2311 2312 2313 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2311 def spaces @spaces end |
#team_drive_id ⇒ String
Output only. Deprecated: Use driveId instead.
Corresponds to the JSON property teamDriveId
2316 2317 2318 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2316 def team_drive_id @team_drive_id end |
#thumbnail ⇒ Google::Apis::DriveV2::File::Thumbnail
A thumbnail for the file. This will only be used if a standard thumbnail
cannot be generated.
Corresponds to the JSON property thumbnail
2322 2323 2324 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2322 def thumbnail @thumbnail end |
#thumbnail_link ⇒ String
Output only. A short-lived link to the file's thumbnail, if available.
Typically lasts on the order of hours. Not intended for direct usage on web
applications due to Cross-Origin Resource Sharing (CORS), consider using a proxy server. 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
2333 2334 2335 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2333 def thumbnail_link @thumbnail_link end |
#thumbnail_version ⇒ Fixnum
Output only. The thumbnail version for use in thumbnail cache invalidation.
Corresponds to the JSON property thumbnailVersion
2338 2339 2340 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2338 def thumbnail_version @thumbnail_version end |
#title ⇒ 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.
Corresponds to the JSON property title
2345 2346 2347 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2345 def title @title end |
#trashed_date ⇒ DateTime
The time that the item was trashed (formatted RFC 3339 timestamp). Only
populated for items in shared drives.
Corresponds to the JSON property trashedDate
2351 2352 2353 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2351 def trashed_date @trashed_date end |
#trashing_user ⇒ Google::Apis::DriveV2::User
Information about a Drive user.
Corresponds to the JSON property trashingUser
2356 2357 2358 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2356 def trashing_user @trashing_user end |
#user_permission ⇒ Google::Apis::DriveV2::Permission
A permission for a file. A permission grants a user, group, domain, or the
world access to a file or a folder hierarchy. Some resource methods (such as
permissions.update) require a permissionId. Use the permissions.list
method to retrieve the ID for a file, folder, or shared drive.
Corresponds to the JSON property userPermission
2364 2365 2366 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2364 def @user_permission end |
#version ⇒ Fixnum
Output only. 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
2371 2372 2373 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2371 def version @version end |
#video_media_metadata ⇒ Google::Apis::DriveV2::File::VideoMediaMetadata
Output only. Metadata about video media. This will only be present for video
types.
Corresponds to the JSON property videoMediaMetadata
2377 2378 2379 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2377 def @video_media_metadata end |
#web_content_link ⇒ String
Output only. 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
2384 2385 2386 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2384 def web_content_link @web_content_link end |
#web_view_link ⇒ String
Output only. 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
2390 2391 2392 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2390 def web_view_link @web_view_link end |
#writers_can_share ⇒ Boolean Also known as:
Whether writers can share the document with other users. Not populated for
items in shared drives.
Corresponds to the JSON property writersCanShare
2396 2397 2398 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2396 def writers_can_share @writers_can_share end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 |
# File 'lib/google/apis/drive_v2/classes.rb', line 2404 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) @capabilities = args[:capabilities] if args.key?(:capabilities) @client_encryption_details = args[:client_encryption_details] if args.key?(:client_encryption_details) @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) @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) @drive_id = args[:drive_id] if args.key?(:drive_id) @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) @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) @indexable_text = args[:indexable_text] if args.key?(:indexable_text) @inherited_permissions_disabled = args[:inherited_permissions_disabled] if args.key?(:inherited_permissions_disabled) @is_app_authorized = args[:is_app_authorized] if args.key?(:is_app_authorized) @kind = args[:kind] if args.key?(:kind) @label_info = args[:label_info] if args.key?(:label_info) @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) @link_share_metadata = args[:link_share_metadata] if args.key?(:link_share_metadata) @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) @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) @self_link = args[:self_link] if args.key?(:self_link) @sha1_checksum = args[:sha1_checksum] if args.key?(:sha1_checksum) @sha256_checksum = args[:sha256_checksum] if args.key?(:sha256_checksum) @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) @shortcut_details = args[:shortcut_details] if args.key?(:shortcut_details) @spaces = args[:spaces] if args.key?(:spaces) @team_drive_id = args[:team_drive_id] if args.key?(:team_drive_id) @thumbnail = args[:thumbnail] if args.key?(:thumbnail) @thumbnail_link = args[:thumbnail_link] if args.key?(:thumbnail_link) @thumbnail_version = args[:thumbnail_version] if args.key?(:thumbnail_version) @title = args[:title] if args.key?(:title) @trashed_date = args[:trashed_date] if args.key?(:trashed_date) @trashing_user = args[:trashing_user] if args.key?(:trashing_user) @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 |