Class: Google::Apis::DriveV3::File::Capabilities

Inherits:
Object
  • Object
show all
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

Output only. Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take. For more information, see Understand file capabilities.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Capabilities

Returns a new instance of Capabilities.



2619
2620
2621
# File 'lib/google/apis/drive_v3/classes.rb', line 2619

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#can_accept_ownershipBoolean Also known as: can_accept_ownership?

Output only. Whether the current user is the pending owner of the file. Not populated for shared drive files. Corresponds to the JSON property canAcceptOwnership

Returns:

  • (Boolean)


2307
2308
2309
# File 'lib/google/apis/drive_v3/classes.rb', line 2307

def can_accept_ownership
  @can_accept_ownership
end

#can_access_via_gen_aiBoolean Also known as: can_access_via_gen_ai?

Whether the current user can access this file via Gen AI features. Corresponds to the JSON property canAccessViaGenAi

Returns:

  • (Boolean)


2313
2314
2315
# File 'lib/google/apis/drive_v3/classes.rb', line 2313

def can_access_via_gen_ai
  @can_access_via_gen_ai
end

#can_add_childrenBoolean Also known as: can_add_children?

Output only. Whether the current user can add children to this folder. This is always false when the item isn't a folder. Corresponds to the JSON property canAddChildren

Returns:

  • (Boolean)


2320
2321
2322
# File 'lib/google/apis/drive_v3/classes.rb', line 2320

def can_add_children
  @can_add_children
end

#can_add_folder_from_another_driveBoolean Also known as: can_add_folder_from_another_drive?

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 isn't a folder. Only populated for items in shared drives. Corresponds to the JSON property canAddFolderFromAnotherDrive

Returns:

  • (Boolean)


2328
2329
2330
# File 'lib/google/apis/drive_v3/classes.rb', line 2328

def can_add_folder_from_another_drive
  @can_add_folder_from_another_drive
end

#can_add_my_drive_parentBoolean Also known as: can_add_my_drive_parent?

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. Corresponds to the JSON property canAddMyDriveParent

Returns:

  • (Boolean)


2336
2337
2338
# File 'lib/google/apis/drive_v3/classes.rb', line 2336

def can_add_my_drive_parent
  @can_add_my_drive_parent
end

#can_change_copy_requires_writer_permissionBoolean Also known as: can_change_copy_requires_writer_permission?

Output only. Whether the current user can change the copyRequiresWriterPermission restriction of this file. Corresponds to the JSON property canChangeCopyRequiresWriterPermission

Returns:

  • (Boolean)


2343
2344
2345
# File 'lib/google/apis/drive_v3/classes.rb', line 2343

def can_change_copy_requires_writer_permission
  @can_change_copy_requires_writer_permission
end

#can_change_item_download_restrictionBoolean Also known as: can_change_item_download_restriction?

Output only. Whether the current user can change the owner or organizer- applied download restrictions of the file. Corresponds to the JSON property canChangeItemDownloadRestriction

Returns:

  • (Boolean)


2350
2351
2352
# File 'lib/google/apis/drive_v3/classes.rb', line 2350

def can_change_item_download_restriction
  @can_change_item_download_restriction
end

#can_change_security_update_enabledBoolean Also known as: can_change_security_update_enabled?

Output only. Whether the current user can change the securityUpdateEnabled field on link share metadata. Corresponds to the JSON property canChangeSecurityUpdateEnabled

Returns:

  • (Boolean)


2357
2358
2359
# File 'lib/google/apis/drive_v3/classes.rb', line 2357

def can_change_security_update_enabled
  @can_change_security_update_enabled
end

#can_change_viewers_can_copy_contentBoolean Also known as: can_change_viewers_can_copy_content?

Deprecated: Output only. Corresponds to the JSON property canChangeViewersCanCopyContent

Returns:

  • (Boolean)


2363
2364
2365
# File 'lib/google/apis/drive_v3/classes.rb', line 2363

def can_change_viewers_can_copy_content
  @can_change_viewers_can_copy_content
end

#can_commentBoolean Also known as: can_comment?

Output only. Whether the current user can comment on this file. Corresponds to the JSON property canComment

Returns:

  • (Boolean)


2369
2370
2371
# File 'lib/google/apis/drive_v3/classes.rb', line 2369

def can_comment
  @can_comment
end

#can_copyBoolean Also known as: can_copy?

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 if it's not a folder. Corresponds to the JSON property canCopy

Returns:

  • (Boolean)


2377
2378
2379
# File 'lib/google/apis/drive_v3/classes.rb', line 2377

def can_copy
  @can_copy
end

#can_deleteBoolean Also known as: can_delete?

Output only. Whether the current user can delete this file. Corresponds to the JSON property canDelete

Returns:

  • (Boolean)


