Class: Org::Familysearch::Ws::Identity::V2a::Schema::Session
- Defined in:
- lib/ruby-fs-stack/enunciate/identity.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
session id.
-
#type ⇒ Object
session type.
-
#values ⇒ Object
session values.
Class Method Summary collapse
-
.from_json(o) ⇒ Object
constructs a Session from a (parsed) JSON hash.
Instance Method Summary collapse
-
#init_jaxb_json_hash(_o) ⇒ Object
initializes this Session with a json hash.
-
#to_jaxb_json_hash ⇒ Object
the json hash for this Session.
-
#to_json ⇒ Object
the json (string form) for this Session.
Instance Attribute Details
#id ⇒ Object
session id.
496 497 498 |
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 496 def id @id end |
#type ⇒ Object
session type.
498 499 500 |
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 498 def type @type end |
#values ⇒ Object
session values.
500 501 502 |
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 500 def values @values end |
Class Method Details
.from_json(o) ⇒ Object
constructs a Session from a (parsed) JSON hash
532 533 534 535 536 537 538 539 540 |
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 532 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 Session with a json hash
521 522 523 524 525 526 527 528 529 |
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 521 def init_jaxb_json_hash(_o) @id = String.from_json(_o['id']) unless _o['id'].nil? @type = String.from_json(_o['type']) unless _o['type'].nil? if !_o['values'].nil? @values = Array.new _oa = _o['values'] _oa.each { | _item | @values.push Org::Familysearch::Ws::Identity::V2a::Schema::SessionValue.from_json(_item) } end end |
#to_jaxb_json_hash ⇒ Object
the json hash for this Session
503 504 505 506 507 508 509 510 511 512 513 |
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 503 def to_jaxb_json_hash _h = {} _h['id'] = id.to_jaxb_json_hash unless id.nil? _h['type'] = type.to_jaxb_json_hash unless type.nil? if !values.nil? _ha = Array.new values.each { | _item | _ha.push _item.to_jaxb_json_hash } _h['values'] = _ha end return _h end |
#to_json ⇒ Object
the json (string form) for this Session
516 517 518 |
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 516 def to_json to_jaxb_json_hash.to_json end |