carbon_ruby_sdk 0.2.6 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +155 -28
  4. data/lib/carbon_ruby_sdk/api/integrations_api.rb +261 -8
  5. data/lib/carbon_ruby_sdk/api/utilities_api.rb +196 -0
  6. data/lib/carbon_ruby_sdk/models/data_source_type.rb +2 -1
  7. data/lib/carbon_ruby_sdk/models/data_source_type_nullable.rb +2 -1
  8. data/lib/carbon_ruby_sdk/models/fetch_urls_request.rb +220 -0
  9. data/lib/carbon_ruby_sdk/models/file_formats.rb +2 -1
  10. data/lib/carbon_ruby_sdk/models/file_formats_nullable.rb +2 -1
  11. data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +2 -2
  12. data/lib/carbon_ruby_sdk/models/simple_o_auth_data_sources.rb +2 -1
  13. data/lib/carbon_ruby_sdk/models/slack_filters.rb +232 -0
  14. data/lib/carbon_ruby_sdk/models/slack_sync_request.rb +321 -0
  15. data/lib/carbon_ruby_sdk/models/sync_files_request.rb +1 -1
  16. data/lib/carbon_ruby_sdk/models/sync_options.rb +1 -1
  17. data/lib/carbon_ruby_sdk/models/user_file.rb +15 -1
  18. data/lib/carbon_ruby_sdk/models/user_web_page_order_by_types.rb +37 -0
  19. data/lib/carbon_ruby_sdk/models/user_web_pages_filters.rb +218 -0
  20. data/lib/carbon_ruby_sdk/models/user_web_pages_request.rb +246 -0
  21. data/lib/carbon_ruby_sdk/version.rb +1 -1
  22. data/lib/carbon_ruby_sdk.rb +6 -3
  23. data/spec/api/integrations_api_spec.rb +27 -0
  24. data/spec/api/utilities_api_spec.rb +22 -0
  25. data/spec/models/fetch_urls_request_spec.rb +28 -0
  26. data/spec/models/slack_filters_spec.rb +34 -0
  27. data/spec/models/slack_sync_request_spec.rb +82 -0
  28. data/spec/models/user_file_spec.rb +6 -0
  29. data/spec/models/user_web_page_order_by_types_spec.rb +22 -0
  30. data/spec/models/user_web_pages_filters_spec.rb +28 -0
  31. data/spec/models/user_web_pages_request_spec.rb +46 -0
  32. metadata +20 -5
  33. data/lib/carbon_ruby_sdk/api/health_api.rb +0 -92
  34. data/spec/api/health_api_spec.rb +0 -39
