Class: Yamori::Schema::Field

Inherits:
Object
  • Object
show all
Defined in:
lib/yamori/schema.rb

Constant Summary collapse

PicklistValue =
Data.define(:active, :default_value, :label, :valid_for, :value)

Instance Method Summary collapse

Constructor Details

#initialize(field) ⇒ Field

Returns a new instance of Field.



299
300
301
# File 'lib/yamori/schema.rb', line 299

def initialize(field)
  @field = field
end

Instance Method Details

#aggregatable?Boolean

Returns:

  • (Boolean)


303
304
305
# File 'lib/yamori/schema.rb', line 303

def aggregatable?
  field["aggregatable"]
end

#ai_prediction_field?Boolean

Returns:

  • (Boolean)


307
308
309
# File 'lib/yamori/schema.rb', line 307

def ai_prediction_field?
  field["aiPredictionField"]
end

#autoNumber?Boolean

Returns:

  • (Boolean)


311
312
313
# File 'lib/yamori/schema.rb', line 311

def autoNumber?
  field["autoNumber"]
end

#byteLengthObject



315
316
317
# File 'lib/yamori/schema.rb', line 315

def byteLength
  field["byteLength"]
end

#calculated?Boolean

Returns:

  • (Boolean)


319
320
321
# File 'lib/yamori/schema.rb', line 319

def calculated?
  field["calculated"]
end

#calculated_formulaObject



323
324
325
# File 'lib/yamori/schema.rb', line 323

def calculated_formula
  field["calculatedFormula"]
end

#cascade_delete?Boolean

Returns:

  • (Boolean)


327
328
329
# File 'lib/yamori/schema.rb', line 327

def cascade_delete?
  field["cascadeDelete"]
end

#case_sensitiveObject



331
332
333
# File 'lib/yamori/schema.rb', line 331

def case_sensitive
  field["caseSensitive"]
end

#compound_field_nameObject



335
336
337
# File 'lib/yamori/schema.rb', line 335

def compound_field_name
  field["compoundFieldName"]
end

#controller_nameObject



339
340
341
# File 'lib/yamori/schema.rb', line 339

def controller_name
  field["controllerName"]
end

#createable?Boolean

Returns:

  • (Boolean)


343
344
345
# File 'lib/yamori/schema.rb', line 343

def createable?
  field["createable"]
end

#custom?Boolean

Returns:

  • (Boolean)


347
348
349
# File 'lib/yamori/schema.rb', line 347

def custom?
  field["custom"]
end

#default_valueObject



351
352
353
# File 'lib/yamori/schema.rb', line 351

def default_value
  field["defaultValue"]
end

#default_value_formulaObject



355
356
357
# File 'lib/yamori/schema.rb', line 355

def default_value_formula
  field["defaultValueFormula"]
end

#defaulted_on_create?Boolean

Returns:

  • (Boolean)


359
360
361
# File 'lib/yamori/schema.rb', line 359

def defaulted_on_create?
  field["defaultedOnCreate"]
end

#dependent_picklist?Boolean

Returns:

  • (Boolean)


363
364
365
# File 'lib/yamori/schema.rb', line 363

def dependent_picklist?
  field["dependentPicklist"]
end

#deprecated_and_hidden?Boolean

Returns:

  • (Boolean)


367
368
369
# File 'lib/yamori/schema.rb', line 367

def deprecated_and_hidden?
  field["deprecatedAndHidden"]
end

#digitsObject



371
372
373
# File 'lib/yamori/schema.rb', line 371

def digits
  field["digits"]
end

#display_location_in_decimal?Boolean

Returns:

  • (Boolean)


375
376
377
# File 'lib/yamori/schema.rb', line 375

def display_location_in_decimal?
  field["displayLocationInDecimal"]
end

#encrypted?Boolean

Returns:

  • (Boolean)


379
380
381
# File 'lib/yamori/schema.rb', line 379

def encrypted?
  field["encrypted"]
end

#external_id?Boolean

Returns:

  • (Boolean)


383
384
385
# File 'lib/yamori/schema.rb', line 383

def external_id?
  field["externalId"]
end

#extra_type_infoObject



387
388
389
# File 'lib/yamori/schema.rb', line 387

def extra_type_info
  field["extraTypeInfo"]
end

#filterable?Boolean

Returns:

  • (Boolean)


391
392
393
# File 'lib/yamori/schema.rb', line 391

def filterable?
  field["filterable"]
end

#filtered_lookup_infoObject



395
396
397
# File 'lib/yamori/schema.rb', line 395

def filtered_lookup_info
  field["filteredLookupInfo"]
end

#formula_treat_null_number_as_zero?Boolean

Returns:

  • (Boolean)


399
400
401
# File 'lib/yamori/schema.rb', line 399

def formula_treat_null_number_as_zero?
  field["formulaTreatNullNumberAsZero"]
end

#groupable?Boolean

Returns:

  • (Boolean)


403
404
405
# File 'lib/yamori/schema.rb', line 403

def groupable?
  field["groupable"]
end

#high_scale_number?Boolean

Returns:

  • (Boolean)


407
408
409
# File 'lib/yamori/schema.rb', line 407

