Class: Killbill::Plugin::Model::HealthStatus
- Defined in:
- lib/killbill/gen/api/health_status.rb
Instance Attribute Summary collapse
-
#details ⇒ Object
Returns the value of attribute details.
-
#is_healthy ⇒ Object
Returns the value of attribute is_healthy.
Instance Method Summary collapse
-
#initialize ⇒ HealthStatus
constructor
A new instance of HealthStatus.
- #to_java ⇒ Object
- #to_ruby(j_obj) ⇒ Object
Constructor Details
#initialize ⇒ HealthStatus
Returns a new instance of HealthStatus.
37 38 |
# File 'lib/killbill/gen/api/health_status.rb', line 37 def initialize() end |
Instance Attribute Details
#details ⇒ Object
Returns the value of attribute details.
35 36 37 |
# File 'lib/killbill/gen/api/health_status.rb', line 35 def details @details end |
#is_healthy ⇒ Object
Returns the value of attribute is_healthy.
35 36 37 |
# File 'lib/killbill/gen/api/health_status.rb', line 35 def is_healthy @is_healthy end |
Instance Method Details
#to_java ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/killbill/gen/api/health_status.rb', line 40 def to_java() # conversion for is_healthy [type = boolean] @is_healthy = @is_healthy.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_healthy) # conversion for details [type = java.util.Map] tmp = java.util.HashMap.new (@details || {}).each do |k,v| tmp.put(k, v) end @details = tmp Java::org.killbill.billing.osgi.api.HealthStatus.new(@is_healthy, @details) end |
#to_ruby(j_obj) ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/killbill/gen/api/health_status.rb', line 53 def to_ruby(j_obj) # conversion for is_healthy [type = boolean] @is_healthy = j_obj.is_healthy if @is_healthy.nil? @is_healthy = false else tmp_bool = (@is_healthy.java_kind_of? java.lang.Boolean) ? @is_healthy.boolean_value : @is_healthy @is_healthy = tmp_bool ? true : false end # conversion for details [type = java.util.Map] @details = j_obj.details tmp = {} jtmp0 = @details || java.util.HashMap.new jtmp0.key_set.each do |k| v = jtmp0.get(k) tmp[k] = v end @details = tmp self end |