Class: Vellum::WorkflowDeploymentHistoryItem
- Inherits:
-
Object
- Object
- Vellum::WorkflowDeploymentHistoryItem
- Defined in:
- lib/vellum_ai/types/workflow_deployment_history_item.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#description ⇒ String
readonly
A human-readable description of the workflow deployment.
- #id ⇒ String readonly
- #input_variables ⇒ Array<Vellum::VellumVariable> readonly
-
#label ⇒ String
readonly
A human-readable label for the workflow deployment.
-
#name ⇒ String
readonly
A name that uniquely identifies this workflow deployment within its workspace.
- #output_variables ⇒ Array<Vellum::VellumVariable> readonly
- #timestamp ⇒ DateTime readonly
- #workflow_deployment_id ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(id:, workflow_deployment_id:, timestamp:, label:, name:, input_variables:, output_variables:, description: OMIT, additional_properties: nil) ⇒ Vellum::WorkflowDeploymentHistoryItem constructor
- #to_json ⇒ String
Constructor Details
#initialize(id:, workflow_deployment_id:, timestamp:, label:, name:, input_variables:, output_variables:, description: OMIT, additional_properties: nil) ⇒ Vellum::WorkflowDeploymentHistoryItem
43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/vellum_ai/types/workflow_deployment_history_item.rb', line 43 def initialize(id:, workflow_deployment_id:, timestamp:, label:, name:, input_variables:, output_variables:, description: OMIT, additional_properties: nil) @id = id @workflow_deployment_id = workflow_deployment_id @timestamp = @label = label @name = name @input_variables = input_variables @output_variables = output_variables @description = description if description != OMIT @additional_properties = additional_properties @_field_set = { "id": id, "workflow_deployment_id": workflow_deployment_id, "timestamp": , "label": label, "name": name, "input_variables": input_variables, "output_variables": output_variables, "description": description }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
26 27 28 |
# File 'lib/vellum_ai/types/workflow_deployment_history_item.rb', line 26 def additional_properties @additional_properties end |
#description ⇒ String (readonly)
Returns A human-readable description of the workflow deployment.
24 25 26 |
# File 'lib/vellum_ai/types/workflow_deployment_history_item.rb', line 24 def description @description end |
#id ⇒ String (readonly)
10 11 12 |
# File 'lib/vellum_ai/types/workflow_deployment_history_item.rb', line 10 def id @id end |
#input_variables ⇒ Array<Vellum::VellumVariable> (readonly)
20 21 22 |
# File 'lib/vellum_ai/types/workflow_deployment_history_item.rb', line 20 def input_variables @input_variables end |
#label ⇒ String (readonly)
Returns A human-readable label for the workflow deployment.
16 17 18 |
# File 'lib/vellum_ai/types/workflow_deployment_history_item.rb', line 16 def label @label end |
#name ⇒ String (readonly)
Returns A name that uniquely identifies this workflow deployment within its workspace.
18 19 20 |
# File 'lib/vellum_ai/types/workflow_deployment_history_item.rb', line 18 def name @name end |
#output_variables ⇒ Array<Vellum::VellumVariable> (readonly)
22 23 24 |
# File 'lib/vellum_ai/types/workflow_deployment_history_item.rb', line 22 def output_variables @output_variables end |
#timestamp ⇒ DateTime (readonly)
14 15 16 |
# File 'lib/vellum_ai/types/workflow_deployment_history_item.rb', line 14 def @timestamp end |
#workflow_deployment_id ⇒ String (readonly)
12 13 14 |
# File 'lib/vellum_ai/types/workflow_deployment_history_item.rb', line 12 def workflow_deployment_id @workflow_deployment_id end |
Class Method Details
.from_json(json_object:) ⇒ Vellum::WorkflowDeploymentHistoryItem
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/vellum_ai/types/workflow_deployment_history_item.rb', line 61 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) id = parsed_json["id"] workflow_deployment_id = parsed_json["workflow_deployment_id"] = unless parsed_json["timestamp"].nil? DateTime.parse(parsed_json["timestamp"]) else nil end label = parsed_json["label"] name = parsed_json["name"] 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 description = parsed_json["description"] new( id: id, workflow_deployment_id: workflow_deployment_id, timestamp: , label: label, name: name, input_variables: input_variables, output_variables: output_variables, description: description, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
106 107 108 109 110 111 112 113 114 115 |
# File 'lib/vellum_ai/types/workflow_deployment_history_item.rb', line 106 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.workflow_deployment_id.is_a?(String) != false || raise("Passed value for field obj.workflow_deployment_id is not the expected type, validation failed.") obj..is_a?(DateTime) != false || raise("Passed value for field obj.timestamp is not the expected type, validation failed.") obj.label.is_a?(String) != false || raise("Passed value for field obj.label is not the expected type, validation failed.") obj.name.is_a?(String) != false || raise("Passed value for field obj.name 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.") obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
97 98 99 |
# File 'lib/vellum_ai/types/workflow_deployment_history_item.rb', line 97 def to_json @_field_set&.to_json end |