Class: Google::Apis::DriveV3::File::Capabilities
- Inherits:
-
Object
- Object
- Google::Apis::DriveV3::File::Capabilities
- 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
Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Instance Attribute Summary collapse
-
#can_accept_ownership ⇒ Boolean
(also: #can_accept_ownership?)
Whether the current user is the pending owner of the file.
-
#can_add_children ⇒ Boolean
(also: #can_add_children?)
Whether the current user can add children to this folder.
-
#can_add_folder_from_another_drive ⇒ Boolean
(also: #can_add_folder_from_another_drive?)
Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder.
-
#can_add_my_drive_parent ⇒ Boolean
(also: #can_add_my_drive_parent?)
Whether the current user can add a parent for the item without removing an existing parent in the same request.
-
#can_change_copy_requires_writer_permission ⇒ Boolean
(also: #can_change_copy_requires_writer_permission?)
Whether the current user can change the copyRequiresWriterPermission restriction of this file.
-
#can_change_security_update_enabled ⇒ Boolean
(also: #can_change_security_update_enabled?)
Whether the current user can change the securityUpdateEnabled field on link share metadata.
-
#can_change_viewers_can_copy_content ⇒ Boolean
(also: #can_change_viewers_can_copy_content?)
Deprecated Corresponds to the JSON property
canChangeViewersCanCopyContent. -
#can_comment ⇒ Boolean
(also: #can_comment?)
Whether the current user can comment on this file.
-
#can_copy ⇒ Boolean
(also: #can_copy?)
Whether the current user can copy this file.
-
#can_delete ⇒ Boolean
(also: #can_delete?)
Whether the current user can delete this file.
-
#can_delete_children ⇒ Boolean
(also: #can_delete_children?)
Whether the current user can delete children of this folder.
-
#can_download ⇒ Boolean
(also: #can_download?)
Whether the current user can download this file.
-
#can_edit ⇒ Boolean
(also: #can_edit?)
Whether the current user can edit this file.
-
#can_list_children ⇒ Boolean
(also: #can_list_children?)
Whether the current user can list the children of this folder.
-
#can_modify_content ⇒ Boolean
(also: #can_modify_content?)
Whether the current user can modify the content of this file.
-
#can_modify_content_restriction ⇒ Boolean
(also: #can_modify_content_restriction?)
Whether the current user can modify restrictions on content of this file.
-
#can_modify_labels ⇒ Boolean
(also: #can_modify_labels?)
Whether the current user can modify the labels on this file.
-
#can_move_children_out_of_drive ⇒ Boolean
(also: #can_move_children_out_of_drive?)
Whether the current user can move children of this folder outside of the shared drive.
-
#can_move_children_out_of_team_drive ⇒ Boolean
(also: #can_move_children_out_of_team_drive?)
Deprecated - use canMoveChildrenOutOfDrive instead.
-
#can_move_children_within_drive ⇒ Boolean
(also: #can_move_children_within_drive?)
Whether the current user can move children of this folder within this drive.
-
#can_move_children_within_team_drive ⇒ Boolean
(also: #can_move_children_within_team_drive?)
Deprecated - use canMoveChildrenWithinDrive instead.
-
#can_move_item_into_team_drive ⇒ Boolean
(also: #can_move_item_into_team_drive?)
Deprecated - use canMoveItemOutOfDrive instead.
-
#can_move_item_out_of_drive ⇒ Boolean
(also: #can_move_item_out_of_drive?)
Whether the current user can move this item outside of this drive by changing its parent.
-
#can_move_item_out_of_team_drive ⇒ Boolean
(also: #can_move_item_out_of_team_drive?)
Deprecated - use canMoveItemOutOfDrive instead.
-
#can_move_item_within_drive ⇒ Boolean
(also: #can_move_item_within_drive?)
Whether the current user can move this item within this drive.
-
#can_move_item_within_team_drive ⇒ Boolean
(also: #can_move_item_within_team_drive?)
Deprecated - use canMoveItemWithinDrive instead.
-
#can_move_team_drive_item ⇒ Boolean
(also: #can_move_team_drive_item?)
Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
-
#can_read_drive ⇒ Boolean
(also: #can_read_drive?)
Whether the current user can read the shared drive to which this file belongs.
-
#can_read_labels ⇒ Boolean
(also: #can_read_labels?)
Whether the current user can read the labels on this file.
-
#can_read_revisions ⇒ Boolean
(also: #can_read_revisions?)
Whether the current user can read the revisions resource of this file.
-
#can_read_team_drive ⇒ Boolean
(also: #can_read_team_drive?)
Deprecated - use canReadDrive instead.
-
#can_remove_children ⇒ Boolean
(also: #can_remove_children?)
Whether the current user can remove children from this folder.
-
#can_remove_my_drive_parent ⇒ Boolean
(also: #can_remove_my_drive_parent?)
Whether the current user can remove a parent from the item without adding another parent in the same request.
-
#can_rename ⇒ Boolean
(also: #can_rename?)
Whether the current user can rename this file.
-
#can_share ⇒ Boolean
(also: #can_share?)
Whether the current user can modify the sharing settings for this file.
-
#can_trash ⇒ Boolean
(also: #can_trash?)
Whether the current user can move this file to trash.
-
#can_trash_children ⇒ Boolean
(also: #can_trash_children?)
Whether the current user can trash children of this folder.
-
#can_untrash ⇒ Boolean
(also: #can_untrash?)
Whether the current user can restore this file from trash.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Capabilities
constructor
A new instance of Capabilities.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Capabilities
Returns a new instance of Capabilities.
1759 1760 1761 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1759 def initialize(**args) update!(**args) end |
Instance Attribute Details
#can_accept_ownership ⇒ Boolean Also known as: can_accept_ownership?
Whether the current user is the pending owner of the file. Not populated for
shared drive files.
Corresponds to the JSON property canAcceptOwnership
1506 1507 1508 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1506 def can_accept_ownership @can_accept_ownership end |
#can_add_children ⇒ Boolean Also known as: can_add_children?
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
1513 1514 1515 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1513 def can_add_children @can_add_children end |
#can_add_folder_from_another_drive ⇒ Boolean Also known as: can_add_folder_from_another_drive?
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
1521 1522 1523 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1521 def can_add_folder_from_another_drive @can_add_folder_from_another_drive end |
#can_add_my_drive_parent ⇒ Boolean Also known as: can_add_my_drive_parent?
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
1528 1529 1530 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1528 def can_add_my_drive_parent @can_add_my_drive_parent end |
#can_change_copy_requires_writer_permission ⇒ Boolean Also known as: can_change_copy_requires_writer_permission?
Whether the current user can change the copyRequiresWriterPermission
restriction of this file.
Corresponds to the JSON property canChangeCopyRequiresWriterPermission
1535 1536 1537 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1535 def @can_change_copy_requires_writer_permission end |
#can_change_security_update_enabled ⇒ Boolean Also known as: can_change_security_update_enabled?
Whether the current user can change the securityUpdateEnabled field on link
share metadata.
Corresponds to the JSON property canChangeSecurityUpdateEnabled
1542 1543 1544 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1542 def can_change_security_update_enabled @can_change_security_update_enabled end |
#can_change_viewers_can_copy_content ⇒ Boolean Also known as: can_change_viewers_can_copy_content?
Deprecated
Corresponds to the JSON property canChangeViewersCanCopyContent
1548 1549 1550 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1548 def can_change_viewers_can_copy_content @can_change_viewers_can_copy_content end |
#can_comment ⇒ Boolean Also known as: can_comment?
Whether the current user can comment on this file.
Corresponds to the JSON property canComment
1554 1555 1556 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1554 def can_comment @can_comment end |
#can_copy ⇒ Boolean Also known as: can_copy?
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
1562 1563 1564 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1562 def can_copy @can_copy end |
#can_delete ⇒ Boolean Also known as: can_delete?
Whether the current user can delete this file.
Corresponds to the JSON property canDelete
1568 1569 1570 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1568 def can_delete @can_delete end |
#can_delete_children ⇒ Boolean Also known as: can_delete_children?
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
1575 1576 1577 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1575 def can_delete_children @can_delete_children end |
#can_download ⇒ Boolean Also known as: can_download?
Whether the current user can download this file.
Corresponds to the JSON property canDownload
1581 1582 1583 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1581 def can_download @can_download end |
#can_edit ⇒ Boolean Also known as: can_edit?
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
1589 1590 1591 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1589 def can_edit @can_edit end |
#can_list_children ⇒ Boolean Also known as: can_list_children?
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
1596 1597 1598 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1596 def can_list_children @can_list_children end |
#can_modify_content ⇒ Boolean Also known as: can_modify_content?
Whether the current user can modify the content of this file.
Corresponds to the JSON property canModifyContent
1602 1603 1604 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1602 def can_modify_content @can_modify_content end |
#can_modify_content_restriction ⇒ Boolean Also known as: can_modify_content_restriction?
Whether the current user can modify restrictions on content of this file.
Corresponds to the JSON property canModifyContentRestriction
1608 1609 1610 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1608 def can_modify_content_restriction @can_modify_content_restriction end |
#can_modify_labels ⇒ Boolean Also known as: can_modify_labels?
Whether the current user can modify the labels on this file.
Corresponds to the JSON property canModifyLabels
1614 1615 1616 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1614 def can_modify_labels @can_modify_labels end |
#can_move_children_out_of_drive ⇒ Boolean Also known as: can_move_children_out_of_drive?
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
1622 1623 1624 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1622 def can_move_children_out_of_drive @can_move_children_out_of_drive end |
#can_move_children_out_of_team_drive ⇒ Boolean Also known as: can_move_children_out_of_team_drive?
Deprecated - use canMoveChildrenOutOfDrive instead.
Corresponds to the JSON property canMoveChildrenOutOfTeamDrive
1628 1629 1630 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1628 def can_move_children_out_of_team_drive @can_move_children_out_of_team_drive end |
#can_move_children_within_drive ⇒ Boolean Also known as: can_move_children_within_drive?
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
1637 1638 1639 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1637 def can_move_children_within_drive @can_move_children_within_drive end |
#can_move_children_within_team_drive ⇒ Boolean Also known as: can_move_children_within_team_drive?
Deprecated - use canMoveChildrenWithinDrive instead.
Corresponds to the JSON property canMoveChildrenWithinTeamDrive
1643 1644 1645 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1643 def can_move_children_within_team_drive @can_move_children_within_team_drive end |
#can_move_item_into_team_drive ⇒ Boolean Also known as: can_move_item_into_team_drive?
Deprecated - use canMoveItemOutOfDrive instead.
Corresponds to the JSON property canMoveItemIntoTeamDrive
1649 1650 1651 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1649 def can_move_item_into_team_drive @can_move_item_into_team_drive end |
#can_move_item_out_of_drive ⇒ Boolean Also known as: can_move_item_out_of_drive?
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
1657 1658 1659 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1657 def can_move_item_out_of_drive @can_move_item_out_of_drive end |
#can_move_item_out_of_team_drive ⇒ Boolean Also known as: can_move_item_out_of_team_drive?
Deprecated - use canMoveItemOutOfDrive instead.
Corresponds to the JSON property canMoveItemOutOfTeamDrive
1663 1664 1665 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1663 def can_move_item_out_of_team_drive @can_move_item_out_of_team_drive end |
#can_move_item_within_drive ⇒ Boolean Also known as: can_move_item_within_drive?
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
1671 1672 1673 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1671 def can_move_item_within_drive @can_move_item_within_drive end |
#can_move_item_within_team_drive ⇒ Boolean Also known as: can_move_item_within_team_drive?
Deprecated - use canMoveItemWithinDrive instead.
Corresponds to the JSON property canMoveItemWithinTeamDrive
1677 1678 1679 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1677 def can_move_item_within_team_drive @can_move_item_within_team_drive end |
#can_move_team_drive_item ⇒ Boolean Also known as: can_move_team_drive_item?
Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
Corresponds to the JSON property canMoveTeamDriveItem
1683 1684 1685 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1683 def can_move_team_drive_item @can_move_team_drive_item end |
#can_read_drive ⇒ Boolean Also known as: can_read_drive?
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
1690 1691 1692 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1690 def can_read_drive @can_read_drive end |
#can_read_labels ⇒ Boolean Also known as: can_read_labels?
Whether the current user can read the labels on this file.
Corresponds to the JSON property canReadLabels
1696 1697 1698 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1696 def can_read_labels @can_read_labels end |
#can_read_revisions ⇒ Boolean Also known as: can_read_revisions?
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 isn't a folder, can be read.
Corresponds to the JSON property canReadRevisions
1704 1705 1706 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1704 def can_read_revisions @can_read_revisions end |
#can_read_team_drive ⇒ Boolean Also known as: can_read_team_drive?
Deprecated - use canReadDrive instead.
Corresponds to the JSON property canReadTeamDrive
1710 1711 1712 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1710 def can_read_team_drive @can_read_team_drive end |
#can_remove_children ⇒ Boolean Also known as: can_remove_children?
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
1718 1719 1720 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1718 def can_remove_children @can_remove_children end |
#can_remove_my_drive_parent ⇒ Boolean Also known as: can_remove_my_drive_parent?
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
1725 1726 1727 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1725 def can_remove_my_drive_parent @can_remove_my_drive_parent end |
#can_rename ⇒ Boolean Also known as: can_rename?
Whether the current user can rename this file.
Corresponds to the JSON property canRename
1731 1732 1733 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1731 def can_rename @can_rename end |
#can_share ⇒ Boolean Also known as:
Whether the current user can modify the sharing settings for this file.
Corresponds to the JSON property canShare
1737 1738 1739 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1737 def can_share @can_share end |
#can_trash ⇒ Boolean Also known as: can_trash?
Whether the current user can move this file to trash.
Corresponds to the JSON property canTrash
1743 1744 1745 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1743 def can_trash @can_trash end |
#can_trash_children ⇒ Boolean Also known as: can_trash_children?
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
1750 1751 1752 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1750 def can_trash_children @can_trash_children end |
#can_untrash ⇒ Boolean Also known as: can_untrash?
Whether the current user can restore this file from trash.
Corresponds to the JSON property canUntrash
1756 1757 1758 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1756 def can_untrash @can_untrash end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
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 1797 1798 1799 1800 1801 1802 1803 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1764 def update!(**args) @can_accept_ownership = args[:can_accept_ownership] if args.key?(:can_accept_ownership) @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_security_update_enabled = args[:can_change_security_update_enabled] if args.key?(:can_change_security_update_enabled) @can_change_viewers_can_copy_content = args[:can_change_viewers_can_copy_content] if args.key?(:can_change_viewers_can_copy_content) @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_modify_labels = args[:can_modify_labels] if args.key?(:can_modify_labels) @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_labels = args[:can_read_labels] if args.key?(:can_read_labels) @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 |