Class: Org::Familysearch::Ws::Identity::V2a::Schema::User
- Defined in:
- lib/ruby-fs-stack/enunciate/identity.rb
Instance Attribute Summary collapse
-
#emails ⇒ Object
(no documentation provided).
-
#id ⇒ Object
(no documentation provided).
-
#member ⇒ Object
(no documentation provided).
-
#names ⇒ Object
(no documentation provided).
-
#password ⇒ Object
(no documentation provided).
-
#preferences ⇒ Object
(no documentation provided).
-
#requestedId ⇒ Object
(no documentation provided).
-
#username ⇒ Object
(no documentation provided).
Class Method Summary collapse
-
.from_json(o) ⇒ Object
constructs a User from a (parsed) JSON hash.
Instance Method Summary collapse
-
#init_jaxb_json_hash(_o) ⇒ Object
initializes this User with a json hash.
-
#to_jaxb_json_hash ⇒ Object
the json hash for this User.
-
#to_json ⇒ Object
the json (string form) for this User.
Instance Attribute Details
#emails ⇒ Object
(no documentation provided)
395 396 397 |
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 395 def emails @emails end |
#id ⇒ Object
(no documentation provided)
385 386 387 |
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 385 def id @id end |
#member ⇒ Object
(no documentation provided)
397 398 399 |
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 397 def member @member end |
#names ⇒ Object
(no documentation provided)
393 394 395 |
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 393 def names @names end |
#password ⇒ Object
(no documentation provided)
391 392 393 |
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 391 def password @password end |
#preferences ⇒ Object
(no documentation provided)
399 400 401 |
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 399 def preferences @preferences end |
#requestedId ⇒ Object
(no documentation provided)
387 388 389 |
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 387 def requestedId @requestedId end |
#username ⇒ Object
(no documentation provided)
389 390 391 |
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 389 def username @username end |
Class Method Details
.from_json(o) ⇒ Object
constructs a User from a (parsed) JSON hash
457 458 459 460 461 462 463 464 465 |
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 457 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 User with a json hash
433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 433 def init_jaxb_json_hash(_o) @id = String.from_json(_o['id']) unless _o['id'].nil? @requestedId = String.from_json(_o['requestedId']) unless _o['requestedId'].nil? @username = String.from_json(_o['username']) unless _o['username'].nil? @password = String.from_json(_o['password']) unless _o['password'].nil? if !_o['names'].nil? @names = Array.new _oa = _o['names'] _oa.each { | _item | @names.push Org::Familysearch::Ws::Identity::V2a::Schema::Name.from_json(_item) } end if !_o['emails'].nil? @emails = Array.new _oa = _o['emails'] _oa.each { | _item | @emails.push Org::Familysearch::Ws::Identity::V2a::Schema::Email.from_json(_item) } end @member = Org::Familysearch::Ws::Identity::V2a::Schema::Member.from_json(_o['member']) unless _o['member'].nil? if !_o['preferences'].nil? @preferences = Array.new _oa = _o['preferences'] _oa.each { | _item | @preferences.push Org::Familysearch::Ws::Identity::V2a::Schema::Preference.from_json(_item) } end end |
#to_jaxb_json_hash ⇒ Object
the json hash for this User
402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 |
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 402 def to_jaxb_json_hash _h = {} _h['id'] = id.to_jaxb_json_hash unless id.nil? _h['requestedId'] = requestedId.to_jaxb_json_hash unless requestedId.nil? _h['username'] = username.to_jaxb_json_hash unless username.nil? _h['password'] = password.to_jaxb_json_hash unless password.nil? if !names.nil? _ha = Array.new names.each { | _item | _ha.push _item.to_jaxb_json_hash } _h['names'] = _ha end if !emails.nil? _ha = Array.new emails.each { | _item | _ha.push _item.to_jaxb_json_hash } _h['emails'] = _ha end _h['member'] = member.to_jaxb_json_hash unless member.nil? if !preferences.nil? _ha = Array.new preferences.each { | _item | _ha.push _item.to_jaxb_json_hash } _h['preferences'] = _ha end return _h end |
#to_json ⇒ Object
the json (string form) for this User
428 429 430 |
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 428 def to_json to_jaxb_json_hash.to_json end |