Class: Org::Familysearch::Ws::V1::BasicError

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

Overview

Default error implementation.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#codeObject

(no documentation provided)



966
967
968
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 966

def code
  @code
end

#detailsObject

(no documentation provided)



970
971
972
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 970

def details
  @details
end

#levelObject

(no documentation provided)



962
963
964
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 962

def level
  @level
end

#messageObject

(no documentation provided)



968
969
970
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 968

def message
  @message
end

#subcodeObject

(no documentation provided)



964
965
966
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 964

def subcode
  @subcode
end

Class Method Details

.from_json(o) ⇒ Object

constructs a BasicError from a (parsed) JSON hash



998
999
1000
1001
1002
1003
1004
1005
1006
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 998

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



989
990
991
992
993
994
995
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 989

def init_jaxb_json_hash(_o)
  @level = String.from_json(_o['level']) unless _o['level'].nil?
  @subcode = Fixnum.from_json(_o['subcode']) unless _o['subcode'].nil?
  @code = Fixnum.from_json(_o['code']) unless _o['code'].nil?
  @message = String.from_json(_o['message']) unless _o['message'].nil?
  @details = String.from_json(_o['details']) unless _o['details'].nil?
end

#to_jaxb_json_hashObject

the json hash for this BasicError



973
974
975
976
977
978
979
980
981
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 973

def to_jaxb_json_hash
  _h = {}
  _h['level'] = level.to_jaxb_json_hash unless level.nil?
  _h['subcode'] = subcode.to_jaxb_json_hash unless subcode.nil?
  _h['code'] = code.to_jaxb_json_hash unless code.nil?
  _h['message'] = message.to_jaxb_json_hash unless message.nil?
  _h['details'] = details.to_jaxb_json_hash unless details.nil?
  return _h
end

#to_jsonObject

the json (string form) for this BasicError



984
985
986
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 984

def to_json
  to_jaxb_json_hash.to_json
end