Class: Google::Apis::DriveV2::Label

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

Overview

Representation of a label and label fields.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Label

Returns a new instance of Label.



3229
3230
3231
# File 'lib/google/apis/drive_v2/classes.rb', line 3229

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

Instance Attribute Details

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

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

Returns:



3212
3213
3214
# File 'lib/google/apis/drive_v2/classes.rb', line 3212

def fields
  @fields
end

#idString

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

Returns:

  • (String)


3217
3218
3219
# File 'lib/google/apis/drive_v2/classes.rb', line 3217

def id
  @id
end

#kindString

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

Returns:

  • (String)


3222
3223
3224
# File 'lib/google/apis/drive_v2/classes.rb', line 3222

def kind
  @kind
end

#revision_idString

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

Returns:

  • (String)


3227
3228
3229
# File 'lib/google/apis/drive_v2/classes.rb', line 3227

def revision_id
  @revision_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3234
3235
3236
3237
3238
3239
# File 'lib/google/apis/drive_v2/classes.rb', line 3234

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