Class: Carbon::UserFile
- Inherits:
-
Object
- Object
- Carbon::UserFile
- Defined in:
- lib/carbon_ruby_sdk/models/user_file.rb
Instance Attribute Summary collapse
-
#additional_presigned_urls ⇒ Object
Returns the value of attribute additional_presigned_urls.
-
#chunk_overlap ⇒ Object
Returns the value of attribute chunk_overlap.
-
#chunk_properties ⇒ Object
Returns the value of attribute chunk_properties.
-
#chunk_size ⇒ Object
Returns the value of attribute chunk_size.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#embedding_properties ⇒ Object
Returns the value of attribute embedding_properties.
-
#embedding_storage_status ⇒ Object
Returns the value of attribute embedding_storage_status.
-
#enable_auto_sync ⇒ Object
Returns the value of attribute enable_auto_sync.
-
#external_file_id ⇒ Object
Returns the value of attribute external_file_id.
-
#external_url ⇒ Object
Returns the value of attribute external_url.
-
#file_contents_deleted ⇒ Object
Returns the value of attribute file_contents_deleted.
-
#file_metadata ⇒ Object
Returns the value of attribute file_metadata.
-
#file_statistics ⇒ Object
Returns the value of attribute file_statistics.
-
#generate_sparse_vectors ⇒ Object
Returns the value of attribute generate_sparse_vectors.
-
#hot_storage_time_to_live ⇒ Object
Returns the value of attribute hot_storage_time_to_live.
-
#id ⇒ Object
Returns the value of attribute id.
-
#last_sync ⇒ Object
Returns the value of attribute last_sync.
-
#messages_metadata ⇒ Object
Returns the value of attribute messages_metadata.
-
#name ⇒ Object
Returns the value of attribute name.
-
#ocr_job_started_at ⇒ Object
Returns the value of attribute ocr_job_started_at.
-
#ocr_properties ⇒ Object
Returns the value of attribute ocr_properties.
-
#organization_id ⇒ Object
Returns the value of attribute organization_id.
-
#organization_supplied_user_id ⇒ Object
Returns the value of attribute organization_supplied_user_id.
-
#organization_user_data_source_id ⇒ Object
Returns the value of attribute organization_user_data_source_id.
-
#organization_user_id ⇒ Object
Returns the value of attribute organization_user_id.
-
#parent_id ⇒ Object
Returns the value of attribute parent_id.
-
#parsed_text_url ⇒ Object
Returns the value of attribute parsed_text_url.
-
#presigned_url ⇒ Object
Returns the value of attribute presigned_url.
-
#request_id ⇒ Object
Returns the value of attribute request_id.
-
#skip_embedding_generation ⇒ Object
Returns the value of attribute skip_embedding_generation.
-
#source ⇒ Object
Returns the value of attribute source.
-
#source_created_at ⇒ Object
Returns the value of attribute source_created_at.
-
#supports_cold_storage ⇒ Object
Returns the value of attribute supports_cold_storage.
-
#sync_error_message ⇒ Object
Returns the value of attribute sync_error_message.
-
#sync_properties ⇒ Object
Returns the value of attribute sync_properties.
-
#sync_status ⇒ Object
Returns the value of attribute sync_status.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#upload_id ⇒ Object
Returns the value of attribute upload_id.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ UserFile
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ UserFile
Initializes the object
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 219 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::UserFile` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::UserFile`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'tags') self. = attributes[:'tags'] end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'source') self.source = attributes[:'source'] end if attributes.key?(:'organization_id') self.organization_id = attributes[:'organization_id'] end if attributes.key?(:'organization_user_id') self.organization_user_id = attributes[:'organization_user_id'] end if attributes.key?(:'organization_supplied_user_id') self.organization_supplied_user_id = attributes[:'organization_supplied_user_id'] end if attributes.key?(:'organization_user_data_source_id') self.organization_user_data_source_id = attributes[:'organization_user_data_source_id'] end if attributes.key?(:'external_file_id') self.external_file_id = attributes[:'external_file_id'] end if attributes.key?(:'external_url') self.external_url = attributes[:'external_url'] end if attributes.key?(:'sync_status') self.sync_status = attributes[:'sync_status'] end if attributes.key?(:'sync_error_message') self. = attributes[:'sync_error_message'] end if attributes.key?(:'last_sync') self.last_sync = attributes[:'last_sync'] end if attributes.key?(:'file_statistics') self.file_statistics = attributes[:'file_statistics'] end if attributes.key?(:'file_metadata') self. = attributes[:'file_metadata'] end if attributes.key?(:'embedding_properties') if (value = attributes[:'embedding_properties']).is_a?(Hash) self. = value end end if attributes.key?(:'chunk_size') self.chunk_size = attributes[:'chunk_size'] end if attributes.key?(:'chunk_overlap') self.chunk_overlap = attributes[:'chunk_overlap'] end if attributes.key?(:'chunk_properties') self.chunk_properties = attributes[:'chunk_properties'] end if attributes.key?(:'ocr_properties') self.ocr_properties = attributes[:'ocr_properties'] end if attributes.key?(:'ocr_job_started_at') self.ocr_job_started_at = attributes[:'ocr_job_started_at'] end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'parent_id') self.parent_id = attributes[:'parent_id'] end if attributes.key?(:'enable_auto_sync') self.enable_auto_sync = attributes[:'enable_auto_sync'] end if attributes.key?(:'presigned_url') self.presigned_url = attributes[:'presigned_url'] end if attributes.key?(:'parsed_text_url') self.parsed_text_url = attributes[:'parsed_text_url'] end if attributes.key?(:'additional_presigned_urls') self.additional_presigned_urls = attributes[:'additional_presigned_urls'] end if attributes.key?(:'skip_embedding_generation') self. = attributes[:'skip_embedding_generation'] end if attributes.key?(:'source_created_at') self.source_created_at = attributes[:'source_created_at'] end if attributes.key?(:'generate_sparse_vectors') self.generate_sparse_vectors = attributes[:'generate_sparse_vectors'] end if attributes.key?(:'request_id') self.request_id = attributes[:'request_id'] end if attributes.key?(:'upload_id') self.upload_id = attributes[:'upload_id'] end if attributes.key?(:'sync_properties') self.sync_properties = attributes[:'sync_properties'] end if attributes.key?(:'messages_metadata') self. = attributes[:'messages_metadata'] end if attributes.key?(:'file_contents_deleted') self.file_contents_deleted = attributes[:'file_contents_deleted'] else self.file_contents_deleted = false end if attributes.key?(:'supports_cold_storage') self.supports_cold_storage = attributes[:'supports_cold_storage'] end if attributes.key?(:'hot_storage_time_to_live') self.hot_storage_time_to_live = attributes[:'hot_storage_time_to_live'] end if attributes.key?(:'embedding_storage_status') self. = attributes[:'embedding_storage_status'] end if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] end end |
Instance Attribute Details
#additional_presigned_urls ⇒ Object
Returns the value of attribute additional_presigned_urls.
64 65 66 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 64 def additional_presigned_urls @additional_presigned_urls end |
#chunk_overlap ⇒ Object
Returns the value of attribute chunk_overlap.
46 47 48 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 46 def chunk_overlap @chunk_overlap end |
#chunk_properties ⇒ Object
Returns the value of attribute chunk_properties.
48 49 50 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 48 def chunk_properties @chunk_properties end |
#chunk_size ⇒ Object
Returns the value of attribute chunk_size.
44 45 46 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 44 def chunk_size @chunk_size end |
#created_at ⇒ Object
Returns the value of attribute created_at.
88 89 90 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 88 def created_at @created_at end |
#embedding_properties ⇒ Object
Returns the value of attribute embedding_properties.
42 43 44 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 42 def @embedding_properties end |
#embedding_storage_status ⇒ Object
Returns the value of attribute embedding_storage_status.
86 87 88 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 86 def @embedding_storage_status end |
#enable_auto_sync ⇒ Object
Returns the value of attribute enable_auto_sync.
58 59 60 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 58 def enable_auto_sync @enable_auto_sync end |
#external_file_id ⇒ Object
Returns the value of attribute external_file_id.
28 29 30 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 28 def external_file_id @external_file_id end |
#external_url ⇒ Object
Returns the value of attribute external_url.
30 31 32 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 30 def external_url @external_url end |
#file_contents_deleted ⇒ Object
Returns the value of attribute file_contents_deleted.
80 81 82 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 80 def file_contents_deleted @file_contents_deleted end |
#file_metadata ⇒ Object
Returns the value of attribute file_metadata.
40 41 42 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 40 def @file_metadata end |
#file_statistics ⇒ Object
Returns the value of attribute file_statistics.
38 39 40 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 38 def file_statistics @file_statistics end |
#generate_sparse_vectors ⇒ Object
Returns the value of attribute generate_sparse_vectors.
70 71 72 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 70 def generate_sparse_vectors @generate_sparse_vectors end |
#hot_storage_time_to_live ⇒ Object
Returns the value of attribute hot_storage_time_to_live.
84 85 86 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 84 def hot_storage_time_to_live @hot_storage_time_to_live end |
#id ⇒ Object
Returns the value of attribute id.
16 17 18 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 16 def id @id end |
#last_sync ⇒ Object
Returns the value of attribute last_sync.
36 37 38 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 36 def last_sync @last_sync end |
#messages_metadata ⇒ Object
Returns the value of attribute messages_metadata.
78 79 80 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 78 def @messages_metadata end |
#name ⇒ Object
Returns the value of attribute name.
54 55 56 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 54 def name @name end |
#ocr_job_started_at ⇒ Object
Returns the value of attribute ocr_job_started_at.
52 53 54 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 52 def ocr_job_started_at @ocr_job_started_at end |
#ocr_properties ⇒ Object
Returns the value of attribute ocr_properties.
50 51 52 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 50 def ocr_properties @ocr_properties end |
#organization_id ⇒ Object
Returns the value of attribute organization_id.
20 21 22 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 20 def organization_id @organization_id end |
#organization_supplied_user_id ⇒ Object
Returns the value of attribute organization_supplied_user_id.
24 25 26 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 24 def organization_supplied_user_id @organization_supplied_user_id end |
#organization_user_data_source_id ⇒ Object
Returns the value of attribute organization_user_data_source_id.
26 27 28 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 26 def organization_user_data_source_id @organization_user_data_source_id end |
#organization_user_id ⇒ Object
Returns the value of attribute organization_user_id.
22 23 24 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 22 def organization_user_id @organization_user_id end |
#parent_id ⇒ Object
Returns the value of attribute parent_id.
56 57 58 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 56 def parent_id @parent_id end |
#parsed_text_url ⇒ Object
Returns the value of attribute parsed_text_url.
62 63 64 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 62 def parsed_text_url @parsed_text_url end |
#presigned_url ⇒ Object
Returns the value of attribute presigned_url.
60 61 62 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 60 def presigned_url @presigned_url end |
#request_id ⇒ Object
Returns the value of attribute request_id.
72 73 74 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 72 def request_id @request_id end |
#skip_embedding_generation ⇒ Object
Returns the value of attribute skip_embedding_generation.
66 67 68 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 66 def @skip_embedding_generation end |
#source ⇒ Object
Returns the value of attribute source.
18 19 20 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 18 def source @source end |
#source_created_at ⇒ Object
Returns the value of attribute source_created_at.
68 69 70 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 68 def source_created_at @source_created_at end |
#supports_cold_storage ⇒ Object
Returns the value of attribute supports_cold_storage.
82 83 84 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 82 def supports_cold_storage @supports_cold_storage end |
#sync_error_message ⇒ Object
Returns the value of attribute sync_error_message.
34 35 36 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 34 def @sync_error_message end |
#sync_properties ⇒ Object
Returns the value of attribute sync_properties.
76 77 78 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 76 def sync_properties @sync_properties end |
#sync_status ⇒ Object
Returns the value of attribute sync_status.
32 33 34 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 32 def sync_status @sync_status end |
#tags ⇒ Object
Returns the value of attribute tags.
14 15 16 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 14 def @tags end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
90 91 92 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 90 def updated_at @updated_at end |
#upload_id ⇒ Object
Returns the value of attribute upload_id.
74 75 76 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 74 def upload_id @upload_id end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
138 139 140 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 138 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 93 def self.attribute_map { :'tags' => :'tags', :'id' => :'id', :'source' => :'source', :'organization_id' => :'organization_id', :'organization_user_id' => :'organization_user_id', :'organization_supplied_user_id' => :'organization_supplied_user_id', :'organization_user_data_source_id' => :'organization_user_data_source_id', :'external_file_id' => :'external_file_id', :'external_url' => :'external_url', :'sync_status' => :'sync_status', :'sync_error_message' => :'sync_error_message', :'last_sync' => :'last_sync', :'file_statistics' => :'file_statistics', :'file_metadata' => :'file_metadata', :'embedding_properties' => :'embedding_properties', :'chunk_size' => :'chunk_size', :'chunk_overlap' => :'chunk_overlap', :'chunk_properties' => :'chunk_properties', :'ocr_properties' => :'ocr_properties', :'ocr_job_started_at' => :'ocr_job_started_at', :'name' => :'name', :'parent_id' => :'parent_id', :'enable_auto_sync' => :'enable_auto_sync', :'presigned_url' => :'presigned_url', :'parsed_text_url' => :'parsed_text_url', :'additional_presigned_urls' => :'additional_presigned_urls', :'skip_embedding_generation' => :'skip_embedding_generation', :'source_created_at' => :'source_created_at', :'generate_sparse_vectors' => :'generate_sparse_vectors', :'request_id' => :'request_id', :'upload_id' => :'upload_id', :'sync_properties' => :'sync_properties', :'messages_metadata' => :'messages_metadata', :'file_contents_deleted' => :'file_contents_deleted', :'supports_cold_storage' => :'supports_cold_storage', :'hot_storage_time_to_live' => :'hot_storage_time_to_live', :'embedding_storage_status' => :'embedding_storage_status', :'created_at' => :'created_at', :'updated_at' => :'updated_at' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
522 523 524 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 522 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 188 def self.openapi_nullable Set.new([ :'tags', :'organization_user_id', :'organization_user_data_source_id', :'external_url', :'sync_error_message', :'last_sync', :'file_statistics', :'file_metadata', :'embedding_properties', :'chunk_size', :'chunk_overlap', :'chunk_properties', :'ocr_job_started_at', :'name', :'parent_id', :'enable_auto_sync', :'presigned_url', :'parsed_text_url', :'additional_presigned_urls', :'source_created_at', :'generate_sparse_vectors', :'request_id', :'upload_id', :'hot_storage_time_to_live', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 143 def self.openapi_types { :'tags' => :'Object', :'id' => :'Integer', :'source' => :'DataSourceType', :'organization_id' => :'Integer', :'organization_user_id' => :'Integer', :'organization_supplied_user_id' => :'String', :'organization_user_data_source_id' => :'Integer', :'external_file_id' => :'String', :'external_url' => :'String', :'sync_status' => :'ExternalFileSyncStatuses', :'sync_error_message' => :'String', :'last_sync' => :'Time', :'file_statistics' => :'FileStatisticsNullable', :'file_metadata' => :'Object', :'embedding_properties' => :'Hash<String, EmbeddingProperties>', :'chunk_size' => :'Integer', :'chunk_overlap' => :'Integer', :'chunk_properties' => :'ChunkPropertiesNullable', :'ocr_properties' => :'Object', :'ocr_job_started_at' => :'Time', :'name' => :'String', :'parent_id' => :'Integer', :'enable_auto_sync' => :'Boolean', :'presigned_url' => :'String', :'parsed_text_url' => :'String', :'additional_presigned_urls' => :'Object', :'skip_embedding_generation' => :'Boolean', :'source_created_at' => :'Time', :'generate_sparse_vectors' => :'Boolean', :'request_id' => :'String', :'upload_id' => :'String', :'sync_properties' => :'Object', :'messages_metadata' => :'Object', :'file_contents_deleted' => :'Boolean', :'supports_cold_storage' => :'Boolean', :'hot_storage_time_to_live' => :'Integer', :'embedding_storage_status' => :'EmbeddingStorageStatus', :'created_at' => :'Time', :'updated_at' => :'Time' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 463 def ==(o) return true if self.equal?(o) self.class == o.class && == o. && id == o.id && source == o.source && organization_id == o.organization_id && organization_user_id == o.organization_user_id && organization_supplied_user_id == o.organization_supplied_user_id && organization_user_data_source_id == o.organization_user_data_source_id && external_file_id == o.external_file_id && external_url == o.external_url && sync_status == o.sync_status && == o. && last_sync == o.last_sync && file_statistics == o.file_statistics && == o. && == o. && chunk_size == o.chunk_size && chunk_overlap == o.chunk_overlap && chunk_properties == o.chunk_properties && ocr_properties == o.ocr_properties && ocr_job_started_at == o.ocr_job_started_at && name == o.name && parent_id == o.parent_id && enable_auto_sync == o.enable_auto_sync && presigned_url == o.presigned_url && parsed_text_url == o.parsed_text_url && additional_presigned_urls == o.additional_presigned_urls && == o. && source_created_at == o.source_created_at && generate_sparse_vectors == o.generate_sparse_vectors && request_id == o.request_id && upload_id == o.upload_id && sync_properties == o.sync_properties && == o. && file_contents_deleted == o.file_contents_deleted && supports_cold_storage == o.supports_cold_storage && hot_storage_time_to_live == o.hot_storage_time_to_live && == o. && created_at == o.created_at && updated_at == o.updated_at end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 553 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = Carbon.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
624 625 626 627 628 629 630 631 632 633 634 635 636 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 624 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 529 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
509 510 511 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 509 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
515 516 517 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 515 def hash [, id, source, organization_id, organization_user_id, organization_supplied_user_id, organization_user_data_source_id, external_file_id, external_url, sync_status, , last_sync, file_statistics, , , 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, , source_created_at, generate_sparse_vectors, request_id, upload_id, sync_properties, , file_contents_deleted, supports_cold_storage, hot_storage_time_to_live, , created_at, updated_at].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 395 def list_invalid_properties invalid_properties = Array.new if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @source.nil? invalid_properties.push('invalid value for "source", source cannot be nil.') end if @organization_id.nil? invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') end if @organization_supplied_user_id.nil? invalid_properties.push('invalid value for "organization_supplied_user_id", organization_supplied_user_id cannot be nil.') end if @external_file_id.nil? invalid_properties.push('invalid value for "external_file_id", external_file_id cannot be nil.') end if @sync_status.nil? invalid_properties.push('invalid value for "sync_status", sync_status cannot be nil.') end if @skip_embedding_generation.nil? invalid_properties.push('invalid value for "skip_embedding_generation", skip_embedding_generation cannot be nil.') end if @supports_cold_storage.nil? invalid_properties.push('invalid value for "supports_cold_storage", supports_cold_storage cannot be nil.') end if @embedding_storage_status.nil? invalid_properties.push('invalid value for "embedding_storage_status", embedding_storage_status cannot be nil.') end if @created_at.nil? invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') end if @updated_at.nil? invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
600 601 602 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 600 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
606 607 608 609 610 611 612 613 614 615 616 617 618 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 606 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
594 595 596 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 594 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
446 447 448 449 450 451 452 453 454 455 456 457 458 459 |
# File 'lib/carbon_ruby_sdk/models/user_file.rb', line 446 def valid? return false if @id.nil? return false if @source.nil? return false if @organization_id.nil? return false if @organization_supplied_user_id.nil? return false if @external_file_id.nil? return false if @sync_status.nil? return false if @skip_embedding_generation.nil? return false if @supports_cold_storage.nil? return false if @embedding_storage_status.nil? return false if @created_at.nil? return false if @updated_at.nil? true end |