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

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

Overview

A user id.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#typeObject

The type.



2009
2010
2011
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 2009

def type
  @type
end

#valueObject

The value of the id.



2011
2012
2013
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 2011

def value
  @value
end

Class Method Details

.from_json(o) ⇒ Object

constructs a UserIdentifier from a (parsed) JSON hash



2033
2034
2035
2036
2037
2038
2039
2040
2041
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 2033

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 UserIdentifier with a json hash



2027
2028
2029
2030
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 2027

def init_jaxb_json_hash(_o)
  @type = String.from_json(_o['type']) unless _o['type'].nil?
  @value = String.from_json(_o['value']) unless _o['value'].nil?
end

#to_jaxb_json_hashObject

the json hash for this UserIdentifier



2014
2015
2016
2017
2018
2019
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 2014

def to_jaxb_json_hash
  _h = {}
  _h['type'] = type.to_jaxb_json_hash unless type.nil?
  _h['value'] = value.to_jaxb_json_hash unless value.nil?
  return _h
end

#to_jsonObject

the json (string form) for this UserIdentifier



2022
2023
2024
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 2022

def to_json
  to_jaxb_json_hash.to_json
end