@@ -0,0 +1,232 @@
1
+ =begin
2
+ #Carbon
3
+
4
+ #Connect external data to LLMs, no matter the source.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'date'
10
+ require 'time'
11
+
12
+ module Carbon
13
+ class SlackFilters
14
+ # Conversation ID from slack, can be obtained from Carbon with slack conversations endpoint
15
+ attr_accessor :conversation_id
16
+
17
+ # Only messages after this date will be included in results. If not set, all messages will be included. Should be entered in YYYY/mm/dd format
18
+ attr_accessor :after
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'conversation_id' => :'conversation_id',
24
+ :'after' => :'after'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'conversation_id' => :'String',
37
+ :'after' => :'String'
38
+ }
39
+ end
40
+
41
+ # List of attributes with nullable: true
42
+ def self.openapi_nullable
43
+ Set.new([
44
+ :'after'
45
+ ])
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param [Hash] attributes Model attributes in the form of hash
50
+ def initialize(attributes = {})
51
+ if (!attributes.is_a?(Hash))
52
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::SlackFilters` initialize method"
53
+ end
54
+
55
+ # check to see if the attribute exists and convert string to symbol for hash key
56
+ attributes = attributes.each_with_object({}) { |(k, v), h|
57
+ if (!self.class.attribute_map.key?(k.to_sym))
58
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::SlackFilters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
59
+ end
60
+ h[k.to_sym] = v
61
+ }
62
+
63
+ if attributes.key?(:'conversation_id')
64
+ self.conversation_id = attributes[:'conversation_id']
65
+ end
66
+
67
+ if attributes.key?(:'after')
68
+ self.after = attributes[:'after']
69
+ end
70
+ end
71
+
72
+ # Show invalid properties with the reasons. Usually used together with valid?
73
+ # @return Array for valid properties with the reasons
74
+ def list_invalid_properties
75
+ invalid_properties = Array.new
76
+ if @conversation_id.nil?
77
+ invalid_properties.push('invalid value for "conversation_id", conversation_id cannot be nil.')
78
+ end
79
+
80
+ invalid_properties
81
+ end
82
+
83
+ # Check to see if the all the properties in the model are valid
84
+ # @return true if the model is valid
85
+ def valid?
86
+ return false if @conversation_id.nil?
87
+ true
88
+ end
89
+
90
+ # Checks equality by comparing each attribute.
91
+ # @param [Object] Object to be compared
92
+ def ==(o)
93
+ return true if self.equal?(o)
94
+ self.class == o.class &&
95
+ conversation_id == o.conversation_id &&
96
+ after == o.after
97
+ end
98
+
99
+ # @see the `==` method
100
+ # @param [Object] Object to be compared
101
+ def eql?(o)
102
+ self == o
103
+ end
104
+
105
+ # Calculates hash code according to all attributes.
106
+ # @return [Integer] Hash code
107
+ def hash
108
+ [conversation_id, after].hash
109
+ end
110
+
111
+ # Builds the object from hash
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ # @return [Object] Returns the model itself
114
+ def self.build_from_hash(attributes)
115
+ new.build_from_hash(attributes)
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def build_from_hash(attributes)
122
+ return nil unless attributes.is_a?(Hash)
123
+ attributes = attributes.transform_keys(&:to_sym)
124
+ self.class.openapi_types.each_pair do |key, type|
125
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
126
+ self.send("#{key}=", nil)
127
+ elsif type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
131
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
132
+ end
133
+ elsif !attributes[self.class.attribute_map[key]].nil?
134
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
135
+ end
136
+ end
137
+
138
+ self
139
+ end
140
+
141
+ # Deserializes the data based on type
142
+ # @param string type Data type
143
+ # @param string value Value to be deserialized
144
+ # @return [Object] Deserialized data
145
+ def _deserialize(type, value)
146
+ case type.to_sym
147
+ when :Time
148
+ Time.parse(value)
149
+ when :Date
150
+ Date.parse(value)
151
+ when :String
152
+ value.to_s
153
+ when :Integer
154
+ value.to_i
155
+ when :Float
156
+ value.to_f
157
+ when :Boolean
158
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
159
+ true
160
+ else
161
+ false
162
+ end
163
+ when :Object
164
+ # generic object (usually a Hash), return directly
165
+ value
166
+ when /\AArray<(?<inner_type>.+)>\z/
167
+ inner_type = Regexp.last_match[:inner_type]
168
+ value.map { |v| _deserialize(inner_type, v) }
169
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
170
+ k_type = Regexp.last_match[:k_type]
171
+ v_type = Regexp.last_match[:v_type]
172
+ {}.tap do |hash|
173
+ value.each do |k, v|
174
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
175
+ end
176
+ end
177
+ else # model
178
+ # models (e.g. Pet) or oneOf
179
+ klass = Carbon.const_get(type)
180
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
181
+ end
182
+ end
183
+
184
+ # Returns the string representation of the object
185
+ # @return [String] String presentation of the object
186
+ def to_s
187
+ to_hash.to_s
188
+ end
189
+
190
+ # to_body is an alias to to_hash (backward compatibility)
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_body
193
+ to_hash
194
+ end
195
+
196
+ # Returns the object in the form of hash
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_hash
199
+ hash = {}
200
+ self.class.attribute_map.each_pair do |attr, param|
201
+ value = self.send(attr)
202
+ if value.nil?
203
+ is_nullable = self.class.openapi_nullable.include?(attr)
204
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
205
+ end
206
+
207
+ hash[param] = _to_hash(value)
208
+ end
209
+ hash
210
+ end
211
+
212
+ # Outputs non-array value in the form of hash
213
+ # For object, use to_hash. Otherwise, just return the value
214
+ # @param [Object] value Any valid value
215
+ # @return [Hash] Returns the value in the form of hash
216
+ def _to_hash(value)
217
+ if value.is_a?(Array)
218
+ value.compact.map { |v| _to_hash(v) }
219
+ elsif value.is_a?(Hash)
220
+ {}.tap do |hash|
221
+ value.each { |k, v| hash[k] = _to_hash(v) }
222
+ end
223
+ elsif value.respond_to? :to_hash
224
+ value.to_hash
225
+ else
226
+ value
227
+ end
228
+ end
229
+
230
+ end
231
+
232
+ end
@@ -0,0 +1,321 @@
1
+ =begin
2
+ #Carbon
3
+
4
+ #Connect external data to LLMs, no matter the source.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'date'
10
+ require 'time'
11
+
12
+ module Carbon
13
+ class SlackSyncRequest
14
+ attr_accessor :tags
15
+
16
+ attr_accessor :filters
17
+
18
+ attr_accessor :chunk_size
19
+
20
+ attr_accessor :chunk_overlap
21
+
22
+ attr_accessor :skip_embedding_generation
23
+
24
+ attr_accessor :embedding_model
25
+
26
+ attr_accessor :generate_sparse_vectors
27
+
28
+ attr_accessor :prepend_filename_to_chunks
29
+
30
+ attr_accessor :data_source_id
31
+
32
+ attr_accessor :request_id
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'tags' => :'tags',
38
+ :'filters' => :'filters',
39
+ :'chunk_size' => :'chunk_size',
40
+ :'chunk_overlap' => :'chunk_overlap',
41
+ :'skip_embedding_generation' => :'skip_embedding_generation',
42
+ :'embedding_model' => :'embedding_model',
43
+ :'generate_sparse_vectors' => :'generate_sparse_vectors',
44
+ :'prepend_filename_to_chunks' => :'prepend_filename_to_chunks',
45
+ :'data_source_id' => :'data_source_id',
46
+ :'request_id' => :'request_id'
47
+ }
48
+ end
49
+
50
+ # Returns all the JSON keys this model knows about
51
+ def self.acceptable_attributes
52
+ attribute_map.values
53
+ end
54
+
55
+ # Attribute type mapping.
56
+ def self.openapi_types
57
+ {
58
+ :'tags' => :'Object',
59
+ :'filters' => :'SlackFilters',
60
+ :'chunk_size' => :'Integer',
61
+ :'chunk_overlap' => :'Integer',
62
+ :'skip_embedding_generation' => :'Boolean',
63
+ :'embedding_model' => :'EmbeddingGenerators',
64
+ :'generate_sparse_vectors' => :'Boolean',
65
+ :'prepend_filename_to_chunks' => :'Boolean',
66
+ :'data_source_id' => :'Integer',
67
+ :'request_id' => :'String'
68
+ }
69
+ end
70
+
71
+ # List of attributes with nullable: true
72
+ def self.openapi_nullable
73
+ Set.new([
74
+ :'tags',
75
+ :'chunk_size',
76
+ :'chunk_overlap',
77
+ :'skip_embedding_generation',
78
+ :'generate_sparse_vectors',
79
+ :'prepend_filename_to_chunks',
80
+ :'data_source_id',
81
+ :'request_id'
82
+ ])
83
+ end
84
+
85
+ # Initializes the object
86
+ # @param [Hash] attributes Model attributes in the form of hash
87
+ def initialize(attributes = {})
88
+ if (!attributes.is_a?(Hash))
89
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::SlackSyncRequest` initialize method"
90
+ end
91
+
92
+ # check to see if the attribute exists and convert string to symbol for hash key
93
+ attributes = attributes.each_with_object({}) { |(k, v), h|
94
+ if (!self.class.attribute_map.key?(k.to_sym))
95
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::SlackSyncRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
96
+ end
97
+ h[k.to_sym] = v
98
+ }
99
+
100
+ if attributes.key?(:'tags')
101
+ self.tags = attributes[:'tags']
102
+ end
103
+
104
+ if attributes.key?(:'filters')
105
+ self.filters = attributes[:'filters']
106
+ end
107
+
108
+ if attributes.key?(:'chunk_size')
109
+ self.chunk_size = attributes[:'chunk_size']
110
+ else
111
+ self.chunk_size = 1500
112
+ end
113
+
114
+ if attributes.key?(:'chunk_overlap')
115
+ self.chunk_overlap = attributes[:'chunk_overlap']
116
+ else
117
+ self.chunk_overlap = 20
118
+ end
119
+
120
+ if attributes.key?(:'skip_embedding_generation')
121
+ self.skip_embedding_generation = attributes[:'skip_embedding_generation']
122
+ else
123
+ self.skip_embedding_generation = false
124
+ end
125
+
126
+ if attributes.key?(:'embedding_model')
127
+ self.embedding_model = attributes[:'embedding_model']
128
+ else
129
+ self.embedding_model = 'OPENAI'
130
+ end
131
+
132
+ if attributes.key?(:'generate_sparse_vectors')
133
+ self.generate_sparse_vectors = attributes[:'generate_sparse_vectors']
134
+ else
135
+ self.generate_sparse_vectors = false
136
+ end
137
+
138
+ if attributes.key?(:'prepend_filename_to_chunks')
139
+ self.prepend_filename_to_chunks = attributes[:'prepend_filename_to_chunks']
140
+ else
141
+ self.prepend_filename_to_chunks = false
142
+ end
143
+
144
+ if attributes.key?(:'data_source_id')
145
+ self.data_source_id = attributes[:'data_source_id']
146
+ end
147
+
148
+ if attributes.key?(:'request_id')
149
+ self.request_id = attributes[:'request_id']
150
+ end
151
+ end
152
+
153
+ # Show invalid properties with the reasons. Usually used together with valid?
154
+ # @return Array for valid properties with the reasons
155
+ def list_invalid_properties
156
+ invalid_properties = Array.new
157
+ if @filters.nil?
158
+ invalid_properties.push('invalid value for "filters", filters cannot be nil.')
159
+ end
160
+
161
+ invalid_properties
162
+ end
163
+
164
+ # Check to see if the all the properties in the model are valid
165
+ # @return true if the model is valid
166
+ def valid?
167
+ return false if @filters.nil?
168
+ true
169
+ end
170
+
171
+ # Checks equality by comparing each attribute.
172
+ # @param [Object] Object to be compared
173
+ def ==(o)
174
+ return true if self.equal?(o)
175
+ self.class == o.class &&
176
+ tags == o.tags &&
177
+ filters == o.filters &&
178
+ chunk_size == o.chunk_size &&
179
+ chunk_overlap == o.chunk_overlap &&
180
+ skip_embedding_generation == o.skip_embedding_generation &&
181
+ embedding_model == o.embedding_model &&
182
+ generate_sparse_vectors == o.generate_sparse_vectors &&
183
+ prepend_filename_to_chunks == o.prepend_filename_to_chunks &&
184
+ data_source_id == o.data_source_id &&
185
+ request_id == o.request_id
186
+ end
187
+
188
+ # @see the `==` method
189
+ # @param [Object] Object to be compared
190
+ def eql?(o)
191
+ self == o
192
+ end
193
+
194
+ # Calculates hash code according to all attributes.
195
+ # @return [Integer] Hash code
196
+ def hash
197
+ [tags, filters, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, data_source_id, request_id].hash
198
+ end
199
+
200
+ # Builds the object from hash
201
+ # @param [Hash] attributes Model attributes in the form of hash
202
+ # @return [Object] Returns the model itself
203
+ def self.build_from_hash(attributes)
204
+ new.build_from_hash(attributes)
205
+ end
206
+
207
+ # Builds the object from hash
208
+ # @param [Hash] attributes Model attributes in the form of hash
209
+ # @return [Object] Returns the model itself
210
+ def build_from_hash(attributes)
211
+ return nil unless attributes.is_a?(Hash)
212
+ attributes = attributes.transform_keys(&:to_sym)
213
+ self.class.openapi_types.each_pair do |key, type|
214
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
215
+ self.send("#{key}=", nil)
216
+ elsif type =~ /\AArray<(.*)>/i
217
+ # check to ensure the input is an array given that the attribute
218
+ # is documented as an array but the input is not
219
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
220
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
221
+ end
222
+ elsif !attributes[self.class.attribute_map[key]].nil?
223
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
224
+ end
225
+ end
226
+
227
+ self
228
+ end
229
+
230
+ # Deserializes the data based on type
231
+ # @param string type Data type
232
+ # @param string value Value to be deserialized
233
+ # @return [Object] Deserialized data
234
+ def _deserialize(type, value)
235
+ case type.to_sym
236
+ when :Time
237
+ Time.parse(value)
238
+ when :Date
239
+ Date.parse(value)
240
+ when :String
241
+ value.to_s
242
+ when :Integer
243
+ value.to_i
244
+ when :Float
245
+ value.to_f
246
+ when :Boolean
247
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
248
+ true
249
+ else
250
+ false
251
+ end
252
+ when :Object
253
+ # generic object (usually a Hash), return directly
254
+ value
255
+ when /\AArray<(?<inner_type>.+)>\z/
256
+ inner_type = Regexp.last_match[:inner_type]
257
+ value.map { |v| _deserialize(inner_type, v) }
258
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
259
+ k_type = Regexp.last_match[:k_type]
260
+ v_type = Regexp.last_match[:v_type]
261
+ {}.tap do |hash|
262
+ value.each do |k, v|
263
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
264
+ end
265
+ end
266
+ else # model
267
+ # models (e.g. Pet) or oneOf
268
+ klass = Carbon.const_get(type)
269
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
270
+ end
271
+ end
272
+
273
+ # Returns the string representation of the object
274
+ # @return [String] String presentation of the object
275
+ def to_s
276
+ to_hash.to_s
277
+ end
278
+
279
+ # to_body is an alias to to_hash (backward compatibility)
280
+ # @return [Hash] Returns the object in the form of hash
281
+ def to_body
282
+ to_hash
283
+ end
284
+
285
+ # Returns the object in the form of hash
286
+ # @return [Hash] Returns the object in the form of hash
287
+ def to_hash
288
+ hash = {}
289
+ self.class.attribute_map.each_pair do |attr, param|
290
+ value = self.send(attr)
291
+ if value.nil?
292
+ is_nullable = self.class.openapi_nullable.include?(attr)
293
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
294
+ end
295
+
296
+ hash[param] = _to_hash(value)
297
+ end
298
+ hash
299
+ end
300
+
301
+ # Outputs non-array value in the form of hash
302
+ # For object, use to_hash. Otherwise, just return the value
303
+ # @param [Object] value Any valid value
304
+ # @return [Hash] Returns the value in the form of hash
305
+ def _to_hash(value)
306
+ if value.is_a?(Array)
307
+ value.compact.map { |v| _to_hash(v) }
308
+ elsif value.is_a?(Hash)
309
+ {}.tap do |hash|
310
+ value.each { |k, v| hash[k] = _to_hash(v) }
311
+ end
312
+ elsif value.respond_to? :to_hash
313
+ value.to_hash
314
+ else
315
+ value
316
+ end
317
+ end
318
+
319
+ end
320
+
321
+ end
@@ -187,7 +187,7 @@ module Carbon
187
187
  if attributes.key?(:'request_id')
