Class: Vellum::TestSuiteRunWorkflowSandboxHistoryItemExecConfigData

Inherits:
Object
  • Object
show all
Defined in:
lib/vellum_ai/types/test_suite_run_workflow_sandbox_history_item_exec_config_data.rb

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(history_item_id:, workflow_variant_id:, additional_properties: nil) ⇒ Vellum::TestSuiteRunWorkflowSandboxHistoryItemExecConfigData

Parameters:

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



27
28
29
30
31
32
# File 'lib/vellum_ai/types/test_suite_run_workflow_sandbox_history_item_exec_config_data.rb', line 27

def initialize(history_item_id:, workflow_variant_id:, additional_properties: nil)
  @history_item_id = history_item_id
  @workflow_variant_id = workflow_variant_id
  @additional_properties = additional_properties
  @_field_set = { "history_item_id": history_item_id, "workflow_variant_id": workflow_variant_id }
end

Instance Attribute Details

#additional_propertiesOpenStruct (readonly)

Returns Additional properties unmapped to the current class definition.

Returns:

  • (OpenStruct)

    Additional properties unmapped to the current class definition



14
15
16
# File 'lib/vellum_ai/types/test_suite_run_workflow_sandbox_history_item_exec_config_data.rb', line 14

def additional_properties
  @additional_properties
end

#history_item_idObject (readonly)

against.



9
10
11
# File 'lib/vellum_ai/types/test_suite_run_workflow_sandbox_history_item_exec_config_data.rb', line 9

def history_item_id
  @history_item_id
end

#workflow_variant_idObject (readonly)

you’d like to run the Test Suite against.



12
13
14
# File 'lib/vellum_ai/types/test_suite_run_workflow_sandbox_history_item_exec_config_data.rb', line 12

def workflow_variant_id
  @workflow_variant_id
end

Class Method Details

.from_json(json_object:) ⇒ Vellum::TestSuiteRunWorkflowSandboxHistoryItemExecConfigData

Parameters:

  • json_object (String)

Returns:



38
39
40
41
42
43
44
45
46
47
48
# File 'lib/vellum_ai/types/test_suite_run_workflow_sandbox_history_item_exec_config_data.rb', line 38

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  history_item_id = parsed_json["history_item_id"]
  workflow_variant_id = parsed_json["workflow_variant_id"]
  new(
    history_item_id: history_item_id,
    workflow_variant_id: workflow_variant_id,
    additional_properties: struct
  )
end

.validate_raw(obj:) ⇒ Void

Parameters:

  • obj (Object)

Returns:

  • (Void)


62
63
64
65
# File 'lib/vellum_ai/types/test_suite_run_workflow_sandbox_history_item_exec_config_data.rb', line 62

def self.validate_raw(obj:)
  obj.history_item_id.is_a?(String) != false || raise("Passed value for field obj.history_item_id is not the expected type, validation failed.")
  obj.workflow_variant_id.is_a?(String) != false || raise("Passed value for field obj.workflow_variant_id is not the expected type, validation failed.")
end

Instance Method Details

#to_jsonString

Returns:

  • (String)


53
54
55
# File 'lib/vellum_ai/types/test_suite_run_workflow_sandbox_history_item_exec_config_data.rb', line 53

def to_json
  @_field_set&.to_json
end