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 a label field.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LabelField

Returns a new instance of LabelField.



2317
2318
2319
# File 'lib/google/apis/drive_v3/classes.rb', line 2317

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


2274
2275
2276
# File 'lib/google/apis/drive_v3/classes.rb', line 2274

def date_string
  @date_string
end

#idString

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

Returns:

  • (String)


2279
2280
2281
# File 'lib/google/apis/drive_v3/classes.rb', line 2279

def id
  @id
end

#integerArray<Fixnum>

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

Returns:

  • (Array<Fixnum>)


2284
2285
2286
# File 'lib/google/apis/drive_v3/classes.rb', line 2284

def integer
  @integer
end

#kindString

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

Returns:

  • (String)


2289
2290
2291
# File 'lib/google/apis/drive_v3/classes.rb', line 2289

def kind
  @kind
end

#selectionArray<String>

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

Returns:

  • (Array<String>)


2294
2295
2296
# File 'lib/google/apis/drive_v3/classes.rb', line 2294

def selection
  @selection
end

#textArray<String>

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

Returns:

  • (Array<String>)


2299
2300
2301
# File 'lib/google/apis/drive_v3/classes.rb', line 2299

def text
  @text
end

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

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

Returns:



2304
2305
2306
# File 'lib/google/apis/drive_v3/classes.rb', line 2304

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)


2315
2316
2317
# File 'lib/google/apis/drive_v3/classes.rb', line 2315

def value_type
  @value_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
# File 'lib/google/apis/drive_v3/classes.rb', line 2322

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