class

GoogleDrive::File

Inherits OpenApi::Json / OpenApi::Validatable / JSON::Serializable::Unmapped / JSON::Serializable / Reference / Object

The metadata for a file.

Constructors

new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

==(other : self)

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code

app_properties

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.

Source
app_properties=(new_value : Hash(String, String) | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] app_properties Object to be assigned

Source
capabilities
Source
capabilities=(new_value : GoogleDrive::FileCapabilities | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] capabilities Object to be assigned

Source
content_hints
Source
content_hints=(new_value : GoogleDrive::FileContentHints | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] content_hints Object to be assigned

Source
content_restrictions

Restrictions for accessing the content of the file. Only populated if such a restriction exists.

Source
content_restrictions=(new_value : Array(GoogleDrive::ContentRestriction) | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] content_restrictions Object to be assigned

Source
copy_requires_writer_permission

Whether the options to copy, print, or download this file, should be disabled for readers and commenters.

Source
copy_requires_writer_permission=(new_value : Bool | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] copy_requires_writer_permission Object to be assigned

Source
created_time

The time at which the file was created (RFC 3339 date-time).

Source
created_time=(new_value : Time | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] created_time Object to be assigned

Source
description

A short description of the file.

Source
description=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] description Object to be assigned

Source
drive_id

ID of the shared drive the file resides in. Only populated for items in shared drives.

Source
drive_id=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] drive_id Object to be assigned

Source
explicitly_trashed

Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.

Source
explicitly_trashed=(new_value : Bool | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] explicitly_trashed Object to be assigned

Source
file_extension

The final component of fullFileExtension. This is only available for files with binary content in Google Drive.

Source
file_extension=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] file_extension Object to be assigned

Source
folder_color_rgb

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.

Source
folder_color_rgb=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] folder_color_rgb Object to be assigned

Source
full_file_extension

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 isn't cleared if the new name does not contain a valid extension.

Source
full_file_extension=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] full_file_extension Object to be assigned

Source
has_augmented_permissions

Whether there are permissions directly on this file. This field is only populated for items in shared drives.

Source
has_augmented_permissions=(new_value : Bool | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] has_augmented_permissions Object to be assigned

Source
has_thumbnail

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.

Source
has_thumbnail=(new_value : Bool | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] has_thumbnail Object to be assigned

Source
hash(hasher)

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code

head_revision_id

The ID of the file's head revision. This is currently only available for files with binary content in Google Drive.

Source
head_revision_id=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] head_revision_id Object to be assigned

Source
id

The ID of the file.

Source
id=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] id Object to be assigned

Source
image_media_metadata
Source
image_media_metadata=(new_value : GoogleDrive::FileImageMediaMetadata | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] image_media_metadata Object to be assigned

Source
is_app_authorized

Whether the file was created or opened by the requesting app.

Source
is_app_authorized=(new_value : Bool | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] is_app_authorized Object to be assigned

Source
kind

Identifies what kind of resource this is. Value: the fixed string "drive#file".

Source
kind=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] kind Object to be assigned

Source
label_info
Source
label_info=(new_value : GoogleDrive::FileLabelInfo | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] label_info Object to be assigned

Source
last_modifying_user
Source
last_modifying_user=(new_value : GoogleDrive::User | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] last_modifying_user Object to be assigned

Source
list_invalid_properties

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

Source
md5_checksum

The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.

Source
md5_checksum=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] md5_checksum Object to be assigned

Source
mime_type

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.

Source
mime_type=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] mime_type Object to be assigned

Source
modified_by_me

Whether the file has been modified by this user.

Source
modified_by_me=(new_value : Bool | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] modified_by_me Object to be assigned

Source
modified_by_me_time

The last time the file was modified by the user (RFC 3339 date-time).

Source
modified_by_me_time=(new_value : Time | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] modified_by_me_time Object to be assigned

Source
modified_time

The last time the file was modified by anyone (RFC 3339 date-time). Note that setting modifiedTime will also update modifiedByMeTime for the user.

Source
modified_time=(new_value : Time | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] modified_time Object to be assigned

Source
name

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.

Source
name=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] name Object to be assigned

Source
original_filename

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.

