Class: SfCli::Sf::Sobject::Schema::Field

Inherits:
Object
  • Object
show all
Defined in:
lib/sf_cli/sf/sobject/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.



302
303
304
# File 'lib/sf_cli/sf/sobject/schema.rb', line 302

def initialize(field)
  @field = field
end

Instance Method Details

#aggregatable?Boolean

Returns:

  • (Boolean)


306
307
308
# File 'lib/sf_cli/sf/sobject/schema.rb', line 306

def aggregatable?
  field["aggregatable"]
end

#ai_prediction_field?Boolean

Returns:

  • (Boolean)


310
311
312
# File 'lib/sf_cli/sf/sobject/schema.rb', line 310

def ai_prediction_field?
  field["aiPredictionField"]
end

#autoNumber?Boolean

Returns:

  • (Boolean)


314
315
316
# File 'lib/sf_cli/sf/sobject/schema.rb', line 314

def autoNumber?
  field["autoNumber"]
end

#byteLengthObject



318
319
320
# File 'lib/sf_cli/sf/sobject/schema.rb', line 318

def byteLength
  field["byteLength"]
end

#calculated?Boolean

Returns:

  • (Boolean)


322
323
324
# File 'lib/sf_cli/sf/sobject/schema.rb', line 322

def calculated?
  field["calculated"]
end

#calculated_formulaObject



326
327
328
# File 'lib/sf_cli/sf/sobject/schema.rb', line 326

def calculated_formula
  field["calculatedFormula"]
end

#cascade_delete?Boolean

Returns:

  • (Boolean)


330
331
332
# File 'lib/sf_cli/sf/sobject/schema.rb', line 330

def cascade_delete?
  field["cascadeDelete"]
end

#case_sensitiveObject



334
335
336
# File 'lib/sf_cli/sf/sobject/schema.rb', line 334

def case_sensitive
  field["caseSensitive"]
end

#compound_field_nameObject



338
339
340
# File 'lib/sf_cli/sf/sobject/schema.rb', line 338

def compound_field_name
  field["compoundFieldName"]
end

#controller_nameObject



342
343
344
# File 'lib/sf_cli/sf/sobject/schema.rb', line 342

def controller_name
  field["controllerName"]
end

#createable?Boolean

Returns:

  • (Boolean)


346
347
348
# File 'lib/sf_cli/sf/sobject/schema.rb', line 346

def createable?
  field["createable"]
end

#custom?Boolean

Returns:

  • (Boolean)


350
351
352
# File 'lib/sf_cli/sf/sobject/schema.rb', line 350

def custom?
  field["custom"]
end

#default_valueObject



354
355
356
# File 'lib/sf_cli/sf/sobject/schema.rb', line 354

def default_value
  field["defaultValue"]
end

#default_value_formulaObject



358
359
360
# File 'lib/sf_cli/sf/sobject/schema.rb', line 358

def default_value_formula
  field["defaultValueFormula"]
end

#defaulted_on_create?Boolean

Returns:

  • (Boolean)


362
363
364
# File 'lib/sf_cli/sf/sobject/schema.rb', line 362

def defaulted_on_create?
  field["defaultedOnCreate"]
end

#dependent_picklist?Boolean

Returns:

  • (Boolean)


366
367
368
# File 'lib/sf_cli/sf/sobject/schema.rb', line 366

def dependent_picklist?
  field["dependentPicklist"]
end

#deprecated_and_hidden?Boolean

Returns:

  • (Boolean)


370
371
372
# File 'lib/sf_cli/sf/sobject/schema.rb', line 370

def deprecated_and_hidden?
  field["deprecatedAndHidden"]
end

#digitsObject



374
375
376
# File 'lib/sf_cli/sf/sobject/schema.rb', line 374

def digits
  field["digits"]
end

#display_location_in_decimal?Boolean

Returns:

  • (Boolean)


378
379
380
# File 'lib/sf_cli/sf/sobject/schema.rb', line 378

def display_location_in_decimal?
  field["displayLocationInDecimal"]
end

#encrypted?Boolean

Returns:

  • (Boolean)


382
383
384
# File 'lib/sf_cli/sf/sobject/schema.rb', line 382

def encrypted?
  field["encrypted"]
end

#external_id?Boolean

Returns:

  • (Boolean)


386
387
388
# File 'lib/sf_cli/sf/sobject/schema.rb', line 386

def external_id?
  field["externalId"]
end

#extra_type_infoObject



390
391
392
# File 'lib/sf_cli/sf/sobject/schema.rb', line 390

def extra_type_info
  field["extraTypeInfo"]
end

#filterable?Boolean

Returns:

  • (Boolean)


394
395
396
# File 'lib/sf_cli/sf/sobject/schema.rb', line 394

def filterable?
  field["filterable"]
end

#filtered_lookup_infoObject



398
399
400
# File 'lib/sf_cli/sf/sobject/schema.rb', line 398

def filtered_lookup_info
  field["filteredLookupInfo"]
end

#formula_treat_null_number_as_zero?Boolean

Returns:

  • (Boolean)


402
403
404
# File 'lib/sf_cli/sf/sobject/schema.rb', line 402

def formula_treat_null_number_as_zero?
  field["formulaTreatNullNumberAsZero"]
end

#groupable?Boolean

Returns:

  • (Boolean)


406
407
408
# File 'lib/sf_cli/sf/sobject/schema.rb', line 406

def groupable?
  field["groupable"]
end

#high_scale_number?Boolean

Returns:

  • (Boolean)


410
411
412
# File 'lib/sf_cli/sf/sobject/schema.rb', line 410

