Class: Google::Apis::DriveV3::File::Capabilities
- Inherits:
-
Object
- Object
- Google::Apis::DriveV3::File::Capabilities
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/drive_v3/classes.rb,
generated/google/apis/drive_v3/representations.rb,
generated/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_add_children ⇒ Boolean
(also: #can_add_children?)
Whether the current user can add children to this folder.
-
#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_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_move_children_out_of_team_drive ⇒ Boolean
(also: #can_move_children_out_of_team_drive?)
Whether the current user can move children of this folder outside of the Team Drive.
-
#can_move_children_within_team_drive ⇒ Boolean
(also: #can_move_children_within_team_drive?)
Whether the current user can move children of this folder within the Team Drive.
-
#can_move_item_into_team_drive ⇒ Boolean
(also: #can_move_item_into_team_drive?)
Whether the current user can move this item into a Team Drive.
-
#can_move_item_out_of_team_drive ⇒ Boolean
(also: #can_move_item_out_of_team_drive?)
Whether the current user can move this Team Drive item outside of this Team Drive by changing its parent.
-
#can_move_item_within_team_drive ⇒ Boolean
(also: #can_move_item_within_team_drive?)
Whether the current user can move this Team Drive item within this Team Drive.
-
#can_move_team_drive_item ⇒ Boolean
(also: #can_move_team_drive_item?)
Deprecated - use canMoveItemWithinTeamDrive or canMoveItemOutOfTeamDrive instead.
-
#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?)
Whether the current user can read the Team Drive to which this file belongs.
-
#can_remove_children ⇒ Boolean
(also: #can_remove_children?)
Whether the current user can remove children from this folder.
-
#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.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Capabilities
Returns a new instance of Capabilities
1090 1091 1092 |
# File 'generated/google/apis/drive_v3/classes.rb', line 1090 def initialize(**args) update!(**args) end |
Instance Attribute Details
#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
927 928 929 |
# File 'generated/google/apis/drive_v3/classes.rb', line 927 def can_add_children @can_add_children 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
934 935 936 |
# File 'generated/google/apis/drive_v3/classes.rb', line 934 def @can_change_copy_requires_writer_permission end |
#can_change_viewers_can_copy_content ⇒ Boolean Also known as: can_change_viewers_can_copy_content?
Deprecated
Corresponds to the JSON property canChangeViewersCanCopyContent
940 941 942 |
# File 'generated/google/apis/drive_v3/classes.rb', line 940 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
946 947 948 |
# File 'generated/google/apis/drive_v3/classes.rb', line 946 def can_comment @can_comment end |
#can_copy ⇒ Boolean Also known as: can_copy?
Whether the current user can copy this file. For a Team Drive item, 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
954 955 956 |
# File 'generated/google/apis/drive_v3/classes.rb', line 954 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
960 961 962 |
# File 'generated/google/apis/drive_v3/classes.rb', line 960 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 Team Drive items.
Corresponds to the JSON property canDeleteChildren
967 968 969 |
# File 'generated/google/apis/drive_v3/classes.rb', line 967 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
973 974 975 |
# File 'generated/google/apis/drive_v3/classes.rb', line 973 def can_download @can_download end |
#can_edit ⇒ Boolean Also known as: can_edit?
Whether the current user can edit this file.
Corresponds to the JSON property canEdit
979 980 981 |
# File 'generated/google/apis/drive_v3/classes.rb', line 979 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
986 987 988 |
# File 'generated/google/apis/drive_v3/classes.rb', line 986 def can_list_children @can_list_children end |
#can_move_children_out_of_team_drive ⇒ Boolean Also known as: can_move_children_out_of_team_drive?
Whether the current user can move children of this folder outside of the Team
Drive. This is false when the item is not a folder. Only populated for Team
Drive items.
Corresponds to the JSON property canMoveChildrenOutOfTeamDrive
994 995 996 |
# File 'generated/google/apis/drive_v3/classes.rb', line 994 def can_move_children_out_of_team_drive @can_move_children_out_of_team_drive end |
#can_move_children_within_team_drive ⇒ Boolean Also known as: can_move_children_within_team_drive?
Whether the current user can move children of this folder within the Team
Drive. This is false when the item is not a folder. Only populated for Team
Drive items.
Corresponds to the JSON property canMoveChildrenWithinTeamDrive
1002 1003 1004 |
# File 'generated/google/apis/drive_v3/classes.rb', line 1002 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?
Whether the current user can move this item into a Team Drive. If the item is
in a Team Drive, this field is equivalent to canMoveTeamDriveItem.
Corresponds to the JSON property canMoveItemIntoTeamDrive
1009 1010 1011 |
# File 'generated/google/apis/drive_v3/classes.rb', line 1009 def can_move_item_into_team_drive @can_move_item_into_team_drive end |
#can_move_item_out_of_team_drive ⇒ Boolean Also known as: can_move_item_out_of_team_drive?
Whether the current user can move this Team Drive item outside of this Team
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. Only
populated for Team Drive items.
Corresponds to the JSON property canMoveItemOutOfTeamDrive
1018 1019 1020 |
# File 'generated/google/apis/drive_v3/classes.rb', line 1018 def can_move_item_out_of_team_drive @can_move_item_out_of_team_drive end |
#can_move_item_within_team_drive ⇒ Boolean Also known as: can_move_item_within_team_drive?
Whether the current user can move this Team Drive item within this Team Drive.
Note that a request to change the parent of the item may still fail depending
on the new parent that is being added. Only populated for Team Drive items.
Corresponds to the JSON property canMoveItemWithinTeamDrive
1026 1027 1028 |
# File 'generated/google/apis/drive_v3/classes.rb', line 1026 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 canMoveItemWithinTeamDrive or canMoveItemOutOfTeamDrive
instead.
Corresponds to the JSON property canMoveTeamDriveItem
1033 1034 1035 |
# File 'generated/google/apis/drive_v3/classes.rb', line 1033 def can_move_team_drive_item @can_move_team_drive_item 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
Team 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
1041 1042 1043 |
# File 'generated/google/apis/drive_v3/classes.rb', line 1041 def can_read_revisions @can_read_revisions end |
#can_read_team_drive ⇒ Boolean Also known as: can_read_team_drive?
Whether the current user can read the Team Drive to which this file belongs.
Only populated for Team Drive files.
Corresponds to the JSON property canReadTeamDrive
1048 1049 1050 |
# File 'generated/google/apis/drive_v3/classes.rb', line 1048 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 Team Drive items, use
canDeleteChildren or canTrashChildren instead.
Corresponds to the JSON property canRemoveChildren
1056 1057 1058 |
# File 'generated/google/apis/drive_v3/classes.rb', line 1056 def can_remove_children @can_remove_children end |
#can_rename ⇒ Boolean Also known as: can_rename?
Whether the current user can rename this file.
Corresponds to the JSON property canRename
1062 1063 1064 |
# File 'generated/google/apis/drive_v3/classes.rb', line 1062 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
1068 1069 1070 |
# File 'generated/google/apis/drive_v3/classes.rb', line 1068 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
1074 1075 1076 |
# File 'generated/google/apis/drive_v3/classes.rb', line 1074 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 Team Drive items.
Corresponds to the JSON property canTrashChildren
1081 1082 1083 |
# File 'generated/google/apis/drive_v3/classes.rb', line 1081 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
1087 1088 1089 |
# File 'generated/google/apis/drive_v3/classes.rb', line 1087 def can_untrash @can_untrash end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 |
# File 'generated/google/apis/drive_v3/classes.rb', line 1095 def update!(**args) @can_add_children = args[:can_add_children] if args.key?(:can_add_children) @can_change_copy_requires_writer_permission = args[:can_change_copy_requires_writer_permission] if args.key?(:can_change_copy_requires_writer_permission) @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_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_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_team_drive = args[:can_move_item_out_of_team_drive] if args.key?(:can_move_item_out_of_team_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_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_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 |