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

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Labels

Returns a new instance of Labels.


1831
1832
1833
# File 'generated/google/apis/drive_v2/classes.rb', line 1831

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

Instance Attribute Details

#hiddenBoolean Also known as: hidden?

Deprecated. Corresponds to the JSON property hidden

Returns:

  • (Boolean)

1802
1803
1804
# File 'generated/google/apis/drive_v2/classes.rb', line 1802

def hidden
  @hidden
end

#restrictedBoolean Also known as: restricted?

Whether viewers and commenters are prevented from downloading, printing, and copying this file. Corresponds to the JSON property restricted

Returns:

  • (Boolean)

1809
1810
1811
# File 'generated/google/apis/drive_v2/classes.rb', line 1809

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)

1815
1816
1817
# File 'generated/google/apis/drive_v2/classes.rb', line 1815

def starred
  @starred
end

#trashedBoolean Also known as: trashed?

Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files. Corresponds to the JSON property trashed

Returns:

  • (Boolean)

1822
1823
1824
# File 'generated/google/apis/drive_v2/classes.rb', line 1822

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)

1828
1829
1830
# File 'generated/google/apis/drive_v2/classes.rb', line 1828

def viewed
  @viewed
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


1836
1837
1838
1839
1840
1841
1842
# File 'generated/google/apis/drive_v2/classes.rb', line 1836

def update!(**args)
  @hidden = args[:hidden] if args.key?(:hidden)
  @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