Class: Google::Apis::DriveV3::Drive::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

Capabilities the current user has on this shared drive.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Capabilities

Returns a new instance of Capabilities.



903
904
905
# File 'lib/google/apis/drive_v3/classes.rb', line 903

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

Instance Attribute Details

#can_add_childrenBoolean Also known as: can_add_children?

Whether the current user can add children to folders in this shared drive. Corresponds to the JSON property canAddChildren

Returns:

  • (Boolean)


785
786
787
# File 'lib/google/apis/drive_v3/classes.rb', line 785

def can_add_children
  @can_add_children
end

#can_change_copy_requires_writer_permission_restrictionBoolean Also known as: can_change_copy_requires_writer_permission_restriction?

Whether the current user can change the copyRequiresWriterPermission restriction of this shared drive. Corresponds to the JSON property canChangeCopyRequiresWriterPermissionRestriction

Returns:

  • (Boolean)


792
793
794
# File 'lib/google/apis/drive_v3/classes.rb', line 792

def can_change_copy_requires_writer_permission_restriction
  @can_change_copy_requires_writer_permission_restriction
end

#can_change_domain_users_only_restrictionBoolean Also known as: can_change_domain_users_only_restriction?

Whether the current user can change the domainUsersOnly restriction of this shared drive. Corresponds to the JSON property canChangeDomainUsersOnlyRestriction

Returns:

  • (Boolean)


799
800
801
# File 'lib/google/apis/drive_v3/classes.rb', line 799

def can_change_domain_users_only_restriction
  @can_change_domain_users_only_restriction
end

#can_change_drive_backgroundBoolean Also known as: can_change_drive_background?

Whether the current user can change the background of this shared drive. Corresponds to the JSON property canChangeDriveBackground

Returns:

  • (Boolean)


805
806
807
# File 'lib/google/apis/drive_v3/classes.rb', line 805

def can_change_drive_background
  @can_change_drive_background
end

#can_change_drive_members_only_restrictionBoolean Also known as: can_change_drive_members_only_restriction?

Whether the current user can change the driveMembersOnly restriction of this shared drive. Corresponds to the JSON property canChangeDriveMembersOnlyRestriction

Returns:

  • (Boolean)


812
813
814
# File 'lib/google/apis/drive_v3/classes.rb', line 812

def can_change_drive_members_only_restriction
  @can_change_drive_members_only_restriction
end

#can_commentBoolean Also known as: can_comment?

Whether the current user can comment on files in this shared drive. Corresponds to the JSON property canComment

Returns:

  • (Boolean)


818
819
820
# File 'lib/google/apis/drive_v3/classes.rb', line 818

def can_comment
  @can_comment
end

#can_copyBoolean Also known as: can_copy?

Whether the current user can copy files in this shared drive. Corresponds to the JSON property canCopy

Returns:

  • (Boolean)


824
825
826
# File 'lib/google/apis/drive_v3/classes.rb', line 824

def can_copy
  @can_copy
end

#can_delete_childrenBoolean Also known as: can_delete_children?

Whether the current user can delete children from folders in this shared drive. Corresponds to the JSON property canDeleteChildren

Returns:

  • (Boolean)


830
831
832
# File 'lib/google/apis/drive_v3/classes.rb', line 830

def can_delete_children
  @can_delete_children
end

#can_delete_driveBoolean Also known as: can_delete_drive?

Whether the current user can delete this shared drive. Attempting to delete the shared drive may still fail if there are untrashed items inside the shared drive. Corresponds to the JSON property canDeleteDrive

Returns:

  • (Boolean)


838
839
840
# File 'lib/google/apis/drive_v3/classes.rb', line 838

def can_delete_drive
  @can_delete_drive
end

#can_downloadBoolean Also known as: can_download?

Whether the current user can download files in this shared drive. Corresponds to the JSON property canDownload

Returns:

  • (Boolean)


844
845
846
# File 'lib/google/apis/drive_v3/classes.rb', line 844

def can_download
  @can_download
end

#can_editBoolean Also known as: can_edit?

Whether the current user can edit files in this shared drive Corresponds to the JSON property canEdit

Returns:

  • (Boolean)


850
851
852
# File 'lib/google/apis/drive_v3/classes.rb', line 850

def can_edit
  @can_edit
end

#can_list_childrenBoolean Also known as: can_list_children?

