Class: Vellum::WorkflowDeploymentEventExecutionsResponse
- Inherits:
-
Object
- Object
- Vellum::WorkflowDeploymentEventExecutionsResponse
- Defined in:
- lib/vellum_ai/types/workflow_deployment_event_executions_response.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #count ⇒ Integer readonly
- #results ⇒ Array<Vellum::SlimWorkflowExecutionRead> readonly
Class Method Summary collapse
- .from_json(json_object:) ⇒ Vellum::WorkflowDeploymentEventExecutionsResponse
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(count:, results:, additional_properties: nil) ⇒ Vellum::WorkflowDeploymentEventExecutionsResponse constructor
- #to_json ⇒ String
Constructor Details
#initialize(count:, results:, additional_properties: nil) ⇒ Vellum::WorkflowDeploymentEventExecutionsResponse
24 25 26 27 28 29 |
# File 'lib/vellum_ai/types/workflow_deployment_event_executions_response.rb', line 24 def initialize(count:, results:, additional_properties: nil) @count = count @results = results @additional_properties = additional_properties @_field_set = { "count": count, "results": results } end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
13 14 15 |
# File 'lib/vellum_ai/types/workflow_deployment_event_executions_response.rb', line 13 def additional_properties @additional_properties end |
#count ⇒ Integer (readonly)
9 10 11 |
# File 'lib/vellum_ai/types/workflow_deployment_event_executions_response.rb', line 9 def count @count end |
#results ⇒ Array<Vellum::SlimWorkflowExecutionRead> (readonly)
11 12 13 |
# File 'lib/vellum_ai/types/workflow_deployment_event_executions_response.rb', line 11 def results @results end |
Class Method Details
.from_json(json_object:) ⇒ Vellum::WorkflowDeploymentEventExecutionsResponse
35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/vellum_ai/types/workflow_deployment_event_executions_response.rb', line 35 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) count = parsed_json["count"] results = parsed_json["results"]&.map do | item | item = item.to_json Vellum::SlimWorkflowExecutionRead.from_json(json_object: item) end new( count: count, results: results, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
62 63 64 65 |
# File 'lib/vellum_ai/types/workflow_deployment_event_executions_response.rb', line 62 def self.validate_raw(obj:) obj.count.is_a?(Integer) != false || raise("Passed value for field obj.count is not the expected type, validation failed.") obj.results.is_a?(Array) != false || raise("Passed value for field obj.results is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
53 54 55 |
# File 'lib/vellum_ai/types/workflow_deployment_event_executions_response.rb', line 53 def to_json @_field_set&.to_json end |