pub struct FileCapabilities {
Show 41 fields pub can_accept_ownership: Option<bool>, pub can_add_children: Option<bool>, pub can_add_folder_from_another_drive: Option<bool>, pub can_add_my_drive_parent: Option<bool>, pub can_change_copy_requires_writer_permission: Option<bool>, pub can_change_security_update_enabled: Option<bool>, pub can_change_viewers_can_copy_content: Option<bool>, pub can_comment: Option<bool>, pub can_copy: Option<bool>, pub can_delete: Option<bool>, pub can_delete_children: Option<bool>, pub can_download: Option<bool>, pub can_edit: Option<bool>, pub can_list_children: Option<bool>, pub can_modify_content: Option<bool>, pub can_modify_content_restriction: Option<bool>, pub can_modify_editor_content_restriction: Option<bool>, pub can_modify_labels: Option<bool>, pub can_modify_owner_content_restriction: Option<bool>, pub can_move_children_out_of_drive: Option<bool>, pub can_move_children_out_of_team_drive: Option<bool>, pub can_move_children_within_drive: Option<bool>, pub can_move_children_within_team_drive: Option<bool>, pub can_move_item_into_team_drive: Option<bool>, pub can_move_item_out_of_drive: Option<bool>, pub can_move_item_out_of_team_drive: Option<bool>, pub can_move_item_within_drive: Option<bool>, pub can_move_item_within_team_drive: Option<bool>, pub can_move_team_drive_item: Option<bool>, pub can_read_drive: Option<bool>, pub can_read_labels: Option<bool>, pub can_read_revisions: Option<bool>, pub can_read_team_drive: Option<bool>, pub can_remove_children: Option<bool>, pub can_remove_content_restriction: Option<bool>, pub can_remove_my_drive_parent: Option<bool>, pub can_rename: Option<bool>, pub can_share: Option<bool>, pub can_trash: Option<bool>, pub can_trash_children: Option<bool>, pub can_untrash: Option<bool>,
}
Expand description

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

This type is not used in any activity, and only used as part of another schema.

Fields§

§can_accept_ownership: Option<bool>

Output only. Whether the current user is the pending owner of the file. Not populated for shared drive files.

§can_add_children: Option<bool>

Output only. Whether the current user can add children to this folder. This is always false when the item is not a folder.

§can_add_folder_from_another_drive: Option<bool>

Output only. 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_add_my_drive_parent: Option<bool>

Output only. 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_change_copy_requires_writer_permission: Option<bool>

Output only. Whether the current user can change the copyRequiresWriterPermission restriction of this file.

§can_change_security_update_enabled: Option<bool>

Output only. Whether the current user can change the securityUpdateEnabled field on link share metadata.

§can_change_viewers_can_copy_content: Option<bool>

Deprecated: Output only.

§can_comment: Option<bool>

Output only. Whether the current user can comment on this file.

§can_copy: Option<bool>

Output only. 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_delete: Option<bool>

Output only. Whether the current user can delete this file.

§can_delete_children: Option<bool>

Output only. 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_download: Option<bool>

Output only. Whether the current user can download this file.

§can_edit: Option<bool>

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

§can_list_children: Option<bool>

Output only. Whether the current user can list the children of this folder. This is always false when the item is not a folder.

§can_modify_content: Option<bool>

Output only. Whether the current user can modify the content of this file.

§can_modify_content_restriction: Option<bool>

Deprecated: Output only. Use one of canModifyEditorContentRestriction, canModifyOwnerContentRestriction or canRemoveContentRestriction.

§can_modify_editor_content_restriction: Option<bool>

Output only. Whether the current user can add or modify content restrictions on the file which are editor restricted.

§can_modify_labels: Option<bool>

Output only. Whether the current user can modify the labels on the file.

§can_modify_owner_content_restriction: Option<bool>

Output only. Whether the current user can add or modify content restrictions which are owner restricted.

§can_move_children_out_of_drive: Option<bool>

Output only. 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_move_children_out_of_team_drive: Option<bool>

Deprecated: Output only. Use canMoveChildrenOutOfDrive instead.

§can_move_children_within_drive: Option<bool>

Output only. 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_move_children_within_team_drive: Option<bool>

Deprecated: Output only. Use canMoveChildrenWithinDrive instead.

§can_move_item_into_team_drive: Option<bool>

Deprecated: Output only. Use canMoveItemOutOfDrive instead.

§can_move_item_out_of_drive: Option<bool>

Output only. 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_move_item_out_of_team_drive: Option<bool>

Deprecated: Output only. Use canMoveItemOutOfDrive instead.

§can_move_item_within_drive: Option<bool>

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

§can_move_item_within_team_drive: Option<bool>

Deprecated: Output only. Use canMoveItemWithinDrive instead.

§can_move_team_drive_item: Option<bool>

Deprecated: Output only. Use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.

§can_read_drive: Option<bool>

Output only. Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.

§can_read_labels: Option<bool>

Output only. Whether the current user can read the labels on the file.

§can_read_revisions: Option<bool>

Output only. 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_read_team_drive: Option<bool>

Deprecated: Output only. Use canReadDrive instead.

§can_remove_children: Option<bool>

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

§can_remove_content_restriction: Option<bool>

Output only. Whether there is a content restriction on the file that can be removed by the current user.

§can_remove_my_drive_parent: Option<bool>

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

§can_rename: Option<bool>

Output only. Whether the current user can rename this file.

§can_share: Option<bool>

Output only. Whether the current user can modify the sharing settings for this file.

§can_trash: Option<bool>

Output only. Whether the current user can move this file to trash.

§can_trash_children: Option<bool>

Output only. 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_untrash: Option<bool>

Output only. Whether the current user can restore this file from trash.

Trait Implementations§

source§

impl Clone for FileCapabilities

source§

fn clone(&self) -> FileCapabilities

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FileCapabilities

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for FileCapabilities

source§

fn default() -> FileCapabilities

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for FileCapabilities

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for FileCapabilities

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl NestedType for FileCapabilities

source§

impl Part for FileCapabilities

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,