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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Capabilities

Returns a new instance of Capabilities.



804
805
806
# File 'generated/google/apis/drive_v3/classes.rb', line 804

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

Instance Attribute Details

#can_commentBoolean Also known as: can_comment?

Whether the user can comment on the file. Corresponds to the JSON property canComment

Returns:

  • (Boolean)


777
778
779
# File 'generated/google/apis/drive_v3/classes.rb', line 777

def can_comment
  @can_comment
end

#can_copyBoolean Also known as: can_copy?

Whether the user can copy the file. Corresponds to the JSON property canCopy

Returns:

  • (Boolean)


783
784
785
# File 'generated/google/apis/drive_v3/classes.rb', line 783

def can_copy
  @can_copy
end

#can_editBoolean Also known as: can_edit?

Whether the user can edit the file's content. Corresponds to the JSON property canEdit

Returns:

  • (Boolean)


789
790
791
# File 'generated/google/apis/drive_v3/classes.rb', line 789

def can_edit
  @can_edit
end

#can_read_revisionsBoolean Also known as: can_read_revisions?

Whether the current user has read access to the Revisions resource of the file. Corresponds to the JSON property canReadRevisions

Returns:

  • (Boolean)


795
796
797
# File 'generated/google/apis/drive_v3/classes.rb', line 795

def can_read_revisions
  @can_read_revisions
end

#can_shareBoolean Also known as: can_share?

Whether the user can modify the file's permissions and sharing settings. Corresponds to the JSON property canShare

Returns:

  • (Boolean)


801
802
803
# File 'generated/google/apis/drive_v3/classes.rb', line 801

def can_share
  @can_share
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



809
810
811
812
813
814
815
# File 'generated/google/apis/drive_v3/classes.rb', line 809

def update!(**args)
  @can_comment = args[:can_comment] if args.key?(:can_comment)
  @can_copy = args[:can_copy] if args.key?(:can_copy)
  @can_edit = args[:can_edit] if args.key?(:can_edit)
  @can_read_revisions = args[:can_read_revisions] if args.key?(:can_read_revisions)
  @can_share = args[:can_share] if args.key?(:can_share)
end