Class: Google::Apis::DriveV3::Label

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

Overview

Representation of a label and its fields.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Label

Returns a new instance of Label.



2235
2236
2237
# File 'lib/google/apis/drive_v3/classes.rb', line 2235

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

Instance Attribute Details

#fieldsHash<String,Google::Apis::DriveV3::LabelField>

A map of the label's fields keyed by the field ID. Corresponds to the JSON property fields

Returns:



2218
2219
2220
# File 'lib/google/apis/drive_v3/classes.rb', line 2218

def fields
  @fields
end

#idString

The ID of the label. Corresponds to the JSON property id

Returns:

  • (String)


2223
2224
2225
# File 'lib/google/apis/drive_v3/classes.rb', line 2223

def id
  @id
end

#kindString

This is always drive#label Corresponds to the JSON property kind

Returns:

  • (String)


2228
2229
2230
# File 'lib/google/apis/drive_v3/classes.rb', line 2228

def kind
  @kind
end

#revision_idString

The revision ID of the label. Corresponds to the JSON property revisionId

Returns:

  • (String)


2233
2234
2235
# File 'lib/google/apis/drive_v3/classes.rb', line 2233

def revision_id
  @revision_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2240
2241
2242
2243
2244
2245
# File 'lib/google/apis/drive_v3/classes.rb', line 2240

def update!(**args)
  @fields = args[:fields] if args.key?(:fields)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @revision_id = args[:revision_id] if args.key?(:revision_id)
end