Source
original_filename=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] original_filename Object to be assigned

Source
owned_by_me

Whether the user owns the file. Not populated for items in shared drives.

Source
owned_by_me=(new_value : Bool | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] owned_by_me Object to be assigned

Source
owners

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.

Source
owners=(new_value : Array(GoogleDrive::User) | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] owners Object to be assigned

Source
parents

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.

Source
parents=(new_value : Array(String) | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] parents Object to be assigned

Source
permission_ids

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

Source
permission_ids=(new_value : Array(String) | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] permission_ids Object to be assigned

Source
permissions

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.

Source
permissions=(new_value : Array(GoogleDrive::Permission) | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] permissions Object to be assigned

Source
properties

A collection of arbitrary key-value pairs which are visible to all apps. Entries with null values are cleared in update and copy requests.

Source
properties=(new_value : Hash(String, String) | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] properties Object to be assigned

Source
quota_bytes_used

The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.

Source
quota_bytes_used=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] quota_bytes_used Object to be assigned

Source
resource_key

A key needed to access the item via a shared link.

Source
resource_key=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] resource_key Object to be assigned

Source
sha1_checksum

The SHA1 checksum associated with this file, if available. This field is only populated for files with content stored in Google Drive; it isn't populated for Docs Editors or shortcut files.

Source
sha1_checksum=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] sha1_checksum Object to be assigned

Source
sha256_checksum

The SHA256 checksum associated with this file, if available. This field is only populated for files with content stored in Google Drive; it isn't populated for Docs Editors or shortcut files.

Source
sha256_checksum=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] sha256_checksum Object to be assigned

Source
shared

Whether the file has been shared. Not populated for items in shared drives.

Source
shared=(new_value : Bool | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] shared Object to be assigned

Source
shared_with_me_time

The time at which the file was shared with the user, if applicable (RFC 3339 date-time).

Source
shared_with_me_time=(new_value : Time | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] shared_with_me_time Object to be assigned

Source
sharing_user
Source
sharing_user=(new_value : GoogleDrive::User | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] sharing_user Object to be assigned

Source
shortcut_details
Source
shortcut_details=(new_value : GoogleDrive::FileShortcutDetails | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] shortcut_details Object to be assigned

Source
size

The size of the file's content in bytes. This is applicable to binary files in Google Drive and Google Docs files.

Source
size=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] size Object to be assigned

Source
spaces

The list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'.

Source
spaces=(new_value : Array(String) | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] spaces Object to be assigned

Source
starred

Whether the user has starred the file.

Source
starred=(new_value : Bool | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] starred Object to be assigned

Source
team_drive_id

Deprecated - use driveId instead.

Source
team_drive_id=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] team_drive_id Object to be assigned

Source
thumbnail_version

The thumbnail version for use in thumbnail cache invalidation.

Source
thumbnail_version=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] thumbnail_version Object to be assigned

Source
trashed

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.

Source
trashed=(new_value : Bool | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] trashed Object to be assigned

Source
trashed_time

The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.

Source
trashed_time=(new_value : Time | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] trashed_time Object to be assigned

Source
trashing_user
Source
trashing_user=(new_value : GoogleDrive::User | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] trashing_user Object to be assigned

Source
valid?

Check to see if the all the properties in the model are valid @return true if the model is valid

Source
version

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.

Source
version=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] version Object to be assigned

Source
video_media_metadata
Source
video_media_metadata=(new_value : GoogleDrive::FileVideoMediaMetadata | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] video_media_metadata Object to be assigned

Source
viewed_by_me

Whether the file has been viewed by this user.

Source
viewed_by_me=(new_value : Bool | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] viewed_by_me Object to be assigned

Source
viewed_by_me_time

The last time the file was viewed by the user (RFC 3339 date-time).

Source
viewed_by_me_time=(new_value : Time | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] viewed_by_me_time Object to be assigned

Source
viewers_can_copy_content

Deprecated - use copyRequiresWriterPermission instead.

Source
viewers_can_copy_content=(new_value : Bool | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] viewers_can_copy_content Object to be assigned

Source
writers_can_share

Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives.

Source
writers_can_share=(new_value : Bool | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] writers_can_share Object to be assigned

Source