Class: Vellum::TestSuiteRunWorkflowReleaseTagExecConfigRequest

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

Overview

Execution configuration for running a Test Suite against a Workflow Deployment

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, data:, test_case_ids: OMIT, additional_properties: nil) ⇒ Vellum::TestSuiteRunWorkflowReleaseTagExecConfigRequest

Parameters:

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



30
31
32
33
34
35
36
37
38
# File 'lib/vellum_ai/types/test_suite_run_workflow_release_tag_exec_config_request.rb', line 30

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_propertiesOpenStruct (readonly)

Returns Additional properties unmapped to the current class definition.

Returns:

  • (OpenStruct)

    Additional properties unmapped to the current class definition



17
18
19
# File 'lib/vellum_ai/types/test_suite_run_workflow_release_tag_exec_config_request.rb', line 17

def additional_properties
  @additional_properties
end

#dataVellum::TestSuiteRunWorkflowReleaseTagExecConfigDataRequest (readonly)



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

def data
  @data
end

#test_case_idsObject (readonly)

cases within the test suite will be run by default.



15
16
17
# File 'lib/vellum_ai/types/test_suite_run_workflow_release_tag_exec_config_request.rb', line 15

def test_case_ids
  @test_case_ids
end

#typeString (readonly)

Returns:

  • (String)


10
11
12
# File 'lib/vellum_ai/types/test_suite_run_workflow_release_tag_exec_config_request.rb', line 10

def type
  @type
end

Class Method Details

.from_json(json_object:) ⇒ Vellum::TestSuiteRunWorkflowReleaseTagExecConfigRequest

Parameters:

  • json_object (String)

Returns:



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/vellum_ai/types/test_suite_run_workflow_release_tag_exec_config_request.rb', line 44

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::TestSuiteRunWorkflowReleaseTagExecConfigDataRequest.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

Parameters:

  • obj (Object)

Returns:

  • (Void)


75
76
77
78
79
# File 'lib/vellum_ai/types/test_suite_run_workflow_release_tag_exec_config_request.rb', line 75

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::TestSuiteRunWorkflowReleaseTagExecConfigDataRequest.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_jsonString

Returns:

  • (String)


66
67
68
# File 'lib/vellum_ai/types/test_suite_run_workflow_release_tag_exec_config_request.rb', line 66

def to_json
  @_field_set&.to_json
end