Class: Google::Apis::DriveV3::LabelModification

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

A modification to a label on a file. A LabelModification can be used to apply a label to a file, update an existing label on a file, or remove a label from a file.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LabelModification

Returns a new instance of LabelModification.



3362
3363
3364
# File 'lib/google/apis/drive_v3/classes.rb', line 3362

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

Instance Attribute Details

#field_modificationsArray<Google::Apis::DriveV3::LabelFieldModification>

The list of modifications to this label's fields. Corresponds to the JSON property fieldModifications



3344
3345
3346
# File 'lib/google/apis/drive_v3/classes.rb', line 3344

def field_modifications
  @field_modifications
end

#kindString

This is always "drive#labelModification". Corresponds to the JSON property kind

Returns:

  • (String)


3349
3350
3351
# File 'lib/google/apis/drive_v3/classes.rb', line 3349

def kind
  @kind
end

#label_idString

The ID of the label to modify. Corresponds to the JSON property labelId

Returns:

  • (String)


3354
3355
3356
# File 'lib/google/apis/drive_v3/classes.rb', line 3354

def label_id
  @label_id
end

#remove_labelBoolean Also known as: remove_label?

If true, the label will be removed from the file. Corresponds to the JSON property removeLabel

Returns:

  • (Boolean)


3359
3360
3361
# File 'lib/google/apis/drive_v3/classes.rb', line 3359

def remove_label
  @remove_label
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3367
3368
3369
3370
3371
3372
# File 'lib/google/apis/drive_v3/classes.rb', line 3367

def update!(**args)
  @field_modifications = args[:field_modifications] if args.key?(:field_modifications)
  @kind = args[:kind] if args.key?(:kind)
  @label_id = args[:label_id] if args.key?(:label_id)
  @remove_label = args[:remove_label] if args.key?(:remove_label)
end