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.
254 255 256 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 254 def initialize(field) @field = field end |
Instance Method Details
#aggregatable? ⇒ Boolean
258 259 260 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 258 def aggregatable? field["aggregatable"] end |
#ai_prediction_field? ⇒ Boolean
262 263 264 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 262 def ai_prediction_field? field["aiPredictionField"] end |
#autoNumber? ⇒ Boolean
266 267 268 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 266 def autoNumber? field["autoNumber"] end |
#byteLength ⇒ Object
270 271 272 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 270 def byteLength field["byteLength"] end |
#calculated? ⇒ Boolean
274 275 276 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 274 def calculated? field["calculated"] end |
#calculated_formula ⇒ Object
278 279 280 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 278 def calculated_formula field["calculatedFormula"] end |
#cascade_delete? ⇒ Boolean
282 283 284 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 282 def cascade_delete? field["cascadeDelete"] end |
#case_sensitive ⇒ Object
286 287 288 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 286 def case_sensitive field["caseSensitive"] end |
#compound_field_name ⇒ Object
290 291 292 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 290 def compound_field_name field["compoundFieldName"] end |
#controller_name ⇒ Object
294 295 296 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 294 def controller_name field["controllerName"] end |
#createable? ⇒ Boolean
298 299 300 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 298 def createable? field["createable"] end |
#custom? ⇒ Boolean
302 303 304 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 302 def custom? field["custom"] end |
#default_value ⇒ Object
306 307 308 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 306 def default_value field["defaultValue"] end |
#default_value_formula ⇒ Object
310 311 312 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 310 def default_value_formula field["defaultValueFormula"] end |
#defaulted_on_create? ⇒ Boolean
314 315 316 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 314 def defaulted_on_create? field["defaultedOnCreate"] end |
#dependent_picklist? ⇒ Boolean
318 319 320 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 318 def dependent_picklist? field["dependentPicklist"] end |
#deprecated_and_hidden? ⇒ Boolean
322 323 324 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 322 def deprecated_and_hidden? field["deprecatedAndHidden"] end |
#digits ⇒ Object
326 327 328 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 326 def digits field["digits"] end |
#display_location_in_decimal? ⇒ Boolean
330 331 332 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 330 def display_location_in_decimal? field["displayLocationInDecimal"] end |
#encrypted? ⇒ Boolean
334 335 336 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 334 def encrypted? field["encrypted"] end |
#external_id? ⇒ Boolean
338 339 340 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 338 def external_id? field["externalId"] end |
#extra_type_info ⇒ Object
342 343 344 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 342 def extra_type_info field["extraTypeInfo"] end |
#filterable? ⇒ Boolean
346 347 348 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 346 def filterable? field["filterable"] end |
#filtered_lookup_info ⇒ Object
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
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
358 359 360 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 358 def groupable? field["groupable"] end |
#high_scale_number? ⇒ Boolean
362 363 364 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 362 def high_scale_number? field["highScaleNumber"] end |
#html_formatted? ⇒ Boolean
366 367 368 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 366 def html_formatted? field["htmlFormatted"] end |
#id_lookup? ⇒ Boolean
370 371 372 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 370 def id_lookup? field["idLookup"] end |
#inline_help_text ⇒ Object
374 375 376 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 374 def inline_help_text field["inlineHelpText"] end |
#label ⇒ Object
378 379 380 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 378 def label field["label"] end |
#length ⇒ Object
382 383 384 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 382 def length field["length"] end |
#mask ⇒ Object
386 387 388 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 386 def mask field["mask"] end |
#mask_type ⇒ Object
390 391 392 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 390 def mask_type field["maskType"] end |
#name ⇒ Object
394 395 396 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 394 def name field["name"] end |
#name_field? ⇒ Boolean
398 399 400 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 398 def name_field? field["nameField"] end |
#name_pointing? ⇒ Boolean
402 403 404 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 402 def name_pointing? field["namePointing"] end |
#nillable? ⇒ Boolean
406 407 408 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 406 def nillable? field["nillable"] end |
#permissionable? ⇒ Boolean
410 411 412 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 410 def field["permissionable"] end |
#picklist_values ⇒ Object
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
428 429 430 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 428 def polymorphic_foreign_key? field["polymorphicForeignKey"] end |
#precision ⇒ Object
432 433 434 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 432 def precision field["precision"] end |
#query_by_distance? ⇒ Boolean
436 437 438 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 436 def query_by_distance? field["queryByDistance"] end |
#reference_target_field ⇒ Object
440 441 442 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 440 def reference_target_field field["referenceTargetField"] end |
#reference_to ⇒ Object
444 445 446 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 444 def reference_to field["referenceTo"] end |
#relationship_name ⇒ Object
448 449 450 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 448 def relationship_name field["relationshipName"] end |
#relationship_order ⇒ Object
452 453 454 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 452 def relationship_order field["relationshipOrder"] end |
#restricted_delete ⇒ Object
456 457 458 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 456 def restricted_delete field["restrictedDelete"] end |
#restricted_picklist? ⇒ Boolean
460 461 462 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 460 def restricted_picklist? field["restrictedPicklist"] end |
#scale ⇒ Object
464 465 466 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 464 def scale field["scale"] end |
#search_prefilterable? ⇒ Boolean
468 469 470 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 468 def search_prefilterable? field["searchPrefilterable"] end |
#soapType ⇒ Object
472 473 474 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 472 def soapType field["soapType"] end |
#sortable? ⇒ Boolean
476 477 478 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 476 def sortable? field["sortable"] end |
#to_h ⇒ Object
496 497 498 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 496 def to_h field end |
#type ⇒ Object
480 481 482 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 480 def type field["type"] end |
#unique? ⇒ Boolean
484 485 486 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 484 def unique? field["unique"] end |
#updateable? ⇒ Boolean
488 489 490 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 488 def updateable? field["updateable"] end |
#write_Requires_Master_Read? ⇒ Boolean
492 493 494 |
# File 'lib/sf_cli/sf/sobject/schema.rb', line 492 def write_Requires_Master_Read? field["writeRequiresMasterRead"] end |