Class: Google::Apis::DriveV2::File::Capabilities
- Inherits:
-
Object
- Object
- Google::Apis::DriveV2::File::Capabilities
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/drive_v2/classes.rb,
generated/google/apis/drive_v2/representations.rb,
generated/google/apis/drive_v2/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_restricted_download ⇒ Boolean
(also: #can_change_restricted_download?)
Deprecated Corresponds to the JSON property
canChangeRestrictedDownload
. -
#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_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 the shared 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 shared 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_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_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.
2409 2410 2411 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2409 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
2211 2212 2213 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2211 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
2218 2219 2220 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2218 def @can_change_copy_requires_writer_permission end |
#can_change_restricted_download ⇒ Boolean Also known as: can_change_restricted_download?
Deprecated
Corresponds to the JSON property canChangeRestrictedDownload
2224 2225 2226 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2224 def can_change_restricted_download @can_change_restricted_download end |
#can_comment ⇒ Boolean Also known as: can_comment?
Whether the current user can comment on this file.
Corresponds to the JSON property canComment
2230 2231 2232 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2230 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
2238 2239 2240 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2238 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
2244 2245 2246 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2244 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
2251 2252 2253 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2251 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
2257 2258 2259 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2257 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
2265 2266 2267 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2265 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
2272 2273 2274 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2272 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
2278 2279 2280 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2278 def can_modify_content @can_modify_content 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
2286 2287 2288 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2286 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
2292 2293 2294 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2292 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 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 canMoveChildrenWithinDrive
2300 2301 2302 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2300 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
2306 2307 2308 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2306 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
2312 2313 2314 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2312 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
2320 2321 2322 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2320 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
2326 2327 2328 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2326 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 shared 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 items in shared drives.
Corresponds to the JSON property canMoveItemWithinDrive
2334 2335 2336 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2334 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
2340 2341 2342 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2340 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
2346 2347 2348 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2346 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
2353 2354 2355 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2353 def can_read_drive @can_read_drive 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 is not a folder, can be read.
Corresponds to the JSON property canReadRevisions
2361 2362 2363 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2361 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
2367 2368 2369 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2367 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
2375 2376 2377 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2375 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
2381 2382 2383 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2381 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
2387 2388 2389 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2387 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
2393 2394 2395 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2393 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
2400 2401 2402 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2400 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
2406 2407 2408 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2406 def can_untrash @can_untrash end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 |
# File 'generated/google/apis/drive_v2/classes.rb', line 2414 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_restricted_download = args[:can_change_restricted_download] if args.key?(:can_change_restricted_download) @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_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_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 |