class Vellum::TestCaseErrorVariableValue

def self.from_json(json_object:)

Returns:
  • (TestCaseErrorVariableValue) -

Parameters:
  • json_object (JSON) --
def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  variable_id = struct.variable_id
  if parsed_json["value"].nil?
    value = nil
  else
    value = parsed_json["value"].to_json
    value = VellumError.from_json(json_object: value)
  end
  new(variable_id: variable_id, value: value, additional_properties: struct)
end

def self.validate_raw(obj:)

Returns:
  • (Void) -

Parameters:
  • obj (Object) --
def self.validate_raw(obj:)
  obj.variable_id.is_a?(String) != false || raise("Passed value for field obj.variable_id is not the expected type, validation failed.")
  obj.value.nil? || VellumError.validate_raw(obj: obj.value)
end

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

Returns:
  • (TestCaseErrorVariableValue) -

Parameters:
  • additional_properties (OpenStruct) -- Additional properties unmapped to the current class definition
  • value (VellumError) --
  • variable_id (String) --
def initialize(variable_id:, value: nil, additional_properties: nil)
  # @type [String]
  @variable_id = variable_id
  # @type [VellumError]
  @value = value
  # @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)
  { "variable_id": @variable_id, "value": @value }.to_json
end