Class: Org::Familysearch::Ws::Familytree::V2::Schema::PersonPersonas

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-fs-stack/enunciate/familytree.rb

Overview

A FamilyTree person asseritons section.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#actionObject

The action to take on the personas.



1318
1319
1320
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 1318

def action
  @action
end

#personasObject

A collection of persona references for this person.



1324
1325
1326
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 1324

def personas
  @personas
end

#targetObject

The target id to use when combining personas to a specific person.



1322
1323
1324
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 1322

def target
  @target
end

#tempIdObject

Temp id for when you’re moving records.



1320
1321
1322
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 1320

def tempId
  @tempId
end

Class Method Details

.from_json(o) ⇒ Object

constructs a PersonPersonas from a (parsed) JSON hash



1358
1359
1360
1361
1362
1363
1364
1365
1366
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 1358

def self.from_json(o)
  if o.nil?
    return nil
  else
    inst = new
    inst.init_jaxb_json_hash o
    return inst
  end
end

Instance Method Details

#init_jaxb_json_hash(_o) ⇒ Object

initializes this PersonPersonas with a json hash



1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 1346

def init_jaxb_json_hash(_o)
  @action = String.from_json(_o['action']) unless _o['action'].nil?
  @tempId = String.from_json(_o['tempId']) unless _o['tempId'].nil?
  @target = Org::Familysearch::Ws::Familytree::V2::Schema::EntityReference.from_json(_o['target']) unless _o['target'].nil?
  if !_o['persona'].nil?
    @personas = Array.new
    _oa = _o['persona']
    _oa.each { | _item | @personas.push Org::Familysearch::Ws::Familytree::V2::Schema::PersonPersona.from_json(_item) }
  end
end

#to_jaxb_json_hashObject

the json hash for this PersonPersonas



1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 1327

def to_jaxb_json_hash
  _h = {}
  _h['action'] = action.to_jaxb_json_hash unless action.nil?
  _h['tempId'] = tempId.to_jaxb_json_hash unless tempId.nil?
  _h['target'] = target.to_jaxb_json_hash unless target.nil?
  if !personas.nil?
    _ha = Array.new
    personas.each { | _item | _ha.push _item.to_jaxb_json_hash }
    _h['persona'] = _ha
  end
  return _h
end

#to_jsonObject

the json (string form) for this PersonPersonas



1341
1342
1343
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 1341

def to_json
  to_jaxb_json_hash.to_json
end