188
188
  self.request_id = attributes[:'request_id']
189
189
  else
190
- self.request_id = '7233a302-6276-4747-af1f-9b1d1e1ed6f8'
190
+ self.request_id = '9e2d7dc0-7a78-49fa-9f68-a411cfa13267'
191
191
  end
192
192
 
193
193
  if attributes.key?(:'use_ocr')
@@ -182,7 +182,7 @@ module Carbon
182
182
  if attributes.key?(:'request_id')
183
183
  self.request_id = attributes[:'request_id']
184
184
  else
185
- self.request_id = '701c68d4-27fe-4bd5-8f73-100577f7eaa5'
185
+ self.request_id = '9e41dd01-0592-477a-97b3-df618acf082b'
186
186
  end
187
187
 
188
188
  if attributes.key?(:'enable_file_picker')
@@ -71,6 +71,8 @@ module Carbon
71
71
 
72
72
  attr_accessor :sync_properties
73
73
 
74
+ attr_accessor :messages_metadata
75
+
74
76
  attr_accessor :created_at
75
77
 
76
78
  attr_accessor :updated_at
@@ -108,6 +110,7 @@ module Carbon
108
110
  :'generate_sparse_vectors' => :'generate_sparse_vectors',
109
111
  :'request_id' => :'request_id',
