class Vellum::TestSuiteRunMetricNumberOutput

Output for a test suite run metric that is of type NUMBER

def self.from_json(json_object:)

Returns:
  • (TestSuiteRunMetricNumberOutput) -

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
  name = struct.name
  new(value: value, name: name, additional_properties: struct)
end

def self.validate_raw(obj:)

Returns:
  • (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.")
  obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
end

def initialize(value:, name:, additional_properties: nil)

Returns:
  • (TestSuiteRunMetricNumberOutput) -

Parameters:
  • additional_properties (OpenStruct) -- Additional properties unmapped to the current class definition
  • name (String) --
  • value (Float) --
def initialize(value:, name:, additional_properties: nil)
  # @type [Float]
  @value = value
  # @type [String]
  @name = name
  # @type [OpenStruct] Additional properties unmapped to the current class definition
  @additional_properties = additional_properties
end

def to_json(*_args)

Returns:
  • (JSON) -
def to_json(*_args)
  { "value": @value, "name": @name }.to_json
end