pub struct FileCapabilities {Show 31 fields
pub can_move_children_out_of_drive: Option<bool>,
pub can_read_drive: Option<bool>,
pub can_edit: Option<bool>,
pub can_copy: Option<bool>,
pub can_comment: Option<bool>,
pub can_add_children: Option<bool>,
pub can_delete: Option<bool>,
pub can_download: Option<bool>,
pub can_list_children: Option<bool>,
pub can_remove_children: Option<bool>,
pub can_rename: Option<bool>,
pub can_trash: Option<bool>,
pub can_read_revisions: Option<bool>,
pub can_change_copy_requires_writer_permission: Option<bool>,
pub can_untrash: Option<bool>,
pub can_modify_content: Option<bool>,
pub can_delete_children: Option<bool>,
pub can_trash_children: Option<bool>,
pub can_move_item_out_of_drive: Option<bool>,
pub can_add_my_drive_parent: Option<bool>,
pub can_move_item_within_drive: Option<bool>,
pub can_share: Option<bool>,
pub can_move_children_within_drive: Option<bool>,
pub can_add_folder_from_another_drive: Option<bool>,
pub can_change_security_update_enabled: Option<bool>,
pub can_accept_ownership: Option<bool>,
pub can_read_labels: Option<bool>,
pub can_modify_labels: Option<bool>,
pub can_modify_editor_content_restriction: Option<bool>,
pub can_modify_owner_content_restriction: Option<bool>,
pub can_remove_content_restriction: Option<bool>,
}Expand description
Capabilities the current user has on a file.
Each capability corresponds to a fine-grained action that a user may take.
Fields§
§can_move_children_out_of_drive: Option<bool>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.
can_read_drive: Option<bool>Whether the current user can read the shared drive to which this file belongs.
Only populated for items in shared drives.
can_edit: Option<bool>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
can_change_copy_requires_writer_permission
or can_modify_content.
can_copy: Option<bool>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.
can_comment: Option<bool>Whether the current user can comment on this file.
can_add_children: Option<bool>Whether the current user can add children to this folder.
This is always false when the item is not a folder.
can_delete: Option<bool>Whether the current user can delete this file.
can_download: Option<bool>Whether the current user can download this file.
can_list_children: Option<bool>Whether the current user can list the children of this folder.
This is always false when the item is not a folder.
can_remove_children: Option<bool>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
can_delete_children or
can_trash_children instead.
can_rename: Option<bool>Whether the current user can rename this file.
can_trash: Option<bool>Whether the current user can move this file to trash.
can_read_revisions: Option<bool>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.
can_change_copy_requires_writer_permission: Option<bool>Whether the current user can change the
copy_requires_writer_permission
restriction of this file.
can_untrash: Option<bool>Whether the current user can restore this file from trash.
can_modify_content: Option<bool>Whether the current user can modify the content of this file.
can_delete_children: Option<bool>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.
can_trash_children: Option<bool>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.
can_move_item_out_of_drive: Option<bool>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.
can_add_my_drive_parent: Option<bool>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.
can_move_item_within_drive: Option<bool>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.
Whether the current user can modify the sharing settings for this file.
can_move_children_within_drive: Option<bool>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.
can_add_folder_from_another_drive: Option<bool>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.
can_change_security_update_enabled: Option<bool>Whether the current user can change the
security_update_enabled
field on link share metadata.
can_accept_ownership: Option<bool>Whether the current user is the pending owner of the file.
Not populated for shared drive files.
can_read_labels: Option<bool>Whether the current user can read the labels on the file.
can_modify_labels: Option<bool>Whether the current user can modify the labels on the file.
can_modify_editor_content_restriction: Option<bool>Whether the current user can add or modify content restrictions on the file which are editor restricted.
can_modify_owner_content_restriction: Option<bool>Whether the current user can add or modify content restrictions which are owner restricted.
can_remove_content_restriction: Option<bool>Whether there is a content restriction on the file that can be removed by the current user.
Implementations§
Trait Implementations§
Source§impl Clone for FileCapabilities
impl Clone for FileCapabilities
Source§fn clone(&self) -> FileCapabilities
fn clone(&self) -> FileCapabilities
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more