110
112
  :'sync_properties' => :'sync_properties',
113
+ :'messages_metadata' => :'messages_metadata',
111
114
  :'created_at' => :'created_at',
112
115
  :'updated_at' => :'updated_at'
113
116
  }
@@ -151,6 +154,7 @@ module Carbon
151
154
  :'generate_sparse_vectors' => :'Boolean',
152
155
  :'request_id' => :'String',
153
156
  :'sync_properties' => :'Object',
157
+ :'messages_metadata' => :'Object',
154
158
  :'created_at' => :'Time',
155
159
  :'updated_at' => :'Time'
156
160
  }
@@ -320,6 +324,10 @@ module Carbon
320
324
  self.sync_properties = attributes[:'sync_properties']
321
325
  end
322
326
 
327
+ if attributes.key?(:'messages_metadata')
328
+ self.messages_metadata = attributes[:'messages_metadata']
329
+ end
330
+
323
331
  if attributes.key?(:'created_at')
324
332
  self.created_at = attributes[:'created_at']
325
333
  end
@@ -369,6 +377,10 @@ module Carbon
369
377
  invalid_properties.push('invalid value for "sync_properties", sync_properties cannot be nil.')
370
378
  end
371
379
 
380
+ if @messages_metadata.nil?
381
+ invalid_properties.push('invalid value for "messages_metadata", messages_metadata cannot be nil.')
382
+ end
383
+
372
384
  if @created_at.nil?
