class Google::Apis::DriveV2::File::Capabilities

Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.

Attributes

can_add_children[RW]

Whether the current user can add children to this folder. This is always false when the item is not a folder. Corresponds to the JSON property `canAddChildren` @return [Boolean]

can_add_children?[RW]

Whether the current user can add children to this folder. This is always false when the item is not a folder. Corresponds to the JSON property `canAddChildren` @return [Boolean]

can_add_folder_from_another_drive[RW]

Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives. Corresponds to the JSON property `canAddFolderFromAnotherDrive` @return [Boolean]

can_add_folder_from_another_drive?[RW]

Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives. Corresponds to the JSON property `canAddFolderFromAnotherDrive` @return [Boolean]

can_add_my_drive_parent[RW]

Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files. Corresponds to the JSON property `canAddMyDriveParent` @return [Boolean]

can_add_my_drive_parent?[RW]

Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files. Corresponds to the JSON property `canAddMyDriveParent` @return [Boolean]

can_change_copy_requires_writer_permission[RW]

Whether the current user can change the copyRequiresWriterPermission restriction of this file. Corresponds to the JSON property `canChangeCopyRequiresWriterPermission` @return [Boolean]

can_change_copy_requires_writer_permission?[RW]

Whether the current user can change the copyRequiresWriterPermission restriction of this file. Corresponds to the JSON property `canChangeCopyRequiresWriterPermission` @return [Boolean]

can_change_restricted_download[RW]

Deprecated Corresponds to the JSON property `canChangeRestrictedDownload` @return [Boolean]

can_change_restricted_download?[RW]

Deprecated Corresponds to the JSON property `canChangeRestrictedDownload` @return [Boolean]

can_change_security_update_enabled[RW]

Whether the current user can change the securityUpdateEnabled field on link share metadata. Corresponds to the JSON property `canChangeSecurityUpdateEnabled` @return [Boolean]

can_change_security_update_enabled?[RW]

Whether the current user can change the securityUpdateEnabled field on link share metadata. Corresponds to the JSON property `canChangeSecurityUpdateEnabled` @return [Boolean]

can_comment[RW]

Whether the current user can comment on this file. Corresponds to the JSON property `canComment` @return [Boolean]

can_comment?[RW]

Whether the current user can comment on this file. Corresponds to the JSON property `canComment` @return [Boolean]

can_copy[RW]

Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder. Corresponds to the JSON property `canCopy` @return [Boolean]

can_copy?[RW]

Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder. Corresponds to the JSON property `canCopy` @return [Boolean]

can_delete[RW]

Whether the current user can delete this file. Corresponds to the JSON property `canDelete` @return [Boolean]

can_delete?[RW]

Whether the current user can delete this file. Corresponds to the JSON property `canDelete` @return [Boolean]

can_delete_children[RW]

Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives. Corresponds to the JSON property `canDeleteChildren` @return [Boolean]

can_delete_children?[RW]

Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives. Corresponds to the JSON property `canDeleteChildren` @return [Boolean]

can_download[RW]

Whether the current user can download this file. Corresponds to the JSON property `canDownload` @return [Boolean]

can_download?[RW]

Whether the current user can download this file. Corresponds to the JSON property `canDownload` @return [Boolean]

can_edit[RW]

Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent. Corresponds to the JSON property `canEdit` @return [Boolean]

can_edit?[RW]

Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent. Corresponds to the JSON property `canEdit` @return [Boolean]

can_list_children[RW]

Whether the current user can list the children of this folder. This is always false when the item is not a folder. Corresponds to the JSON property `canListChildren` @return [Boolean]

can_list_children?[RW]

Whether the current user can list the children of this folder. This is always false when the item is not a folder. Corresponds to the JSON property `canListChildren` @return [Boolean]

can_modify_content[RW]

Whether the current user can modify the content of this file. Corresponds to the JSON property `canModifyContent` @return [Boolean]

can_modify_content?[RW]

Whether the current user can modify the content of this file. Corresponds to the JSON property `canModifyContent` @return [Boolean]

can_modify_content_restriction[RW]

Whether the current user can modify restrictions on content of this file. Corresponds to the JSON property `canModifyContentRestriction` @return [Boolean]

can_modify_content_restriction?[RW]

Whether the current user can modify restrictions on content of this file. Corresponds to the JSON property `canModifyContentRestriction` @return [Boolean]

can_move_children_out_of_drive[RW]

Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives. Corresponds to the JSON property `canMoveChildrenOutOfDrive` @return [Boolean]

can_move_children_out_of_drive?[RW]

Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives. Corresponds to the JSON property `canMoveChildrenOutOfDrive` @return [Boolean]

