Class: Google::Apis::DriveV3::File
- Inherits:
-
Object
- Object
- Google::Apis::DriveV3::File
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/drive_v3/classes.rb,
lib/google/apis/drive_v3/representations.rb,
lib/google/apis/drive_v3/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, ContentHints, ImageMediaMetadata, LabelInfo, LinkShareMetadata, ShortcutDetails, VideoMediaMetadata
Instance Attribute Summary collapse
-
#app_properties ⇒ Hash<String,String>
A collection of arbitrary key-value pairs which are private to the requesting app.
-
#capabilities ⇒ Google::Apis::DriveV3::File::Capabilities
Output only.
-
#content_hints ⇒ Google::Apis::DriveV3::File::ContentHints
Additional information about the content of the file.
-
#content_restrictions ⇒ Array<Google::Apis::DriveV3::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.
-
#created_time ⇒ DateTime
The time at which the file was created (RFC 3339 date-time).
-
#description ⇒ String
A short description of the file.
-
#download_restrictions ⇒ Google::Apis::DriveV3::DownloadRestrictionsMetadata
Download restrictions applied to the file.
-
#drive_id ⇒ String
Output only.
-
#explicitly_trashed ⇒ Boolean
(also: #explicitly_trashed?)
Output only.
-
#export_links ⇒ Hash<String,String>
Output only.
-
#file_extension ⇒ String
Output only.
-
#folder_color_rgb ⇒ String
The color for a folder or a shortcut to a folder as an RGB hex string.
-
#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::DriveV3::File::ImageMediaMetadata
Output only.
-
#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::DriveV3::File::LabelInfo
Output only.
-
#last_modifying_user ⇒ Google::Apis::DriveV3::User
Information about a Drive user.
-
#link_share_metadata ⇒ Google::Apis::DriveV3::File::LinkShareMetadata
Contains details about the link URLs that clients are using to refer to this item.
-
#md5_checksum ⇒ String
Output only.
-
#mime_type ⇒ String
The MIME type of the file.
-
#modified_by_me ⇒ Boolean
(also: #modified_by_me?)
Output only.
-
#modified_by_me_time ⇒ DateTime
The last time the file was modified by the user (RFC 3339 date-time).
-
#modified_time ⇒ DateTime
he last time the file was modified by anyone (RFC 3339 date-time).
-
#name ⇒ String
The name of the file.
-
#original_filename ⇒ String
The original filename of the uploaded content if available, or else the original value of the
namefield. -
#owned_by_me ⇒ Boolean
(also: #owned_by_me?)
Output only.
-
#owners ⇒ Array<Google::Apis::DriveV3::User>
Output only.
-
#parents ⇒ Array<String>
The ID of the parent folder containing the file.
-
#permission_ids ⇒ Array<String>
Output only.
-
#permissions ⇒ Array<Google::Apis::DriveV3::Permission>
Output only.
-
#properties ⇒ Hash<String,String>
A collection of arbitrary key-value pairs which are visible to all apps.
-
#quota_bytes_used ⇒ Fixnum
Output only.
-
#resource_key ⇒ String
Output only.
-
#sha1_checksum ⇒ String
Output only.
-
#sha256_checksum ⇒ String
Output only.
-
#shared ⇒ Boolean
(also: #shared?)
Output only.
-
#shared_with_me_time ⇒ DateTime
The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
-
#sharing_user ⇒ Google::Apis::DriveV3::User
Information about a Drive user.
-
#shortcut_details ⇒ Google::Apis::DriveV3::File::ShortcutDetails
Shortcut file details.
-
#size ⇒ Fixnum
Output only.
-
#spaces ⇒ Array<String>
Output only.
-
#starred ⇒ Boolean
(also: #starred?)
Whether the user has starred the file.
-
#team_drive_id ⇒ String
Deprecated: Output only.
-
#thumbnail_link ⇒ String
Output only.
-
#thumbnail_version ⇒ Fixnum
Output only.
-
#trashed ⇒ Boolean
(also: #trashed?)
Whether the file has been trashed, either explicitly or from a trashed parent folder.
-
#trashed_time ⇒ DateTime
The time that the item was trashed (RFC 3339 date-time).
-
#trashing_user ⇒ Google::Apis::DriveV3::User
Information about a Drive user.
-
#version ⇒ Fixnum
Output only.
-
#video_media_metadata ⇒ Google::Apis::DriveV3::File::VideoMediaMetadata
Output only.
-
#viewed_by_me ⇒ Boolean
(also: #viewed_by_me?)
Output only.
-
#viewed_by_me_time ⇒ DateTime
The last time the file was viewed by the user (RFC 3339 date-time).
-
#viewers_can_copy_content ⇒ Boolean
(also: #viewers_can_copy_content?)
Deprecated: Use
copyRequiresWriterPermissioninstead. -
#web_content_link ⇒ String
Output only.
-
#web_view_link ⇒ String
Output only.
-
#writers_can_share ⇒ Boolean
(also: #writers_can_share?)
Whether users with only
writerpermission can modify the file's permissions.
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.
1901 1902 1903 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1901 def initialize(**args) update!(**args) end |
Instance Attribute Details
#app_properties ⇒ Hash<String,String>
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
1499 1500 1501 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1499 def app_properties @app_properties end |
#capabilities ⇒ Google::Apis::DriveV3::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. For more
information, see Understand file capabilities.
Corresponds to the JSON property capabilities
1507 1508 1509 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1507 def capabilities @capabilities end |
#content_hints ⇒ Google::Apis::DriveV3::File::ContentHints
Additional information about the content of the file. These fields are never
populated in responses.
Corresponds to the JSON property contentHints
1513 1514 1515 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1513 def content_hints @content_hints end |
#content_restrictions ⇒ Array<Google::Apis::DriveV3::ContentRestriction>
Restrictions for accessing the content of the file. Only populated if such a
restriction exists.
Corresponds to the JSON property contentRestrictions
1519 1520 1521 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1519 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
1525 1526 1527 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1525 def @copy_requires_writer_permission end |
#created_time ⇒ DateTime
The time at which the file was created (RFC 3339 date-time).
Corresponds to the JSON property createdTime
1531 1532 1533 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1531 def created_time @created_time end |
#description ⇒ String
A short description of the file.
Corresponds to the JSON property description
1536 1537 1538 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1536 def description @description end |
#download_restrictions ⇒ Google::Apis::DriveV3::DownloadRestrictionsMetadata
Download restrictions applied to the file.
Corresponds to the JSON property downloadRestrictions
1541 1542 1543 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1541 def download_restrictions @download_restrictions 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
1547 1548 1549 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1547 def drive_id @drive_id end |
#explicitly_trashed ⇒ Boolean Also known as: explicitly_trashed?
Output only. Whether the file has been explicitly trashed, as opposed to
recursively trashed from a parent folder.
Corresponds to the JSON property explicitlyTrashed
1553 1554 1555 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1553 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
1559 1560 1561 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1559 def export_links @export_links end |
#file_extension ⇒ String
Output only. The final component of fullFileExtension. This is only
available for files with binary content in Google Drive.
Corresponds to the JSON property fileExtension
1565 1566 1567 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1565 def file_extension @file_extension end |
#folder_color_rgb ⇒ String
The color for a folder or a 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 is used
instead.
Corresponds to the JSON property folderColorRgb
1574 1575 1576 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1574 def folder_color_rgb @folder_color_rgb end |
#full_file_extension ⇒ String
Output only. 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's not cleared if the new
name doesn't contain a valid extension.
Corresponds to the JSON property fullFileExtension
1583 1584 1585 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1583 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
1589 1590 1591 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1589 def @has_augmented_permissions end |
#has_thumbnail ⇒ Boolean Also known as: has_thumbnail?
Output only. Whether this file has a thumbnail. This doesn't 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
1597 1598 1599 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1597 def has_thumbnail @has_thumbnail end |
#head_revision_id ⇒ String
Output only. The ID of the file's head revision. This is currently only
available for files with binary content in Google Drive.
Corresponds to the JSON property headRevisionId
1604 1605 1606 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1604 def head_revision_id @head_revision_id end |
#icon_link ⇒ String
Output only. A static, unauthenticated link to the file's icon.
Corresponds to the JSON property iconLink
1609 1610 1611 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1609 def icon_link @icon_link end |
#id ⇒ String
The ID of the file.
Corresponds to the JSON property id
1614 1615 1616 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1614 def id @id end |
#image_media_metadata ⇒ Google::Apis::DriveV3::File::ImageMediaMetadata
Output only. Additional metadata about image media, if available.
Corresponds to the JSON property imageMediaMetadata
1619 1620 1621 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1619 def @image_media_metadata 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
1625 1626 1627 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1625 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
1631 1632 1633 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1631 def @is_app_authorized end |
#kind ⇒ String
Output only. Identifies what kind of resource this is. Value: the fixed string
"drive#file".
Corresponds to the JSON property kind
1638 1639 1640 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1638 def kind @kind end |
#label_info ⇒ Google::Apis::DriveV3::File::LabelInfo
Output only. An overview of the labels on the file.
Corresponds to the JSON property labelInfo
1643 1644 1645 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1643 def label_info @label_info end |
#last_modifying_user ⇒ Google::Apis::DriveV3::User
Information about a Drive user.
Corresponds to the JSON property lastModifyingUser
1648 1649 1650 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1648 def @last_modifying_user end |
#link_share_metadata ⇒ Google::Apis::DriveV3::File::LinkShareMetadata
Contains details about the link URLs that clients are using to refer to this
item.
Corresponds to the JSON property linkShareMetadata
1654 1655 1656 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1654 def @link_share_metadata end |
#md5_checksum ⇒ String
Output only. The MD5 checksum for the content of the file. This is only
applicable to files with binary content in Google Drive.
Corresponds to the JSON property md5Checksum
1660 1661 1662 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1660 def md5_checksum @md5_checksum end |
#mime_type ⇒ String
The MIME type of the file. Google Drive attempts 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 is imported, if possible. The
supported import formats are published in the about resource.
Corresponds to the JSON property mimeType
1670 1671 1672 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1670 def mime_type @mime_type end |
#modified_by_me ⇒ Boolean Also known as: modified_by_me?
Output only. Whether the file has been modified by this user.
Corresponds to the JSON property modifiedByMe
1675 1676 1677 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1675 def modified_by_me @modified_by_me end |
#modified_by_me_time ⇒ DateTime
The last time the file was modified by the user (RFC 3339 date-time).
Corresponds to the JSON property modifiedByMeTime
1681 1682 1683 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1681 def modified_by_me_time @modified_by_me_time end |
#modified_time ⇒ DateTime
he 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
1687 1688 1689 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1687 def modified_time @modified_time end |
#name ⇒ String
The name of the file. This isn't necessarily unique within a folder. Note that
for immutable items such as the top-level folders of shared drives, the My
Drive root folder, and the Application Data folder, the name is constant.
Corresponds to the JSON property name
1694 1695 1696 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1694 def name @name end |
#original_filename ⇒ String
The original filename of the uploaded content if available, or else the
original value of the name field. This is only available for files with
binary content in Google Drive.
Corresponds to the JSON property originalFilename
1701 1702 1703 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1701 def original_filename @original_filename end |
#owned_by_me ⇒ Boolean Also known as: owned_by_me?
Output only. Whether the user owns the file. Not populated for items in shared
drives.
Corresponds to the JSON property ownedByMe
1707 1708 1709 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1707 def owned_by_me @owned_by_me end |
#owners ⇒ Array<Google::Apis::DriveV3::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
1714 1715 1716 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1714 def owners @owners end |
#parents ⇒ Array<String>
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 a create 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
1724 1725 1726 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1724 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
1729 1730 1731 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1729 def @permission_ids end |
#permissions ⇒ Array<Google::Apis::DriveV3::Permission>
Output only. 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
1736 1737 1738 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1736 def @permissions end |
#properties ⇒ Hash<String,String>
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
1742 1743 1744 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1742 def properties @properties end |
#quota_bytes_used ⇒ Fixnum
Output only. 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
1748 1749 1750 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1748 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
1753 1754 1755 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1753 def resource_key @resource_key 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's
not populated for Docs Editors or shortcut files.
Corresponds to the JSON property sha1Checksum
1760 1761 1762 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1760 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's
not populated for Docs Editors or shortcut files.
Corresponds to the JSON property sha256Checksum
1767 1768 1769 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1767 def sha256_checksum @sha256_checksum 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
1773 1774 1775 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1773 def shared @shared end |
#shared_with_me_time ⇒ DateTime
The time at which the file was shared with the user, if applicable (RFC 3339
date-time).
Corresponds to the JSON property sharedWithMeTime
1780 1781 1782 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1780 def shared_with_me_time @shared_with_me_time end |
#sharing_user ⇒ Google::Apis::DriveV3::User
Information about a Drive user.
Corresponds to the JSON property sharingUser
1785 1786 1787 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1785 def sharing_user @sharing_user end |
#shortcut_details ⇒ Google::Apis::DriveV3::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.create requests.
Corresponds to the JSON property shortcutDetails
1792 1793 1794 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1792 def shortcut_details @shortcut_details end |
#size ⇒ Fixnum
Output only. Size in bytes of blobs and Google Workspace editor files. Won't
be populated for files that have no size, like shortcuts and folders.
Corresponds to the JSON property size
1798 1799 1800 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1798 def size @size end |
#spaces ⇒ Array<String>
Output only. The list of spaces which contain the file. The currently
supported values are drive, appDataFolder, and photos.
Corresponds to the JSON property spaces
1804 1805 1806 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1804 def spaces @spaces end |
#starred ⇒ Boolean Also known as: starred?
Whether the user has starred the file.
Corresponds to the JSON property starred
1809 1810 1811 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1809 def starred @starred end |
#team_drive_id ⇒ String
Deprecated: Output only. Use driveId instead.
Corresponds to the JSON property teamDriveId
1815 1816 1817 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1815 def team_drive_id @team_drive_id 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) policies. 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
1826 1827 1828 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1826 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
1831 1832 1833 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1831 def thumbnail_version @thumbnail_version end |
#trashed ⇒ Boolean Also known as: trashed?
Whether the file has been trashed, either explicitly or from a trashed parent
folder. Only the owner may trash a file, and other users cannot see files in
the owner's trash.
Corresponds to the JSON property trashed
1838 1839 1840 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1838 def trashed @trashed end |
#trashed_time ⇒ DateTime
The time that the item was trashed (RFC 3339 date-time). Only populated for
items in shared drives.
Corresponds to the JSON property trashedTime
1845 1846 1847 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1845 def trashed_time @trashed_time end |
#trashing_user ⇒ Google::Apis::DriveV3::User
Information about a Drive user.
Corresponds to the JSON property trashingUser
1850 1851 1852 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1850 def trashing_user @trashing_user 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 user.
Corresponds to the JSON property version
1857 1858 1859 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1857 def version @version end |
#video_media_metadata ⇒ Google::Apis::DriveV3::File::VideoMediaMetadata
Output only. Additional metadata about video media. This may not be available
immediately upon upload.
Corresponds to the JSON property videoMediaMetadata
1863 1864 1865 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1863 def @video_media_metadata end |
#viewed_by_me ⇒ Boolean Also known as: viewed_by_me?
Output only. Whether the file has been viewed by this user.
Corresponds to the JSON property viewedByMe
1868 1869 1870 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1868 def viewed_by_me @viewed_by_me end |
#viewed_by_me_time ⇒ DateTime
The last time the file was viewed by the user (RFC 3339 date-time).
Corresponds to the JSON property viewedByMeTime
1874 1875 1876 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1874 def viewed_by_me_time @viewed_by_me_time end |
#viewers_can_copy_content ⇒ Boolean Also known as: viewers_can_copy_content?
Deprecated: Use copyRequiresWriterPermission instead.
Corresponds to the JSON property viewersCanCopyContent
1879 1880 1881 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1879 def viewers_can_copy_content @viewers_can_copy_content end |
#web_content_link ⇒ String
Output only. A link for downloading the content of the file in a browser. This
is only available for files with binary content in Google Drive.
Corresponds to the JSON property webContentLink
1886 1887 1888 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1886 def web_content_link @web_content_link end |
#web_view_link ⇒ String
Output only. A link for opening the file in a relevant Google editor or viewer
in a browser.
Corresponds to the JSON property webViewLink
1892 1893 1894 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1892 def web_view_link @web_view_link end |
#writers_can_share ⇒ Boolean Also known as:
Whether users with only writer permission can modify the file's permissions.
Not populated for items in shared drives.
Corresponds to the JSON property writersCanShare
1898 1899 1900 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1898 def writers_can_share @writers_can_share end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1906 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) @download_restrictions = args[:download_restrictions] if args.key?(:download_restrictions) @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) @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) @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) @sha1_checksum = args[:sha1_checksum] if args.key?(:sha1_checksum) @sha256_checksum = args[:sha256_checksum] if args.key?(:sha256_checksum) @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 |