373
385
  invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
374
386
  end
@@ -392,6 +404,7 @@ module Carbon
392
404
  return false if @ocr_properties.nil?
393
405
  return false if @skip_embedding_generation.nil?
394
406
  return false if @sync_properties.nil?
407
+ return false if @messages_metadata.nil?
395
408
  return false if @created_at.nil?
396
409
  return false if @updated_at.nil?
397
410
  true
@@ -432,6 +445,7 @@ module Carbon
432
445
  generate_sparse_vectors == o.generate_sparse_vectors &&
433
446
  request_id == o.request_id &&
434
447
  sync_properties == o.sync_properties &&
448
+ messages_metadata == o.messages_metadata &&
435
449
  created_at == o.created_at &&
436
450
  updated_at == o.updated_at
437
451
  end
@@ -445,7 +459,7 @@ module Carbon
445
459
  # Calculates hash code according to all attributes.
446
460
  # @return [Integer] Hash code
447
461
  def hash
448
- [tags, id, source, organization_id, organization_supplied_user_id, organization_user_data_source_id, external_file_id, external_url, sync_status, sync_error_message, last_sync, file_statistics, file_metadata, embedding_properties, chunk_size, chunk_overlap, chunk_properties, ocr_properties, ocr_job_started_at, name, parent_id, enable_auto_sync, presigned_url, parsed_text_url, additional_presigned_urls, skip_embedding_generation, source_created_at, generate_sparse_vectors, request_id, sync_properties, created_at, updated_at].hash
462
+ [tags, id, source, organization_id, organization_supplied_user_id, organization_user_data_source_id, external_file_id, external_url, sync_status, sync_error_message, last_sync, file_statistics, file_metadata, embedding_properties, chunk_size, chunk_overlap, chunk_properties, ocr_properties, ocr_job_started_at, name, parent_id, enable_auto_sync, presigned_url, parsed_text_url, additional_presigned_urls, skip_embedding_generation, source_created_at, generate_sparse_vectors, request_id, sync_properties, messages_metadata, created_at, updated_at].hash
449
463
  end
450
464
 
451
465
  # Builds the object from hash
@@ -0,0 +1,37 @@
1
+ =begin
2
+ #Carbon
3
+
4
+ #Connect external data to LLMs, no matter the source.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'date'
10
+ require 'time'
11
+
12
+ module Carbon
13
+ class UserWebPageOrderByTypes
14
+ CREATED_AT = "created_at".freeze
15
+ UPDATED_AT = "updated_at".freeze
16
+ ID = "id".freeze
17
+
18
+ def self.all_vars
19
+ @all_vars ||= [CREATED_AT, UPDATED_AT, ID].freeze
20
+ end
21
+
22
+ # Builds the enum from string
23
+ # @param [String] The enum value in the form of the string
24
+ # @return [String] The enum value
25
+ def self.build_from_hash(value)
26
+ new.build_from_hash(value)
27
+ end
28
+
29
+ # Builds the enum from string
30
+ # @param [String] The enum value in the form of the string
31
+ # @return [String] The enum value
32
+ def build_from_hash(value)
33
+ return value if UserWebPageOrderByTypes.all_vars.include?(value)
34
+ raise "Invalid ENUM value #{value} for class #UserWebPageOrderByTypes"
35
+ end
36
+ end
37
+ end