2383
2384
2385
# File 'lib/google/apis/drive_v3/classes.rb', line 2383

def can_delete
  @can_delete
end

#can_delete_childrenBoolean Also known as: can_delete_children?

Output only. Whether the current user can delete children of this folder. This is false when the item isn't a folder. Only populated for items in shared drives. Corresponds to the JSON property canDeleteChildren

Returns:

  • (Boolean)


2391
2392
2393
# File 'lib/google/apis/drive_v3/classes.rb', line 2391

def can_delete_children
  @can_delete_children
end

#can_disable_inherited_permissionsBoolean Also known as: can_disable_inherited_permissions?

Whether a user can disable inherited permissions. Corresponds to the JSON property canDisableInheritedPermissions

Returns:

  • (Boolean)


2397
2398
2399
# File 'lib/google/apis/drive_v3/classes.rb', line 2397

def can_disable_inherited_permissions
  @can_disable_inherited_permissions
end

#can_downloadBoolean Also known as: can_download?

Output only. Whether the current user can download this file. Corresponds to the JSON property canDownload

Returns:

  • (Boolean)


2403
2404
2405
# File 'lib/google/apis/drive_v3/classes.rb', line 2403

def can_download
  @can_download
end

#can_editBoolean Also known as: can_edit?

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. Corresponds to the JSON property canEdit

Returns:

  • (Boolean)


2411
2412
2413
# File 'lib/google/apis/drive_v3/classes.rb', line 2411

def can_edit
  @can_edit
end

#can_enable_inherited_permissionsBoolean Also known as: can_enable_inherited_permissions?

Whether a user can re-enable inherited permissions. Corresponds to the JSON property canEnableInheritedPermissions

Returns:

  • (Boolean)


2417
2418
2419
# File 'lib/google/apis/drive_v3/classes.rb', line 2417

def can_enable_inherited_permissions
  @can_enable_inherited_permissions
end

#can_list_childrenBoolean Also known as: can_list_children?

Output only. Whether the current user can list the children of this folder. This is always false when the item isn't a folder. Corresponds to the JSON property canListChildren

Returns:

  • (Boolean)


2424
2425
2426
# File 'lib/google/apis/drive_v3/classes.rb', line 2424

def can_list_children
  @can_list_children
end

#can_modify_contentBoolean Also known as: can_modify_content?

Output only. Whether the current user can modify the content of this file. Corresponds to the JSON property canModifyContent

Returns:

  • (Boolean)


2430
2431
2432
# File 'lib/google/apis/drive_v3/classes.rb', line 2430

def can_modify_content
  @can_modify_content
end

#can_modify_content_restrictionBoolean Also known as: can_modify_content_restriction?

Deprecated: Output only. Use one of canModifyEditorContentRestriction, canModifyOwnerContentRestriction, or canRemoveContentRestriction. Corresponds to the JSON property canModifyContentRestriction

Returns:

  • (Boolean)


2437
2438
2439
# File 'lib/google/apis/drive_v3/classes.rb', line 2437

def can_modify_content_restriction
  @can_modify_content_restriction
end

#can_modify_editor_content_restrictionBoolean Also known as: can_modify_editor_content_restriction?

Output only. Whether the current user can add or modify content restrictions on the file which are editor restricted. Corresponds to the JSON property canModifyEditorContentRestriction

Returns:

  • (Boolean)


2444
2445
2446
# File 'lib/google/apis/drive_v3/classes.rb', line 2444

def can_modify_editor_content_restriction
  @can_modify_editor_content_restriction
end

#can_modify_labelsBoolean Also known as: can_modify_labels?

Output only. Whether the current user can modify the labels on the file. Corresponds to the JSON property canModifyLabels

Returns:

  • (Boolean)


2450
2451
2452
# File 'lib/google/apis/drive_v3/classes.rb', line 2450

def can_modify_labels
  @can_modify_labels
end

#can_modify_owner_content_restrictionBoolean Also known as: can_modify_owner_content_restriction?

Output only. Whether the current user can add or modify content restrictions which are owner restricted. Corresponds to the JSON property canModifyOwnerContentRestriction

Returns:

  • (Boolean)


2457
2458
2459
# File 'lib/google/apis/drive_v3/classes.rb', line 2457

def can_modify_owner_content_restriction
  @can_modify_owner_content_restriction
end

#can_move_children_out_of_driveBoolean Also known as: can_move_children_out_of_drive?

Output only. Whether the current user can move children of this folder outside of the shared drive. This is false when the item isn't a folder. Only populated for items in shared drives. Corresponds to the JSON property canMoveChildrenOutOfDrive

Returns:

  • (Boolean)


2465
2466
2467
# File 'lib/google/apis/drive_v3/classes.rb', line 2465

def can_move_children_out_of_drive
  @can_move_children_out_of_drive
end

