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.



289
290
291
# File 'lib/sf_cli/sf/sobject/schema.rb', line 289

def initialize(field)
  @field = field
end

Instance Method Details

#aggregatable?Boolean

Returns:

  • (Boolean)


293
294
295
# File 'lib/sf_cli/sf/sobject/schema.rb', line 293

def aggregatable?
  field["aggregatable"]
end

#ai_prediction_field?Boolean

Returns:

  • (Boolean)


297
298
299
# File 'lib/sf_cli/sf/sobject/schema.rb', line 297

def ai_prediction_field?
  field["aiPredictionField"]
end

#autoNumber?Boolean

Returns:

  • (Boolean)


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

def autoNumber?
  field["autoNumber"]
end

#byteLengthObject



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

def byteLength
  field["byteLength"]
end

#calculated?Boolean

Returns:

  • (Boolean)


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

def calculated?
  field["calculated"]
end

#calculated_formulaObject



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

def calculated_formula
  field["calculatedFormula"]
end

#cascade_delete?Boolean

Returns:

  • (Boolean)


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

def cascade_delete?
  field["cascadeDelete"]
end

#case_sensitiveObject



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

def case_sensitive
  field["caseSensitive"]
end

#compound_field_nameObject



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

def compound_field_name
  field["compoundFieldName"]
end

#controller_nameObject



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

def controller_name
  field["controllerName"]
end

#createable?Boolean

Returns:

  • (Boolean)


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

def createable?
  field["createable"]
end

#custom?Boolean

Returns:

  • (Boolean)


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

def custom?
  field["custom"]
end

#default_valueObject



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

def default_value
  field["defaultValue"]
end

#default_value_formulaObject



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

def default_value_formula
  field["defaultValueFormula"]
end

#defaulted_on_create?Boolean

Returns:

  • (Boolean)


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

def defaulted_on_create?
  field["defaultedOnCreate"]
end

#dependent_picklist?Boolean

Returns:

  • (Boolean)


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

def dependent_picklist?
  field["dependentPicklist"]
end

#deprecated_and_hidden?Boolean

Returns:

  • (Boolean)


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

def deprecated_and_hidden?
  field["deprecatedAndHidden"]
end

#digitsObject



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

def digits
  field["digits"]
end

#display_location_in_decimal?Boolean

Returns:

  • (Boolean)


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

def display_location_in_decimal?
  field["displayLocationInDecimal"]
end

#encrypted?Boolean

Returns:

  • (Boolean)


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

def encrypted?
  field["encrypted"]
end

#external_id?Boolean

Returns:

  • (Boolean)


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

def external_id?
  field["externalId"]
end

#extra_type_infoObject



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

def extra_type_info
  field["extraTypeInfo"]
end

#filterable?Boolean

Returns:

  • (Boolean)


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

def filterable?
  field["filterable"]
end

#filtered_lookup_infoObject



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

def filtered_lookup_info
  field["filteredLookupInfo"]
end

#formula_treat_null_number_as_zero?Boolean

Returns:

  • (Boolean)


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

def formula_treat_null_number_as_zero?
  field["formulaTreatNullNumberAsZero"]
end

#groupable?Boolean

Returns:

  • (Boolean)


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

def groupable?
  field["groupable"]
end

#high_scale_number?Boolean

Returns:

  • (Boolean)


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

def high_scale_number?
  field["highScaleNumber"]
end

#html_formatted?Boolean

Returns:

  • (Boolean)


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

def html_formatted?
  field["htmlFormatted"]
end

#id_lookup?Boolean

Returns:

  • (Boolean)


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

def id_lookup?
  field["idLookup"]
end

#inline_help_textObject



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

def inline_help_text
  field["inlineHelpText"]
end

#labelObject



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

def label
  field["label"]
end

#lengthObject



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

def length
  field["length"]
end

#maskObject



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

def mask
  field["mask"]
end

#mask_typeObject



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

def mask_type
  field["maskType"]
end

#nameObject



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

def name
  field["name"]
end

#name_field?Boolean

Returns:

  • (Boolean)


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

def name_field?
  field["nameField"]
end

#name_pointing?Boolean

Returns:

  • (Boolean)


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

def name_pointing?
  field["namePointing"]
end

#nillable?Boolean

Returns:

  • (Boolean)


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

def nillable?
  field["nillable"]
end

#permissionable?Boolean

Returns:

  • (Boolean)


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

def permissionable?
  field["permissionable"]
end

#picklist_valuesObject



451
452
453
454
455
456
457
458
459
460
461
# File 'lib/sf_cli/sf/sobject/schema.rb', line 451

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)


463
464
465
# File 'lib/sf_cli/sf/sobject/schema.rb', line 463

def polymorphic_foreign_key?
  field["polymorphicForeignKey"]
end

#precisionObject



467
468
469
# File 'lib/sf_cli/sf/sobject/schema.rb', line 467

def precision
  field["precision"]
end

#query_by_distance?Boolean

Returns:

  • (Boolean)


471
472
473
# File 'lib/sf_cli/sf/sobject/schema.rb', line 471

def query_by_distance?
  field["queryByDistance"]
end

#reference_target_fieldObject



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

def reference_target_field
  field["referenceTargetField"]
end

#reference_toObject



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

def reference_to
  field["referenceTo"]
end

#relationship_nameObject



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

def relationship_name
  field["relationshipName"]
end

#relationship_orderObject



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

def relationship_order
  field["relationshipOrder"]
end

#restricted_deleteObject



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

def restricted_delete
  field["restrictedDelete"]
end

#restricted_picklist?Boolean

Returns:

  • (Boolean)


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

def restricted_picklist?
  field["restrictedPicklist"]
end

#scaleObject



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

def scale
  field["scale"]
end

#search_prefilterable?Boolean

Returns:

  • (Boolean)


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

def search_prefilterable?
  field["searchPrefilterable"]
end

#soapTypeObject



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

def soapType
  field["soapType"]
end

#sortable?Boolean

Returns:

  • (Boolean)


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

def sortable?
  field["sortable"]
end

#to_hObject



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

def to_h
  field
end

#typeObject



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

def type
  field["type"]
end

#unique?Boolean

Returns:

  • (Boolean)


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

def unique?
  field["unique"]
end

#updateable?Boolean

Returns:

  • (Boolean)


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

def updateable?
  field["updateable"]
end

#write_Requires_Master_Read?Boolean

Returns:

  • (Boolean)


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

def write_Requires_Master_Read?
  field["writeRequiresMasterRead"]
end