def high_scale_number?
  field["highScaleNumber"]
end

#html_formatted?Boolean

Returns:

  • (Boolean)


414
415
416
# File 'lib/sf_cli/sf/sobject/schema.rb', line 414

def html_formatted?
  field["htmlFormatted"]
end

#id_lookup?Boolean

Returns:

  • (Boolean)


418
419
420
# File 'lib/sf_cli/sf/sobject/schema.rb', line 418

def id_lookup?
  field["idLookup"]
end

#inline_help_textObject



422
423
424
# File 'lib/sf_cli/sf/sobject/schema.rb', line 422

def inline_help_text
  field["inlineHelpText"]
end

#labelObject



426
427
428
# File 'lib/sf_cli/sf/sobject/schema.rb', line 426

def label
  field["label"]
end

#lengthObject



430
431
432
# File 'lib/sf_cli/sf/sobject/schema.rb', line 430

def length
  field["length"]
end

#maskObject



434
435
436
# File 'lib/sf_cli/sf/sobject/schema.rb', line 434

def mask
  field["mask"]
end

#mask_typeObject



438
439
440
# File 'lib/sf_cli/sf/sobject/schema.rb', line 438

def mask_type
  field["maskType"]
end

#nameObject



442
443
444
# File 'lib/sf_cli/sf/sobject/schema.rb', line 442

def name
  field["name"]
end

#name_field?Boolean

Returns:

  • (Boolean)


446
447
448
# File 'lib/sf_cli/sf/sobject/schema.rb', line 446

def name_field?
  field["nameField"]
end

#name_pointing?Boolean

Returns:

  • (Boolean)


450
451
452
# File 'lib/sf_cli/sf/sobject/schema.rb', line 450

def name_pointing?
  field["namePointing"]
end

#nillable?Boolean

Returns:

  • (Boolean)


454
455
456
# File 'lib/sf_cli/sf/sobject/schema.rb', line 454

def nillable?
  field["nillable"]
end

#permissionable?Boolean

Returns:

  • (Boolean)


458
459
460
# File 'lib/sf_cli/sf/sobject/schema.rb', line 458

def permissionable?
  field["permissionable"]
end

#picklist_valuesObject



464
465
466
467
468
469
470
471
472
473
474
# File 'lib/sf_cli/sf/sobject/schema.rb', line 464

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)


476
477
478
# File 'lib/sf_cli/sf/sobject/schema.rb', line 476

def polymorphic_foreign_key?
  field["polymorphicForeignKey"]
end

#precisionObject



480
481
482
# File 'lib/sf_cli/sf/sobject/schema.rb', line 480

def precision
  field["precision"]
end

#query_by_distance?Boolean

Returns:

  • (Boolean)


484
485
486
# File 'lib/sf_cli/sf/sobject/schema.rb', line 484

def query_by_distance?
  field["queryByDistance"]
end

#reference_target_fieldObject



488
489
490
# File 'lib/sf_cli/sf/sobject/schema.rb', line 488

def reference_target_field
  field["referenceTargetField"]
end

#reference_toObject



492
493
494
# File 'lib/sf_cli/sf/sobject/schema.rb', line 492

def reference_to
  field["referenceTo"]
end

#relationship_nameObject



496
497
498
# File 'lib/sf_cli/sf/sobject/schema.rb', line 496

def relationship_name
  field["relationshipName"]
end

#relationship_orderObject



500
501
502
# File 'lib/sf_cli/sf/sobject/schema.rb', line 500

def relationship_order
  field["relationshipOrder"]
end

#restricted_deleteObject



504
505
506
# File 'lib/sf_cli/sf/sobject/schema.rb', line 504

def restricted_delete
  field["restrictedDelete"]
end

#restricted_picklist?Boolean

Returns:

  • (Boolean)


508
509
510
# File 'lib/sf_cli/sf/sobject/schema.rb', line 508

def restricted_picklist?
  field["restrictedPicklist"]
end

#scaleObject



512
513
514
# File 'lib/sf_cli/sf/sobject/schema.rb', line 512

def scale
  field["scale"]
end

#search_prefilterable?Boolean

Returns:

  • (Boolean)


516
517
518
# File 'lib/sf_cli/sf/sobject/schema.rb', line 516

def search_prefilterable?
  field["searchPrefilterable"]
end

#soapTypeObject



520
521
522
# File 'lib/sf_cli/sf/sobject/schema.rb', line 520

def soapType
  field["soapType"]
end

#sortable?Boolean

Returns:

  • (Boolean)


524
525
526
# File 'lib/sf_cli/sf/sobject/schema.rb', line 524

def sortable?
  field["sortable"]
end

#to_hObject



544
545
546
# File 'lib/sf_cli/sf/sobject/schema.rb', line 544

def to_h
  field
end

#typeObject



528
529
530
# File 'lib/sf_cli/sf/sobject/schema.rb', line 528

def type
  field["type"]
end

#unique?Boolean

Returns:

  • (Boolean)


532
533
534
# File 'lib/sf_cli/sf/sobject/schema.rb', line 532

def unique?
  field["unique"]
end

#updateable?Boolean

Returns:

  • (Boolean)


536
537
538
# File 'lib/sf_cli/sf/sobject/schema.rb', line 536

def updateable?
  field["updateable"]
end

#write_Requires_Master_Read?Boolean

Returns:

  • (Boolean)


540
541
542
# File 'lib/sf_cli/sf/sobject/schema.rb', line 540

def write_Requires_Master_Read?
  field["writeRequiresMasterRead"]
end