Class: Google::Apis::DriveV3::File

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ File

Returns a new instance of File.



1728
1729
1730
# File 'lib/google/apis/drive_v3/classes.rb', line 1728

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#app_propertiesHash<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

Returns:

  • (Hash<String,String>)


1346
1347
1348
# File 'lib/google/apis/drive_v3/classes.rb', line 1346

def app_properties
  @app_properties
end

#capabilitiesGoogle::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. Corresponds to the JSON property capabilities



1352
1353
1354
# File 'lib/google/apis/drive_v3/classes.rb', line 1352

def capabilities
  @capabilities
end

#content_hintsGoogle::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



1358
1359
1360
# File 'lib/google/apis/drive_v3/classes.rb', line 1358

def content_hints
  @content_hints
end

#content_restrictionsArray<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



1364
1365
1366
# File 'lib/google/apis/drive_v3/classes.rb', line 1364

def content_restrictions
  @content_restrictions
end

#copy_requires_writer_permissionBoolean 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

Returns:

  • (Boolean)


1370
1371
1372
# File 'lib/google/apis/drive_v3/classes.rb', line 1370

def copy_requires_writer_permission
  @copy_requires_writer_permission
end

#created_timeDateTime

The time at which the file was created (RFC 3339 date-time). Corresponds to the JSON property createdTime

Returns:

  • (DateTime)


1376
1377
1378
# File 'lib/google/apis/drive_v3/classes.rb', line 1376

def created_time
  @created_time
end

#descriptionString

A short description of the file. Corresponds to the JSON property description

Returns:

  • (String)


1381
1382
1383
# File 'lib/google/apis/drive_v3/classes.rb', line 1381

def description
  @description
end

#drive_idString

Output only. ID of the shared drive the file resides in. Only populated for items in shared drives. Corresponds to the JSON property driveId

Returns:

  • (String)


1387
1388
1389
# File 'lib/google/apis/drive_v3/classes.rb', line 1387

def drive_id
  @drive_id
end

#explicitly_trashedBoolean 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

Returns:

  • (Boolean)


1393
1394
1395
# File 'lib/google/apis/drive_v3/classes.rb', line 1393

def explicitly_trashed
  @explicitly_trashed
end

Output only. Links for exporting Docs Editors files to specific formats. Corresponds to the JSON property exportLinks

Returns:

  • (Hash<String,String>)


1399
1400
1401
# File 'lib/google/apis/drive_v3/classes.rb', line 1399

def export_links
  @export_links
end

#file_extensionString

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

Returns:

  • (String)


1405
1406
1407
# File 'lib/google/apis/drive_v3/classes.rb', line 1405

def file_extension
  @file_extension
end

#folder_color_rgbString

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

Returns:

  • (String)


1413
1414
1415
# File 'lib/google/apis/drive_v3/classes.rb', line 1413

def folder_color_rgb
  @folder_color_rgb
end

#full_file_extensionString

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 is not cleared if the new name does not contain a valid extension. Corresponds to the JSON property fullFileExtension

Returns:

  • (String)


1422
1423
1424
# File 'lib/google/apis/drive_v3/classes.rb', line 1422

def full_file_extension
  @full_file_extension
end

#has_augmented_permissionsBoolean 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

Returns:

  • (Boolean)


1428
1429
1430
# File 'lib/google/apis/drive_v3/classes.rb', line 1428

def has_augmented_permissions
  @has_augmented_permissions
end

#has_thumbnailBoolean 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

Returns:

  • (Boolean)


1436
1437
1438
# File 'lib/google/apis/drive_v3/classes.rb', line 1436

def has_thumbnail
  @has_thumbnail
end

#head_revision_idString

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

Returns:

  • (String)


1443
1444
1445
# File 'lib/google/apis/drive_v3/classes.rb', line 1443

def head_revision_id
  @head_revision_id
end

Output only. A static, unauthenticated link to the file's icon. Corresponds to the JSON property iconLink

Returns:

  • (String)


1448
1449
1450
# File 'lib/google/apis/drive_v3/classes.rb', line 1448

def icon_link
  @icon_link
end

#idString

The ID of the file. Corresponds to the JSON property id

Returns:

  • (String)


1453
1454
1455
# File 'lib/google/apis/drive_v3/classes.rb', line 1453

def id
  @id
end

#image_media_metadataGoogle::Apis::DriveV3::File::ImageMediaMetadata

Output only. Additional metadata about image media, if available. Corresponds to the JSON property imageMediaMetadata



1458
1459
1460
# File 'lib/google/apis/drive_v3/classes.rb', line 1458

def 
  @image_media_metadata
end

#is_app_authorizedBoolean Also known as: is_app_authorized?

Output only. Whether the file was created or opened by the requesting app. Corresponds to the JSON property isAppAuthorized

Returns:

  • (Boolean)


1463
1464
1465
# File 'lib/google/apis/drive_v3/classes.rb', line 1463

def is_app_authorized
  @is_app_authorized
end

#kindString

Output only. Identifies what kind of resource this is. Value: the fixed string "drive#file". Corresponds to the JSON property kind

