class Vellum::NumberVariableValue
def self.from_json(json_object:)
-
(NumberVariableValue)-
Parameters:
-
json_object(JSON) --
def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) JSON.parse(json_object) value = struct.value new(value: value, additional_properties: struct) end
def self.validate_raw(obj:)
-
(Void)-
Parameters:
-
obj(Object) --
def self.validate_raw(obj:) obj.value&.is_a?(Float) != false || raise("Passed value for field obj.value is not the expected type, validation failed.") end
def initialize(value: nil, additional_properties: nil)
-
(NumberVariableValue)-
Parameters:
-
additional_properties(OpenStruct) -- Additional properties unmapped to the current class definition -
value(Float) --
def initialize(value: nil, additional_properties: nil) # @type [Float] @value = value # @type [OpenStruct] Additional properties unmapped to the current class definition @additional_properties = additional_properties end
def to_json(*_args)
-
(JSON)-
def to_json(*_args) { "value": @value }.to_json end