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 the 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 user can add children to this folder.
-
#can_comment ⇒ Boolean
(also: #can_comment?)
Whether the user can comment on the file.
-
#can_copy ⇒ Boolean
(also: #can_copy?)
Whether the user can copy the file.
-
#can_delete ⇒ Boolean
(also: #can_delete?)
Whether the file can be deleted by the user.
-
#can_download ⇒ Boolean
(also: #can_download?)
Whether the file can be downloaded by the user.
-
#can_edit ⇒ Boolean
(also: #can_edit?)
Whether the user can edit the file's content.
-
#can_list_children ⇒ Boolean
(also: #can_list_children?)
Whether the user can list the children of this folder.
-
#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_team_drive_item ⇒ Boolean
(also: #can_move_team_drive_item?)
Whether the user can move this Team Drive item by changing its parent.
-
#can_read_revisions ⇒ Boolean
(also: #can_read_revisions?)
Whether the user has read access to the Revisions resource of the file.
-
#can_read_team_drive ⇒ Boolean
(also: #can_read_team_drive?)
Whether the user has read access to the Team Drive to which this file belongs.
-
#can_remove_children ⇒ Boolean
(also: #can_remove_children?)
Whether the user can remove children from this folder.
-
#can_rename ⇒ Boolean
(also: #can_rename?)
Whether the file can be renamed by the user.
-
#can_share ⇒ Boolean
(also: #can_share?)
Whether the user can modify the file's permissions and sharing settings.
-
#can_trash ⇒ Boolean
(also: #can_trash?)
Whether the file can be trashed by the user.
-
#can_untrash ⇒ Boolean
(also: #can_untrash?)
Whether the file can be restored from the trash by the current user.
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
963 964 965 |
# File 'generated/google/apis/drive_v3/classes.rb', line 963 def initialize(**args) update!(**args) end |
Instance Attribute Details
#can_add_children ⇒ Boolean Also known as: can_add_children?
Whether the user can add children to this folder. This is always false when
the item is not a folder.
Corresponds to the JSON property canAddChildren
860 861 862 |
# File 'generated/google/apis/drive_v3/classes.rb', line 860 def can_add_children @can_add_children end |
#can_comment ⇒ Boolean Also known as: can_comment?
Whether the user can comment on the file.
Corresponds to the JSON property canComment
866 867 868 |
# File 'generated/google/apis/drive_v3/classes.rb', line 866 def can_comment @can_comment end |
#can_copy ⇒ Boolean Also known as: can_copy?
Whether the user can copy the file. For a Team Drive item, whether non-folder
descendants of this item, or this item itself if it is not a folder, can be
copied.
Corresponds to the JSON property canCopy
874 875 876 |
# File 'generated/google/apis/drive_v3/classes.rb', line 874 def can_copy @can_copy end |
#can_delete ⇒ Boolean Also known as: can_delete?
Whether the file can be deleted by the user.
Corresponds to the JSON property canDelete
880 881 882 |
# File 'generated/google/apis/drive_v3/classes.rb', line 880 def can_delete @can_delete end |
#can_download ⇒ Boolean Also known as: can_download?
Whether the file can be downloaded by the user.
Corresponds to the JSON property canDownload
886 887 888 |
# File 'generated/google/apis/drive_v3/classes.rb', line 886 def can_download @can_download end |
#can_edit ⇒ Boolean Also known as: can_edit?
Whether the user can edit the file's content.
Corresponds to the JSON property canEdit
892 893 894 |
# File 'generated/google/apis/drive_v3/classes.rb', line 892 def can_edit @can_edit end |
#can_list_children ⇒ Boolean Also known as: can_list_children?
Whether the 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
899 900 901 |
# File 'generated/google/apis/drive_v3/classes.rb', line 899 def can_list_children @can_list_children 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
906 907 908 |
# File 'generated/google/apis/drive_v3/classes.rb', line 906 def can_move_item_into_team_drive @can_move_item_into_team_drive end |
#can_move_team_drive_item ⇒ Boolean Also known as: can_move_team_drive_item?
Whether the user can move this Team Drive item by changing its parent. Note
that a request to change the parent for this item may still fail depending on
the new parent that is being added. Only populated for Team Drive files.
Corresponds to the JSON property canMoveTeamDriveItem
914 915 916 |
# File 'generated/google/apis/drive_v3/classes.rb', line 914 def can_move_team_drive_item @can_move_team_drive_item end |
#can_read_revisions ⇒ Boolean Also known as: can_read_revisions?
Whether the user has read access to the Revisions resource of the 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
922 923 924 |
# File 'generated/google/apis/drive_v3/classes.rb', line 922 def can_read_revisions @can_read_revisions end |
#can_read_team_drive ⇒ Boolean Also known as: can_read_team_drive?
Whether the user has read access to the Team Drive to which this file belongs.
Only populated for Team Drive files.
Corresponds to the JSON property canReadTeamDrive
929 930 931 |
# File 'generated/google/apis/drive_v3/classes.rb', line 929 def can_read_team_drive @can_read_team_drive end |
#can_remove_children ⇒ Boolean Also known as: can_remove_children?
Whether the user can remove children from this folder. This is always false
when the item is not a folder.
Corresponds to the JSON property canRemoveChildren
936 937 938 |
# File 'generated/google/apis/drive_v3/classes.rb', line 936 def can_remove_children @can_remove_children end |
#can_rename ⇒ Boolean Also known as: can_rename?
Whether the file can be renamed by the user.
Corresponds to the JSON property canRename
942 943 944 |
# File 'generated/google/apis/drive_v3/classes.rb', line 942 def can_rename @can_rename end |
#can_share ⇒ Boolean Also known as:
Whether the user can modify the file's permissions and sharing settings.
Corresponds to the JSON property canShare
948 949 950 |
# File 'generated/google/apis/drive_v3/classes.rb', line 948 def can_share @can_share end |
#can_trash ⇒ Boolean Also known as: can_trash?
Whether the file can be trashed by the user.
Corresponds to the JSON property canTrash
954 955 956 |
# File 'generated/google/apis/drive_v3/classes.rb', line 954 def can_trash @can_trash end |
#can_untrash ⇒ Boolean Also known as: can_untrash?
Whether the file can be restored from the trash by the current user.
Corresponds to the JSON property canUntrash
960 961 962 |
# File 'generated/google/apis/drive_v3/classes.rb', line 960 def can_untrash @can_untrash end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 |
# File 'generated/google/apis/drive_v3/classes.rb', line 968 def update!(**args) @can_add_children = args[:can_add_children] if args.key?(:can_add_children) @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_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_item_into_team_drive = args[:can_move_item_into_team_drive] if args.key?(:can_move_item_into_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_untrash = args[:can_untrash] if args.key?(:can_untrash) end |