#can_move_children_out_of_team_driveBoolean Also known as: can_move_children_out_of_team_drive?

Deprecated: Output only. Use canMoveChildrenOutOfDrive instead. Corresponds to the JSON property canMoveChildrenOutOfTeamDrive

Returns:

  • (Boolean)


2471
2472
2473
# File 'lib/google/apis/drive_v3/classes.rb', line 2471

def can_move_children_out_of_team_drive
  @can_move_children_out_of_team_drive
end

#can_move_children_within_driveBoolean Also known as: can_move_children_within_drive?

Output only. Whether the current user can move children of this folder within this drive. This is false when the item isn't 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

Returns:

  • (Boolean)


2480
2481
2482
# File 'lib/google/apis/drive_v3/classes.rb', line 2480

def can_move_children_within_drive
  @can_move_children_within_drive
end

#can_move_children_within_team_driveBoolean Also known as: can_move_children_within_team_drive?

Deprecated: Output only. Use canMoveChildrenWithinDrive instead. Corresponds to the JSON property canMoveChildrenWithinTeamDrive

Returns:

  • (Boolean)


2486
2487
2488
# File 'lib/google/apis/drive_v3/classes.rb', line 2486

def can_move_children_within_team_drive
  @can_move_children_within_team_drive
end

#can_move_item_into_team_driveBoolean Also known as: can_move_item_into_team_drive?

Deprecated: Output only. Use canMoveItemOutOfDrive instead. Corresponds to the JSON property canMoveItemIntoTeamDrive

Returns:

  • (Boolean)


2492
2493
2494
# File 'lib/google/apis/drive_v3/classes.rb', line 2492

def can_move_item_into_team_drive
  @can_move_item_into_team_drive
end

#can_move_item_out_of_driveBoolean Also known as: can_move_item_out_of_drive?

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's being added. Corresponds to the JSON property canMoveItemOutOfDrive

Returns:

  • (Boolean)


2500
2501
2502
# File 'lib/google/apis/drive_v3/classes.rb', line 2500

def can_move_item_out_of_drive
  @can_move_item_out_of_drive
end

#can_move_item_out_of_team_driveBoolean Also known as: can_move_item_out_of_team_drive?

Deprecated: Output only. Use canMoveItemOutOfDrive instead. Corresponds to the JSON property canMoveItemOutOfTeamDrive

Returns:

  • (Boolean)


2506
2507
2508
# File 'lib/google/apis/drive_v3/classes.rb', line 2506

def can_move_item_out_of_team_drive
  @can_move_item_out_of_team_drive
end

#can_move_item_within_driveBoolean Also known as: can_move_item_within_drive?

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's being added and the parent that is being removed. Corresponds to the JSON property canMoveItemWithinDrive

Returns:

  • (Boolean)


2514
2515
2516
# File 'lib/google/apis/drive_v3/classes.rb', line 2514

def can_move_item_within_drive
  @can_move_item_within_drive
end

#can_move_item_within_team_driveBoolean Also known as: can_move_item_within_team_drive?

Deprecated: Output only. Use canMoveItemWithinDrive instead. Corresponds to the JSON property canMoveItemWithinTeamDrive

Returns:

  • (Boolean)


2520
2521
2522
# File 'lib/google/apis/drive_v3/classes.rb', line 2520

def can_move_item_within_team_drive
  @can_move_item_within_team_drive
end

#can_move_team_drive_itemBoolean Also known as: can_move_team_drive_item?

Deprecated: Output only. Use canMoveItemWithinDrive or canMoveItemOutOfDrive instead. Corresponds to the JSON property canMoveTeamDriveItem

Returns:

  • (Boolean)


2527
2528
2529
# File 'lib/google/apis/drive_v3/classes.rb', line 2527

def can_move_team_drive_item
  @can_move_team_drive_item
end

#can_read_driveBoolean Also known as: can_read_drive?

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

Returns:

  • (Boolean)


2534
2535
2536
# File 'lib/google/apis/drive_v3/classes.rb', line 2534

def can_read_drive
  @can_read_drive
end

#can_read_labelsBoolean Also known as: can_read_labels?

Output only. Whether the current user can read the labels on the file. Corresponds to the JSON property canReadLabels

Returns:

  • (Boolean)


2540
2541
2542
# File 'lib/google/apis/drive_v3/classes.rb', line 2540

def can_read_labels
  @can_read_labels
end

#can_read_revisionsBoolean Also known as: can_read_revisions?

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 if it's not a folder, can be read. Corresponds to the JSON property canReadRevisions

Returns:

  • (Boolean)


2548
2549
2550
# File 'lib/google/apis/drive_v3/classes.rb', line 2548

def can_read_revisions
  @can_read_revisions
end

#can_read_team_driveBoolean Also known as: can_read_team_drive?

