ragie_ruby_sdk 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (454) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +291 -0
  4. data/Rakefile +10 -0
  5. data/docs/AccessTokenCredentials.md +18 -0
  6. data/docs/AsyncDocumentMetadataUpdate.md +18 -0
  7. data/docs/AudioModalityData.md +20 -0
  8. data/docs/AuthenticatorConfluenceConnection.md +22 -0
  9. data/docs/AuthenticatorDropboxConnection.md +24 -0
  10. data/docs/AuthenticatorGmailConnection.md +24 -0
  11. data/docs/AuthenticatorGoogleDriveConnection.md +24 -0
  12. data/docs/AuthenticatorHubspotConnection.md +26 -0
  13. data/docs/AuthenticatorJiraConnection.md +20 -0
  14. data/docs/AuthenticatorList.md +20 -0
  15. data/docs/AuthenticatorNotionConnection.md +26 -0
  16. data/docs/AuthenticatorOnedriveConnection.md +24 -0
  17. data/docs/AuthenticatorSalesforceConnection.md +24 -0
  18. data/docs/AuthenticatorSharepointConnection.md +24 -0
  19. data/docs/AuthenticatorSlackConnection.md +24 -0
  20. data/docs/AuthenticatorsApi.md +293 -0
  21. data/docs/BackblazeCredentials.md +24 -0
  22. data/docs/BaseGetAuthenticator.md +22 -0
  23. data/docs/BetaApi.md +363 -0
  24. data/docs/Body.md +22 -0
  25. data/docs/BodyCreateDocument.md +28 -0
  26. data/docs/BodyUpdateDocumentFile.md +20 -0
  27. data/docs/BucketData.md +22 -0
  28. data/docs/ConfluenceData.md +24 -0
  29. data/docs/Connection.md +44 -0
  30. data/docs/Connection1.md +106 -0
  31. data/docs/Connection2.md +91 -0
  32. data/docs/ConnectionBase.md +22 -0
  33. data/docs/ConnectionLimitExceededWebhook.md +22 -0
  34. data/docs/ConnectionLimitExceededWebhookPayload.md +24 -0
  35. data/docs/ConnectionLimitParams.md +18 -0
  36. data/docs/ConnectionList.md +20 -0
  37. data/docs/ConnectionStats.md +20 -0
  38. data/docs/ConnectionSyncFinishedWebhook.md +22 -0
  39. data/docs/ConnectionSyncFinishedWebhookPayload.md +24 -0
  40. data/docs/ConnectionSyncProgressWebhook.md +22 -0
  41. data/docs/ConnectionSyncProgressWebhookPayload.md +42 -0
  42. data/docs/ConnectionSyncStartedWebhook.md +22 -0
  43. data/docs/ConnectionSyncStartedWebhookPayload.md +32 -0
  44. data/docs/ConnectionsApi.md +790 -0
  45. data/docs/ConnectorSource.md +15 -0
  46. data/docs/ConnectorSourceTypeInfo.md +24 -0
  47. data/docs/CreateAuthenticatorConnection.md +28 -0
  48. data/docs/CreateDocumentFromUrlParams.md +28 -0
  49. data/docs/CreateDocumentRawParams.md +26 -0
  50. data/docs/CreateGoogleAuthenticator.md +28 -0
  51. data/docs/CreateInstructionParams.md +30 -0
  52. data/docs/CreatePartitionParams.md +42 -0
  53. data/docs/Data.md +15 -0
  54. data/docs/DefaultApi.md +77 -0
  55. data/docs/DeleteConnectionPayload.md +18 -0
  56. data/docs/Document.md +36 -0
  57. data/docs/DocumentChunk.md +26 -0
  58. data/docs/DocumentChunkDetail.md +28 -0
  59. data/docs/DocumentChunkDetailModalityData.md +79 -0
  60. data/docs/DocumentChunkList.md +20 -0
  61. data/docs/DocumentDelete.md +18 -0
  62. data/docs/DocumentDeleteWebhook.md +22 -0
  63. data/docs/DocumentDeleteWebhookPayload.md +30 -0
  64. data/docs/DocumentFileUpdate.md +18 -0
  65. data/docs/DocumentGet.md +38 -0
  66. data/docs/DocumentList.md +20 -0
  67. data/docs/DocumentMetadataUpdate.md +18 -0
  68. data/docs/DocumentRawUpdate.md +18 -0
  69. data/docs/DocumentSummary.md +20 -0
  70. data/docs/DocumentUpdateWebhook.md +22 -0
  71. data/docs/DocumentUpdateWebhookPayload.md +34 -0
  72. data/docs/DocumentUrlUpdate.md +18 -0
  73. data/docs/DocumentWithContent.md +38 -0
  74. data/docs/DocumentsApi.md +1221 -0
  75. data/docs/EnterpriseApi.md +363 -0
  76. data/docs/EntitiesApi.md +436 -0
  77. data/docs/Entity.md +30 -0
  78. data/docs/EntityExtractedWebhook.md +22 -0
  79. data/docs/EntityExtractedWebhookPayload.md +34 -0
  80. data/docs/EntityList.md +20 -0
  81. data/docs/ErrorMessage.md +18 -0
  82. data/docs/FolderData.md +20 -0
  83. data/docs/FreshdeskCredentials.md +20 -0
  84. data/docs/FreshdeskData.md +20 -0
  85. data/docs/GmailData.md +18 -0
  86. data/docs/GoogleFolderData.md +22 -0
  87. data/docs/HTTPValidationError.md +18 -0
  88. data/docs/HubspotData.md +30 -0
  89. data/docs/Instruction.md +36 -0
  90. data/docs/IntercomCredentials.md +22 -0
  91. data/docs/IntercomData.md +28 -0
  92. data/docs/Link.md +20 -0
  93. data/docs/ListConnectorSourceTypeInfo.md +18 -0
  94. data/docs/MediaModeParam.md +22 -0
  95. data/docs/MediaType.md +15 -0
  96. data/docs/MetadataValue.md +15 -0
  97. data/docs/MetadataValue1.md +53 -0
  98. data/docs/Mode.md +22 -0
  99. data/docs/Mode1.md +22 -0
  100. data/docs/Mode2.md +49 -0
  101. data/docs/Mode2OneOf.md +22 -0
  102. data/docs/OAuthCredentials.md +26 -0
  103. data/docs/OAuthRefreshTokenCredentials.md +18 -0
  104. data/docs/OAuthUrlCreate.md +34 -0
  105. data/docs/OAuthUrlResponse.md +18 -0
  106. data/docs/OnedriveData.md +22 -0
  107. data/docs/Pagination.md +20 -0
  108. data/docs/Partition.md +24 -0
  109. data/docs/PartitionDetail.md +26 -0
  110. data/docs/PartitionLimitExceededWebhook.md +22 -0
  111. data/docs/PartitionLimitExceededWebhookPayload.md +20 -0
  112. data/docs/PartitionLimitParams.md +40 -0
  113. data/docs/PartitionLimitResetWebhook.md +22 -0
  114. data/docs/PartitionLimitResetWebhookPayload.md +18 -0
  115. data/docs/PartitionLimits.md +40 -0
  116. data/docs/PartitionList.md +20 -0
  117. data/docs/PartitionStats.md +42 -0
  118. data/docs/PartitionStrategy.md +22 -0
  119. data/docs/PartitionsApi.md +363 -0
  120. data/docs/PatchDocumentMetadataParams.md +20 -0
  121. data/docs/Payload.md +84 -0
  122. data/docs/PublicBackblazeConnection.md +22 -0
  123. data/docs/PublicCreateConnection.md +28 -0
  124. data/docs/PublicFreshdeskConnection.md +24 -0
  125. data/docs/PublicGCSConnection.md +22 -0
  126. data/docs/PublicIntercomConnection.md +22 -0
  127. data/docs/PublicS3CompatibleConnection.md +22 -0
  128. data/docs/PublicZendeskConnection.md +22 -0
  129. data/docs/ResponseOK.md +18 -0
  130. data/docs/ResponsePatchdocumentmetadata.md +20 -0
  131. data/docs/Retrieval.md +18 -0
  132. data/docs/RetrievalsApi.md +75 -0
  133. data/docs/RetrieveParams.md +30 -0
  134. data/docs/S3CompatibleCredentials.md +24 -0
  135. data/docs/ScoredChunk.md +34 -0
  136. data/docs/SetConnectionEnabledPayload.md +20 -0
  137. data/docs/SharepointData.md +20 -0
  138. data/docs/SharepointFileData.md +22 -0
  139. data/docs/SharepointSiteData.md +20 -0
  140. data/docs/SlackData.md +20 -0
  141. data/docs/Source.md +15 -0
  142. data/docs/Status.md +15 -0
  143. data/docs/UpdateDocumentFromUrlParams.md +20 -0
  144. data/docs/UpdateDocumentRawParams.md +18 -0
  145. data/docs/UpdateInstructionParams.md +18 -0
  146. data/docs/ValidationError.md +22 -0
  147. data/docs/ValidationErrorLocInner.md +15 -0
  148. data/docs/VideoModalityData.md +20 -0
  149. data/docs/WordTimestamp.md +24 -0
  150. data/docs/ZendeskCredentials.md +22 -0
  151. data/docs/ZendeskData.md +18 -0
  152. data/git_push.sh +57 -0
  153. data/lib/ragie_ruby_sdk/api/authenticators_api.rb +298 -0
  154. data/lib/ragie_ruby_sdk/api/beta_api.rb +366 -0
  155. data/lib/ragie_ruby_sdk/api/connections_api.rb +777 -0
  156. data/lib/ragie_ruby_sdk/api/default_api.rb +90 -0
  157. data/lib/ragie_ruby_sdk/api/documents_api.rb +1206 -0
  158. data/lib/ragie_ruby_sdk/api/enterprise_api.rb +366 -0
  159. data/lib/ragie_ruby_sdk/api/entities_api.rb +438 -0
  160. data/lib/ragie_ruby_sdk/api/partitions_api.rb +361 -0
  161. data/lib/ragie_ruby_sdk/api/retrievals_api.rb +88 -0
  162. data/lib/ragie_ruby_sdk/api_client.rb +393 -0
  163. data/lib/ragie_ruby_sdk/api_error.rb +58 -0
  164. data/lib/ragie_ruby_sdk/configuration.rb +308 -0
  165. data/lib/ragie_ruby_sdk/models/access_token_credentials.rb +237 -0
  166. data/lib/ragie_ruby_sdk/models/async_document_metadata_update.rb +237 -0
  167. data/lib/ragie_ruby_sdk/models/audio_modality_data.rb +267 -0
  168. data/lib/ragie_ruby_sdk/models/authenticator_confluence_connection.rb +315 -0
  169. data/lib/ragie_ruby_sdk/models/authenticator_dropbox_connection.rb +340 -0
  170. data/lib/ragie_ruby_sdk/models/authenticator_gmail_connection.rb +340 -0
  171. data/lib/ragie_ruby_sdk/models/authenticator_google_drive_connection.rb +342 -0
  172. data/lib/ragie_ruby_sdk/models/authenticator_hubspot_connection.rb +365 -0
  173. data/lib/ragie_ruby_sdk/models/authenticator_jira_connection.rb +287 -0
  174. data/lib/ragie_ruby_sdk/models/authenticator_list.rb +265 -0
  175. data/lib/ragie_ruby_sdk/models/authenticator_notion_connection.rb +366 -0
  176. data/lib/ragie_ruby_sdk/models/authenticator_onedrive_connection.rb +340 -0
  177. data/lib/ragie_ruby_sdk/models/authenticator_salesforce_connection.rb +341 -0
  178. data/lib/ragie_ruby_sdk/models/authenticator_sharepoint_connection.rb +340 -0
  179. data/lib/ragie_ruby_sdk/models/authenticator_slack_connection.rb +340 -0
  180. data/lib/ragie_ruby_sdk/models/backblaze_credentials.rb +315 -0
  181. data/lib/ragie_ruby_sdk/models/base_get_authenticator.rb +290 -0
  182. data/lib/ragie_ruby_sdk/models/body.rb +111 -0
  183. data/lib/ragie_ruby_sdk/models/body_create_document.rb +292 -0
  184. data/lib/ragie_ruby_sdk/models/body_update_document_file.rb +250 -0
  185. data/lib/ragie_ruby_sdk/models/bucket_data.rb +258 -0
  186. data/lib/ragie_ruby_sdk/models/confluence_data.rb +315 -0
  187. data/lib/ragie_ruby_sdk/models/connection.rb +521 -0
  188. data/lib/ragie_ruby_sdk/models/connection1.rb +73 -0
  189. data/lib/ragie_ruby_sdk/models/connection2.rb +63 -0
  190. data/lib/ragie_ruby_sdk/models/connection_base.rb +274 -0
  191. data/lib/ragie_ruby_sdk/models/connection_limit_exceeded_webhook.rb +313 -0
  192. data/lib/ragie_ruby_sdk/models/connection_limit_exceeded_webhook_payload.rb +327 -0
  193. data/lib/ragie_ruby_sdk/models/connection_limit_params.rb +236 -0
  194. data/lib/ragie_ruby_sdk/models/connection_list.rb +265 -0
  195. data/lib/ragie_ruby_sdk/models/connection_stats.rb +263 -0
  196. data/lib/ragie_ruby_sdk/models/connection_sync_finished_webhook.rb +313 -0
  197. data/lib/ragie_ruby_sdk/models/connection_sync_finished_webhook_payload.rb +317 -0
  198. data/lib/ragie_ruby_sdk/models/connection_sync_progress_webhook.rb +313 -0
  199. data/lib/ragie_ruby_sdk/models/connection_sync_progress_webhook_payload.rb +551 -0
  200. data/lib/ragie_ruby_sdk/models/connection_sync_started_webhook.rb +313 -0
  201. data/lib/ragie_ruby_sdk/models/connection_sync_started_webhook_payload.rb +421 -0
  202. data/lib/ragie_ruby_sdk/models/connector_source.rb +55 -0
  203. data/lib/ragie_ruby_sdk/models/connector_source_type_info.rb +337 -0
  204. data/lib/ragie_ruby_sdk/models/create_authenticator_connection.rb +307 -0
  205. data/lib/ragie_ruby_sdk/models/create_document_from_url_params.rb +306 -0
  206. data/lib/ragie_ruby_sdk/models/create_document_raw_params.rb +279 -0
  207. data/lib/ragie_ruby_sdk/models/create_google_authenticator.rb +360 -0
  208. data/lib/ragie_ruby_sdk/models/create_instruction_params.rb +373 -0
  209. data/lib/ragie_ruby_sdk/models/create_partition_params.rb +537 -0
  210. data/lib/ragie_ruby_sdk/models/data.rb +105 -0
  211. data/lib/ragie_ruby_sdk/models/delete_connection_payload.rb +237 -0
  212. data/lib/ragie_ruby_sdk/models/document.rb +425 -0
  213. data/lib/ragie_ruby_sdk/models/document_chunk.rb +313 -0
  214. data/lib/ragie_ruby_sdk/models/document_chunk_detail.rb +323 -0
  215. data/lib/ragie_ruby_sdk/models/document_chunk_detail_modality_data.rb +55 -0
  216. data/lib/ragie_ruby_sdk/models/document_chunk_list.rb +265 -0
  217. data/lib/ragie_ruby_sdk/models/document_delete.rb +237 -0
  218. data/lib/ragie_ruby_sdk/models/document_delete_webhook.rb +313 -0
  219. data/lib/ragie_ruby_sdk/models/document_delete_webhook_payload.rb +353 -0
  220. data/lib/ragie_ruby_sdk/models/document_file_update.rb +237 -0
  221. data/lib/ragie_ruby_sdk/models/document_get.rb +453 -0
  222. data/lib/ragie_ruby_sdk/models/document_list.rb +265 -0
  223. data/lib/ragie_ruby_sdk/models/document_metadata_update.rb +240 -0
  224. data/lib/ragie_ruby_sdk/models/document_raw_update.rb +237 -0
  225. data/lib/ragie_ruby_sdk/models/document_summary.rb +263 -0
  226. data/lib/ragie_ruby_sdk/models/document_update_webhook.rb +313 -0
  227. data/lib/ragie_ruby_sdk/models/document_update_webhook_payload.rb +391 -0
  228. data/lib/ragie_ruby_sdk/models/document_url_update.rb +237 -0
  229. data/lib/ragie_ruby_sdk/models/document_with_content.rb +451 -0
  230. data/lib/ragie_ruby_sdk/models/entity.rb +381 -0
  231. data/lib/ragie_ruby_sdk/models/entity_extracted_webhook.rb +313 -0
  232. data/lib/ragie_ruby_sdk/models/entity_extracted_webhook_payload.rb +421 -0
  233. data/lib/ragie_ruby_sdk/models/entity_list.rb +265 -0
  234. data/lib/ragie_ruby_sdk/models/error_message.rb +237 -0
  235. data/lib/ragie_ruby_sdk/models/folder_data.rb +263 -0
  236. data/lib/ragie_ruby_sdk/models/freshdesk_credentials.rb +263 -0
  237. data/lib/ragie_ruby_sdk/models/freshdesk_data.rb +263 -0
  238. data/lib/ragie_ruby_sdk/models/gmail_data.rb +221 -0
  239. data/lib/ragie_ruby_sdk/models/google_folder_data.rb +289 -0
  240. data/lib/ragie_ruby_sdk/models/http_validation_error.rb +222 -0
  241. data/lib/ragie_ruby_sdk/models/hubspot_data.rb +393 -0
  242. data/lib/ragie_ruby_sdk/models/instruction.rb +451 -0
  243. data/lib/ragie_ruby_sdk/models/intercom_credentials.rb +290 -0
  244. data/lib/ragie_ruby_sdk/models/intercom_data.rb +367 -0
  245. data/lib/ragie_ruby_sdk/models/link.rb +263 -0
  246. data/lib/ragie_ruby_sdk/models/list_connector_source_type_info.rb +239 -0
  247. data/lib/ragie_ruby_sdk/models/media_mode_param.rb +287 -0
  248. data/lib/ragie_ruby_sdk/models/media_type.rb +104 -0
  249. data/lib/ragie_ruby_sdk/models/metadata_value.rb +106 -0
  250. data/lib/ragie_ruby_sdk/models/metadata_value1.rb +107 -0
  251. data/lib/ragie_ruby_sdk/models/mode.rb +105 -0
  252. data/lib/ragie_ruby_sdk/models/mode1.rb +104 -0
  253. data/lib/ragie_ruby_sdk/models/mode2.rb +106 -0
  254. data/lib/ragie_ruby_sdk/models/mode2_one_of.rb +287 -0
  255. data/lib/ragie_ruby_sdk/models/o_auth_credentials.rb +350 -0
  256. data/lib/ragie_ruby_sdk/models/o_auth_refresh_token_credentials.rb +237 -0
  257. data/lib/ragie_ruby_sdk/models/o_auth_url_create.rb +370 -0
  258. data/lib/ragie_ruby_sdk/models/o_auth_url_response.rb +237 -0
  259. data/lib/ragie_ruby_sdk/models/onedrive_data.rb +289 -0
  260. data/lib/ragie_ruby_sdk/models/pagination.rb +247 -0
  261. data/lib/ragie_ruby_sdk/models/partition.rb +299 -0
  262. data/lib/ragie_ruby_sdk/models/partition_detail.rb +325 -0
  263. data/lib/ragie_ruby_sdk/models/partition_limit_exceeded_webhook.rb +313 -0
  264. data/lib/ragie_ruby_sdk/models/partition_limit_exceeded_webhook_payload.rb +287 -0
  265. data/lib/ragie_ruby_sdk/models/partition_limit_params.rb +511 -0
  266. data/lib/ragie_ruby_sdk/models/partition_limit_reset_webhook.rb +313 -0
  267. data/lib/ragie_ruby_sdk/models/partition_limit_reset_webhook_payload.rb +237 -0
  268. data/lib/ragie_ruby_sdk/models/partition_limits.rb +511 -0
  269. data/lib/ragie_ruby_sdk/models/partition_list.rb +265 -0
  270. data/lib/ragie_ruby_sdk/models/partition_stats.rb +562 -0
  271. data/lib/ragie_ruby_sdk/models/partition_strategy.rb +104 -0
  272. data/lib/ragie_ruby_sdk/models/patch_document_metadata_params.rb +252 -0
  273. data/lib/ragie_ruby_sdk/models/payload.rb +60 -0
  274. data/lib/ragie_ruby_sdk/models/public_backblaze_connection.rb +313 -0
  275. data/lib/ragie_ruby_sdk/models/public_create_connection.rb +307 -0
  276. data/lib/ragie_ruby_sdk/models/public_freshdesk_connection.rb +340 -0
  277. data/lib/ragie_ruby_sdk/models/public_gcs_connection.rb +315 -0
  278. data/lib/ragie_ruby_sdk/models/public_intercom_connection.rb +313 -0
  279. data/lib/ragie_ruby_sdk/models/public_s3_compatible_connection.rb +313 -0
  280. data/lib/ragie_ruby_sdk/models/public_zendesk_connection.rb +313 -0
  281. data/lib/ragie_ruby_sdk/models/response_ok.rb +222 -0
  282. data/lib/ragie_ruby_sdk/models/response_patchdocumentmetadata.rb +104 -0
  283. data/lib/ragie_ruby_sdk/models/retrieval.rb +239 -0
  284. data/lib/ragie_ruby_sdk/models/retrieve_params.rb +305 -0
  285. data/lib/ragie_ruby_sdk/models/s3_compatible_credentials.rb +299 -0
  286. data/lib/ragie_ruby_sdk/models/scored_chunk.rb +434 -0
  287. data/lib/ragie_ruby_sdk/models/set_connection_enabled_payload.rb +281 -0
  288. data/lib/ragie_ruby_sdk/models/sharepoint_data.rb +265 -0
  289. data/lib/ragie_ruby_sdk/models/sharepoint_file_data.rb +313 -0
  290. data/lib/ragie_ruby_sdk/models/sharepoint_site_data.rb +263 -0
  291. data/lib/ragie_ruby_sdk/models/slack_data.rb +263 -0
  292. data/lib/ragie_ruby_sdk/models/source.rb +105 -0
  293. data/lib/ragie_ruby_sdk/models/status.rb +103 -0
  294. data/lib/ragie_ruby_sdk/models/update_document_from_url_params.rb +247 -0
  295. data/lib/ragie_ruby_sdk/models/update_document_raw_params.rb +237 -0
  296. data/lib/ragie_ruby_sdk/models/update_instruction_params.rb +238 -0
  297. data/lib/ragie_ruby_sdk/models/validation_error.rb +291 -0
  298. data/lib/ragie_ruby_sdk/models/validation_error_loc_inner.rb +104 -0
  299. data/lib/ragie_ruby_sdk/models/video_modality_data.rb +267 -0
  300. data/lib/ragie_ruby_sdk/models/word_timestamp.rb +315 -0
  301. data/lib/ragie_ruby_sdk/models/zendesk_credentials.rb +289 -0
  302. data/lib/ragie_ruby_sdk/models/zendesk_data.rb +237 -0
  303. data/lib/ragie_ruby_sdk/version.rb +15 -0
  304. data/lib/ragie_ruby_sdk.rb +185 -0
  305. data/ragie_ruby_sdk.gemspec +39 -0
  306. data/spec/api/authenticators_api_spec.rb +85 -0
  307. data/spec/api/beta_api_spec.rb +97 -0
  308. data/spec/api/connections_api_spec.rb +173 -0
  309. data/spec/api/default_api_spec.rb +47 -0
  310. data/spec/api/documents_api_spec.rb +260 -0
  311. data/spec/api/enterprise_api_spec.rb +97 -0
  312. data/spec/api/entities_api_spec.rb +110 -0
  313. data/spec/api/partitions_api_spec.rb +97 -0
  314. data/spec/api/retrievals_api_spec.rb +46 -0
  315. data/spec/models/access_token_credentials_spec.rb +36 -0
  316. data/spec/models/async_document_metadata_update_spec.rb +36 -0
  317. data/spec/models/audio_modality_data_spec.rb +46 -0
  318. data/spec/models/authenticator_confluence_connection_spec.rb +52 -0
  319. data/spec/models/authenticator_dropbox_connection_spec.rb +58 -0
  320. data/spec/models/authenticator_gmail_connection_spec.rb +58 -0
  321. data/spec/models/authenticator_google_drive_connection_spec.rb +58 -0
  322. data/spec/models/authenticator_hubspot_connection_spec.rb +64 -0
  323. data/spec/models/authenticator_jira_connection_spec.rb +46 -0
  324. data/spec/models/authenticator_list_spec.rb +42 -0
  325. data/spec/models/authenticator_notion_connection_spec.rb +64 -0
  326. data/spec/models/authenticator_onedrive_connection_spec.rb +58 -0
  327. data/spec/models/authenticator_salesforce_connection_spec.rb +58 -0
  328. data/spec/models/authenticator_sharepoint_connection_spec.rb +58 -0
  329. data/spec/models/authenticator_slack_connection_spec.rb +58 -0
  330. data/spec/models/backblaze_credentials_spec.rb +54 -0
  331. data/spec/models/base_get_authenticator_spec.rb +48 -0
  332. data/spec/models/body_create_document_spec.rb +66 -0
  333. data/spec/models/body_spec.rb +21 -0
  334. data/spec/models/body_update_document_file_spec.rb +42 -0
  335. data/spec/models/bucket_data_spec.rb +48 -0
  336. data/spec/models/confluence_data_spec.rb +54 -0
  337. data/spec/models/connection1_spec.rb +44 -0
  338. data/spec/models/connection2_spec.rb +44 -0
  339. data/spec/models/connection_base_spec.rb +48 -0
  340. data/spec/models/connection_limit_exceeded_webhook_payload_spec.rb +58 -0
  341. data/spec/models/connection_limit_exceeded_webhook_spec.rb +52 -0
  342. data/spec/models/connection_limit_params_spec.rb +36 -0
  343. data/spec/models/connection_list_spec.rb +42 -0
  344. data/spec/models/connection_spec.rb +118 -0
  345. data/spec/models/connection_stats_spec.rb +42 -0
  346. data/spec/models/connection_sync_finished_webhook_payload_spec.rb +54 -0
  347. data/spec/models/connection_sync_finished_webhook_spec.rb +52 -0
  348. data/spec/models/connection_sync_progress_webhook_payload_spec.rb +108 -0
  349. data/spec/models/connection_sync_progress_webhook_spec.rb +52 -0
  350. data/spec/models/connection_sync_started_webhook_payload_spec.rb +78 -0
  351. data/spec/models/connection_sync_started_webhook_spec.rb +52 -0
  352. data/spec/models/connector_source_spec.rb +30 -0
  353. data/spec/models/connector_source_type_info_spec.rb +54 -0
  354. data/spec/models/create_authenticator_connection_spec.rb +66 -0
  355. data/spec/models/create_document_from_url_params_spec.rb +66 -0
  356. data/spec/models/create_document_raw_params_spec.rb +60 -0
  357. data/spec/models/create_google_authenticator_spec.rb +70 -0
  358. data/spec/models/create_instruction_params_spec.rb +76 -0
  359. data/spec/models/create_partition_params_spec.rb +108 -0
  360. data/spec/models/data_spec.rb +21 -0
  361. data/spec/models/delete_connection_payload_spec.rb +36 -0
  362. data/spec/models/document_chunk_detail_modality_data_spec.rb +44 -0
  363. data/spec/models/document_chunk_detail_spec.rb +66 -0
  364. data/spec/models/document_chunk_list_spec.rb +42 -0
  365. data/spec/models/document_chunk_spec.rb +60 -0
  366. data/spec/models/document_delete_spec.rb +36 -0
  367. data/spec/models/document_delete_webhook_payload_spec.rb +72 -0
  368. data/spec/models/document_delete_webhook_spec.rb +52 -0
  369. data/spec/models/document_file_update_spec.rb +36 -0
  370. data/spec/models/document_get_spec.rb +96 -0
  371. data/spec/models/document_list_spec.rb +42 -0
  372. data/spec/models/document_metadata_update_spec.rb +36 -0
  373. data/spec/models/document_raw_update_spec.rb +36 -0
  374. data/spec/models/document_spec.rb +90 -0
  375. data/spec/models/document_summary_spec.rb +42 -0
  376. data/spec/models/document_update_webhook_payload_spec.rb +84 -0
  377. data/spec/models/document_update_webhook_spec.rb +52 -0
  378. data/spec/models/document_url_update_spec.rb +36 -0
  379. data/spec/models/document_with_content_spec.rb +96 -0
  380. data/spec/models/entity_extracted_webhook_payload_spec.rb +84 -0
  381. data/spec/models/entity_extracted_webhook_spec.rb +52 -0
  382. data/spec/models/entity_list_spec.rb +42 -0
  383. data/spec/models/entity_spec.rb +72 -0
  384. data/spec/models/error_message_spec.rb +36 -0
  385. data/spec/models/folder_data_spec.rb +42 -0
  386. data/spec/models/freshdesk_credentials_spec.rb +42 -0
  387. data/spec/models/freshdesk_data_spec.rb +42 -0
  388. data/spec/models/gmail_data_spec.rb +36 -0
  389. data/spec/models/google_folder_data_spec.rb +48 -0
  390. data/spec/models/http_validation_error_spec.rb +36 -0
  391. data/spec/models/hubspot_data_spec.rb +72 -0
  392. data/spec/models/instruction_spec.rb +94 -0
  393. data/spec/models/intercom_credentials_spec.rb +48 -0
  394. data/spec/models/intercom_data_spec.rb +66 -0
  395. data/spec/models/link_spec.rb +42 -0
  396. data/spec/models/list_connector_source_type_info_spec.rb +36 -0
  397. data/spec/models/media_mode_param_spec.rb +56 -0
  398. data/spec/models/media_type_spec.rb +21 -0
  399. data/spec/models/metadata_value1_spec.rb +32 -0
  400. data/spec/models/metadata_value_spec.rb +21 -0
  401. data/spec/models/mode1_spec.rb +21 -0
  402. data/spec/models/mode2_one_of_spec.rb +56 -0
  403. data/spec/models/mode2_spec.rb +32 -0
  404. data/spec/models/mode_spec.rb +21 -0
  405. data/spec/models/o_auth_credentials_spec.rb +64 -0
  406. data/spec/models/o_auth_refresh_token_credentials_spec.rb +36 -0
  407. data/spec/models/o_auth_url_create_spec.rb +88 -0
  408. data/spec/models/o_auth_url_response_spec.rb +36 -0
  409. data/spec/models/onedrive_data_spec.rb +48 -0
  410. data/spec/models/pagination_spec.rb +42 -0
  411. data/spec/models/partition_detail_spec.rb +60 -0
  412. data/spec/models/partition_limit_exceeded_webhook_payload_spec.rb +46 -0
  413. data/spec/models/partition_limit_exceeded_webhook_spec.rb +52 -0
  414. data/spec/models/partition_limit_params_spec.rb +102 -0
  415. data/spec/models/partition_limit_reset_webhook_payload_spec.rb +36 -0
  416. data/spec/models/partition_limit_reset_webhook_spec.rb +52 -0
  417. data/spec/models/partition_limits_spec.rb +102 -0
  418. data/spec/models/partition_list_spec.rb +42 -0
  419. data/spec/models/partition_spec.rb +54 -0
  420. data/spec/models/partition_stats_spec.rb +108 -0
  421. data/spec/models/partition_strategy_spec.rb +21 -0
  422. data/spec/models/patch_document_metadata_params_spec.rb +42 -0
  423. data/spec/models/payload_spec.rb +44 -0
  424. data/spec/models/public_backblaze_connection_spec.rb +52 -0
  425. data/spec/models/public_create_connection_spec.rb +66 -0
  426. data/spec/models/public_freshdesk_connection_spec.rb +58 -0
  427. data/spec/models/public_gcs_connection_spec.rb +52 -0
  428. data/spec/models/public_intercom_connection_spec.rb +52 -0
  429. data/spec/models/public_s3_compatible_connection_spec.rb +52 -0
  430. data/spec/models/public_zendesk_connection_spec.rb +52 -0
  431. data/spec/models/response_ok_spec.rb +36 -0
  432. data/spec/models/response_patchdocumentmetadata_spec.rb +21 -0
  433. data/spec/models/retrieval_spec.rb +36 -0
  434. data/spec/models/retrieve_params_spec.rb +72 -0
  435. data/spec/models/s3_compatible_credentials_spec.rb +54 -0
  436. data/spec/models/scored_chunk_spec.rb +84 -0
  437. data/spec/models/set_connection_enabled_payload_spec.rb +46 -0
  438. data/spec/models/sharepoint_data_spec.rb +42 -0
  439. data/spec/models/sharepoint_file_data_spec.rb +52 -0
  440. data/spec/models/sharepoint_site_data_spec.rb +42 -0
  441. data/spec/models/slack_data_spec.rb +42 -0
  442. data/spec/models/source_spec.rb +21 -0
  443. data/spec/models/status_spec.rb +21 -0
  444. data/spec/models/update_document_from_url_params_spec.rb +42 -0
  445. data/spec/models/update_document_raw_params_spec.rb +36 -0
  446. data/spec/models/update_instruction_params_spec.rb +36 -0
  447. data/spec/models/validation_error_loc_inner_spec.rb +21 -0
  448. data/spec/models/validation_error_spec.rb +48 -0
  449. data/spec/models/video_modality_data_spec.rb +46 -0
  450. data/spec/models/word_timestamp_spec.rb +54 -0
  451. data/spec/models/zendesk_credentials_spec.rb +48 -0
  452. data/spec/models/zendesk_data_spec.rb +36 -0
  453. data/spec/spec_helper.rb +111 -0
  454. metadata +680 -0
