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,3522 @@
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 StrictInt, StrictStr
20
+ from typing import Dict, List, Optional
21
+ from qanswer_sdk.models.format_return import FormatReturn
22
+ from qanswer_sdk.models.has_lucene_index_result import HasLuceneIndexResult
23
+ from qanswer_sdk.models.is_merging_result import IsMergingResult
24
+ from qanswer_sdk.models.lucene_index_request_result import LuceneIndexRequestResult
25
+ from qanswer_sdk.models.merge_request_result import MergeRequestResult
26
+ from qanswer_sdk.models.set_logo1_request import SetLogo1Request
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 TaskRDFSparqlEndpointApi:
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 format(
48
+ self,
49
+ username: StrictStr,
50
+ dataset: StrictStr,
51
+ query: Optional[StrictStr] = None,
52
+ base_uri: Optional[StrictStr] = None,
53
+ _request_timeout: Union[
54
+ None,
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Tuple[
57
+ Annotated[StrictFloat, Field(gt=0)],
58
+ Annotated[StrictFloat, Field(gt=0)]
59
+ ]
60
+ ] = None,
61
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
62
+ _content_type: Optional[StrictStr] = None,
63
+ _headers: Optional[Dict[StrictStr, Any]] = None,
64
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
65
+ ) -> FormatReturn:
66
+ """API to pretty format a SPARQL query.
67
+
68
+
69
+ :param username: (required)
70
+ :type username: str
71
+ :param dataset: (required)
72
+ :type dataset: str
73
+ :param query:
74
+ :type query: str
75
+ :param base_uri:
76
+ :type base_uri: str
77
+ :param _request_timeout: timeout setting for this request. If one
78
+ number provided, it will be total request
79
+ timeout. It can also be a pair (tuple) of
80
+ (connection, read) timeouts.
81
+ :type _request_timeout: int, tuple(int, int), optional
82
+ :param _request_auth: set to override the auth_settings for an a single
83
+ request; this effectively ignores the
84
+ authentication in the spec for a single request.
85
+ :type _request_auth: dict, optional
86
+ :param _content_type: force content-type for the request.
87
+ :type _content_type: str, Optional
88
+ :param _headers: set to override the headers for a single
89
+ request; this effectively ignores the headers
90
+ in the spec for a single request.
91
+ :type _headers: dict, optional
92
+ :param _host_index: set to override the host_index for a single
93
+ request; this effectively ignores the host_index
94
+ in the spec for a single request.
95
+ :type _host_index: int, optional
96
+ :return: Returns the result object.
97
+ """ # noqa: E501
98
+
99
+ _param = self._format_serialize(
100
+ username=username,
101
+ dataset=dataset,
102
+ query=query,
103
+ base_uri=base_uri,
104
+ _request_auth=_request_auth,
105
+ _content_type=_content_type,
106
+ _headers=_headers,
107
+ _host_index=_host_index
108
+ )
109
+
110
+ _response_types_map: Dict[str, Optional[str]] = {
111
+ '200': "FormatReturn",
112
+ }
113
+ response_data = self.api_client.call_api(
114
+ *_param,
115
+ _request_timeout=_request_timeout
116
+ )
117
+ response_data.read()
118
+ return self.api_client.response_deserialize(
119
+ response_data=response_data,
120
+ response_types_map=_response_types_map,
121
+ ).data
122
+
123
+
124
+ @validate_call
125
+ def format_with_http_info(
126
+ self,
127
+ username: StrictStr,
128
+ dataset: StrictStr,
129
+ query: Optional[StrictStr] = None,
130
+ base_uri: Optional[StrictStr] = None,
131
+ _request_timeout: Union[
132
+ None,
133
+ Annotated[StrictFloat, Field(gt=0)],
134
+ Tuple[
135
+ Annotated[StrictFloat, Field(gt=0)],
136
+ Annotated[StrictFloat, Field(gt=0)]
137
+ ]
138
+ ] = None,
139
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
140
+ _content_type: Optional[StrictStr] = None,
141
+ _headers: Optional[Dict[StrictStr, Any]] = None,
142
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
143
+ ) -> ApiResponse[FormatReturn]:
144
+ """API to pretty format a SPARQL query.
145
+
146
+
147
+ :param username: (required)
148
+ :type username: str
149
+ :param dataset: (required)
150
+ :type dataset: str
151
+ :param query:
152
+ :type query: str
153
+ :param base_uri:
154
+ :type base_uri: str
155
+ :param _request_timeout: timeout setting for this request. If one
156
+ number provided, it will be total request
157
+ timeout. It can also be a pair (tuple) of
158
+ (connection, read) timeouts.
159
+ :type _request_timeout: int, tuple(int, int), optional
160
+ :param _request_auth: set to override the auth_settings for an a single
161
+ request; this effectively ignores the
162
+ authentication in the spec for a single request.
163
+ :type _request_auth: dict, optional
164
+ :param _content_type: force content-type for the request.
165
+ :type _content_type: str, Optional
166
+ :param _headers: set to override the headers for a single
167
+ request; this effectively ignores the headers
168
+ in the spec for a single request.
169
+ :type _headers: dict, optional
170
+ :param _host_index: set to override the host_index for a single
171
+ request; this effectively ignores the host_index
172
+ in the spec for a single request.
173
+ :type _host_index: int, optional
174
+ :return: Returns the result object.
175
+ """ # noqa: E501
176
+
177
+ _param = self._format_serialize(
178
+ username=username,
179
+ dataset=dataset,
180
+ query=query,
181
+ base_uri=base_uri,
182
+ _request_auth=_request_auth,
183
+ _content_type=_content_type,
184
+ _headers=_headers,
185
+ _host_index=_host_index
186
+ )
187
+
188
+ _response_types_map: Dict[str, Optional[str]] = {
189
+ '200': "FormatReturn",
190
+ }
191
+ response_data = self.api_client.call_api(
192
+ *_param,
193
+ _request_timeout=_request_timeout
194
+ )
195
+ response_data.read()
196
+ return self.api_client.response_deserialize(
197
+ response_data=response_data,
198
+ response_types_map=_response_types_map,
199
+ )
200
+
201
+
202
+ @validate_call
203
+ def format_without_preload_content(
204
+ self,
205
+ username: StrictStr,
206
+ dataset: StrictStr,
207
+ query: Optional[StrictStr] = None,
208
+ base_uri: Optional[StrictStr] = None,
209
+ _request_timeout: Union[
210
+ None,
211
+ Annotated[StrictFloat, Field(gt=0)],
212
+ Tuple[
213
+ Annotated[StrictFloat, Field(gt=0)],
214
+ Annotated[StrictFloat, Field(gt=0)]
215
+ ]
216
+ ] = None,
217
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
218
+ _content_type: Optional[StrictStr] = None,
219
+ _headers: Optional[Dict[StrictStr, Any]] = None,
220
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
221
+ ) -> RESTResponseType:
222
+ """API to pretty format a SPARQL query.
223
+
224
+
225
+ :param username: (required)
226
+ :type username: str
227
+ :param dataset: (required)
228
+ :type dataset: str
229
+ :param query:
230
+ :type query: str
231
+ :param base_uri:
232
+ :type base_uri: str
233
+ :param _request_timeout: timeout setting for this request. If one
234
+ number provided, it will be total request
235
+ timeout. It can also be a pair (tuple) of
236
+ (connection, read) timeouts.
237
+ :type _request_timeout: int, tuple(int, int), optional
238
+ :param _request_auth: set to override the auth_settings for an a single
239
+ request; this effectively ignores the
240
+ authentication in the spec for a single request.
241
+ :type _request_auth: dict, optional
242
+ :param _content_type: force content-type for the request.
243
+ :type _content_type: str, Optional
244
+ :param _headers: set to override the headers for a single
245
+ request; this effectively ignores the headers
246
+ in the spec for a single request.
247
+ :type _headers: dict, optional
248
+ :param _host_index: set to override the host_index for a single
249
+ request; this effectively ignores the host_index
250
+ in the spec for a single request.
251
+ :type _host_index: int, optional
252
+ :return: Returns the result object.
253
+ """ # noqa: E501
254
+
255
+ _param = self._format_serialize(
256
+ username=username,
257
+ dataset=dataset,
258
+ query=query,
259
+ base_uri=base_uri,
260
+ _request_auth=_request_auth,
261
+ _content_type=_content_type,
262
+ _headers=_headers,
263
+ _host_index=_host_index
264
+ )
265
+
266
+ _response_types_map: Dict[str, Optional[str]] = {
267
+ '200': "FormatReturn",
268
+ }
269
+ response_data = self.api_client.call_api(
270
+ *_param,
271
+ _request_timeout=_request_timeout
272
+ )
273
+ return response_data.response
274
+
275
+
276
+ def _format_serialize(
277
+ self,
278
+ username,
279
+ dataset,
280
+ query,
281
+ base_uri,
282
+ _request_auth,
283
+ _content_type,
284
+ _headers,
285
+ _host_index,
286
+ ) -> RequestSerialized:
287
+
288
+ _host = None
289
+
290
+ _collection_formats: Dict[str, str] = {
291
+ }
292
+
293
+ _path_params: Dict[str, str] = {}
294
+ _query_params: List[Tuple[str, str]] = []
295
+ _header_params: Dict[str, Optional[str]] = _headers or {}
296
+ _form_params: List[Tuple[str, str]] = []
297
+ _files: Dict[
298
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
299
+ ] = {}
300
+ _body_params: Optional[bytes] = None
301
+
302
+ # process the path parameters
303
+ if username is not None:
304
+ _path_params['username'] = username
305
+ if dataset is not None:
306
+ _path_params['dataset'] = dataset
307
+ # process the query parameters
308
+ if query is not None:
309
+
310
+ _query_params.append(('query', query))
311
+
312
+ if base_uri is not None:
313
+
314
+ _query_params.append(('baseURI', base_uri))
315
+
316
+ # process the header parameters
317
+ # process the form parameters
318
+ # process the body parameter
319
+
320
+
321
+ # set the HTTP header `Accept`
322
+ if 'Accept' not in _header_params:
323
+ _header_params['Accept'] = self.api_client.select_header_accept(
324
+ [
325
+ '*/*'
326
+ ]
327
+ )
328
+
329
+
330
+ # authentication setting
331
+ _auth_settings: List[str] = [
332
+ 'QAnswer-Api-Key',
333
+ 'Bearer'
334
+ ]
335
+
336
+ return self.api_client.param_serialize(
337
+ method='GET',
338
+ resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/format',
339
+ path_params=_path_params,
340
+ query_params=_query_params,
341
+ header_params=_header_params,
342
+ body=_body_params,
343
+ post_params=_form_params,
344
+ files=_files,
345
+ auth_settings=_auth_settings,
346
+ collection_formats=_collection_formats,
347
+ _host=_host,
348
+ _request_auth=_request_auth
349
+ )
350
+
351
+
352
+
353
+
354
+ @validate_call
355
+ def has_index(
356
+ self,
357
+ username: StrictStr,
358
+ dataset: StrictStr,
359
+ q_answer_api_key: Optional[StrictStr] = None,
360
+ _request_timeout: Union[
361
+ None,
362
+ Annotated[StrictFloat, Field(gt=0)],
363
+ Tuple[
364
+ Annotated[StrictFloat, Field(gt=0)],
365
+ Annotated[StrictFloat, Field(gt=0)]
366
+ ]
367
+ ] = None,
368
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
369
+ _content_type: Optional[StrictStr] = None,
370
+ _headers: Optional[Dict[StrictStr, Any]] = None,
371
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
372
+ ) -> HasLuceneIndexResult:
373
+ """API to check if the lucene index is generated
374
+
375
+
376
+ :param username: (required)
377
+ :type username: str
378
+ :param dataset: (required)
379
+ :type dataset: str
380
+ :param q_answer_api_key:
381
+ :type q_answer_api_key: str
382
+ :param _request_timeout: timeout setting for this request. If one
383
+ number provided, it will be total request
384
+ timeout. It can also be a pair (tuple) of
385
+ (connection, read) timeouts.
386
+ :type _request_timeout: int, tuple(int, int), optional
387
+ :param _request_auth: set to override the auth_settings for an a single
388
+ request; this effectively ignores the
389
+ authentication in the spec for a single request.
390
+ :type _request_auth: dict, optional
391
+ :param _content_type: force content-type for the request.
392
+ :type _content_type: str, Optional
393
+ :param _headers: set to override the headers for a single
394
+ request; this effectively ignores the headers
395
+ in the spec for a single request.
396
+ :type _headers: dict, optional
397
+ :param _host_index: set to override the host_index for a single
398
+ request; this effectively ignores the host_index
399
+ in the spec for a single request.
400
+ :type _host_index: int, optional
401
+ :return: Returns the result object.
402
+ """ # noqa: E501
403
+
404
+ _param = self._has_index_serialize(
405
+ username=username,
406
+ dataset=dataset,
407
+ q_answer_api_key=q_answer_api_key,
408
+ _request_auth=_request_auth,
409
+ _content_type=_content_type,
410
+ _headers=_headers,
411
+ _host_index=_host_index
412
+ )
413
+
414
+ _response_types_map: Dict[str, Optional[str]] = {
415
+ '200': "HasLuceneIndexResult",
416
+ }
417
+ response_data = self.api_client.call_api(
418
+ *_param,
419
+ _request_timeout=_request_timeout
420
+ )
421
+ response_data.read()
422
+ return self.api_client.response_deserialize(
423
+ response_data=response_data,
424
+ response_types_map=_response_types_map,
425
+ ).data
426
+
427
+
428
+ @validate_call
429
+ def has_index_with_http_info(
430
+ self,
431
+ username: StrictStr,
432
+ dataset: StrictStr,
433
+ q_answer_api_key: Optional[StrictStr] = None,
434
+ _request_timeout: Union[
435
+ None,
436
+ Annotated[StrictFloat, Field(gt=0)],
437
+ Tuple[
438
+ Annotated[StrictFloat, Field(gt=0)],
439
+ Annotated[StrictFloat, Field(gt=0)]
440
+ ]
441
+ ] = None,
442
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
443
+ _content_type: Optional[StrictStr] = None,
444
+ _headers: Optional[Dict[StrictStr, Any]] = None,
445
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
446
+ ) -> ApiResponse[HasLuceneIndexResult]:
447
+ """API to check if the lucene index is generated
448
+
449
+
450
+ :param username: (required)
451
+ :type username: str
452
+ :param dataset: (required)
453
+ :type dataset: str
454
+ :param q_answer_api_key:
455
+ :type q_answer_api_key: str
456
+ :param _request_timeout: timeout setting for this request. If one
457
+ number provided, it will be total request
458
+ timeout. It can also be a pair (tuple) of
459
+ (connection, read) timeouts.
460
+ :type _request_timeout: int, tuple(int, int), optional
461
+ :param _request_auth: set to override the auth_settings for an a single
462
+ request; this effectively ignores the
463
+ authentication in the spec for a single request.
464
+ :type _request_auth: dict, optional
465
+ :param _content_type: force content-type for the request.
466
+ :type _content_type: str, Optional
467
+ :param _headers: set to override the headers for a single
468
+ request; this effectively ignores the headers
469
+ in the spec for a single request.
470
+ :type _headers: dict, optional
471
+ :param _host_index: set to override the host_index for a single
472
+ request; this effectively ignores the host_index
473
+ in the spec for a single request.
474
+ :type _host_index: int, optional
475
+ :return: Returns the result object.
476
+ """ # noqa: E501
477
+
478
+ _param = self._has_index_serialize(
479
+ username=username,
480
+ dataset=dataset,
481
+ q_answer_api_key=q_answer_api_key,
482
+ _request_auth=_request_auth,
483
+ _content_type=_content_type,
484
+ _headers=_headers,
485
+ _host_index=_host_index
486
+ )
487
+
488
+ _response_types_map: Dict[str, Optional[str]] = {
489
+ '200': "HasLuceneIndexResult",
490
+ }
491
+ response_data = self.api_client.call_api(
492
+ *_param,
493
+ _request_timeout=_request_timeout
494
+ )
495
+ response_data.read()
496
+ return self.api_client.response_deserialize(
497
+ response_data=response_data,
498
+ response_types_map=_response_types_map,
499
+ )
500
+
501
+
502
+ @validate_call
503
+ def has_index_without_preload_content(
504
+ self,
505
+ username: StrictStr,
506
+ dataset: StrictStr,
507
+ q_answer_api_key: Optional[StrictStr] = None,
508
+ _request_timeout: Union[
509
+ None,
510
+ Annotated[StrictFloat, Field(gt=0)],
511
+ Tuple[
512
+ Annotated[StrictFloat, Field(gt=0)],
513
+ Annotated[StrictFloat, Field(gt=0)]
514
+ ]
515
+ ] = None,
516
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
517
+ _content_type: Optional[StrictStr] = None,
518
+ _headers: Optional[Dict[StrictStr, Any]] = None,
519
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
520
+ ) -> RESTResponseType:
521
+ """API to check if the lucene index is generated
522
+
523
+
524
+ :param username: (required)
525
+ :type username: str
526
+ :param dataset: (required)
527
+ :type dataset: str
528
+ :param q_answer_api_key:
529
+ :type q_answer_api_key: str
530
+ :param _request_timeout: timeout setting for this request. If one
531
+ number provided, it will be total request
532
+ timeout. It can also be a pair (tuple) of
533
+ (connection, read) timeouts.
534
+ :type _request_timeout: int, tuple(int, int), optional
535
+ :param _request_auth: set to override the auth_settings for an a single
536
+ request; this effectively ignores the
537
+ authentication in the spec for a single request.
538
+ :type _request_auth: dict, optional
539
+ :param _content_type: force content-type for the request.
540
+ :type _content_type: str, Optional
541
+ :param _headers: set to override the headers for a single
542
+ request; this effectively ignores the headers
543
+ in the spec for a single request.
544
+ :type _headers: dict, optional
545
+ :param _host_index: set to override the host_index for a single
546
+ request; this effectively ignores the host_index
547
+ in the spec for a single request.
548
+ :type _host_index: int, optional
549
+ :return: Returns the result object.
550
+ """ # noqa: E501
551
+
552
+ _param = self._has_index_serialize(
553
+ username=username,
554
+ dataset=dataset,
555
+ q_answer_api_key=q_answer_api_key,
556
+ _request_auth=_request_auth,
557
+ _content_type=_content_type,
558
+ _headers=_headers,
559
+ _host_index=_host_index
560
+ )
561
+
562
+ _response_types_map: Dict[str, Optional[str]] = {
563
+ '200': "HasLuceneIndexResult",
564
+ }
565
+ response_data = self.api_client.call_api(
566
+ *_param,
567
+ _request_timeout=_request_timeout
568
+ )
569
+ return response_data.response
570
+
571
+
572
+ def _has_index_serialize(
573
+ self,
574
+ username,
575
+ dataset,
576
+ q_answer_api_key,
577
+ _request_auth,
578
+ _content_type,
579
+ _headers,
580
+ _host_index,
581
+ ) -> RequestSerialized:
582
+
583
+ _host = None
584
+
585
+ _collection_formats: Dict[str, str] = {
586
+ }
587
+
588
+ _path_params: Dict[str, str] = {}
589
+ _query_params: List[Tuple[str, str]] = []
590
+ _header_params: Dict[str, Optional[str]] = _headers or {}
591
+ _form_params: List[Tuple[str, str]] = []
592
+ _files: Dict[
593
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
594
+ ] = {}
595
+ _body_params: Optional[bytes] = None
596
+
597
+ # process the path parameters
598
+ if username is not None:
599
+ _path_params['username'] = username
600
+ if dataset is not None:
601
+ _path_params['dataset'] = dataset
602
+ # process the query parameters
603
+ # process the header parameters
604
+ if q_answer_api_key is not None:
605
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
606
+ # process the form parameters
607
+ # process the body parameter
608
+
609
+
610
+ # set the HTTP header `Accept`
611
+ if 'Accept' not in _header_params:
612
+ _header_params['Accept'] = self.api_client.select_header_accept(
613
+ [
614
+ '*/*'
615
+ ]
616
+ )
617
+
618
+
619
+ # authentication setting
620
+ _auth_settings: List[str] = [
621
+ 'QAnswer-Api-Key',
622
+ 'Bearer'
623
+ ]
624
+
625
+ return self.api_client.param_serialize(
626
+ method='GET',
627
+ resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/has-index',
628
+ path_params=_path_params,
629
+ query_params=_query_params,
630
+ header_params=_header_params,
631
+ body=_body_params,
632
+ post_params=_form_params,
633
+ files=_files,
634
+ auth_settings=_auth_settings,
635
+ collection_formats=_collection_formats,
636
+ _host=_host,
637
+ _request_auth=_request_auth
638
+ )
639
+
640
+
641
+
642
+
643
+ @validate_call
644
+ def is_merging(
645
+ self,
646
+ username: StrictStr,
647
+ dataset: StrictStr,
648
+ q_answer_api_key: Optional[StrictStr] = None,
649
+ _request_timeout: Union[
650
+ None,
651
+ Annotated[StrictFloat, Field(gt=0)],
652
+ Tuple[
653
+ Annotated[StrictFloat, Field(gt=0)],
654
+ Annotated[StrictFloat, Field(gt=0)]
655
+ ]
656
+ ] = None,
657
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
658
+ _content_type: Optional[StrictStr] = None,
659
+ _headers: Optional[Dict[StrictStr, Any]] = None,
660
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
661
+ ) -> IsMergingResult:
662
+ """API to check if the store is in a merge state or not.
663
+
664
+
665
+ :param username: (required)
666
+ :type username: str
667
+ :param dataset: (required)
668
+ :type dataset: str
669
+ :param q_answer_api_key:
670
+ :type q_answer_api_key: str
671
+ :param _request_timeout: timeout setting for this request. If one
672
+ number provided, it will be total request
673
+ timeout. It can also be a pair (tuple) of
674
+ (connection, read) timeouts.
675
+ :type _request_timeout: int, tuple(int, int), optional
676
+ :param _request_auth: set to override the auth_settings for an a single
677
+ request; this effectively ignores the
678
+ authentication in the spec for a single request.
679
+ :type _request_auth: dict, optional
680
+ :param _content_type: force content-type for the request.
681
+ :type _content_type: str, Optional
682
+ :param _headers: set to override the headers for a single
683
+ request; this effectively ignores the headers
684
+ in the spec for a single request.
685
+ :type _headers: dict, optional
686
+ :param _host_index: set to override the host_index for a single
687
+ request; this effectively ignores the host_index
688
+ in the spec for a single request.
689
+ :type _host_index: int, optional
690
+ :return: Returns the result object.
691
+ """ # noqa: E501
692
+
693
+ _param = self._is_merging_serialize(
694
+ username=username,
695
+ dataset=dataset,
696
+ q_answer_api_key=q_answer_api_key,
697
+ _request_auth=_request_auth,
698
+ _content_type=_content_type,
699
+ _headers=_headers,
700
+ _host_index=_host_index
701
+ )
702
+
703
+ _response_types_map: Dict[str, Optional[str]] = {
704
+ '200': "IsMergingResult",
705
+ }
706
+ response_data = self.api_client.call_api(
707
+ *_param,
708
+ _request_timeout=_request_timeout
709
+ )
710
+ response_data.read()
711
+ return self.api_client.response_deserialize(
712
+ response_data=response_data,
713
+ response_types_map=_response_types_map,
714
+ ).data
715
+
716
+
717
+ @validate_call
718
+ def is_merging_with_http_info(
719
+ self,
720
+ username: StrictStr,
721
+ dataset: StrictStr,
722
+ q_answer_api_key: Optional[StrictStr] = None,
723
+ _request_timeout: Union[
724
+ None,
725
+ Annotated[StrictFloat, Field(gt=0)],
726
+ Tuple[
727
+ Annotated[StrictFloat, Field(gt=0)],
728
+ Annotated[StrictFloat, Field(gt=0)]
729
+ ]
730
+ ] = None,
731
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
732
+ _content_type: Optional[StrictStr] = None,
733
+ _headers: Optional[Dict[StrictStr, Any]] = None,
734
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
735
+ ) -> ApiResponse[IsMergingResult]:
736
+ """API to check if the store is in a merge state or not.
737
+
738
+
739
+ :param username: (required)
740
+ :type username: str
741
+ :param dataset: (required)
742
+ :type dataset: str
743
+ :param q_answer_api_key:
744
+ :type q_answer_api_key: str
745
+ :param _request_timeout: timeout setting for this request. If one
746
+ number provided, it will be total request
747
+ timeout. It can also be a pair (tuple) of
748
+ (connection, read) timeouts.
749
+ :type _request_timeout: int, tuple(int, int), optional
750
+ :param _request_auth: set to override the auth_settings for an a single
751
+ request; this effectively ignores the
752
+ authentication in the spec for a single request.
753
+ :type _request_auth: dict, optional
754
+ :param _content_type: force content-type for the request.
755
+ :type _content_type: str, Optional
756
+ :param _headers: set to override the headers for a single
757
+ request; this effectively ignores the headers
758
+ in the spec for a single request.
759
+ :type _headers: dict, optional
760
+ :param _host_index: set to override the host_index for a single
761
+ request; this effectively ignores the host_index
762
+ in the spec for a single request.
763
+ :type _host_index: int, optional
764
+ :return: Returns the result object.
765
+ """ # noqa: E501
766
+
767
+ _param = self._is_merging_serialize(
768
+ username=username,
769
+ dataset=dataset,
770
+ q_answer_api_key=q_answer_api_key,
771
+ _request_auth=_request_auth,
772
+ _content_type=_content_type,
773
+ _headers=_headers,
774
+ _host_index=_host_index
775
+ )
776
+
777
+ _response_types_map: Dict[str, Optional[str]] = {
778
+ '200': "IsMergingResult",
779
+ }
780
+ response_data = self.api_client.call_api(
781
+ *_param,
782
+ _request_timeout=_request_timeout
783
+ )
784
+ response_data.read()
785
+ return self.api_client.response_deserialize(
786
+ response_data=response_data,
787
+ response_types_map=_response_types_map,
788
+ )
789
+
790
+
791
+ @validate_call
792
+ def is_merging_without_preload_content(
793
+ self,
794
+ username: StrictStr,
795
+ dataset: StrictStr,
796
+ q_answer_api_key: Optional[StrictStr] = None,
797
+ _request_timeout: Union[
798
+ None,
799
+ Annotated[StrictFloat, Field(gt=0)],
800
+ Tuple[
801
+ Annotated[StrictFloat, Field(gt=0)],
802
+ Annotated[StrictFloat, Field(gt=0)]
803
+ ]
804
+ ] = None,
805
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
806
+ _content_type: Optional[StrictStr] = None,
807
+ _headers: Optional[Dict[StrictStr, Any]] = None,
808
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
809
+ ) -> RESTResponseType:
810
+ """API to check if the store is in a merge state or not.
811
+
812
+
813
+ :param username: (required)
814
+ :type username: str
815
+ :param dataset: (required)
816
+ :type dataset: str
817
+ :param q_answer_api_key:
818
+ :type q_answer_api_key: str
819
+ :param _request_timeout: timeout setting for this request. If one
820
+ number provided, it will be total request
821
+ timeout. It can also be a pair (tuple) of
822
+ (connection, read) timeouts.
823
+ :type _request_timeout: int, tuple(int, int), optional
824
+ :param _request_auth: set to override the auth_settings for an a single
825
+ request; this effectively ignores the
826
+ authentication in the spec for a single request.
827
+ :type _request_auth: dict, optional
828
+ :param _content_type: force content-type for the request.
829
+ :type _content_type: str, Optional
830
+ :param _headers: set to override the headers for a single
831
+ request; this effectively ignores the headers
832
+ in the spec for a single request.
833
+ :type _headers: dict, optional
834
+ :param _host_index: set to override the host_index for a single
835
+ request; this effectively ignores the host_index
836
+ in the spec for a single request.
837
+ :type _host_index: int, optional
838
+ :return: Returns the result object.
839
+ """ # noqa: E501
840
+
841
+ _param = self._is_merging_serialize(
842
+ username=username,
843
+ dataset=dataset,
844
+ q_answer_api_key=q_answer_api_key,
845
+ _request_auth=_request_auth,
846
+ _content_type=_content_type,
847
+ _headers=_headers,
848
+ _host_index=_host_index
849
+ )
850
+
851
+ _response_types_map: Dict[str, Optional[str]] = {
852
+ '200': "IsMergingResult",
853
+ }
854
+ response_data = self.api_client.call_api(
855
+ *_param,
856
+ _request_timeout=_request_timeout
857
+ )
858
+ return response_data.response
859
+
860
+
861
+ def _is_merging_serialize(
862
+ self,
863
+ username,
864
+ dataset,
865
+ q_answer_api_key,
866
+ _request_auth,
867
+ _content_type,
868
+ _headers,
869
+ _host_index,
870
+ ) -> RequestSerialized:
871
+
872
+ _host = None
873
+
874
+ _collection_formats: Dict[str, str] = {
875
+ }
876
+
877
+ _path_params: Dict[str, str] = {}
878
+ _query_params: List[Tuple[str, str]] = []
879
+ _header_params: Dict[str, Optional[str]] = _headers or {}
880
+ _form_params: List[Tuple[str, str]] = []
881
+ _files: Dict[
882
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
883
+ ] = {}
884
+ _body_params: Optional[bytes] = None
885
+
886
+ # process the path parameters
887
+ if username is not None:
888
+ _path_params['username'] = username
889
+ if dataset is not None:
890
+ _path_params['dataset'] = dataset
891
+ # process the query parameters
892
+ # process the header parameters
893
+ if q_answer_api_key is not None:
894
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
895
+ # process the form parameters
896
+ # process the body parameter
897
+
898
+
899
+ # set the HTTP header `Accept`
900
+ if 'Accept' not in _header_params:
901
+ _header_params['Accept'] = self.api_client.select_header_accept(
902
+ [
903
+ '*/*'
904
+ ]
905
+ )
906
+
907
+
908
+ # authentication setting
909
+ _auth_settings: List[str] = [
910
+ 'QAnswer-Api-Key',
911
+ 'Bearer'
912
+ ]
913
+
914
+ return self.api_client.param_serialize(
915
+ method='GET',
916
+ resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/is-merging',
917
+ path_params=_path_params,
918
+ query_params=_query_params,
919
+ header_params=_header_params,
920
+ body=_body_params,
921
+ post_params=_form_params,
922
+ files=_files,
923
+ auth_settings=_auth_settings,
924
+ collection_formats=_collection_formats,
925
+ _host=_host,
926
+ _request_auth=_request_auth
927
+ )
928
+
929
+
930
+
931
+
932
+ @validate_call
933
+ def load_data(
934
+ self,
935
+ username: StrictStr,
936
+ dataset: StrictStr,
937
+ q_answer_api_key: Optional[StrictStr] = None,
938
+ set_logo1_request: Optional[SetLogo1Request] = None,
939
+ _request_timeout: Union[
940
+ None,
941
+ Annotated[StrictFloat, Field(gt=0)],
942
+ Tuple[
943
+ Annotated[StrictFloat, Field(gt=0)],
944
+ Annotated[StrictFloat, Field(gt=0)]
945
+ ]
946
+ ] = None,
947
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
948
+ _content_type: Optional[StrictStr] = None,
949
+ _headers: Optional[Dict[StrictStr, Any]] = None,
950
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
951
+ ) -> str:
952
+ """API to load RDF data into the endpoint.
953
+
954
+
955
+ :param username: (required)
956
+ :type username: str
957
+ :param dataset: (required)
958
+ :type dataset: str
959
+ :param q_answer_api_key:
960
+ :type q_answer_api_key: str
961
+ :param set_logo1_request:
962
+ :type set_logo1_request: SetLogo1Request
963
+ :param _request_timeout: timeout setting for this request. If one
964
+ number provided, it will be total request
965
+ timeout. It can also be a pair (tuple) of
966
+ (connection, read) timeouts.
967
+ :type _request_timeout: int, tuple(int, int), optional
968
+ :param _request_auth: set to override the auth_settings for an a single
969
+ request; this effectively ignores the
970
+ authentication in the spec for a single request.
971
+ :type _request_auth: dict, optional
972
+ :param _content_type: force content-type for the request.
973
+ :type _content_type: str, Optional
974
+ :param _headers: set to override the headers for a single
975
+ request; this effectively ignores the headers
976
+ in the spec for a single request.
977
+ :type _headers: dict, optional
978
+ :param _host_index: set to override the host_index for a single
979
+ request; this effectively ignores the host_index
980
+ in the spec for a single request.
981
+ :type _host_index: int, optional
982
+ :return: Returns the result object.
983
+ """ # noqa: E501
984
+
985
+ _param = self._load_data_serialize(
986
+ username=username,
987
+ dataset=dataset,
988
+ q_answer_api_key=q_answer_api_key,
989
+ set_logo1_request=set_logo1_request,
990
+ _request_auth=_request_auth,
991
+ _content_type=_content_type,
992
+ _headers=_headers,
993
+ _host_index=_host_index
994
+ )
995
+
996
+ _response_types_map: Dict[str, Optional[str]] = {
997
+ '200': "str",
998
+ }
999
+ response_data = self.api_client.call_api(
1000
+ *_param,
1001
+ _request_timeout=_request_timeout
1002
+ )
1003
+ response_data.read()
1004
+ return self.api_client.response_deserialize(
1005
+ response_data=response_data,
1006
+ response_types_map=_response_types_map,
1007
+ ).data
1008
+
1009
+
1010
+ @validate_call
1011
+ def load_data_with_http_info(
1012
+ self,
1013
+ username: StrictStr,
1014
+ dataset: StrictStr,
1015
+ q_answer_api_key: Optional[StrictStr] = None,
1016
+ set_logo1_request: Optional[SetLogo1Request] = None,
1017
+ _request_timeout: Union[
1018
+ None,
1019
+ Annotated[StrictFloat, Field(gt=0)],
1020
+ Tuple[
1021
+ Annotated[StrictFloat, Field(gt=0)],
1022
+ Annotated[StrictFloat, Field(gt=0)]
1023
+ ]
1024
+ ] = None,
1025
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1026
+ _content_type: Optional[StrictStr] = None,
1027
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1028
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1029
+ ) -> ApiResponse[str]:
1030
+ """API to load RDF data into the endpoint.
1031
+
1032
+
1033
+ :param username: (required)
1034
+ :type username: str
1035
+ :param dataset: (required)
1036
+ :type dataset: str
1037
+ :param q_answer_api_key:
1038
+ :type q_answer_api_key: str
1039
+ :param set_logo1_request:
1040
+ :type set_logo1_request: SetLogo1Request
1041
+ :param _request_timeout: timeout setting for this request. If one
1042
+ number provided, it will be total request
1043
+ timeout. It can also be a pair (tuple) of
1044
+ (connection, read) timeouts.
1045
+ :type _request_timeout: int, tuple(int, int), optional
1046
+ :param _request_auth: set to override the auth_settings for an a single
1047
+ request; this effectively ignores the
1048
+ authentication in the spec for a single request.
1049
+ :type _request_auth: dict, optional
1050
+ :param _content_type: force content-type for the request.
1051
+ :type _content_type: str, Optional
1052
+ :param _headers: set to override the headers for a single
1053
+ request; this effectively ignores the headers
1054
+ in the spec for a single request.
1055
+ :type _headers: dict, optional
1056
+ :param _host_index: set to override the host_index for a single
1057
+ request; this effectively ignores the host_index
1058
+ in the spec for a single request.
1059
+ :type _host_index: int, optional
1060
+ :return: Returns the result object.
1061
+ """ # noqa: E501
1062
+
1063
+ _param = self._load_data_serialize(
1064
+ username=username,
1065
+ dataset=dataset,
1066
+ q_answer_api_key=q_answer_api_key,
1067
+ set_logo1_request=set_logo1_request,
1068
+ _request_auth=_request_auth,
1069
+ _content_type=_content_type,
1070
+ _headers=_headers,
1071
+ _host_index=_host_index
1072
+ )
1073
+
1074
+ _response_types_map: Dict[str, Optional[str]] = {
1075
+ '200': "str",
1076
+ }
1077
+ response_data = self.api_client.call_api(
1078
+ *_param,
1079
+ _request_timeout=_request_timeout
1080
+ )
1081
+ response_data.read()
1082
+ return self.api_client.response_deserialize(
1083
+ response_data=response_data,
1084
+ response_types_map=_response_types_map,
1085
+ )
1086
+
1087
+
1088
+ @validate_call
1089
+ def load_data_without_preload_content(
1090
+ self,
1091
+ username: StrictStr,
1092
+ dataset: StrictStr,
1093
+ q_answer_api_key: Optional[StrictStr] = None,
1094
+ set_logo1_request: Optional[SetLogo1Request] = None,
1095
+ _request_timeout: Union[
1096
+ None,
1097
+ Annotated[StrictFloat, Field(gt=0)],
1098
+ Tuple[
1099
+ Annotated[StrictFloat, Field(gt=0)],
1100
+ Annotated[StrictFloat, Field(gt=0)]
1101
+ ]
1102
+ ] = None,
1103
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1104
+ _content_type: Optional[StrictStr] = None,
1105
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1106
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1107
+ ) -> RESTResponseType:
1108
+ """API to load RDF data into the endpoint.
1109
+
1110
+
1111
+ :param username: (required)
1112
+ :type username: str
1113
+ :param dataset: (required)
1114
+ :type dataset: str
1115
+ :param q_answer_api_key:
1116
+ :type q_answer_api_key: str
1117
+ :param set_logo1_request:
1118
+ :type set_logo1_request: SetLogo1Request
1119
+ :param _request_timeout: timeout setting for this request. If one
1120
+ number provided, it will be total request
1121
+ timeout. It can also be a pair (tuple) of
1122
+ (connection, read) timeouts.
1123
+ :type _request_timeout: int, tuple(int, int), optional
1124
+ :param _request_auth: set to override the auth_settings for an a single
1125
+ request; this effectively ignores the
1126
+ authentication in the spec for a single request.
1127
+ :type _request_auth: dict, optional
1128
+ :param _content_type: force content-type for the request.
1129
+ :type _content_type: str, Optional
1130
+ :param _headers: set to override the headers for a single
1131
+ request; this effectively ignores the headers
1132
+ in the spec for a single request.
1133
+ :type _headers: dict, optional
1134
+ :param _host_index: set to override the host_index for a single
1135
+ request; this effectively ignores the host_index
1136
+ in the spec for a single request.
1137
+ :type _host_index: int, optional
1138
+ :return: Returns the result object.
1139
+ """ # noqa: E501
1140
+
1141
+ _param = self._load_data_serialize(
1142
+ username=username,
1143
+ dataset=dataset,
1144
+ q_answer_api_key=q_answer_api_key,
1145
+ set_logo1_request=set_logo1_request,
1146
+ _request_auth=_request_auth,
1147
+ _content_type=_content_type,
1148
+ _headers=_headers,
1149
+ _host_index=_host_index
1150
+ )
1151
+
1152
+ _response_types_map: Dict[str, Optional[str]] = {
1153
+ '200': "str",
1154
+ }
1155
+ response_data = self.api_client.call_api(
1156
+ *_param,
1157
+ _request_timeout=_request_timeout
1158
+ )
1159
+ return response_data.response
1160
+
1161
+
1162
+ def _load_data_serialize(
1163
+ self,
1164
+ username,
1165
+ dataset,
1166
+ q_answer_api_key,
1167
+ set_logo1_request,
1168
+ _request_auth,
1169
+ _content_type,
1170
+ _headers,
1171
+ _host_index,
1172
+ ) -> RequestSerialized:
1173
+
1174
+ _host = None
1175
+
1176
+ _collection_formats: Dict[str, str] = {
1177
+ }
1178
+
1179
+ _path_params: Dict[str, str] = {}
1180
+ _query_params: List[Tuple[str, str]] = []
1181
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1182
+ _form_params: List[Tuple[str, str]] = []
1183
+ _files: Dict[
1184
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1185
+ ] = {}
1186
+ _body_params: Optional[bytes] = None
1187
+
1188
+ # process the path parameters
1189
+ if username is not None:
1190
+ _path_params['username'] = username
1191
+ if dataset is not None:
1192
+ _path_params['dataset'] = dataset
1193
+ # process the query parameters
1194
+ # process the header parameters
1195
+ if q_answer_api_key is not None:
1196
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
1197
+ # process the form parameters
1198
+ # process the body parameter
1199
+ if set_logo1_request is not None:
1200
+ _body_params = set_logo1_request
1201
+
1202
+
1203
+ # set the HTTP header `Accept`
1204
+ if 'Accept' not in _header_params:
1205
+ _header_params['Accept'] = self.api_client.select_header_accept(
1206
+ [
1207
+ '*/*'
1208
+ ]
1209
+ )
1210
+
1211
+ # set the HTTP header `Content-Type`
1212
+ if _content_type:
1213
+ _header_params['Content-Type'] = _content_type
1214
+ else:
1215
+ _default_content_type = (
1216
+ self.api_client.select_header_content_type(
1217
+ [
1218
+ 'application/json'
1219
+ ]
1220
+ )
1221
+ )
1222
+ if _default_content_type is not None:
1223
+ _header_params['Content-Type'] = _default_content_type
1224
+
1225
+ # authentication setting
1226
+ _auth_settings: List[str] = [
1227
+ 'QAnswer-Api-Key',
1228
+ 'Bearer'
1229
+ ]
1230
+
1231
+ return self.api_client.param_serialize(
1232
+ method='POST',
1233
+ resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/load',
1234
+ path_params=_path_params,
1235
+ query_params=_query_params,
1236
+ header_params=_header_params,
1237
+ body=_body_params,
1238
+ post_params=_form_params,
1239
+ files=_files,
1240
+ auth_settings=_auth_settings,
1241
+ collection_formats=_collection_formats,
1242
+ _host=_host,
1243
+ _request_auth=_request_auth
1244
+ )
1245
+
1246
+
1247
+
1248
+
1249
+ @validate_call
1250
+ def merge_store(
1251
+ self,
1252
+ username: StrictStr,
1253
+ dataset: StrictStr,
1254
+ q_answer_api_key: Optional[StrictStr] = None,
1255
+ _request_timeout: Union[
1256
+ None,
1257
+ Annotated[StrictFloat, Field(gt=0)],
1258
+ Tuple[
1259
+ Annotated[StrictFloat, Field(gt=0)],
1260
+ Annotated[StrictFloat, Field(gt=0)]
1261
+ ]
1262
+ ] = None,
1263
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1264
+ _content_type: Optional[StrictStr] = None,
1265
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1266
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1267
+ ) -> MergeRequestResult:
1268
+ """API to trigger a merge. All triples in the delta are merged into the main store
1269
+
1270
+
1271
+ :param username: (required)
1272
+ :type username: str
1273
+ :param dataset: (required)
1274
+ :type dataset: str
1275
+ :param q_answer_api_key:
1276
+ :type q_answer_api_key: str
1277
+ :param _request_timeout: timeout setting for this request. If one
1278
+ number provided, it will be total request
1279
+ timeout. It can also be a pair (tuple) of
1280
+ (connection, read) timeouts.
1281
+ :type _request_timeout: int, tuple(int, int), optional
1282
+ :param _request_auth: set to override the auth_settings for an a single
1283
+ request; this effectively ignores the
1284
+ authentication in the spec for a single request.
1285
+ :type _request_auth: dict, optional
1286
+ :param _content_type: force content-type for the request.
1287
+ :type _content_type: str, Optional
1288
+ :param _headers: set to override the headers for a single
1289
+ request; this effectively ignores the headers
1290
+ in the spec for a single request.
1291
+ :type _headers: dict, optional
1292
+ :param _host_index: set to override the host_index for a single
1293
+ request; this effectively ignores the host_index
1294
+ in the spec for a single request.
1295
+ :type _host_index: int, optional
1296
+ :return: Returns the result object.
1297
+ """ # noqa: E501
1298
+
1299
+ _param = self._merge_store_serialize(
1300
+ username=username,
1301
+ dataset=dataset,
1302
+ q_answer_api_key=q_answer_api_key,
1303
+ _request_auth=_request_auth,
1304
+ _content_type=_content_type,
1305
+ _headers=_headers,
1306
+ _host_index=_host_index
1307
+ )
1308
+
1309
+ _response_types_map: Dict[str, Optional[str]] = {
1310
+ '200': "MergeRequestResult",
1311
+ }
1312
+ response_data = self.api_client.call_api(
1313
+ *_param,
1314
+ _request_timeout=_request_timeout
1315
+ )
1316
+ response_data.read()
1317
+ return self.api_client.response_deserialize(
1318
+ response_data=response_data,
1319
+ response_types_map=_response_types_map,
1320
+ ).data
1321
+
1322
+
1323
+ @validate_call
1324
+ def merge_store_with_http_info(
1325
+ self,
1326
+ username: StrictStr,
1327
+ dataset: StrictStr,
1328
+ q_answer_api_key: Optional[StrictStr] = None,
1329
+ _request_timeout: Union[
1330
+ None,
1331
+ Annotated[StrictFloat, Field(gt=0)],
1332
+ Tuple[
1333
+ Annotated[StrictFloat, Field(gt=0)],
1334
+ Annotated[StrictFloat, Field(gt=0)]
1335
+ ]
1336
+ ] = None,
1337
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1338
+ _content_type: Optional[StrictStr] = None,
1339
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1340
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1341
+ ) -> ApiResponse[MergeRequestResult]:
1342
+ """API to trigger a merge. All triples in the delta are merged into the main store
1343
+
1344
+
1345
+ :param username: (required)
1346
+ :type username: str
1347
+ :param dataset: (required)
1348
+ :type dataset: str
1349
+ :param q_answer_api_key:
1350
+ :type q_answer_api_key: str
1351
+ :param _request_timeout: timeout setting for this request. If one
1352
+ number provided, it will be total request
1353
+ timeout. It can also be a pair (tuple) of
1354
+ (connection, read) timeouts.
1355
+ :type _request_timeout: int, tuple(int, int), optional
1356
+ :param _request_auth: set to override the auth_settings for an a single
1357
+ request; this effectively ignores the
1358
+ authentication in the spec for a single request.
1359
+ :type _request_auth: dict, optional
1360
+ :param _content_type: force content-type for the request.
1361
+ :type _content_type: str, Optional
1362
+ :param _headers: set to override the headers for a single
1363
+ request; this effectively ignores the headers
1364
+ in the spec for a single request.
1365
+ :type _headers: dict, optional
1366
+ :param _host_index: set to override the host_index for a single
1367
+ request; this effectively ignores the host_index
1368
+ in the spec for a single request.
1369
+ :type _host_index: int, optional
1370
+ :return: Returns the result object.
1371
+ """ # noqa: E501
1372
+
1373
+ _param = self._merge_store_serialize(
1374
+ username=username,
1375
+ dataset=dataset,
1376
+ q_answer_api_key=q_answer_api_key,
1377
+ _request_auth=_request_auth,
1378
+ _content_type=_content_type,
1379
+ _headers=_headers,
1380
+ _host_index=_host_index
1381
+ )
1382
+
1383
+ _response_types_map: Dict[str, Optional[str]] = {
1384
+ '200': "MergeRequestResult",
1385
+ }
1386
+ response_data = self.api_client.call_api(
1387
+ *_param,
1388
+ _request_timeout=_request_timeout
1389
+ )
1390
+ response_data.read()
1391
+ return self.api_client.response_deserialize(
1392
+ response_data=response_data,
1393
+ response_types_map=_response_types_map,
1394
+ )
1395
+
1396
+
1397
+ @validate_call
1398
+ def merge_store_without_preload_content(
1399
+ self,
1400
+ username: StrictStr,
1401
+ dataset: StrictStr,
1402
+ q_answer_api_key: Optional[StrictStr] = None,
1403
+ _request_timeout: Union[
1404
+ None,
1405
+ Annotated[StrictFloat, Field(gt=0)],
1406
+ Tuple[
1407
+ Annotated[StrictFloat, Field(gt=0)],
1408
+ Annotated[StrictFloat, Field(gt=0)]
1409
+ ]
1410
+ ] = None,
1411
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1412
+ _content_type: Optional[StrictStr] = None,
1413
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1414
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1415
+ ) -> RESTResponseType:
1416
+ """API to trigger a merge. All triples in the delta are merged into the main store
1417
+
1418
+
1419
+ :param username: (required)
1420
+ :type username: str
1421
+ :param dataset: (required)
1422
+ :type dataset: str
1423
+ :param q_answer_api_key:
1424
+ :type q_answer_api_key: str
1425
+ :param _request_timeout: timeout setting for this request. If one
1426
+ number provided, it will be total request
1427
+ timeout. It can also be a pair (tuple) of
1428
+ (connection, read) timeouts.
1429
+ :type _request_timeout: int, tuple(int, int), optional
1430
+ :param _request_auth: set to override the auth_settings for an a single
1431
+ request; this effectively ignores the
1432
+ authentication in the spec for a single request.
1433
+ :type _request_auth: dict, optional
1434
+ :param _content_type: force content-type for the request.
1435
+ :type _content_type: str, Optional
1436
+ :param _headers: set to override the headers for a single
1437
+ request; this effectively ignores the headers
1438
+ in the spec for a single request.
1439
+ :type _headers: dict, optional
1440
+ :param _host_index: set to override the host_index for a single
1441
+ request; this effectively ignores the host_index
1442
+ in the spec for a single request.
1443
+ :type _host_index: int, optional
1444
+ :return: Returns the result object.
1445
+ """ # noqa: E501
1446
+
1447
+ _param = self._merge_store_serialize(
1448
+ username=username,
1449
+ dataset=dataset,
1450
+ q_answer_api_key=q_answer_api_key,
1451
+ _request_auth=_request_auth,
1452
+ _content_type=_content_type,
1453
+ _headers=_headers,
1454
+ _host_index=_host_index
1455
+ )
1456
+
1457
+ _response_types_map: Dict[str, Optional[str]] = {
1458
+ '200': "MergeRequestResult",
1459
+ }
1460
+ response_data = self.api_client.call_api(
1461
+ *_param,
1462
+ _request_timeout=_request_timeout
1463
+ )
1464
+ return response_data.response
1465
+
1466
+
1467
+ def _merge_store_serialize(
1468
+ self,
1469
+ username,
1470
+ dataset,
1471
+ q_answer_api_key,
1472
+ _request_auth,
1473
+ _content_type,
1474
+ _headers,
1475
+ _host_index,
1476
+ ) -> RequestSerialized:
1477
+
1478
+ _host = None
1479
+
1480
+ _collection_formats: Dict[str, str] = {
1481
+ }
1482
+
1483
+ _path_params: Dict[str, str] = {}
1484
+ _query_params: List[Tuple[str, str]] = []
1485
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1486
+ _form_params: List[Tuple[str, str]] = []
1487
+ _files: Dict[
1488
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1489
+ ] = {}
1490
+ _body_params: Optional[bytes] = None
1491
+
1492
+ # process the path parameters
1493
+ if username is not None:
1494
+ _path_params['username'] = username
1495
+ if dataset is not None:
1496
+ _path_params['dataset'] = dataset
1497
+ # process the query parameters
1498
+ # process the header parameters
1499
+ if q_answer_api_key is not None:
1500
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
1501
+ # process the form parameters
1502
+ # process the body parameter
1503
+
1504
+
1505
+ # set the HTTP header `Accept`
1506
+ if 'Accept' not in _header_params:
1507
+ _header_params['Accept'] = self.api_client.select_header_accept(
1508
+ [
1509
+ '*/*'
1510
+ ]
1511
+ )
1512
+
1513
+
1514
+ # authentication setting
1515
+ _auth_settings: List[str] = [
1516
+ 'QAnswer-Api-Key',
1517
+ 'Bearer'
1518
+ ]
1519
+
1520
+ return self.api_client.param_serialize(
1521
+ method='GET',
1522
+ resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/merge',
1523
+ path_params=_path_params,
1524
+ query_params=_query_params,
1525
+ header_params=_header_params,
1526
+ body=_body_params,
1527
+ post_params=_form_params,
1528
+ files=_files,
1529
+ auth_settings=_auth_settings,
1530
+ collection_formats=_collection_formats,
1531
+ _host=_host,
1532
+ _request_auth=_request_auth
1533
+ )
1534
+
1535
+
1536
+
1537
+
1538
+ @validate_call
1539
+ def prefixes(
1540
+ self,
1541
+ username: StrictStr,
1542
+ dataset: StrictStr,
1543
+ q_answer_api_key: Optional[StrictStr] = None,
1544
+ _request_timeout: Union[
1545
+ None,
1546
+ Annotated[StrictFloat, Field(gt=0)],
1547
+ Tuple[
1548
+ Annotated[StrictFloat, Field(gt=0)],
1549
+ Annotated[StrictFloat, Field(gt=0)]
1550
+ ]
1551
+ ] = None,
1552
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1553
+ _content_type: Optional[StrictStr] = None,
1554
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1555
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1556
+ ) -> Dict[str, str]:
1557
+ """API to get the default prefixes used over a dataset
1558
+
1559
+
1560
+ :param username: (required)
1561
+ :type username: str
1562
+ :param dataset: (required)
1563
+ :type dataset: str
1564
+ :param q_answer_api_key:
1565
+ :type q_answer_api_key: str
1566
+ :param _request_timeout: timeout setting for this request. If one
1567
+ number provided, it will be total request
1568
+ timeout. It can also be a pair (tuple) of
1569
+ (connection, read) timeouts.
1570
+ :type _request_timeout: int, tuple(int, int), optional
1571
+ :param _request_auth: set to override the auth_settings for an a single
1572
+ request; this effectively ignores the
1573
+ authentication in the spec for a single request.
1574
+ :type _request_auth: dict, optional
1575
+ :param _content_type: force content-type for the request.
1576
+ :type _content_type: str, Optional
1577
+ :param _headers: set to override the headers for a single
1578
+ request; this effectively ignores the headers
1579
+ in the spec for a single request.
1580
+ :type _headers: dict, optional
1581
+ :param _host_index: set to override the host_index for a single
1582
+ request; this effectively ignores the host_index
1583
+ in the spec for a single request.
1584
+ :type _host_index: int, optional
1585
+ :return: Returns the result object.
1586
+ """ # noqa: E501
1587
+
1588
+ _param = self._prefixes_serialize(
1589
+ username=username,
1590
+ dataset=dataset,
1591
+ q_answer_api_key=q_answer_api_key,
1592
+ _request_auth=_request_auth,
1593
+ _content_type=_content_type,
1594
+ _headers=_headers,
1595
+ _host_index=_host_index
1596
+ )
1597
+
1598
+ _response_types_map: Dict[str, Optional[str]] = {
1599
+ '200': "Dict[str, str]",
1600
+ }
1601
+ response_data = self.api_client.call_api(
1602
+ *_param,
1603
+ _request_timeout=_request_timeout
1604
+ )
1605
+ response_data.read()
1606
+ return self.api_client.response_deserialize(
1607
+ response_data=response_data,
1608
+ response_types_map=_response_types_map,
1609
+ ).data
1610
+
1611
+
1612
+ @validate_call
1613
+ def prefixes_with_http_info(
1614
+ self,
1615
+ username: StrictStr,
1616
+ dataset: StrictStr,
1617
+ q_answer_api_key: Optional[StrictStr] = None,
1618
+ _request_timeout: Union[
1619
+ None,
1620
+ Annotated[StrictFloat, Field(gt=0)],
1621
+ Tuple[
1622
+ Annotated[StrictFloat, Field(gt=0)],
1623
+ Annotated[StrictFloat, Field(gt=0)]
1624
+ ]
1625
+ ] = None,
1626
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1627
+ _content_type: Optional[StrictStr] = None,
1628
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1629
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1630
+ ) -> ApiResponse[Dict[str, str]]:
1631
+ """API to get the default prefixes used over a dataset
1632
+
1633
+
1634
+ :param username: (required)
1635
+ :type username: str
1636
+ :param dataset: (required)
1637
+ :type dataset: str
1638
+ :param q_answer_api_key:
1639
+ :type q_answer_api_key: str
1640
+ :param _request_timeout: timeout setting for this request. If one
1641
+ number provided, it will be total request
1642
+ timeout. It can also be a pair (tuple) of
1643
+ (connection, read) timeouts.
1644
+ :type _request_timeout: int, tuple(int, int), optional
1645
+ :param _request_auth: set to override the auth_settings for an a single
1646
+ request; this effectively ignores the
1647
+ authentication in the spec for a single request.
1648
+ :type _request_auth: dict, optional
1649
+ :param _content_type: force content-type for the request.
1650
+ :type _content_type: str, Optional
1651
+ :param _headers: set to override the headers for a single
1652
+ request; this effectively ignores the headers
1653
+ in the spec for a single request.
1654
+ :type _headers: dict, optional
1655
+ :param _host_index: set to override the host_index for a single
1656
+ request; this effectively ignores the host_index
1657
+ in the spec for a single request.
1658
+ :type _host_index: int, optional
1659
+ :return: Returns the result object.
1660
+ """ # noqa: E501
1661
+
1662
+ _param = self._prefixes_serialize(
1663
+ username=username,
1664
+ dataset=dataset,
1665
+ q_answer_api_key=q_answer_api_key,
1666
+ _request_auth=_request_auth,
1667
+ _content_type=_content_type,
1668
+ _headers=_headers,
1669
+ _host_index=_host_index
1670
+ )
1671
+
1672
+ _response_types_map: Dict[str, Optional[str]] = {
1673
+ '200': "Dict[str, str]",
1674
+ }
1675
+ response_data = self.api_client.call_api(
1676
+ *_param,
1677
+ _request_timeout=_request_timeout
1678
+ )
1679
+ response_data.read()
1680
+ return self.api_client.response_deserialize(
1681
+ response_data=response_data,
1682
+ response_types_map=_response_types_map,
1683
+ )
1684
+
1685
+
1686
+ @validate_call
1687
+ def prefixes_without_preload_content(
1688
+ self,
1689
+ username: StrictStr,
1690
+ dataset: StrictStr,
1691
+ q_answer_api_key: Optional[StrictStr] = None,
1692
+ _request_timeout: Union[
1693
+ None,
1694
+ Annotated[StrictFloat, Field(gt=0)],
1695
+ Tuple[
1696
+ Annotated[StrictFloat, Field(gt=0)],
1697
+ Annotated[StrictFloat, Field(gt=0)]
1698
+ ]
1699
+ ] = None,
1700
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1701
+ _content_type: Optional[StrictStr] = None,
1702
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1703
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1704
+ ) -> RESTResponseType:
1705
+ """API to get the default prefixes used over a dataset
1706
+
1707
+
1708
+ :param username: (required)
1709
+ :type username: str
1710
+ :param dataset: (required)
1711
+ :type dataset: str
1712
+ :param q_answer_api_key:
1713
+ :type q_answer_api_key: str
1714
+ :param _request_timeout: timeout setting for this request. If one
1715
+ number provided, it will be total request
1716
+ timeout. It can also be a pair (tuple) of
1717
+ (connection, read) timeouts.
1718
+ :type _request_timeout: int, tuple(int, int), optional
1719
+ :param _request_auth: set to override the auth_settings for an a single
1720
+ request; this effectively ignores the
1721
+ authentication in the spec for a single request.
1722
+ :type _request_auth: dict, optional
1723
+ :param _content_type: force content-type for the request.
1724
+ :type _content_type: str, Optional
1725
+ :param _headers: set to override the headers for a single
1726
+ request; this effectively ignores the headers
1727
+ in the spec for a single request.
1728
+ :type _headers: dict, optional
1729
+ :param _host_index: set to override the host_index for a single
1730
+ request; this effectively ignores the host_index
1731
+ in the spec for a single request.
1732
+ :type _host_index: int, optional
1733
+ :return: Returns the result object.
1734
+ """ # noqa: E501
1735
+
1736
+ _param = self._prefixes_serialize(
1737
+ username=username,
1738
+ dataset=dataset,
1739
+ q_answer_api_key=q_answer_api_key,
1740
+ _request_auth=_request_auth,
1741
+ _content_type=_content_type,
1742
+ _headers=_headers,
1743
+ _host_index=_host_index
1744
+ )
1745
+
1746
+ _response_types_map: Dict[str, Optional[str]] = {
1747
+ '200': "Dict[str, str]",
1748
+ }
1749
+ response_data = self.api_client.call_api(
1750
+ *_param,
1751
+ _request_timeout=_request_timeout
1752
+ )
1753
+ return response_data.response
1754
+
1755
+
1756
+ def _prefixes_serialize(
1757
+ self,
1758
+ username,
1759
+ dataset,
1760
+ q_answer_api_key,
1761
+ _request_auth,
1762
+ _content_type,
1763
+ _headers,
1764
+ _host_index,
1765
+ ) -> RequestSerialized:
1766
+
1767
+ _host = None
1768
+
1769
+ _collection_formats: Dict[str, str] = {
1770
+ }
1771
+
1772
+ _path_params: Dict[str, str] = {}
1773
+ _query_params: List[Tuple[str, str]] = []
1774
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1775
+ _form_params: List[Tuple[str, str]] = []
1776
+ _files: Dict[
1777
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1778
+ ] = {}
1779
+ _body_params: Optional[bytes] = None
1780
+
1781
+ # process the path parameters
1782
+ if username is not None:
1783
+ _path_params['username'] = username
1784
+ if dataset is not None:
1785
+ _path_params['dataset'] = dataset
1786
+ # process the query parameters
1787
+ # process the header parameters
1788
+ if q_answer_api_key is not None:
1789
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
1790
+ # process the form parameters
1791
+ # process the body parameter
1792
+
1793
+
1794
+ # set the HTTP header `Accept`
1795
+ if 'Accept' not in _header_params:
1796
+ _header_params['Accept'] = self.api_client.select_header_accept(
1797
+ [
1798
+ '*/*'
1799
+ ]
1800
+ )
1801
+
1802
+
1803
+ # authentication setting
1804
+ _auth_settings: List[str] = [
1805
+ 'QAnswer-Api-Key',
1806
+ 'Bearer'
1807
+ ]
1808
+
1809
+ return self.api_client.param_serialize(
1810
+ method='GET',
1811
+ resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/prefixes',
1812
+ path_params=_path_params,
1813
+ query_params=_query_params,
1814
+ header_params=_header_params,
1815
+ body=_body_params,
1816
+ post_params=_form_params,
1817
+ files=_files,
1818
+ auth_settings=_auth_settings,
1819
+ collection_formats=_collection_formats,
1820
+ _host=_host,
1821
+ _request_auth=_request_auth
1822
+ )
1823
+
1824
+
1825
+
1826
+
1827
+ @validate_call
1828
+ def rdf_expansion(
1829
+ self,
1830
+ username: StrictStr,
1831
+ dataset: StrictStr,
1832
+ question: StrictStr,
1833
+ language: Optional[StrictStr] = None,
1834
+ q_answer_api_key: Optional[StrictStr] = None,
1835
+ _request_timeout: Union[
1836
+ None,
1837
+ Annotated[StrictFloat, Field(gt=0)],
1838
+ Tuple[
1839
+ Annotated[StrictFloat, Field(gt=0)],
1840
+ Annotated[StrictFloat, Field(gt=0)]
1841
+ ]
1842
+ ] = None,
1843
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1844
+ _content_type: Optional[StrictStr] = None,
1845
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1846
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1847
+ ) -> str:
1848
+ """text2RDF endpoint over a dataset
1849
+
1850
+
1851
+ :param username: (required)
1852
+ :type username: str
1853
+ :param dataset: (required)
1854
+ :type dataset: str
1855
+ :param question: (required)
1856
+ :type question: str
1857
+ :param language:
1858
+ :type language: str
1859
+ :param q_answer_api_key:
1860
+ :type q_answer_api_key: str
1861
+ :param _request_timeout: timeout setting for this request. If one
1862
+ number provided, it will be total request
1863
+ timeout. It can also be a pair (tuple) of
1864
+ (connection, read) timeouts.
1865
+ :type _request_timeout: int, tuple(int, int), optional
1866
+ :param _request_auth: set to override the auth_settings for an a single
1867
+ request; this effectively ignores the
1868
+ authentication in the spec for a single request.
1869
+ :type _request_auth: dict, optional
1870
+ :param _content_type: force content-type for the request.
1871
+ :type _content_type: str, Optional
1872
+ :param _headers: set to override the headers for a single
1873
+ request; this effectively ignores the headers
1874
+ in the spec for a single request.
1875
+ :type _headers: dict, optional
1876
+ :param _host_index: set to override the host_index for a single
1877
+ request; this effectively ignores the host_index
1878
+ in the spec for a single request.
1879
+ :type _host_index: int, optional
1880
+ :return: Returns the result object.
1881
+ """ # noqa: E501
1882
+
1883
+ _param = self._rdf_expansion_serialize(
1884
+ username=username,
1885
+ dataset=dataset,
1886
+ question=question,
1887
+ language=language,
1888
+ q_answer_api_key=q_answer_api_key,
1889
+ _request_auth=_request_auth,
1890
+ _content_type=_content_type,
1891
+ _headers=_headers,
1892
+ _host_index=_host_index
1893
+ )
1894
+
1895
+ _response_types_map: Dict[str, Optional[str]] = {
1896
+ '200': "str",
1897
+ }
1898
+ response_data = self.api_client.call_api(
1899
+ *_param,
1900
+ _request_timeout=_request_timeout
1901
+ )
1902
+ response_data.read()
1903
+ return self.api_client.response_deserialize(
1904
+ response_data=response_data,
1905
+ response_types_map=_response_types_map,
1906
+ ).data
1907
+
1908
+
1909
+ @validate_call
1910
+ def rdf_expansion_with_http_info(
1911
+ self,
1912
+ username: StrictStr,
1913
+ dataset: StrictStr,
1914
+ question: StrictStr,
1915
+ language: Optional[StrictStr] = None,
1916
+ q_answer_api_key: Optional[StrictStr] = None,
1917
+ _request_timeout: Union[
1918
+ None,
1919
+ Annotated[StrictFloat, Field(gt=0)],
1920
+ Tuple[
1921
+ Annotated[StrictFloat, Field(gt=0)],
1922
+ Annotated[StrictFloat, Field(gt=0)]
1923
+ ]
1924
+ ] = None,
1925
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1926
+ _content_type: Optional[StrictStr] = None,
1927
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1928
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1929
+ ) -> ApiResponse[str]:
1930
+ """text2RDF endpoint over a dataset
1931
+
1932
+
1933
+ :param username: (required)
1934
+ :type username: str
1935
+ :param dataset: (required)
1936
+ :type dataset: str
1937
+ :param question: (required)
1938
+ :type question: str
1939
+ :param language:
1940
+ :type language: str
1941
+ :param q_answer_api_key:
1942
+ :type q_answer_api_key: str
1943
+ :param _request_timeout: timeout setting for this request. If one
1944
+ number provided, it will be total request
1945
+ timeout. It can also be a pair (tuple) of
1946
+ (connection, read) timeouts.
1947
+ :type _request_timeout: int, tuple(int, int), optional
1948
+ :param _request_auth: set to override the auth_settings for an a single
1949
+ request; this effectively ignores the
1950
+ authentication in the spec for a single request.
1951
+ :type _request_auth: dict, optional
1952
+ :param _content_type: force content-type for the request.
1953
+ :type _content_type: str, Optional
1954
+ :param _headers: set to override the headers for a single
1955
+ request; this effectively ignores the headers
1956
+ in the spec for a single request.
1957
+ :type _headers: dict, optional
1958
+ :param _host_index: set to override the host_index for a single
1959
+ request; this effectively ignores the host_index
1960
+ in the spec for a single request.
1961
+ :type _host_index: int, optional
1962
+ :return: Returns the result object.
1963
+ """ # noqa: E501
1964
+
1965
+ _param = self._rdf_expansion_serialize(
1966
+ username=username,
1967
+ dataset=dataset,
1968
+ question=question,
1969
+ language=language,
1970
+ q_answer_api_key=q_answer_api_key,
1971
+ _request_auth=_request_auth,
1972
+ _content_type=_content_type,
1973
+ _headers=_headers,
1974
+ _host_index=_host_index
1975
+ )
1976
+
1977
+ _response_types_map: Dict[str, Optional[str]] = {
1978
+ '200': "str",
1979
+ }
1980
+ response_data = self.api_client.call_api(
1981
+ *_param,
1982
+ _request_timeout=_request_timeout
1983
+ )
1984
+ response_data.read()
1985
+ return self.api_client.response_deserialize(
1986
+ response_data=response_data,
1987
+ response_types_map=_response_types_map,
1988
+ )
1989
+
1990
+
1991
+ @validate_call
1992
+ def rdf_expansion_without_preload_content(
1993
+ self,
1994
+ username: StrictStr,
1995
+ dataset: StrictStr,
1996
+ question: StrictStr,
1997
+ language: Optional[StrictStr] = None,
1998
+ q_answer_api_key: Optional[StrictStr] = None,
1999
+ _request_timeout: Union[
2000
+ None,
2001
+ Annotated[StrictFloat, Field(gt=0)],
2002
+ Tuple[
2003
+ Annotated[StrictFloat, Field(gt=0)],
2004
+ Annotated[StrictFloat, Field(gt=0)]
2005
+ ]
2006
+ ] = None,
2007
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2008
+ _content_type: Optional[StrictStr] = None,
2009
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2010
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2011
+ ) -> RESTResponseType:
2012
+ """text2RDF endpoint over a dataset
2013
+
2014
+
2015
+ :param username: (required)
2016
+ :type username: str
2017
+ :param dataset: (required)
2018
+ :type dataset: str
2019
+ :param question: (required)
2020
+ :type question: str
2021
+ :param language:
2022
+ :type language: str
2023
+ :param q_answer_api_key:
2024
+ :type q_answer_api_key: str
2025
+ :param _request_timeout: timeout setting for this request. If one
2026
+ number provided, it will be total request
2027
+ timeout. It can also be a pair (tuple) of
2028
+ (connection, read) timeouts.
2029
+ :type _request_timeout: int, tuple(int, int), optional
2030
+ :param _request_auth: set to override the auth_settings for an a single
2031
+ request; this effectively ignores the
2032
+ authentication in the spec for a single request.
2033
+ :type _request_auth: dict, optional
2034
+ :param _content_type: force content-type for the request.
2035
+ :type _content_type: str, Optional
2036
+ :param _headers: set to override the headers for a single
2037
+ request; this effectively ignores the headers
2038
+ in the spec for a single request.
2039
+ :type _headers: dict, optional
2040
+ :param _host_index: set to override the host_index for a single
2041
+ request; this effectively ignores the host_index
2042
+ in the spec for a single request.
2043
+ :type _host_index: int, optional
2044
+ :return: Returns the result object.
2045
+ """ # noqa: E501
2046
+
2047
+ _param = self._rdf_expansion_serialize(
2048
+ username=username,
2049
+ dataset=dataset,
2050
+ question=question,
2051
+ language=language,
2052
+ q_answer_api_key=q_answer_api_key,
2053
+ _request_auth=_request_auth,
2054
+ _content_type=_content_type,
2055
+ _headers=_headers,
2056
+ _host_index=_host_index
2057
+ )
2058
+
2059
+ _response_types_map: Dict[str, Optional[str]] = {
2060
+ '200': "str",
2061
+ }
2062
+ response_data = self.api_client.call_api(
2063
+ *_param,
2064
+ _request_timeout=_request_timeout
2065
+ )
2066
+ return response_data.response
2067
+
2068
+
2069
+ def _rdf_expansion_serialize(
2070
+ self,
2071
+ username,
2072
+ dataset,
2073
+ question,
2074
+ language,
2075
+ q_answer_api_key,
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
+ if username is not None:
2098
+ _path_params['username'] = username
2099
+ if dataset is not None:
2100
+ _path_params['dataset'] = dataset
2101
+ # process the query parameters
2102
+ if question is not None:
2103
+
2104
+ _query_params.append(('question', question))
2105
+
2106
+ if language is not None:
2107
+
2108
+ _query_params.append(('language', language))
2109
+
2110
+ # process the header parameters
2111
+ if q_answer_api_key is not None:
2112
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
2113
+ # process the form parameters
2114
+ # process the body parameter
2115
+
2116
+
2117
+ # set the HTTP header `Accept`
2118
+ if 'Accept' not in _header_params:
2119
+ _header_params['Accept'] = self.api_client.select_header_accept(
2120
+ [
2121
+ '*/*'
2122
+ ]
2123
+ )
2124
+
2125
+
2126
+ # authentication setting
2127
+ _auth_settings: List[str] = [
2128
+ 'QAnswer-Api-Key',
2129
+ 'Bearer'
2130
+ ]
2131
+
2132
+ return self.api_client.param_serialize(
2133
+ method='POST',
2134
+ resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/text2rdf',
2135
+ path_params=_path_params,
2136
+ query_params=_query_params,
2137
+ header_params=_header_params,
2138
+ body=_body_params,
2139
+ post_params=_form_params,
2140
+ files=_files,
2141
+ auth_settings=_auth_settings,
2142
+ collection_formats=_collection_formats,
2143
+ _host=_host,
2144
+ _request_auth=_request_auth
2145
+ )
2146
+
2147
+
2148
+
2149
+
2150
+ @validate_call
2151
+ def reindex(
2152
+ self,
2153
+ username: StrictStr,
2154
+ dataset: StrictStr,
2155
+ q_answer_api_key: Optional[StrictStr] = None,
2156
+ _request_timeout: Union[
2157
+ None,
2158
+ Annotated[StrictFloat, Field(gt=0)],
2159
+ Tuple[
2160
+ Annotated[StrictFloat, Field(gt=0)],
2161
+ Annotated[StrictFloat, Field(gt=0)]
2162
+ ]
2163
+ ] = None,
2164
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2165
+ _content_type: Optional[StrictStr] = None,
2166
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2167
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2168
+ ) -> LuceneIndexRequestResult:
2169
+ """API to reindex the lucene index
2170
+
2171
+
2172
+ :param username: (required)
2173
+ :type username: str
2174
+ :param dataset: (required)
2175
+ :type dataset: str
2176
+ :param q_answer_api_key:
2177
+ :type q_answer_api_key: str
2178
+ :param _request_timeout: timeout setting for this request. If one
2179
+ number provided, it will be total request
2180
+ timeout. It can also be a pair (tuple) of
2181
+ (connection, read) timeouts.
2182
+ :type _request_timeout: int, tuple(int, int), optional
2183
+ :param _request_auth: set to override the auth_settings for an a single
2184
+ request; this effectively ignores the
2185
+ authentication in the spec for a single request.
2186
+ :type _request_auth: dict, optional
2187
+ :param _content_type: force content-type for the request.
2188
+ :type _content_type: str, Optional
2189
+ :param _headers: set to override the headers for a single
2190
+ request; this effectively ignores the headers
2191
+ in the spec for a single request.
2192
+ :type _headers: dict, optional
2193
+ :param _host_index: set to override the host_index for a single
2194
+ request; this effectively ignores the host_index
2195
+ in the spec for a single request.
2196
+ :type _host_index: int, optional
2197
+ :return: Returns the result object.
2198
+ """ # noqa: E501
2199
+
2200
+ _param = self._reindex_serialize(
2201
+ username=username,
2202
+ dataset=dataset,
2203
+ q_answer_api_key=q_answer_api_key,
2204
+ _request_auth=_request_auth,
2205
+ _content_type=_content_type,
2206
+ _headers=_headers,
2207
+ _host_index=_host_index
2208
+ )
2209
+
2210
+ _response_types_map: Dict[str, Optional[str]] = {
2211
+ '200': "LuceneIndexRequestResult",
2212
+ }
2213
+ response_data = self.api_client.call_api(
2214
+ *_param,
2215
+ _request_timeout=_request_timeout
2216
+ )
2217
+ response_data.read()
2218
+ return self.api_client.response_deserialize(
2219
+ response_data=response_data,
2220
+ response_types_map=_response_types_map,
2221
+ ).data
2222
+
2223
+
2224
+ @validate_call
2225
+ def reindex_with_http_info(
2226
+ self,
2227
+ username: StrictStr,
2228
+ dataset: StrictStr,
2229
+ q_answer_api_key: Optional[StrictStr] = None,
2230
+ _request_timeout: Union[
2231
+ None,
2232
+ Annotated[StrictFloat, Field(gt=0)],
2233
+ Tuple[
2234
+ Annotated[StrictFloat, Field(gt=0)],
2235
+ Annotated[StrictFloat, Field(gt=0)]
2236
+ ]
2237
+ ] = None,
2238
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2239
+ _content_type: Optional[StrictStr] = None,
2240
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2241
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2242
+ ) -> ApiResponse[LuceneIndexRequestResult]:
2243
+ """API to reindex the lucene index
2244
+
2245
+
2246
+ :param username: (required)
2247
+ :type username: str
2248
+ :param dataset: (required)
2249
+ :type dataset: str
2250
+ :param q_answer_api_key:
2251
+ :type q_answer_api_key: str
2252
+ :param _request_timeout: timeout setting for this request. If one
2253
+ number provided, it will be total request
2254
+ timeout. It can also be a pair (tuple) of
2255
+ (connection, read) timeouts.
2256
+ :type _request_timeout: int, tuple(int, int), optional
2257
+ :param _request_auth: set to override the auth_settings for an a single
2258
+ request; this effectively ignores the
2259
+ authentication in the spec for a single request.
2260
+ :type _request_auth: dict, optional
2261
+ :param _content_type: force content-type for the request.
2262
+ :type _content_type: str, Optional
2263
+ :param _headers: set to override the headers for a single
2264
+ request; this effectively ignores the headers
2265
+ in the spec for a single request.
2266
+ :type _headers: dict, optional
2267
+ :param _host_index: set to override the host_index for a single
2268
+ request; this effectively ignores the host_index
2269
+ in the spec for a single request.
2270
+ :type _host_index: int, optional
2271
+ :return: Returns the result object.
2272
+ """ # noqa: E501
2273
+
2274
+ _param = self._reindex_serialize(
2275
+ username=username,
2276
+ dataset=dataset,
2277
+ q_answer_api_key=q_answer_api_key,
2278
+ _request_auth=_request_auth,
2279
+ _content_type=_content_type,
2280
+ _headers=_headers,
2281
+ _host_index=_host_index
2282
+ )
2283
+
2284
+ _response_types_map: Dict[str, Optional[str]] = {
2285
+ '200': "LuceneIndexRequestResult",
2286
+ }
2287
+ response_data = self.api_client.call_api(
2288
+ *_param,
2289
+ _request_timeout=_request_timeout
2290
+ )
2291
+ response_data.read()
2292
+ return self.api_client.response_deserialize(
2293
+ response_data=response_data,
2294
+ response_types_map=_response_types_map,
2295
+ )
2296
+
2297
+
2298
+ @validate_call
2299
+ def reindex_without_preload_content(
2300
+ self,
2301
+ username: StrictStr,
2302
+ dataset: StrictStr,
2303
+ q_answer_api_key: Optional[StrictStr] = None,
2304
+ _request_timeout: Union[
2305
+ None,
2306
+ Annotated[StrictFloat, Field(gt=0)],
2307
+ Tuple[
2308
+ Annotated[StrictFloat, Field(gt=0)],
2309
+ Annotated[StrictFloat, Field(gt=0)]
2310
+ ]
2311
+ ] = None,
2312
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2313
+ _content_type: Optional[StrictStr] = None,
2314
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2315
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2316
+ ) -> RESTResponseType:
2317
+ """API to reindex the lucene index
2318
+
2319
+
2320
+ :param username: (required)
2321
+ :type username: str
2322
+ :param dataset: (required)
2323
+ :type dataset: str
2324
+ :param q_answer_api_key:
2325
+ :type q_answer_api_key: str
2326
+ :param _request_timeout: timeout setting for this request. If one
2327
+ number provided, it will be total request
2328
+ timeout. It can also be a pair (tuple) of
2329
+ (connection, read) timeouts.
2330
+ :type _request_timeout: int, tuple(int, int), optional
2331
+ :param _request_auth: set to override the auth_settings for an a single
2332
+ request; this effectively ignores the
2333
+ authentication in the spec for a single request.
2334
+ :type _request_auth: dict, optional
2335
+ :param _content_type: force content-type for the request.
2336
+ :type _content_type: str, Optional
2337
+ :param _headers: set to override the headers for a single
2338
+ request; this effectively ignores the headers
2339
+ in the spec for a single request.
2340
+ :type _headers: dict, optional
2341
+ :param _host_index: set to override the host_index for a single
2342
+ request; this effectively ignores the host_index
2343
+ in the spec for a single request.
2344
+ :type _host_index: int, optional
2345
+ :return: Returns the result object.
2346
+ """ # noqa: E501
2347
+
2348
+ _param = self._reindex_serialize(
2349
+ username=username,
2350
+ dataset=dataset,
2351
+ q_answer_api_key=q_answer_api_key,
2352
+ _request_auth=_request_auth,
2353
+ _content_type=_content_type,
2354
+ _headers=_headers,
2355
+ _host_index=_host_index
2356
+ )
2357
+
2358
+ _response_types_map: Dict[str, Optional[str]] = {
2359
+ '200': "LuceneIndexRequestResult",
2360
+ }
2361
+ response_data = self.api_client.call_api(
2362
+ *_param,
2363
+ _request_timeout=_request_timeout
2364
+ )
2365
+ return response_data.response
2366
+
2367
+
2368
+ def _reindex_serialize(
2369
+ self,
2370
+ username,
2371
+ dataset,
2372
+ q_answer_api_key,
2373
+ _request_auth,
2374
+ _content_type,
2375
+ _headers,
2376
+ _host_index,
2377
+ ) -> RequestSerialized:
2378
+
2379
+ _host = None
2380
+
2381
+ _collection_formats: Dict[str, str] = {
2382
+ }
2383
+
2384
+ _path_params: Dict[str, str] = {}
2385
+ _query_params: List[Tuple[str, str]] = []
2386
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2387
+ _form_params: List[Tuple[str, str]] = []
2388
+ _files: Dict[
2389
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2390
+ ] = {}
2391
+ _body_params: Optional[bytes] = None
2392
+
2393
+ # process the path parameters
2394
+ if username is not None:
2395
+ _path_params['username'] = username
2396
+ if dataset is not None:
2397
+ _path_params['dataset'] = dataset
2398
+ # process the query parameters
2399
+ # process the header parameters
2400
+ if q_answer_api_key is not None:
2401
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
2402
+ # process the form parameters
2403
+ # process the body parameter
2404
+
2405
+
2406
+ # set the HTTP header `Accept`
2407
+ if 'Accept' not in _header_params:
2408
+ _header_params['Accept'] = self.api_client.select_header_accept(
2409
+ [
2410
+ '*/*'
2411
+ ]
2412
+ )
2413
+
2414
+
2415
+ # authentication setting
2416
+ _auth_settings: List[str] = [
2417
+ 'QAnswer-Api-Key',
2418
+ 'Bearer'
2419
+ ]
2420
+
2421
+ return self.api_client.param_serialize(
2422
+ method='GET',
2423
+ resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/reindex',
2424
+ path_params=_path_params,
2425
+ query_params=_query_params,
2426
+ header_params=_header_params,
2427
+ body=_body_params,
2428
+ post_params=_form_params,
2429
+ files=_files,
2430
+ auth_settings=_auth_settings,
2431
+ collection_formats=_collection_formats,
2432
+ _host=_host,
2433
+ _request_auth=_request_auth
2434
+ )
2435
+
2436
+
2437
+
2438
+
2439
+ @validate_call
2440
+ def set_prefixes(
2441
+ self,
2442
+ username: StrictStr,
2443
+ dataset: StrictStr,
2444
+ request_body: Dict[str, StrictStr],
2445
+ q_answer_api_key: Optional[StrictStr] = None,
2446
+ _request_timeout: Union[
2447
+ None,
2448
+ Annotated[StrictFloat, Field(gt=0)],
2449
+ Tuple[
2450
+ Annotated[StrictFloat, Field(gt=0)],
2451
+ Annotated[StrictFloat, Field(gt=0)]
2452
+ ]
2453
+ ] = None,
2454
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2455
+ _content_type: Optional[StrictStr] = None,
2456
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2457
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2458
+ ) -> Dict[str, str]:
2459
+ """API to set the default prefixes used over a dataset
2460
+
2461
+
2462
+ :param username: (required)
2463
+ :type username: str
2464
+ :param dataset: (required)
2465
+ :type dataset: str
2466
+ :param request_body: (required)
2467
+ :type request_body: Dict[str, str]
2468
+ :param q_answer_api_key:
2469
+ :type q_answer_api_key: str
2470
+ :param _request_timeout: timeout setting for this request. If one
2471
+ number provided, it will be total request
2472
+ timeout. It can also be a pair (tuple) of
2473
+ (connection, read) timeouts.
2474
+ :type _request_timeout: int, tuple(int, int), optional
2475
+ :param _request_auth: set to override the auth_settings for an a single
2476
+ request; this effectively ignores the
2477
+ authentication in the spec for a single request.
2478
+ :type _request_auth: dict, optional
2479
+ :param _content_type: force content-type for the request.
2480
+ :type _content_type: str, Optional
2481
+ :param _headers: set to override the headers for a single
2482
+ request; this effectively ignores the headers
2483
+ in the spec for a single request.
2484
+ :type _headers: dict, optional
2485
+ :param _host_index: set to override the host_index for a single
2486
+ request; this effectively ignores the host_index
2487
+ in the spec for a single request.
2488
+ :type _host_index: int, optional
2489
+ :return: Returns the result object.
2490
+ """ # noqa: E501
2491
+
2492
+ _param = self._set_prefixes_serialize(
2493
+ username=username,
2494
+ dataset=dataset,
2495
+ request_body=request_body,
2496
+ q_answer_api_key=q_answer_api_key,
2497
+ _request_auth=_request_auth,
2498
+ _content_type=_content_type,
2499
+ _headers=_headers,
2500
+ _host_index=_host_index
2501
+ )
2502
+
2503
+ _response_types_map: Dict[str, Optional[str]] = {
2504
+ '200': "Dict[str, str]",
2505
+ }
2506
+ response_data = self.api_client.call_api(
2507
+ *_param,
2508
+ _request_timeout=_request_timeout
2509
+ )
2510
+ response_data.read()
2511
+ return self.api_client.response_deserialize(
2512
+ response_data=response_data,
2513
+ response_types_map=_response_types_map,
2514
+ ).data
2515
+
2516
+
2517
+ @validate_call
2518
+ def set_prefixes_with_http_info(
2519
+ self,
2520
+ username: StrictStr,
2521
+ dataset: StrictStr,
2522
+ request_body: Dict[str, StrictStr],
2523
+ q_answer_api_key: Optional[StrictStr] = None,
2524
+ _request_timeout: Union[
2525
+ None,
2526
+ Annotated[StrictFloat, Field(gt=0)],
2527
+ Tuple[
2528
+ Annotated[StrictFloat, Field(gt=0)],
2529
+ Annotated[StrictFloat, Field(gt=0)]
2530
+ ]
2531
+ ] = None,
2532
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2533
+ _content_type: Optional[StrictStr] = None,
2534
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2535
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2536
+ ) -> ApiResponse[Dict[str, str]]:
2537
+ """API to set the default prefixes used over a dataset
2538
+
2539
+
2540
+ :param username: (required)
2541
+ :type username: str
2542
+ :param dataset: (required)
2543
+ :type dataset: str
2544
+ :param request_body: (required)
2545
+ :type request_body: Dict[str, str]
2546
+ :param q_answer_api_key:
2547
+ :type q_answer_api_key: str
2548
+ :param _request_timeout: timeout setting for this request. If one
2549
+ number provided, it will be total request
2550
+ timeout. It can also be a pair (tuple) of
2551
+ (connection, read) timeouts.
2552
+ :type _request_timeout: int, tuple(int, int), optional
2553
+ :param _request_auth: set to override the auth_settings for an a single
2554
+ request; this effectively ignores the
2555
+ authentication in the spec for a single request.
2556
+ :type _request_auth: dict, optional
2557
+ :param _content_type: force content-type for the request.
2558
+ :type _content_type: str, Optional
2559
+ :param _headers: set to override the headers for a single
2560
+ request; this effectively ignores the headers
2561
+ in the spec for a single request.
2562
+ :type _headers: dict, optional
2563
+ :param _host_index: set to override the host_index for a single
2564
+ request; this effectively ignores the host_index
2565
+ in the spec for a single request.
2566
+ :type _host_index: int, optional
2567
+ :return: Returns the result object.
2568
+ """ # noqa: E501
2569
+
2570
+ _param = self._set_prefixes_serialize(
2571
+ username=username,
2572
+ dataset=dataset,
2573
+ request_body=request_body,
2574
+ q_answer_api_key=q_answer_api_key,
2575
+ _request_auth=_request_auth,
2576
+ _content_type=_content_type,
2577
+ _headers=_headers,
2578
+ _host_index=_host_index
2579
+ )
2580
+
2581
+ _response_types_map: Dict[str, Optional[str]] = {
2582
+ '200': "Dict[str, str]",
2583
+ }
2584
+ response_data = self.api_client.call_api(
2585
+ *_param,
2586
+ _request_timeout=_request_timeout
2587
+ )
2588
+ response_data.read()
2589
+ return self.api_client.response_deserialize(
2590
+ response_data=response_data,
2591
+ response_types_map=_response_types_map,
2592
+ )
2593
+
2594
+
2595
+ @validate_call
2596
+ def set_prefixes_without_preload_content(
2597
+ self,
2598
+ username: StrictStr,
2599
+ dataset: StrictStr,
2600
+ request_body: Dict[str, StrictStr],
2601
+ q_answer_api_key: Optional[StrictStr] = None,
2602
+ _request_timeout: Union[
2603
+ None,
2604
+ Annotated[StrictFloat, Field(gt=0)],
2605
+ Tuple[
2606
+ Annotated[StrictFloat, Field(gt=0)],
2607
+ Annotated[StrictFloat, Field(gt=0)]
2608
+ ]
2609
+ ] = None,
2610
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2611
+ _content_type: Optional[StrictStr] = None,
2612
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2613
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2614
+ ) -> RESTResponseType:
2615
+ """API to set the default prefixes used over a dataset
2616
+
2617
+
2618
+ :param username: (required)
2619
+ :type username: str
2620
+ :param dataset: (required)
2621
+ :type dataset: str
2622
+ :param request_body: (required)
2623
+ :type request_body: Dict[str, str]
2624
+ :param q_answer_api_key:
2625
+ :type q_answer_api_key: str
2626
+ :param _request_timeout: timeout setting for this request. If one
2627
+ number provided, it will be total request
2628
+ timeout. It can also be a pair (tuple) of
2629
+ (connection, read) timeouts.
2630
+ :type _request_timeout: int, tuple(int, int), optional
2631
+ :param _request_auth: set to override the auth_settings for an a single
2632
+ request; this effectively ignores the
2633
+ authentication in the spec for a single request.
2634
+ :type _request_auth: dict, optional
2635
+ :param _content_type: force content-type for the request.
2636
+ :type _content_type: str, Optional
2637
+ :param _headers: set to override the headers for a single
2638
+ request; this effectively ignores the headers
2639
+ in the spec for a single request.
2640
+ :type _headers: dict, optional
2641
+ :param _host_index: set to override the host_index for a single
2642
+ request; this effectively ignores the host_index
2643
+ in the spec for a single request.
2644
+ :type _host_index: int, optional
2645
+ :return: Returns the result object.
2646
+ """ # noqa: E501
2647
+
2648
+ _param = self._set_prefixes_serialize(
2649
+ username=username,
2650
+ dataset=dataset,
2651
+ request_body=request_body,
2652
+ q_answer_api_key=q_answer_api_key,
2653
+ _request_auth=_request_auth,
2654
+ _content_type=_content_type,
2655
+ _headers=_headers,
2656
+ _host_index=_host_index
2657
+ )
2658
+
2659
+ _response_types_map: Dict[str, Optional[str]] = {
2660
+ '200': "Dict[str, str]",
2661
+ }
2662
+ response_data = self.api_client.call_api(
2663
+ *_param,
2664
+ _request_timeout=_request_timeout
2665
+ )
2666
+ return response_data.response
2667
+
2668
+
2669
+ def _set_prefixes_serialize(
2670
+ self,
2671
+ username,
2672
+ dataset,
2673
+ request_body,
2674
+ q_answer_api_key,
2675
+ _request_auth,
2676
+ _content_type,
2677
+ _headers,
2678
+ _host_index,
2679
+ ) -> RequestSerialized:
2680
+
2681
+ _host = None
2682
+
2683
+ _collection_formats: Dict[str, str] = {
2684
+ }
2685
+
2686
+ _path_params: Dict[str, str] = {}
2687
+ _query_params: List[Tuple[str, str]] = []
2688
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2689
+ _form_params: List[Tuple[str, str]] = []
2690
+ _files: Dict[
2691
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2692
+ ] = {}
2693
+ _body_params: Optional[bytes] = None
2694
+
2695
+ # process the path parameters
2696
+ if username is not None:
2697
+ _path_params['username'] = username
2698
+ if dataset is not None:
2699
+ _path_params['dataset'] = dataset
2700
+ # process the query parameters
2701
+ # process the header parameters
2702
+ if q_answer_api_key is not None:
2703
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
2704
+ # process the form parameters
2705
+ # process the body parameter
2706
+ if request_body is not None:
2707
+ _body_params = request_body
2708
+
2709
+
2710
+ # set the HTTP header `Accept`
2711
+ if 'Accept' not in _header_params:
2712
+ _header_params['Accept'] = self.api_client.select_header_accept(
2713
+ [
2714
+ '*/*'
2715
+ ]
2716
+ )
2717
+
2718
+ # set the HTTP header `Content-Type`
2719
+ if _content_type:
2720
+ _header_params['Content-Type'] = _content_type
2721
+ else:
2722
+ _default_content_type = (
2723
+ self.api_client.select_header_content_type(
2724
+ [
2725
+ 'application/json'
2726
+ ]
2727
+ )
2728
+ )
2729
+ if _default_content_type is not None:
2730
+ _header_params['Content-Type'] = _default_content_type
2731
+
2732
+ # authentication setting
2733
+ _auth_settings: List[str] = [
2734
+ 'QAnswer-Api-Key',
2735
+ 'Bearer'
2736
+ ]
2737
+
2738
+ return self.api_client.param_serialize(
2739
+ method='POST',
2740
+ resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/set-prefixes',
2741
+ path_params=_path_params,
2742
+ query_params=_query_params,
2743
+ header_params=_header_params,
2744
+ body=_body_params,
2745
+ post_params=_form_params,
2746
+ files=_files,
2747
+ auth_settings=_auth_settings,
2748
+ collection_formats=_collection_formats,
2749
+ _host=_host,
2750
+ _request_auth=_request_auth
2751
+ )
2752
+
2753
+
2754
+
2755
+
2756
+ @validate_call
2757
+ def sparql_endpoint(
2758
+ self,
2759
+ username: StrictStr,
2760
+ dataset: StrictStr,
2761
+ body: StrictStr,
2762
+ query: Optional[StrictStr] = None,
2763
+ update: Optional[StrictStr] = None,
2764
+ accept: Optional[List[StrictStr]] = None,
2765
+ timeout: Optional[StrictInt] = None,
2766
+ content_type: Optional[StrictStr] = None,
2767
+ q_answer_api_key: Optional[StrictStr] = None,
2768
+ _request_timeout: Union[
2769
+ None,
2770
+ Annotated[StrictFloat, Field(gt=0)],
2771
+ Tuple[
2772
+ Annotated[StrictFloat, Field(gt=0)],
2773
+ Annotated[StrictFloat, Field(gt=0)]
2774
+ ]
2775
+ ] = None,
2776
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2777
+ _content_type: Optional[StrictStr] = None,
2778
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2779
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2780
+ ) -> None:
2781
+ """SPARQL endpoint over a dataset
2782
+
2783
+
2784
+ :param username: (required)
2785
+ :type username: str
2786
+ :param dataset: (required)
2787
+ :type dataset: str
2788
+ :param body: (required)
2789
+ :type body: str
2790
+ :param query:
2791
+ :type query: str
2792
+ :param update:
2793
+ :type update: str
2794
+ :param accept:
2795
+ :type accept: List[str]
2796
+ :param timeout:
2797
+ :type timeout: int
2798
+ :param content_type:
2799
+ :type content_type: str
2800
+ :param q_answer_api_key:
2801
+ :type q_answer_api_key: str
2802
+ :param _request_timeout: timeout setting for this request. If one
2803
+ number provided, it will be total request
2804
+ timeout. It can also be a pair (tuple) of
2805
+ (connection, read) timeouts.
2806
+ :type _request_timeout: int, tuple(int, int), optional
2807
+ :param _request_auth: set to override the auth_settings for an a single
2808
+ request; this effectively ignores the
2809
+ authentication in the spec for a single request.
2810
+ :type _request_auth: dict, optional
2811
+ :param _content_type: force content-type for the request.
2812
+ :type _content_type: str, Optional
2813
+ :param _headers: set to override the headers for a single
2814
+ request; this effectively ignores the headers
2815
+ in the spec for a single request.
2816
+ :type _headers: dict, optional
2817
+ :param _host_index: set to override the host_index for a single
2818
+ request; this effectively ignores the host_index
2819
+ in the spec for a single request.
2820
+ :type _host_index: int, optional
2821
+ :return: Returns the result object.
2822
+ """ # noqa: E501
2823
+
2824
+ _param = self._sparql_endpoint_serialize(
2825
+ username=username,
2826
+ dataset=dataset,
2827
+ body=body,
2828
+ query=query,
2829
+ update=update,
2830
+ accept=accept,
2831
+ timeout=timeout,
2832
+ content_type=content_type,
2833
+ q_answer_api_key=q_answer_api_key,
2834
+ _request_auth=_request_auth,
2835
+ _content_type=_content_type,
2836
+ _headers=_headers,
2837
+ _host_index=_host_index
2838
+ )
2839
+
2840
+ _response_types_map: Dict[str, Optional[str]] = {
2841
+ '200': None,
2842
+ }
2843
+ response_data = self.api_client.call_api(
2844
+ *_param,
2845
+ _request_timeout=_request_timeout
2846
+ )
2847
+ response_data.read()
2848
+ return self.api_client.response_deserialize(
2849
+ response_data=response_data,
2850
+ response_types_map=_response_types_map,
2851
+ ).data
2852
+
2853
+
2854
+ @validate_call
2855
+ def sparql_endpoint_with_http_info(
2856
+ self,
2857
+ username: StrictStr,
2858
+ dataset: StrictStr,
2859
+ body: StrictStr,
2860
+ query: Optional[StrictStr] = None,
2861
+ update: Optional[StrictStr] = None,
2862
+ accept: Optional[List[StrictStr]] = None,
2863
+ timeout: Optional[StrictInt] = None,
2864
+ content_type: Optional[StrictStr] = None,
2865
+ q_answer_api_key: Optional[StrictStr] = None,
2866
+ _request_timeout: Union[
2867
+ None,
2868
+ Annotated[StrictFloat, Field(gt=0)],
2869
+ Tuple[
2870
+ Annotated[StrictFloat, Field(gt=0)],
2871
+ Annotated[StrictFloat, Field(gt=0)]
2872
+ ]
2873
+ ] = None,
2874
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2875
+ _content_type: Optional[StrictStr] = None,
2876
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2877
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2878
+ ) -> ApiResponse[None]:
2879
+ """SPARQL endpoint over a dataset
2880
+
2881
+
2882
+ :param username: (required)
2883
+ :type username: str
2884
+ :param dataset: (required)
2885
+ :type dataset: str
2886
+ :param body: (required)
2887
+ :type body: str
2888
+ :param query:
2889
+ :type query: str
2890
+ :param update:
2891
+ :type update: str
2892
+ :param accept:
2893
+ :type accept: List[str]
2894
+ :param timeout:
2895
+ :type timeout: int
2896
+ :param content_type:
2897
+ :type content_type: str
2898
+ :param q_answer_api_key:
2899
+ :type q_answer_api_key: str
2900
+ :param _request_timeout: timeout setting for this request. If one
2901
+ number provided, it will be total request
2902
+ timeout. It can also be a pair (tuple) of
2903
+ (connection, read) timeouts.
2904
+ :type _request_timeout: int, tuple(int, int), optional
2905
+ :param _request_auth: set to override the auth_settings for an a single
2906
+ request; this effectively ignores the
2907
+ authentication in the spec for a single request.
2908
+ :type _request_auth: dict, optional
2909
+ :param _content_type: force content-type for the request.
2910
+ :type _content_type: str, Optional
2911
+ :param _headers: set to override the headers for a single
2912
+ request; this effectively ignores the headers
2913
+ in the spec for a single request.
2914
+ :type _headers: dict, optional
2915
+ :param _host_index: set to override the host_index for a single
2916
+ request; this effectively ignores the host_index
2917
+ in the spec for a single request.
2918
+ :type _host_index: int, optional
2919
+ :return: Returns the result object.
2920
+ """ # noqa: E501
2921
+
2922
+ _param = self._sparql_endpoint_serialize(
2923
+ username=username,
2924
+ dataset=dataset,
2925
+ body=body,
2926
+ query=query,
2927
+ update=update,
2928
+ accept=accept,
2929
+ timeout=timeout,
2930
+ content_type=content_type,
2931
+ q_answer_api_key=q_answer_api_key,
2932
+ _request_auth=_request_auth,
2933
+ _content_type=_content_type,
2934
+ _headers=_headers,
2935
+ _host_index=_host_index
2936
+ )
2937
+
2938
+ _response_types_map: Dict[str, Optional[str]] = {
2939
+ '200': None,
2940
+ }
2941
+ response_data = self.api_client.call_api(
2942
+ *_param,
2943
+ _request_timeout=_request_timeout
2944
+ )
2945
+ response_data.read()
2946
+ return self.api_client.response_deserialize(
2947
+ response_data=response_data,
2948
+ response_types_map=_response_types_map,
2949
+ )
2950
+
2951
+
2952
+ @validate_call
2953
+ def sparql_endpoint_without_preload_content(
2954
+ self,
2955
+ username: StrictStr,
2956
+ dataset: StrictStr,
2957
+ body: StrictStr,
2958
+ query: Optional[StrictStr] = None,
2959
+ update: Optional[StrictStr] = None,
2960
+ accept: Optional[List[StrictStr]] = None,
2961
+ timeout: Optional[StrictInt] = None,
2962
+ content_type: Optional[StrictStr] = None,
2963
+ q_answer_api_key: Optional[StrictStr] = None,
2964
+ _request_timeout: Union[
2965
+ None,
2966
+ Annotated[StrictFloat, Field(gt=0)],
2967
+ Tuple[
2968
+ Annotated[StrictFloat, Field(gt=0)],
2969
+ Annotated[StrictFloat, Field(gt=0)]
2970
+ ]
2971
+ ] = None,
2972
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2973
+ _content_type: Optional[StrictStr] = None,
2974
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2975
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2976
+ ) -> RESTResponseType:
2977
+ """SPARQL endpoint over a dataset
2978
+
2979
+
2980
+ :param username: (required)
2981
+ :type username: str
2982
+ :param dataset: (required)
2983
+ :type dataset: str
2984
+ :param body: (required)
2985
+ :type body: str
2986
+ :param query:
2987
+ :type query: str
2988
+ :param update:
2989
+ :type update: str
2990
+ :param accept:
2991
+ :type accept: List[str]
2992
+ :param timeout:
2993
+ :type timeout: int
2994
+ :param content_type:
2995
+ :type content_type: str
2996
+ :param q_answer_api_key:
2997
+ :type q_answer_api_key: str
2998
+ :param _request_timeout: timeout setting for this request. If one
2999
+ number provided, it will be total request
3000
+ timeout. It can also be a pair (tuple) of
3001
+ (connection, read) timeouts.
3002
+ :type _request_timeout: int, tuple(int, int), optional
3003
+ :param _request_auth: set to override the auth_settings for an a single
3004
+ request; this effectively ignores the
3005
+ authentication in the spec for a single request.
3006
+ :type _request_auth: dict, optional
3007
+ :param _content_type: force content-type for the request.
3008
+ :type _content_type: str, Optional
3009
+ :param _headers: set to override the headers for a single
3010
+ request; this effectively ignores the headers
3011
+ in the spec for a single request.
3012
+ :type _headers: dict, optional
3013
+ :param _host_index: set to override the host_index for a single
3014
+ request; this effectively ignores the host_index
3015
+ in the spec for a single request.
3016
+ :type _host_index: int, optional
3017
+ :return: Returns the result object.
3018
+ """ # noqa: E501
3019
+
3020
+ _param = self._sparql_endpoint_serialize(
3021
+ username=username,
3022
+ dataset=dataset,
3023
+ body=body,
3024
+ query=query,
3025
+ update=update,
3026
+ accept=accept,
3027
+ timeout=timeout,
3028
+ content_type=content_type,
3029
+ q_answer_api_key=q_answer_api_key,
3030
+ _request_auth=_request_auth,
3031
+ _content_type=_content_type,
3032
+ _headers=_headers,
3033
+ _host_index=_host_index
3034
+ )
3035
+
3036
+ _response_types_map: Dict[str, Optional[str]] = {
3037
+ '200': None,
3038
+ }
3039
+ response_data = self.api_client.call_api(
3040
+ *_param,
3041
+ _request_timeout=_request_timeout
3042
+ )
3043
+ return response_data.response
3044
+
3045
+
3046
+ def _sparql_endpoint_serialize(
3047
+ self,
3048
+ username,
3049
+ dataset,
3050
+ body,
3051
+ query,
3052
+ update,
3053
+ accept,
3054
+ timeout,
3055
+ content_type,
3056
+ q_answer_api_key,
3057
+ _request_auth,
3058
+ _content_type,
3059
+ _headers,
3060
+ _host_index,
3061
+ ) -> RequestSerialized:
3062
+
3063
+ _host = None
3064
+
3065
+ _collection_formats: Dict[str, str] = {
3066
+ 'accept': 'csv',
3067
+ }
3068
+
3069
+ _path_params: Dict[str, str] = {}
3070
+ _query_params: List[Tuple[str, str]] = []
3071
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3072
+ _form_params: List[Tuple[str, str]] = []
3073
+ _files: Dict[
3074
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3075
+ ] = {}
3076
+ _body_params: Optional[bytes] = None
3077
+
3078
+ # process the path parameters
3079
+ if username is not None:
3080
+ _path_params['username'] = username
3081
+ if dataset is not None:
3082
+ _path_params['dataset'] = dataset
3083
+ # process the query parameters
3084
+ if query is not None:
3085
+
3086
+ _query_params.append(('query', query))
3087
+
3088
+ if update is not None:
3089
+
3090
+ _query_params.append(('update', update))
3091
+
3092
+ if body is not None:
3093
+
3094
+ _query_params.append(('body', body))
3095
+
3096
+ # process the header parameters
3097
+ if accept is not None:
3098
+ _header_params['accept'] = accept
3099
+ if timeout is not None:
3100
+ _header_params['timeout'] = timeout
3101
+ if content_type is not None:
3102
+ _header_params['Content-Type'] = content_type
3103
+ if q_answer_api_key is not None:
3104
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
3105
+ # process the form parameters
3106
+ # process the body parameter
3107
+
3108
+
3109
+
3110
+
3111
+ # authentication setting
3112
+ _auth_settings: List[str] = [
3113
+ 'QAnswer-Api-Key',
3114
+ 'Bearer'
3115
+ ]
3116
+
3117
+ return self.api_client.param_serialize(
3118
+ method='GET',
3119
+ resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/sparql',
3120
+ path_params=_path_params,
3121
+ query_params=_query_params,
3122
+ header_params=_header_params,
3123
+ body=_body_params,
3124
+ post_params=_form_params,
3125
+ files=_files,
3126
+ auth_settings=_auth_settings,
3127
+ collection_formats=_collection_formats,
3128
+ _host=_host,
3129
+ _request_auth=_request_auth
3130
+ )
3131
+
3132
+
3133
+
3134
+
3135
+ @validate_call
3136
+ def sparql_endpoint1(
3137
+ self,
3138
+ username: StrictStr,
3139
+ dataset: StrictStr,
3140
+ query: Optional[StrictStr] = None,
3141
+ update: Optional[StrictStr] = None,
3142
+ accept: Optional[List[StrictStr]] = None,
3143
+ timeout: Optional[StrictInt] = None,
3144
+ content_type: Optional[StrictStr] = None,
3145
+ q_answer_api_key: Optional[StrictStr] = None,
3146
+ body: Optional[StrictStr] = None,
3147
+ _request_timeout: Union[
3148
+ None,
3149
+ Annotated[StrictFloat, Field(gt=0)],
3150
+ Tuple[
3151
+ Annotated[StrictFloat, Field(gt=0)],
3152
+ Annotated[StrictFloat, Field(gt=0)]
3153
+ ]
3154
+ ] = None,
3155
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3156
+ _content_type: Optional[StrictStr] = None,
3157
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3158
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3159
+ ) -> None:
3160
+ """SPARQL endpoint over a dataset
3161
+
3162
+
3163
+ :param username: (required)
3164
+ :type username: str
3165
+ :param dataset: (required)
3166
+ :type dataset: str
3167
+ :param query:
3168
+ :type query: str
3169
+ :param update:
3170
+ :type update: str
3171
+ :param accept:
3172
+ :type accept: List[str]
3173
+ :param timeout:
3174
+ :type timeout: int
3175
+ :param content_type:
3176
+ :type content_type: str
3177
+ :param q_answer_api_key:
3178
+ :type q_answer_api_key: str
3179
+ :param body:
3180
+ :type body: str
3181
+ :param _request_timeout: timeout setting for this request. If one
3182
+ number provided, it will be total request
3183
+ timeout. It can also be a pair (tuple) of
3184
+ (connection, read) timeouts.
3185
+ :type _request_timeout: int, tuple(int, int), optional
3186
+ :param _request_auth: set to override the auth_settings for an a single
3187
+ request; this effectively ignores the
3188
+ authentication in the spec for a single request.
3189
+ :type _request_auth: dict, optional
3190
+ :param _content_type: force content-type for the request.
3191
+ :type _content_type: str, Optional
3192
+ :param _headers: set to override the headers for a single
3193
+ request; this effectively ignores the headers
3194
+ in the spec for a single request.
3195
+ :type _headers: dict, optional
3196
+ :param _host_index: set to override the host_index for a single
3197
+ request; this effectively ignores the host_index
3198
+ in the spec for a single request.
3199
+ :type _host_index: int, optional
3200
+ :return: Returns the result object.
3201
+ """ # noqa: E501
3202
+
3203
+ _param = self._sparql_endpoint1_serialize(
3204
+ username=username,
3205
+ dataset=dataset,
3206
+ query=query,
3207
+ update=update,
3208
+ accept=accept,
3209
+ timeout=timeout,
3210
+ content_type=content_type,
3211
+ q_answer_api_key=q_answer_api_key,
3212
+ body=body,
3213
+ _request_auth=_request_auth,
3214
+ _content_type=_content_type,
3215
+ _headers=_headers,
3216
+ _host_index=_host_index
3217
+ )
3218
+
3219
+ _response_types_map: Dict[str, Optional[str]] = {
3220
+ '200': None,
3221
+ }
3222
+ response_data = self.api_client.call_api(
3223
+ *_param,
3224
+ _request_timeout=_request_timeout
3225
+ )
3226
+ response_data.read()
3227
+ return self.api_client.response_deserialize(
3228
+ response_data=response_data,
3229
+ response_types_map=_response_types_map,
3230
+ ).data
3231
+
3232
+
3233
+ @validate_call
3234
+ def sparql_endpoint1_with_http_info(
3235
+ self,
3236
+ username: StrictStr,
3237
+ dataset: StrictStr,
3238
+ query: Optional[StrictStr] = None,
3239
+ update: Optional[StrictStr] = None,
3240
+ accept: Optional[List[StrictStr]] = None,
3241
+ timeout: Optional[StrictInt] = None,
3242
+ content_type: Optional[StrictStr] = None,
3243
+ q_answer_api_key: Optional[StrictStr] = None,
3244
+ body: Optional[StrictStr] = None,
3245
+ _request_timeout: Union[
3246
+ None,
3247
+ Annotated[StrictFloat, Field(gt=0)],
3248
+ Tuple[
3249
+ Annotated[StrictFloat, Field(gt=0)],
3250
+ Annotated[StrictFloat, Field(gt=0)]
3251
+ ]
3252
+ ] = None,
3253
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3254
+ _content_type: Optional[StrictStr] = None,
3255
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3256
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3257
+ ) -> ApiResponse[None]:
3258
+ """SPARQL endpoint over a dataset
3259
+
3260
+
3261
+ :param username: (required)
3262
+ :type username: str
3263
+ :param dataset: (required)
3264
+ :type dataset: str
3265
+ :param query:
3266
+ :type query: str
3267
+ :param update:
3268
+ :type update: str
3269
+ :param accept:
3270
+ :type accept: List[str]
3271
+ :param timeout:
3272
+ :type timeout: int
3273
+ :param content_type:
3274
+ :type content_type: str
3275
+ :param q_answer_api_key:
3276
+ :type q_answer_api_key: str
3277
+ :param body:
3278
+ :type body: str
3279
+ :param _request_timeout: timeout setting for this request. If one
3280
+ number provided, it will be total request
3281
+ timeout. It can also be a pair (tuple) of
3282
+ (connection, read) timeouts.
3283
+ :type _request_timeout: int, tuple(int, int), optional
3284
+ :param _request_auth: set to override the auth_settings for an a single
3285
+ request; this effectively ignores the
3286
+ authentication in the spec for a single request.
3287
+ :type _request_auth: dict, optional
3288
+ :param _content_type: force content-type for the request.
3289
+ :type _content_type: str, Optional
3290
+ :param _headers: set to override the headers for a single
3291
+ request; this effectively ignores the headers
3292
+ in the spec for a single request.
3293
+ :type _headers: dict, optional
3294
+ :param _host_index: set to override the host_index for a single
3295
+ request; this effectively ignores the host_index
3296
+ in the spec for a single request.
3297
+ :type _host_index: int, optional
3298
+ :return: Returns the result object.
3299
+ """ # noqa: E501
3300
+
3301
+ _param = self._sparql_endpoint1_serialize(
3302
+ username=username,
3303
+ dataset=dataset,
3304
+ query=query,
3305
+ update=update,
3306
+ accept=accept,
3307
+ timeout=timeout,
3308
+ content_type=content_type,
3309
+ q_answer_api_key=q_answer_api_key,
3310
+ body=body,
3311
+ _request_auth=_request_auth,
3312
+ _content_type=_content_type,
3313
+ _headers=_headers,
3314
+ _host_index=_host_index
3315
+ )
3316
+
3317
+ _response_types_map: Dict[str, Optional[str]] = {
3318
+ '200': None,
3319
+ }
3320
+ response_data = self.api_client.call_api(
3321
+ *_param,
3322
+ _request_timeout=_request_timeout
3323
+ )
3324
+ response_data.read()
3325
+ return self.api_client.response_deserialize(
3326
+ response_data=response_data,
3327
+ response_types_map=_response_types_map,
3328
+ )
3329
+
3330
+
3331
+ @validate_call
3332
+ def sparql_endpoint1_without_preload_content(
3333
+ self,
3334
+ username: StrictStr,
3335
+ dataset: StrictStr,
3336
+ query: Optional[StrictStr] = None,
3337
+ update: Optional[StrictStr] = None,
3338
+ accept: Optional[List[StrictStr]] = None,
3339
+ timeout: Optional[StrictInt] = None,
3340
+ content_type: Optional[StrictStr] = None,
3341
+ q_answer_api_key: Optional[StrictStr] = None,
3342
+ body: Optional[StrictStr] = None,
3343
+ _request_timeout: Union[
3344
+ None,
3345
+ Annotated[StrictFloat, Field(gt=0)],
3346
+ Tuple[
3347
+ Annotated[StrictFloat, Field(gt=0)],
3348
+ Annotated[StrictFloat, Field(gt=0)]
3349
+ ]
3350
+ ] = None,
3351
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3352
+ _content_type: Optional[StrictStr] = None,
3353
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3354
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3355
+ ) -> RESTResponseType:
3356
+ """SPARQL endpoint over a dataset
3357
+
3358
+
3359
+ :param username: (required)
3360
+ :type username: str
3361
+ :param dataset: (required)
3362
+ :type dataset: str
3363
+ :param query:
3364
+ :type query: str
3365
+ :param update:
3366
+ :type update: str
3367
+ :param accept:
3368
+ :type accept: List[str]
3369
+ :param timeout:
3370
+ :type timeout: int
3371
+ :param content_type:
3372
+ :type content_type: str
3373
+ :param q_answer_api_key:
3374
+ :type q_answer_api_key: str
3375
+ :param body:
3376
+ :type body: str
3377
+ :param _request_timeout: timeout setting for this request. If one
3378
+ number provided, it will be total request
3379
+ timeout. It can also be a pair (tuple) of
3380
+ (connection, read) timeouts.
3381
+ :type _request_timeout: int, tuple(int, int), optional
3382
+ :param _request_auth: set to override the auth_settings for an a single
3383
+ request; this effectively ignores the
3384
+ authentication in the spec for a single request.
3385
+ :type _request_auth: dict, optional
3386
+ :param _content_type: force content-type for the request.
3387
+ :type _content_type: str, Optional
3388
+ :param _headers: set to override the headers for a single
3389
+ request; this effectively ignores the headers
3390
+ in the spec for a single request.
3391
+ :type _headers: dict, optional
3392
+ :param _host_index: set to override the host_index for a single
3393
+ request; this effectively ignores the host_index
3394
+ in the spec for a single request.
3395
+ :type _host_index: int, optional
3396
+ :return: Returns the result object.
3397
+ """ # noqa: E501
3398
+
3399
+ _param = self._sparql_endpoint1_serialize(
3400
+ username=username,
3401
+ dataset=dataset,
3402
+ query=query,
3403
+ update=update,
3404
+ accept=accept,
3405
+ timeout=timeout,
3406
+ content_type=content_type,
3407
+ q_answer_api_key=q_answer_api_key,
3408
+ body=body,
3409
+ _request_auth=_request_auth,
3410
+ _content_type=_content_type,
3411
+ _headers=_headers,
3412
+ _host_index=_host_index
3413
+ )
3414
+
3415
+ _response_types_map: Dict[str, Optional[str]] = {
3416
+ '200': None,
3417
+ }
3418
+ response_data = self.api_client.call_api(
3419
+ *_param,
3420
+ _request_timeout=_request_timeout
3421
+ )
3422
+ return response_data.response
3423
+
3424
+
3425
+ def _sparql_endpoint1_serialize(
3426
+ self,
3427
+ username,
3428
+ dataset,
3429
+ query,
3430
+ update,
3431
+ accept,
3432
+ timeout,
3433
+ content_type,
3434
+ q_answer_api_key,
3435
+ body,
3436
+ _request_auth,
3437
+ _content_type,
3438
+ _headers,
3439
+ _host_index,
3440
+ ) -> RequestSerialized:
3441
+
3442
+ _host = None
3443
+
3444
+ _collection_formats: Dict[str, str] = {
3445
+ 'accept': 'csv',
3446
+ }
3447
+
3448
+ _path_params: Dict[str, str] = {}
3449
+ _query_params: List[Tuple[str, str]] = []
3450
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3451
+ _form_params: List[Tuple[str, str]] = []
3452
+ _files: Dict[
3453
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3454
+ ] = {}
3455
+ _body_params: Optional[bytes] = None
3456
+
3457
+ # process the path parameters
3458
+ if username is not None:
3459
+ _path_params['username'] = username
3460
+ if dataset is not None:
3461
+ _path_params['dataset'] = dataset
3462
+ # process the query parameters
3463
+ if query is not None:
3464
+
3465
+ _query_params.append(('query', query))
3466
+
3467
+ if update is not None:
3468
+
3469
+ _query_params.append(('update', update))
3470
+
3471
+ # process the header parameters
3472
+ if accept is not None:
3473
+ _header_params['accept'] = accept
3474
+ if timeout is not None:
3475
+ _header_params['timeout'] = timeout
3476
+ if content_type is not None:
3477
+ _header_params['Content-Type'] = content_type
3478
+ if q_answer_api_key is not None:
3479
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
3480
+ # process the form parameters
3481
+ # process the body parameter
3482
+ if body is not None:
3483
+ _body_params = body
3484
+
3485
+
3486
+
3487
+ # set the HTTP header `Content-Type`
3488
+ if _content_type:
3489
+ _header_params['Content-Type'] = _content_type
3490
+ else:
3491
+ _default_content_type = (
3492
+ self.api_client.select_header_content_type(
3493
+ [
3494
+ 'application/json'
3495
+ ]
3496
+ )
3497
+ )
3498
+ if _default_content_type is not None:
3499
+ _header_params['Content-Type'] = _default_content_type
3500
+
3501
+ # authentication setting
3502
+ _auth_settings: List[str] = [
3503
+ 'QAnswer-Api-Key',
3504
+ 'Bearer'
3505
+ ]
3506
+
3507
+ return self.api_client.param_serialize(
3508
+ method='POST',
3509
+ resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/sparql',
3510
+ path_params=_path_params,
3511
+ query_params=_query_params,
3512
+ header_params=_header_params,
3513
+ body=_body_params,
3514
+ post_params=_form_params,
3515
+ files=_files,
3516
+ auth_settings=_auth_settings,
3517
+ collection_formats=_collection_formats,
3518
+ _host=_host,
3519
+ _request_auth=_request_auth
3520
+ )
3521
+
3522
+