Class: Google::Apis::DriveV2::LabelField

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 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.



3288
3289
3290
# File 'lib/google/apis/drive_v2/classes.rb', line 3288

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>)


3249
3250
3251
# File 'lib/google/apis/drive_v2/classes.rb', line 3249

def date_string
  @date_string
end

#idString

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

Returns:

  • (String)


3254
3255
3256
# File 'lib/google/apis/drive_v2/classes.rb', line 3254

def id
  @id
end

#integerArray<Fixnum>

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

Returns:

  • (Array<Fixnum>)


3259
3260
3261
# File 'lib/google/apis/drive_v2/classes.rb', line 3259

def integer
  @integer
end

#kindString

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

Returns:

  • (String)


3264
3265
3266
# File 'lib/google/apis/drive_v2/classes.rb', line 3264

def kind
  @kind
end

#selectionArray<String>

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

Returns:

  • (Array<String>)


3269
3270
3271
# File 'lib/google/apis/drive_v2/classes.rb', line 3269

def selection
  @selection
end

#textArray<String>

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

Returns:

  • (Array<String>)


3274
3275
3276
# File 'lib/google/apis/drive_v2/classes.rb', line 3274

def text
  @text
end

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

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

Returns:



3279
3280
3281
# File 'lib/google/apis/drive_v2/classes.rb', line 3279

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)


3286
3287
3288
# File 'lib/google/apis/drive_v2/classes.rb', line 3286

def value_type
  @value_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
# File 'lib/google/apis/drive_v2/classes.rb', line 3293

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