Class: Vellum::WorkflowDeploymentReleaseWorkflowVersion
- Inherits:
-
Object
- Object
- Vellum::WorkflowDeploymentReleaseWorkflowVersion
- Defined in:
- lib/vellum_ai/types/workflow_deployment_release_workflow_version.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #id ⇒ String readonly
- #input_variables ⇒ Array<Vellum::VellumVariable> readonly
- #output_variables ⇒ Array<Vellum::VellumVariable> readonly
Class Method Summary collapse
- .from_json(json_object:) ⇒ Vellum::WorkflowDeploymentReleaseWorkflowVersion
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(id:, input_variables:, output_variables:, additional_properties: nil) ⇒ Vellum::WorkflowDeploymentReleaseWorkflowVersion constructor
- #to_json ⇒ String
Constructor Details
#initialize(id:, input_variables:, output_variables:, additional_properties: nil) ⇒ Vellum::WorkflowDeploymentReleaseWorkflowVersion
27 28 29 30 31 32 33 |
# File 'lib/vellum_ai/types/workflow_deployment_release_workflow_version.rb', line 27 def initialize(id:, input_variables:, output_variables:, additional_properties: nil) @id = id @input_variables = input_variables @output_variables = output_variables @additional_properties = additional_properties @_field_set = { "id": id, "input_variables": input_variables, "output_variables": output_variables } end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
15 16 17 |
# File 'lib/vellum_ai/types/workflow_deployment_release_workflow_version.rb', line 15 def additional_properties @additional_properties end |
#id ⇒ String (readonly)
9 10 11 |
# File 'lib/vellum_ai/types/workflow_deployment_release_workflow_version.rb', line 9 def id @id end |
#input_variables ⇒ Array<Vellum::VellumVariable> (readonly)
11 12 13 |
# File 'lib/vellum_ai/types/workflow_deployment_release_workflow_version.rb', line 11 def input_variables @input_variables end |
#output_variables ⇒ Array<Vellum::VellumVariable> (readonly)
13 14 15 |
# File 'lib/vellum_ai/types/workflow_deployment_release_workflow_version.rb', line 13 def output_variables @output_variables end |
Class Method Details
.from_json(json_object:) ⇒ Vellum::WorkflowDeploymentReleaseWorkflowVersion
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/vellum_ai/types/workflow_deployment_release_workflow_version.rb', line 39 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) id = parsed_json["id"] input_variables = parsed_json["input_variables"]&.map do | item | item = item.to_json Vellum::VellumVariable.from_json(json_object: item) end output_variables = parsed_json["output_variables"]&.map do | item | item = item.to_json Vellum::VellumVariable.from_json(json_object: item) end new( id: id, input_variables: input_variables, output_variables: output_variables, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
71 72 73 74 75 |
# File 'lib/vellum_ai/types/workflow_deployment_release_workflow_version.rb', line 71 def self.validate_raw(obj:) obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.") obj.input_variables.is_a?(Array) != false || raise("Passed value for field obj.input_variables is not the expected type, validation failed.") obj.output_variables.is_a?(Array) != false || raise("Passed value for field obj.output_variables is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
62 63 64 |
# File 'lib/vellum_ai/types/workflow_deployment_release_workflow_version.rb', line 62 def to_json @_field_set&.to_json end |