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,381 @@
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 Entity
18
+ attr_accessor :id
19
+
20
+ attr_accessor :created_at
21
+
22
+ attr_accessor :updated_at
23
+
24
+ # The ID of the instruction which generated the entity.
25
+ attr_accessor :instruction_id
26
+
27
+ # The ID of the document which the entity was produced from.
28
+ attr_accessor :document_id
29
+
30
+ attr_accessor :chunk_id
31
+
32
+ attr_accessor :data
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'id' => :'id',
38
+ :'created_at' => :'created_at',
39
+ :'updated_at' => :'updated_at',
40
+ :'instruction_id' => :'instruction_id',
41
+ :'document_id' => :'document_id',
42
+ :'chunk_id' => :'chunk_id',
43
+ :'data' => :'data'
44
+ }
45
+ end
46
+
47
+ # Returns attribute mapping this model knows about
48
+ def self.acceptable_attribute_map
49
+ attribute_map
50
+ end
51
+
52
+ # Returns all the JSON keys this model knows about
53
+ def self.acceptable_attributes
54
+ acceptable_attribute_map.values
55
+ end
56
+
57
+ # Attribute type mapping.
58
+ def self.openapi_types
59
+ {
60
+ :'id' => :'String',
61
+ :'created_at' => :'Time',
62
+ :'updated_at' => :'Time',
63
+ :'instruction_id' => :'String',
64
+ :'document_id' => :'String',
65
+ :'chunk_id' => :'String',
66
+ :'data' => :'Hash<String, Object>'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ :'chunk_id',
74
+ ])
75
+ end
76
+
77
+ # Initializes the object
78
+ # @param [Hash] attributes Model attributes in the form of hash
79
+ def initialize(attributes = {})
80
+ if (!attributes.is_a?(Hash))
81
+ fail ArgumentError, "The input argument (attributes) must be a hash in `RagieRubySdk::Entity` initialize method"
82
+ end
83
+
84
+ # check to see if the attribute exists and convert string to symbol for hash key
85
+ acceptable_attribute_map = self.class.acceptable_attribute_map
86
+ attributes = attributes.each_with_object({}) { |(k, v), h|
87
+ if (!acceptable_attribute_map.key?(k.to_sym))
88
+ fail ArgumentError, "`#{k}` is not a valid attribute in `RagieRubySdk::Entity`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
89
+ end
90
+ h[k.to_sym] = v
91
+ }
92
+
93
+ if attributes.key?(:'id')
94
+ self.id = attributes[:'id']
95
+ else
96
+ self.id = nil
97
+ end
98
+
99
+ if attributes.key?(:'created_at')
100
+ self.created_at = attributes[:'created_at']
101
+ else
102
+ self.created_at = nil
103
+ end
104
+
105
+ if attributes.key?(:'updated_at')
106
+ self.updated_at = attributes[:'updated_at']
107
+ else
108
+ self.updated_at = nil
109
+ end
110
+
111
+ if attributes.key?(:'instruction_id')
112
+ self.instruction_id = attributes[:'instruction_id']
113
+ else
114
+ self.instruction_id = nil
115
+ end
116
+
117
+ if attributes.key?(:'document_id')
118
+ self.document_id = attributes[:'document_id']
119
+ else
120
+ self.document_id = nil
121
+ end
122
+
123
+ if attributes.key?(:'chunk_id')
124
+ self.chunk_id = attributes[:'chunk_id']
125
+ end
126
+
127
+ if attributes.key?(:'data')
128
+ if (value = attributes[:'data']).is_a?(Hash)
129
+ self.data = value
130
+ end
131
+ else
132
+ self.data = nil
133
+ end
134
+ end
135
+
136
+ # Show invalid properties with the reasons. Usually used together with valid?
137
+ # @return Array for valid properties with the reasons
138
+ def list_invalid_properties
139
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
140
+ invalid_properties = Array.new
141
+ if @id.nil?
142
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
143
+ end
144
+
145
+ if @created_at.nil?
146
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
147
+ end
148
+
149
+ if @updated_at.nil?
150
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
151
+ end
152
+
153
+ if @instruction_id.nil?
154
+ invalid_properties.push('invalid value for "instruction_id", instruction_id cannot be nil.')
155
+ end
156
+
157
+ if @document_id.nil?
158
+ invalid_properties.push('invalid value for "document_id", document_id cannot be nil.')
159
+ end
160
+
161
+ if @data.nil?
162
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
163
+ end
164
+
165
+ invalid_properties
166
+ end
167
+
168
+ # Check to see if the all the properties in the model are valid
169
+ # @return true if the model is valid
170
+ def valid?
171
+ warn '[DEPRECATED] the `valid?` method is obsolete'
172
+ return false if @id.nil?
173
+ return false if @created_at.nil?
174
+ return false if @updated_at.nil?
175
+ return false if @instruction_id.nil?
176
+ return false if @document_id.nil?
177
+ return false if @data.nil?
178
+ true
179
+ end
180
+
181
+ # Custom attribute writer method with validation
182
+ # @param [Object] id Value to be assigned
183
+ def id=(id)
184
+ if id.nil?
185
+ fail ArgumentError, 'id cannot be nil'
186
+ end
187
+
188
+ @id = id
189
+ end
190
+
191
+ # Custom attribute writer method with validation
192
+ # @param [Object] created_at Value to be assigned
193
+ def created_at=(created_at)
194
+ if created_at.nil?
195
+ fail ArgumentError, 'created_at cannot be nil'
196
+ end
197
+
198
+ @created_at = created_at
199
+ end
200
+
201
+ # Custom attribute writer method with validation
202
+ # @param [Object] updated_at Value to be assigned
203
+ def updated_at=(updated_at)
204
+ if updated_at.nil?
205
+ fail ArgumentError, 'updated_at cannot be nil'
206
+ end
207
+
208
+ @updated_at = updated_at
209
+ end
210
+
211
+ # Custom attribute writer method with validation
212
+ # @param [Object] instruction_id Value to be assigned
213
+ def instruction_id=(instruction_id)
214
+ if instruction_id.nil?
215
+ fail ArgumentError, 'instruction_id cannot be nil'
216
+ end
217
+
218
+ @instruction_id = instruction_id
219
+ end
220
+
221
+ # Custom attribute writer method with validation
222
+ # @param [Object] document_id Value to be assigned
223
+ def document_id=(document_id)
224
+ if document_id.nil?
225
+ fail ArgumentError, 'document_id cannot be nil'
226
+ end
227
+
228
+ @document_id = document_id
229
+ end
230
+
231
+ # Custom attribute writer method with validation
232
+ # @param [Object] data Value to be assigned
233
+ def data=(data)
234
+ if data.nil?
235
+ fail ArgumentError, 'data cannot be nil'
236
+ end
237
+
238
+ @data = data
239
+ end
240
+
241
+ # Checks equality by comparing each attribute.
242
+ # @param [Object] Object to be compared
243
+ def ==(o)
244
+ return true if self.equal?(o)
245
+ self.class == o.class &&
246
+ id == o.id &&
247
+ created_at == o.created_at &&
248
+ updated_at == o.updated_at &&
249
+ instruction_id == o.instruction_id &&
250
+ document_id == o.document_id &&
251
+ chunk_id == o.chunk_id &&
252
+ data == o.data
253
+ end
254
+
255
+ # @see the `==` method
256
+ # @param [Object] Object to be compared
257
+ def eql?(o)
258
+ self == o
259
+ end
260
+
261
+ # Calculates hash code according to all attributes.
262
+ # @return [Integer] Hash code
263
+ def hash
264
+ [id, created_at, updated_at, instruction_id, document_id, chunk_id, data].hash
265
+ end
266
+
267
+ # Builds the object from hash
268
+ # @param [Hash] attributes Model attributes in the form of hash
269
+ # @return [Object] Returns the model itself
270
+ def self.build_from_hash(attributes)
271
+ return nil unless attributes.is_a?(Hash)
272
+ attributes = attributes.transform_keys(&:to_sym)
273
+ transformed_hash = {}
274
+ openapi_types.each_pair do |key, type|
275
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
276
+ transformed_hash["#{key}"] = nil
277
+ elsif type =~ /\AArray<(.*)>/i
278
+ # check to ensure the input is an array given that the attribute
279
+ # is documented as an array but the input is not
280
+ if attributes[attribute_map[key]].is_a?(Array)
281
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
282
+ end
283
+ elsif !attributes[attribute_map[key]].nil?
284
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
285
+ end
286
+ end
287
+ new(transformed_hash)
288
+ end
289
+
290
+ # Deserializes the data based on type
291
+ # @param string type Data type
292
+ # @param string value Value to be deserialized
293
+ # @return [Object] Deserialized data
294
+ def self._deserialize(type, value)
295
+ case type.to_sym
296
+ when :Time
297
+ Time.parse(value)
298
+ when :Date
299
+ Date.parse(value)
300
+ when :String
301
+ value.to_s
302
+ when :Integer
303
+ value.to_i
304
+ when :Float
305
+ value.to_f
306
+ when :Boolean
307
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
308
+ true
309
+ else
310
+ false
311
+ end
312
+ when :Object
313
+ # generic object (usually a Hash), return directly
314
+ value
315
+ when /\AArray<(?<inner_type>.+)>\z/
316
+ inner_type = Regexp.last_match[:inner_type]
317
+ value.map { |v| _deserialize(inner_type, v) }
318
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
319
+ k_type = Regexp.last_match[:k_type]
320
+ v_type = Regexp.last_match[:v_type]
321
+ {}.tap do |hash|
322
+ value.each do |k, v|
323
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
324
+ end
325
+ end
326
+ else # model
327
+ # models (e.g. Pet) or oneOf
328
+ klass = RagieRubySdk.const_get(type)
329
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
330
+ end
331
+ end
332
+
333
+ # Returns the string representation of the object
334
+ # @return [String] String presentation of the object
335
+ def to_s
336
+ to_hash.to_s
337
+ end
338
+
339
+ # to_body is an alias to to_hash (backward compatibility)
340
+ # @return [Hash] Returns the object in the form of hash
341
+ def to_body
342
+ to_hash
343
+ end
344
+
345
+ # Returns the object in the form of hash
346
+ # @return [Hash] Returns the object in the form of hash
347
+ def to_hash
348
+ hash = {}
349
+ self.class.attribute_map.each_pair do |attr, param|
350
+ value = self.send(attr)
351
+ if value.nil?
352
+ is_nullable = self.class.openapi_nullable.include?(attr)
353
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
354
+ end
355
+
356
+ hash[param] = _to_hash(value)
357
+ end
358
+ hash
359
+ end
360
+
361
+ # Outputs non-array value in the form of hash
362
+ # For object, use to_hash. Otherwise, just return the value
363
+ # @param [Object] value Any valid value
364
+ # @return [Hash] Returns the value in the form of hash
365
+ def _to_hash(value)
366
+ if value.is_a?(Array)
367
+ value.compact.map { |v| _to_hash(v) }
368
+ elsif value.is_a?(Hash)
369
+ {}.tap do |hash|
370
+ value.each { |k, v| hash[k] = _to_hash(v) }
371
+ end
372
+ elsif value.respond_to? :to_hash
373
+ value.to_hash
374
+ else
375
+ value
376
+ end
377
+ end
378
+
379
+ end
380
+
381
+ end
@@ -0,0 +1,313 @@
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 EntityExtractedWebhook
18
+ attr_accessor :nonce
19
+
20
+ attr_accessor :type
21
+
22
+ attr_accessor :payload
23
+
24
+ class EnumAttributeValidator
25
+ attr_reader :datatype
26
+ attr_reader :allowable_values
27
+
28
+ def initialize(datatype, allowable_values)
29
+ @allowable_values = allowable_values.map do |value|
30
+ case datatype.to_s
31
+ when /Integer/i
32
+ value.to_i
33
+ when /Float/i
34
+ value.to_f
35
+ else
36
+ value
37
+ end
38
+ end
39
+ end
40
+
41
+ def valid?(value)
42
+ !value || allowable_values.include?(value)
43
+ end
44
+ end
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'nonce' => :'nonce',
50
+ :'type' => :'type',
51
+ :'payload' => :'payload'
52
+ }
53
+ end
54
+
55
+ # Returns attribute mapping this model knows about
56
+ def self.acceptable_attribute_map
57
+ attribute_map
58
+ end
59
+
60
+ # Returns all the JSON keys this model knows about
61
+ def self.acceptable_attributes
62
+ acceptable_attribute_map.values
63
+ end
64
+
65
+ # Attribute type mapping.
66
+ def self.openapi_types
67
+ {
68
+ :'nonce' => :'String',
69
+ :'type' => :'String',
70
+ :'payload' => :'EntityExtractedWebhookPayload'
71
+ }
72
+ end
73
+
74
+ # List of attributes with nullable: true
75
+ def self.openapi_nullable
76
+ Set.new([
77
+ ])
78
+ end
79
+
80
+ # Initializes the object
81
+ # @param [Hash] attributes Model attributes in the form of hash
82
+ def initialize(attributes = {})
83
+ if (!attributes.is_a?(Hash))
84
+ fail ArgumentError, "The input argument (attributes) must be a hash in `RagieRubySdk::EntityExtractedWebhook` initialize method"
85
+ end
86
+
87
+ # check to see if the attribute exists and convert string to symbol for hash key
88
+ acceptable_attribute_map = self.class.acceptable_attribute_map
89
+ attributes = attributes.each_with_object({}) { |(k, v), h|
90
+ if (!acceptable_attribute_map.key?(k.to_sym))
91
+ fail ArgumentError, "`#{k}` is not a valid attribute in `RagieRubySdk::EntityExtractedWebhook`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
92
+ end
93
+ h[k.to_sym] = v
94
+ }
95
+
96
+ if attributes.key?(:'nonce')
97
+ self.nonce = attributes[:'nonce']
98
+ else
99
+ self.nonce = nil
100
+ end
101
+
102
+ if attributes.key?(:'type')
103
+ self.type = attributes[:'type']
104
+ else
105
+ self.type = nil
106
+ end
107
+
108
+ if attributes.key?(:'payload')
109
+ self.payload = attributes[:'payload']
110
+ else
111
+ self.payload = nil
112
+ end
113
+ end
114
+
115
+ # Show invalid properties with the reasons. Usually used together with valid?
116
+ # @return Array for valid properties with the reasons
117
+ def list_invalid_properties
118
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
119
+ invalid_properties = Array.new
120
+ if @nonce.nil?
121
+ invalid_properties.push('invalid value for "nonce", nonce cannot be nil.')
122
+ end
123
+
124
+ if @type.nil?
125
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
126
+ end
127
+
128
+ if @payload.nil?
129
+ invalid_properties.push('invalid value for "payload", payload cannot be nil.')
130
+ end
131
+
132
+ invalid_properties
133
+ end
134
+
135
+ # Check to see if the all the properties in the model are valid
136
+ # @return true if the model is valid
137
+ def valid?
138
+ warn '[DEPRECATED] the `valid?` method is obsolete'
139
+ return false if @nonce.nil?
140
+ return false if @type.nil?
141
+ type_validator = EnumAttributeValidator.new('String', ["entity_extracted"])
142
+ return false unless type_validator.valid?(@type)
143
+ return false if @payload.nil?
144
+ true
145
+ end
146
+
147
+ # Custom attribute writer method with validation
148
+ # @param [Object] nonce Value to be assigned
149
+ def nonce=(nonce)
150
+ if nonce.nil?
151
+ fail ArgumentError, 'nonce cannot be nil'
152
+ end
153
+
154
+ @nonce = nonce
155
+ end
156
+
157
+ # Custom attribute writer method checking allowed values (enum).
158
+ # @param [Object] type Object to be assigned
159
+ def type=(type)
160
+ validator = EnumAttributeValidator.new('String', ["entity_extracted"])
161
+ unless validator.valid?(type)
162
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
163
+ end
164
+ @type = type
165
+ end
166
+
167
+ # Custom attribute writer method with validation
168
+ # @param [Object] payload Value to be assigned
169
+ def payload=(payload)
170
+ if payload.nil?
171
+ fail ArgumentError, 'payload cannot be nil'
172
+ end
173
+
174
+ @payload = payload
175
+ end
176
+
177
+ # Checks equality by comparing each attribute.
178
+ # @param [Object] Object to be compared
179
+ def ==(o)
180
+ return true if self.equal?(o)
181
+ self.class == o.class &&
182
+ nonce == o.nonce &&
183
+ type == o.type &&
184
+ payload == o.payload
185
+ end
186
+
187
+ # @see the `==` method
188
+ # @param [Object] Object to be compared
189
+ def eql?(o)
190
+ self == o
191
+ end
192
+
193
+ # Calculates hash code according to all attributes.
194
+ # @return [Integer] Hash code
195
+ def hash
196
+ [nonce, type, payload].hash
197
+ end
198
+
199
+ # Builds the object from hash
200
+ # @param [Hash] attributes Model attributes in the form of hash
201
+ # @return [Object] Returns the model itself
202
+ def self.build_from_hash(attributes)
203
+ return nil unless attributes.is_a?(Hash)
204
+ attributes = attributes.transform_keys(&:to_sym)
205
+ transformed_hash = {}
206
+ openapi_types.each_pair do |key, type|
207
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
208
+ transformed_hash["#{key}"] = nil
209
+ elsif type =~ /\AArray<(.*)>/i
210
+ # check to ensure the input is an array given that the attribute
211
+ # is documented as an array but the input is not
212
+ if attributes[attribute_map[key]].is_a?(Array)
213
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
214
+ end
215
+ elsif !attributes[attribute_map[key]].nil?
216
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
217
+ end
218
+ end
219
+ new(transformed_hash)
220
+ end
221
+
222
+ # Deserializes the data based on type
223
+ # @param string type Data type
224
+ # @param string value Value to be deserialized
225
+ # @return [Object] Deserialized data
226
+ def self._deserialize(type, value)
227
+ case type.to_sym
228
+ when :Time
229
+ Time.parse(value)
230
+ when :Date
231
+ Date.parse(value)
232
+ when :String
233
+ value.to_s
234
+ when :Integer
235
+ value.to_i
236
+ when :Float
237
+ value.to_f
238
+ when :Boolean
239
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
240
+ true
241
+ else
242
+ false
243
+ end
244
+ when :Object
245
+ # generic object (usually a Hash), return directly
246
+ value
247
+ when /\AArray<(?<inner_type>.+)>\z/
248
+ inner_type = Regexp.last_match[:inner_type]
249
+ value.map { |v| _deserialize(inner_type, v) }
250
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
251
+ k_type = Regexp.last_match[:k_type]
252
+ v_type = Regexp.last_match[:v_type]
253
+ {}.tap do |hash|
254
+ value.each do |k, v|
255
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
256
+ end
257
+ end
258
+ else # model
259
+ # models (e.g. Pet) or oneOf
260
+ klass = RagieRubySdk.const_get(type)
261
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
262
+ end
263
+ end
264
+
265
+ # Returns the string representation of the object
266
+ # @return [String] String presentation of the object
267
+ def to_s
268
+ to_hash.to_s
269
+ end
270
+
271
+ # to_body is an alias to to_hash (backward compatibility)
272
+ # @return [Hash] Returns the object in the form of hash
273
+ def to_body
274
+ to_hash
275
+ end
276
+
277
+ # Returns the object in the form of hash
278
+ # @return [Hash] Returns the object in the form of hash
279
+ def to_hash
280
+ hash = {}
281
+ self.class.attribute_map.each_pair do |attr, param|
282
+ value = self.send(attr)
283
+ if value.nil?
284
+ is_nullable = self.class.openapi_nullable.include?(attr)
285
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
286
+ end
287
+
288
+ hash[param] = _to_hash(value)
289
+ end
290
+ hash
291
+ end
292
+
293
+ # Outputs non-array value in the form of hash
294
+ # For object, use to_hash. Otherwise, just return the value
295
+ # @param [Object] value Any valid value
296
+ # @return [Hash] Returns the value in the form of hash
297
+ def _to_hash(value)
298
+ if value.is_a?(Array)
299
+ value.compact.map { |v| _to_hash(v) }
300
+ elsif value.is_a?(Hash)
301
+ {}.tap do |hash|
302
+ value.each { |k, v| hash[k] = _to_hash(v) }
303
+ end
304
+ elsif value.respond_to? :to_hash
305
+ value.to_hash
306
+ else
307
+ value
308
+ end
309
+ end
310
+
311
+ end
312
+
313
+ end