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.



254
255
256
# File 'lib/sf_cli/sf/sobject/schema.rb', line 254

def initialize(field)
  @field = field
end

Instance Method Details

#aggregatable?Boolean

Returns:

  • (Boolean)


258
259
260
# File 'lib/sf_cli/sf/sobject/schema.rb', line 258

def aggregatable?
  field["aggregatable"]
end

#ai_prediction_field?Boolean

Returns:

  • (Boolean)


262
263
264
# File 'lib/sf_cli/sf/sobject/schema.rb', line 262

def ai_prediction_field?
  field["aiPredictionField"]
end

#autoNumber?Boolean

Returns:

  • (Boolean)


266
267
268
# File 'lib/sf_cli/sf/sobject/schema.rb', line 266

def autoNumber?
  field["autoNumber"]
end

#byteLengthObject



270
271
272
# File 'lib/sf_cli/sf/sobject/schema.rb', line 270

def byteLength
  field["byteLength"]
end

#calculated?Boolean

Returns:

  • (Boolean)


274
275
276
# File 'lib/sf_cli/sf/sobject/schema.rb', line 274

def calculated?
  field["calculated"]
end

#calculated_formulaObject



278
279
280
# File 'lib/sf_cli/sf/sobject/schema.rb', line 278

def calculated_formula
  field["calculatedFormula"]
end

#cascade_delete?Boolean

Returns:

  • (Boolean)


282
283
284
# File 'lib/sf_cli/sf/sobject/schema.rb', line 282

def cascade_delete?
  field["cascadeDelete"]
end

#case_sensitiveObject



286
287
288
# File 'lib/sf_cli/sf/sobject/schema.rb', line 286

def case_sensitive
  field["caseSensitive"]
end

#compound_field_nameObject



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

def compound_field_name
  field["compoundFieldName"]
end

#controller_nameObject



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

def controller_name
  field["controllerName"]
end

#createable?Boolean

Returns:

  • (Boolean)


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

def createable?
  field["createable"]
end

#custom?Boolean

Returns:

  • (Boolean)


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

def custom?
  field["custom"]
end

#default_valueObject



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

def default_value
  field["defaultValue"]
end

#default_value_formulaObject



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

def default_value_formula
  field["defaultValueFormula"]
end

#defaulted_on_create?Boolean

Returns:

  • (Boolean)


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

def defaulted_on_create?
  field["defaultedOnCreate"]
end

#dependent_picklist?Boolean

Returns:

  • (Boolean)


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

def dependent_picklist?
  field["dependentPicklist"]
end

#deprecated_and_hidden?Boolean

Returns:

  • (Boolean)


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

def deprecated_and_hidden?
  field["deprecatedAndHidden"]
end

#digitsObject



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

def digits
  field["digits"]
end

#display_location_in_decimal?Boolean

Returns:

  • (Boolean)


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

def display_location_in_decimal?
  field["displayLocationInDecimal"]
end

#encrypted?Boolean

Returns:

  • (Boolean)


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

def encrypted?
  field["encrypted"]
end

#external_id?Boolean

Returns:

  • (Boolean)


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

def external_id?
  field["externalId"]
end

#extra_type_infoObject



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

def extra_type_info
  field["extraTypeInfo"]
end

#filterable?Boolean

Returns:

  • (Boolean)


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

def filterable?
  field["filterable"]
end

#filtered_lookup_infoObject



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

def filtered_lookup_info
  field["filteredLookupInfo"]
end

#formula_treat_null_number_as_zero?Boolean

Returns:

  • (Boolean)


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

def formula_treat_null_number_as_zero?
  field["formulaTreatNullNumberAsZero"]
end

#groupable?Boolean

Returns:

  • (Boolean)


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

def groupable?
  field["groupable"]
end

#high_scale_number?Boolean

Returns:

  • (Boolean)


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

def high_scale_number?
  field["highScaleNumber"]
end

#html_formatted?Boolean

Returns:

  • (Boolean)


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

def html_formatted?
  field["htmlFormatted"]
end

#id_lookup?Boolean

Returns:

  • (Boolean)


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

def id_lookup?
  field["idLookup"]
end

#inline_help_textObject



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

def inline_help_text
  field["inlineHelpText"]
end

#labelObject



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

def label
  field["label"]
end

#lengthObject



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

def length
  field["length"]
end

#maskObject



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

def mask
  field["mask"]
end

#mask_typeObject



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

def mask_type
  field["maskType"]
end

#nameObject



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

def name
  field["name"]
end

#name_field?Boolean

Returns:

  • (Boolean)


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

def name_field?
  field["nameField"]
end

#name_pointing?Boolean

Returns:

  • (Boolean)


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

def name_pointing?
  field["namePointing"]
end

#nillable?Boolean

Returns:

  • (Boolean)


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

def nillable?
  field["nillable"]
end

#permissionable?Boolean

Returns:

  • (Boolean)


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

def permissionable?
  field["permissionable"]
end

#picklist_valuesObject



416
417
418
419
420
421
422
423
424
425
426
# File 'lib/sf_cli/sf/sobject/schema.rb', line 416

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)


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

def polymorphic_foreign_key?
  field["polymorphicForeignKey"]
end

#precisionObject



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

def precision
  field["precision"]
end

#query_by_distance?Boolean

Returns:

  • (Boolean)


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

def query_by_distance?
  field["queryByDistance"]
end

#reference_target_fieldObject



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

def reference_target_field
  field["referenceTargetField"]
end

#reference_toObject



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

def reference_to
  field["referenceTo"]
end

#relationship_nameObject



448
449
450
# File 'lib/sf_cli/sf/sobject/schema.rb', line 448

def relationship_name
  field["relationshipName"]
end

#relationship_orderObject



452
453
454
# File 'lib/sf_cli/sf/sobject/schema.rb', line 452

def relationship_order
  field["relationshipOrder"]
end

#restricted_deleteObject



456
457
458
# File 'lib/sf_cli/sf/sobject/schema.rb', line 456

def restricted_delete
  field["restrictedDelete"]
end

#restricted_picklist?Boolean

Returns:

  • (Boolean)


460
461
462
# File 'lib/sf_cli/sf/sobject/schema.rb', line 460

def restricted_picklist?
  field["restrictedPicklist"]
end

#scaleObject



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

def scale
  field["scale"]
end

#search_prefilterable?Boolean

Returns:

  • (Boolean)


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

def search_prefilterable?
  field["searchPrefilterable"]
end

#soapTypeObject



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

def soapType
  field["soapType"]
end

#sortable?Boolean

Returns:

  • (Boolean)


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

def sortable?
  field["sortable"]
end

#to_hObject



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

def to_h
  field
end

#typeObject



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

def type
  field["type"]
end

#unique?Boolean

Returns:

  • (Boolean)


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

def unique?
  field["unique"]
end

#updateable?Boolean

Returns:

  • (Boolean)


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

def updateable?
  field["updateable"]
end

#write_Requires_Master_Read?Boolean

Returns:

  • (Boolean)


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

def write_Requires_Master_Read?
  field["writeRequiresMasterRead"]
end