Class: Google::Apis::DriveV2::File::Labels

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/drive_v2/classes.rb,
generated/google/apis/drive_v2/representations.rb,
generated/google/apis/drive_v2/representations.rb

Overview

A group of labels for the file.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Labels

Returns a new instance of Labels.



2783
2784
2785
# File 'generated/google/apis/drive_v2/classes.rb', line 2783

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

Instance Attribute Details

#hiddenBoolean Also known as: hidden?

Deprecated. Corresponds to the JSON property hidden

Returns:

  • (Boolean)


2746
2747
2748
# File 'generated/google/apis/drive_v2/classes.rb', line 2746

def hidden
  @hidden
end

#modifiedBoolean Also known as: modified?

Whether the file has been modified by this user. Corresponds to the JSON property modified

Returns:

  • (Boolean)


2752
2753
2754
# File 'generated/google/apis/drive_v2/classes.rb', line 2752

def modified
  @modified
end

#restrictedBoolean Also known as: restricted?

Deprecated - use copyRequiresWriterPermission instead. Corresponds to the JSON property restricted

Returns:

  • (Boolean)


2758
2759
2760
# File 'generated/google/apis/drive_v2/classes.rb', line 2758

def restricted
  @restricted
end

#starredBoolean Also known as: starred?

Whether this file is starred by the user. Corresponds to the JSON property starred

Returns:

  • (Boolean)


2764
2765
2766
# File 'generated/google/apis/drive_v2/classes.rb', line 2764

def starred
  @starred
end

#trashedBoolean Also known as: trashed?

Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file. Corresponds to the JSON property trashed

Returns:

  • (Boolean)


2774
2775
2776
# File 'generated/google/apis/drive_v2/classes.rb', line 2774

def trashed
  @trashed
end

#viewedBoolean Also known as: viewed?

Whether this file has been viewed by this user. Corresponds to the JSON property viewed

Returns:

  • (Boolean)


2780
2781
2782
# File 'generated/google/apis/drive_v2/classes.rb', line 2780

def viewed
  @viewed
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2788
2789
2790
2791
2792
2793
2794
2795
# File 'generated/google/apis/drive_v2/classes.rb', line 2788

def update!(**args)
  @hidden = args[:hidden] if args.key?(:hidden)
  @modified = args[:modified] if args.key?(:modified)
  @restricted = args[:restricted] if args.key?(:restricted)
  @starred = args[:starred] if args.key?(:starred)
  @trashed = args[:trashed] if args.key?(:trashed)
  @viewed = args[:viewed] if args.key?(:viewed)
end