qanswer-sdk 0.1.0.dev0__py3-none-any.whl

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 (618) hide show
  1. qanswer_sdk/__init__.py +1256 -0
  2. qanswer_sdk/api/__init__.py +63 -0
  3. qanswer_sdk/api/admin_api.py +7893 -0
  4. qanswer_sdk/api/ai_assistant_access_rights_api.py +5881 -0
  5. qanswer_sdk/api/ai_assistant_api.py +11047 -0
  6. qanswer_sdk/api/anthropic_compatible_api.py +311 -0
  7. qanswer_sdk/api/auto_complete_api.py +612 -0
  8. qanswer_sdk/api/bot_slack_api.py +1015 -0
  9. qanswer_sdk/api/branding_api.py +5733 -0
  10. qanswer_sdk/api/bulk_reindex_api.py +2029 -0
  11. qanswer_sdk/api/chatbot_api.py +1102 -0
  12. qanswer_sdk/api/connector_audio_api.py +3469 -0
  13. qanswer_sdk/api/connector_document_api.py +2685 -0
  14. qanswer_sdk/api/connector_e_consilium_api.py +333 -0
  15. qanswer_sdk/api/connector_e_consilium_search_index_api_api.py +1231 -0
  16. qanswer_sdk/api/connector_google_drive_api.py +2175 -0
  17. qanswer_sdk/api/connector_imapapi_api.py +1866 -0
  18. qanswer_sdk/api/connector_one_drive_api.py +1579 -0
  19. qanswer_sdk/api/connector_onenote_api.py +1596 -0
  20. qanswer_sdk/api/connector_pinecone_api.py +893 -0
  21. qanswer_sdk/api/connector_publication_office_api_api.py +1230 -0
  22. qanswer_sdk/api/connector_qn_a_api.py +1521 -0
  23. qanswer_sdk/api/connector_rdf_answer_api.py +1454 -0
  24. qanswer_sdk/api/connector_rdf_api.py +5090 -0
  25. qanswer_sdk/api/connector_sharepoint_api.py +3926 -0
  26. qanswer_sdk/api/connector_websearch_api.py +332 -0
  27. qanswer_sdk/api/connector_website_api.py +3108 -0
  28. qanswer_sdk/api/connector_x_wiki_api_api.py +1278 -0
  29. qanswer_sdk/api/connectors_api.py +6946 -0
  30. qanswer_sdk/api/connectors_data_api.py +5903 -0
  31. qanswer_sdk/api/conversation_logs_api.py +14228 -0
  32. qanswer_sdk/api/dataset_config_api.py +4016 -0
  33. qanswer_sdk/api/debug_api.py +278 -0
  34. qanswer_sdk/api/default_api.py +763 -0
  35. qanswer_sdk/api/frontend_config_api.py +270 -0
  36. qanswer_sdk/api/health_check_api_api.py +278 -0
  37. qanswer_sdk/api/mcp_api.py +10758 -0
  38. qanswer_sdk/api/metadata_api.py +1309 -0
  39. qanswer_sdk/api/notifications_api.py +1842 -0
  40. qanswer_sdk/api/o_auth2_api.py +648 -0
  41. qanswer_sdk/api/open_ai_compatible_api.py +1093 -0
  42. qanswer_sdk/api/payment_api.py +1854 -0
  43. qanswer_sdk/api/retention_policy_api.py +4404 -0
  44. qanswer_sdk/api/socket_api.py +4706 -0
  45. qanswer_sdk/api/speech_to_text_api.py +968 -0
  46. qanswer_sdk/api/task_ai_excel_api.py +3749 -0
  47. qanswer_sdk/api/task_chat_api.py +2079 -0
  48. qanswer_sdk/api/task_entity_linking_api.py +315 -0
  49. qanswer_sdk/api/task_rdf_linker_api.py +4407 -0
  50. qanswer_sdk/api/task_rdf_sparql_endpoint_api.py +3355 -0
  51. qanswer_sdk/api/task_rdf_text_linker_api.py +1513 -0
  52. qanswer_sdk/api/task_report_copilot_api.py +7355 -0
  53. qanswer_sdk/api/task_search_api.py +2142 -0
  54. qanswer_sdk/api/task_text2sparql_api.py +947 -0
  55. qanswer_sdk/api/task_text_classification_api.py +592 -0
  56. qanswer_sdk/api/tasks_api.py +26394 -0
  57. qanswer_sdk/api/tool_embedder_api.py +5532 -0
  58. qanswer_sdk/api/tool_llm_api.py +6364 -0
  59. qanswer_sdk/api/unit_organizations_api.py +8600 -0
  60. qanswer_sdk/api/unit_teams_api.py +4492 -0
  61. qanswer_sdk/api/unit_user_api.py +12759 -0
  62. qanswer_sdk/api_client.py +804 -0
  63. qanswer_sdk/api_response.py +21 -0
  64. qanswer_sdk/configuration.py +614 -0
  65. qanswer_sdk/exceptions.py +216 -0
  66. qanswer_sdk/models/__init__.py +562 -0
  67. qanswer_sdk/models/access_audio_spans_response_model.py +91 -0
  68. qanswer_sdk/models/access_pdf_payload_model.py +102 -0
  69. qanswer_sdk/models/access_type.py +42 -0
  70. qanswer_sdk/models/access_type_shared.py +38 -0
  71. qanswer_sdk/models/add_qn_a_request.py +103 -0
  72. qanswer_sdk/models/add_synonyms.py +93 -0
  73. qanswer_sdk/models/add_synonyms_resp.py +89 -0
  74. qanswer_sdk/models/admin_overall_stats_response.py +105 -0
  75. qanswer_sdk/models/admin_user_overall_stats.py +99 -0
  76. qanswer_sdk/models/advanced_o_auth2_mcp_authentication_config.py +95 -0
  77. qanswer_sdk/models/aggregate.py +93 -0
  78. qanswer_sdk/models/aggregation.py +110 -0
  79. qanswer_sdk/models/aggregation_type.py +41 -0
  80. qanswer_sdk/models/aggregations_group.py +102 -0
  81. qanswer_sdk/models/ai_assistant_clone_response.py +91 -0
  82. qanswer_sdk/models/ai_assistant_dto.py +113 -0
  83. qanswer_sdk/models/ai_assistant_filter_dto.py +113 -0
  84. qanswer_sdk/models/ai_assistant_list.py +101 -0
  85. qanswer_sdk/models/ai_assistant_share_response.py +93 -0
  86. qanswer_sdk/models/ai_assistant_shared_access.py +95 -0
  87. qanswer_sdk/models/ai_excel_entity_result.py +97 -0
  88. qanswer_sdk/models/ai_excel_entity_search_payload.py +95 -0
  89. qanswer_sdk/models/ai_excel_entity_search_response.py +103 -0
  90. qanswer_sdk/models/ai_excel_global_settings.py +95 -0
  91. qanswer_sdk/models/ai_excel_global_settings_request.py +95 -0
  92. qanswer_sdk/models/ai_excel_task_settings.py +119 -0
  93. qanswer_sdk/models/ai_excel_task_update.py +119 -0
  94. qanswer_sdk/models/ai_excel_template_create.py +119 -0
  95. qanswer_sdk/models/ai_excel_template_read.py +121 -0
  96. qanswer_sdk/models/ai_excel_template_settings_request.py +91 -0
  97. qanswer_sdk/models/ai_excel_template_update.py +125 -0
  98. qanswer_sdk/models/ai_excel_templates_search_request.py +104 -0
  99. qanswer_sdk/models/ai_excel_templates_search_response.py +101 -0
  100. qanswer_sdk/models/allowed_extension.py +53 -0
  101. qanswer_sdk/models/allowed_file_extensions.py +88 -0
  102. qanswer_sdk/models/api_key_header_type.py +39 -0
  103. qanswer_sdk/models/api_key_mcp_authentication_config.py +98 -0
  104. qanswer_sdk/models/applied_filter_type.py +37 -0
  105. qanswer_sdk/models/applied_metadata_filter.py +97 -0
  106. qanswer_sdk/models/apply_template_task_settings_to_slots_response.py +89 -0
  107. qanswer_sdk/models/assistant_category_color_definition.py +89 -0
  108. qanswer_sdk/models/assistant_category_color_item.py +89 -0
  109. qanswer_sdk/models/assistant_category_colors_update_payload.py +95 -0
  110. qanswer_sdk/models/assistant_category_count.py +91 -0
  111. qanswer_sdk/models/assistant_message_stop.py +93 -0
  112. qanswer_sdk/models/assistant_retention_response.py +97 -0
  113. qanswer_sdk/models/assistant_task.py +43 -0
  114. qanswer_sdk/models/assistant_template_with_tools_selection_dto.py +123 -0
  115. qanswer_sdk/models/audio_allowed_file_extensions.py +87 -0
  116. qanswer_sdk/models/audio_format.py +37 -0
  117. qanswer_sdk/models/audio_segment.py +95 -0
  118. qanswer_sdk/models/audio_segment_update_payload.py +97 -0
  119. qanswer_sdk/models/audio_segment_update_response.py +91 -0
  120. qanswer_sdk/models/audio_speaker_update_payload.py +99 -0
  121. qanswer_sdk/models/audio_speaker_update_response.py +91 -0
  122. qanswer_sdk/models/audio_transcription_list_response.py +101 -0
  123. qanswer_sdk/models/audio_transcription_mode.py +37 -0
  124. qanswer_sdk/models/audio_transcription_record.py +101 -0
  125. qanswer_sdk/models/audio_transcription_status.py +39 -0
  126. qanswer_sdk/models/audio_upload_response.py +91 -0
  127. qanswer_sdk/models/audio_word_segment.py +93 -0
  128. qanswer_sdk/models/audio_word_span_change.py +94 -0
  129. qanswer_sdk/models/audio_word_span_update_payload.py +104 -0
  130. qanswer_sdk/models/audio_word_span_update_response.py +91 -0
  131. qanswer_sdk/models/audio_word_update_payload.py +100 -0
  132. qanswer_sdk/models/audio_word_update_response.py +91 -0
  133. qanswer_sdk/models/auth_link_response.py +91 -0
  134. qanswer_sdk/models/auto_bot_description_request.py +89 -0
  135. qanswer_sdk/models/auto_bot_description_response.py +87 -0
  136. qanswer_sdk/models/available_aggregation.py +92 -0
  137. qanswer_sdk/models/available_connectors_response.py +92 -0
  138. qanswer_sdk/models/available_logs_visibility_policy.py +91 -0
  139. qanswer_sdk/models/available_space_quota_for_dataset.py +95 -0
  140. qanswer_sdk/models/available_storage_preference.py +91 -0
  141. qanswer_sdk/models/base_connectors_response.py +89 -0
  142. qanswer_sdk/models/base_conversation_response.py +89 -0
  143. qanswer_sdk/models/base_feedback_response.py +89 -0
  144. qanswer_sdk/models/bot_answer_length.py +38 -0
  145. qanswer_sdk/models/branding_app_title.py +87 -0
  146. qanswer_sdk/models/branding_system_message.py +87 -0
  147. qanswer_sdk/models/bulk_reindex_counts_by_type.py +89 -0
  148. qanswer_sdk/models/bulk_reindex_item_status.py +41 -0
  149. qanswer_sdk/models/bulk_reindex_job_detail_dto.py +103 -0
  150. qanswer_sdk/models/bulk_reindex_job_dto.py +125 -0
  151. qanswer_sdk/models/bulk_reindex_job_item_dto.py +113 -0
  152. qanswer_sdk/models/bulk_reindex_job_item_sort_by.py +40 -0
  153. qanswer_sdk/models/bulk_reindex_job_status.py +41 -0
  154. qanswer_sdk/models/bulk_reindex_jobs_list_response.py +97 -0
  155. qanswer_sdk/models/bulk_reindex_preview_counts.py +99 -0
  156. qanswer_sdk/models/bulk_reindex_preview_request.py +91 -0
  157. qanswer_sdk/models/bulk_reindex_preview_response.py +102 -0
  158. qanswer_sdk/models/bulk_reindex_skip_reason.py +40 -0
  159. qanswer_sdk/models/bulk_reindex_sort_order.py +37 -0
  160. qanswer_sdk/models/bulk_reindex_submit_request.py +94 -0
  161. qanswer_sdk/models/bulk_update_tool_selections_request.py +87 -0
  162. qanswer_sdk/models/capability_type.py +37 -0
  163. qanswer_sdk/models/cell.py +89 -0
  164. qanswer_sdk/models/change_password.py +89 -0
  165. qanswer_sdk/models/change_password_admin.py +89 -0
  166. qanswer_sdk/models/change_role.py +90 -0
  167. qanswer_sdk/models/chat_task_settings.py +141 -0
  168. qanswer_sdk/models/chat_task_settings_update_payload.py +95 -0
  169. qanswer_sdk/models/chat_task_update.py +139 -0
  170. qanswer_sdk/models/chatbot_chat_payload.py +150 -0
  171. qanswer_sdk/models/chatbot_default_settings_response.py +95 -0
  172. qanswer_sdk/models/chatbot_llm_dto.py +120 -0
  173. qanswer_sdk/models/chatbot_response.py +143 -0
  174. qanswer_sdk/models/chatbot_setting_dto.py +99 -0
  175. qanswer_sdk/models/chatbot_setting_request.py +91 -0
  176. qanswer_sdk/models/class_info.py +89 -0
  177. qanswer_sdk/models/config.py +228 -0
  178. qanswer_sdk/models/config1.py +138 -0
  179. qanswer_sdk/models/connector_config_list_response.py +99 -0
  180. qanswer_sdk/models/connector_config_model.py +96 -0
  181. qanswer_sdk/models/connector_config_patch_payload.py +93 -0
  182. qanswer_sdk/models/connector_config_response.py +95 -0
  183. qanswer_sdk/models/connector_config_sync_response.py +93 -0
  184. qanswer_sdk/models/connector_config_type.py +37 -0
  185. qanswer_sdk/models/connector_model.py +114 -0
  186. qanswer_sdk/models/connector_type.py +51 -0
  187. qanswer_sdk/models/connector_type_dto.py +92 -0
  188. qanswer_sdk/models/connector_type_list_dto.py +95 -0
  189. qanswer_sdk/models/content_item.py +106 -0
  190. qanswer_sdk/models/content_item_type.py +39 -0
  191. qanswer_sdk/models/conversation_aggregations_request.py +107 -0
  192. qanswer_sdk/models/conversation_message.py +230 -0
  193. qanswer_sdk/models/conversation_message_error_key.py +52 -0
  194. qanswer_sdk/models/conversation_message_search_result.py +112 -0
  195. qanswer_sdk/models/conversation_model.py +144 -0
  196. qanswer_sdk/models/conversation_overall_stats.py +97 -0
  197. qanswer_sdk/models/conversation_overall_stats_response.py +95 -0
  198. qanswer_sdk/models/conversation_retention_response.py +91 -0
  199. qanswer_sdk/models/conversation_statistics.py +95 -0
  200. qanswer_sdk/models/conversation_update.py +93 -0
  201. qanswer_sdk/models/conversation_users_stats.py +99 -0
  202. qanswer_sdk/models/conversation_users_stats_response.py +99 -0
  203. qanswer_sdk/models/coordinates.py +89 -0
  204. qanswer_sdk/models/cost_summary_dto.py +99 -0
  205. qanswer_sdk/models/create_connector_request.py +95 -0
  206. qanswer_sdk/models/create_connector_response.py +95 -0
  207. qanswer_sdk/models/create_imap_connector_request.py +105 -0
  208. qanswer_sdk/models/create_pinecone_connector_request.py +97 -0
  209. qanswer_sdk/models/create_sharepoint_connector_from_certificate_request.py +105 -0
  210. qanswer_sdk/models/create_sharepoint_connector_request.py +103 -0
  211. qanswer_sdk/models/create_x_wiki_connector_request.py +103 -0
  212. qanswer_sdk/models/credits_info_dto.py +95 -0
  213. qanswer_sdk/models/credits_info_global_dto.py +97 -0
  214. qanswer_sdk/models/currency.py +38 -0
  215. qanswer_sdk/models/data.py +211 -0
  216. qanswer_sdk/models/data_filling_mode.py +39 -0
  217. qanswer_sdk/models/data_storage_preference.py +38 -0
  218. qanswer_sdk/models/dataset_config_request.py +138 -0
  219. qanswer_sdk/models/dataset_default_values_model.py +129 -0
  220. qanswer_sdk/models/dataset_detail.py +128 -0
  221. qanswer_sdk/models/dataset_detail_kg.py +88 -0
  222. qanswer_sdk/models/dataset_schema.py +193 -0
  223. qanswer_sdk/models/dataset_type.py +38 -0
  224. qanswer_sdk/models/dataset_update_object.py +185 -0
  225. qanswer_sdk/models/dataset_users_response.py +87 -0
  226. qanswer_sdk/models/default_prompt.py +100 -0
  227. qanswer_sdk/models/delete_connector_model.py +90 -0
  228. qanswer_sdk/models/delete_connector_request.py +99 -0
  229. qanswer_sdk/models/delete_connectors_response.py +89 -0
  230. qanswer_sdk/models/delete_files_status_response.py +91 -0
  231. qanswer_sdk/models/delete_index.py +91 -0
  232. qanswer_sdk/models/delete_index_resp.py +89 -0
  233. qanswer_sdk/models/delete_qn_a_pair_request.py +95 -0
  234. qanswer_sdk/models/delete_qn_a_pair_response.py +89 -0
  235. qanswer_sdk/models/delete_synonym.py +93 -0
  236. qanswer_sdk/models/delete_synonym_resp.py +89 -0
  237. qanswer_sdk/models/delete_synonyms.py +91 -0
  238. qanswer_sdk/models/diarization_queue_status.py +99 -0
  239. qanswer_sdk/models/document_content_response.py +91 -0
  240. qanswer_sdk/models/document_content_update_model.py +99 -0
  241. qanswer_sdk/models/document_file_delete_by_connector_model.py +101 -0
  242. qanswer_sdk/models/document_file_delete_by_id_model.py +91 -0
  243. qanswer_sdk/models/document_parsing_task_settings.py +124 -0
  244. qanswer_sdk/models/document_parsing_task_settings_update_payload.py +95 -0
  245. qanswer_sdk/models/document_parsing_task_update.py +121 -0
  246. qanswer_sdk/models/document_status_group.py +39 -0
  247. qanswer_sdk/models/document_status_response.py +89 -0
  248. qanswer_sdk/models/dummy_error.py +89 -0
  249. qanswer_sdk/models/duplicate_ai_excel_template_request.py +97 -0
  250. qanswer_sdk/models/duplicate_ai_excel_template_response.py +87 -0
  251. qanswer_sdk/models/duplicate_report_template_payload.py +97 -0
  252. qanswer_sdk/models/duplicate_report_template_response.py +87 -0
  253. qanswer_sdk/models/e_consilium_connector_config.py +108 -0
  254. qanswer_sdk/models/e_consilium_search_index_search_response.py +113 -0
  255. qanswer_sdk/models/econsilium_file_metadata.py +105 -0
  256. qanswer_sdk/models/econsilium_search_index_add_payload.py +107 -0
  257. qanswer_sdk/models/econsilium_search_index_additional_fields.py +103 -0
  258. qanswer_sdk/models/effective_retention_dto.py +95 -0
  259. qanswer_sdk/models/email_folder.py +91 -0
  260. qanswer_sdk/models/email_request.py +87 -0
  261. qanswer_sdk/models/embedder_cost_filter.py +112 -0
  262. qanswer_sdk/models/embedder_cost_list.py +101 -0
  263. qanswer_sdk/models/embedder_create_dto.py +143 -0
  264. qanswer_sdk/models/embedder_detailed_dto.py +163 -0
  265. qanswer_sdk/models/embedder_dto.py +103 -0
  266. qanswer_sdk/models/embedder_list_dto.py +101 -0
  267. qanswer_sdk/models/embedder_ref.py +95 -0
  268. qanswer_sdk/models/embedder_update_dto.py +135 -0
  269. qanswer_sdk/models/embedding_endpoint_import_failure.py +89 -0
  270. qanswer_sdk/models/embedding_endpoint_import_response.py +99 -0
  271. qanswer_sdk/models/embedding_endpoint_modality.py +37 -0
  272. qanswer_sdk/models/embedding_endpoint_validation_response.py +90 -0
  273. qanswer_sdk/models/embedding_provider.py +44 -0
  274. qanswer_sdk/models/enable_enhanced_context_payload.py +91 -0
  275. qanswer_sdk/models/enable_enhanced_context_response.py +87 -0
  276. qanswer_sdk/models/endpoint_status.py +38 -0
  277. qanswer_sdk/models/entity_description_dto.py +93 -0
  278. qanswer_sdk/models/entity_linking_payload.py +97 -0
  279. qanswer_sdk/models/entity_linking_response.py +97 -0
  280. qanswer_sdk/models/entity_model_in_linking.py +95 -0
  281. qanswer_sdk/models/es_meta_data.py +92 -0
  282. qanswer_sdk/models/es_meta_data_value.py +87 -0
  283. qanswer_sdk/models/evaluate_feedback_response.py +109 -0
  284. qanswer_sdk/models/evaluate_single_feedback_response.py +97 -0
  285. qanswer_sdk/models/extra_body.py +91 -0
  286. qanswer_sdk/models/extract_hyper_links_payload.py +100 -0
  287. qanswer_sdk/models/extract_robot_links_payload.py +88 -0
  288. qanswer_sdk/models/extract_robot_links_response.py +88 -0
  289. qanswer_sdk/models/extraction_strategy.py +38 -0
  290. qanswer_sdk/models/fact.py +96 -0
  291. qanswer_sdk/models/feedback_evaluation_history_entries_response.py +101 -0
  292. qanswer_sdk/models/feedback_evaluation_history_entry_model.py +105 -0
  293. qanswer_sdk/models/feedback_model.py +132 -0
  294. qanswer_sdk/models/feedback_response.py +95 -0
  295. qanswer_sdk/models/feedback_update.py +105 -0
  296. qanswer_sdk/models/file_acl_principal.py +99 -0
  297. qanswer_sdk/models/file_acl_response.py +101 -0
  298. qanswer_sdk/models/file_es_meta_data.py +116 -0
  299. qanswer_sdk/models/file_failure_reason.py +49 -0
  300. qanswer_sdk/models/file_folder_model.py +117 -0
  301. qanswer_sdk/models/file_model.py +124 -0
  302. qanswer_sdk/models/file_status.py +43 -0
  303. qanswer_sdk/models/file_type.py +37 -0
  304. qanswer_sdk/models/file_upload_payload.py +107 -0
  305. qanswer_sdk/models/files_by_connector_model.py +89 -0
  306. qanswer_sdk/models/g_drive_connector_info.py +96 -0
  307. qanswer_sdk/models/g_drive_download_by_ids.py +89 -0
  308. qanswer_sdk/models/g_drive_download_request.py +103 -0
  309. qanswer_sdk/models/g_drive_refresh_request.py +91 -0
  310. qanswer_sdk/models/generation_params.py +89 -0
  311. qanswer_sdk/models/get_connector_by_id_response.py +91 -0
  312. qanswer_sdk/models/get_conversation_response.py +95 -0
  313. qanswer_sdk/models/global_config_dto.py +155 -0
  314. qanswer_sdk/models/google_drive_connector_config.py +110 -0
  315. qanswer_sdk/models/guardrail_endpoint.py +112 -0
  316. qanswer_sdk/models/guardrail_mode.py +38 -0
  317. qanswer_sdk/models/highlight_audio_payload_model.py +100 -0
  318. qanswer_sdk/models/http_validation_error.py +95 -0
  319. qanswer_sdk/models/iframe_strategy.py +38 -0
  320. qanswer_sdk/models/image_url_detail.py +38 -0
  321. qanswer_sdk/models/imap_add_payload.py +105 -0
  322. qanswer_sdk/models/imap_additional_fields.py +101 -0
  323. qanswer_sdk/models/imap_file_metadata.py +108 -0
  324. qanswer_sdk/models/imap_search_response.py +113 -0
  325. qanswer_sdk/models/index_config.py +89 -0
  326. qanswer_sdk/models/install_response.py +89 -0
  327. qanswer_sdk/models/interface_origin.py +47 -0
  328. qanswer_sdk/models/ip2_geo_response.py +91 -0
  329. qanswer_sdk/models/is_enabled_response.py +87 -0
  330. qanswer_sdk/models/jwt_authentication_response.py +93 -0
  331. qanswer_sdk/models/label.py +89 -0
  332. qanswer_sdk/models/labeled_node.py +89 -0
  333. qanswer_sdk/models/language.py +38 -0
  334. qanswer_sdk/models/last_updated_template_conversation_id_response.py +87 -0
  335. qanswer_sdk/models/link.py +99 -0
  336. qanswer_sdk/models/link_extraction_response.py +97 -0
  337. qanswer_sdk/models/link_result_paginated.py +97 -0
  338. qanswer_sdk/models/linked_entity_model_in_linking.py +99 -0
  339. qanswer_sdk/models/linker.py +103 -0
  340. qanswer_sdk/models/linking_result.py +95 -0
  341. qanswer_sdk/models/links.py +99 -0
  342. qanswer_sdk/models/list_connectors_response.py +95 -0
  343. qanswer_sdk/models/list_conversation_response.py +105 -0
  344. qanswer_sdk/models/list_feedback_response.py +105 -0
  345. qanswer_sdk/models/list_files_connector_response.py +107 -0
  346. qanswer_sdk/models/list_socket_events.py +88 -0
  347. qanswer_sdk/models/list_synonyms_model.py +95 -0
  348. qanswer_sdk/models/llm_context_ranges.py +93 -0
  349. qanswer_sdk/models/llm_cost_filter.py +112 -0
  350. qanswer_sdk/models/llm_cost_list.py +101 -0
  351. qanswer_sdk/models/llm_create_dto.py +177 -0
  352. qanswer_sdk/models/llm_detailed_dto.py +198 -0
  353. qanswer_sdk/models/llm_dto.py +120 -0
  354. qanswer_sdk/models/llm_endpoint.py +179 -0
  355. qanswer_sdk/models/llm_endpoint_default_prompts.py +93 -0
  356. qanswer_sdk/models/llm_endpoint_import_failure.py +89 -0
  357. qanswer_sdk/models/llm_endpoint_import_response.py +99 -0
  358. qanswer_sdk/models/llm_endpoint_modality.py +37 -0
  359. qanswer_sdk/models/llm_endpoint_provider.py +44 -0
  360. qanswer_sdk/models/llm_endpoint_read.py +179 -0
  361. qanswer_sdk/models/llm_endpoint_validation_response.py +90 -0
  362. qanswer_sdk/models/llm_health_response.py +89 -0
  363. qanswer_sdk/models/llm_list_detailed_dto.py +101 -0
  364. qanswer_sdk/models/llm_list_dto.py +101 -0
  365. qanswer_sdk/models/llm_update_dto.py +174 -0
  366. qanswer_sdk/models/location_details.py +97 -0
  367. qanswer_sdk/models/log_stats_request.py +100 -0
  368. qanswer_sdk/models/login_request.py +89 -0
  369. qanswer_sdk/models/logs_visibility_policy.py +38 -0
  370. qanswer_sdk/models/logs_visibility_policy_payload.py +92 -0
  371. qanswer_sdk/models/logs_visibility_policy_response.py +92 -0
  372. qanswer_sdk/models/mcp_auth_field_definition.py +98 -0
  373. qanswer_sdk/models/mcp_auth_field_type.py +37 -0
  374. qanswer_sdk/models/mcp_authentication_type.py +39 -0
  375. qanswer_sdk/models/mcp_connection.py +108 -0
  376. qanswer_sdk/models/mcp_connection_create.py +100 -0
  377. qanswer_sdk/models/mcp_server.py +146 -0
  378. qanswer_sdk/models/mcp_server_create.py +116 -0
  379. qanswer_sdk/models/mcp_server_type.py +37 -0
  380. qanswer_sdk/models/mcp_server_update.py +114 -0
  381. qanswer_sdk/models/mcp_tool_dto.py +131 -0
  382. qanswer_sdk/models/mcp_tool_info.py +95 -0
  383. qanswer_sdk/models/mcp_tool_selection_source.py +37 -0
  384. qanswer_sdk/models/mcp_tool_sync_action.py +39 -0
  385. qanswer_sdk/models/mcp_tool_sync_diff.py +94 -0
  386. qanswer_sdk/models/mcp_tool_sync_preview.py +95 -0
  387. qanswer_sdk/models/mcp_tool_update.py +91 -0
  388. qanswer_sdk/models/mcp_transport.py +37 -0
  389. qanswer_sdk/models/mcp_visibility.py +38 -0
  390. qanswer_sdk/models/mcpo_auth2_authorize_body.py +105 -0
  391. qanswer_sdk/models/mcpo_auth2_initiating_origin.py +42 -0
  392. qanswer_sdk/models/message_role.py +38 -0
  393. qanswer_sdk/models/messages_stats_per_day_response.py +99 -0
  394. qanswer_sdk/models/microsoft_connector_config.py +110 -0
  395. qanswer_sdk/models/modify_connector_request.py +98 -0
  396. qanswer_sdk/models/modify_file_display_name_request.py +97 -0
  397. qanswer_sdk/models/notification_dto.py +114 -0
  398. qanswer_sdk/models/notification_filter.py +107 -0
  399. qanswer_sdk/models/notification_list_dto.py +101 -0
  400. qanswer_sdk/models/notification_payload_add_to_org_dto.py +87 -0
  401. qanswer_sdk/models/notification_payload_add_to_team_dto.py +89 -0
  402. qanswer_sdk/models/notification_payload_ai_assistant_shared_dto.py +100 -0
  403. qanswer_sdk/models/notification_payload_conversation_shared_dto.py +96 -0
  404. qanswer_sdk/models/notification_payload_human_takeover_requested_dto.py +89 -0
  405. qanswer_sdk/models/notification_payload_quota_reaching_dto.py +91 -0
  406. qanswer_sdk/models/notification_read_dto.py +89 -0
  407. qanswer_sdk/models/notification_type.py +44 -0
  408. qanswer_sdk/models/o_auth_redirect_response.py +89 -0
  409. qanswer_sdk/models/o_auth_service_dto.py +89 -0
  410. qanswer_sdk/models/one_drive_download_by_ids.py +89 -0
  411. qanswer_sdk/models/one_drive_download_request.py +103 -0
  412. qanswer_sdk/models/one_note_download_by_ids.py +91 -0
  413. qanswer_sdk/models/one_note_download_request.py +103 -0
  414. qanswer_sdk/models/org_llm_detailed_dto.py +105 -0
  415. qanswer_sdk/models/org_llm_features_dto.py +89 -0
  416. qanswer_sdk/models/org_role.py +37 -0
  417. qanswer_sdk/models/org_user_profile_dto.py +210 -0
  418. qanswer_sdk/models/org_user_profile_list_dto.py +101 -0
  419. qanswer_sdk/models/organization_admin_dto.py +97 -0
  420. qanswer_sdk/models/organization_creation_dto.py +91 -0
  421. qanswer_sdk/models/organization_dto.py +93 -0
  422. qanswer_sdk/models/organization_list_dto.py +101 -0
  423. qanswer_sdk/models/organization_user_dto.py +101 -0
  424. qanswer_sdk/models/organization_user_list_dto.py +101 -0
  425. qanswer_sdk/models/paginated_report_templates.py +101 -0
  426. qanswer_sdk/models/password.py +89 -0
  427. qanswer_sdk/models/pinecone_index_model.py +91 -0
  428. qanswer_sdk/models/plan_dto.py +108 -0
  429. qanswer_sdk/models/predicted_class.py +89 -0
  430. qanswer_sdk/models/prepare_synonyms_upload_resp.py +99 -0
  431. qanswer_sdk/models/prepared_synonym_group.py +87 -0
  432. qanswer_sdk/models/pricing_plan.py +51 -0
  433. qanswer_sdk/models/pricing_type.py +38 -0
  434. qanswer_sdk/models/prompt_type.py +49 -0
  435. qanswer_sdk/models/provider.py +87 -0
  436. qanswer_sdk/models/publication_add_payload.py +105 -0
  437. qanswer_sdk/models/publication_file_metadata.py +105 -0
  438. qanswer_sdk/models/publication_office_additional_fields.py +111 -0
  439. qanswer_sdk/models/publication_office_connector_config.py +112 -0
  440. qanswer_sdk/models/publication_search_index_search_response.py +113 -0
  441. qanswer_sdk/models/qa_context.py +129 -0
  442. qanswer_sdk/models/qa_context_display_type.py +44 -0
  443. qanswer_sdk/models/qa_contexts.py +106 -0
  444. qanswer_sdk/models/qa_table.py +100 -0
  445. qanswer_sdk/models/qn_a_pair_model.py +103 -0
  446. qanswer_sdk/models/qn_a_pair_response.py +95 -0
  447. qanswer_sdk/models/rag_payload.py +185 -0
  448. qanswer_sdk/models/rag_response.py +147 -0
  449. qanswer_sdk/models/rdf_entity_linker_response.py +99 -0
  450. qanswer_sdk/models/rdf_linked_entity.py +97 -0
  451. qanswer_sdk/models/reasoning_effort.py +39 -0
  452. qanswer_sdk/models/reference_model.py +99 -0
  453. qanswer_sdk/models/refresh_frequency.py +39 -0
  454. qanswer_sdk/models/refresh_token_request.py +87 -0
  455. qanswer_sdk/models/refresh_website_connector_links_payload.py +96 -0
  456. qanswer_sdk/models/refresh_website_connector_payload.py +94 -0
  457. qanswer_sdk/models/register_pinecone_connector_request.py +95 -0
  458. qanswer_sdk/models/report_copilot_generation_from_slots_ack.py +91 -0
  459. qanswer_sdk/models/report_copilot_generation_from_slots_payload.py +95 -0
  460. qanswer_sdk/models/report_copilot_refinement_payload.py +106 -0
  461. qanswer_sdk/models/report_copilot_refinement_response.py +87 -0
  462. qanswer_sdk/models/report_copilot_slot_feedback_update.py +95 -0
  463. qanswer_sdk/models/report_copilot_slot_feedback_update_response.py +95 -0
  464. qanswer_sdk/models/report_copilot_slot_task_settings.py +121 -0
  465. qanswer_sdk/models/report_copilot_slot_task_settings_update.py +121 -0
  466. qanswer_sdk/models/report_copilot_task_settings.py +119 -0
  467. qanswer_sdk/models/report_copilot_task_settings_update_payload.py +95 -0
  468. qanswer_sdk/models/report_copilot_task_update.py +119 -0
  469. qanswer_sdk/models/report_template.py +155 -0
  470. qanswer_sdk/models/report_template_create_payload.py +132 -0
  471. qanswer_sdk/models/report_template_image_upload_response.py +87 -0
  472. qanswer_sdk/models/report_template_simplified.py +116 -0
  473. qanswer_sdk/models/report_template_simplified_payload.py +91 -0
  474. qanswer_sdk/models/report_template_task_settings_update_payload.py +91 -0
  475. qanswer_sdk/models/report_template_update_payload.py +136 -0
  476. qanswer_sdk/models/report_templates_search_payload.py +106 -0
  477. qanswer_sdk/models/reset_password.py +87 -0
  478. qanswer_sdk/models/response_audit_model.py +99 -0
  479. qanswer_sdk/models/response_audit_stats_response.py +101 -0
  480. qanswer_sdk/models/response_get_dummy_union_connector_config_model_api_connectors_config_dummy_models_union_get.py +228 -0
  481. qanswer_sdk/models/retention_policy_dto.py +106 -0
  482. qanswer_sdk/models/retention_policy_update.py +101 -0
  483. qanswer_sdk/models/retention_preview_response.py +92 -0
  484. qanswer_sdk/models/retention_run_progress_event.py +98 -0
  485. qanswer_sdk/models/retention_run_status_response.py +91 -0
  486. qanswer_sdk/models/retention_scope_type.py +38 -0
  487. qanswer_sdk/models/retention_sweep_result.py +89 -0
  488. qanswer_sdk/models/retention_unit.py +38 -0
  489. qanswer_sdk/models/retreive_all_synonyms_resp.py +99 -0
  490. qanswer_sdk/models/retry_params.py +89 -0
  491. qanswer_sdk/models/return_type.py +38 -0
  492. qanswer_sdk/models/role.py +90 -0
  493. qanswer_sdk/models/role_name.py +37 -0
  494. qanswer_sdk/models/scrolling_strategy.py +37 -0
  495. qanswer_sdk/models/search_conversation_messages_response.py +105 -0
  496. qanswer_sdk/models/search_document_response.py +107 -0
  497. qanswer_sdk/models/search_index_payload.py +114 -0
  498. qanswer_sdk/models/search_metadata_filter.py +94 -0
  499. qanswer_sdk/models/search_payload.py +150 -0
  500. qanswer_sdk/models/search_response.py +120 -0
  501. qanswer_sdk/models/search_synonyms_resp.py +91 -0
  502. qanswer_sdk/models/search_task_settings.py +135 -0
  503. qanswer_sdk/models/search_task_settings_update_payload.py +95 -0
  504. qanswer_sdk/models/search_task_update.py +133 -0
  505. qanswer_sdk/models/sender_type.py +38 -0
  506. qanswer_sdk/models/serve_pdf200_response.py +87 -0
  507. qanswer_sdk/models/share_point_connector_settings.py +99 -0
  508. qanswer_sdk/models/share_point_download_by_ids.py +99 -0
  509. qanswer_sdk/models/share_point_download_request.py +103 -0
  510. qanswer_sdk/models/shared_by.py +38 -0
  511. qanswer_sdk/models/shared_entity_type.py +38 -0
  512. qanswer_sdk/models/shared_organization_access_dto.py +116 -0
  513. qanswer_sdk/models/shared_team_access_dto.py +116 -0
  514. qanswer_sdk/models/shared_user.py +90 -0
  515. qanswer_sdk/models/sign_out_request.py +87 -0
  516. qanswer_sdk/models/sign_up_request.py +99 -0
  517. qanswer_sdk/models/slot.py +153 -0
  518. qanswer_sdk/models/slot_history_entry.py +119 -0
  519. qanswer_sdk/models/slot_in_prompt.py +91 -0
  520. qanswer_sdk/models/slot_info_with_latest_version.py +95 -0
  521. qanswer_sdk/models/slot_update.py +133 -0
  522. qanswer_sdk/models/socker_join_user.py +91 -0
  523. qanswer_sdk/models/socket_audio_transcription_status.py +102 -0
  524. qanswer_sdk/models/socket_conversation_message.py +245 -0
  525. qanswer_sdk/models/socket_dataset_reindexing_status.py +97 -0
  526. qanswer_sdk/models/socket_events_q_answer.py +55 -0
  527. qanswer_sdk/models/socket_feedback_evaluation_progress.py +108 -0
  528. qanswer_sdk/models/socket_file_metadata.py +194 -0
  529. qanswer_sdk/models/socket_file_status_batch.py +103 -0
  530. qanswer_sdk/models/socket_file_status_item.py +99 -0
  531. qanswer_sdk/models/socket_join_conversation.py +97 -0
  532. qanswer_sdk/models/socket_join_dataset.py +93 -0
  533. qanswer_sdk/models/socket_message_status.py +40 -0
  534. qanswer_sdk/models/socket_notification.py +109 -0
  535. qanswer_sdk/models/socket_report_continuation_response.py +100 -0
  536. qanswer_sdk/models/socket_report_copilot_generation_from_slots_response.py +116 -0
  537. qanswer_sdk/models/socket_report_copilot_generation_from_template_response.py +116 -0
  538. qanswer_sdk/models/socket_report_copilot_refinement_response.py +102 -0
  539. qanswer_sdk/models/socket_speech2_text_response.py +122 -0
  540. qanswer_sdk/models/socket_stop_conversation.py +97 -0
  541. qanswer_sdk/models/source.py +125 -0
  542. qanswer_sdk/models/source_metadata.py +109 -0
  543. qanswer_sdk/models/speech2_text_response.py +110 -0
  544. qanswer_sdk/models/stat_per_date.py +89 -0
  545. qanswer_sdk/models/status_response.py +89 -0
  546. qanswer_sdk/models/storage_active_status.py +37 -0
  547. qanswer_sdk/models/subscription_response.py +92 -0
  548. qanswer_sdk/models/subscription_status.py +39 -0
  549. qanswer_sdk/models/suggested_replies.py +87 -0
  550. qanswer_sdk/models/suggestion_list_response.py +87 -0
  551. qanswer_sdk/models/summa_server.py +101 -0
  552. qanswer_sdk/models/task_category.py +61 -0
  553. qanswer_sdk/models/task_name.py +43 -0
  554. qanswer_sdk/models/team_admin_dto.py +95 -0
  555. qanswer_sdk/models/team_creation_dto.py +89 -0
  556. qanswer_sdk/models/team_dto.py +93 -0
  557. qanswer_sdk/models/team_list_dto.py +101 -0
  558. qanswer_sdk/models/team_list_dto_teams_inner.py +149 -0
  559. qanswer_sdk/models/team_role.py +37 -0
  560. qanswer_sdk/models/team_with_count_dto.py +95 -0
  561. qanswer_sdk/models/teams_bot_auth_type.py +38 -0
  562. qanswer_sdk/models/teams_bot_registration_dto.py +107 -0
  563. qanswer_sdk/models/teams_bot_registration_upsert_dto.py +105 -0
  564. qanswer_sdk/models/template_clip_structure.py +114 -0
  565. qanswer_sdk/models/template_toggle_request.py +93 -0
  566. qanswer_sdk/models/terms_bucket.py +107 -0
  567. qanswer_sdk/models/test_imap_connection_payload.py +95 -0
  568. qanswer_sdk/models/text2_sparql_payload.py +187 -0
  569. qanswer_sdk/models/text2_sparql_task_settings.py +119 -0
  570. qanswer_sdk/models/text2_sparql_task_settings_update_payload.py +95 -0
  571. qanswer_sdk/models/text2_sparql_task_update.py +119 -0
  572. qanswer_sdk/models/text_classification_payload.py +99 -0
  573. qanswer_sdk/models/text_classification_response.py +87 -0
  574. qanswer_sdk/models/text_classification_v2_payload.py +99 -0
  575. qanswer_sdk/models/text_classification_v2_response.py +95 -0
  576. qanswer_sdk/models/thinking_block.py +91 -0
  577. qanswer_sdk/models/tool_selection.py +89 -0
  578. qanswer_sdk/models/total_stat.py +96 -0
  579. qanswer_sdk/models/ui_mappings.py +141 -0
  580. qanswer_sdk/models/update_file_es_meta_data.py +116 -0
  581. qanswer_sdk/models/update_metadata_model.py +97 -0
  582. qanswer_sdk/models/update_qn_a_pair_request.py +101 -0
  583. qanswer_sdk/models/update_qn_a_pair_response.py +89 -0
  584. qanswer_sdk/models/update_synonyms.py +95 -0
  585. qanswer_sdk/models/update_synonyms_resp.py +89 -0
  586. qanswer_sdk/models/upload_metadata.py +115 -0
  587. qanswer_sdk/models/user_credits_config_dto.py +99 -0
  588. qanswer_sdk/models/user_credits_dto.py +106 -0
  589. qanswer_sdk/models/user_dataset_api_key_dto.py +120 -0
  590. qanswer_sdk/models/user_dataset_mcp_tool_selection_dto.py +100 -0
  591. qanswer_sdk/models/user_dto.py +91 -0
  592. qanswer_sdk/models/user_identity_availability.py +87 -0
  593. qanswer_sdk/models/user_info_dto.py +95 -0
  594. qanswer_sdk/models/user_list_dto.py +101 -0
  595. qanswer_sdk/models/user_log_dto.py +102 -0
  596. qanswer_sdk/models/user_logs_list_dto.py +97 -0
  597. qanswer_sdk/models/user_mcp_tool_selection_dto.py +107 -0
  598. qanswer_sdk/models/user_oauth_token_dto.py +96 -0
  599. qanswer_sdk/models/user_profile_dto.py +199 -0
  600. qanswer_sdk/models/user_profile_list_dto.py +101 -0
  601. qanswer_sdk/models/user_team_dto.py +94 -0
  602. qanswer_sdk/models/validation_error.py +108 -0
  603. qanswer_sdk/models/validation_error_loc_inner.py +138 -0
  604. qanswer_sdk/models/warn_visibility.py +40 -0
  605. qanswer_sdk/models/websearch_connector_config.py +102 -0
  606. qanswer_sdk/models/websearch_scraping_site.py +91 -0
  607. qanswer_sdk/models/website_add_payload.py +102 -0
  608. qanswer_sdk/models/website_connector_config.py +102 -0
  609. qanswer_sdk/models/website_connector_settings.py +123 -0
  610. qanswer_sdk/models/widget_configs.py +109 -0
  611. qanswer_sdk/models/x_wiki_add_request.py +97 -0
  612. qanswer_sdk/models/x_wiki_download_by_ids.py +89 -0
  613. qanswer_sdk/py.typed +0 -0
  614. qanswer_sdk/rest.py +258 -0
  615. qanswer_sdk-0.1.0.dev0.dist-info/METADATA +252 -0
  616. qanswer_sdk-0.1.0.dev0.dist-info/RECORD +618 -0
  617. qanswer_sdk-0.1.0.dev0.dist-info/WHEEL +5 -0
  618. qanswer_sdk-0.1.0.dev0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,4407 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ free-text-client
