Class: Vellum::TestSuiteRunExternalExecConfigRequest
- Inherits:
-
Object
- Object
- Vellum::TestSuiteRunExternalExecConfigRequest
- Defined in:
- lib/vellum_ai/types/test_suite_run_external_exec_config_request.rb
Overview
callable
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #data ⇒ Vellum::TestSuiteRunExternalExecConfigDataRequest readonly
-
#test_case_ids ⇒ Object
readonly
cases within the test suite will be run by default.
- #type ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(data:, test_case_ids: OMIT, type:, additional_properties: nil) ⇒ Vellum::TestSuiteRunExternalExecConfigRequest constructor
- #to_json ⇒ String
Constructor Details
#initialize(data:, test_case_ids: OMIT, type:, additional_properties: nil) ⇒ Vellum::TestSuiteRunExternalExecConfigRequest
31 32 33 34 35 36 37 38 39 |
# File 'lib/vellum_ai/types/test_suite_run_external_exec_config_request.rb', line 31 def initialize(data:, test_case_ids: OMIT, type:, additional_properties: nil) @data = data @test_case_ids = test_case_ids if test_case_ids != OMIT @type = type @additional_properties = additional_properties @_field_set = { "data": data, "test_case_ids": test_case_ids, "type": type }.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_external_exec_config_request.rb', line 18 def additional_properties @additional_properties end |
#data ⇒ Vellum::TestSuiteRunExternalExecConfigDataRequest (readonly)
11 12 13 |
# File 'lib/vellum_ai/types/test_suite_run_external_exec_config_request.rb', line 11 def data @data end |
#test_case_ids ⇒ Object (readonly)
cases within the test suite will be run by default.
14 15 16 |
# File 'lib/vellum_ai/types/test_suite_run_external_exec_config_request.rb', line 14 def test_case_ids @test_case_ids end |
#type ⇒ String (readonly)
16 17 18 |
# File 'lib/vellum_ai/types/test_suite_run_external_exec_config_request.rb', line 16 def type @type end |
Class Method Details
.from_json(json_object:) ⇒ Vellum::TestSuiteRunExternalExecConfigRequest
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_external_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) unless parsed_json["data"].nil? data = parsed_json["data"].to_json data = Vellum::TestSuiteRunExternalExecConfigDataRequest.from_json(json_object: data) else data = nil end test_case_ids = parsed_json["test_case_ids"] type = parsed_json["type"] new( data: data, test_case_ids: test_case_ids, type: type, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
75 76 77 78 79 |
# File 'lib/vellum_ai/types/test_suite_run_external_exec_config_request.rb', line 75 def self.validate_raw(obj:) Vellum::TestSuiteRunExternalExecConfigDataRequest.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.") obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
66 67 68 |
# File 'lib/vellum_ai/types/test_suite_run_external_exec_config_request.rb', line 66 def to_json @_field_set&.to_json end |