can_move_children_out_of_team_drive[RW]

Deprecated - use canMoveChildrenOutOfDrive instead. Corresponds to the JSON property `canMoveChildrenOutOfTeamDrive` @return [Boolean]

can_move_children_out_of_team_drive?[RW]

Deprecated - use canMoveChildrenOutOfDrive instead. Corresponds to the JSON property `canMoveChildrenOutOfTeamDrive` @return [Boolean]

can_move_children_within_drive[RW]

Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user's access to the child and to the destination folder. Corresponds to the JSON property `canMoveChildrenWithinDrive` @return [Boolean]

can_move_children_within_drive?[RW]

Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user's access to the child and to the destination folder. Corresponds to the JSON property `canMoveChildrenWithinDrive` @return [Boolean]

can_move_children_within_team_drive[RW]

Deprecated - use canMoveChildrenWithinDrive instead. Corresponds to the JSON property `canMoveChildrenWithinTeamDrive` @return [Boolean]

can_move_children_within_team_drive?[RW]

Deprecated - use canMoveChildrenWithinDrive instead. Corresponds to the JSON property `canMoveChildrenWithinTeamDrive` @return [Boolean]

can_move_item_into_team_drive[RW]

Deprecated - use canMoveItemOutOfDrive instead. Corresponds to the JSON property `canMoveItemIntoTeamDrive` @return [Boolean]

can_move_item_into_team_drive?[RW]

Deprecated - use canMoveItemOutOfDrive instead. Corresponds to the JSON property `canMoveItemIntoTeamDrive` @return [Boolean]

can_move_item_out_of_drive[RW]

Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Corresponds to the JSON property `canMoveItemOutOfDrive` @return [Boolean]

can_move_item_out_of_drive?[RW]

Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Corresponds to the JSON property `canMoveItemOutOfDrive` @return [Boolean]

can_move_item_out_of_team_drive[RW]

Deprecated - use canMoveItemOutOfDrive instead. Corresponds to the JSON property `canMoveItemOutOfTeamDrive` @return [Boolean]

can_move_item_out_of_team_drive?[RW]

Deprecated - use canMoveItemOutOfDrive instead. Corresponds to the JSON property `canMoveItemOutOfTeamDrive` @return [Boolean]

can_move_item_within_drive[RW]

Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed. Corresponds to the JSON property `canMoveItemWithinDrive` @return [Boolean]

can_move_item_within_drive?[RW]

Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed. Corresponds to the JSON property `canMoveItemWithinDrive` @return [Boolean]

can_move_item_within_team_drive[RW]

Deprecated - use canMoveItemWithinDrive instead. Corresponds to the JSON property `canMoveItemWithinTeamDrive` @return [Boolean]

can_move_item_within_team_drive?[RW]

Deprecated - use canMoveItemWithinDrive instead. Corresponds to the JSON property `canMoveItemWithinTeamDrive` @return [Boolean]

can_move_team_drive_item[RW]

Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead. Corresponds to the JSON property `canMoveTeamDriveItem` @return [Boolean]

can_move_team_drive_item?[RW]

Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead. Corresponds to the JSON property `canMoveTeamDriveItem` @return [Boolean]

can_read_drive[RW]

Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives. Corresponds to the JSON property `canReadDrive` @return [Boolean]

can_read_drive?[RW]

Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives. Corresponds to the JSON property `canReadDrive` @return [Boolean]

can_read_revisions[RW]

Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read. Corresponds to the JSON property `canReadRevisions` @return [Boolean]

can_read_revisions?[RW]

Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read. Corresponds to the JSON property `canReadRevisions` @return [Boolean]

can_read_team_drive[RW]

Deprecated - use canReadDrive instead. Corresponds to the JSON property `canReadTeamDrive` @return [Boolean]

can_read_team_drive?[RW]

Deprecated - use canReadDrive instead. Corresponds to the JSON property `canReadTeamDrive` @return [Boolean]

can_remove_children[RW]

Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead. Corresponds to the JSON property `canRemoveChildren` @return [Boolean]

can_remove_children?[RW]

Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead. Corresponds to the JSON property `canRemoveChildren` @return [Boolean]

can_remove_my_drive_parent[RW]

Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files. Corresponds to the JSON property `canRemoveMyDriveParent` @return [Boolean]

can_remove_my_drive_parent?[RW]

Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files. Corresponds to the JSON property `canRemoveMyDriveParent` @return [Boolean]

can_rename[RW]

Whether the current user can rename this file. Corresponds to the JSON property `canRename` @return [Boolean]

can_rename?[RW]

Whether the current user can rename this file. Corresponds to the JSON property `canRename` @return [Boolean]

can_share[RW]