def high_scale_number?
  field["highScaleNumber"]
end

#html_formatted?Boolean

Returns:

  • (Boolean)


411
412
413
# File 'lib/yamori/schema.rb', line 411

def html_formatted?
  field["htmlFormatted"]
end

#id_lookup?Boolean

Returns:

  • (Boolean)


415
416
417
# File 'lib/yamori/schema.rb', line 415

def id_lookup?
  field["idLookup"]
end

#inline_help_textObject



419
420
421
# File 'lib/yamori/schema.rb', line 419

def inline_help_text
  field["inlineHelpText"]
end

#labelObject



423
424
425
# File 'lib/yamori/schema.rb', line 423

def label
  field["label"]
end

#lengthObject



427
428
429
# File 'lib/yamori/schema.rb', line 427

def length
  field["length"]
end

#maskObject



431
432
433
# File 'lib/yamori/schema.rb', line 431

def mask
  field["mask"]
end

#mask_typeObject



435
436
437
# File 'lib/yamori/schema.rb', line 435

def mask_type
  field["maskType"]
end

#nameObject



439
440
441
# File 'lib/yamori/schema.rb', line 439

def name
  field["name"]
end

#name_field?Boolean

Returns:

  • (Boolean)


443
444
445
# File 'lib/yamori/schema.rb', line 443

def name_field?
  field["nameField"]
end

#name_pointing?Boolean

Returns:

  • (Boolean)


447
448
449
# File 'lib/yamori/schema.rb', line 447

def name_pointing?
  field["namePointing"]
end

#nillable?Boolean

Returns:

  • (Boolean)


451
452
453
# File 'lib/yamori/schema.rb', line 451

def nillable?
  field["nillable"]
end

#permissionable?Boolean

Returns:

  • (Boolean)


455
456
457
# File 'lib/yamori/schema.rb', line 455

def permissionable?
  field["permissionable"]
end

#picklist_valuesObject



461
462
463
464
465
466
467
468
469
470
471
# File 'lib/yamori/schema.rb', line 461

def picklist_values
  field["picklistValues"].map do |value|
    PicklistValue.new(
      active:        value['active'],
      default_value: value['defaultValue'],
      label:         value['label'],
      valid_for:     value['validFor'],
      value:         value['value'],
    )
  end
end

#polymorphic_foreign_key?Boolean

Returns:

  • (Boolean)


473
474
475
# File 'lib/yamori/schema.rb', line 473

def polymorphic_foreign_key?
  field["polymorphicForeignKey"]
end

#precisionObject



477
478
479
# File 'lib/yamori/schema.rb', line 477

def precision
  field["precision"]
end

#query_by_distance?Boolean

Returns:

  • (Boolean)


481
482
483
# File 'lib/yamori/schema.rb', line 481

def query_by_distance?
  field["queryByDistance"]
end

#reference_target_fieldObject



485
486
487
# File 'lib/yamori/schema.rb', line 485

def reference_target_field
  field["referenceTargetField"]
end

#reference_toObject



489
490
491
# File 'lib/yamori/schema.rb', line 489

def reference_to
  field["referenceTo"]
end

#relationship_nameObject



493
494
495
# File 'lib/yamori/schema.rb', line 493

def relationship_name
  field["relationshipName"]
end

#relationship_orderObject



497
498
499
# File 'lib/yamori/schema.rb', line 497

def relationship_order
  field["relationshipOrder"]
end

#restricted_deleteObject



501
502
503
# File 'lib/yamori/schema.rb', line 501

def restricted_delete
  field["restrictedDelete"]
end

#restricted_picklist?Boolean

Returns:

  • (Boolean)


505
506
507
# File 'lib/yamori/schema.rb', line 505

def restricted_picklist?
  field["restrictedPicklist"]
end

#scaleObject



509
510
511
# File 'lib/yamori/schema.rb', line 509

def scale
  field["scale"]
end

#search_prefilterable?Boolean

Returns:

  • (Boolean)


513
514
515
# File 'lib/yamori/schema.rb', line 513

def search_prefilterable?
  field["searchPrefilterable"]
end

#soapTypeObject



517
518
519
# File 'lib/yamori/schema.rb', line 517

def soapType
  field["soapType"]
end

#sortable?Boolean

Returns:

  • (Boolean)


521
522
523
# File 'lib/yamori/schema.rb', line 521

def sortable?
  field["sortable"]
end

#to_hObject



541
542
543
# File 'lib/yamori/schema.rb', line 541

def to_h
  field
end

#typeObject



525
526
527
# File 'lib/yamori/schema.rb', line 525

def type
  field["type"]
end

#unique?Boolean

Returns:

  • (Boolean)


529
530
531
# File 'lib/yamori/schema.rb', line 529

def unique?
  field["unique"]
end

#updateable?Boolean

Returns:

  • (Boolean)


533
534
535
# File 'lib/yamori/schema.rb', line 533

def updateable?
  field["updateable"]
end

#write_Requires_Master_Read?Boolean

Returns:

  • (Boolean)


537
538
539
# File 'lib/yamori/schema.rb', line 537

def write_Requires_Master_Read?
  field["writeRequiresMasterRead"]
end