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.



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

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)


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

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)


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

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)


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

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)


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

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)


806
807
808
# File 'generated/google/apis/drive_v3/classes.rb', line 806

def can_share
  @can_share
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



814
815
816
817
818
819
820
# File 'generated/google/apis/drive_v3/classes.rb', line 814

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