Deprecated: Output only. Use canReadDrive instead. Corresponds to the JSON property canReadTeamDrive

Returns:

  • (Boolean)


2554
2555
2556
# File 'lib/google/apis/drive_v3/classes.rb', line 2554

def can_read_team_drive
  @can_read_team_drive
end

#can_remove_childrenBoolean Also known as: can_remove_children?

Output only. Whether the current user can remove children from this folder. This is always false when the item isn't a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead. Corresponds to the JSON property canRemoveChildren

Returns:

  • (Boolean)


2562
2563
2564
# File 'lib/google/apis/drive_v3/classes.rb', line 2562

def can_remove_children
  @can_remove_children
end

#can_remove_content_restrictionBoolean Also known as: can_remove_content_restriction?

Output only. Whether there's a content restriction on the file that can be removed by the current user. Corresponds to the JSON property canRemoveContentRestriction

Returns:

  • (Boolean)


2569
2570
2571
# File 'lib/google/apis/drive_v3/classes.rb', line 2569

def can_remove_content_restriction
  @can_remove_content_restriction
end

#can_remove_my_drive_parentBoolean Also known as: can_remove_my_drive_parent?

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. Corresponds to the JSON property canRemoveMyDriveParent

Returns:

  • (Boolean)


2577
2578
2579
# File 'lib/google/apis/drive_v3/classes.rb', line 2577

def can_remove_my_drive_parent
  @can_remove_my_drive_parent
end

#can_renameBoolean Also known as: can_rename?

Output only. Whether the current user can rename this file. Corresponds to the JSON property canRename

Returns:

  • (Boolean)


2583
2584
2585
# File 'lib/google/apis/drive_v3/classes.rb', line 2583

def can_rename
  @can_rename
end

#can_shareBoolean Also known as: can_share?

Output only. Whether the current user can modify the sharing settings for this file. Corresponds to the JSON property canShare

Returns:

  • (Boolean)


2590
2591
2592
# File 'lib/google/apis/drive_v3/classes.rb', line 2590

def can_share
  @can_share
end

#can_start_approvalBoolean Also known as: can_start_approval?

Whether the current user can start an approval on the file. Corresponds to the JSON property canStartApproval

Returns:

  • (Boolean)


2596
2597
2598
# File 'lib/google/apis/drive_v3/classes.rb', line 2596

def can_start_approval
  @can_start_approval
end

#can_trashBoolean Also known as: can_trash?

Output only. Whether the current user can move this file to trash. Corresponds to the JSON property canTrash

Returns:

  • (Boolean)


2602
2603
2604
# File 'lib/google/apis/drive_v3/classes.rb', line 2602

def can_trash
  @can_trash
end

#can_trash_childrenBoolean Also known as: can_trash_children?

Output only. Whether the current user can trash children of this folder. This is false when the item isn't a folder. Only populated for items in shared drives. Corresponds to the JSON property canTrashChildren

Returns:

  • (Boolean)


2610
2611
2612
# File 'lib/google/apis/drive_v3/classes.rb', line 2610

def can_trash_children
  @can_trash_children
end

#can_untrashBoolean Also known as: can_untrash?

Output only. Whether the current user can restore this file from trash. Corresponds to the JSON property canUntrash

Returns:

  • (Boolean)


2616
2617
2618
# File 'lib/google/apis/drive_v3/classes.rb', line 2616

def can_untrash
  @can_untrash
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
# File 'lib/google/apis/drive_v3/classes.rb', line 2624

def update!(**args)
  @can_accept_ownership = args[:can_accept_ownership] if args.key?(:can_accept_ownership)
  @can_access_via_gen_ai = args[:can_access_via_gen_ai] if args.key?(:can_access_via_gen_ai)
  @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_item_download_restriction = args[:can_change_item_download_restriction] if args.key?(:can_change_item_download_restriction)
  @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_disable_inherited_permissions = args[:can_disable_inherited_permissions] if args.key?(:can_disable_inherited_permissions)
  @can_download = args[:can_download] if args.key?(:can_download)
  @can_edit = args[:can_edit] if args.key?(:can_edit)
  @can_enable_inherited_permissions = args[:can_enable_inherited_permissions] if args.key?(:can_enable_inherited_permissions)
  @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_editor_content_restriction = args[:can_modify_editor_content_restriction] if args.key?(:can_modify_editor_content_restriction)
  @can_modify_labels = args[:can_modify_labels] if args.key?(:can_modify_labels)
  @can_modify_owner_content_restriction = args[:can_modify_owner_content_restriction] if args.key?(:can_modify_owner_content_restriction)
  @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_content_restriction = args[:can_remove_content_restriction] if args.key?(:can_remove_content_restriction)
  @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_start_approval = args[:can_start_approval] if args.key?(:can_start_approval)
  @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