Class: Google::Apis::DriveV3::LabelField

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 field, which is a typed key-value pair.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LabelField

Returns a new instance of LabelField.



2646
2647
2648
# File 'lib/google/apis/drive_v3/classes.rb', line 2646

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

Instance Attribute Details

#date_stringArray<Date>

Only present if valueType is dateString. RFC 3339 formatted date: YYYY-MM-DD. Corresponds to the JSON property dateString

Returns:

  • (Array<Date>)


2607
2608
2609
# File 'lib/google/apis/drive_v3/classes.rb', line 2607

def date_string
  @date_string
end

#idString

The identifier of this label field. Corresponds to the JSON property id

Returns:

  • (String)


2612
2613
2614
# File 'lib/google/apis/drive_v3/classes.rb', line 2612

def id
  @id
end

#integerArray<Fixnum>

Only present if valueType is integer. Corresponds to the JSON property integer

Returns:

  • (Array<Fixnum>)


2617
2618
2619
# File 'lib/google/apis/drive_v3/classes.rb', line 2617

def integer
  @integer
end

#kindString

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

Returns:

  • (String)


2622
2623
2624
# File 'lib/google/apis/drive_v3/classes.rb', line 2622

def kind
  @kind
end

#selectionArray<String>

Only present if valueType is selection Corresponds to the JSON property selection

Returns:

  • (Array<String>)


2627
2628
2629
# File 'lib/google/apis/drive_v3/classes.rb', line 2627

def selection
  @selection
end

#textArray<String>

Only present if valueType is text. Corresponds to the JSON property text

Returns:

  • (Array<String>)


2632
2633
2634
# File 'lib/google/apis/drive_v3/classes.rb', line 2632

def text
  @text
end

#userArray<Google::Apis::DriveV3::User>

Only present if valueType is user. Corresponds to the JSON property user

Returns:



2637
2638
2639
# File 'lib/google/apis/drive_v3/classes.rb', line 2637

def user
  @user
end

#value_typeString

The field type. While new values may be supported in the future, the following are currently allowed: * dateString * integer * selection * text * user Corresponds to the JSON property valueType

Returns:

  • (String)


2644
2645
2646
# File 'lib/google/apis/drive_v3/classes.rb', line 2644

def value_type
  @value_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
# File 'lib/google/apis/drive_v3/classes.rb', line 2651

def update!(**args)
  @date_string = args[:date_string] if args.key?(:date_string)
  @id = args[:id] if args.key?(:id)
  @integer = args[:integer] if args.key?(:integer)
  @kind = args[:kind] if args.key?(:kind)
  @selection = args[:selection] if args.key?(:selection)
  @text = args[:text] if args.key?(:text)
  @user = args[:user] if args.key?(:user)
  @value_type = args[:value_type] if args.key?(:value_type)
end