Returns:

  • (String)


1470
1471
1472
# File 'lib/google/apis/drive_v3/classes.rb', line 1470

def kind
  @kind
end

#label_infoGoogle::Apis::DriveV3::File::LabelInfo

Output only. An overview of the labels on the file. Corresponds to the JSON property labelInfo



1475
1476
1477
# File 'lib/google/apis/drive_v3/classes.rb', line 1475

def label_info
  @label_info
end

#last_modifying_userGoogle::Apis::DriveV3::User

Information about a Drive user. Corresponds to the JSON property lastModifyingUser



1480
1481
1482
# File 'lib/google/apis/drive_v3/classes.rb', line 1480

def last_modifying_user
  @last_modifying_user
end

Contains details about the link URLs that clients are using to refer to this item. Corresponds to the JSON property linkShareMetadata



1486
1487
1488
# File 'lib/google/apis/drive_v3/classes.rb', line 1486

def 
  @link_share_metadata
end

#md5_checksumString

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

Returns:

  • (String)


1492
1493
1494
# File 'lib/google/apis/drive_v3/classes.rb', line 1492

def md5_checksum
  @md5_checksum
end

#mime_typeString

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

Returns:

  • (String)


1501
1502
1503
# File 'lib/google/apis/drive_v3/classes.rb', line 1501

def mime_type
  @mime_type
end

#modified_by_meBoolean Also known as: modified_by_me?

Output only. Whether the file has been modified by this user. Corresponds to the JSON property modifiedByMe

Returns:

  • (Boolean)


1506
1507
1508
# File 'lib/google/apis/drive_v3/classes.rb', line 1506

def modified_by_me
  @modified_by_me
end

#modified_by_me_timeDateTime

The last time the file was modified by the user (RFC 3339 date-time). Corresponds to the JSON property modifiedByMeTime

Returns:

  • (DateTime)


1512
1513
1514
# File 'lib/google/apis/drive_v3/classes.rb', line 1512

def modified_by_me_time
  @modified_by_me_time
end

#modified_timeDateTime

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

Returns:

  • (DateTime)


1518
1519
1520
# File 'lib/google/apis/drive_v3/classes.rb', line 1518

def modified_time
  @modified_time
end

#nameString

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

Returns:

  • (String)


1525
1526
1527
# File 'lib/google/apis/drive_v3/classes.rb', line 1525

def name
  @name
end

#original_filenameString

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

Returns:

  • (String)


1532
1533
1534
# File 'lib/google/apis/drive_v3/classes.rb', line 1532

def original_filename
  @original_filename
end

#owned_by_meBoolean 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

Returns:

  • (Boolean)


1538
1539
1540
# File 'lib/google/apis/drive_v3/classes.rb', line 1538

def owned_by_me
  @owned_by_me
end

#ownersArray<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

Returns:



1545
1546
1547
# File 'lib/google/apis/drive_v3/classes.rb', line 1545

def owners
  @owners
end

#parentsArray<String>

The IDs of the parent folders which contain the file. 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 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

Returns:

  • (Array<String>)


1554
1555
1556
# File 'lib/google/apis/drive_v3/classes.rb', line 1554

def parents
  @parents
end

#permission_idsArray<String>

Output only. List of permission IDs for users with access to this file. Corresponds to the JSON property permissionIds

Returns:

  • (Array<String>)


1559
1560
1561
# File 'lib/google/apis/drive_v3/classes.rb', line 1559

def permission_ids
  @permission_ids
end

#permissionsArray<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



1566
1567
1568
# File 'lib/google/apis/drive_v3/classes.rb', line 1566

def permissions
  @permissions
end

#propertiesHash<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

Returns:

  • (Hash<String,String>)


1572
1573
1574
# File 'lib/google/apis/drive_v3/classes.rb', line 1572

def properties
  @properties
end

#quota_bytes_usedFixnum

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

Returns:

  • (Fixnum)


1578
1579
1580
# File 'lib/google/apis/drive_v3/classes.rb', line 1578

def quota_bytes_used
  @quota_bytes_used
end

#resource_keyString

Output only. A key needed to access the item via a shared link. Corresponds to the JSON property resourceKey

Returns:

  • (String)


1583
1584
1585
# File 'lib/google/apis/drive_v3/classes.rb', line 1583

def resource_key
  @resource_key
end

#sha1_checksumString

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

Returns:

  • (String)


1590
1591
1592
# File 'lib/google/apis/drive_v3/classes.rb', line 1590

def sha1_checksum
  @sha1_checksum
end

#sha256_checksumString

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

Returns:

  • (String)


1597
1598
1599
# File 'lib/google/apis/drive_v3/classes.rb', line 1597

def sha256_checksum
  @sha256_checksum
end

#sharedBoolean Also known as: shared?

Output only. Whether the file has been shared. Not populated for items in shared drives. Corresponds to the JSON property shared

Returns:

  • (Boolean)


1603
1604
1605
# File 'lib/google/apis/drive_v3/classes.rb', line 1603

