Class: SfCli::Sf::Sobject::Schema::Field
- Inherits:
-
Object
- Object
- SfCli::Sf::Sobject::Schema::Field
- 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
- #aggregatable? ⇒ Boolean
- #ai_prediction_field? ⇒ Boolean
- #autoNumber? ⇒ Boolean
- #byteLength ⇒ Object
- #calculated? ⇒ Boolean
- #calculated_formula ⇒ Object
- #cascade_delete? ⇒ Boolean
- #case_sensitive ⇒ Object
- #compound_field_name ⇒ Object
- #controller_name ⇒ Object
- #createable? ⇒ Boolean
- #custom? ⇒ Boolean
- #default_value ⇒ Object
- #default_value_formula ⇒ Object
- #defaulted_on_create? ⇒ Boolean
- #dependent_picklist? ⇒ Boolean
- #deprecated_and_hidden? ⇒ Boolean
- #digits ⇒ Object
- #display_location_in_decimal? ⇒ Boolean
- #encrypted? ⇒ Boolean
- #external_id? ⇒ Boolean
- #extra_type_info ⇒ Object
- #filterable? ⇒ Boolean
- #filtered_lookup_info ⇒ Object
- #formula_treat_null_number_as_zero? ⇒ Boolean
- #groupable? ⇒ Boolean
- #high_scale_number? ⇒ Boolean
- #html_formatted? ⇒ Boolean
- #id_lookup? ⇒ Boolean
-
#initialize(field) ⇒ Field
constructor
A new instance of Field.
- #inline_help_text ⇒ Object
- #label ⇒ Object
- #length ⇒ Object
- #mask ⇒ Object
- #mask_type ⇒ Object
- #name ⇒ Object
- #name_field? ⇒ Boolean
- #name_pointing? ⇒ Boolean
- #nillable? ⇒ Boolean
- #permissionable? ⇒ Boolean
- #picklist_values ⇒ Object
- #polymorphic_foreign_key? ⇒ Boolean
- #precision ⇒ Object
- #query_by_distance? ⇒ Boolean
- #reference_target_field ⇒ Object
- #reference_to ⇒ Object
- #relationship_name ⇒ Object
- #relationship_order ⇒ Object
- #restricted_delete ⇒ Object
- #restricted_picklist? ⇒ Boolean
- #scale ⇒ Object
- #search_prefilterable? ⇒ Boolean
- #soapType ⇒ Object
- #sortable? ⇒ Boolean
- #to_h ⇒ Object
- #type ⇒ Object
- #unique? ⇒ Boolean
- #updateable? ⇒ Boolean
- #write_Requires_Master_Read? ⇒ Boolean
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
306 307 308 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 306 def aggregatable? field["aggregatable"] end |
#ai_prediction_field? ⇒ Boolean
310 311 312 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 310 def ai_prediction_field? field["aiPredictionField"] end |
#autoNumber? ⇒ Boolean
314 315 316 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 314 def autoNumber? field["autoNumber"] end |
#byteLength ⇒ Object
318 319 320 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 318 def byteLength field["byteLength"] end |
#calculated? ⇒ Boolean
322 323 324 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 322 def calculated? field["calculated"] end |
#calculated_formula ⇒ Object
326 327 328 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 326 def calculated_formula field["calculatedFormula"] end |
#cascade_delete? ⇒ Boolean
330 331 332 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 330 def cascade_delete? field["cascadeDelete"] end |
#case_sensitive ⇒ Object
334 335 336 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 334 def case_sensitive field["caseSensitive"] end |
#compound_field_name ⇒ Object
338 339 340 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 338 def compound_field_name field["compoundFieldName"] end |
#controller_name ⇒ Object
342 343 344 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 342 def controller_name field["controllerName"] end |
#createable? ⇒ Boolean
346 347 348 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 346 def createable? field["createable"] end |
#custom? ⇒ Boolean
350 351 352 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 350 def custom? field["custom"] end |
#default_value ⇒ Object
354 355 356 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 354 def default_value field["defaultValue"] end |
#default_value_formula ⇒ Object
358 359 360 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 358 def default_value_formula field["defaultValueFormula"] end |
#defaulted_on_create? ⇒ Boolean
362 363 364 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 362 def defaulted_on_create? field["defaultedOnCreate"] end |
#dependent_picklist? ⇒ Boolean
366 367 368 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 366 def dependent_picklist? field["dependentPicklist"] end |
#deprecated_and_hidden? ⇒ Boolean
370 371 372 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 370 def deprecated_and_hidden? field["deprecatedAndHidden"] end |
#digits ⇒ Object
374 375 376 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 374 def digits field["digits"] end |
#display_location_in_decimal? ⇒ Boolean
378 379 380 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 378 def display_location_in_decimal? field["displayLocationInDecimal"] end |
#encrypted? ⇒ Boolean
382 383 384 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 382 def encrypted? field["encrypted"] end |
#external_id? ⇒ Boolean
386 387 388 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 386 def external_id? field["externalId"] end |
#extra_type_info ⇒ Object
390 391 392 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 390 def extra_type_info field["extraTypeInfo"] end |
#filterable? ⇒ Boolean
394 395 396 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 394 def filterable? field["filterable"] end |
#filtered_lookup_info ⇒ Object
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
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
406 407 408 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 406 def groupable? field["groupable"] end |
#high_scale_number? ⇒ Boolean
410 411 412 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 410 def high_scale_number? field["highScaleNumber"] end |
#html_formatted? ⇒ Boolean
414 415 416 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 414 def html_formatted? field["htmlFormatted"] end |
#id_lookup? ⇒ Boolean
418 419 420 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 418 def id_lookup? field["idLookup"] end |
#inline_help_text ⇒ Object
422 423 424 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 422 def inline_help_text field["inlineHelpText"] end |
#label ⇒ Object
426 427 428 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 426 def label field["label"] end |
#length ⇒ Object
430 431 432 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 430 def length field["length"] end |
#mask ⇒ Object
434 435 436 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 434 def mask field["mask"] end |
#mask_type ⇒ Object
438 439 440 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 438 def mask_type field["maskType"] end |
#name ⇒ Object
442 443 444 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 442 def name field["name"] end |
#name_field? ⇒ Boolean
446 447 448 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 446 def name_field? field["nameField"] end |
#name_pointing? ⇒ Boolean
450 451 452 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 450 def name_pointing? field["namePointing"] end |
#nillable? ⇒ Boolean
454 455 456 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 454 def nillable? field["nillable"] end |
#permissionable? ⇒ Boolean
458 459 460 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 458 def field["permissionable"] end |
#picklist_values ⇒ Object
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
476 477 478 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 476 def polymorphic_foreign_key? field["polymorphicForeignKey"] end |
#precision ⇒ Object
480 481 482 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 480 def precision field["precision"] end |
#query_by_distance? ⇒ Boolean
484 485 486 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 484 def query_by_distance? field["queryByDistance"] end |
#reference_target_field ⇒ Object
488 489 490 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 488 def reference_target_field field["referenceTargetField"] end |
#reference_to ⇒ Object
492 493 494 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 492 def reference_to field["referenceTo"] end |
#relationship_name ⇒ Object
496 497 498 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 496 def relationship_name field["relationshipName"] end |
#relationship_order ⇒ Object
500 501 502 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 500 def relationship_order field["relationshipOrder"] end |
#restricted_delete ⇒ Object
504 505 506 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 504 def restricted_delete field["restrictedDelete"] end |
#restricted_picklist? ⇒ Boolean
508 509 510 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 508 def restricted_picklist? field["restrictedPicklist"] end |
#scale ⇒ Object
512 513 514 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 512 def scale field["scale"] end |
#search_prefilterable? ⇒ Boolean
516 517 518 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 516 def search_prefilterable? field["searchPrefilterable"] end |
#soapType ⇒ Object
520 521 522 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 520 def soapType field["soapType"] end |
#sortable? ⇒ Boolean
524 525 526 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 524 def sortable? field["sortable"] end |
#to_h ⇒ Object
544 545 546 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 544 def to_h field end |
#type ⇒ Object
528 529 530 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 528 def type field["type"] end |
#unique? ⇒ Boolean
532 533 534 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 532 def unique? field["unique"] end |
#updateable? ⇒ Boolean
536 537 538 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 536 def updateable? field["updateable"] end |
#write_Requires_Master_Read? ⇒ Boolean
540 541 542 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 540 def write_Requires_Master_Read? field["writeRequiresMasterRead"] end |