Class: Org::Familysearch::Ws::Familytree::V2::Schema::MatchResults
- Defined in:
- lib/ruby-fs-stack/enunciate/familytree.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
The count of matches.
-
#id ⇒ Object
The id of the person to which the matches are applicable.
-
#query ⇒ Object
query parameters.
-
#results ⇒ Object
The matches.
Class Method Summary collapse
-
.from_json(o) ⇒ Object
constructs a MatchResults from a (parsed) JSON hash.
Instance Method Summary collapse
-
#init_jaxb_json_hash(_o) ⇒ Object
initializes this MatchResults with a json hash.
-
#to_jaxb_json_hash ⇒ Object
the json hash for this MatchResults.
-
#to_json ⇒ Object
the json (string form) for this MatchResults.
Instance Attribute Details
#count ⇒ Object
The count of matches.
3445 3446 3447 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3445 def count @count end |
#id ⇒ Object
The id of the person to which the matches are applicable.
3443 3444 3445 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3443 def id @id end |
#query ⇒ Object
query parameters
3449 3450 3451 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3449 def query @query end |
#results ⇒ Object
The matches.
3447 3448 3449 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3447 def results @results end |
Class Method Details
.from_json(o) ⇒ Object
constructs a MatchResults from a (parsed) JSON hash
3483 3484 3485 3486 3487 3488 3489 3490 3491 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3483 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 MatchResults with a json hash
3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3471 def init_jaxb_json_hash(_o) @id = String.from_json(_o['id']) unless _o['id'].nil? @count = Fixnum.from_json(_o['count']) unless _o['count'].nil? if !_o['match'].nil? @results = Array.new _oa = _o['match'] _oa.each { | _item | @results.push Org::Familysearch::Ws::Familytree::V2::Schema::MatchResult.from_json(_item) } end @query = Org::Familysearch::Ws::Familytree::V2::Schema::SearchMatchParameters.from_json(_o['query']) unless _o['query'].nil? end |
#to_jaxb_json_hash ⇒ Object
the json hash for this MatchResults
3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3452 def to_jaxb_json_hash _h = {} _h['id'] = id.to_jaxb_json_hash unless id.nil? _h['count'] = count.to_jaxb_json_hash unless count.nil? if !results.nil? _ha = Array.new results.each { | _item | _ha.push _item.to_jaxb_json_hash } _h['match'] = _ha end _h['query'] = query.to_jaxb_json_hash unless query.nil? return _h end |
#to_json ⇒ Object
the json (string form) for this MatchResults
3466 3467 3468 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3466 def to_json to_jaxb_json_hash.to_json end |