Whether the current user can modify the sharing settings for this file. Corresponds to the JSON property `canShare` @return [Boolean]

can_share?[RW]

Whether the current user can modify the sharing settings for this file. Corresponds to the JSON property `canShare` @return [Boolean]

can_trash[RW]

Whether the current user can move this file to trash. Corresponds to the JSON property `canTrash` @return [Boolean]

can_trash?[RW]

Whether the current user can move this file to trash. Corresponds to the JSON property `canTrash` @return [Boolean]

can_trash_children[RW]

Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives. Corresponds to the JSON property `canTrashChildren` @return [Boolean]

can_trash_children?[RW]

Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives. Corresponds to the JSON property `canTrashChildren` @return [Boolean]

can_untrash[RW]

Whether the current user can restore this file from trash. Corresponds to the JSON property `canUntrash` @return [Boolean]

can_untrash?[RW]

Whether the current user can restore this file from trash. Corresponds to the JSON property `canUntrash` @return [Boolean]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/drive_v2/classes.rb, line 2526
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/drive_v2/classes.rb, line 2531
def update!(**args)
  @can_add_children = args[:can_add_children] if args.key?(:can_add_children)
  @can_add_folder_from_another_drive = args[:can_add_folder_from_another_drive] if args.key?(:can_add_folder_from_another_drive)
  @can_add_my_drive_parent = args[:can_add_my_drive_parent] if args.key?(:can_add_my_drive_parent)
  @can_change_copy_requires_writer_permission = args[:can_change_copy_requires_writer_permission] if args.key?(:can_change_copy_requires_writer_permission)
  @can_change_restricted_download = args[:can_change_restricted_download] if args.key?(:can_change_restricted_download)
  @can_change_security_update_enabled = args[:can_change_security_update_enabled] if args.key?(:can_change_security_update_enabled)
  @can_comment = args[:can_comment] if args.key?(:can_comment)
  @can_copy = args[:can_copy] if args.key?(:can_copy)
  @can_delete = args[:can_delete] if args.key?(:can_delete)
  @can_delete_children = args[:can_delete_children] if args.key?(:can_delete_children)
  @can_download = args[:can_download] if args.key?(:can_download)
  @can_edit = args[:can_edit] if args.key?(:can_edit)
  @can_list_children = args[:can_list_children] if args.key?(:can_list_children)
  @can_modify_content = args[:can_modify_content] if args.key?(:can_modify_content)
  @can_modify_content_restriction = args[:can_modify_content_restriction] if args.key?(:can_modify_content_restriction)
  @can_move_children_out_of_drive = args[:can_move_children_out_of_drive] if args.key?(:can_move_children_out_of_drive)
  @can_move_children_out_of_team_drive = args[:can_move_children_out_of_team_drive] if args.key?(:can_move_children_out_of_team_drive)
  @can_move_children_within_drive = args[:can_move_children_within_drive] if args.key?(:can_move_children_within_drive)
  @can_move_children_within_team_drive = args[:can_move_children_within_team_drive] if args.key?(:can_move_children_within_team_drive)
  @can_move_item_into_team_drive = args[:can_move_item_into_team_drive] if args.key?(:can_move_item_into_team_drive)
  @can_move_item_out_of_drive = args[:can_move_item_out_of_drive] if args.key?(:can_move_item_out_of_drive)
  @can_move_item_out_of_team_drive = args[:can_move_item_out_of_team_drive] if args.key?(:can_move_item_out_of_team_drive)
  @can_move_item_within_drive = args[:can_move_item_within_drive] if args.key?(:can_move_item_within_drive)
  @can_move_item_within_team_drive = args[:can_move_item_within_team_drive] if args.key?(:can_move_item_within_team_drive)
  @can_move_team_drive_item = args[:can_move_team_drive_item] if args.key?(:can_move_team_drive_item)
  @can_read_drive = args[:can_read_drive] if args.key?(:can_read_drive)
  @can_read_revisions = args[:can_read_revisions] if args.key?(:can_read_revisions)
  @can_read_team_drive = args[:can_read_team_drive] if args.key?(:can_read_team_drive)
  @can_remove_children = args[:can_remove_children] if args.key?(:can_remove_children)
  @can_remove_my_drive_parent = args[:can_remove_my_drive_parent] if args.key?(:can_remove_my_drive_parent)
  @can_rename = args[:can_rename] if args.key?(:can_rename)
  @can_share = args[:can_share] if args.key?(:can_share)
  @can_trash = args[:can_trash] if args.key?(:can_trash)
  @can_trash_children = args[:can_trash_children] if args.key?(:can_trash_children)
  @can_untrash = args[:can_untrash] if args.key?(:can_untrash)
end