@@ -0,0 +1,537 @@
1
+ =begin
2
+ #Ragie API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.14.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module RagieRubySdk
17
+ class CreatePartitionParams
18
+ attr_accessor :name
19
+
20
+ attr_accessor :pages_hosted_limit_monthly
21
+
22
+ attr_accessor :pages_processed_limit_monthly
23
+
24
+ attr_accessor :pages_hosted_limit_max
25
+
26
+ attr_accessor :pages_processed_limit_max
27
+
28
+ attr_accessor :audio_processed_limit_monthly
29
+
30
+ attr_accessor :audio_processed_limit_max
31
+
32
+ attr_accessor :video_processed_limit_monthly
33
+
34
+ attr_accessor :video_processed_limit_max
35
+
36
+ attr_accessor :media_streamed_limit_monthly
37
+
38
+ attr_accessor :media_streamed_limit_max
39
+
40
+ attr_accessor :media_hosted_limit_monthly
41
+
42
+ attr_accessor :media_hosted_limit_max
43
+
44
+ # Attribute mapping from ruby-style variable name to JSON key.
45
+ def self.attribute_map
46
+ {
47
+ :'name' => :'name',
48
+ :'pages_hosted_limit_monthly' => :'pages_hosted_limit_monthly',
49
+ :'pages_processed_limit_monthly' => :'pages_processed_limit_monthly',
50
+ :'pages_hosted_limit_max' => :'pages_hosted_limit_max',
51
+ :'pages_processed_limit_max' => :'pages_processed_limit_max',
52
+ :'audio_processed_limit_monthly' => :'audio_processed_limit_monthly',
53
+ :'audio_processed_limit_max' => :'audio_processed_limit_max',
54
+ :'video_processed_limit_monthly' => :'video_processed_limit_monthly',
55
+ :'video_processed_limit_max' => :'video_processed_limit_max',
56
+ :'media_streamed_limit_monthly' => :'media_streamed_limit_monthly',
57
+ :'media_streamed_limit_max' => :'media_streamed_limit_max',
58
+ :'media_hosted_limit_monthly' => :'media_hosted_limit_monthly',
59
+ :'media_hosted_limit_max' => :'media_hosted_limit_max'
60
+ }
61
+ end
62
+
63
+ # Returns attribute mapping this model knows about
64
+ def self.acceptable_attribute_map
65
+ attribute_map
66
+ end
67
+
68
+ # Returns all the JSON keys this model knows about
69
+ def self.acceptable_attributes
70
+ acceptable_attribute_map.values
71
+ end
72
+
73
+ # Attribute type mapping.
74
+ def self.openapi_types
75
+ {
76
+ :'name' => :'String',
77
+ :'pages_hosted_limit_monthly' => :'Integer',
78
+ :'pages_processed_limit_monthly' => :'Integer',
79
+ :'pages_hosted_limit_max' => :'Integer',
80
+ :'pages_processed_limit_max' => :'Integer',
81
+ :'audio_processed_limit_monthly' => :'Integer',
82
+ :'audio_processed_limit_max' => :'Integer',
83
+ :'video_processed_limit_monthly' => :'Integer',
84
+ :'video_processed_limit_max' => :'Integer',
85
+ :'media_streamed_limit_monthly' => :'Integer',
86
+ :'media_streamed_limit_max' => :'Integer',
87
+ :'media_hosted_limit_monthly' => :'Integer',
88
+ :'media_hosted_limit_max' => :'Integer'
89
+ }
90
+ end
91
+
92
+ # List of attributes with nullable: true
93
+ def self.openapi_nullable
94
+ Set.new([
95
+ :'pages_hosted_limit_monthly',
96
+ :'pages_processed_limit_monthly',
97
+ :'pages_hosted_limit_max',
98
+ :'pages_processed_limit_max',
99
+ :'audio_processed_limit_monthly',
100
+ :'audio_processed_limit_max',
101
+ :'video_processed_limit_monthly',
102
+ :'video_processed_limit_max',
103
+ :'media_streamed_limit_monthly',
104
+ :'media_streamed_limit_max',
105
+ :'media_hosted_limit_monthly',
106
+ :'media_hosted_limit_max'
107
+ ])
108
+ end
109
+
110
+ # Initializes the object
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ def initialize(attributes = {})
113
+ if (!attributes.is_a?(Hash))
114
+ fail ArgumentError, "The input argument (attributes) must be a hash in `RagieRubySdk::CreatePartitionParams` initialize method"
115
+ end
116
+
117
+ # check to see if the attribute exists and convert string to symbol for hash key
118
+ acceptable_attribute_map = self.class.acceptable_attribute_map
119
+ attributes = attributes.each_with_object({}) { |(k, v), h|
120
+ if (!acceptable_attribute_map.key?(k.to_sym))
121
+ fail ArgumentError, "`#{k}` is not a valid attribute in `RagieRubySdk::CreatePartitionParams`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
122
+ end
123
+ h[k.to_sym] = v
124
+ }
125
+
126
+ if attributes.key?(:'name')
127
+ self.name = attributes[:'name']
128
+ else
129
+ self.name = nil
130
+ end
131
+
132
+ if attributes.key?(:'pages_hosted_limit_monthly')
133
+ self.pages_hosted_limit_monthly = attributes[:'pages_hosted_limit_monthly']
134
+ end
135
+
136
+ if attributes.key?(:'pages_processed_limit_monthly')
137
+ self.pages_processed_limit_monthly = attributes[:'pages_processed_limit_monthly']
138
+ end
139
+
140
+ if attributes.key?(:'pages_hosted_limit_max')
141
+ self.pages_hosted_limit_max = attributes[:'pages_hosted_limit_max']
142
+ end
143
+
144
+ if attributes.key?(:'pages_processed_limit_max')
145
+ self.pages_processed_limit_max = attributes[:'pages_processed_limit_max']
146
+ end
147
+
148
+ if attributes.key?(:'audio_processed_limit_monthly')
149
+ self.audio_processed_limit_monthly = attributes[:'audio_processed_limit_monthly']
150
+ end
151
+
152
+ if attributes.key?(:'audio_processed_limit_max')
153
+ self.audio_processed_limit_max = attributes[:'audio_processed_limit_max']
154
+ end
155
+
156
+ if attributes.key?(:'video_processed_limit_monthly')
157
+ self.video_processed_limit_monthly = attributes[:'video_processed_limit_monthly']
158
+ end
159
+
160
+ if attributes.key?(:'video_processed_limit_max')
161
+ self.video_processed_limit_max = attributes[:'video_processed_limit_max']
162
+ end
163
+
164
+ if attributes.key?(:'media_streamed_limit_monthly')
165
+ self.media_streamed_limit_monthly = attributes[:'media_streamed_limit_monthly']
166
+ end
167
+
168
+ if attributes.key?(:'media_streamed_limit_max')
169
+ self.media_streamed_limit_max = attributes[:'media_streamed_limit_max']
170
+ end
171
+
172
+ if attributes.key?(:'media_hosted_limit_monthly')
173
+ self.media_hosted_limit_monthly = attributes[:'media_hosted_limit_monthly']
174
+ end
175
+
176
+ if attributes.key?(:'media_hosted_limit_max')
177
+ self.media_hosted_limit_max = attributes[:'media_hosted_limit_max']
178
+ end
179
+ end
180
+
181
+ # Show invalid properties with the reasons. Usually used together with valid?
182
+ # @return Array for valid properties with the reasons
183
+ def list_invalid_properties
184
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
185
+ invalid_properties = Array.new
186
+ if @name.nil?
187
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
188
+ end
189
+
190
+ if !@pages_hosted_limit_monthly.nil? && @pages_hosted_limit_monthly < 1
191
+ invalid_properties.push('invalid value for "pages_hosted_limit_monthly", must be greater than or equal to 1.')
192
+ end
193
+
194
+ if !@pages_processed_limit_monthly.nil? && @pages_processed_limit_monthly < 1
195
+ invalid_properties.push('invalid value for "pages_processed_limit_monthly", must be greater than or equal to 1.')
196
+ end
197
+
198
+ if !@pages_hosted_limit_max.nil? && @pages_hosted_limit_max < 1
199
+ invalid_properties.push('invalid value for "pages_hosted_limit_max", must be greater than or equal to 1.')
200
+ end
201
+
202
+ if !@pages_processed_limit_max.nil? && @pages_processed_limit_max < 1
203
+ invalid_properties.push('invalid value for "pages_processed_limit_max", must be greater than or equal to 1.')
204
+ end
205
+
206
+ if !@audio_processed_limit_monthly.nil? && @audio_processed_limit_monthly < 1
207
+ invalid_properties.push('invalid value for "audio_processed_limit_monthly", must be greater than or equal to 1.')
208
+ end
209
+
210
+ if !@audio_processed_limit_max.nil? && @audio_processed_limit_max < 1
211
+ invalid_properties.push('invalid value for "audio_processed_limit_max", must be greater than or equal to 1.')
212
+ end
213
+
214
+ if !@video_processed_limit_monthly.nil? && @video_processed_limit_monthly < 1
215
+ invalid_properties.push('invalid value for "video_processed_limit_monthly", must be greater than or equal to 1.')
216
+ end
217
+
218
+ if !@video_processed_limit_max.nil? && @video_processed_limit_max < 1
219
+ invalid_properties.push('invalid value for "video_processed_limit_max", must be greater than or equal to 1.')
220
+ end
221
+
222
+ if !@media_streamed_limit_monthly.nil? && @media_streamed_limit_monthly < 1
223
+ invalid_properties.push('invalid value for "media_streamed_limit_monthly", must be greater than or equal to 1.')
224
+ end
225
+
226
+ if !@media_streamed_limit_max.nil? && @media_streamed_limit_max < 1
227
+ invalid_properties.push('invalid value for "media_streamed_limit_max", must be greater than or equal to 1.')
228
+ end
229
+
230
+ if !@media_hosted_limit_monthly.nil? && @media_hosted_limit_monthly < 1
231
+ invalid_properties.push('invalid value for "media_hosted_limit_monthly", must be greater than or equal to 1.')
232
+ end
233
+
234
+ if !@media_hosted_limit_max.nil? && @media_hosted_limit_max < 1
235
+ invalid_properties.push('invalid value for "media_hosted_limit_max", must be greater than or equal to 1.')
236
+ end
237
+
238
+ invalid_properties
239
+ end
240
+
241
+ # Check to see if the all the properties in the model are valid
242
+ # @return true if the model is valid
243
+ def valid?
244
+ warn '[DEPRECATED] the `valid?` method is obsolete'
245
+ return false if @name.nil?
246
+ return false if !@pages_hosted_limit_monthly.nil? && @pages_hosted_limit_monthly < 1
247
+ return false if !@pages_processed_limit_monthly.nil? && @pages_processed_limit_monthly < 1
248
+ return false if !@pages_hosted_limit_max.nil? && @pages_hosted_limit_max < 1
249
+ return false if !@pages_processed_limit_max.nil? && @pages_processed_limit_max < 1
250
+ return false if !@audio_processed_limit_monthly.nil? && @audio_processed_limit_monthly < 1
251
+ return false if !@audio_processed_limit_max.nil? && @audio_processed_limit_max < 1
252
+ return false if !@video_processed_limit_monthly.nil? && @video_processed_limit_monthly < 1
253
+ return false if !@video_processed_limit_max.nil? && @video_processed_limit_max < 1
254
+ return false if !@media_streamed_limit_monthly.nil? && @media_streamed_limit_monthly < 1
255
+ return false if !@media_streamed_limit_max.nil? && @media_streamed_limit_max < 1
256
+ return false if !@media_hosted_limit_monthly.nil? && @media_hosted_limit_monthly < 1
257
+ return false if !@media_hosted_limit_max.nil? && @media_hosted_limit_max < 1
258
+ true
259
+ end
260
+
261
+ # Custom attribute writer method with validation
262
+ # @param [Object] name Value to be assigned
263
+ def name=(name)
264
+ if name.nil?
265
+ fail ArgumentError, 'name cannot be nil'
266
+ end
267
+
268
+ @name = name
269
+ end
270
+
271
+ # Custom attribute writer method with validation
272
+ # @param [Object] pages_hosted_limit_monthly Value to be assigned
273
+ def pages_hosted_limit_monthly=(pages_hosted_limit_monthly)
274
+ if !pages_hosted_limit_monthly.nil? && pages_hosted_limit_monthly < 1
275
+ fail ArgumentError, 'invalid value for "pages_hosted_limit_monthly", must be greater than or equal to 1.'
276
+ end
277
+
278
+ @pages_hosted_limit_monthly = pages_hosted_limit_monthly
279
+ end
280
+
281
+ # Custom attribute writer method with validation
282
+ # @param [Object] pages_processed_limit_monthly Value to be assigned
283
+ def pages_processed_limit_monthly=(pages_processed_limit_monthly)
284
+ if !pages_processed_limit_monthly.nil? && pages_processed_limit_monthly < 1
285
+ fail ArgumentError, 'invalid value for "pages_processed_limit_monthly", must be greater than or equal to 1.'
286
+ end
287
+
288
+ @pages_processed_limit_monthly = pages_processed_limit_monthly
289
+ end
290
+
291
+ # Custom attribute writer method with validation
292
+ # @param [Object] pages_hosted_limit_max Value to be assigned
293
+ def pages_hosted_limit_max=(pages_hosted_limit_max)
294
+ if !pages_hosted_limit_max.nil? && pages_hosted_limit_max < 1
295
+ fail ArgumentError, 'invalid value for "pages_hosted_limit_max", must be greater than or equal to 1.'
296
+ end
297
+
298
+ @pages_hosted_limit_max = pages_hosted_limit_max
299
+ end
300
+
301
+ # Custom attribute writer method with validation
302
+ # @param [Object] pages_processed_limit_max Value to be assigned
303
+ def pages_processed_limit_max=(pages_processed_limit_max)
304
+ if !pages_processed_limit_max.nil? && pages_processed_limit_max < 1
305
+ fail ArgumentError, 'invalid value for "pages_processed_limit_max", must be greater than or equal to 1.'
306
+ end
307
+
308
+ @pages_processed_limit_max = pages_processed_limit_max
309
+ end
310
+
311
+ # Custom attribute writer method with validation
312
+ # @param [Object] audio_processed_limit_monthly Value to be assigned
313
+ def audio_processed_limit_monthly=(audio_processed_limit_monthly)
314
+ if !audio_processed_limit_monthly.nil? && audio_processed_limit_monthly < 1
315
+ fail ArgumentError, 'invalid value for "audio_processed_limit_monthly", must be greater than or equal to 1.'
316
+ end
317
+
318
+ @audio_processed_limit_monthly = audio_processed_limit_monthly
319
+ end
320
+
321
+ # Custom attribute writer method with validation
322
+ # @param [Object] audio_processed_limit_max Value to be assigned
323
+ def audio_processed_limit_max=(audio_processed_limit_max)
324
+ if !audio_processed_limit_max.nil? && audio_processed_limit_max < 1
325
+ fail ArgumentError, 'invalid value for "audio_processed_limit_max", must be greater than or equal to 1.'
326
+ end
327
+
328
+ @audio_processed_limit_max = audio_processed_limit_max
329
+ end
330
+
331
+ # Custom attribute writer method with validation
332
+ # @param [Object] video_processed_limit_monthly Value to be assigned
333
+ def video_processed_limit_monthly=(video_processed_limit_monthly)
334
+ if !video_processed_limit_monthly.nil? && video_processed_limit_monthly < 1
335
+ fail ArgumentError, 'invalid value for "video_processed_limit_monthly", must be greater than or equal to 1.'
336
+ end
337
+
338
+ @video_processed_limit_monthly = video_processed_limit_monthly
339
+ end
340
+
341
+ # Custom attribute writer method with validation
342
+ # @param [Object] video_processed_limit_max Value to be assigned
343
+ def video_processed_limit_max=(video_processed_limit_max)
344
+ if !video_processed_limit_max.nil? && video_processed_limit_max < 1
345
+ fail ArgumentError, 'invalid value for "video_processed_limit_max", must be greater than or equal to 1.'
346
+ end
347
+
348
+ @video_processed_limit_max = video_processed_limit_max
349
+ end
350
+
351
+ # Custom attribute writer method with validation
352
+ # @param [Object] media_streamed_limit_monthly Value to be assigned
353
+ def media_streamed_limit_monthly=(media_streamed_limit_monthly)
354
+ if !media_streamed_limit_monthly.nil? && media_streamed_limit_monthly < 1
355
+ fail ArgumentError, 'invalid value for "media_streamed_limit_monthly", must be greater than or equal to 1.'
356
+ end
357
+
358
+ @media_streamed_limit_monthly = media_streamed_limit_monthly
359
+ end
360
+
361
+ # Custom attribute writer method with validation
362
+ # @param [Object] media_streamed_limit_max Value to be assigned
363
+ def media_streamed_limit_max=(media_streamed_limit_max)
364
+ if !media_streamed_limit_max.nil? && media_streamed_limit_max < 1
365
+ fail ArgumentError, 'invalid value for "media_streamed_limit_max", must be greater than or equal to 1.'
366
+ end
367
+
368
+ @media_streamed_limit_max = media_streamed_limit_max
369
+ end
370
+
371
+ # Custom attribute writer method with validation
372
+ # @param [Object] media_hosted_limit_monthly Value to be assigned
373
+ def media_hosted_limit_monthly=(media_hosted_limit_monthly)
374
+ if !media_hosted_limit_monthly.nil? && media_hosted_limit_monthly < 1
375
+ fail ArgumentError, 'invalid value for "media_hosted_limit_monthly", must be greater than or equal to 1.'
376
+ end
377
+
378
+ @media_hosted_limit_monthly = media_hosted_limit_monthly
379
+ end
380
+
381
+ # Custom attribute writer method with validation
382
+ # @param [Object] media_hosted_limit_max Value to be assigned
383
+ def media_hosted_limit_max=(media_hosted_limit_max)
384
+ if !media_hosted_limit_max.nil? && media_hosted_limit_max < 1
385
+ fail ArgumentError, 'invalid value for "media_hosted_limit_max", must be greater than or equal to 1.'
386
+ end
387
+
388
+ @media_hosted_limit_max = media_hosted_limit_max
389
+ end
390
+
391
+ # Checks equality by comparing each attribute.
392
+ # @param [Object] Object to be compared
393
+ def ==(o)
394
+ return true if self.equal?(o)
395
+ self.class == o.class &&
396
+ name == o.name &&
397
+ pages_hosted_limit_monthly == o.pages_hosted_limit_monthly &&
398
+ pages_processed_limit_monthly == o.pages_processed_limit_monthly &&
399
+ pages_hosted_limit_max == o.pages_hosted_limit_max &&
400
+ pages_processed_limit_max == o.pages_processed_limit_max &&
401
+ audio_processed_limit_monthly == o.audio_processed_limit_monthly &&
402
+ audio_processed_limit_max == o.audio_processed_limit_max &&
403
+ video_processed_limit_monthly == o.video_processed_limit_monthly &&
404
+ video_processed_limit_max == o.video_processed_limit_max &&
405
+ media_streamed_limit_monthly == o.media_streamed_limit_monthly &&
406
+ media_streamed_limit_max == o.media_streamed_limit_max &&
407
+ media_hosted_limit_monthly == o.media_hosted_limit_monthly &&
408
+ media_hosted_limit_max == o.media_hosted_limit_max
409
+ end
410
+
411
+ # @see the `==` method
412
+ # @param [Object] Object to be compared
413
+ def eql?(o)
414
+ self == o
415
+ end
416
+
417
+ # Calculates hash code according to all attributes.
418
+ # @return [Integer] Hash code
419
+ def hash
420
+ [name, pages_hosted_limit_monthly, pages_processed_limit_monthly, pages_hosted_limit_max, pages_processed_limit_max, audio_processed_limit_monthly, audio_processed_limit_max, video_processed_limit_monthly, video_processed_limit_max, media_streamed_limit_monthly, media_streamed_limit_max, media_hosted_limit_monthly, media_hosted_limit_max].hash
421
+ end
422
+
423
+ # Builds the object from hash
424
+ # @param [Hash] attributes Model attributes in the form of hash
425
+ # @return [Object] Returns the model itself
426
+ def self.build_from_hash(attributes)
427
+ return nil unless attributes.is_a?(Hash)
428
+ attributes = attributes.transform_keys(&:to_sym)
429
+ transformed_hash = {}
430
+ openapi_types.each_pair do |key, type|
431
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
432
+ transformed_hash["#{key}"] = nil
433
+ elsif type =~ /\AArray<(.*)>/i
434
+ # check to ensure the input is an array given that the attribute
435
+ # is documented as an array but the input is not
436
+ if attributes[attribute_map[key]].is_a?(Array)
437
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
438
+ end
439
+ elsif !attributes[attribute_map[key]].nil?
440
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
441
+ end
442
+ end
443
+ new(transformed_hash)
444
+ end
445
+
446
+ # Deserializes the data based on type
447
+ # @param string type Data type
448
+ # @param string value Value to be deserialized
449
+ # @return [Object] Deserialized data
450
+ def self._deserialize(type, value)
451
+ case type.to_sym
452
+ when :Time
453
+ Time.parse(value)
454
+ when :Date
455
+ Date.parse(value)
456
+ when :String
457
+ value.to_s
458
+ when :Integer
459
+ value.to_i
460
+ when :Float
461
+ value.to_f
462
+ when :Boolean
463
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
464
+ true
465
+ else
466
+ false
467
+ end
468
+ when :Object
469
+ # generic object (usually a Hash), return directly
470
+ value
471
+ when /\AArray<(?<inner_type>.+)>\z/
472
+ inner_type = Regexp.last_match[:inner_type]
473
+ value.map { |v| _deserialize(inner_type, v) }
474
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
475
+ k_type = Regexp.last_match[:k_type]
476
+ v_type = Regexp.last_match[:v_type]
477
+ {}.tap do |hash|
478
+ value.each do |k, v|
479
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
480
+ end
481
+ end
482
+ else # model
483
+ # models (e.g. Pet) or oneOf
484
+ klass = RagieRubySdk.const_get(type)
485
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
486
+ end
487
+ end
488
+
489
+ # Returns the string representation of the object
490
+ # @return [String] String presentation of the object
491
+ def to_s
492
+ to_hash.to_s
493
+ end
494
+
495
+ # to_body is an alias to to_hash (backward compatibility)
496
+ # @return [Hash] Returns the object in the form of hash
497
+ def to_body
498
+ to_hash
499
+ end
500
+
501
+ # Returns the object in the form of hash
502
+ # @return [Hash] Returns the object in the form of hash
503
+ def to_hash
504
+ hash = {}
505
+ self.class.attribute_map.each_pair do |attr, param|
506
+ value = self.send(attr)
507
+ if value.nil?
508
+ is_nullable = self.class.openapi_nullable.include?(attr)
509
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
510
+ end
511
+
512
+ hash[param] = _to_hash(value)
513
+ end
514
+ hash
515
+ end
516
+
517
+ # Outputs non-array value in the form of hash
518
+ # For object, use to_hash. Otherwise, just return the value
519
+ # @param [Object] value Any valid value
520
+ # @return [Hash] Returns the value in the form of hash
521
+ def _to_hash(value)
522
+ if value.is_a?(Array)
523
+ value.compact.map { |v| _to_hash(v) }
524
+ elsif value.is_a?(Hash)
525
+ {}.tap do |hash|
526
+ value.each { |k, v| hash[k] = _to_hash(v) }
527
+ end
528
+ elsif value.respond_to? :to_hash
529
+ value.to_hash
530
+ else
531
+ value
532
+ end
533
+ end
534
+
535
+ end
536
+
537
+ end
@@ -0,0 +1,105 @@
1
+ =begin
2
+ #Ragie API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.14.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module RagieRubySdk
17
+ # Document data in a text or JSON format.
18
+ module Data
19
+ class << self
20
+ # List of class defined in anyOf (OpenAPI v3)
21
+ def openapi_any_of
22
+ [
23
+ :'Hash<String, Object>',
24
+ :'String'
25
+ ]
26
+ end
27
+
28
+ # Builds the object
29
+ # @param [Mixed] Data to be matched against the list of anyOf items
30
+ # @return [Object] Returns the model or the data itself
31
+ def build(data)
32
+ # Go through the list of anyOf items and attempt to identify the appropriate one.
33
+ # Note:
34
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
35
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
36
+ # - TODO: scalar values are de facto behaving as if they were nullable.
37
+ # - TODO: logging when debugging is set.
38
+ openapi_any_of.each do |klass|
39
+ begin
40
+ next if klass == :AnyType # "nullable: true"
41
+ typed_data = find_and_cast_into_type(klass, data)
42
+ return typed_data if typed_data
43
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
44
+ end
45
+ end
46
+
47
+ openapi_any_of.include?(:AnyType) ? data : nil
48
+ end
49
+
50
+ private
51
+
52
+ SchemaMismatchError = Class.new(StandardError)
53
+
54
+ # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
55
+ def find_and_cast_into_type(klass, data)
56
+ return if data.nil?
57
+
58
+ case klass.to_s
59
+ when 'Boolean'
60
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
61
+ when 'Float'
62
+ return data if data.instance_of?(Float)
63
+ when 'Integer'
64
+ return data if data.instance_of?(Integer)
65
+ when 'Time'
66
+ return Time.parse(data)
67
+ when 'Date'
68
+ return Date.iso8601(data)
69
+ when 'String'
70
+ return data if data.instance_of?(String)
71
+ when 'Object' # "type: object"
72
+ return data if data.instance_of?(Hash)
73
+ when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
74
+ if data.instance_of?(Array)
75
+ sub_type = Regexp.last_match[:sub_type]
76
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
77
+ end
78
+ when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
79
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
80
+ sub_type = Regexp.last_match[:sub_type]
81
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
82
+ end
83
+ else # model
84
+ const = RagieRubySdk.const_get(klass)
85
+ if const
86
+ if const.respond_to?(:openapi_any_of) # nested anyOf model
87
+ model = const.build(data)
88
+ return model if model
89
+ else
90
+ # raise if data contains keys that are not known to the model
91
+ raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
92
+ model = const.build_from_hash(data)
93
+ return model if model
94
+ end
95
+ end
96
+ end
97
+
98
+ raise # if no match by now, raise
99
+ rescue
100
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
101
+ end
102
+ end
103
+ end
104
+
105
+ end