Class: Vellum::FolderEntityDatasetData
- Inherits:
-
Object
- Object
- Vellum::FolderEntityDatasetData
- Defined in:
- lib/vellum_ai/types/folder_entity_dataset_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
- #id ⇒ String readonly
- #label ⇒ String readonly
- #modified ⇒ DateTime readonly
- #name ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(id:, label:, name:, description: OMIT, created:, modified:, additional_properties: nil) ⇒ Vellum::FolderEntityDatasetData constructor
- #to_json ⇒ String
Constructor Details
#initialize(id:, label:, name:, description: OMIT, created:, modified:, additional_properties: nil) ⇒ Vellum::FolderEntityDatasetData
37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/vellum_ai/types/folder_entity_dataset_data.rb', line 37 def initialize(id:, label:, name:, description: OMIT, created:, modified:, additional_properties: nil) @id = id @label = label @name = name @description = description if description != OMIT @created = created @modified = modified @additional_properties = additional_properties @_field_set = { "id": id, "label": label, "name": name, "description": description, "created": created, "modified": modified }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
22 23 24 |
# File 'lib/vellum_ai/types/folder_entity_dataset_data.rb', line 22 def additional_properties @additional_properties end |
#created ⇒ DateTime (readonly)
18 19 20 |
# File 'lib/vellum_ai/types/folder_entity_dataset_data.rb', line 18 def created @created end |
#description ⇒ String (readonly)
16 17 18 |
# File 'lib/vellum_ai/types/folder_entity_dataset_data.rb', line 16 def description @description end |
#id ⇒ String (readonly)
10 11 12 |
# File 'lib/vellum_ai/types/folder_entity_dataset_data.rb', line 10 def id @id end |
#label ⇒ String (readonly)
12 13 14 |
# File 'lib/vellum_ai/types/folder_entity_dataset_data.rb', line 12 def label @label end |
#modified ⇒ DateTime (readonly)
20 21 22 |
# File 'lib/vellum_ai/types/folder_entity_dataset_data.rb', line 20 def modified @modified end |
#name ⇒ String (readonly)
14 15 16 |
# File 'lib/vellum_ai/types/folder_entity_dataset_data.rb', line 14 def name @name end |
Class Method Details
.from_json(json_object:) ⇒ Vellum::FolderEntityDatasetData
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/vellum_ai/types/folder_entity_dataset_data.rb', line 53 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"] name = parsed_json["name"] description = parsed_json["description"] 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 new( id: id, label: label, name: name, description: description, created: created, modified: modified, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
92 93 94 95 96 97 98 99 |
# File 'lib/vellum_ai/types/folder_entity_dataset_data.rb', line 92 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.name.is_a?(String) != false || raise("Passed value for field obj.name 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.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.") end |
Instance Method Details
#to_json ⇒ String
83 84 85 |
# File 'lib/vellum_ai/types/folder_entity_dataset_data.rb', line 83 def to_json @_field_set&.to_json end |