5
+
6
+ QAnswer 2.0 API
7
+
8
+ The version of the OpenAPI document: 2.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import StrictBytes, StrictFloat, StrictInt, StrictStr
20
+ from typing import Any, Dict, List, Optional, Tuple, Union
21
+ from qanswer_sdk.models.aggregate import Aggregate
22
+ from qanswer_sdk.models.link_result_paginated import LinkResultPaginated
23
+ from qanswer_sdk.models.linker import Linker
24
+ from qanswer_sdk.models.linking_result import LinkingResult
25
+
26
+ from qanswer_sdk.api_client import ApiClient, RequestSerialized
27
+ from qanswer_sdk.api_response import ApiResponse
28
+ from qanswer_sdk.rest import RESTResponseType
29
+
30
+
31
+ class TaskRDFLinkerApi:
32
+ """NOTE: This class is auto generated by OpenAPI Generator
33
+ Ref: https://openapi-generator.tech
34
+
35
+ Do not edit the class manually.
36
+ """
37
+
38
+ def __init__(self, api_client=None) -> None:
39
+ if api_client is None:
40
+ api_client = ApiClient.get_default()
41
+ self.api_client = api_client
42
+
43
+
44
+ @validate_call
45
+ def analyze(
46
+ self,
47
+ username: StrictStr,
48
+ dataset: StrictStr,
49
+ linker: StrictStr,
50
+ _request_timeout: Union[
51
+ None,
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Tuple[
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Annotated[StrictFloat, Field(gt=0)]
56
+ ]
57
+ ] = None,
58
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
59
+ _content_type: Optional[StrictStr] = None,
60
+ _headers: Optional[Dict[StrictStr, Any]] = None,
61
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
62
+ ) -> LinkingResult:
63
+ """Analyze data for linking
64
+
65
+
66
+ :param username: (required)
67
+ :type username: str
68
+ :param dataset: (required)
69
+ :type dataset: str
70
+ :param linker: (required)
71
+ :type linker: str
72
+ :param _request_timeout: timeout setting for this request. If one
73
+ number provided, it will be total request
74
+ timeout. It can also be a pair (tuple) of
75
+ (connection, read) timeouts.
76
+ :type _request_timeout: int, tuple(int, int), optional
77
+ :param _request_auth: set to override the auth_settings for an a single
78
+ request; this effectively ignores the
79
+ authentication in the spec for a single request.
80
+ :type _request_auth: dict, optional
81
+ :param _content_type: force content-type for the request.
82
+ :type _content_type: str, Optional
83
+ :param _headers: set to override the headers for a single
84
+ request; this effectively ignores the headers
85
+ in the spec for a single request.
86
+ :type _headers: dict, optional
87
+ :param _host_index: set to override the host_index for a single
88
+ request; this effectively ignores the host_index
89
+ in the spec for a single request.
90
+ :type _host_index: int, optional
91
+ :return: Returns the result object.
92
+ """ # noqa: E501
93
+
94
+ _param = self._analyze_serialize(
95
+ username=username,
96
+ dataset=dataset,
97
+ linker=linker,
98
+ _request_auth=_request_auth,
99
+ _content_type=_content_type,
100
+ _headers=_headers,
101
+ _host_index=_host_index
102
+ )
103
+
104
+ _response_types_map: Dict[str, Optional[str]] = {
105
+ '200': "LinkingResult",
106
+ '422': "HTTPValidationError",
107
+ }
108
+ response_data = self.api_client.call_api(
109
+ *_param,
110
+ _request_timeout=_request_timeout
111
+ )
112
+ response_data.read()
113
+ return self.api_client.response_deserialize(
114
+ response_data=response_data,
115
+ response_types_map=_response_types_map,
116
+ ).data
117
+
118
+
119
+ @validate_call
120
+ def analyze_with_http_info(
121
+ self,
122
+ username: StrictStr,
123
+ dataset: StrictStr,
124
+ linker: StrictStr,
125
+ _request_timeout: Union[
126
+ None,
127
+ Annotated[StrictFloat, Field(gt=0)],
128
+ Tuple[
129
+ Annotated[StrictFloat, Field(gt=0)],
130
+ Annotated[StrictFloat, Field(gt=0)]
131
+ ]
132
+ ] = None,
133
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
134
+ _content_type: Optional[StrictStr] = None,
135
+ _headers: Optional[Dict[StrictStr, Any]] = None,
136
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
137
+ ) -> ApiResponse[LinkingResult]:
138
+ """Analyze data for linking
139
+
140
+
141
+ :param username: (required)
142
+ :type username: str
143
+ :param dataset: (required)
144
+ :type dataset: str
145
+ :param linker: (required)
146
+ :type linker: str
147
+ :param _request_timeout: timeout setting for this request. If one
148
+ number provided, it will be total request
149
+ timeout. It can also be a pair (tuple) of
150
+ (connection, read) timeouts.
151
+ :type _request_timeout: int, tuple(int, int), optional
152
+ :param _request_auth: set to override the auth_settings for an a single
153
+ request; this effectively ignores the
154
+ authentication in the spec for a single request.
155
+ :type _request_auth: dict, optional
156
+ :param _content_type: force content-type for the request.
157
+ :type _content_type: str, Optional
158
+ :param _headers: set to override the headers for a single
159
+ request; this effectively ignores the headers
160
+ in the spec for a single request.
161
+ :type _headers: dict, optional
162
+ :param _host_index: set to override the host_index for a single
163
+ request; this effectively ignores the host_index
164
+ in the spec for a single request.
165
+ :type _host_index: int, optional
166
+ :return: Returns the result object.
167
+ """ # noqa: E501
168
+
169
+ _param = self._analyze_serialize(
170
+ username=username,
171
+ dataset=dataset,
172
+ linker=linker,
173
+ _request_auth=_request_auth,
174
+ _content_type=_content_type,
175
+ _headers=_headers,
176
+ _host_index=_host_index
177
+ )
178
+
179
+ _response_types_map: Dict[str, Optional[str]] = {
180
+ '200': "LinkingResult",
181
+ '422': "HTTPValidationError",
182
+ }
183
+ response_data = self.api_client.call_api(
184
+ *_param,
185
+ _request_timeout=_request_timeout
186
+ )
187
+ response_data.read()
188
+ return self.api_client.response_deserialize(
189
+ response_data=response_data,
190
+ response_types_map=_response_types_map,
191
+ )
192
+
193
+
194
+ @validate_call
195
+ def analyze_without_preload_content(
196
+ self,
197
+ username: StrictStr,
198
+ dataset: StrictStr,
199
+ linker: StrictStr,
200
+ _request_timeout: Union[
201
+ None,
202
+ Annotated[StrictFloat, Field(gt=0)],
203
+ Tuple[
204
+ Annotated[StrictFloat, Field(gt=0)],
205
+ Annotated[StrictFloat, Field(gt=0)]
206
+ ]
207
+ ] = None,
208
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
209
+ _content_type: Optional[StrictStr] = None,
210
+ _headers: Optional[Dict[StrictStr, Any]] = None,
211
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
212
+ ) -> RESTResponseType:
213
+ """Analyze data for linking
214
+
215
+
216
+ :param username: (required)
217
+ :type username: str
218
+ :param dataset: (required)
219
+ :type dataset: str
220
+ :param linker: (required)
221
+ :type linker: str
222
+ :param _request_timeout: timeout setting for this request. If one
223
+ number provided, it will be total request
224
+ timeout. It can also be a pair (tuple) of
225
+ (connection, read) timeouts.
226
+ :type _request_timeout: int, tuple(int, int), optional
227
+ :param _request_auth: set to override the auth_settings for an a single
228
+ request; this effectively ignores the
229
+ authentication in the spec for a single request.
230
+ :type _request_auth: dict, optional
231
+ :param _content_type: force content-type for the request.
232
+ :type _content_type: str, Optional
233
+ :param _headers: set to override the headers for a single
234
+ request; this effectively ignores the headers
235
+ in the spec for a single request.
236
+ :type _headers: dict, optional
237
+ :param _host_index: set to override the host_index for a single
238
+ request; this effectively ignores the host_index
239
+ in the spec for a single request.
240
+ :type _host_index: int, optional
241
+ :return: Returns the result object.
242
+ """ # noqa: E501
243
+
244
+ _param = self._analyze_serialize(
245
+ username=username,
246
+ dataset=dataset,
247
+ linker=linker,
248
+ _request_auth=_request_auth,
249
+ _content_type=_content_type,
250
+ _headers=_headers,
251
+ _host_index=_host_index
252
+ )
253
+
254
+ _response_types_map: Dict[str, Optional[str]] = {
255
+ '200': "LinkingResult",
256
+ '422': "HTTPValidationError",
257
+ }
258
+ response_data = self.api_client.call_api(
259
+ *_param,
260
+ _request_timeout=_request_timeout
261
+ )
262
+ return response_data.response
263
+
264
+
265
+ def _analyze_serialize(
266
+ self,
267
+ username,
268
+ dataset,
269
+ linker,
270
+ _request_auth,
271
+ _content_type,
272
+ _headers,
273
+ _host_index,
274
+ ) -> RequestSerialized:
275
+
276
+ _host = None
277
+
278
+ _collection_formats: Dict[str, str] = {
279
+ }
280
+
281
+ _path_params: Dict[str, str] = {}
282
+ _query_params: List[Tuple[str, str]] = []
283
+ _header_params: Dict[str, Optional[str]] = _headers or {}
284
+ _form_params: List[Tuple[str, str]] = []
285
+ _files: Dict[
286
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
287
+ ] = {}
288
+ _body_params: Optional[bytes] = None
289
+
290
+ # process the path parameters
291
+ # process the query parameters
292
+ if username is not None:
293
+
294
+ _query_params.append(('username', username))
295
+
296
+ if dataset is not None:
297
+
298
+ _query_params.append(('dataset', dataset))
299
+
300
+ if linker is not None:
301
+
302
+ _query_params.append(('linker', linker))
303
+
304
+ # process the header parameters
305
+ # process the form parameters
306
+ # process the body parameter
307
+
308
+
309
+ # set the HTTP header `Accept`
310
+ if 'Accept' not in _header_params:
311
+ _header_params['Accept'] = self.api_client.select_header_accept(
312
+ [
313
+ 'application/json'
314
+ ]
315
+ )
316
+
317
+
318
+ # authentication setting
319
+ _auth_settings: List[str] = [
320
+ 'QAnswer-Api-Key',
321
+ 'Bearer token'
322
+ ]
323
+
324
+ return self.api_client.param_serialize(
325
+ method='POST',
326
+ resource_path='/api/tasks/rdf/linker/analyze',
327
+ path_params=_path_params,
328
+ query_params=_query_params,
329
+ header_params=_header_params,
330
+ body=_body_params,
331
+ post_params=_form_params,
332
+ files=_files,
333
+ auth_settings=_auth_settings,
334
+ collection_formats=_collection_formats,
335
+ _host=_host,
336
+ _request_auth=_request_auth
337
+ )
338
+
339
+
340
+
341
+
342
+ @validate_call
343
+ def delete_linker(
344
+ self,
345
+ username: StrictStr,
346
+ dataset: StrictStr,
347
+ linker: StrictStr,
348
+ _request_timeout: Union[
349
+ None,
350
+ Annotated[StrictFloat, Field(gt=0)],
351
+ Tuple[
352
+ Annotated[StrictFloat, Field(gt=0)],
353
+ Annotated[StrictFloat, Field(gt=0)]
354
+ ]
355
+ ] = None,
356
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
357
+ _content_type: Optional[StrictStr] = None,
358
+ _headers: Optional[Dict[StrictStr, Any]] = None,
359
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
360
+ ) -> str:
361
+ """Delete a linker
362
+
363
+
364
+ :param username: (required)
365
+ :type username: str
366
+ :param dataset: (required)
367
+ :type dataset: str
368
+ :param linker: (required)
369
+ :type linker: str
370
+ :param _request_timeout: timeout setting for this request. If one
371
+ number provided, it will be total request
372
+ timeout. It can also be a pair (tuple) of
373
+ (connection, read) timeouts.
374
+ :type _request_timeout: int, tuple(int, int), optional
375
+ :param _request_auth: set to override the auth_settings for an a single
376
+ request; this effectively ignores the
377
+ authentication in the spec for a single request.
378
+ :type _request_auth: dict, optional
379
+ :param _content_type: force content-type for the request.
380
+ :type _content_type: str, Optional
381
+ :param _headers: set to override the headers for a single
382
+ request; this effectively ignores the headers
383
+ in the spec for a single request.
384
+ :type _headers: dict, optional
385
+ :param _host_index: set to override the host_index for a single
386
+ request; this effectively ignores the host_index
387
+ in the spec for a single request.
388
+ :type _host_index: int, optional
389
+ :return: Returns the result object.
390
+ """ # noqa: E501
391
+
392
+ _param = self._delete_linker_serialize(
393
+ username=username,
394
+ dataset=dataset,
395
+ linker=linker,
396
+ _request_auth=_request_auth,
397
+ _content_type=_content_type,
398
+ _headers=_headers,
399
+ _host_index=_host_index
400
+ )
401
+
402
+ _response_types_map: Dict[str, Optional[str]] = {
403
+ '200': "str",
404
+ '422': "HTTPValidationError",
405
+ }
406
+ response_data = self.api_client.call_api(
407
+ *_param,
408
+ _request_timeout=_request_timeout
409
+ )
410
+ response_data.read()
411
+ return self.api_client.response_deserialize(
412
+ response_data=response_data,
413
+ response_types_map=_response_types_map,
414
+ ).data
415
+
416
+
417
+ @validate_call
418
+ def delete_linker_with_http_info(
419
+ self,
420
+ username: StrictStr,
421
+ dataset: StrictStr,
422
+ linker: StrictStr,
423
+ _request_timeout: Union[
424
+ None,
425
+ Annotated[StrictFloat, Field(gt=0)],
426
+ Tuple[
427
+ Annotated[StrictFloat, Field(gt=0)],
428
+ Annotated[StrictFloat, Field(gt=0)]
429
+ ]
430
+ ] = None,
431
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
432
+ _content_type: Optional[StrictStr] = None,
433
+ _headers: Optional[Dict[StrictStr, Any]] = None,
434
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
435
+ ) -> ApiResponse[str]:
436
+ """Delete a linker
437
+
438
+
439
+ :param username: (required)
440
+ :type username: str
441
+ :param dataset: (required)
442
+ :type dataset: str
443
+ :param linker: (required)
444
+ :type linker: str
445
+ :param _request_timeout: timeout setting for this request. If one
446
+ number provided, it will be total request
447
+ timeout. It can also be a pair (tuple) of
448
+ (connection, read) timeouts.
449
+ :type _request_timeout: int, tuple(int, int), optional
450
+ :param _request_auth: set to override the auth_settings for an a single
451
+ request; this effectively ignores the
452
+ authentication in the spec for a single request.
453
+ :type _request_auth: dict, optional
454
+ :param _content_type: force content-type for the request.
455
+ :type _content_type: str, Optional
456
+ :param _headers: set to override the headers for a single
457
+ request; this effectively ignores the headers
458
+ in the spec for a single request.
459
+ :type _headers: dict, optional
460
+ :param _host_index: set to override the host_index for a single
461
+ request; this effectively ignores the host_index
462
+ in the spec for a single request.
463
+ :type _host_index: int, optional
464
+ :return: Returns the result object.
465
+ """ # noqa: E501
466
+
467
+ _param = self._delete_linker_serialize(
468
+ username=username,
469
+ dataset=dataset,
470
+ linker=linker,
471
+ _request_auth=_request_auth,
472
+ _content_type=_content_type,
473
+ _headers=_headers,
474
+ _host_index=_host_index
475
+ )
476
+
477
+ _response_types_map: Dict[str, Optional[str]] = {
478
+ '200': "str",
479
+ '422': "HTTPValidationError",
480
+ }
481
+ response_data = self.api_client.call_api(
482
+ *_param,
483
+ _request_timeout=_request_timeout
484
+ )
485
+ response_data.read()
486
+ return self.api_client.response_deserialize(
487
+ response_data=response_data,
488
+ response_types_map=_response_types_map,
489
+ )
490
+
491
+
492
+ @validate_call
493
+ def delete_linker_without_preload_content(
494
+ self,
495
+ username: StrictStr,
496
+ dataset: StrictStr,
497
+ linker: StrictStr,
498
+ _request_timeout: Union[
499
+ None,
500
+ Annotated[StrictFloat, Field(gt=0)],
501
+ Tuple[
502
+ Annotated[StrictFloat, Field(gt=0)],
503
+ Annotated[StrictFloat, Field(gt=0)]
504
+ ]
505
+ ] = None,
506
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
507
+ _content_type: Optional[StrictStr] = None,
508
+ _headers: Optional[Dict[StrictStr, Any]] = None,
509
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
510
+ ) -> RESTResponseType:
511
+ """Delete a linker
512
+
513
+
514
+ :param username: (required)
515
+ :type username: str
516
+ :param dataset: (required)
517
+ :type dataset: str
518
+ :param linker: (required)
519
+ :type linker: str
520
+ :param _request_timeout: timeout setting for this request. If one
521
+ number provided, it will be total request
522
+ timeout. It can also be a pair (tuple) of
523
+ (connection, read) timeouts.
524
+ :type _request_timeout: int, tuple(int, int), optional
525
+ :param _request_auth: set to override the auth_settings for an a single
526
+ request; this effectively ignores the
527
+ authentication in the spec for a single request.
528
+ :type _request_auth: dict, optional
529
+ :param _content_type: force content-type for the request.
530
+ :type _content_type: str, Optional
531
+ :param _headers: set to override the headers for a single
532
+ request; this effectively ignores the headers
533
+ in the spec for a single request.
534
+ :type _headers: dict, optional
535
+ :param _host_index: set to override the host_index for a single
536
+ request; this effectively ignores the host_index
537
+ in the spec for a single request.
538
+ :type _host_index: int, optional
539
+ :return: Returns the result object.
540
+ """ # noqa: E501
541
+
542
+ _param = self._delete_linker_serialize(
543
+ username=username,
544
+ dataset=dataset,
545
+ linker=linker,
546
+ _request_auth=_request_auth,
547
+ _content_type=_content_type,
548
+ _headers=_headers,
549
+ _host_index=_host_index
550
+ )
551
+
552
+ _response_types_map: Dict[str, Optional[str]] = {
553
+ '200': "str",
554
+ '422': "HTTPValidationError",
555
+ }
556
+ response_data = self.api_client.call_api(
557
+ *_param,
558
+ _request_timeout=_request_timeout
559
+ )
560
+ return response_data.response
561
+
562
+
563
+ def _delete_linker_serialize(
564
+ self,
565
+ username,
566
+ dataset,
567
+ linker,
568
+ _request_auth,
569
+ _content_type,
570
+ _headers,
571
+ _host_index,
572
+ ) -> RequestSerialized:
573
+
574
+ _host = None
575
+
576
+ _collection_formats: Dict[str, str] = {
577
+ }
578
+
579
+ _path_params: Dict[str, str] = {}
580
+ _query_params: List[Tuple[str, str]] = []
581
+ _header_params: Dict[str, Optional[str]] = _headers or {}
582
+ _form_params: List[Tuple[str, str]] = []
583
+ _files: Dict[
584
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
585
+ ] = {}
586
+ _body_params: Optional[bytes] = None
587
+
588
+ # process the path parameters
589
+ # process the query parameters
590
+ if username is not None:
591
+
592
+ _query_params.append(('username', username))
593
+
594
+ if dataset is not None:
595
+
596
+ _query_params.append(('dataset', dataset))
597
+
598
+ if linker is not None:
599
+
600
+ _query_params.append(('linker', linker))
601
+
602
+ # process the header parameters
603
+ # process the form parameters
604
+ # process the body parameter
605
+
606
+
607
+ # set the HTTP header `Accept`
608
+ if 'Accept' not in _header_params:
609
+ _header_params['Accept'] = self.api_client.select_header_accept(
610
+ [
611
+ 'application/json'
612
+ ]
613
+ )
614
+
615
+
616
+ # authentication setting
617
+ _auth_settings: List[str] = [
618
+ 'QAnswer-Api-Key',
619
+ 'Bearer token'
620
+ ]
621
+
622
+ return self.api_client.param_serialize(
623
+ method='DELETE',
624
+ resource_path='/api/tasks/rdf/linker/delete',
625
+ path_params=_path_params,
626
+ query_params=_query_params,
627
+ header_params=_header_params,
628
+ body=_body_params,
629
+ post_params=_form_params,
630
+ files=_files,
631
+ auth_settings=_auth_settings,
632
+ collection_formats=_collection_formats,
633
+ _host=_host,
634
+ _request_auth=_request_auth
635
+ )
636
+
637
+
638
+
639
+
640
+ @validate_call
641
+ def download_csv(
642
+ self,
643
+ username: StrictStr,
644
+ dataset: StrictStr,
645
+ linker: StrictStr,
646
+ _request_timeout: Union[
647
+ None,
648
+ Annotated[StrictFloat, Field(gt=0)],
649
+ Tuple[
650
+ Annotated[StrictFloat, Field(gt=0)],
651
+ Annotated[StrictFloat, Field(gt=0)]
652
+ ]
653
+ ] = None,
654
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
655
+ _content_type: Optional[StrictStr] = None,
656
+ _headers: Optional[Dict[StrictStr, Any]] = None,
657
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
658
+ ) -> object:
659
+ """Download linker data as CSV
660
+
661
+
662
+ :param username: (required)
663
+ :type username: str
664
+ :param dataset: (required)
665
+ :type dataset: str
666
+ :param linker: (required)
667
+ :type linker: str
668
+ :param _request_timeout: timeout setting for this request. If one
669
+ number provided, it will be total request
670
+ timeout. It can also be a pair (tuple) of
671
+ (connection, read) timeouts.
672
+ :type _request_timeout: int, tuple(int, int), optional
673
+ :param _request_auth: set to override the auth_settings for an a single
674
+ request; this effectively ignores the
675
+ authentication in the spec for a single request.
676
+ :type _request_auth: dict, optional
677
+ :param _content_type: force content-type for the request.
678
+ :type _content_type: str, Optional
679
+ :param _headers: set to override the headers for a single
680
+ request; this effectively ignores the headers
681
+ in the spec for a single request.
682
+ :type _headers: dict, optional
683
+ :param _host_index: set to override the host_index for a single
684
+ request; this effectively ignores the host_index
685
+ in the spec for a single request.
686
+ :type _host_index: int, optional
687
+ :return: Returns the result object.
688
+ """ # noqa: E501
689
+
690
+ _param = self._download_csv_serialize(
691
+ username=username,
692
+ dataset=dataset,
693
+ linker=linker,
694
+ _request_auth=_request_auth,
695
+ _content_type=_content_type,
696
+ _headers=_headers,
697
+ _host_index=_host_index
698
+ )
699
+
700
+ _response_types_map: Dict[str, Optional[str]] = {
701
+ '200': "object",
702
+ '422': "HTTPValidationError",
703
+ }
704
+ response_data = self.api_client.call_api(
705
+ *_param,
706
+ _request_timeout=_request_timeout
707
+ )
708
+ response_data.read()
709
+ return self.api_client.response_deserialize(
710
+ response_data=response_data,
711
+ response_types_map=_response_types_map,
712
+ ).data
713
+
714
+
715
+ @validate_call
716
+ def download_csv_with_http_info(
717
+ self,
718
+ username: StrictStr,
719
+ dataset: StrictStr,
720
+ linker: StrictStr,
721
+ _request_timeout: Union[
722
+ None,
723
+ Annotated[StrictFloat, Field(gt=0)],
724
+ Tuple[
725
+ Annotated[StrictFloat, Field(gt=0)],
726
+ Annotated[StrictFloat, Field(gt=0)]
727
+ ]
728
+ ] = None,
729
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
730
+ _content_type: Optional[StrictStr] = None,
731
+ _headers: Optional[Dict[StrictStr, Any]] = None,
732
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
733
+ ) -> ApiResponse[object]:
734
+ """Download linker data as CSV
735
+
736
+
737
+ :param username: (required)
738
+ :type username: str
739
+ :param dataset: (required)
740
+ :type dataset: str
741
+ :param linker: (required)
742
+ :type linker: str
743
+ :param _request_timeout: timeout setting for this request. If one
744
+ number provided, it will be total request
745
+ timeout. It can also be a pair (tuple) of
746
+ (connection, read) timeouts.
747
+ :type _request_timeout: int, tuple(int, int), optional
748
+ :param _request_auth: set to override the auth_settings for an a single
749
+ request; this effectively ignores the
750
+ authentication in the spec for a single request.
751
+ :type _request_auth: dict, optional
752
+ :param _content_type: force content-type for the request.
753
+ :type _content_type: str, Optional
754
+ :param _headers: set to override the headers for a single
755
+ request; this effectively ignores the headers
756
+ in the spec for a single request.
757
+ :type _headers: dict, optional
758
+ :param _host_index: set to override the host_index for a single
759
+ request; this effectively ignores the host_index
760
+ in the spec for a single request.
761
+ :type _host_index: int, optional
762
+ :return: Returns the result object.
763
+ """ # noqa: E501
764
+
765
+ _param = self._download_csv_serialize(
766
+ username=username,
767
+ dataset=dataset,
768
+ linker=linker,
769
+ _request_auth=_request_auth,
770
+ _content_type=_content_type,
771
+ _headers=_headers,
772
+ _host_index=_host_index
773
+ )
774
+
775
+ _response_types_map: Dict[str, Optional[str]] = {
776
+ '200': "object",
777
+ '422': "HTTPValidationError",
778
+ }
779
+ response_data = self.api_client.call_api(
780
+ *_param,
781
+ _request_timeout=_request_timeout
782
+ )
783
+ response_data.read()
784
+ return self.api_client.response_deserialize(
785
+ response_data=response_data,
786
+ response_types_map=_response_types_map,
787
+ )
788
+
789
+
790
+ @validate_call
791
+ def download_csv_without_preload_content(
792
+ self,
793
+ username: StrictStr,
794
+ dataset: StrictStr,
795
+ linker: StrictStr,
796
+ _request_timeout: Union[
797
+ None,
798
+ Annotated[StrictFloat, Field(gt=0)],
799
+ Tuple[
800
+ Annotated[StrictFloat, Field(gt=0)],
801
+ Annotated[StrictFloat, Field(gt=0)]
802
+ ]
803
+ ] = None,
804
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
805
+ _content_type: Optional[StrictStr] = None,
806
+ _headers: Optional[Dict[StrictStr, Any]] = None,
807
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
808
+ ) -> RESTResponseType:
809
+ """Download linker data as CSV
810
+
811
+
812
+ :param username: (required)
813
+ :type username: str
814
+ :param dataset: (required)
815
+ :type dataset: str
816
+ :param linker: (required)
817
+ :type linker: str
818
+ :param _request_timeout: timeout setting for this request. If one
819
+ number provided, it will be total request
820
+ timeout. It can also be a pair (tuple) of
821
+ (connection, read) timeouts.
822
+ :type _request_timeout: int, tuple(int, int), optional
823
+ :param _request_auth: set to override the auth_settings for an a single
824
+ request; this effectively ignores the
825
+ authentication in the spec for a single request.
826
+ :type _request_auth: dict, optional
827
+ :param _content_type: force content-type for the request.
828
+ :type _content_type: str, Optional
829
+ :param _headers: set to override the headers for a single
830
+ request; this effectively ignores the headers
831
+ in the spec for a single request.
832
+ :type _headers: dict, optional
833
+ :param _host_index: set to override the host_index for a single
834
+ request; this effectively ignores the host_index
835
+ in the spec for a single request.
836
+ :type _host_index: int, optional
837
+ :return: Returns the result object.
838
+ """ # noqa: E501
839
+
840
+ _param = self._download_csv_serialize(
841
+ username=username,
842
+ dataset=dataset,
843
+ linker=linker,
844
+ _request_auth=_request_auth,
845
+ _content_type=_content_type,
846
+ _headers=_headers,
847
+ _host_index=_host_index
848
+ )
849
+
850
+ _response_types_map: Dict[str, Optional[str]] = {
851
+ '200': "object",
852
+ '422': "HTTPValidationError",
853
+ }
854
+ response_data = self.api_client.call_api(
855
+ *_param,
856
+ _request_timeout=_request_timeout
857
+ )
858
+ return response_data.response
859
+
860
+
861
+ def _download_csv_serialize(
862
+ self,
863
+ username,
864
+ dataset,
865
+ linker,
866
+ _request_auth,
867
+ _content_type,
868
+ _headers,
869
+ _host_index,
870
+ ) -> RequestSerialized:
871
+
872
+ _host = None
873
+
874
+ _collection_formats: Dict[str, str] = {
875
+ }
876
+
877
+ _path_params: Dict[str, str] = {}
878
+ _query_params: List[Tuple[str, str]] = []
879
+ _header_params: Dict[str, Optional[str]] = _headers or {}
880
+ _form_params: List[Tuple[str, str]] = []
881
+ _files: Dict[
882
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
883
+ ] = {}
884
+ _body_params: Optional[bytes] = None
885
+
886
+ # process the path parameters
887
+ # process the query parameters
888
+ if username is not None:
889
+
890
+ _query_params.append(('username', username))
891
+
892
+ if dataset is not None:
893
+
894
+ _query_params.append(('dataset', dataset))
895
+
896
+ if linker is not None:
897
+
898
+ _query_params.append(('linker', linker))
899
+
900
+ # process the header parameters
901
+ # process the form parameters
902
+ # process the body parameter
903
+
904
+
905
+ # set the HTTP header `Accept`
906
+ if 'Accept' not in _header_params:
907
+ _header_params['Accept'] = self.api_client.select_header_accept(
908
+ [
909
+ 'application/json'
910
+ ]
911
+ )
912
+
913
+
914
+ # authentication setting
915
+ _auth_settings: List[str] = [
916
+ 'QAnswer-Api-Key',
917
+ 'Bearer token'
918
+ ]
919
+
920
+ return self.api_client.param_serialize(
921
+ method='GET',
922
+ resource_path='/api/tasks/rdf/linker/download-csv',
923
+ path_params=_path_params,
924
+ query_params=_query_params,
925
+ header_params=_header_params,
926
+ body=_body_params,
927
+ post_params=_form_params,
928
+ files=_files,
929
+ auth_settings=_auth_settings,
930
+ collection_formats=_collection_formats,
931
+ _host=_host,
932
+ _request_auth=_request_auth
933
+ )
934
+
935
+
936
+
937
+
938
+ @validate_call
939
+ def download_skos(
940
+ self,
941
+ username: StrictStr,
942
+ dataset: StrictStr,
943
+ linker: StrictStr,
944
+ confidence: Union[StrictFloat, StrictInt],
945
+ _request_timeout: Union[
946
+ None,
947
+ Annotated[StrictFloat, Field(gt=0)],
948
+ Tuple[
949
+ Annotated[StrictFloat, Field(gt=0)],
950
+ Annotated[StrictFloat, Field(gt=0)]
951
+ ]
952
+ ] = None,
953
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
954
+ _content_type: Optional[StrictStr] = None,
955
+ _headers: Optional[Dict[StrictStr, Any]] = None,
956
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
957
+ ) -> object:
958
+ """Download linker data as SKOS N-Triples
959
+
960
+
961
+ :param username: (required)
962
+ :type username: str
963
+ :param dataset: (required)
964
+ :type dataset: str
965
+ :param linker: (required)
966
+ :type linker: str
967
+ :param confidence: (required)
968
+ :type confidence: float
969
+ :param _request_timeout: timeout setting for this request. If one
970
+ number provided, it will be total request
971
+ timeout. It can also be a pair (tuple) of
972
+ (connection, read) timeouts.
973
+ :type _request_timeout: int, tuple(int, int), optional
974
+ :param _request_auth: set to override the auth_settings for an a single
975
+ request; this effectively ignores the
976
+ authentication in the spec for a single request.
977
+ :type _request_auth: dict, optional
978
+ :param _content_type: force content-type for the request.
979
+ :type _content_type: str, Optional
980
+ :param _headers: set to override the headers for a single
981
+ request; this effectively ignores the headers
982
+ in the spec for a single request.
983
+ :type _headers: dict, optional
984
+ :param _host_index: set to override the host_index for a single
985
+ request; this effectively ignores the host_index
986
+ in the spec for a single request.
987
+ :type _host_index: int, optional
988
+ :return: Returns the result object.
989
+ """ # noqa: E501
990
+
991
+ _param = self._download_skos_serialize(
992
+ username=username,
993
+ dataset=dataset,
994
+ linker=linker,
995
+ confidence=confidence,
996
+ _request_auth=_request_auth,
997
+ _content_type=_content_type,
998
+ _headers=_headers,
999
+ _host_index=_host_index
1000
+ )
1001
+
1002
+ _response_types_map: Dict[str, Optional[str]] = {
1003
+ '200': "object",
1004
+ '422': "HTTPValidationError",
1005
+ }
1006
+ response_data = self.api_client.call_api(
1007
+ *_param,
1008
+ _request_timeout=_request_timeout
1009
+ )
1010
+ response_data.read()
1011
+ return self.api_client.response_deserialize(
1012
+ response_data=response_data,
1013
+ response_types_map=_response_types_map,
1014
+ ).data
1015
+
1016
+
1017
+ @validate_call
1018
+ def download_skos_with_http_info(
1019
+ self,
1020
+ username: StrictStr,
1021
+ dataset: StrictStr,
1022
+ linker: StrictStr,
1023
+ confidence: Union[StrictFloat, StrictInt],
1024
+ _request_timeout: Union[
1025
+ None,
1026
+ Annotated[StrictFloat, Field(gt=0)],
1027
+ Tuple[
1028
+ Annotated[StrictFloat, Field(gt=0)],
1029
+ Annotated[StrictFloat, Field(gt=0)]
1030
+ ]
1031
+ ] = None,
1032
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1033
+ _content_type: Optional[StrictStr] = None,
1034
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1035
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1036
+ ) -> ApiResponse[object]:
1037
+ """Download linker data as SKOS N-Triples
1038
+
1039
+
1040
+ :param username: (required)
1041
+ :type username: str
1042
+ :param dataset: (required)
1043
+ :type dataset: str
1044
+ :param linker: (required)
1045
+ :type linker: str
1046
+ :param confidence: (required)
1047
+ :type confidence: float
1048
+ :param _request_timeout: timeout setting for this request. If one
1049
+ number provided, it will be total request
1050
+ timeout. It can also be a pair (tuple) of
1051
+ (connection, read) timeouts.
1052
+ :type _request_timeout: int, tuple(int, int), optional
1053
+ :param _request_auth: set to override the auth_settings for an a single
1054
+ request; this effectively ignores the
1055
+ authentication in the spec for a single request.
1056
+ :type _request_auth: dict, optional
1057
+ :param _content_type: force content-type for the request.
1058
+ :type _content_type: str, Optional
1059
+ :param _headers: set to override the headers for a single
1060
+ request; this effectively ignores the headers
1061
+ in the spec for a single request.
1062
+ :type _headers: dict, optional
1063
+ :param _host_index: set to override the host_index for a single
1064
+ request; this effectively ignores the host_index
1065
+ in the spec for a single request.
1066
+ :type _host_index: int, optional
1067
+ :return: Returns the result object.
1068
+ """ # noqa: E501
1069
+
1070
+ _param = self._download_skos_serialize(
1071
+ username=username,
1072
+ dataset=dataset,
1073
+ linker=linker,
1074
+ confidence=confidence,
1075
+ _request_auth=_request_auth,
1076
+ _content_type=_content_type,
1077
+ _headers=_headers,
1078
+ _host_index=_host_index
1079
+ )
1080
+
1081
+ _response_types_map: Dict[str, Optional[str]] = {
1082
+ '200': "object",
1083
+ '422': "HTTPValidationError",
1084
+ }
1085
+ response_data = self.api_client.call_api(
1086
+ *_param,
1087
+ _request_timeout=_request_timeout
1088
+ )
1089
+ response_data.read()
1090
+ return self.api_client.response_deserialize(
1091
+ response_data=response_data,
1092
+ response_types_map=_response_types_map,
1093
+ )
1094
+
1095
+
1096
+ @validate_call
1097
+ def download_skos_without_preload_content(
1098
+ self,
1099
+ username: StrictStr,
1100
+ dataset: StrictStr,
1101
+ linker: StrictStr,
1102
+ confidence: Union[StrictFloat, StrictInt],
1103
+ _request_timeout: Union[
1104
+ None,
1105
+ Annotated[StrictFloat, Field(gt=0)],
1106
+ Tuple[
1107
+ Annotated[StrictFloat, Field(gt=0)],
1108
+ Annotated[StrictFloat, Field(gt=0)]
1109
+ ]
1110
+ ] = None,
1111
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1112
+ _content_type: Optional[StrictStr] = None,
1113
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1114
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1115
+ ) -> RESTResponseType:
1116
+ """Download linker data as SKOS N-Triples
1117
+
1118
+
1119
+ :param username: (required)
1120
+ :type username: str
1121
+ :param dataset: (required)
1122
+ :type dataset: str
1123
+ :param linker: (required)
1124
+ :type linker: str
1125
+ :param confidence: (required)
1126
+ :type confidence: float
1127
+ :param _request_timeout: timeout setting for this request. If one
1128
+ number provided, it will be total request
1129
+ timeout. It can also be a pair (tuple) of
1130
+ (connection, read) timeouts.
1131
+ :type _request_timeout: int, tuple(int, int), optional
1132
+ :param _request_auth: set to override the auth_settings for an a single
1133
+ request; this effectively ignores the
1134
+ authentication in the spec for a single request.
1135
+ :type _request_auth: dict, optional
1136
+ :param _content_type: force content-type for the request.
1137
+ :type _content_type: str, Optional
1138
+ :param _headers: set to override the headers for a single
1139
+ request; this effectively ignores the headers
1140
+ in the spec for a single request.
1141
+ :type _headers: dict, optional
1142
+ :param _host_index: set to override the host_index for a single
1143
+ request; this effectively ignores the host_index
1144
+ in the spec for a single request.
1145
+ :type _host_index: int, optional
1146
+ :return: Returns the result object.
1147
+ """ # noqa: E501
1148
+
1149
+ _param = self._download_skos_serialize(
1150
+ username=username,
1151
+ dataset=dataset,
1152
+ linker=linker,
1153
+ confidence=confidence,
1154
+ _request_auth=_request_auth,
1155
+ _content_type=_content_type,
1156
+ _headers=_headers,
1157
+ _host_index=_host_index
1158
+ )
1159
+
1160
+ _response_types_map: Dict[str, Optional[str]] = {
1161
+ '200': "object",
1162
+ '422': "HTTPValidationError",
1163
+ }
1164
+ response_data = self.api_client.call_api(
1165
+ *_param,
1166
+ _request_timeout=_request_timeout
1167
+ )
1168
+ return response_data.response
1169
+
1170
+
1171
+ def _download_skos_serialize(
1172
+ self,
1173
+ username,
1174
+ dataset,
1175
+ linker,
1176
+ confidence,
1177
+ _request_auth,
1178
+ _content_type,
1179
+ _headers,
1180
+ _host_index,
1181
+ ) -> RequestSerialized:
1182
+
1183
+ _host = None
1184
+
1185
+ _collection_formats: Dict[str, str] = {
1186
+ }
1187
+
1188
+ _path_params: Dict[str, str] = {}
1189
+ _query_params: List[Tuple[str, str]] = []
1190
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1191
+ _form_params: List[Tuple[str, str]] = []
1192
+ _files: Dict[
1193
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1194
+ ] = {}
1195
+ _body_params: Optional[bytes] = None
1196
+
1197
+ # process the path parameters
1198
+ # process the query parameters
1199
+ if username is not None:
1200
+
1201
+ _query_params.append(('username', username))
1202
+
1203
+ if dataset is not None:
1204
+
1205
+ _query_params.append(('dataset', dataset))
1206
+
1207
+ if linker is not None:
1208
+
1209
+ _query_params.append(('linker', linker))
1210
+
1211
+ if confidence is not None:
1212
+
1213
+ _query_params.append(('confidence', confidence))
1214
+
1215
+ # process the header parameters
1216
+ # process the form parameters
1217
+ # process the body parameter
1218
+
1219
+
1220
+ # set the HTTP header `Accept`
1221
+ if 'Accept' not in _header_params:
1222
+ _header_params['Accept'] = self.api_client.select_header_accept(
1223
+ [
1224
+ 'application/json'
1225
+ ]
1226
+ )
1227
+
1228
+
1229
+ # authentication setting
1230
+ _auth_settings: List[str] = [
1231
+ 'QAnswer-Api-Key',
1232
+ 'Bearer token'
1233
+ ]
1234
+
1235
+ return self.api_client.param_serialize(
1236
+ method='GET',
1237
+ resource_path='/api/tasks/rdf/linker/download-skos',
1238
+ path_params=_path_params,
1239
+ query_params=_query_params,
1240
+ header_params=_header_params,
1241
+ body=_body_params,
1242
+ post_params=_form_params,
1243
+ files=_files,
1244
+ auth_settings=_auth_settings,
1245
+ collection_formats=_collection_formats,
1246
+ _host=_host,
1247
+ _request_auth=_request_auth
1248
+ )
1249
+
1250
+
1251
+
1252
+
1253
+ @validate_call
1254
+ def get_aggregate(
1255
+ self,
1256
+ username: StrictStr,
1257
+ dataset: StrictStr,
1258
+ linker: StrictStr,
1259
+ _request_timeout: Union[
1260
+ None,
1261
+ Annotated[StrictFloat, Field(gt=0)],
1262
+ Tuple[
1263
+ Annotated[StrictFloat, Field(gt=0)],
1264
+ Annotated[StrictFloat, Field(gt=0)]
1265
+ ]
1266
+ ] = None,
1267
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1268
+ _content_type: Optional[StrictStr] = None,
1269
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1270
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1271
+ ) -> List[Aggregate]:
1272
+ """Get aggregation results
1273
+
1274
+
1275
+ :param username: (required)
1276
+ :type username: str
1277
+ :param dataset: (required)
1278
+ :type dataset: str
1279
+ :param linker: (required)
1280
+ :type linker: str
1281
+ :param _request_timeout: timeout setting for this request. If one
1282
+ number provided, it will be total request
1283
+ timeout. It can also be a pair (tuple) of
1284
+ (connection, read) timeouts.
1285
+ :type _request_timeout: int, tuple(int, int), optional
1286
+ :param _request_auth: set to override the auth_settings for an a single
1287
+ request; this effectively ignores the
1288
+ authentication in the spec for a single request.
1289
+ :type _request_auth: dict, optional
1290
+ :param _content_type: force content-type for the request.
1291
+ :type _content_type: str, Optional
1292
+ :param _headers: set to override the headers for a single
1293
+ request; this effectively ignores the headers
1294
+ in the spec for a single request.
1295
+ :type _headers: dict, optional
1296
+ :param _host_index: set to override the host_index for a single
1297
+ request; this effectively ignores the host_index
1298
+ in the spec for a single request.
1299
+ :type _host_index: int, optional
1300
+ :return: Returns the result object.
1301
+ """ # noqa: E501
1302
+
1303
+ _param = self._get_aggregate_serialize(
1304
+ username=username,
1305
+ dataset=dataset,
1306
+ linker=linker,
1307
+ _request_auth=_request_auth,
1308
+ _content_type=_content_type,
1309
+ _headers=_headers,
1310
+ _host_index=_host_index
1311
+ )
1312
+
1313
+ _response_types_map: Dict[str, Optional[str]] = {
1314
+ '200': "List[Aggregate]",
1315
+ '422': "HTTPValidationError",
1316
+ }
1317
+ response_data = self.api_client.call_api(
1318
+ *_param,
1319
+ _request_timeout=_request_timeout
1320
+ )
1321
+ response_data.read()
1322
+ return self.api_client.response_deserialize(
1323
+ response_data=response_data,
1324
+ response_types_map=_response_types_map,
1325
+ ).data
1326
+
1327
+
1328
+ @validate_call
1329
+ def get_aggregate_with_http_info(
1330
+ self,
1331
+ username: StrictStr,
1332
+ dataset: StrictStr,
1333
+ linker: StrictStr,
1334
+ _request_timeout: Union[
1335
+ None,
1336
+ Annotated[StrictFloat, Field(gt=0)],
1337
+ Tuple[
1338
+ Annotated[StrictFloat, Field(gt=0)],
1339
+ Annotated[StrictFloat, Field(gt=0)]
1340
+ ]
1341
+ ] = None,
1342
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1343
+ _content_type: Optional[StrictStr] = None,
1344
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1345
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1346
+ ) -> ApiResponse[List[Aggregate]]:
1347
+ """Get aggregation results
1348
+
1349
+
1350
+ :param username: (required)
1351
+ :type username: str
1352
+ :param dataset: (required)
1353
+ :type dataset: str
1354
+ :param linker: (required)
1355
+ :type linker: str
1356
+ :param _request_timeout: timeout setting for this request. If one
1357
+ number provided, it will be total request
1358
+ timeout. It can also be a pair (tuple) of
1359
+ (connection, read) timeouts.
1360
+ :type _request_timeout: int, tuple(int, int), optional
1361
+ :param _request_auth: set to override the auth_settings for an a single
1362
+ request; this effectively ignores the
1363
+ authentication in the spec for a single request.
1364
+ :type _request_auth: dict, optional
1365
+ :param _content_type: force content-type for the request.
1366
+ :type _content_type: str, Optional
1367
+ :param _headers: set to override the headers for a single
1368
+ request; this effectively ignores the headers
1369
+ in the spec for a single request.
1370
+ :type _headers: dict, optional
1371
+ :param _host_index: set to override the host_index for a single
1372
+ request; this effectively ignores the host_index
1373
+ in the spec for a single request.
1374
+ :type _host_index: int, optional
1375
+ :return: Returns the result object.
1376
+ """ # noqa: E501
1377
+
1378
+ _param = self._get_aggregate_serialize(
1379
+ username=username,
1380
+ dataset=dataset,
1381
+ linker=linker,
1382
+ _request_auth=_request_auth,
1383
+ _content_type=_content_type,
1384
+ _headers=_headers,
1385
+ _host_index=_host_index
1386
+ )
1387
+
1388
+ _response_types_map: Dict[str, Optional[str]] = {
1389
+ '200': "List[Aggregate]",
1390
+ '422': "HTTPValidationError",
1391
+ }
1392
+ response_data = self.api_client.call_api(
1393
+ *_param,
1394
+ _request_timeout=_request_timeout
1395
+ )
1396
+ response_data.read()
1397
+ return self.api_client.response_deserialize(
1398
+ response_data=response_data,
1399
+ response_types_map=_response_types_map,
1400
+ )
1401
+
1402
+
1403
+ @validate_call
1404
+ def get_aggregate_without_preload_content(
1405
+ self,
1406
+ username: StrictStr,
1407
+ dataset: StrictStr,
1408
+ linker: StrictStr,
1409
+ _request_timeout: Union[
1410
+ None,
1411
+ Annotated[StrictFloat, Field(gt=0)],
1412
+ Tuple[
1413
+ Annotated[StrictFloat, Field(gt=0)],
1414
+ Annotated[StrictFloat, Field(gt=0)]
1415
+ ]
1416
+ ] = None,
1417
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1418
+ _content_type: Optional[StrictStr] = None,
1419
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1420
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1421
+ ) -> RESTResponseType:
1422
+ """Get aggregation results
1423
+
1424
+
1425
+ :param username: (required)
1426
+ :type username: str
1427
+ :param dataset: (required)
1428
+ :type dataset: str
1429
+ :param linker: (required)
1430
+ :type linker: str
1431
+ :param _request_timeout: timeout setting for this request. If one
1432
+ number provided, it will be total request
1433
+ timeout. It can also be a pair (tuple) of
1434
+ (connection, read) timeouts.
1435
+ :type _request_timeout: int, tuple(int, int), optional
1436
+ :param _request_auth: set to override the auth_settings for an a single
1437
+ request; this effectively ignores the
1438
+ authentication in the spec for a single request.
1439
+ :type _request_auth: dict, optional
1440
+ :param _content_type: force content-type for the request.
1441
+ :type _content_type: str, Optional
1442
+ :param _headers: set to override the headers for a single
1443
+ request; this effectively ignores the headers
1444
+ in the spec for a single request.
1445
+ :type _headers: dict, optional
1446
+ :param _host_index: set to override the host_index for a single
1447
+ request; this effectively ignores the host_index
1448
+ in the spec for a single request.
1449
+ :type _host_index: int, optional
1450
+ :return: Returns the result object.
1451
+ """ # noqa: E501
1452
+
1453
+ _param = self._get_aggregate_serialize(
1454
+ username=username,
1455
+ dataset=dataset,
1456
+ linker=linker,
1457
+ _request_auth=_request_auth,
1458
+ _content_type=_content_type,
1459
+ _headers=_headers,
1460
+ _host_index=_host_index
1461
+ )
1462
+
1463
+ _response_types_map: Dict[str, Optional[str]] = {
1464
+ '200': "List[Aggregate]",
1465
+ '422': "HTTPValidationError",
1466
+ }
1467
+ response_data = self.api_client.call_api(
1468
+ *_param,
1469
+ _request_timeout=_request_timeout
1470
+ )
1471
+ return response_data.response
1472
+
1473
+
1474
+ def _get_aggregate_serialize(
1475
+ self,
1476
+ username,
1477
+ dataset,
1478
+ linker,
1479
+ _request_auth,
1480
+ _content_type,
1481
+ _headers,
1482
+ _host_index,
1483
+ ) -> RequestSerialized:
1484
+
1485
+ _host = None
1486
+
1487
+ _collection_formats: Dict[str, str] = {
1488
+ }
1489
+
1490
+ _path_params: Dict[str, str] = {}
1491
+ _query_params: List[Tuple[str, str]] = []
1492
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1493
+ _form_params: List[Tuple[str, str]] = []
1494
+ _files: Dict[
1495
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1496
+ ] = {}
1497
+ _body_params: Optional[bytes] = None
1498
+
1499
+ # process the path parameters
1500
+ # process the query parameters
1501
+ if username is not None:
1502
+
1503
+ _query_params.append(('username', username))
1504
+
1505
+ if dataset is not None:
1506
+
1507
+ _query_params.append(('dataset', dataset))
1508
+
1509
+ if linker is not None:
1510
+
1511
+ _query_params.append(('linker', linker))
1512
+
1513
+ # process the header parameters
1514
+ # process the form parameters
1515
+ # process the body parameter
1516
+
1517
+
1518
+ # set the HTTP header `Accept`
1519
+ if 'Accept' not in _header_params:
1520
+ _header_params['Accept'] = self.api_client.select_header_accept(
1521
+ [
1522
+ 'application/json'
1523
+ ]
1524
+ )
1525
+
1526
+
1527
+ # authentication setting
1528
+ _auth_settings: List[str] = [
1529
+ 'QAnswer-Api-Key',
1530
+ 'Bearer token'
1531
+ ]
1532
+
1533
+ return self.api_client.param_serialize(
1534
+ method='GET',
1535
+ resource_path='/api/tasks/rdf/linker/aggregate',
1536
+ path_params=_path_params,
1537
+ query_params=_query_params,
1538
+ header_params=_header_params,
1539
+ body=_body_params,
1540
+ post_params=_form_params,
1541
+ files=_files,
1542
+ auth_settings=_auth_settings,
1543
+ collection_formats=_collection_formats,
1544
+ _host=_host,
1545
+ _request_auth=_request_auth
1546
+ )
1547
+
1548
+
1549
+
1550
+
1551
+ @validate_call
1552
+ def get_evaluate(
1553
+ self,
1554
+ username: StrictStr,
1555
+ dataset: StrictStr,
1556
+ linker: StrictStr,
1557
+ sort_by: Optional[StrictStr] = None,
1558
+ sort_dir: Optional[StrictStr] = None,
1559
+ page: Optional[StrictInt] = None,
1560
+ size: Optional[StrictInt] = None,
1561
+ _request_timeout: Union[
1562
+ None,
1563
+ Annotated[StrictFloat, Field(gt=0)],
1564
+ Tuple[
1565
+ Annotated[StrictFloat, Field(gt=0)],
1566
+ Annotated[StrictFloat, Field(gt=0)]
1567
+ ]
1568
+ ] = None,
1569
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1570
+ _content_type: Optional[StrictStr] = None,
1571
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1572
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1573
+ ) -> LinkResultPaginated:
1574
+ """Get evaluation results
1575
+
1576
+
1577
+ :param username: (required)
1578
+ :type username: str
1579
+ :param dataset: (required)
1580
+ :type dataset: str
1581
+ :param linker: (required)
1582
+ :type linker: str
1583
+ :param sort_by:
1584
+ :type sort_by: str
1585
+ :param sort_dir:
1586
+ :type sort_dir: str
1587
+ :param page:
1588
+ :type page: int
1589
+ :param size:
1590
+ :type size: int
1591
+ :param _request_timeout: timeout setting for this request. If one
1592
+ number provided, it will be total request
1593
+ timeout. It can also be a pair (tuple) of
1594
+ (connection, read) timeouts.
1595
+ :type _request_timeout: int, tuple(int, int), optional
1596
+ :param _request_auth: set to override the auth_settings for an a single
1597
+ request; this effectively ignores the
1598
+ authentication in the spec for a single request.
1599
+ :type _request_auth: dict, optional
1600
+ :param _content_type: force content-type for the request.
1601
+ :type _content_type: str, Optional
1602
+ :param _headers: set to override the headers for a single
1603
+ request; this effectively ignores the headers
1604
+ in the spec for a single request.
1605
+ :type _headers: dict, optional
1606
+ :param _host_index: set to override the host_index for a single
1607
+ request; this effectively ignores the host_index
1608
+ in the spec for a single request.
1609
+ :type _host_index: int, optional
1610
+ :return: Returns the result object.
1611
+ """ # noqa: E501
1612
+
1613
+ _param = self._get_evaluate_serialize(
1614
+ username=username,
1615
+ dataset=dataset,
1616
+ linker=linker,
1617
+ sort_by=sort_by,
1618
+ sort_dir=sort_dir,
1619
+ page=page,
1620
+ size=size,
1621
+ _request_auth=_request_auth,
1622
+ _content_type=_content_type,
1623
+ _headers=_headers,
1624
+ _host_index=_host_index
1625
+ )
1626
+
1627
+ _response_types_map: Dict[str, Optional[str]] = {
1628
+ '200': "LinkResultPaginated",
1629
+ '422': "HTTPValidationError",
1630
+ }
1631
+ response_data = self.api_client.call_api(
1632
+ *_param,
1633
+ _request_timeout=_request_timeout
1634
+ )
1635
+ response_data.read()
1636
+ return self.api_client.response_deserialize(
1637
+ response_data=response_data,
1638
+ response_types_map=_response_types_map,
1639
+ ).data
1640
+
1641
+
1642
+ @validate_call
1643
+ def get_evaluate_with_http_info(
1644
+ self,
1645
+ username: StrictStr,
1646
+ dataset: StrictStr,
1647
+ linker: StrictStr,
1648
+ sort_by: Optional[StrictStr] = None,
1649
+ sort_dir: Optional[StrictStr] = None,
1650
+ page: Optional[StrictInt] = None,
1651
+ size: Optional[StrictInt] = None,
1652
+ _request_timeout: Union[
1653
+ None,
1654
+ Annotated[StrictFloat, Field(gt=0)],
1655
+ Tuple[
1656
+ Annotated[StrictFloat, Field(gt=0)],
1657
+ Annotated[StrictFloat, Field(gt=0)]
1658
+ ]
1659
+ ] = None,
1660
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1661
+ _content_type: Optional[StrictStr] = None,
1662
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1663
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1664
+ ) -> ApiResponse[LinkResultPaginated]:
1665
+ """Get evaluation results
1666
+
1667
+
1668
+ :param username: (required)
1669
+ :type username: str
1670
+ :param dataset: (required)
1671
+ :type dataset: str
1672
+ :param linker: (required)
1673
+ :type linker: str
1674
+ :param sort_by:
1675
+ :type sort_by: str
1676
+ :param sort_dir:
1677
+ :type sort_dir: str
1678
+ :param page:
1679
+ :type page: int
1680
+ :param size:
1681
+ :type size: int
1682
+ :param _request_timeout: timeout setting for this request. If one
1683
+ number provided, it will be total request
1684
+ timeout. It can also be a pair (tuple) of
1685
+ (connection, read) timeouts.
1686
+ :type _request_timeout: int, tuple(int, int), optional
1687
+ :param _request_auth: set to override the auth_settings for an a single
1688
+ request; this effectively ignores the
1689
+ authentication in the spec for a single request.
1690
+ :type _request_auth: dict, optional
1691
+ :param _content_type: force content-type for the request.
1692
+ :type _content_type: str, Optional
1693
+ :param _headers: set to override the headers for a single
1694
+ request; this effectively ignores the headers
1695
+ in the spec for a single request.
1696
+ :type _headers: dict, optional
1697
+ :param _host_index: set to override the host_index for a single
1698
+ request; this effectively ignores the host_index
1699
+ in the spec for a single request.
1700
+ :type _host_index: int, optional
1701
+ :return: Returns the result object.
1702
+ """ # noqa: E501
1703
+
1704
+ _param = self._get_evaluate_serialize(
1705
+ username=username,
1706
+ dataset=dataset,
1707
+ linker=linker,
1708
+ sort_by=sort_by,
1709
+ sort_dir=sort_dir,
1710
+ page=page,
1711
+ size=size,
1712
+ _request_auth=_request_auth,
1713
+ _content_type=_content_type,
1714
+ _headers=_headers,
1715
+ _host_index=_host_index
1716
+ )
1717
+
1718
+ _response_types_map: Dict[str, Optional[str]] = {
1719
+ '200': "LinkResultPaginated",
1720
+ '422': "HTTPValidationError",
1721
+ }
1722
+ response_data = self.api_client.call_api(
1723
+ *_param,
1724
+ _request_timeout=_request_timeout
1725
+ )
1726
+ response_data.read()
1727
+ return self.api_client.response_deserialize(
1728
+ response_data=response_data,
1729
+ response_types_map=_response_types_map,
1730
+ )
1731
+
1732
+
1733
+ @validate_call
1734
+ def get_evaluate_without_preload_content(
1735
+ self,
1736
+ username: StrictStr,
1737
+ dataset: StrictStr,
1738
+ linker: StrictStr,
1739
+ sort_by: Optional[StrictStr] = None,
1740
+ sort_dir: Optional[StrictStr] = None,
1741
+ page: Optional[StrictInt] = None,
1742
+ size: Optional[StrictInt] = None,
1743
+ _request_timeout: Union[
1744
+ None,
1745
+ Annotated[StrictFloat, Field(gt=0)],
1746
+ Tuple[
1747
+ Annotated[StrictFloat, Field(gt=0)],
1748
+ Annotated[StrictFloat, Field(gt=0)]
1749
+ ]
1750
+ ] = None,
1751
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1752
+ _content_type: Optional[StrictStr] = None,
1753
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1754
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1755
+ ) -> RESTResponseType:
1756
+ """Get evaluation results
1757
+
1758
+
1759
+ :param username: (required)
1760
+ :type username: str
1761
+ :param dataset: (required)
1762
+ :type dataset: str
1763
+ :param linker: (required)
1764
+ :type linker: str
1765
+ :param sort_by:
1766
+ :type sort_by: str
1767
+ :param sort_dir:
1768
+ :type sort_dir: str
1769
+ :param page:
1770
+ :type page: int
1771
+ :param size:
1772
+ :type size: int
1773
+ :param _request_timeout: timeout setting for this request. If one
1774
+ number provided, it will be total request
1775
+ timeout. It can also be a pair (tuple) of
1776
+ (connection, read) timeouts.
1777
+ :type _request_timeout: int, tuple(int, int), optional
1778
+ :param _request_auth: set to override the auth_settings for an a single
1779
+ request; this effectively ignores the
1780
+ authentication in the spec for a single request.
1781
+ :type _request_auth: dict, optional
1782
+ :param _content_type: force content-type for the request.
1783
+ :type _content_type: str, Optional
1784
+ :param _headers: set to override the headers for a single
1785
+ request; this effectively ignores the headers
1786
+ in the spec for a single request.
1787
+ :type _headers: dict, optional
1788
+ :param _host_index: set to override the host_index for a single
1789
+ request; this effectively ignores the host_index
1790
+ in the spec for a single request.
1791
+ :type _host_index: int, optional
1792
+ :return: Returns the result object.
1793
+ """ # noqa: E501
1794
+
1795
+ _param = self._get_evaluate_serialize(
1796
+ username=username,
1797
+ dataset=dataset,
1798
+ linker=linker,
1799
+ sort_by=sort_by,
1800
+ sort_dir=sort_dir,
1801
+ page=page,
1802
+ size=size,
1803
+ _request_auth=_request_auth,
1804
+ _content_type=_content_type,
1805
+ _headers=_headers,
1806
+ _host_index=_host_index
1807
+ )
1808
+
1809
+ _response_types_map: Dict[str, Optional[str]] = {
1810
+ '200': "LinkResultPaginated",
1811
+ '422': "HTTPValidationError",
1812
+ }
1813
+ response_data = self.api_client.call_api(
1814
+ *_param,
1815
+ _request_timeout=_request_timeout
1816
+ )
1817
+ return response_data.response
1818
+
1819
+
1820
+ def _get_evaluate_serialize(
1821
+ self,
1822
+ username,
1823
+ dataset,
1824
+ linker,
1825
+ sort_by,
1826
+ sort_dir,
1827
+ page,
1828
+ size,
1829
+ _request_auth,
1830
+ _content_type,
1831
+ _headers,
1832
+ _host_index,
1833
+ ) -> RequestSerialized:
1834
+
1835
+ _host = None
1836
+
1837
+ _collection_formats: Dict[str, str] = {
1838
+ }
1839
+
1840
+ _path_params: Dict[str, str] = {}
1841
+ _query_params: List[Tuple[str, str]] = []
1842
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1843
+ _form_params: List[Tuple[str, str]] = []
1844
+ _files: Dict[
1845
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1846
+ ] = {}
1847
+ _body_params: Optional[bytes] = None
1848
+
1849
+ # process the path parameters
1850
+ # process the query parameters
1851
+ if username is not None:
1852
+
1853
+ _query_params.append(('username', username))
1854
+
1855
+ if dataset is not None:
1856
+
1857
+ _query_params.append(('dataset', dataset))
1858
+
1859
+ if linker is not None:
1860
+
1861
+ _query_params.append(('linker', linker))
1862
+
1863
+ if sort_by is not None:
1864
+
1865
+ _query_params.append(('sortBy', sort_by))
1866
+
1867
+ if sort_dir is not None:
1868
+
1869
+ _query_params.append(('sortDir', sort_dir))
1870
+
1871
+ if page is not None:
1872
+
1873
+ _query_params.append(('page', page))
1874
+
1875
+ if size is not None:
1876
+
1877
+ _query_params.append(('size', size))
1878
+
1879
+ # process the header parameters
1880
+ # process the form parameters
1881
+ # process the body parameter
1882
+
1883
+
1884
+ # set the HTTP header `Accept`
1885
+ if 'Accept' not in _header_params:
1886
+ _header_params['Accept'] = self.api_client.select_header_accept(
1887
+ [
1888
+ 'application/json'
1889
+ ]
1890
+ )
1891
+
1892
+
1893
+ # authentication setting
1894
+ _auth_settings: List[str] = [
1895
+ 'QAnswer-Api-Key',
1896
+ 'Bearer token'
1897
+ ]
1898
+
1899
+ return self.api_client.param_serialize(
1900
+ method='GET',
1901
+ resource_path='/api/tasks/rdf/linker/evaluate',
1902
+ path_params=_path_params,
1903
+ query_params=_query_params,
1904
+ header_params=_header_params,
1905
+ body=_body_params,
1906
+ post_params=_form_params,
1907
+ files=_files,
1908
+ auth_settings=_auth_settings,
1909
+ collection_formats=_collection_formats,
1910
+ _host=_host,
1911
+ _request_auth=_request_auth
1912
+ )
1913
+
1914
+
1915
+
1916
+
1917
+ @validate_call
1918
+ def link(
1919
+ self,
1920
+ username: StrictStr,
1921
+ dataset: StrictStr,
1922
+ linker: StrictStr,
1923
+ text: StrictStr,
1924
+ _request_timeout: Union[
1925
+ None,
1926
+ Annotated[StrictFloat, Field(gt=0)],
1927
+ Tuple[
1928
+ Annotated[StrictFloat, Field(gt=0)],
1929
+ Annotated[StrictFloat, Field(gt=0)]
1930
+ ]
1931
+ ] = None,
1932
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1933
+ _content_type: Optional[StrictStr] = None,
1934
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1935
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1936
+ ) -> List[Dict[str, object]]:
1937
+ """Link text using a trained linker
1938
+
1939
+
1940
+ :param username: (required)
1941
+ :type username: str
1942
+ :param dataset: (required)
1943
+ :type dataset: str
1944
+ :param linker: (required)
1945
+ :type linker: str
1946
+ :param text: (required)
1947
+ :type text: str
1948
+ :param _request_timeout: timeout setting for this request. If one
1949
+ number provided, it will be total request
1950
+ timeout. It can also be a pair (tuple) of
1951
+ (connection, read) timeouts.
1952
+ :type _request_timeout: int, tuple(int, int), optional
1953
+ :param _request_auth: set to override the auth_settings for an a single
1954
+ request; this effectively ignores the
1955
+ authentication in the spec for a single request.
1956
+ :type _request_auth: dict, optional
1957
+ :param _content_type: force content-type for the request.
1958
+ :type _content_type: str, Optional
1959
+ :param _headers: set to override the headers for a single
1960
+ request; this effectively ignores the headers
1961
+ in the spec for a single request.
1962
+ :type _headers: dict, optional
1963
+ :param _host_index: set to override the host_index for a single
1964
+ request; this effectively ignores the host_index
1965
+ in the spec for a single request.
1966
+ :type _host_index: int, optional
1967
+ :return: Returns the result object.
1968
+ """ # noqa: E501
1969
+
1970
+ _param = self._link_serialize(
1971
+ username=username,
1972
+ dataset=dataset,
1973
+ linker=linker,
1974
+ text=text,
1975
+ _request_auth=_request_auth,
1976
+ _content_type=_content_type,
1977
+ _headers=_headers,
1978
+ _host_index=_host_index
1979
+ )
1980
+
1981
+ _response_types_map: Dict[str, Optional[str]] = {
1982
+ '200': "List[Dict[str, object]]",
1983
+ '422': "HTTPValidationError",
1984
+ }
1985
+ response_data = self.api_client.call_api(
1986
+ *_param,
1987
+ _request_timeout=_request_timeout
1988
+ )
1989
+ response_data.read()
1990
+ return self.api_client.response_deserialize(
1991
+ response_data=response_data,
1992
+ response_types_map=_response_types_map,
1993
+ ).data
1994
+
1995
+
1996
+ @validate_call
1997
+ def link_with_http_info(
1998
+ self,
1999
+ username: StrictStr,
2000
+ dataset: StrictStr,
2001
+ linker: StrictStr,
2002
+ text: StrictStr,
2003
+ _request_timeout: Union[
2004
+ None,
2005
+ Annotated[StrictFloat, Field(gt=0)],
2006
+ Tuple[
2007
+ Annotated[StrictFloat, Field(gt=0)],
2008
+ Annotated[StrictFloat, Field(gt=0)]
2009
+ ]
2010
+ ] = None,
2011
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2012
+ _content_type: Optional[StrictStr] = None,
2013
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2014
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2015
+ ) -> ApiResponse[List[Dict[str, object]]]:
2016
+ """Link text using a trained linker
2017
+
2018
+
2019
+ :param username: (required)
2020
+ :type username: str
2021
+ :param dataset: (required)
2022
+ :type dataset: str
2023
+ :param linker: (required)
2024
+ :type linker: str
2025
+ :param text: (required)
2026
+ :type text: str
2027
+ :param _request_timeout: timeout setting for this request. If one
2028
+ number provided, it will be total request
2029
+ timeout. It can also be a pair (tuple) of
2030
+ (connection, read) timeouts.
2031
+ :type _request_timeout: int, tuple(int, int), optional
2032
+ :param _request_auth: set to override the auth_settings for an a single
2033
+ request; this effectively ignores the
2034
+ authentication in the spec for a single request.
2035
+ :type _request_auth: dict, optional
2036
+ :param _content_type: force content-type for the request.
2037
+ :type _content_type: str, Optional
2038
+ :param _headers: set to override the headers for a single
2039
+ request; this effectively ignores the headers
2040
+ in the spec for a single request.
2041
+ :type _headers: dict, optional
2042
+ :param _host_index: set to override the host_index for a single
2043
+ request; this effectively ignores the host_index
2044
+ in the spec for a single request.
2045
+ :type _host_index: int, optional
2046
+ :return: Returns the result object.
2047
+ """ # noqa: E501
2048
+
2049
+ _param = self._link_serialize(
2050
+ username=username,
2051
+ dataset=dataset,
2052
+ linker=linker,
2053
+ text=text,
2054
+ _request_auth=_request_auth,
2055
+ _content_type=_content_type,
2056
+ _headers=_headers,
2057
+ _host_index=_host_index
2058
+ )
2059
+
2060
+ _response_types_map: Dict[str, Optional[str]] = {
2061
+ '200': "List[Dict[str, object]]",
2062
+ '422': "HTTPValidationError",
2063
+ }
2064
+ response_data = self.api_client.call_api(
2065
+ *_param,
2066
+ _request_timeout=_request_timeout
2067
+ )
2068
+ response_data.read()
2069
+ return self.api_client.response_deserialize(
2070
+ response_data=response_data,
2071
+ response_types_map=_response_types_map,
2072
+ )
2073
+
2074
+
2075
+ @validate_call
2076
+ def link_without_preload_content(
2077
+ self,
2078
+ username: StrictStr,
2079
+ dataset: StrictStr,
2080
+ linker: StrictStr,
2081
+ text: StrictStr,
2082
+ _request_timeout: Union[
2083
+ None,
2084
+ Annotated[StrictFloat, Field(gt=0)],
2085
+ Tuple[
2086
+ Annotated[StrictFloat, Field(gt=0)],
2087
+ Annotated[StrictFloat, Field(gt=0)]
2088
+ ]
2089
+ ] = None,
2090
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2091
+ _content_type: Optional[StrictStr] = None,
2092
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2093
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2094
+ ) -> RESTResponseType:
2095
+ """Link text using a trained linker
2096
+
2097
+
2098
+ :param username: (required)
2099
+ :type username: str
2100
+ :param dataset: (required)
2101
+ :type dataset: str
2102
+ :param linker: (required)
2103
+ :type linker: str
2104
+ :param text: (required)
2105
+ :type text: str
2106
+ :param _request_timeout: timeout setting for this request. If one
2107
+ number provided, it will be total request
2108
+ timeout. It can also be a pair (tuple) of
2109
+ (connection, read) timeouts.
2110
+ :type _request_timeout: int, tuple(int, int), optional
2111
+ :param _request_auth: set to override the auth_settings for an a single
2112
+ request; this effectively ignores the
2113
+ authentication in the spec for a single request.
2114
+ :type _request_auth: dict, optional
2115
+ :param _content_type: force content-type for the request.
2116
+ :type _content_type: str, Optional
2117
+ :param _headers: set to override the headers for a single
2118
+ request; this effectively ignores the headers
2119
+ in the spec for a single request.
2120
+ :type _headers: dict, optional
2121
+ :param _host_index: set to override the host_index for a single
2122
+ request; this effectively ignores the host_index
2123
+ in the spec for a single request.
2124
+ :type _host_index: int, optional
2125
+ :return: Returns the result object.
2126
+ """ # noqa: E501
2127
+
2128
+ _param = self._link_serialize(
2129
+ username=username,
2130
+ dataset=dataset,
2131
+ linker=linker,
2132
+ text=text,
2133
+ _request_auth=_request_auth,
2134
+ _content_type=_content_type,
2135
+ _headers=_headers,
2136
+ _host_index=_host_index
2137
+ )
2138
+
2139
+ _response_types_map: Dict[str, Optional[str]] = {
2140
+ '200': "List[Dict[str, object]]",
2141
+ '422': "HTTPValidationError",
2142
+ }
2143
+ response_data = self.api_client.call_api(
2144
+ *_param,
2145
+ _request_timeout=_request_timeout
2146
+ )
2147
+ return response_data.response
2148
+
2149
+
2150
+ def _link_serialize(
2151
+ self,
2152
+ username,
2153
+ dataset,
2154
+ linker,
2155
+ text,
2156
+ _request_auth,
2157
+ _content_type,
2158
+ _headers,
2159
+ _host_index,
2160
+ ) -> RequestSerialized:
2161
+
2162
+ _host = None
2163
+
2164
+ _collection_formats: Dict[str, str] = {
2165
+ }
2166
+
2167
+ _path_params: Dict[str, str] = {}
2168
+ _query_params: List[Tuple[str, str]] = []
2169
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2170
+ _form_params: List[Tuple[str, str]] = []
2171
+ _files: Dict[
2172
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2173
+ ] = {}
2174
+ _body_params: Optional[bytes] = None
2175
+
2176
+ # process the path parameters
2177
+ # process the query parameters
2178
+ if username is not None:
2179
+
2180
+ _query_params.append(('username', username))
2181
+
2182
+ if dataset is not None:
2183
+
2184
+ _query_params.append(('dataset', dataset))
2185
+
2186
+ if linker is not None:
2187
+
2188
+ _query_params.append(('linker', linker))
2189
+
2190
+ if text is not None:
2191
+
2192
+ _query_params.append(('text', text))
2193
+
2194
+ # process the header parameters
2195
+ # process the form parameters
2196
+ # process the body parameter
2197
+
2198
+
2199
+ # set the HTTP header `Accept`
2200
+ if 'Accept' not in _header_params:
2201
+ _header_params['Accept'] = self.api_client.select_header_accept(
2202
+ [
2203
+ 'application/json'
2204
+ ]
2205
+ )
2206
+
2207
+
2208
+ # authentication setting
2209
+ _auth_settings: List[str] = [
2210
+ 'QAnswer-Api-Key',
2211
+ 'Bearer token'
2212
+ ]
2213
+
2214
+ return self.api_client.param_serialize(
2215
+ method='GET',
2216
+ resource_path='/api/tasks/rdf/linker/link',
2217
+ path_params=_path_params,
2218
+ query_params=_query_params,
2219
+ header_params=_header_params,
2220
+ body=_body_params,
2221
+ post_params=_form_params,
2222
+ files=_files,
2223
+ auth_settings=_auth_settings,
2224
+ collection_formats=_collection_formats,
2225
+ _host=_host,
2226
+ _request_auth=_request_auth
2227
+ )
2228
+
2229
+
2230
+
2231
+
2232
+ @validate_call
2233
+ def list_linkers(
2234
+ self,
2235
+ username: StrictStr,
2236
+ dataset: StrictStr,
2237
+ _request_timeout: Union[
2238
+ None,
2239
+ Annotated[StrictFloat, Field(gt=0)],
2240
+ Tuple[
2241
+ Annotated[StrictFloat, Field(gt=0)],
2242
+ Annotated[StrictFloat, Field(gt=0)]
2243
+ ]
2244
+ ] = None,
2245
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2246
+ _content_type: Optional[StrictStr] = None,
2247
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2248
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2249
+ ) -> List[str]:
2250
+ """List available linkers for a dataset
2251
+
2252
+
2253
+ :param username: (required)
2254
+ :type username: str
2255
+ :param dataset: (required)
2256
+ :type dataset: str
2257
+ :param _request_timeout: timeout setting for this request. If one
2258
+ number provided, it will be total request
2259
+ timeout. It can also be a pair (tuple) of
2260
+ (connection, read) timeouts.
2261
+ :type _request_timeout: int, tuple(int, int), optional
2262
+ :param _request_auth: set to override the auth_settings for an a single
2263
+ request; this effectively ignores the
2264
+ authentication in the spec for a single request.
2265
+ :type _request_auth: dict, optional
2266
+ :param _content_type: force content-type for the request.
2267
+ :type _content_type: str, Optional
2268
+ :param _headers: set to override the headers for a single
2269
+ request; this effectively ignores the headers
2270
+ in the spec for a single request.
2271
+ :type _headers: dict, optional
2272
+ :param _host_index: set to override the host_index for a single
2273
+ request; this effectively ignores the host_index
2274
+ in the spec for a single request.
2275
+ :type _host_index: int, optional
2276
+ :return: Returns the result object.
2277
+ """ # noqa: E501
2278
+
2279
+ _param = self._list_linkers_serialize(
2280
+ username=username,
2281
+ dataset=dataset,
2282
+ _request_auth=_request_auth,
2283
+ _content_type=_content_type,
2284
+ _headers=_headers,
2285
+ _host_index=_host_index
2286
+ )
2287
+
2288
+ _response_types_map: Dict[str, Optional[str]] = {
2289
+ '200': "List[str]",
2290
+ '422': "HTTPValidationError",
2291
+ }
2292
+ response_data = self.api_client.call_api(
2293
+ *_param,
2294
+ _request_timeout=_request_timeout
2295
+ )
2296
+ response_data.read()
2297
+ return self.api_client.response_deserialize(
2298
+ response_data=response_data,
2299
+ response_types_map=_response_types_map,
2300
+ ).data
2301
+
2302
+
2303
+ @validate_call
2304
+ def list_linkers_with_http_info(
2305
+ self,
2306
+ username: StrictStr,
2307
+ dataset: StrictStr,
2308
+ _request_timeout: Union[
2309
+ None,
2310
+ Annotated[StrictFloat, Field(gt=0)],
2311
+ Tuple[
2312
+ Annotated[StrictFloat, Field(gt=0)],
2313
+ Annotated[StrictFloat, Field(gt=0)]
2314
+ ]
2315
+ ] = None,
2316
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2317
+ _content_type: Optional[StrictStr] = None,
2318
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2319
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2320
+ ) -> ApiResponse[List[str]]:
2321
+ """List available linkers for a dataset
2322
+
2323
+
2324
+ :param username: (required)
2325
+ :type username: str
2326
+ :param dataset: (required)
2327
+ :type dataset: str
2328
+ :param _request_timeout: timeout setting for this request. If one
2329
+ number provided, it will be total request
2330
+ timeout. It can also be a pair (tuple) of
2331
+ (connection, read) timeouts.
2332
+ :type _request_timeout: int, tuple(int, int), optional
2333
+ :param _request_auth: set to override the auth_settings for an a single
2334
+ request; this effectively ignores the
2335
+ authentication in the spec for a single request.
2336
+ :type _request_auth: dict, optional
2337
+ :param _content_type: force content-type for the request.
2338
+ :type _content_type: str, Optional
2339
+ :param _headers: set to override the headers for a single
2340
+ request; this effectively ignores the headers
2341
+ in the spec for a single request.
2342
+ :type _headers: dict, optional
2343
+ :param _host_index: set to override the host_index for a single
2344
+ request; this effectively ignores the host_index
2345
+ in the spec for a single request.
2346
+ :type _host_index: int, optional
2347
+ :return: Returns the result object.
2348
+ """ # noqa: E501
2349
+
2350
+ _param = self._list_linkers_serialize(
2351
+ username=username,
2352
+ dataset=dataset,
2353
+ _request_auth=_request_auth,
2354
+ _content_type=_content_type,
2355
+ _headers=_headers,
2356
+ _host_index=_host_index
2357
+ )
2358
+
2359
+ _response_types_map: Dict[str, Optional[str]] = {
2360
+ '200': "List[str]",
2361
+ '422': "HTTPValidationError",
2362
+ }
2363
+ response_data = self.api_client.call_api(
2364
+ *_param,
2365
+ _request_timeout=_request_timeout
2366
+ )
2367
+ response_data.read()
2368
+ return self.api_client.response_deserialize(
2369
+ response_data=response_data,
2370
+ response_types_map=_response_types_map,
2371
+ )
2372
+
2373
+
2374
+ @validate_call
2375
+ def list_linkers_without_preload_content(
2376
+ self,
2377
+ username: StrictStr,
2378
+ dataset: StrictStr,
2379
+ _request_timeout: Union[
2380
+ None,
2381
+ Annotated[StrictFloat, Field(gt=0)],
2382
+ Tuple[
2383
+ Annotated[StrictFloat, Field(gt=0)],
2384
+ Annotated[StrictFloat, Field(gt=0)]
2385
+ ]
2386
+ ] = None,
2387
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2388
+ _content_type: Optional[StrictStr] = None,
2389
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2390
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2391
+ ) -> RESTResponseType:
2392
+ """List available linkers for a dataset
2393
+
2394
+
2395
+ :param username: (required)
2396
+ :type username: str
2397
+ :param dataset: (required)
2398
+ :type dataset: str
2399
+ :param _request_timeout: timeout setting for this request. If one
2400
+ number provided, it will be total request
2401
+ timeout. It can also be a pair (tuple) of
2402
+ (connection, read) timeouts.
2403
+ :type _request_timeout: int, tuple(int, int), optional
2404
+ :param _request_auth: set to override the auth_settings for an a single
2405
+ request; this effectively ignores the
2406
+ authentication in the spec for a single request.
2407
+ :type _request_auth: dict, optional
2408
+ :param _content_type: force content-type for the request.
2409
+ :type _content_type: str, Optional
2410
+ :param _headers: set to override the headers for a single
2411
+ request; this effectively ignores the headers
2412
+ in the spec for a single request.
2413
+ :type _headers: dict, optional
2414
+ :param _host_index: set to override the host_index for a single
2415
+ request; this effectively ignores the host_index
2416
+ in the spec for a single request.
2417
+ :type _host_index: int, optional
2418
+ :return: Returns the result object.
2419
+ """ # noqa: E501
2420
+
2421
+ _param = self._list_linkers_serialize(
2422
+ username=username,
2423
+ dataset=dataset,
2424
+ _request_auth=_request_auth,
2425
+ _content_type=_content_type,
2426
+ _headers=_headers,
2427
+ _host_index=_host_index
2428
+ )
2429
+
2430
+ _response_types_map: Dict[str, Optional[str]] = {
2431
+ '200': "List[str]",
2432
+ '422': "HTTPValidationError",
2433
+ }
2434
+ response_data = self.api_client.call_api(
2435
+ *_param,
2436
+ _request_timeout=_request_timeout
2437
+ )
2438
+ return response_data.response
2439
+
2440
+
2441
+ def _list_linkers_serialize(
2442
+ self,
2443
+ username,
2444
+ dataset,
2445
+ _request_auth,
2446
+ _content_type,
2447
+ _headers,
2448
+ _host_index,
2449
+ ) -> RequestSerialized:
2450
+
2451
+ _host = None
2452
+
2453
+ _collection_formats: Dict[str, str] = {
2454
+ }
2455
+
2456
+ _path_params: Dict[str, str] = {}
2457
+ _query_params: List[Tuple[str, str]] = []
2458
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2459
+ _form_params: List[Tuple[str, str]] = []
2460
+ _files: Dict[
2461
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2462
+ ] = {}
2463
+ _body_params: Optional[bytes] = None
2464
+
2465
+ # process the path parameters
2466
+ # process the query parameters
2467
+ if username is not None:
2468
+
2469
+ _query_params.append(('username', username))
2470
+
2471
+ if dataset is not None:
2472
+
2473
+ _query_params.append(('dataset', dataset))
2474
+
2475
+ # process the header parameters
2476
+ # process the form parameters
2477
+ # process the body parameter
2478
+
2479
+
2480
+ # set the HTTP header `Accept`
2481
+ if 'Accept' not in _header_params:
2482
+ _header_params['Accept'] = self.api_client.select_header_accept(
2483
+ [
2484
+ 'application/json'
2485
+ ]
2486
+ )
2487
+
2488
+
2489
+ # authentication setting
2490
+ _auth_settings: List[str] = [
2491
+ 'QAnswer-Api-Key',
2492
+ 'Bearer token'
2493
+ ]
2494
+
2495
+ return self.api_client.param_serialize(
2496
+ method='GET',
2497
+ resource_path='/api/tasks/rdf/linker/list',
2498
+ path_params=_path_params,
2499
+ query_params=_query_params,
2500
+ header_params=_header_params,
2501
+ body=_body_params,
2502
+ post_params=_form_params,
2503
+ files=_files,
2504
+ auth_settings=_auth_settings,
2505
+ collection_formats=_collection_formats,
2506
+ _host=_host,
2507
+ _request_auth=_request_auth
2508
+ )
2509
+
2510
+
2511
+
2512
+
2513
+ @validate_call
2514
+ def post_aggregate(
2515
+ self,
2516
+ username: StrictStr,
2517
+ dataset: StrictStr,
2518
+ linker: StrictStr,
2519
+ aggregate: List[Aggregate],
2520
+ _request_timeout: Union[
2521
+ None,
2522
+ Annotated[StrictFloat, Field(gt=0)],
2523
+ Tuple[
2524
+ Annotated[StrictFloat, Field(gt=0)],
2525
+ Annotated[StrictFloat, Field(gt=0)]
2526
+ ]
2527
+ ] = None,
2528
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2529
+ _content_type: Optional[StrictStr] = None,
2530
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2531
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2532
+ ) -> str:
2533
+ """Save aggregation list
2534
+
2535
+
2536
+ :param username: (required)
2537
+ :type username: str
2538
+ :param dataset: (required)
2539
+ :type dataset: str
2540
+ :param linker: (required)
2541
+ :type linker: str
2542
+ :param aggregate: (required)
2543
+ :type aggregate: List[Aggregate]
2544
+ :param _request_timeout: timeout setting for this request. If one
2545
+ number provided, it will be total request
2546
+ timeout. It can also be a pair (tuple) of
2547
+ (connection, read) timeouts.
2548
+ :type _request_timeout: int, tuple(int, int), optional
2549
+ :param _request_auth: set to override the auth_settings for an a single
2550
+ request; this effectively ignores the
2551
+ authentication in the spec for a single request.
2552
+ :type _request_auth: dict, optional
2553
+ :param _content_type: force content-type for the request.
2554
+ :type _content_type: str, Optional
2555
+ :param _headers: set to override the headers for a single
2556
+ request; this effectively ignores the headers
2557
+ in the spec for a single request.
2558
+ :type _headers: dict, optional
2559
+ :param _host_index: set to override the host_index for a single
2560
+ request; this effectively ignores the host_index
2561
+ in the spec for a single request.
2562
+ :type _host_index: int, optional
2563
+ :return: Returns the result object.
2564
+ """ # noqa: E501
2565
+
2566
+ _param = self._post_aggregate_serialize(
2567
+ username=username,
2568
+ dataset=dataset,
2569
+ linker=linker,
2570
+ aggregate=aggregate,
2571
+ _request_auth=_request_auth,
2572
+ _content_type=_content_type,
2573
+ _headers=_headers,
2574
+ _host_index=_host_index
2575
+ )
2576
+
2577
+ _response_types_map: Dict[str, Optional[str]] = {
2578
+ '200': "str",
2579
+ '422': "HTTPValidationError",
2580
+ }
2581
+ response_data = self.api_client.call_api(
2582
+ *_param,
2583
+ _request_timeout=_request_timeout
2584
+ )
2585
+ response_data.read()
2586
+ return self.api_client.response_deserialize(
2587
+ response_data=response_data,
2588
+ response_types_map=_response_types_map,
2589
+ ).data
2590
+
2591
+
2592
+ @validate_call
2593
+ def post_aggregate_with_http_info(
2594
+ self,
2595
+ username: StrictStr,
2596
+ dataset: StrictStr,
2597
+ linker: StrictStr,
2598
+ aggregate: List[Aggregate],
2599
+ _request_timeout: Union[
2600
+ None,
2601
+ Annotated[StrictFloat, Field(gt=0)],
2602
+ Tuple[
2603
+ Annotated[StrictFloat, Field(gt=0)],
2604
+ Annotated[StrictFloat, Field(gt=0)]
2605
+ ]
2606
+ ] = None,
2607
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2608
+ _content_type: Optional[StrictStr] = None,
2609
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2610
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2611
+ ) -> ApiResponse[str]:
2612
+ """Save aggregation list
2613
+
2614
+
2615
+ :param username: (required)
2616
+ :type username: str
2617
+ :param dataset: (required)
2618
+ :type dataset: str
2619
+ :param linker: (required)
2620
+ :type linker: str
2621
+ :param aggregate: (required)
2622
+ :type aggregate: List[Aggregate]
2623
+ :param _request_timeout: timeout setting for this request. If one
2624
+ number provided, it will be total request
2625
+ timeout. It can also be a pair (tuple) of
2626
+ (connection, read) timeouts.
2627
+ :type _request_timeout: int, tuple(int, int), optional
2628
+ :param _request_auth: set to override the auth_settings for an a single
2629
+ request; this effectively ignores the
2630
+ authentication in the spec for a single request.
2631
+ :type _request_auth: dict, optional
2632
+ :param _content_type: force content-type for the request.
2633
+ :type _content_type: str, Optional
2634
+ :param _headers: set to override the headers for a single
2635
+ request; this effectively ignores the headers
2636
+ in the spec for a single request.
2637
+ :type _headers: dict, optional
2638
+ :param _host_index: set to override the host_index for a single
2639
+ request; this effectively ignores the host_index
2640
+ in the spec for a single request.
2641
+ :type _host_index: int, optional
2642
+ :return: Returns the result object.
2643
+ """ # noqa: E501
2644
+
2645
+ _param = self._post_aggregate_serialize(
2646
+ username=username,
2647
+ dataset=dataset,
2648
+ linker=linker,
2649
+ aggregate=aggregate,
2650
+ _request_auth=_request_auth,
2651
+ _content_type=_content_type,
2652
+ _headers=_headers,
2653
+ _host_index=_host_index
2654
+ )
2655
+
2656
+ _response_types_map: Dict[str, Optional[str]] = {
2657
+ '200': "str",
2658
+ '422': "HTTPValidationError",
2659
+ }
2660
+ response_data = self.api_client.call_api(
2661
+ *_param,
2662
+ _request_timeout=_request_timeout
2663
+ )
2664
+ response_data.read()
2665
+ return self.api_client.response_deserialize(
2666
+ response_data=response_data,
2667
+ response_types_map=_response_types_map,
2668
+ )
2669
+
2670
+
2671
+ @validate_call
2672
+ def post_aggregate_without_preload_content(
2673
+ self,
2674
+ username: StrictStr,
2675
+ dataset: StrictStr,
2676
+ linker: StrictStr,
2677
+ aggregate: List[Aggregate],
2678
+ _request_timeout: Union[
2679
+ None,
2680
+ Annotated[StrictFloat, Field(gt=0)],
2681
+ Tuple[
2682
+ Annotated[StrictFloat, Field(gt=0)],
2683
+ Annotated[StrictFloat, Field(gt=0)]
2684
+ ]
2685
+ ] = None,
2686
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2687
+ _content_type: Optional[StrictStr] = None,
2688
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2689
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2690
+ ) -> RESTResponseType:
2691
+ """Save aggregation list
2692
+
2693
+
2694
+ :param username: (required)
2695
+ :type username: str
2696
+ :param dataset: (required)
2697
+ :type dataset: str
2698
+ :param linker: (required)
2699
+ :type linker: str
2700
+ :param aggregate: (required)
2701
+ :type aggregate: List[Aggregate]
2702
+ :param _request_timeout: timeout setting for this request. If one
2703
+ number provided, it will be total request
2704
+ timeout. It can also be a pair (tuple) of
2705
+ (connection, read) timeouts.
2706
+ :type _request_timeout: int, tuple(int, int), optional
2707
+ :param _request_auth: set to override the auth_settings for an a single
2708
+ request; this effectively ignores the
2709
+ authentication in the spec for a single request.
2710
+ :type _request_auth: dict, optional
2711
+ :param _content_type: force content-type for the request.
2712
+ :type _content_type: str, Optional
2713
+ :param _headers: set to override the headers for a single
2714
+ request; this effectively ignores the headers
2715
+ in the spec for a single request.
2716
+ :type _headers: dict, optional
2717
+ :param _host_index: set to override the host_index for a single
2718
+ request; this effectively ignores the host_index
2719
+ in the spec for a single request.
2720
+ :type _host_index: int, optional
2721
+ :return: Returns the result object.
2722
+ """ # noqa: E501
2723
+
2724
+ _param = self._post_aggregate_serialize(
2725
+ username=username,
2726
+ dataset=dataset,
2727
+ linker=linker,
2728
+ aggregate=aggregate,
2729
+ _request_auth=_request_auth,
2730
+ _content_type=_content_type,
2731
+ _headers=_headers,
2732
+ _host_index=_host_index
2733
+ )
2734
+
2735
+ _response_types_map: Dict[str, Optional[str]] = {
2736
+ '200': "str",
2737
+ '422': "HTTPValidationError",
2738
+ }
2739
+ response_data = self.api_client.call_api(
2740
+ *_param,
2741
+ _request_timeout=_request_timeout
2742
+ )
2743
+ return response_data.response
2744
+
2745
+
2746
+ def _post_aggregate_serialize(
2747
+ self,
2748
+ username,
2749
+ dataset,
2750
+ linker,
2751
+ aggregate,
2752
+ _request_auth,
2753
+ _content_type,
2754
+ _headers,
2755
+ _host_index,
2756
+ ) -> RequestSerialized:
2757
+
2758
+ _host = None
2759
+
2760
+ _collection_formats: Dict[str, str] = {
2761
+ 'Aggregate': '',
2762
+ }
2763
+
2764
+ _path_params: Dict[str, str] = {}
2765
+ _query_params: List[Tuple[str, str]] = []
2766
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2767
+ _form_params: List[Tuple[str, str]] = []
2768
+ _files: Dict[
2769
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2770
+ ] = {}
2771
+ _body_params: Optional[bytes] = None
2772
+
2773
+ # process the path parameters
2774
+ # process the query parameters
2775
+ if username is not None:
2776
+
2777
+ _query_params.append(('username', username))
2778
+
2779
+ if dataset is not None:
2780
+
2781
+ _query_params.append(('dataset', dataset))
2782
+
2783
+ if linker is not None:
2784
+
2785
+ _query_params.append(('linker', linker))
2786
+
2787
+ # process the header parameters
2788
+ # process the form parameters
2789
+ # process the body parameter
2790
+ if aggregate is not None:
2791
+ _body_params = aggregate
2792
+
2793
+
2794
+ # set the HTTP header `Accept`
2795
+ if 'Accept' not in _header_params:
2796
+ _header_params['Accept'] = self.api_client.select_header_accept(
2797
+ [
2798
+ 'application/json'
2799
+ ]
2800
+ )
2801
+
2802
+ # set the HTTP header `Content-Type`
2803
+ if _content_type:
2804
+ _header_params['Content-Type'] = _content_type
2805
+ else:
2806
+ _default_content_type = (
2807
+ self.api_client.select_header_content_type(
2808
+ [
2809
+ 'application/json'
2810
+ ]
2811
+ )
2812
+ )
2813
+ if _default_content_type is not None:
2814
+ _header_params['Content-Type'] = _default_content_type
2815
+
2816
+ # authentication setting
2817
+ _auth_settings: List[str] = [
2818
+ 'QAnswer-Api-Key',
2819
+ 'Bearer token'
2820
+ ]
2821
+
2822
+ return self.api_client.param_serialize(
2823
+ method='POST',
2824
+ resource_path='/api/tasks/rdf/linker/aggregate',
2825
+ path_params=_path_params,
2826
+ query_params=_query_params,
2827
+ header_params=_header_params,
2828
+ body=_body_params,
2829
+ post_params=_form_params,
2830
+ files=_files,
2831
+ auth_settings=_auth_settings,
2832
+ collection_formats=_collection_formats,
2833
+ _host=_host,
2834
+ _request_auth=_request_auth
2835
+ )
2836
+
2837
+
2838
+
2839
+
2840
+ @validate_call
2841
+ def post_evaluate(
2842
+ self,
2843
+ username: StrictStr,
2844
+ dataset: StrictStr,
2845
+ linker: StrictStr,
2846
+ linking_result: LinkingResult,
2847
+ _request_timeout: Union[
2848
+ None,
2849
+ Annotated[StrictFloat, Field(gt=0)],
2850
+ Tuple[
2851
+ Annotated[StrictFloat, Field(gt=0)],
2852
+ Annotated[StrictFloat, Field(gt=0)]
2853
+ ]
2854
+ ] = None,
2855
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2856
+ _content_type: Optional[StrictStr] = None,
2857
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2858
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2859
+ ) -> str:
2860
+ """Save evaluation results
2861
+
2862
+
2863
+ :param username: (required)
2864
+ :type username: str
2865
+ :param dataset: (required)
2866
+ :type dataset: str
2867
+ :param linker: (required)
2868
+ :type linker: str
2869
+ :param linking_result: (required)
2870
+ :type linking_result: LinkingResult
2871
+ :param _request_timeout: timeout setting for this request. If one
2872
+ number provided, it will be total request
2873
+ timeout. It can also be a pair (tuple) of
2874
+ (connection, read) timeouts.
2875
+ :type _request_timeout: int, tuple(int, int), optional
2876
+ :param _request_auth: set to override the auth_settings for an a single
2877
+ request; this effectively ignores the
2878
+ authentication in the spec for a single request.
2879
+ :type _request_auth: dict, optional
2880
+ :param _content_type: force content-type for the request.
2881
+ :type _content_type: str, Optional
2882
+ :param _headers: set to override the headers for a single
2883
+ request; this effectively ignores the headers
2884
+ in the spec for a single request.
2885
+ :type _headers: dict, optional
2886
+ :param _host_index: set to override the host_index for a single
2887
+ request; this effectively ignores the host_index
2888
+ in the spec for a single request.
2889
+ :type _host_index: int, optional
2890
+ :return: Returns the result object.
2891
+ """ # noqa: E501
2892
+
2893
+ _param = self._post_evaluate_serialize(
2894
+ username=username,
2895
+ dataset=dataset,
2896
+ linker=linker,
2897
+ linking_result=linking_result,
2898
+ _request_auth=_request_auth,
2899
+ _content_type=_content_type,
2900
+ _headers=_headers,
2901
+ _host_index=_host_index
2902
+ )
2903
+
2904
+ _response_types_map: Dict[str, Optional[str]] = {
2905
+ '200': "str",
2906
+ '422': "HTTPValidationError",
2907
+ }
2908
+ response_data = self.api_client.call_api(
2909
+ *_param,
2910
+ _request_timeout=_request_timeout
2911
+ )
2912
+ response_data.read()
2913
+ return self.api_client.response_deserialize(
2914
+ response_data=response_data,
2915
+ response_types_map=_response_types_map,
2916
+ ).data
2917
+
2918
+
2919
+ @validate_call
2920
+ def post_evaluate_with_http_info(
2921
+ self,
2922
+ username: StrictStr,
2923
+ dataset: StrictStr,
2924
+ linker: StrictStr,
2925
+ linking_result: LinkingResult,
2926
+ _request_timeout: Union[
2927
+ None,
2928
+ Annotated[StrictFloat, Field(gt=0)],
2929
+ Tuple[
2930
+ Annotated[StrictFloat, Field(gt=0)],
2931
+ Annotated[StrictFloat, Field(gt=0)]
2932
+ ]
2933
+ ] = None,
2934
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2935
+ _content_type: Optional[StrictStr] = None,
2936
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2937
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2938
+ ) -> ApiResponse[str]:
2939
+ """Save evaluation results
2940
+
2941
+
2942
+ :param username: (required)
2943
+ :type username: str
2944
+ :param dataset: (required)
2945
+ :type dataset: str
2946
+ :param linker: (required)
2947
+ :type linker: str
2948
+ :param linking_result: (required)
2949
+ :type linking_result: LinkingResult
2950
+ :param _request_timeout: timeout setting for this request. If one
2951
+ number provided, it will be total request
2952
+ timeout. It can also be a pair (tuple) of
2953
+ (connection, read) timeouts.
2954
+ :type _request_timeout: int, tuple(int, int), optional
2955
+ :param _request_auth: set to override the auth_settings for an a single
2956
+ request; this effectively ignores the
2957
+ authentication in the spec for a single request.
2958
+ :type _request_auth: dict, optional
2959
+ :param _content_type: force content-type for the request.
2960
+ :type _content_type: str, Optional
2961
+ :param _headers: set to override the headers for a single
2962
+ request; this effectively ignores the headers
2963
+ in the spec for a single request.
2964
+ :type _headers: dict, optional
2965
+ :param _host_index: set to override the host_index for a single
2966
+ request; this effectively ignores the host_index
2967
+ in the spec for a single request.
2968
+ :type _host_index: int, optional
2969
+ :return: Returns the result object.
2970
+ """ # noqa: E501
2971
+
2972
+ _param = self._post_evaluate_serialize(
2973
+ username=username,
2974
+ dataset=dataset,
2975
+ linker=linker,
2976
+ linking_result=linking_result,
2977
+ _request_auth=_request_auth,
2978
+ _content_type=_content_type,
2979
+ _headers=_headers,
2980
+ _host_index=_host_index
2981
+ )
2982
+
2983
+ _response_types_map: Dict[str, Optional[str]] = {
2984
+ '200': "str",
2985
+ '422': "HTTPValidationError",
2986
+ }
2987
+ response_data = self.api_client.call_api(
2988
+ *_param,
2989
+ _request_timeout=_request_timeout
2990
+ )
2991
+ response_data.read()
2992
+ return self.api_client.response_deserialize(
2993
+ response_data=response_data,
2994
+ response_types_map=_response_types_map,
2995
+ )
2996
+
2997
+
2998
+ @validate_call
2999
+ def post_evaluate_without_preload_content(
3000
+ self,
3001
+ username: StrictStr,
3002
+ dataset: StrictStr,
3003
+ linker: StrictStr,
3004
+ linking_result: LinkingResult,
3005
+ _request_timeout: Union[
3006
+ None,
3007
+ Annotated[StrictFloat, Field(gt=0)],
3008
+ Tuple[
3009
+ Annotated[StrictFloat, Field(gt=0)],
3010
+ Annotated[StrictFloat, Field(gt=0)]
3011
+ ]
3012
+ ] = None,
3013
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3014
+ _content_type: Optional[StrictStr] = None,
3015
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3016
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3017
+ ) -> RESTResponseType:
3018
+ """Save evaluation results
3019
+
3020
+
3021
+ :param username: (required)
3022
+ :type username: str
3023
+ :param dataset: (required)
3024
+ :type dataset: str
3025
+ :param linker: (required)
3026
+ :type linker: str
3027
+ :param linking_result: (required)
3028
+ :type linking_result: LinkingResult
3029
+ :param _request_timeout: timeout setting for this request. If one
3030
+ number provided, it will be total request
3031
+ timeout. It can also be a pair (tuple) of
3032
+ (connection, read) timeouts.
3033
+ :type _request_timeout: int, tuple(int, int), optional
3034
+ :param _request_auth: set to override the auth_settings for an a single
3035
+ request; this effectively ignores the
3036
+ authentication in the spec for a single request.
3037
+ :type _request_auth: dict, optional
3038
+ :param _content_type: force content-type for the request.
3039
+ :type _content_type: str, Optional
3040
+ :param _headers: set to override the headers for a single
3041
+ request; this effectively ignores the headers
3042
+ in the spec for a single request.
3043
+ :type _headers: dict, optional
3044
+ :param _host_index: set to override the host_index for a single
3045
+ request; this effectively ignores the host_index
3046
+ in the spec for a single request.
3047
+ :type _host_index: int, optional
3048
+ :return: Returns the result object.
3049
+ """ # noqa: E501
3050
+
3051
+ _param = self._post_evaluate_serialize(
3052
+ username=username,
3053
+ dataset=dataset,
3054
+ linker=linker,
3055
+ linking_result=linking_result,
3056
+ _request_auth=_request_auth,
3057
+ _content_type=_content_type,
3058
+ _headers=_headers,
3059
+ _host_index=_host_index
3060
+ )
3061
+
3062
+ _response_types_map: Dict[str, Optional[str]] = {
3063
+ '200': "str",
3064
+ '422': "HTTPValidationError",
3065
+ }
3066
+ response_data = self.api_client.call_api(
3067
+ *_param,
3068
+ _request_timeout=_request_timeout
3069
+ )
3070
+ return response_data.response
3071
+
3072
+
3073
+ def _post_evaluate_serialize(
3074
+ self,
3075
+ username,
3076
+ dataset,
3077
+ linker,
3078
+ linking_result,
3079
+ _request_auth,
3080
+ _content_type,
3081
+ _headers,
3082
+ _host_index,
3083
+ ) -> RequestSerialized:
3084
+
3085
+ _host = None
3086
+
3087
+ _collection_formats: Dict[str, str] = {
3088
+ }
3089
+
3090
+ _path_params: Dict[str, str] = {}
3091
+ _query_params: List[Tuple[str, str]] = []
3092
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3093
+ _form_params: List[Tuple[str, str]] = []
3094
+ _files: Dict[
3095
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3096
+ ] = {}
3097
+ _body_params: Optional[bytes] = None
3098
+
3099
+ # process the path parameters
3100
+ # process the query parameters
3101
+ if username is not None:
3102
+
3103
+ _query_params.append(('username', username))
3104
+
3105
+ if dataset is not None:
3106
+
3107
+ _query_params.append(('dataset', dataset))
3108
+
3109
+ if linker is not None:
3110
+
3111
+ _query_params.append(('linker', linker))
3112
+
3113
+ # process the header parameters
3114
+ # process the form parameters
3115
+ # process the body parameter
3116
+ if linking_result is not None:
3117
+ _body_params = linking_result
3118
+
3119
+
3120
+ # set the HTTP header `Accept`
3121
+ if 'Accept' not in _header_params:
3122
+ _header_params['Accept'] = self.api_client.select_header_accept(
3123
+ [
3124
+ 'application/json'
3125
+ ]
3126
+ )
3127
+
3128
+ # set the HTTP header `Content-Type`
3129
+ if _content_type:
3130
+ _header_params['Content-Type'] = _content_type
3131
+ else:
3132
+ _default_content_type = (
3133
+ self.api_client.select_header_content_type(
3134
+ [
3135
+ 'application/json'
3136
+ ]
3137
+ )
3138
+ )
3139
+ if _default_content_type is not None:
3140
+ _header_params['Content-Type'] = _default_content_type
3141
+
3142
+ # authentication setting
3143
+ _auth_settings: List[str] = [
3144
+ 'QAnswer-Api-Key',
3145
+ 'Bearer token'
3146
+ ]
3147
+
3148
+ return self.api_client.param_serialize(
3149
+ method='POST',
3150
+ resource_path='/api/tasks/rdf/linker/evaluate',
3151
+ path_params=_path_params,
3152
+ query_params=_query_params,
3153
+ header_params=_header_params,
3154
+ body=_body_params,
3155
+ post_params=_form_params,
3156
+ files=_files,
3157
+ auth_settings=_auth_settings,
3158
+ collection_formats=_collection_formats,
3159
+ _host=_host,
3160
+ _request_auth=_request_auth
3161
+ )
3162
+
3163
+
3164
+
3165
+
3166
+ @validate_call
3167
+ def put_aggregate(
3168
+ self,
3169
+ username: StrictStr,
3170
+ dataset: StrictStr,
3171
+ linker: StrictStr,
3172
+ aggregate: List[Aggregate],
3173
+ _request_timeout: Union[
3174
+ None,
3175
+ Annotated[StrictFloat, Field(gt=0)],
3176
+ Tuple[
3177
+ Annotated[StrictFloat, Field(gt=0)],
3178
+ Annotated[StrictFloat, Field(gt=0)]
3179
+ ]
3180
+ ] = None,
3181
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3182
+ _content_type: Optional[StrictStr] = None,
3183
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3184
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3185
+ ) -> str:
3186
+ """Update aggregation
3187
+
3188
+
3189
+ :param username: (required)
3190
+ :type username: str
3191
+ :param dataset: (required)
3192
+ :type dataset: str
3193
+ :param linker: (required)
3194
+ :type linker: str
3195
+ :param aggregate: (required)
3196
+ :type aggregate: List[Aggregate]
3197
+ :param _request_timeout: timeout setting for this request. If one
3198
+ number provided, it will be total request
3199
+ timeout. It can also be a pair (tuple) of
3200
+ (connection, read) timeouts.
3201
+ :type _request_timeout: int, tuple(int, int), optional
3202
+ :param _request_auth: set to override the auth_settings for an a single
3203
+ request; this effectively ignores the
3204
+ authentication in the spec for a single request.
3205
+ :type _request_auth: dict, optional
3206
+ :param _content_type: force content-type for the request.
3207
+ :type _content_type: str, Optional
3208
+ :param _headers: set to override the headers for a single
3209
+ request; this effectively ignores the headers
3210
+ in the spec for a single request.
3211
+ :type _headers: dict, optional
3212
+ :param _host_index: set to override the host_index for a single
3213
+ request; this effectively ignores the host_index
3214
+ in the spec for a single request.
3215
+ :type _host_index: int, optional
3216
+ :return: Returns the result object.
3217
+ """ # noqa: E501
3218
+
3219
+ _param = self._put_aggregate_serialize(
3220
+ username=username,
3221
+ dataset=dataset,
3222
+ linker=linker,
3223
+ aggregate=aggregate,
3224
+ _request_auth=_request_auth,
3225
+ _content_type=_content_type,
3226
+ _headers=_headers,
3227
+ _host_index=_host_index
3228
+ )
3229
+
3230
+ _response_types_map: Dict[str, Optional[str]] = {
3231
+ '200': "str",
3232
+ '422': "HTTPValidationError",
3233
+ }
3234
+ response_data = self.api_client.call_api(
3235
+ *_param,
3236
+ _request_timeout=_request_timeout
3237
+ )
3238
+ response_data.read()
3239
+ return self.api_client.response_deserialize(
3240
+ response_data=response_data,
3241
+ response_types_map=_response_types_map,
3242
+ ).data
3243
+
3244
+
3245
+ @validate_call
3246
+ def put_aggregate_with_http_info(
3247
+ self,
3248
+ username: StrictStr,
3249
+ dataset: StrictStr,
3250
+ linker: StrictStr,
3251
+ aggregate: List[Aggregate],
3252
+ _request_timeout: Union[
3253
+ None,
3254
+ Annotated[StrictFloat, Field(gt=0)],
3255
+ Tuple[
3256
+ Annotated[StrictFloat, Field(gt=0)],
3257
+ Annotated[StrictFloat, Field(gt=0)]
3258
+ ]
3259
+ ] = None,
3260
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3261
+ _content_type: Optional[StrictStr] = None,
3262
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3263
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3264
+ ) -> ApiResponse[str]:
3265
+ """Update aggregation
3266
+
3267
+
3268
+ :param username: (required)
3269
+ :type username: str
3270
+ :param dataset: (required)
3271
+ :type dataset: str
3272
+ :param linker: (required)
3273
+ :type linker: str
3274
+ :param aggregate: (required)
3275
+ :type aggregate: List[Aggregate]
3276
+ :param _request_timeout: timeout setting for this request. If one
3277
+ number provided, it will be total request
3278
+ timeout. It can also be a pair (tuple) of
3279
+ (connection, read) timeouts.
3280
+ :type _request_timeout: int, tuple(int, int), optional
3281
+ :param _request_auth: set to override the auth_settings for an a single
3282
+ request; this effectively ignores the
3283
+ authentication in the spec for a single request.
3284
+ :type _request_auth: dict, optional
3285
+ :param _content_type: force content-type for the request.
3286
+ :type _content_type: str, Optional
3287
+ :param _headers: set to override the headers for a single
3288
+ request; this effectively ignores the headers
3289
+ in the spec for a single request.
3290
+ :type _headers: dict, optional
3291
+ :param _host_index: set to override the host_index for a single
3292
+ request; this effectively ignores the host_index
3293
+ in the spec for a single request.
3294
+ :type _host_index: int, optional
3295
+ :return: Returns the result object.
3296
+ """ # noqa: E501
3297
+
3298
+ _param = self._put_aggregate_serialize(
3299
+ username=username,
3300
+ dataset=dataset,
3301
+ linker=linker,
3302
+ aggregate=aggregate,
3303
+ _request_auth=_request_auth,
3304
+ _content_type=_content_type,
3305
+ _headers=_headers,
3306
+ _host_index=_host_index
3307
+ )
3308
+
3309
+ _response_types_map: Dict[str, Optional[str]] = {
3310
+ '200': "str",
3311
+ '422': "HTTPValidationError",
3312
+ }
3313
+ response_data = self.api_client.call_api(
3314
+ *_param,
3315
+ _request_timeout=_request_timeout
3316
+ )
3317
+ response_data.read()
3318
+ return self.api_client.response_deserialize(
3319
+ response_data=response_data,
3320
+ response_types_map=_response_types_map,
3321
+ )
3322
+
3323
+
3324
+ @validate_call
3325
+ def put_aggregate_without_preload_content(
3326
+ self,
3327
+ username: StrictStr,
3328
+ dataset: StrictStr,
3329
+ linker: StrictStr,
3330
+ aggregate: List[Aggregate],
3331
+ _request_timeout: Union[
3332
+ None,
3333
+ Annotated[StrictFloat, Field(gt=0)],
3334
+ Tuple[
3335
+ Annotated[StrictFloat, Field(gt=0)],
3336
+ Annotated[StrictFloat, Field(gt=0)]
3337
+ ]
3338
+ ] = None,
3339
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3340
+ _content_type: Optional[StrictStr] = None,
3341
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3342
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3343
+ ) -> RESTResponseType:
3344
+ """Update aggregation
3345
+
3346
+
3347
+ :param username: (required)
3348
+ :type username: str
3349
+ :param dataset: (required)
3350
+ :type dataset: str
3351
+ :param linker: (required)
3352
+ :type linker: str
3353
+ :param aggregate: (required)
3354
+ :type aggregate: List[Aggregate]
3355
+ :param _request_timeout: timeout setting for this request. If one
3356
+ number provided, it will be total request
3357
+ timeout. It can also be a pair (tuple) of
3358
+ (connection, read) timeouts.
3359
+ :type _request_timeout: int, tuple(int, int), optional
3360
+ :param _request_auth: set to override the auth_settings for an a single
3361
+ request; this effectively ignores the
3362
+ authentication in the spec for a single request.
3363
+ :type _request_auth: dict, optional
3364
+ :param _content_type: force content-type for the request.
3365
+ :type _content_type: str, Optional
3366
+ :param _headers: set to override the headers for a single
3367
+ request; this effectively ignores the headers
3368
+ in the spec for a single request.
3369
+ :type _headers: dict, optional
3370
+ :param _host_index: set to override the host_index for a single
3371
+ request; this effectively ignores the host_index
3372
+ in the spec for a single request.
3373
+ :type _host_index: int, optional
3374
+ :return: Returns the result object.
3375
+ """ # noqa: E501
3376
+
3377
+ _param = self._put_aggregate_serialize(
3378
+ username=username,
3379
+ dataset=dataset,
3380
+ linker=linker,
3381
+ aggregate=aggregate,
3382
+ _request_auth=_request_auth,
3383
+ _content_type=_content_type,
3384
+ _headers=_headers,
3385
+ _host_index=_host_index
3386
+ )
3387
+
3388
+ _response_types_map: Dict[str, Optional[str]] = {
3389
+ '200': "str",
3390
+ '422': "HTTPValidationError",
3391
+ }
3392
+ response_data = self.api_client.call_api(
3393
+ *_param,
3394
+ _request_timeout=_request_timeout
3395
+ )
3396
+ return response_data.response
3397
+
3398
+
3399
+ def _put_aggregate_serialize(
3400
+ self,
3401
+ username,
3402
+ dataset,
3403
+ linker,
3404
+ aggregate,
3405
+ _request_auth,
3406
+ _content_type,
3407
+ _headers,
3408
+ _host_index,
3409
+ ) -> RequestSerialized:
3410
+
3411
+ _host = None
3412
+
3413
+ _collection_formats: Dict[str, str] = {
3414
+ 'Aggregate': '',
3415
+ }
3416
+
3417
+ _path_params: Dict[str, str] = {}
3418
+ _query_params: List[Tuple[str, str]] = []
3419
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3420
+ _form_params: List[Tuple[str, str]] = []
3421
+ _files: Dict[
3422
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3423
+ ] = {}
3424
+ _body_params: Optional[bytes] = None
3425
+
3426
+ # process the path parameters
3427
+ # process the query parameters
3428
+ if username is not None:
3429
+
3430
+ _query_params.append(('username', username))
3431
+
3432
+ if dataset is not None:
3433
+
3434
+ _query_params.append(('dataset', dataset))
3435
+
3436
+ if linker is not None:
3437
+
3438
+ _query_params.append(('linker', linker))
3439
+
3440
+ # process the header parameters
3441
+ # process the form parameters
3442
+ # process the body parameter
3443
+ if aggregate is not None:
3444
+ _body_params = aggregate
3445
+
3446
+
3447
+ # set the HTTP header `Accept`
3448
+ if 'Accept' not in _header_params:
3449
+ _header_params['Accept'] = self.api_client.select_header_accept(
3450
+ [
3451
+ 'application/json'
3452
+ ]
3453
+ )
3454
+
3455
+ # set the HTTP header `Content-Type`
3456
+ if _content_type:
3457
+ _header_params['Content-Type'] = _content_type
3458
+ else:
3459
+ _default_content_type = (
3460
+ self.api_client.select_header_content_type(
3461
+ [
3462
+ 'application/json'
3463
+ ]
3464
+ )
3465
+ )
3466
+ if _default_content_type is not None:
3467
+ _header_params['Content-Type'] = _default_content_type
3468
+
3469
+ # authentication setting
3470
+ _auth_settings: List[str] = [
3471
+ 'QAnswer-Api-Key',
3472
+ 'Bearer token'
3473
+ ]
3474
+
3475
+ return self.api_client.param_serialize(
3476
+ method='PUT',
3477
+ resource_path='/api/tasks/rdf/linker/aggregate',
3478
+ path_params=_path_params,
3479
+ query_params=_query_params,
3480
+ header_params=_header_params,
3481
+ body=_body_params,
3482
+ post_params=_form_params,
3483
+ files=_files,
3484
+ auth_settings=_auth_settings,
3485
+ collection_formats=_collection_formats,
3486
+ _host=_host,
3487
+ _request_auth=_request_auth
3488
+ )
3489
+
3490
+
3491
+
3492
+
3493
+ @validate_call
3494
+ def train(
3495
+ self,
3496
+ username: StrictStr,
3497
+ dataset: StrictStr,
3498
+ linker: StrictStr,
3499
+ _request_timeout: Union[
3500
+ None,
3501
+ Annotated[StrictFloat, Field(gt=0)],
3502
+ Tuple[
3503
+ Annotated[StrictFloat, Field(gt=0)],
3504
+ Annotated[StrictFloat, Field(gt=0)]
3505
+ ]
3506
+ ] = None,
3507
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3508
+ _content_type: Optional[StrictStr] = None,
3509
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3510
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3511
+ ) -> str:
3512
+ """Train a linker
3513
+
3514
+
3515
+ :param username: (required)
3516
+ :type username: str
3517
+ :param dataset: (required)
3518
+ :type dataset: str
3519
+ :param linker: (required)
3520
+ :type linker: str
3521
+ :param _request_timeout: timeout setting for this request. If one
3522
+ number provided, it will be total request
3523
+ timeout. It can also be a pair (tuple) of
3524
+ (connection, read) timeouts.
3525
+ :type _request_timeout: int, tuple(int, int), optional
3526
+ :param _request_auth: set to override the auth_settings for an a single
3527
+ request; this effectively ignores the
3528
+ authentication in the spec for a single request.
3529
+ :type _request_auth: dict, optional
3530
+ :param _content_type: force content-type for the request.
3531
+ :type _content_type: str, Optional
3532
+ :param _headers: set to override the headers for a single
3533
+ request; this effectively ignores the headers
3534
+ in the spec for a single request.
3535
+ :type _headers: dict, optional
3536
+ :param _host_index: set to override the host_index for a single
3537
+ request; this effectively ignores the host_index
3538
+ in the spec for a single request.
3539
+ :type _host_index: int, optional
3540
+ :return: Returns the result object.
3541
+ """ # noqa: E501
3542
+
3543
+ _param = self._train_serialize(
3544
+ username=username,
3545
+ dataset=dataset,
3546
+ linker=linker,
3547
+ _request_auth=_request_auth,
3548
+ _content_type=_content_type,
3549
+ _headers=_headers,
3550
+ _host_index=_host_index
3551
+ )
3552
+
3553
+ _response_types_map: Dict[str, Optional[str]] = {
3554
+ '200': "str",
3555
+ '422': "HTTPValidationError",
3556
+ }
3557
+ response_data = self.api_client.call_api(
3558
+ *_param,
3559
+ _request_timeout=_request_timeout
3560
+ )
3561
+ response_data.read()
3562
+ return self.api_client.response_deserialize(
3563
+ response_data=response_data,
3564
+ response_types_map=_response_types_map,
3565
+ ).data
3566
+
3567
+
3568
+ @validate_call
3569
+ def train_with_http_info(
3570
+ self,
3571
+ username: StrictStr,
3572
+ dataset: StrictStr,
3573
+ linker: StrictStr,
3574
+ _request_timeout: Union[
3575
+ None,
3576
+ Annotated[StrictFloat, Field(gt=0)],
3577
+ Tuple[
3578
+ Annotated[StrictFloat, Field(gt=0)],
3579
+ Annotated[StrictFloat, Field(gt=0)]
3580
+ ]
3581
+ ] = None,
3582
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3583
+ _content_type: Optional[StrictStr] = None,
3584
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3585
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3586
+ ) -> ApiResponse[str]:
3587
+ """Train a linker
3588
+
3589
+
3590
+ :param username: (required)
3591
+ :type username: str
3592
+ :param dataset: (required)
3593
+ :type dataset: str
3594
+ :param linker: (required)
3595
+ :type linker: str
3596
+ :param _request_timeout: timeout setting for this request. If one
3597
+ number provided, it will be total request
3598
+ timeout. It can also be a pair (tuple) of
3599
+ (connection, read) timeouts.
3600
+ :type _request_timeout: int, tuple(int, int), optional
3601
+ :param _request_auth: set to override the auth_settings for an a single
3602
+ request; this effectively ignores the
3603
+ authentication in the spec for a single request.
3604
+ :type _request_auth: dict, optional
3605
+ :param _content_type: force content-type for the request.
3606
+ :type _content_type: str, Optional
3607
+ :param _headers: set to override the headers for a single
3608
+ request; this effectively ignores the headers
3609
+ in the spec for a single request.
3610
+ :type _headers: dict, optional
3611
+ :param _host_index: set to override the host_index for a single
3612
+ request; this effectively ignores the host_index
3613
+ in the spec for a single request.
3614
+ :type _host_index: int, optional
3615
+ :return: Returns the result object.
3616
+ """ # noqa: E501
3617
+
3618
+ _param = self._train_serialize(
3619
+ username=username,
3620
+ dataset=dataset,
3621
+ linker=linker,
3622
+ _request_auth=_request_auth,
3623
+ _content_type=_content_type,
3624
+ _headers=_headers,
3625
+ _host_index=_host_index
3626
+ )
3627
+
3628
+ _response_types_map: Dict[str, Optional[str]] = {
3629
+ '200': "str",
3630
+ '422': "HTTPValidationError",
3631
+ }
3632
+ response_data = self.api_client.call_api(
3633
+ *_param,
3634
+ _request_timeout=_request_timeout
3635
+ )
3636
+ response_data.read()
3637
+ return self.api_client.response_deserialize(
3638
+ response_data=response_data,
3639
+ response_types_map=_response_types_map,
3640
+ )
3641
+
3642
+
3643
+ @validate_call
3644
+ def train_without_preload_content(
3645
+ self,
3646
+ username: StrictStr,
3647
+ dataset: StrictStr,
3648
+ linker: StrictStr,
3649
+ _request_timeout: Union[
3650
+ None,
3651
+ Annotated[StrictFloat, Field(gt=0)],
3652
+ Tuple[
3653
+ Annotated[StrictFloat, Field(gt=0)],
3654
+ Annotated[StrictFloat, Field(gt=0)]
3655
+ ]
3656
+ ] = None,
3657
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3658
+ _content_type: Optional[StrictStr] = None,
3659
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3660
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3661
+ ) -> RESTResponseType:
3662
+ """Train a linker
3663
+
3664
+
3665
+ :param username: (required)
3666
+ :type username: str
3667
+ :param dataset: (required)
3668
+ :type dataset: str
3669
+ :param linker: (required)
3670
+ :type linker: str
3671
+ :param _request_timeout: timeout setting for this request. If one
3672
+ number provided, it will be total request
3673
+ timeout. It can also be a pair (tuple) of
3674
+ (connection, read) timeouts.
3675
+ :type _request_timeout: int, tuple(int, int), optional
3676
+ :param _request_auth: set to override the auth_settings for an a single
3677
+ request; this effectively ignores the
3678
+ authentication in the spec for a single request.
3679
+ :type _request_auth: dict, optional
3680
+ :param _content_type: force content-type for the request.
3681
+ :type _content_type: str, Optional
3682
+ :param _headers: set to override the headers for a single
3683
+ request; this effectively ignores the headers
3684
+ in the spec for a single request.
3685
+ :type _headers: dict, optional
3686
+ :param _host_index: set to override the host_index for a single
3687
+ request; this effectively ignores the host_index
3688
+ in the spec for a single request.
3689
+ :type _host_index: int, optional
3690
+ :return: Returns the result object.
3691
+ """ # noqa: E501
3692
+
3693
+ _param = self._train_serialize(
3694
+ username=username,
3695
+ dataset=dataset,
3696
+ linker=linker,
3697
+ _request_auth=_request_auth,
3698
+ _content_type=_content_type,
3699
+ _headers=_headers,
3700
+ _host_index=_host_index
3701
+ )
3702
+
3703
+ _response_types_map: Dict[str, Optional[str]] = {
3704
+ '200': "str",
3705
+ '422': "HTTPValidationError",
3706
+ }
3707
+ response_data = self.api_client.call_api(
3708
+ *_param,
3709
+ _request_timeout=_request_timeout
3710
+ )
3711
+ return response_data.response
3712
+
3713
+
3714
+ def _train_serialize(
3715
+ self,
3716
+ username,
3717
+ dataset,
3718
+ linker,
3719
+ _request_auth,
3720
+ _content_type,
3721
+ _headers,
3722
+ _host_index,
3723
+ ) -> RequestSerialized:
3724
+
3725
+ _host = None
3726
+
3727
+ _collection_formats: Dict[str, str] = {
3728
+ }
3729
+
3730
+ _path_params: Dict[str, str] = {}
3731
+ _query_params: List[Tuple[str, str]] = []
3732
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3733
+ _form_params: List[Tuple[str, str]] = []
3734
+ _files: Dict[
3735
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3736
+ ] = {}
3737
+ _body_params: Optional[bytes] = None
3738
+
3739
+ # process the path parameters
3740
+ # process the query parameters
3741
+ if username is not None:
3742
+
3743
+ _query_params.append(('username', username))
3744
+
3745
+ if dataset is not None:
3746
+
3747
+ _query_params.append(('dataset', dataset))
3748
+
3749
+ if linker is not None:
3750
+
3751
+ _query_params.append(('linker', linker))
3752
+
3753
+ # process the header parameters
3754
+ # process the form parameters
3755
+ # process the body parameter
3756
+
3757
+
3758
+ # set the HTTP header `Accept`
3759
+ if 'Accept' not in _header_params:
3760
+ _header_params['Accept'] = self.api_client.select_header_accept(
3761
+ [
3762
+ 'application/json'
3763
+ ]
3764
+ )
3765
+
3766
+
3767
+ # authentication setting
3768
+ _auth_settings: List[str] = [
3769
+ 'QAnswer-Api-Key',
3770
+ 'Bearer token'
3771
+ ]
3772
+
3773
+ return self.api_client.param_serialize(
3774
+ method='POST',
3775
+ resource_path='/api/tasks/rdf/linker/train',
3776
+ path_params=_path_params,
3777
+ query_params=_query_params,
3778
+ header_params=_header_params,
3779
+ body=_body_params,
3780
+ post_params=_form_params,
3781
+ files=_files,
3782
+ auth_settings=_auth_settings,
3783
+ collection_formats=_collection_formats,
3784
+ _host=_host,
3785
+ _request_auth=_request_auth
3786
+ )
3787
+
3788
+
3789
+
3790
+
3791
+ @validate_call
3792
+ def upload_labels(
3793
+ self,
3794
+ username: StrictStr,
3795
+ dataset: StrictStr,
3796
+ linker: StrictStr,
3797
+ languages: List[StrictStr],
3798
+ file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
3799
+ _request_timeout: Union[
3800
+ None,
3801
+ Annotated[StrictFloat, Field(gt=0)],
3802
+ Tuple[
3803
+ Annotated[StrictFloat, Field(gt=0)],
3804
+ Annotated[StrictFloat, Field(gt=0)]
3805
+ ]
3806
+ ] = None,
3807
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3808
+ _content_type: Optional[StrictStr] = None,
3809
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3810
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3811
+ ) -> str:
3812
+ """Upload labels for a linker
3813
+
3814
+
3815
+ :param username: (required)
3816
+ :type username: str
3817
+ :param dataset: (required)
3818
+ :type dataset: str
3819
+ :param linker: (required)
3820
+ :type linker: str
3821
+ :param languages: (required)
3822
+ :type languages: List[str]
3823
+ :param file: (required)
3824
+ :type file: bytearray
3825
+ :param _request_timeout: timeout setting for this request. If one
3826
+ number provided, it will be total request
3827
+ timeout. It can also be a pair (tuple) of
3828
+ (connection, read) timeouts.
3829
+ :type _request_timeout: int, tuple(int, int), optional
3830
+ :param _request_auth: set to override the auth_settings for an a single
3831
+ request; this effectively ignores the
3832
+ authentication in the spec for a single request.
3833
+ :type _request_auth: dict, optional
3834
+ :param _content_type: force content-type for the request.
3835
+ :type _content_type: str, Optional
3836
+ :param _headers: set to override the headers for a single
3837
+ request; this effectively ignores the headers
3838
+ in the spec for a single request.
3839
+ :type _headers: dict, optional
3840
+ :param _host_index: set to override the host_index for a single
3841
+ request; this effectively ignores the host_index
3842
+ in the spec for a single request.
3843
+ :type _host_index: int, optional
3844
+ :return: Returns the result object.
3845
+ """ # noqa: E501
3846
+
3847
+ _param = self._upload_labels_serialize(
3848
+ username=username,
3849
+ dataset=dataset,
3850
+ linker=linker,
3851
+ languages=languages,
3852
+ file=file,
3853
+ _request_auth=_request_auth,
3854
+ _content_type=_content_type,
3855
+ _headers=_headers,
3856
+ _host_index=_host_index
3857
+ )
3858
+
3859
+ _response_types_map: Dict[str, Optional[str]] = {
3860
+ '200': "str",
3861
+ '422': "HTTPValidationError",
3862
+ }
3863
+ response_data = self.api_client.call_api(
3864
+ *_param,
3865
+ _request_timeout=_request_timeout
3866
+ )
3867
+ response_data.read()
3868
+ return self.api_client.response_deserialize(
3869
+ response_data=response_data,
3870
+ response_types_map=_response_types_map,
3871
+ ).data
3872
+
3873
+
3874
+ @validate_call
3875
+ def upload_labels_with_http_info(
3876
+ self,
3877
+ username: StrictStr,
3878
+ dataset: StrictStr,
3879
+ linker: StrictStr,
3880
+ languages: List[StrictStr],
3881
+ file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
3882
+ _request_timeout: Union[
3883
+ None,
3884
+ Annotated[StrictFloat, Field(gt=0)],
3885
+ Tuple[
3886
+ Annotated[StrictFloat, Field(gt=0)],
3887
+ Annotated[StrictFloat, Field(gt=0)]
3888
+ ]
3889
+ ] = None,
3890
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3891
+ _content_type: Optional[StrictStr] = None,
3892
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3893
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3894
+ ) -> ApiResponse[str]:
3895
+ """Upload labels for a linker
3896
+
3897
+
3898
+ :param username: (required)
3899
+ :type username: str
3900
+ :param dataset: (required)
3901
+ :type dataset: str
3902
+ :param linker: (required)
3903
+ :type linker: str
3904
+ :param languages: (required)
3905
+ :type languages: List[str]
3906
+ :param file: (required)
3907
+ :type file: bytearray
3908
+ :param _request_timeout: timeout setting for this request. If one
3909
+ number provided, it will be total request
3910
+ timeout. It can also be a pair (tuple) of
3911
+ (connection, read) timeouts.
3912
+ :type _request_timeout: int, tuple(int, int), optional
3913
+ :param _request_auth: set to override the auth_settings for an a single
3914
+ request; this effectively ignores the
3915
+ authentication in the spec for a single request.
3916
+ :type _request_auth: dict, optional
3917
+ :param _content_type: force content-type for the request.
3918
+ :type _content_type: str, Optional
3919
+ :param _headers: set to override the headers for a single
3920
+ request; this effectively ignores the headers
3921
+ in the spec for a single request.
3922
+ :type _headers: dict, optional
3923
+ :param _host_index: set to override the host_index for a single
3924
+ request; this effectively ignores the host_index
3925
+ in the spec for a single request.
3926
+ :type _host_index: int, optional
3927
+ :return: Returns the result object.
3928
+ """ # noqa: E501
3929
+
3930
+ _param = self._upload_labels_serialize(
3931
+ username=username,
3932
+ dataset=dataset,
3933
+ linker=linker,
3934
+ languages=languages,
3935
+ file=file,
3936
+ _request_auth=_request_auth,
3937
+ _content_type=_content_type,
3938
+ _headers=_headers,
3939
+ _host_index=_host_index
3940
+ )
3941
+
3942
+ _response_types_map: Dict[str, Optional[str]] = {
3943
+ '200': "str",
3944
+ '422': "HTTPValidationError",
3945
+ }
3946
+ response_data = self.api_client.call_api(
3947
+ *_param,
3948
+ _request_timeout=_request_timeout
3949
+ )
3950
+ response_data.read()
3951
+ return self.api_client.response_deserialize(
3952
+ response_data=response_data,
3953
+ response_types_map=_response_types_map,
3954
+ )
3955
+
3956
+
3957
+ @validate_call
3958
+ def upload_labels_without_preload_content(
3959
+ self,
3960
+ username: StrictStr,
3961
+ dataset: StrictStr,
3962
+ linker: StrictStr,
3963
+ languages: List[StrictStr],
3964
+ file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
3965
+ _request_timeout: Union[
3966
+ None,
3967
+ Annotated[StrictFloat, Field(gt=0)],
3968
+ Tuple[
3969
+ Annotated[StrictFloat, Field(gt=0)],
3970
+ Annotated[StrictFloat, Field(gt=0)]
3971
+ ]
3972
+ ] = None,
3973
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3974
+ _content_type: Optional[StrictStr] = None,
3975
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3976
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3977
+ ) -> RESTResponseType:
3978
+ """Upload labels for a linker
3979
+
3980
+
3981
+ :param username: (required)
3982
+ :type username: str
3983
+ :param dataset: (required)
3984
+ :type dataset: str
3985
+ :param linker: (required)
3986
+ :type linker: str
3987
+ :param languages: (required)
3988
+ :type languages: List[str]
3989
+ :param file: (required)
3990
+ :type file: bytearray
3991
+ :param _request_timeout: timeout setting for this request. If one
3992
+ number provided, it will be total request
3993
+ timeout. It can also be a pair (tuple) of
3994
+ (connection, read) timeouts.
3995
+ :type _request_timeout: int, tuple(int, int), optional
3996
+ :param _request_auth: set to override the auth_settings for an a single
3997
+ request; this effectively ignores the
3998
+ authentication in the spec for a single request.
3999
+ :type _request_auth: dict, optional
4000
+ :param _content_type: force content-type for the request.
4001
+ :type _content_type: str, Optional
4002
+ :param _headers: set to override the headers for a single
4003
+ request; this effectively ignores the headers
4004
+ in the spec for a single request.
4005
+ :type _headers: dict, optional
4006
+ :param _host_index: set to override the host_index for a single
4007
+ request; this effectively ignores the host_index
4008
+ in the spec for a single request.
4009
+ :type _host_index: int, optional
4010
+ :return: Returns the result object.
4011
+ """ # noqa: E501
4012
+
4013
+ _param = self._upload_labels_serialize(
4014
+ username=username,
4015
+ dataset=dataset,
4016
+ linker=linker,
4017
+ languages=languages,
4018
+ file=file,
4019
+ _request_auth=_request_auth,
4020
+ _content_type=_content_type,
4021
+ _headers=_headers,
4022
+ _host_index=_host_index
4023
+ )
4024
+
4025
+ _response_types_map: Dict[str, Optional[str]] = {
4026
+ '200': "str",
4027
+ '422': "HTTPValidationError",
4028
+ }
4029
+ response_data = self.api_client.call_api(
4030
+ *_param,
4031
+ _request_timeout=_request_timeout
4032
+ )
4033
+ return response_data.response
4034
+
4035
+
4036
+ def _upload_labels_serialize(
4037
+ self,
4038
+ username,
4039
+ dataset,
4040
+ linker,
4041
+ languages,
4042
+ file,
4043
+ _request_auth,
4044
+ _content_type,
4045
+ _headers,
4046
+ _host_index,
4047
+ ) -> RequestSerialized:
4048
+
4049
+ _host = None
4050
+
4051
+ _collection_formats: Dict[str, str] = {
4052
+ 'languages': 'multi',
4053
+ }
4054
+
4055
+ _path_params: Dict[str, str] = {}
4056
+ _query_params: List[Tuple[str, str]] = []
4057
+ _header_params: Dict[str, Optional[str]] = _headers or {}
4058
+ _form_params: List[Tuple[str, str]] = []
4059
+ _files: Dict[
4060
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
4061
+ ] = {}
4062
+ _body_params: Optional[bytes] = None
4063
+
4064
+ # process the path parameters
4065
+ # process the query parameters
4066
+ if username is not None:
4067
+
4068
+ _query_params.append(('username', username))
4069
+
4070
+ if dataset is not None:
4071
+
4072
+ _query_params.append(('dataset', dataset))
4073
+
4074
+ if linker is not None:
4075
+
4076
+ _query_params.append(('linker', linker))
4077
+
4078
+ if languages is not None:
4079
+
4080
+ _query_params.append(('languages', languages))
4081
+
4082
+ # process the header parameters
4083
+ # process the form parameters
4084
+ if file is not None:
4085
+ _files['file'] = file
4086
+ # process the body parameter
4087
+
4088
+
4089
+ # set the HTTP header `Accept`
4090
+ if 'Accept' not in _header_params:
4091
+ _header_params['Accept'] = self.api_client.select_header_accept(
4092
+ [
4093
+ 'application/json'
4094
+ ]
4095
+ )
4096
+
4097
+ # set the HTTP header `Content-Type`
4098
+ if _content_type:
4099
+ _header_params['Content-Type'] = _content_type
4100
+ else:
4101
+ _default_content_type = (
4102
+ self.api_client.select_header_content_type(
4103
+ [
4104
+ 'multipart/form-data'
4105
+ ]
4106
+ )
4107
+ )
4108
+ if _default_content_type is not None:
4109
+ _header_params['Content-Type'] = _default_content_type
4110
+
4111
+ # authentication setting
4112
+ _auth_settings: List[str] = [
4113
+ 'QAnswer-Api-Key',
4114
+ 'Bearer token'
4115
+ ]
4116
+
4117
+ return self.api_client.param_serialize(
4118
+ method='POST',
4119
+ resource_path='/api/tasks/rdf/linker/upload_labels',
4120
+ path_params=_path_params,
4121
+ query_params=_query_params,
4122
+ header_params=_header_params,
4123
+ body=_body_params,
4124
+ post_params=_form_params,
4125
+ files=_files,
4126
+ auth_settings=_auth_settings,
4127
+ collection_formats=_collection_formats,
4128
+ _host=_host,
4129
+ _request_auth=_request_auth
4130
+ )
4131
+
4132
+
4133
+
4134
+
4135
+ @validate_call
4136
+ def upload_labels_text(
4137
+ self,
4138
+ linker: Linker,
4139
+ _request_timeout: Union[
4140
+ None,
4141
+ Annotated[StrictFloat, Field(gt=0)],
4142
+ Tuple[
4143
+ Annotated[StrictFloat, Field(gt=0)],
4144
+ Annotated[StrictFloat, Field(gt=0)]
4145
+ ]
4146
+ ] = None,
4147
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4148
+ _content_type: Optional[StrictStr] = None,
4149
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4150
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4151
+ ) -> str:
4152
+ """Upload labels as text for a linker
4153
+
4154
+
4155
+ :param linker: (required)
4156
+ :type linker: Linker
4157
+ :param _request_timeout: timeout setting for this request. If one
4158
+ number provided, it will be total request
4159
+ timeout. It can also be a pair (tuple) of
4160
+ (connection, read) timeouts.
4161
+ :type _request_timeout: int, tuple(int, int), optional
4162
+ :param _request_auth: set to override the auth_settings for an a single
4163
+ request; this effectively ignores the
4164
+ authentication in the spec for a single request.
4165
+ :type _request_auth: dict, optional
4166
+ :param _content_type: force content-type for the request.
4167
+ :type _content_type: str, Optional
4168
+ :param _headers: set to override the headers for a single
4169
+ request; this effectively ignores the headers
4170
+ in the spec for a single request.
4171
+ :type _headers: dict, optional
4172
+ :param _host_index: set to override the host_index for a single
4173
+ request; this effectively ignores the host_index
4174
+ in the spec for a single request.
4175
+ :type _host_index: int, optional
4176
+ :return: Returns the result object.
4177
+ """ # noqa: E501
4178
+
4179
+ _param = self._upload_labels_text_serialize(
4180
+ linker=linker,
4181
+ _request_auth=_request_auth,
4182
+ _content_type=_content_type,
4183
+ _headers=_headers,
4184
+ _host_index=_host_index
4185
+ )
4186
+
4187
+ _response_types_map: Dict[str, Optional[str]] = {
4188
+ '200': "str",
4189
+ '422': "HTTPValidationError",
4190
+ }
4191
+ response_data = self.api_client.call_api(
4192
+ *_param,
4193
+ _request_timeout=_request_timeout
4194
+ )
4195
+ response_data.read()
4196
+ return self.api_client.response_deserialize(
4197
+ response_data=response_data,
4198
+ response_types_map=_response_types_map,
4199
+ ).data
4200
+
4201
+
4202
+ @validate_call
4203
+ def upload_labels_text_with_http_info(
4204
+ self,
4205
+ linker: Linker,
4206
+ _request_timeout: Union[
4207
+ None,
4208
+ Annotated[StrictFloat, Field(gt=0)],
4209
+ Tuple[
4210
+ Annotated[StrictFloat, Field(gt=0)],
4211
+ Annotated[StrictFloat, Field(gt=0)]
4212
+ ]
4213
+ ] = None,
4214
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4215
+ _content_type: Optional[StrictStr] = None,
4216
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4217
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4218
+ ) -> ApiResponse[str]:
4219
+ """Upload labels as text for a linker
4220
+
4221
+
4222
+ :param linker: (required)
4223
+ :type linker: Linker
4224
+ :param _request_timeout: timeout setting for this request. If one
4225
+ number provided, it will be total request
4226
+ timeout. It can also be a pair (tuple) of
4227
+ (connection, read) timeouts.
4228
+ :type _request_timeout: int, tuple(int, int), optional
4229
+ :param _request_auth: set to override the auth_settings for an a single
4230
+ request; this effectively ignores the
4231
+ authentication in the spec for a single request.
4232
+ :type _request_auth: dict, optional
4233
+ :param _content_type: force content-type for the request.
4234
+ :type _content_type: str, Optional
4235
+ :param _headers: set to override the headers for a single
4236
+ request; this effectively ignores the headers
4237
+ in the spec for a single request.
4238
+ :type _headers: dict, optional
4239
+ :param _host_index: set to override the host_index for a single
4240
+ request; this effectively ignores the host_index
4241
+ in the spec for a single request.
4242
+ :type _host_index: int, optional
4243
+ :return: Returns the result object.
4244
+ """ # noqa: E501
4245
+
4246
+ _param = self._upload_labels_text_serialize(
4247
+ linker=linker,
4248
+ _request_auth=_request_auth,
4249
+ _content_type=_content_type,
4250
+ _headers=_headers,
4251
+ _host_index=_host_index
4252
+ )
4253
+
4254
+ _response_types_map: Dict[str, Optional[str]] = {
4255
+ '200': "str",
4256
+ '422': "HTTPValidationError",
4257
+ }
4258
+ response_data = self.api_client.call_api(
4259
+ *_param,
4260
+ _request_timeout=_request_timeout
4261
+ )
4262
+ response_data.read()
4263
+ return self.api_client.response_deserialize(
4264
+ response_data=response_data,
4265
+ response_types_map=_response_types_map,
4266
+ )
4267
+
4268
+
4269
+ @validate_call
4270
+ def upload_labels_text_without_preload_content(
4271
+ self,
4272
+ linker: Linker,
4273
+ _request_timeout: Union[
4274
+ None,
4275
+ Annotated[StrictFloat, Field(gt=0)],
4276
+ Tuple[
4277
+ Annotated[StrictFloat, Field(gt=0)],
4278
+ Annotated[StrictFloat, Field(gt=0)]
4279
+ ]
4280
+ ] = None,
4281
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4282
+ _content_type: Optional[StrictStr] = None,
4283
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4284
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4285
+ ) -> RESTResponseType:
4286
+ """Upload labels as text for a linker
4287
+
4288
+
4289
+ :param linker: (required)
4290
+ :type linker: Linker
4291
+ :param _request_timeout: timeout setting for this request. If one
4292
+ number provided, it will be total request
4293
+ timeout. It can also be a pair (tuple) of
4294
+ (connection, read) timeouts.
4295
+ :type _request_timeout: int, tuple(int, int), optional
4296
+ :param _request_auth: set to override the auth_settings for an a single
4297
+ request; this effectively ignores the
4298
+ authentication in the spec for a single request.
4299
+ :type _request_auth: dict, optional
4300
+ :param _content_type: force content-type for the request.
4301
+ :type _content_type: str, Optional
4302
+ :param _headers: set to override the headers for a single
4303
+ request; this effectively ignores the headers
4304
+ in the spec for a single request.
4305
+ :type _headers: dict, optional
4306
+ :param _host_index: set to override the host_index for a single
4307
+ request; this effectively ignores the host_index
4308
+ in the spec for a single request.
4309
+ :type _host_index: int, optional
4310
+ :return: Returns the result object.
4311
+ """ # noqa: E501
4312
+
4313
+ _param = self._upload_labels_text_serialize(
4314
+ linker=linker,
4315
+ _request_auth=_request_auth,
4316
+ _content_type=_content_type,
4317
+ _headers=_headers,
4318
+ _host_index=_host_index
4319
+ )
4320
+
4321
+ _response_types_map: Dict[str, Optional[str]] = {
4322
+ '200': "str",
4323
+ '422': "HTTPValidationError",
4324
+ }
4325
+ response_data = self.api_client.call_api(
4326
+ *_param,
4327
+ _request_timeout=_request_timeout
4328
+ )
4329
+ return response_data.response
4330
+
4331
+
4332
+ def _upload_labels_text_serialize(
4333
+ self,
4334
+ linker,
4335
+ _request_auth,
4336
+ _content_type,
4337
+ _headers,
4338
+ _host_index,
4339
+ ) -> RequestSerialized:
4340
+
4341
+ _host = None
4342
+
4343
+ _collection_formats: Dict[str, str] = {
4344
+ }
4345
+
4346
+ _path_params: Dict[str, str] = {}
4347
+ _query_params: List[Tuple[str, str]] = []
4348
+ _header_params: Dict[str, Optional[str]] = _headers or {}
4349
+ _form_params: List[Tuple[str, str]] = []
4350
+ _files: Dict[
4351
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
4352
+ ] = {}
4353
+ _body_params: Optional[bytes] = None
4354
+
4355
+ # process the path parameters
4356
+ # process the query parameters
4357
+ # process the header parameters
4358
+ # process the form parameters
4359
+ # process the body parameter
4360
+ if linker is not None:
4361
+ _body_params = linker
4362
+
4363
+
4364
+ # set the HTTP header `Accept`
4365
+ if 'Accept' not in _header_params:
4366
+ _header_params['Accept'] = self.api_client.select_header_accept(
4367
+ [
4368
+ 'application/json'
4369
+ ]
4370
+ )
4371
+
4372
+ # set the HTTP header `Content-Type`
4373
+ if _content_type:
4374
+ _header_params['Content-Type'] = _content_type
4375
+ else:
4376
+ _default_content_type = (
4377
+ self.api_client.select_header_content_type(
4378
+ [
4379
+ 'application/json'
4380
+ ]
4381
+ )
4382
+ )
4383
+ if _default_content_type is not None:
4384
+ _header_params['Content-Type'] = _default_content_type
4385
+
4386
+ # authentication setting
4387
+ _auth_settings: List[str] = [
4388
+ 'QAnswer-Api-Key',
4389
+ 'Bearer token'
4390
+ ]
4391
+
4392
+ return self.api_client.param_serialize(
4393
+ method='POST',
4394
+ resource_path='/api/tasks/rdf/linker/upload_labels_text',
4395
+ path_params=_path_params,
4396
+ query_params=_query_params,
4397
+ header_params=_header_params,
4398
+ body=_body_params,
4399
+ post_params=_form_params,
4400
+ files=_files,
4401
+ auth_settings=_auth_settings,
4402
+ collection_formats=_collection_formats,
4403
+ _host=_host,
4404
+ _request_auth=_request_auth
4405
+ )
4406
+
4407
+