Class: Vellum::TestSuiteRunDeploymentReleaseTagExecConfigDataRequest

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

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(deployment_id:, tag: OMIT, additional_properties: nil) ⇒ Vellum::TestSuiteRunDeploymentReleaseTagExecConfigDataRequest

Parameters:

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



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

def initialize(deployment_id:, tag: OMIT, additional_properties: nil)
  @deployment_id = deployment_id
  @tag = tag if tag != OMIT
  @additional_properties = additional_properties
  @_field_set = { "deployment_id": deployment_id, "tag": tag }.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



13
14
15
# File 'lib/vellum_ai/types/test_suite_run_deployment_release_tag_exec_config_data_request.rb', line 13

def additional_properties
  @additional_properties
end

#deployment_idString (readonly)

Returns The ID of the Prompt Deployment to run the Test Suite against.

Returns:

  • (String)

    The ID of the Prompt Deployment to run the Test Suite against.



8
9
10
# File 'lib/vellum_ai/types/test_suite_run_deployment_release_tag_exec_config_data_request.rb', line 8

def deployment_id
  @deployment_id
end

#tagObject (readonly)

against. Useful for testing past versions of the Prompt Deployment



11
12
13
# File 'lib/vellum_ai/types/test_suite_run_deployment_release_tag_exec_config_data_request.rb', line 11

def tag
  @tag
end

Class Method Details

.from_json(json_object:) ⇒ Vellum::TestSuiteRunDeploymentReleaseTagExecConfigDataRequest

Parameters:

  • json_object (String)

Returns:



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

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  deployment_id = parsed_json["deployment_id"]
  tag = parsed_json["tag"]
  new(
    deployment_id: deployment_id,
    tag: tag,
    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_deployment_release_tag_exec_config_data_request.rb', line 62

def self.validate_raw(obj:)
  obj.deployment_id.is_a?(String) != false || raise("Passed value for field obj.deployment_id is not the expected type, validation failed.")
  obj.tag&.is_a?(String) != false || raise("Passed value for field obj.tag 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_deployment_release_tag_exec_config_data_request.rb', line 53

def to_json
  @_field_set&.to_json
end