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



2199
2200
2201
# File 'generated/google/apis/drive_v2/classes.rb', line 2199

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

Instance Attribute Details

#hiddenBoolean Also known as: hidden?

Deprecated. Corresponds to the JSON property hidden

Returns:

  • (Boolean)


2165
2166
2167
# File 'generated/google/apis/drive_v2/classes.rb', line 2165

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)


2171
2172
2173
# File 'generated/google/apis/drive_v2/classes.rb', line 2171

def modified
  @modified
end

#restrictedBoolean Also known as: restricted?

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

Returns:

  • (Boolean)


2177
2178
2179
# File 'generated/google/apis/drive_v2/classes.rb', line 2177

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)


2183
2184
2185
# File 'generated/google/apis/drive_v2/classes.rb', line 2183

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)


2190
2191
2192
# File 'generated/google/apis/drive_v2/classes.rb', line 2190

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)


2196
2197
2198
# File 'generated/google/apis/drive_v2/classes.rb', line 2196

def viewed
  @viewed
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2204
2205
2206
2207
2208
2209
2210
2211
# File 'generated/google/apis/drive_v2/classes.rb', line 2204

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