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