Class: Vellum::WorkflowPushResponse
- Inherits:
-
Object
- Object
- Vellum::WorkflowPushResponse
- Defined in:
- lib/vellum_ai/types/workflow_push_response.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #proposed_diffs ⇒ Hash{String => Object} readonly
- #workflow_deployment_id ⇒ String readonly
- #workflow_sandbox_id ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(workflow_sandbox_id:, workflow_deployment_id: OMIT, proposed_diffs: OMIT, additional_properties: nil) ⇒ Vellum::WorkflowPushResponse constructor
- #to_json ⇒ String
Constructor Details
#initialize(workflow_sandbox_id:, workflow_deployment_id: OMIT, proposed_diffs: OMIT, additional_properties: nil) ⇒ Vellum::WorkflowPushResponse
26 27 28 29 30 31 32 33 34 |
# File 'lib/vellum_ai/types/workflow_push_response.rb', line 26 def initialize(workflow_sandbox_id:, workflow_deployment_id: OMIT, proposed_diffs: OMIT, additional_properties: nil) @workflow_sandbox_id = workflow_sandbox_id @workflow_deployment_id = workflow_deployment_id if workflow_deployment_id != OMIT @proposed_diffs = proposed_diffs if proposed_diffs != OMIT @additional_properties = additional_properties @_field_set = { "workflow_sandbox_id": workflow_sandbox_id, "workflow_deployment_id": workflow_deployment_id, "proposed_diffs": proposed_diffs }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
14 15 16 |
# File 'lib/vellum_ai/types/workflow_push_response.rb', line 14 def additional_properties @additional_properties end |
#proposed_diffs ⇒ Hash{String => Object} (readonly)
12 13 14 |
# File 'lib/vellum_ai/types/workflow_push_response.rb', line 12 def proposed_diffs @proposed_diffs end |
#workflow_deployment_id ⇒ String (readonly)
10 11 12 |
# File 'lib/vellum_ai/types/workflow_push_response.rb', line 10 def workflow_deployment_id @workflow_deployment_id end |
#workflow_sandbox_id ⇒ String (readonly)
8 9 10 |
# File 'lib/vellum_ai/types/workflow_push_response.rb', line 8 def workflow_sandbox_id @workflow_sandbox_id end |
Class Method Details
.from_json(json_object:) ⇒ Vellum::WorkflowPushResponse
39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/vellum_ai/types/workflow_push_response.rb', line 39 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) workflow_sandbox_id = parsed_json["workflow_sandbox_id"] workflow_deployment_id = parsed_json["workflow_deployment_id"] proposed_diffs = parsed_json["proposed_diffs"] new( workflow_sandbox_id: workflow_sandbox_id, workflow_deployment_id: workflow_deployment_id, proposed_diffs: proposed_diffs, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
64 65 66 67 68 |
# File 'lib/vellum_ai/types/workflow_push_response.rb', line 64 def self.validate_raw(obj:) obj.workflow_sandbox_id.is_a?(String) != false || raise("Passed value for field obj.workflow_sandbox_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.proposed_diffs&.is_a?(Hash) != false || raise("Passed value for field obj.proposed_diffs is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
55 56 57 |
# File 'lib/vellum_ai/types/workflow_push_response.rb', line 55 def to_json @_field_set&.to_json end |