Class: Org::Familysearch::Ws::V1::BasicElement

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

Overview

Base class for v1 root elements.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#deprecatedObject

Deprecated flag.



1031
1032
1033
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 1031

def deprecated
  @deprecated
end

#errorsObject

The errors.



1037
1038
1039
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 1037

def errors
  @errors
end

#propertiesObject

The properties.



1039
1040
1041
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 1039

def properties
  @properties
end

#statusCodeObject

The response code.



1029
1030
1031
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 1029

def statusCode
  @statusCode
end

#statusMessageObject

The status message.



1033
1034
1035
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 1033

def statusMessage
  @statusMessage
end

#versionObject

The version.



1035
1036
1037
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 1035

def version
  @version
end

Class Method Details

.from_json(o) ⇒ Object

constructs a BasicElement from a (parsed) JSON hash



1085
1086
1087
1088
1089
1090
1091
1092
1093
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 1085

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



1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 1067

def init_jaxb_json_hash(_o)
  @statusCode = Fixnum.from_json(_o['statusCode']) unless _o['statusCode'].nil?
  @deprecated = Boolean.from_json(_o['deprecated']) unless _o['deprecated'].nil?
  @statusMessage = String.from_json(_o['statusMessage']) unless _o['statusMessage'].nil?
  @version = String.from_json(_o['version']) unless _o['version'].nil?
  if !_o['errors'].nil?
    @errors = Array.new
    _oa = _o['errors']
    _oa.each { | _item | @errors.push Org::Familysearch::Ws::V1::BasicError.from_json(_item) }
  end
  if !_o['properties'].nil?
    @properties = Array.new
    _oa = _o['properties']
    _oa.each { | _item | @properties.push Org::Familysearch::Ws::V1::BasicProperty.from_json(_item) }
  end
end

#to_jaxb_json_hashObject

the json hash for this BasicElement



1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 1042

def to_jaxb_json_hash
  _h = {}
  _h['statusCode'] = statusCode.to_jaxb_json_hash unless statusCode.nil?
  _h['deprecated'] = deprecated.to_jaxb_json_hash unless deprecated.nil?
  _h['statusMessage'] = statusMessage.to_jaxb_json_hash unless statusMessage.nil?
  _h['version'] = version.to_jaxb_json_hash unless version.nil?
  if !errors.nil?
    _ha = Array.new
    errors.each { | _item | _ha.push _item.to_jaxb_json_hash }
    _h['errors'] = _ha
  end
  if !properties.nil?
    _ha = Array.new
    properties.each { | _item | _ha.push _item.to_jaxb_json_hash }
    _h['properties'] = _ha
  end
  return _h
end

#to_jsonObject

the json (string form) for this BasicElement



1062
1063
1064
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 1062

def to_json
  to_jaxb_json_hash.to_json
end