Class: Vellum::TestSuiteRunPromptSandboxHistoryItemExecConfigRequest
- Inherits:
-
Object
- Object
- Vellum::TestSuiteRunPromptSandboxHistoryItemExecConfigRequest
- Defined in:
- lib/vellum_ai/types/test_suite_run_prompt_sandbox_history_item_exec_config_request.rb
Overview
History Item
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #data ⇒ Vellum::TestSuiteRunPromptSandboxHistoryItemExecConfigDataRequest readonly
-
#test_case_ids ⇒ Object
readonly
cases within the test suite will be run by default.
- #type ⇒ String readonly
Class Method Summary collapse
- .from_json(json_object:) ⇒ Vellum::TestSuiteRunPromptSandboxHistoryItemExecConfigRequest
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(type:, data:, test_case_ids: OMIT, additional_properties: nil) ⇒ Vellum::TestSuiteRunPromptSandboxHistoryItemExecConfigRequest constructor
- #to_json ⇒ String
Constructor Details
#initialize(type:, data:, test_case_ids: OMIT, additional_properties: nil) ⇒ Vellum::TestSuiteRunPromptSandboxHistoryItemExecConfigRequest
31 32 33 34 35 36 37 38 39 |
# File 'lib/vellum_ai/types/test_suite_run_prompt_sandbox_history_item_exec_config_request.rb', line 31 def initialize(type:, data:, test_case_ids: OMIT, additional_properties: nil) @type = type @data = data @test_case_ids = test_case_ids if test_case_ids != OMIT @additional_properties = additional_properties @_field_set = { "type": type, "data": data, "test_case_ids": test_case_ids }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
18 19 20 |
# File 'lib/vellum_ai/types/test_suite_run_prompt_sandbox_history_item_exec_config_request.rb', line 18 def additional_properties @additional_properties end |
#data ⇒ Vellum::TestSuiteRunPromptSandboxHistoryItemExecConfigDataRequest (readonly)
13 14 15 |
# File 'lib/vellum_ai/types/test_suite_run_prompt_sandbox_history_item_exec_config_request.rb', line 13 def data @data end |
#test_case_ids ⇒ Object (readonly)
cases within the test suite will be run by default.
16 17 18 |
# File 'lib/vellum_ai/types/test_suite_run_prompt_sandbox_history_item_exec_config_request.rb', line 16 def test_case_ids @test_case_ids end |
#type ⇒ String (readonly)
11 12 13 |
# File 'lib/vellum_ai/types/test_suite_run_prompt_sandbox_history_item_exec_config_request.rb', line 11 def type @type end |
Class Method Details
.from_json(json_object:) ⇒ Vellum::TestSuiteRunPromptSandboxHistoryItemExecConfigRequest
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/vellum_ai/types/test_suite_run_prompt_sandbox_history_item_exec_config_request.rb', line 45 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) type = parsed_json["type"] unless parsed_json["data"].nil? data = parsed_json["data"].to_json data = Vellum::TestSuiteRunPromptSandboxHistoryItemExecConfigDataRequest.from_json(json_object: data) else data = nil end test_case_ids = parsed_json["test_case_ids"] new( type: type, data: data, test_case_ids: test_case_ids, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
76 77 78 79 80 |
# File 'lib/vellum_ai/types/test_suite_run_prompt_sandbox_history_item_exec_config_request.rb', line 76 def self.validate_raw(obj:) obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.") Vellum::TestSuiteRunPromptSandboxHistoryItemExecConfigDataRequest.validate_raw(obj: obj.data) obj.test_case_ids&.is_a?(Array) != false || raise("Passed value for field obj.test_case_ids is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
67 68 69 |
# File 'lib/vellum_ai/types/test_suite_run_prompt_sandbox_history_item_exec_config_request.rb', line 67 def to_json @_field_set&.to_json end |