def shared
  @shared
end

#shared_with_me_timeDateTime

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

Returns:

  • (DateTime)


1610
1611
1612
# File 'lib/google/apis/drive_v3/classes.rb', line 1610

def shared_with_me_time
  @shared_with_me_time
end

#sharing_userGoogle::Apis::DriveV3::User

Information about a Drive user. Corresponds to the JSON property sharingUser



1615
1616
1617
# File 'lib/google/apis/drive_v3/classes.rb', line 1615

def sharing_user
  @sharing_user
end

#shortcut_detailsGoogle::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



1622
1623
1624
# File 'lib/google/apis/drive_v3/classes.rb', line 1622

def shortcut_details
  @shortcut_details
end

#sizeFixnum

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 size

Returns:

  • (Fixnum)


1628
1629
1630
# File 'lib/google/apis/drive_v3/classes.rb', line 1628

def size
  @size
end

#spacesArray<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

Returns:

  • (Array<String>)


1634
1635
1636
# File 'lib/google/apis/drive_v3/classes.rb', line 1634

def spaces
  @spaces
end

#starredBoolean Also known as: starred?

Whether the user has starred the file. Corresponds to the JSON property starred

Returns:

  • (Boolean)


1639
1640
1641
# File 'lib/google/apis/drive_v3/classes.rb', line 1639

def starred
  @starred
end

#team_drive_idString

Deprecated: Output only. Use driveId instead. Corresponds to the JSON property teamDriveId

Returns:

  • (String)


1645
1646
1647
# File 'lib/google/apis/drive_v3/classes.rb', line 1645

def team_drive_id
  @team_drive_id
end

Output only. 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

Returns:

  • (String)


1653
1654
1655
# File 'lib/google/apis/drive_v3/classes.rb', line 1653

def thumbnail_link
  @thumbnail_link
end

#thumbnail_versionFixnum

Output only. The thumbnail version for use in thumbnail cache invalidation. Corresponds to the JSON property thumbnailVersion

Returns:

  • (Fixnum)


1658
1659
1660
# File 'lib/google/apis/drive_v3/classes.rb', line 1658

def thumbnail_version
  @thumbnail_version
end

#trashedBoolean 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

Returns:

  • (Boolean)


1665
1666
1667
# File 'lib/google/apis/drive_v3/classes.rb', line 1665

def trashed
  @trashed
end

#trashed_timeDateTime

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

Returns:

  • (DateTime)


1672
1673
1674
# File 'lib/google/apis/drive_v3/classes.rb', line 1672

def trashed_time
  @trashed_time
end

#trashing_userGoogle::Apis::DriveV3::User

Information about a Drive user. Corresponds to the JSON property trashingUser



1677
1678
1679
# File 'lib/google/apis/drive_v3/classes.rb', line 1677

def trashing_user
  @trashing_user
end

#versionFixnum

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

Returns:

  • (Fixnum)


1684
1685
1686
# File 'lib/google/apis/drive_v3/classes.rb', line 1684

def version
  @version
end

#video_media_metadataGoogle::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



1690
1691
1692
# File 'lib/google/apis/drive_v3/classes.rb', line 1690

def 
  @video_media_metadata
end

#viewed_by_meBoolean Also known as: viewed_by_me?

Output only. Whether the file has been viewed by this user. Corresponds to the JSON property viewedByMe

Returns:

  • (Boolean)


1695
1696
1697
# File 'lib/google/apis/drive_v3/classes.rb', line 1695

def viewed_by_me
  @viewed_by_me
end

#viewed_by_me_timeDateTime

The last time the file was viewed by the user (RFC 3339 date-time). Corresponds to the JSON property viewedByMeTime

Returns:

  • (DateTime)


1701
1702
1703
# File 'lib/google/apis/drive_v3/classes.rb', line 1701

def viewed_by_me_time
  @viewed_by_me_time
end

#viewers_can_copy_contentBoolean Also known as: viewers_can_copy_content?

Deprecated: Use copyRequiresWriterPermission instead. Corresponds to the JSON property viewersCanCopyContent

Returns:

  • (Boolean)


1706
1707
1708
# File 'lib/google/apis/drive_v3/classes.rb', line 1706

def viewers_can_copy_content
  @viewers_can_copy_content
end

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

Returns:

  • (String)


1713
1714
1715
# File 'lib/google/apis/drive_v3/classes.rb', line 1713

def web_content_link
  @web_content_link
end

Output only. A link for opening the file in a relevant Google editor or viewer in a browser. Corresponds to the JSON property webViewLink

Returns:

  • (String)


1719
1720
1721
# File 'lib/google/apis/drive_v3/classes.rb', line 1719

def web_view_link
  @web_view_link
end

#writers_can_shareBoolean Also known as: writers_can_share?

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

Returns:

  • (Boolean)


1725
1726
1727
# File 'lib/google/apis/drive_v3/classes.rb', line 1725

def writers_can_share
  @writers_can_share
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
# File 'lib/google/apis/drive_v3/classes.rb', line 1733

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)
  @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