Class: Vellum::FolderEntityWorkflowSandboxData
- Inherits:
-
Object
- Object
- Vellum::FolderEntityWorkflowSandboxData
- Defined in:
- lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #created ⇒ DateTime readonly
- #description ⇒ String readonly
- #display_data ⇒ Vellum::WorkflowSandboxDisplayData readonly
- #id ⇒ String readonly
- #label ⇒ String readonly
- #last_deployed_on ⇒ DateTime readonly
- #modified ⇒ DateTime readonly
- #status ⇒ Vellum::EntityStatus readonly
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(id:, label:, created:, modified:, status:, description: OMIT, last_deployed_on: OMIT, display_data: OMIT, additional_properties: nil) ⇒ Vellum::FolderEntityWorkflowSandboxData constructor
- #to_json ⇒ String
Constructor Details
#initialize(id:, label:, created:, modified:, status:, description: OMIT, last_deployed_on: OMIT, display_data: OMIT, additional_properties: nil) ⇒ Vellum::FolderEntityWorkflowSandboxData
46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 46 def initialize(id:, label:, created:, modified:, status:, description: OMIT, last_deployed_on: OMIT, display_data: OMIT, additional_properties: nil) @id = id @label = label @created = created @modified = modified @status = status @description = description if description != OMIT @last_deployed_on = last_deployed_on if last_deployed_on != OMIT @display_data = display_data if display_data != OMIT @additional_properties = additional_properties @_field_set = { "id": id, "label": label, "created": created, "modified": modified, "status": status, "description": description, "last_deployed_on": last_deployed_on, "display_data": display_data }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
29 30 31 |
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 29 def additional_properties @additional_properties end |
#created ⇒ DateTime (readonly)
17 18 19 |
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 17 def created @created end |
#description ⇒ String (readonly)
23 24 25 |
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 23 def description @description end |
#display_data ⇒ Vellum::WorkflowSandboxDisplayData (readonly)
27 28 29 |
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 27 def display_data @display_data end |
#id ⇒ String (readonly)
13 14 15 |
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 13 def id @id end |
#label ⇒ String (readonly)
15 16 17 |
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 15 def label @label end |
#last_deployed_on ⇒ DateTime (readonly)
25 26 27 |
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 25 def last_deployed_on @last_deployed_on end |
#modified ⇒ DateTime (readonly)
19 20 21 |
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 19 def modified @modified end |
#status ⇒ Vellum::EntityStatus (readonly)
21 22 23 |
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 21 def status @status end |
Class Method Details
.from_json(json_object:) ⇒ Vellum::FolderEntityWorkflowSandboxData
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 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 64 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) id = parsed_json["id"] label = parsed_json["label"] created = unless parsed_json["created"].nil? DateTime.parse(parsed_json["created"]) else nil end modified = unless parsed_json["modified"].nil? DateTime.parse(parsed_json["modified"]) else nil end status = parsed_json["status"] description = parsed_json["description"] last_deployed_on = unless parsed_json["last_deployed_on"].nil? DateTime.parse(parsed_json["last_deployed_on"]) else nil end unless parsed_json["display_data"].nil? display_data = parsed_json["display_data"].to_json display_data = Vellum::WorkflowSandboxDisplayData.from_json(json_object: display_data) else display_data = nil end new( id: id, label: label, created: created, modified: modified, status: status, description: description, last_deployed_on: last_deployed_on, display_data: display_data, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
116 117 118 119 120 121 122 123 124 125 |
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 116 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.label.is_a?(String) != false || raise("Passed value for field obj.label is not the expected type, validation failed.") obj.created.is_a?(DateTime) != false || raise("Passed value for field obj.created is not the expected type, validation failed.") obj.modified.is_a?(DateTime) != false || raise("Passed value for field obj.modified is not the expected type, validation failed.") obj.status.is_a?(Vellum::EntityStatus) != false || raise("Passed value for field obj.status 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.") obj.last_deployed_on&.is_a?(DateTime) != false || raise("Passed value for field obj.last_deployed_on is not the expected type, validation failed.") obj.display_data.nil? || Vellum::WorkflowSandboxDisplayData.validate_raw(obj: obj.display_data) end |
Instance Method Details
#to_json ⇒ String
107 108 109 |
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 107 def to_json @_field_set&.to_json end |