Whether the current user can list the children of folders in this shared drive. Corresponds to the JSON property canListChildren

Returns:

  • (Boolean)


856
857
858
# File 'lib/google/apis/drive_v3/classes.rb', line 856

def can_list_children
  @can_list_children
end

#can_manage_membersBoolean Also known as: can_manage_members?

Whether the current user can add members to this shared drive or remove them or change their role. Corresponds to the JSON property canManageMembers

Returns:

  • (Boolean)


863
864
865
# File 'lib/google/apis/drive_v3/classes.rb', line 863

def can_manage_members
  @can_manage_members
end

#can_read_revisionsBoolean Also known as: can_read_revisions?

Whether the current user can read the revisions resource of files in this shared drive. Corresponds to the JSON property canReadRevisions

Returns:

  • (Boolean)


870
871
872
# File 'lib/google/apis/drive_v3/classes.rb', line 870

def can_read_revisions
  @can_read_revisions
end

#can_renameBoolean Also known as: can_rename?

Whether the current user can rename files or folders in this shared drive. Corresponds to the JSON property canRename

Returns:

  • (Boolean)


876
877
878
# File 'lib/google/apis/drive_v3/classes.rb', line 876

def can_rename
  @can_rename
end

#can_rename_driveBoolean Also known as: can_rename_drive?

Whether the current user can rename this shared drive. Corresponds to the JSON property canRenameDrive

Returns:

  • (Boolean)


882
883
884
# File 'lib/google/apis/drive_v3/classes.rb', line 882

def can_rename_drive
  @can_rename_drive
end

#can_reset_drive_restrictionsBoolean Also known as: can_reset_drive_restrictions?

Whether the current user can reset the shared drive restrictions to defaults. Corresponds to the JSON property canResetDriveRestrictions

Returns:

  • (Boolean)


888
889
890
# File 'lib/google/apis/drive_v3/classes.rb', line 888

def can_reset_drive_restrictions
  @can_reset_drive_restrictions
end

#can_shareBoolean Also known as: can_share?

Whether the current user can share files or folders in this shared drive. Corresponds to the JSON property canShare

Returns:

  • (Boolean)


894
895
896
# File 'lib/google/apis/drive_v3/classes.rb', line 894

def can_share
  @can_share
end

#can_trash_childrenBoolean Also known as: can_trash_children?

Whether the current user can trash children from folders in this shared drive. Corresponds to the JSON property canTrashChildren

Returns:

  • (Boolean)


900
901
902
# File 'lib/google/apis/drive_v3/classes.rb', line 900

def can_trash_children
  @can_trash_children
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
# File 'lib/google/apis/drive_v3/classes.rb', line 908

def update!(**args)
  @can_add_children = args[:can_add_children] if args.key?(:can_add_children)
  @can_change_copy_requires_writer_permission_restriction = args[:can_change_copy_requires_writer_permission_restriction] if args.key?(:can_change_copy_requires_writer_permission_restriction)
  @can_change_domain_users_only_restriction = args[:can_change_domain_users_only_restriction] if args.key?(:can_change_domain_users_only_restriction)
  @can_change_drive_background = args[:can_change_drive_background] if args.key?(:can_change_drive_background)
  @can_change_drive_members_only_restriction = args[:can_change_drive_members_only_restriction] if args.key?(:can_change_drive_members_only_restriction)
  @can_comment = args[:can_comment] if args.key?(:can_comment)
  @can_copy = args[:can_copy] if args.key?(:can_copy)
  @can_delete_children = args[:can_delete_children] if args.key?(:can_delete_children)
  @can_delete_drive = args[:can_delete_drive] if args.key?(:can_delete_drive)
  @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_manage_members = args[:can_manage_members] if args.key?(:can_manage_members)
  @can_read_revisions = args[:can_read_revisions] if args.key?(:can_read_revisions)
  @can_rename = args[:can_rename] if args.key?(:can_rename)
  @can_rename_drive = args[:can_rename_drive] if args.key?(:can_rename_drive)
  @can_reset_drive_restrictions = args[:can_reset_drive_restrictions] if args.key?(:can_reset_drive_restrictions)
  @can_share = args[:can_share] if args.key?(:can_share)
  @can_trash_children = args[:can_trash_children] if args.key?(:can_trash_children)
end