Class: Google::Apis::DriveV3::LabelModification
- Inherits:
-
Object
- Object
- Google::Apis::DriveV3::LabelModification
- 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
-
#field_modifications ⇒ Array<Google::Apis::DriveV3::LabelFieldModification>
The list of modifications to this label's fields.
-
#kind ⇒ String
This is always drive#labelModification.
-
#label_id ⇒ String
The ID of the label to modify.
-
#remove_label ⇒ Boolean
(also: #remove_label?)
If true, the label will be removed from the file.
Instance Method Summary collapse
-
#initialize(**args) ⇒ LabelModification
constructor
A new instance of LabelModification.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ LabelModification
Returns a new instance of LabelModification.
2793 2794 2795 |
# File 'lib/google/apis/drive_v3/classes.rb', line 2793 def initialize(**args) update!(**args) end |
Instance Attribute Details
#field_modifications ⇒ Array<Google::Apis::DriveV3::LabelFieldModification>
The list of modifications to this label's fields.
Corresponds to the JSON property fieldModifications
2775 2776 2777 |
# File 'lib/google/apis/drive_v3/classes.rb', line 2775 def field_modifications @field_modifications end |
#kind ⇒ String
This is always drive#labelModification.
Corresponds to the JSON property kind
2780 2781 2782 |
# File 'lib/google/apis/drive_v3/classes.rb', line 2780 def kind @kind end |
#label_id ⇒ String
The ID of the label to modify.
Corresponds to the JSON property labelId
2785 2786 2787 |
# File 'lib/google/apis/drive_v3/classes.rb', line 2785 def label_id @label_id end |
#remove_label ⇒ Boolean Also known as: remove_label?
If true, the label will be removed from the file.
Corresponds to the JSON property removeLabel
2790 2791 2792 |
# File 'lib/google/apis/drive_v3/classes.rb', line 2790 def remove_label @remove_label end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2798 2799 2800 2801 2802 2803 |
# File 'lib/google/apis/drive_v3/classes.rb', line 2798 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 |