Class: Vellum::FolderEntityWorkflowSandboxData

Inherits:
Object
  • Object
show all
Defined in:
lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, label:, created:, modified:, status:, description: OMIT, last_deployed_on: OMIT, additional_properties: nil) ⇒ Vellum::FolderEntityWorkflowSandboxData

Parameters:

  • id (String)
  • label (String)
  • created (DateTime)
  • modified (DateTime)
  • status (Vellum::EntityStatus)
  • description (String) (defaults to: OMIT)
  • last_deployed_on (DateTime) (defaults to: OMIT)
  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 42

def initialize(id:, label:, created:, modified:, status:, description: OMIT, last_deployed_on: 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
  @additional_properties = additional_properties
  @_field_set = { "id": id, "label": label, "created": created, "modified": modified, "status": status, "description": description, "last_deployed_on": last_deployed_on }.reject do | _k, v |
  v == OMIT
end
end

Instance Attribute Details

#additional_propertiesOpenStruct (readonly)

Returns Additional properties unmapped to the current class definition.

Returns:

  • (OpenStruct)

    Additional properties unmapped to the current class definition



26
27
28
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 26

def additional_properties
  @additional_properties
end

#createdDateTime (readonly)

Returns:

  • (DateTime)


16
17
18
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 16

def created
  @created
end

#descriptionString (readonly)

Returns:

  • (String)


22
23
24
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 22

def description
  @description
end

#idString (readonly)

Returns:

  • (String)


12
13
14
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 12

def id
  @id
end

#labelString (readonly)

Returns:

  • (String)


14
15
16
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 14

def label
  @label
end

#last_deployed_onDateTime (readonly)

Returns:

  • (DateTime)


24
25
26
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 24

def last_deployed_on
  @last_deployed_on
end

#modifiedDateTime (readonly)

Returns:

  • (DateTime)


18
19
20
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 18

def modified
  @modified
end

#statusVellum::EntityStatus (readonly)



20
21
22
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 20

def status
  @status
end

Class Method Details

.from_json(json_object:) ⇒ Vellum::FolderEntityWorkflowSandboxData

Parameters:

  • json_object (String)

Returns:



59
60
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
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 59

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
  new(
    id: id,
    label: label,
    created: created,
    modified: modified,
    status: status,
    description: description,
    last_deployed_on: last_deployed_on,
    additional_properties: struct
  )
end

.validate_raw(obj:) ⇒ Void

Parameters:

  • obj (Object)

Returns:

  • (Void)


104
105
106
107
108
109
110
111
112
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 104

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.")
end

Instance Method Details

#to_jsonString

Returns:

  • (String)


95
96
97
# File 'lib/vellum_ai/types/folder_entity_workflow_sandbox_data.rb', line 95

def to_json
  @_field_set&.to_json
end