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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (618) hide show
  1. qanswer_sdk/__init__.py +1256 -0
  2. qanswer_sdk/api/__init__.py +63 -0
  3. qanswer_sdk/api/admin_api.py +7893 -0
  4. qanswer_sdk/api/ai_assistant_access_rights_api.py +5881 -0
  5. qanswer_sdk/api/ai_assistant_api.py +11047 -0
  6. qanswer_sdk/api/anthropic_compatible_api.py +311 -0
  7. qanswer_sdk/api/auto_complete_api.py +612 -0
  8. qanswer_sdk/api/bot_slack_api.py +1015 -0
  9. qanswer_sdk/api/branding_api.py +5733 -0
  10. qanswer_sdk/api/bulk_reindex_api.py +2029 -0
  11. qanswer_sdk/api/chatbot_api.py +1102 -0
  12. qanswer_sdk/api/connector_audio_api.py +3469 -0
  13. qanswer_sdk/api/connector_document_api.py +2685 -0
  14. qanswer_sdk/api/connector_e_consilium_api.py +333 -0
  15. qanswer_sdk/api/connector_e_consilium_search_index_api_api.py +1231 -0
  16. qanswer_sdk/api/connector_google_drive_api.py +2175 -0
  17. qanswer_sdk/api/connector_imapapi_api.py +1866 -0
  18. qanswer_sdk/api/connector_one_drive_api.py +1579 -0
  19. qanswer_sdk/api/connector_onenote_api.py +1596 -0
  20. qanswer_sdk/api/connector_pinecone_api.py +893 -0
  21. qanswer_sdk/api/connector_publication_office_api_api.py +1230 -0
  22. qanswer_sdk/api/connector_qn_a_api.py +1521 -0
  23. qanswer_sdk/api/connector_rdf_answer_api.py +1454 -0
  24. qanswer_sdk/api/connector_rdf_api.py +5090 -0
  25. qanswer_sdk/api/connector_sharepoint_api.py +3926 -0
  26. qanswer_sdk/api/connector_websearch_api.py +332 -0
  27. qanswer_sdk/api/connector_website_api.py +3108 -0
  28. qanswer_sdk/api/connector_x_wiki_api_api.py +1278 -0
  29. qanswer_sdk/api/connectors_api.py +6946 -0
  30. qanswer_sdk/api/connectors_data_api.py +5903 -0
  31. qanswer_sdk/api/conversation_logs_api.py +14228 -0
  32. qanswer_sdk/api/dataset_config_api.py +4016 -0
  33. qanswer_sdk/api/debug_api.py +278 -0
  34. qanswer_sdk/api/default_api.py +763 -0
  35. qanswer_sdk/api/frontend_config_api.py +270 -0
  36. qanswer_sdk/api/health_check_api_api.py +278 -0
  37. qanswer_sdk/api/mcp_api.py +10758 -0
  38. qanswer_sdk/api/metadata_api.py +1309 -0
  39. qanswer_sdk/api/notifications_api.py +1842 -0
  40. qanswer_sdk/api/o_auth2_api.py +648 -0
  41. qanswer_sdk/api/open_ai_compatible_api.py +1093 -0
  42. qanswer_sdk/api/payment_api.py +1854 -0
  43. qanswer_sdk/api/retention_policy_api.py +4404 -0
  44. qanswer_sdk/api/socket_api.py +4706 -0
  45. qanswer_sdk/api/speech_to_text_api.py +968 -0
  46. qanswer_sdk/api/task_ai_excel_api.py +3749 -0
  47. qanswer_sdk/api/task_chat_api.py +2079 -0
  48. qanswer_sdk/api/task_entity_linking_api.py +315 -0
  49. qanswer_sdk/api/task_rdf_linker_api.py +4407 -0
  50. qanswer_sdk/api/task_rdf_sparql_endpoint_api.py +3355 -0
  51. qanswer_sdk/api/task_rdf_text_linker_api.py +1513 -0
  52. qanswer_sdk/api/task_report_copilot_api.py +7355 -0
  53. qanswer_sdk/api/task_search_api.py +2142 -0
  54. qanswer_sdk/api/task_text2sparql_api.py +947 -0
  55. qanswer_sdk/api/task_text_classification_api.py +592 -0
  56. qanswer_sdk/api/tasks_api.py +26394 -0
  57. qanswer_sdk/api/tool_embedder_api.py +5532 -0
  58. qanswer_sdk/api/tool_llm_api.py +6364 -0
  59. qanswer_sdk/api/unit_organizations_api.py +8600 -0
  60. qanswer_sdk/api/unit_teams_api.py +4492 -0
  61. qanswer_sdk/api/unit_user_api.py +12759 -0
  62. qanswer_sdk/api_client.py +804 -0
  63. qanswer_sdk/api_response.py +21 -0
  64. qanswer_sdk/configuration.py +614 -0
  65. qanswer_sdk/exceptions.py +216 -0
  66. qanswer_sdk/models/__init__.py +562 -0
  67. qanswer_sdk/models/access_audio_spans_response_model.py +91 -0
  68. qanswer_sdk/models/access_pdf_payload_model.py +102 -0
  69. qanswer_sdk/models/access_type.py +42 -0
  70. qanswer_sdk/models/access_type_shared.py +38 -0
  71. qanswer_sdk/models/add_qn_a_request.py +103 -0
  72. qanswer_sdk/models/add_synonyms.py +93 -0
  73. qanswer_sdk/models/add_synonyms_resp.py +89 -0
  74. qanswer_sdk/models/admin_overall_stats_response.py +105 -0
  75. qanswer_sdk/models/admin_user_overall_stats.py +99 -0
  76. qanswer_sdk/models/advanced_o_auth2_mcp_authentication_config.py +95 -0
  77. qanswer_sdk/models/aggregate.py +93 -0
  78. qanswer_sdk/models/aggregation.py +110 -0
  79. qanswer_sdk/models/aggregation_type.py +41 -0
  80. qanswer_sdk/models/aggregations_group.py +102 -0
  81. qanswer_sdk/models/ai_assistant_clone_response.py +91 -0
  82. qanswer_sdk/models/ai_assistant_dto.py +113 -0
  83. qanswer_sdk/models/ai_assistant_filter_dto.py +113 -0
  84. qanswer_sdk/models/ai_assistant_list.py +101 -0
  85. qanswer_sdk/models/ai_assistant_share_response.py +93 -0
  86. qanswer_sdk/models/ai_assistant_shared_access.py +95 -0
  87. qanswer_sdk/models/ai_excel_entity_result.py +97 -0
  88. qanswer_sdk/models/ai_excel_entity_search_payload.py +95 -0
  89. qanswer_sdk/models/ai_excel_entity_search_response.py +103 -0
  90. qanswer_sdk/models/ai_excel_global_settings.py +95 -0
  91. qanswer_sdk/models/ai_excel_global_settings_request.py +95 -0
  92. qanswer_sdk/models/ai_excel_task_settings.py +119 -0
  93. qanswer_sdk/models/ai_excel_task_update.py +119 -0
  94. qanswer_sdk/models/ai_excel_template_create.py +119 -0
  95. qanswer_sdk/models/ai_excel_template_read.py +121 -0
  96. qanswer_sdk/models/ai_excel_template_settings_request.py +91 -0
  97. qanswer_sdk/models/ai_excel_template_update.py +125 -0
  98. qanswer_sdk/models/ai_excel_templates_search_request.py +104 -0
  99. qanswer_sdk/models/ai_excel_templates_search_response.py +101 -0
  100. qanswer_sdk/models/allowed_extension.py +53 -0
  101. qanswer_sdk/models/allowed_file_extensions.py +88 -0
  102. qanswer_sdk/models/api_key_header_type.py +39 -0
  103. qanswer_sdk/models/api_key_mcp_authentication_config.py +98 -0
  104. qanswer_sdk/models/applied_filter_type.py +37 -0
  105. qanswer_sdk/models/applied_metadata_filter.py +97 -0
  106. qanswer_sdk/models/apply_template_task_settings_to_slots_response.py +89 -0
  107. qanswer_sdk/models/assistant_category_color_definition.py +89 -0
  108. qanswer_sdk/models/assistant_category_color_item.py +89 -0
  109. qanswer_sdk/models/assistant_category_colors_update_payload.py +95 -0
  110. qanswer_sdk/models/assistant_category_count.py +91 -0
  111. qanswer_sdk/models/assistant_message_stop.py +93 -0
  112. qanswer_sdk/models/assistant_retention_response.py +97 -0
  113. qanswer_sdk/models/assistant_task.py +43 -0
  114. qanswer_sdk/models/assistant_template_with_tools_selection_dto.py +123 -0
  115. qanswer_sdk/models/audio_allowed_file_extensions.py +87 -0
  116. qanswer_sdk/models/audio_format.py +37 -0
  117. qanswer_sdk/models/audio_segment.py +95 -0
  118. qanswer_sdk/models/audio_segment_update_payload.py +97 -0
  119. qanswer_sdk/models/audio_segment_update_response.py +91 -0
  120. qanswer_sdk/models/audio_speaker_update_payload.py +99 -0
  121. qanswer_sdk/models/audio_speaker_update_response.py +91 -0
  122. qanswer_sdk/models/audio_transcription_list_response.py +101 -0
  123. qanswer_sdk/models/audio_transcription_mode.py +37 -0
  124. qanswer_sdk/models/audio_transcription_record.py +101 -0
  125. qanswer_sdk/models/audio_transcription_status.py +39 -0
  126. qanswer_sdk/models/audio_upload_response.py +91 -0
  127. qanswer_sdk/models/audio_word_segment.py +93 -0
  128. qanswer_sdk/models/audio_word_span_change.py +94 -0
  129. qanswer_sdk/models/audio_word_span_update_payload.py +104 -0
  130. qanswer_sdk/models/audio_word_span_update_response.py +91 -0
  131. qanswer_sdk/models/audio_word_update_payload.py +100 -0
  132. qanswer_sdk/models/audio_word_update_response.py +91 -0
  133. qanswer_sdk/models/auth_link_response.py +91 -0
  134. qanswer_sdk/models/auto_bot_description_request.py +89 -0
  135. qanswer_sdk/models/auto_bot_description_response.py +87 -0
  136. qanswer_sdk/models/available_aggregation.py +92 -0
  137. qanswer_sdk/models/available_connectors_response.py +92 -0
  138. qanswer_sdk/models/available_logs_visibility_policy.py +91 -0
  139. qanswer_sdk/models/available_space_quota_for_dataset.py +95 -0
  140. qanswer_sdk/models/available_storage_preference.py +91 -0
  141. qanswer_sdk/models/base_connectors_response.py +89 -0
  142. qanswer_sdk/models/base_conversation_response.py +89 -0
  143. qanswer_sdk/models/base_feedback_response.py +89 -0
  144. qanswer_sdk/models/bot_answer_length.py +38 -0
  145. qanswer_sdk/models/branding_app_title.py +87 -0
  146. qanswer_sdk/models/branding_system_message.py +87 -0
  147. qanswer_sdk/models/bulk_reindex_counts_by_type.py +89 -0
  148. qanswer_sdk/models/bulk_reindex_item_status.py +41 -0
  149. qanswer_sdk/models/bulk_reindex_job_detail_dto.py +103 -0
  150. qanswer_sdk/models/bulk_reindex_job_dto.py +125 -0
  151. qanswer_sdk/models/bulk_reindex_job_item_dto.py +113 -0
  152. qanswer_sdk/models/bulk_reindex_job_item_sort_by.py +40 -0
  153. qanswer_sdk/models/bulk_reindex_job_status.py +41 -0
  154. qanswer_sdk/models/bulk_reindex_jobs_list_response.py +97 -0
  155. qanswer_sdk/models/bulk_reindex_preview_counts.py +99 -0
  156. qanswer_sdk/models/bulk_reindex_preview_request.py +91 -0
  157. qanswer_sdk/models/bulk_reindex_preview_response.py +102 -0
  158. qanswer_sdk/models/bulk_reindex_skip_reason.py +40 -0
  159. qanswer_sdk/models/bulk_reindex_sort_order.py +37 -0
  160. qanswer_sdk/models/bulk_reindex_submit_request.py +94 -0
  161. qanswer_sdk/models/bulk_update_tool_selections_request.py +87 -0
  162. qanswer_sdk/models/capability_type.py +37 -0
  163. qanswer_sdk/models/cell.py +89 -0
  164. qanswer_sdk/models/change_password.py +89 -0
  165. qanswer_sdk/models/change_password_admin.py +89 -0
  166. qanswer_sdk/models/change_role.py +90 -0
  167. qanswer_sdk/models/chat_task_settings.py +141 -0
  168. qanswer_sdk/models/chat_task_settings_update_payload.py +95 -0
  169. qanswer_sdk/models/chat_task_update.py +139 -0
  170. qanswer_sdk/models/chatbot_chat_payload.py +150 -0
  171. qanswer_sdk/models/chatbot_default_settings_response.py +95 -0
  172. qanswer_sdk/models/chatbot_llm_dto.py +120 -0
  173. qanswer_sdk/models/chatbot_response.py +143 -0
  174. qanswer_sdk/models/chatbot_setting_dto.py +99 -0
  175. qanswer_sdk/models/chatbot_setting_request.py +91 -0
  176. qanswer_sdk/models/class_info.py +89 -0
  177. qanswer_sdk/models/config.py +228 -0
  178. qanswer_sdk/models/config1.py +138 -0
  179. qanswer_sdk/models/connector_config_list_response.py +99 -0
  180. qanswer_sdk/models/connector_config_model.py +96 -0
  181. qanswer_sdk/models/connector_config_patch_payload.py +93 -0
  182. qanswer_sdk/models/connector_config_response.py +95 -0
  183. qanswer_sdk/models/connector_config_sync_response.py +93 -0
  184. qanswer_sdk/models/connector_config_type.py +37 -0
  185. qanswer_sdk/models/connector_model.py +114 -0
  186. qanswer_sdk/models/connector_type.py +51 -0
  187. qanswer_sdk/models/connector_type_dto.py +92 -0
  188. qanswer_sdk/models/connector_type_list_dto.py +95 -0
  189. qanswer_sdk/models/content_item.py +106 -0
  190. qanswer_sdk/models/content_item_type.py +39 -0
  191. qanswer_sdk/models/conversation_aggregations_request.py +107 -0
  192. qanswer_sdk/models/conversation_message.py +230 -0
  193. qanswer_sdk/models/conversation_message_error_key.py +52 -0
  194. qanswer_sdk/models/conversation_message_search_result.py +112 -0
  195. qanswer_sdk/models/conversation_model.py +144 -0
  196. qanswer_sdk/models/conversation_overall_stats.py +97 -0
  197. qanswer_sdk/models/conversation_overall_stats_response.py +95 -0
  198. qanswer_sdk/models/conversation_retention_response.py +91 -0
  199. qanswer_sdk/models/conversation_statistics.py +95 -0
  200. qanswer_sdk/models/conversation_update.py +93 -0
  201. qanswer_sdk/models/conversation_users_stats.py +99 -0
  202. qanswer_sdk/models/conversation_users_stats_response.py +99 -0
  203. qanswer_sdk/models/coordinates.py +89 -0
  204. qanswer_sdk/models/cost_summary_dto.py +99 -0
  205. qanswer_sdk/models/create_connector_request.py +95 -0
  206. qanswer_sdk/models/create_connector_response.py +95 -0
  207. qanswer_sdk/models/create_imap_connector_request.py +105 -0
  208. qanswer_sdk/models/create_pinecone_connector_request.py +97 -0
  209. qanswer_sdk/models/create_sharepoint_connector_from_certificate_request.py +105 -0
  210. qanswer_sdk/models/create_sharepoint_connector_request.py +103 -0
  211. qanswer_sdk/models/create_x_wiki_connector_request.py +103 -0
  212. qanswer_sdk/models/credits_info_dto.py +95 -0
  213. qanswer_sdk/models/credits_info_global_dto.py +97 -0
  214. qanswer_sdk/models/currency.py +38 -0
  215. qanswer_sdk/models/data.py +211 -0
  216. qanswer_sdk/models/data_filling_mode.py +39 -0
  217. qanswer_sdk/models/data_storage_preference.py +38 -0
  218. qanswer_sdk/models/dataset_config_request.py +138 -0
  219. qanswer_sdk/models/dataset_default_values_model.py +129 -0
  220. qanswer_sdk/models/dataset_detail.py +128 -0
  221. qanswer_sdk/models/dataset_detail_kg.py +88 -0
  222. qanswer_sdk/models/dataset_schema.py +193 -0
  223. qanswer_sdk/models/dataset_type.py +38 -0
  224. qanswer_sdk/models/dataset_update_object.py +185 -0
  225. qanswer_sdk/models/dataset_users_response.py +87 -0
  226. qanswer_sdk/models/default_prompt.py +100 -0
  227. qanswer_sdk/models/delete_connector_model.py +90 -0
  228. qanswer_sdk/models/delete_connector_request.py +99 -0
  229. qanswer_sdk/models/delete_connectors_response.py +89 -0
  230. qanswer_sdk/models/delete_files_status_response.py +91 -0
  231. qanswer_sdk/models/delete_index.py +91 -0
  232. qanswer_sdk/models/delete_index_resp.py +89 -0
  233. qanswer_sdk/models/delete_qn_a_pair_request.py +95 -0
  234. qanswer_sdk/models/delete_qn_a_pair_response.py +89 -0
  235. qanswer_sdk/models/delete_synonym.py +93 -0
  236. qanswer_sdk/models/delete_synonym_resp.py +89 -0
  237. qanswer_sdk/models/delete_synonyms.py +91 -0
  238. qanswer_sdk/models/diarization_queue_status.py +99 -0
  239. qanswer_sdk/models/document_content_response.py +91 -0
  240. qanswer_sdk/models/document_content_update_model.py +99 -0
  241. qanswer_sdk/models/document_file_delete_by_connector_model.py +101 -0
  242. qanswer_sdk/models/document_file_delete_by_id_model.py +91 -0
  243. qanswer_sdk/models/document_parsing_task_settings.py +124 -0
  244. qanswer_sdk/models/document_parsing_task_settings_update_payload.py +95 -0
  245. qanswer_sdk/models/document_parsing_task_update.py +121 -0
  246. qanswer_sdk/models/document_status_group.py +39 -0
  247. qanswer_sdk/models/document_status_response.py +89 -0
  248. qanswer_sdk/models/dummy_error.py +89 -0
  249. qanswer_sdk/models/duplicate_ai_excel_template_request.py +97 -0
  250. qanswer_sdk/models/duplicate_ai_excel_template_response.py +87 -0
  251. qanswer_sdk/models/duplicate_report_template_payload.py +97 -0
  252. qanswer_sdk/models/duplicate_report_template_response.py +87 -0
  253. qanswer_sdk/models/e_consilium_connector_config.py +108 -0
  254. qanswer_sdk/models/e_consilium_search_index_search_response.py +113 -0
  255. qanswer_sdk/models/econsilium_file_metadata.py +105 -0
  256. qanswer_sdk/models/econsilium_search_index_add_payload.py +107 -0
  257. qanswer_sdk/models/econsilium_search_index_additional_fields.py +103 -0
  258. qanswer_sdk/models/effective_retention_dto.py +95 -0
  259. qanswer_sdk/models/email_folder.py +91 -0
  260. qanswer_sdk/models/email_request.py +87 -0
  261. qanswer_sdk/models/embedder_cost_filter.py +112 -0
  262. qanswer_sdk/models/embedder_cost_list.py +101 -0
  263. qanswer_sdk/models/embedder_create_dto.py +143 -0
  264. qanswer_sdk/models/embedder_detailed_dto.py +163 -0
  265. qanswer_sdk/models/embedder_dto.py +103 -0
  266. qanswer_sdk/models/embedder_list_dto.py +101 -0
  267. qanswer_sdk/models/embedder_ref.py +95 -0
  268. qanswer_sdk/models/embedder_update_dto.py +135 -0
  269. qanswer_sdk/models/embedding_endpoint_import_failure.py +89 -0
  270. qanswer_sdk/models/embedding_endpoint_import_response.py +99 -0
  271. qanswer_sdk/models/embedding_endpoint_modality.py +37 -0
  272. qanswer_sdk/models/embedding_endpoint_validation_response.py +90 -0
  273. qanswer_sdk/models/embedding_provider.py +44 -0
  274. qanswer_sdk/models/enable_enhanced_context_payload.py +91 -0
  275. qanswer_sdk/models/enable_enhanced_context_response.py +87 -0
  276. qanswer_sdk/models/endpoint_status.py +38 -0
  277. qanswer_sdk/models/entity_description_dto.py +93 -0
  278. qanswer_sdk/models/entity_linking_payload.py +97 -0
  279. qanswer_sdk/models/entity_linking_response.py +97 -0
  280. qanswer_sdk/models/entity_model_in_linking.py +95 -0
  281. qanswer_sdk/models/es_meta_data.py +92 -0
  282. qanswer_sdk/models/es_meta_data_value.py +87 -0
  283. qanswer_sdk/models/evaluate_feedback_response.py +109 -0
  284. qanswer_sdk/models/evaluate_single_feedback_response.py +97 -0
  285. qanswer_sdk/models/extra_body.py +91 -0
  286. qanswer_sdk/models/extract_hyper_links_payload.py +100 -0
  287. qanswer_sdk/models/extract_robot_links_payload.py +88 -0
  288. qanswer_sdk/models/extract_robot_links_response.py +88 -0
  289. qanswer_sdk/models/extraction_strategy.py +38 -0
  290. qanswer_sdk/models/fact.py +96 -0
  291. qanswer_sdk/models/feedback_evaluation_history_entries_response.py +101 -0
  292. qanswer_sdk/models/feedback_evaluation_history_entry_model.py +105 -0
  293. qanswer_sdk/models/feedback_model.py +132 -0
  294. qanswer_sdk/models/feedback_response.py +95 -0
  295. qanswer_sdk/models/feedback_update.py +105 -0
  296. qanswer_sdk/models/file_acl_principal.py +99 -0
  297. qanswer_sdk/models/file_acl_response.py +101 -0
  298. qanswer_sdk/models/file_es_meta_data.py +116 -0
  299. qanswer_sdk/models/file_failure_reason.py +49 -0
  300. qanswer_sdk/models/file_folder_model.py +117 -0
  301. qanswer_sdk/models/file_model.py +124 -0
  302. qanswer_sdk/models/file_status.py +43 -0
  303. qanswer_sdk/models/file_type.py +37 -0
  304. qanswer_sdk/models/file_upload_payload.py +107 -0
  305. qanswer_sdk/models/files_by_connector_model.py +89 -0
  306. qanswer_sdk/models/g_drive_connector_info.py +96 -0
  307. qanswer_sdk/models/g_drive_download_by_ids.py +89 -0
  308. qanswer_sdk/models/g_drive_download_request.py +103 -0
  309. qanswer_sdk/models/g_drive_refresh_request.py +91 -0
  310. qanswer_sdk/models/generation_params.py +89 -0
  311. qanswer_sdk/models/get_connector_by_id_response.py +91 -0
  312. qanswer_sdk/models/get_conversation_response.py +95 -0
  313. qanswer_sdk/models/global_config_dto.py +155 -0
  314. qanswer_sdk/models/google_drive_connector_config.py +110 -0
  315. qanswer_sdk/models/guardrail_endpoint.py +112 -0
  316. qanswer_sdk/models/guardrail_mode.py +38 -0
  317. qanswer_sdk/models/highlight_audio_payload_model.py +100 -0
  318. qanswer_sdk/models/http_validation_error.py +95 -0
  319. qanswer_sdk/models/iframe_strategy.py +38 -0
  320. qanswer_sdk/models/image_url_detail.py +38 -0
  321. qanswer_sdk/models/imap_add_payload.py +105 -0
  322. qanswer_sdk/models/imap_additional_fields.py +101 -0
  323. qanswer_sdk/models/imap_file_metadata.py +108 -0
  324. qanswer_sdk/models/imap_search_response.py +113 -0
  325. qanswer_sdk/models/index_config.py +89 -0
  326. qanswer_sdk/models/install_response.py +89 -0
  327. qanswer_sdk/models/interface_origin.py +47 -0
  328. qanswer_sdk/models/ip2_geo_response.py +91 -0
  329. qanswer_sdk/models/is_enabled_response.py +87 -0
  330. qanswer_sdk/models/jwt_authentication_response.py +93 -0
  331. qanswer_sdk/models/label.py +89 -0
  332. qanswer_sdk/models/labeled_node.py +89 -0
  333. qanswer_sdk/models/language.py +38 -0
  334. qanswer_sdk/models/last_updated_template_conversation_id_response.py +87 -0
  335. qanswer_sdk/models/link.py +99 -0
  336. qanswer_sdk/models/link_extraction_response.py +97 -0
  337. qanswer_sdk/models/link_result_paginated.py +97 -0
  338. qanswer_sdk/models/linked_entity_model_in_linking.py +99 -0
  339. qanswer_sdk/models/linker.py +103 -0
  340. qanswer_sdk/models/linking_result.py +95 -0
  341. qanswer_sdk/models/links.py +99 -0
  342. qanswer_sdk/models/list_connectors_response.py +95 -0
  343. qanswer_sdk/models/list_conversation_response.py +105 -0
  344. qanswer_sdk/models/list_feedback_response.py +105 -0
  345. qanswer_sdk/models/list_files_connector_response.py +107 -0
  346. qanswer_sdk/models/list_socket_events.py +88 -0
  347. qanswer_sdk/models/list_synonyms_model.py +95 -0
  348. qanswer_sdk/models/llm_context_ranges.py +93 -0
  349. qanswer_sdk/models/llm_cost_filter.py +112 -0
  350. qanswer_sdk/models/llm_cost_list.py +101 -0
  351. qanswer_sdk/models/llm_create_dto.py +177 -0
  352. qanswer_sdk/models/llm_detailed_dto.py +198 -0
  353. qanswer_sdk/models/llm_dto.py +120 -0
  354. qanswer_sdk/models/llm_endpoint.py +179 -0
  355. qanswer_sdk/models/llm_endpoint_default_prompts.py +93 -0
  356. qanswer_sdk/models/llm_endpoint_import_failure.py +89 -0
  357. qanswer_sdk/models/llm_endpoint_import_response.py +99 -0
  358. qanswer_sdk/models/llm_endpoint_modality.py +37 -0
  359. qanswer_sdk/models/llm_endpoint_provider.py +44 -0
  360. qanswer_sdk/models/llm_endpoint_read.py +179 -0
  361. qanswer_sdk/models/llm_endpoint_validation_response.py +90 -0
  362. qanswer_sdk/models/llm_health_response.py +89 -0
  363. qanswer_sdk/models/llm_list_detailed_dto.py +101 -0
  364. qanswer_sdk/models/llm_list_dto.py +101 -0
  365. qanswer_sdk/models/llm_update_dto.py +174 -0
  366. qanswer_sdk/models/location_details.py +97 -0
  367. qanswer_sdk/models/log_stats_request.py +100 -0
  368. qanswer_sdk/models/login_request.py +89 -0
  369. qanswer_sdk/models/logs_visibility_policy.py +38 -0
  370. qanswer_sdk/models/logs_visibility_policy_payload.py +92 -0
  371. qanswer_sdk/models/logs_visibility_policy_response.py +92 -0
  372. qanswer_sdk/models/mcp_auth_field_definition.py +98 -0
  373. qanswer_sdk/models/mcp_auth_field_type.py +37 -0
  374. qanswer_sdk/models/mcp_authentication_type.py +39 -0
  375. qanswer_sdk/models/mcp_connection.py +108 -0
  376. qanswer_sdk/models/mcp_connection_create.py +100 -0
  377. qanswer_sdk/models/mcp_server.py +146 -0
  378. qanswer_sdk/models/mcp_server_create.py +116 -0
  379. qanswer_sdk/models/mcp_server_type.py +37 -0
  380. qanswer_sdk/models/mcp_server_update.py +114 -0
  381. qanswer_sdk/models/mcp_tool_dto.py +131 -0
  382. qanswer_sdk/models/mcp_tool_info.py +95 -0
  383. qanswer_sdk/models/mcp_tool_selection_source.py +37 -0
  384. qanswer_sdk/models/mcp_tool_sync_action.py +39 -0
  385. qanswer_sdk/models/mcp_tool_sync_diff.py +94 -0
  386. qanswer_sdk/models/mcp_tool_sync_preview.py +95 -0
  387. qanswer_sdk/models/mcp_tool_update.py +91 -0
  388. qanswer_sdk/models/mcp_transport.py +37 -0
  389. qanswer_sdk/models/mcp_visibility.py +38 -0
  390. qanswer_sdk/models/mcpo_auth2_authorize_body.py +105 -0
  391. qanswer_sdk/models/mcpo_auth2_initiating_origin.py +42 -0
  392. qanswer_sdk/models/message_role.py +38 -0
  393. qanswer_sdk/models/messages_stats_per_day_response.py +99 -0
  394. qanswer_sdk/models/microsoft_connector_config.py +110 -0
  395. qanswer_sdk/models/modify_connector_request.py +98 -0
  396. qanswer_sdk/models/modify_file_display_name_request.py +97 -0
  397. qanswer_sdk/models/notification_dto.py +114 -0
  398. qanswer_sdk/models/notification_filter.py +107 -0
  399. qanswer_sdk/models/notification_list_dto.py +101 -0
  400. qanswer_sdk/models/notification_payload_add_to_org_dto.py +87 -0
  401. qanswer_sdk/models/notification_payload_add_to_team_dto.py +89 -0
  402. qanswer_sdk/models/notification_payload_ai_assistant_shared_dto.py +100 -0
  403. qanswer_sdk/models/notification_payload_conversation_shared_dto.py +96 -0
  404. qanswer_sdk/models/notification_payload_human_takeover_requested_dto.py +89 -0
  405. qanswer_sdk/models/notification_payload_quota_reaching_dto.py +91 -0
  406. qanswer_sdk/models/notification_read_dto.py +89 -0
  407. qanswer_sdk/models/notification_type.py +44 -0
  408. qanswer_sdk/models/o_auth_redirect_response.py +89 -0
  409. qanswer_sdk/models/o_auth_service_dto.py +89 -0
  410. qanswer_sdk/models/one_drive_download_by_ids.py +89 -0
  411. qanswer_sdk/models/one_drive_download_request.py +103 -0
  412. qanswer_sdk/models/one_note_download_by_ids.py +91 -0
  413. qanswer_sdk/models/one_note_download_request.py +103 -0
  414. qanswer_sdk/models/org_llm_detailed_dto.py +105 -0
  415. qanswer_sdk/models/org_llm_features_dto.py +89 -0
  416. qanswer_sdk/models/org_role.py +37 -0
  417. qanswer_sdk/models/org_user_profile_dto.py +210 -0
  418. qanswer_sdk/models/org_user_profile_list_dto.py +101 -0
  419. qanswer_sdk/models/organization_admin_dto.py +97 -0
  420. qanswer_sdk/models/organization_creation_dto.py +91 -0
  421. qanswer_sdk/models/organization_dto.py +93 -0
  422. qanswer_sdk/models/organization_list_dto.py +101 -0
  423. qanswer_sdk/models/organization_user_dto.py +101 -0
  424. qanswer_sdk/models/organization_user_list_dto.py +101 -0
  425. qanswer_sdk/models/paginated_report_templates.py +101 -0
  426. qanswer_sdk/models/password.py +89 -0
  427. qanswer_sdk/models/pinecone_index_model.py +91 -0
  428. qanswer_sdk/models/plan_dto.py +108 -0
  429. qanswer_sdk/models/predicted_class.py +89 -0
  430. qanswer_sdk/models/prepare_synonyms_upload_resp.py +99 -0
  431. qanswer_sdk/models/prepared_synonym_group.py +87 -0
  432. qanswer_sdk/models/pricing_plan.py +51 -0
  433. qanswer_sdk/models/pricing_type.py +38 -0
  434. qanswer_sdk/models/prompt_type.py +49 -0
  435. qanswer_sdk/models/provider.py +87 -0
  436. qanswer_sdk/models/publication_add_payload.py +105 -0
  437. qanswer_sdk/models/publication_file_metadata.py +105 -0
  438. qanswer_sdk/models/publication_office_additional_fields.py +111 -0
  439. qanswer_sdk/models/publication_office_connector_config.py +112 -0
  440. qanswer_sdk/models/publication_search_index_search_response.py +113 -0
  441. qanswer_sdk/models/qa_context.py +129 -0
  442. qanswer_sdk/models/qa_context_display_type.py +44 -0
  443. qanswer_sdk/models/qa_contexts.py +106 -0
  444. qanswer_sdk/models/qa_table.py +100 -0
  445. qanswer_sdk/models/qn_a_pair_model.py +103 -0
  446. qanswer_sdk/models/qn_a_pair_response.py +95 -0
  447. qanswer_sdk/models/rag_payload.py +185 -0
  448. qanswer_sdk/models/rag_response.py +147 -0
  449. qanswer_sdk/models/rdf_entity_linker_response.py +99 -0
  450. qanswer_sdk/models/rdf_linked_entity.py +97 -0
  451. qanswer_sdk/models/reasoning_effort.py +39 -0
  452. qanswer_sdk/models/reference_model.py +99 -0
  453. qanswer_sdk/models/refresh_frequency.py +39 -0
  454. qanswer_sdk/models/refresh_token_request.py +87 -0
  455. qanswer_sdk/models/refresh_website_connector_links_payload.py +96 -0
  456. qanswer_sdk/models/refresh_website_connector_payload.py +94 -0
  457. qanswer_sdk/models/register_pinecone_connector_request.py +95 -0
  458. qanswer_sdk/models/report_copilot_generation_from_slots_ack.py +91 -0
  459. qanswer_sdk/models/report_copilot_generation_from_slots_payload.py +95 -0
  460. qanswer_sdk/models/report_copilot_refinement_payload.py +106 -0
  461. qanswer_sdk/models/report_copilot_refinement_response.py +87 -0
  462. qanswer_sdk/models/report_copilot_slot_feedback_update.py +95 -0
  463. qanswer_sdk/models/report_copilot_slot_feedback_update_response.py +95 -0
  464. qanswer_sdk/models/report_copilot_slot_task_settings.py +121 -0
  465. qanswer_sdk/models/report_copilot_slot_task_settings_update.py +121 -0
  466. qanswer_sdk/models/report_copilot_task_settings.py +119 -0
  467. qanswer_sdk/models/report_copilot_task_settings_update_payload.py +95 -0
  468. qanswer_sdk/models/report_copilot_task_update.py +119 -0
  469. qanswer_sdk/models/report_template.py +155 -0
  470. qanswer_sdk/models/report_template_create_payload.py +132 -0
  471. qanswer_sdk/models/report_template_image_upload_response.py +87 -0
  472. qanswer_sdk/models/report_template_simplified.py +116 -0
  473. qanswer_sdk/models/report_template_simplified_payload.py +91 -0
  474. qanswer_sdk/models/report_template_task_settings_update_payload.py +91 -0
  475. qanswer_sdk/models/report_template_update_payload.py +136 -0
  476. qanswer_sdk/models/report_templates_search_payload.py +106 -0
  477. qanswer_sdk/models/reset_password.py +87 -0
  478. qanswer_sdk/models/response_audit_model.py +99 -0
  479. qanswer_sdk/models/response_audit_stats_response.py +101 -0
  480. qanswer_sdk/models/response_get_dummy_union_connector_config_model_api_connectors_config_dummy_models_union_get.py +228 -0
  481. qanswer_sdk/models/retention_policy_dto.py +106 -0
  482. qanswer_sdk/models/retention_policy_update.py +101 -0
  483. qanswer_sdk/models/retention_preview_response.py +92 -0
  484. qanswer_sdk/models/retention_run_progress_event.py +98 -0
  485. qanswer_sdk/models/retention_run_status_response.py +91 -0
  486. qanswer_sdk/models/retention_scope_type.py +38 -0
  487. qanswer_sdk/models/retention_sweep_result.py +89 -0
  488. qanswer_sdk/models/retention_unit.py +38 -0
  489. qanswer_sdk/models/retreive_all_synonyms_resp.py +99 -0
  490. qanswer_sdk/models/retry_params.py +89 -0
  491. qanswer_sdk/models/return_type.py +38 -0
  492. qanswer_sdk/models/role.py +90 -0
  493. qanswer_sdk/models/role_name.py +37 -0
  494. qanswer_sdk/models/scrolling_strategy.py +37 -0
  495. qanswer_sdk/models/search_conversation_messages_response.py +105 -0
  496. qanswer_sdk/models/search_document_response.py +107 -0
  497. qanswer_sdk/models/search_index_payload.py +114 -0
  498. qanswer_sdk/models/search_metadata_filter.py +94 -0
  499. qanswer_sdk/models/search_payload.py +150 -0
  500. qanswer_sdk/models/search_response.py +120 -0
  501. qanswer_sdk/models/search_synonyms_resp.py +91 -0
  502. qanswer_sdk/models/search_task_settings.py +135 -0
  503. qanswer_sdk/models/search_task_settings_update_payload.py +95 -0
  504. qanswer_sdk/models/search_task_update.py +133 -0
  505. qanswer_sdk/models/sender_type.py +38 -0
  506. qanswer_sdk/models/serve_pdf200_response.py +87 -0
  507. qanswer_sdk/models/share_point_connector_settings.py +99 -0
  508. qanswer_sdk/models/share_point_download_by_ids.py +99 -0
  509. qanswer_sdk/models/share_point_download_request.py +103 -0
  510. qanswer_sdk/models/shared_by.py +38 -0
  511. qanswer_sdk/models/shared_entity_type.py +38 -0
  512. qanswer_sdk/models/shared_organization_access_dto.py +116 -0
  513. qanswer_sdk/models/shared_team_access_dto.py +116 -0
  514. qanswer_sdk/models/shared_user.py +90 -0
  515. qanswer_sdk/models/sign_out_request.py +87 -0
  516. qanswer_sdk/models/sign_up_request.py +99 -0
  517. qanswer_sdk/models/slot.py +153 -0
  518. qanswer_sdk/models/slot_history_entry.py +119 -0
  519. qanswer_sdk/models/slot_in_prompt.py +91 -0
  520. qanswer_sdk/models/slot_info_with_latest_version.py +95 -0
  521. qanswer_sdk/models/slot_update.py +133 -0
  522. qanswer_sdk/models/socker_join_user.py +91 -0
  523. qanswer_sdk/models/socket_audio_transcription_status.py +102 -0
  524. qanswer_sdk/models/socket_conversation_message.py +245 -0
  525. qanswer_sdk/models/socket_dataset_reindexing_status.py +97 -0
  526. qanswer_sdk/models/socket_events_q_answer.py +55 -0
  527. qanswer_sdk/models/socket_feedback_evaluation_progress.py +108 -0
  528. qanswer_sdk/models/socket_file_metadata.py +194 -0
  529. qanswer_sdk/models/socket_file_status_batch.py +103 -0
  530. qanswer_sdk/models/socket_file_status_item.py +99 -0
  531. qanswer_sdk/models/socket_join_conversation.py +97 -0
  532. qanswer_sdk/models/socket_join_dataset.py +93 -0
  533. qanswer_sdk/models/socket_message_status.py +40 -0
  534. qanswer_sdk/models/socket_notification.py +109 -0
  535. qanswer_sdk/models/socket_report_continuation_response.py +100 -0
  536. qanswer_sdk/models/socket_report_copilot_generation_from_slots_response.py +116 -0
  537. qanswer_sdk/models/socket_report_copilot_generation_from_template_response.py +116 -0
  538. qanswer_sdk/models/socket_report_copilot_refinement_response.py +102 -0
  539. qanswer_sdk/models/socket_speech2_text_response.py +122 -0
  540. qanswer_sdk/models/socket_stop_conversation.py +97 -0
  541. qanswer_sdk/models/source.py +125 -0
  542. qanswer_sdk/models/source_metadata.py +109 -0
  543. qanswer_sdk/models/speech2_text_response.py +110 -0
  544. qanswer_sdk/models/stat_per_date.py +89 -0
  545. qanswer_sdk/models/status_response.py +89 -0
  546. qanswer_sdk/models/storage_active_status.py +37 -0
  547. qanswer_sdk/models/subscription_response.py +92 -0
  548. qanswer_sdk/models/subscription_status.py +39 -0
  549. qanswer_sdk/models/suggested_replies.py +87 -0
  550. qanswer_sdk/models/suggestion_list_response.py +87 -0
  551. qanswer_sdk/models/summa_server.py +101 -0
  552. qanswer_sdk/models/task_category.py +61 -0
  553. qanswer_sdk/models/task_name.py +43 -0
  554. qanswer_sdk/models/team_admin_dto.py +95 -0
  555. qanswer_sdk/models/team_creation_dto.py +89 -0
  556. qanswer_sdk/models/team_dto.py +93 -0
  557. qanswer_sdk/models/team_list_dto.py +101 -0
  558. qanswer_sdk/models/team_list_dto_teams_inner.py +149 -0
  559. qanswer_sdk/models/team_role.py +37 -0
  560. qanswer_sdk/models/team_with_count_dto.py +95 -0
  561. qanswer_sdk/models/teams_bot_auth_type.py +38 -0
  562. qanswer_sdk/models/teams_bot_registration_dto.py +107 -0
  563. qanswer_sdk/models/teams_bot_registration_upsert_dto.py +105 -0
  564. qanswer_sdk/models/template_clip_structure.py +114 -0
  565. qanswer_sdk/models/template_toggle_request.py +93 -0
  566. qanswer_sdk/models/terms_bucket.py +107 -0
  567. qanswer_sdk/models/test_imap_connection_payload.py +95 -0
  568. qanswer_sdk/models/text2_sparql_payload.py +187 -0
  569. qanswer_sdk/models/text2_sparql_task_settings.py +119 -0
  570. qanswer_sdk/models/text2_sparql_task_settings_update_payload.py +95 -0
  571. qanswer_sdk/models/text2_sparql_task_update.py +119 -0
  572. qanswer_sdk/models/text_classification_payload.py +99 -0
  573. qanswer_sdk/models/text_classification_response.py +87 -0
  574. qanswer_sdk/models/text_classification_v2_payload.py +99 -0
  575. qanswer_sdk/models/text_classification_v2_response.py +95 -0
  576. qanswer_sdk/models/thinking_block.py +91 -0
  577. qanswer_sdk/models/tool_selection.py +89 -0
  578. qanswer_sdk/models/total_stat.py +96 -0
  579. qanswer_sdk/models/ui_mappings.py +141 -0
  580. qanswer_sdk/models/update_file_es_meta_data.py +116 -0
  581. qanswer_sdk/models/update_metadata_model.py +97 -0
  582. qanswer_sdk/models/update_qn_a_pair_request.py +101 -0
  583. qanswer_sdk/models/update_qn_a_pair_response.py +89 -0
  584. qanswer_sdk/models/update_synonyms.py +95 -0
  585. qanswer_sdk/models/update_synonyms_resp.py +89 -0
  586. qanswer_sdk/models/upload_metadata.py +115 -0
  587. qanswer_sdk/models/user_credits_config_dto.py +99 -0
  588. qanswer_sdk/models/user_credits_dto.py +106 -0
  589. qanswer_sdk/models/user_dataset_api_key_dto.py +120 -0
  590. qanswer_sdk/models/user_dataset_mcp_tool_selection_dto.py +100 -0
  591. qanswer_sdk/models/user_dto.py +91 -0
  592. qanswer_sdk/models/user_identity_availability.py +87 -0
  593. qanswer_sdk/models/user_info_dto.py +95 -0
  594. qanswer_sdk/models/user_list_dto.py +101 -0
  595. qanswer_sdk/models/user_log_dto.py +102 -0
  596. qanswer_sdk/models/user_logs_list_dto.py +97 -0
  597. qanswer_sdk/models/user_mcp_tool_selection_dto.py +107 -0
  598. qanswer_sdk/models/user_oauth_token_dto.py +96 -0
  599. qanswer_sdk/models/user_profile_dto.py +199 -0
  600. qanswer_sdk/models/user_profile_list_dto.py +101 -0
  601. qanswer_sdk/models/user_team_dto.py +94 -0
  602. qanswer_sdk/models/validation_error.py +108 -0
  603. qanswer_sdk/models/validation_error_loc_inner.py +138 -0
  604. qanswer_sdk/models/warn_visibility.py +40 -0
  605. qanswer_sdk/models/websearch_connector_config.py +102 -0
  606. qanswer_sdk/models/websearch_scraping_site.py +91 -0
  607. qanswer_sdk/models/website_add_payload.py +102 -0
  608. qanswer_sdk/models/website_connector_config.py +102 -0
  609. qanswer_sdk/models/website_connector_settings.py +123 -0
  610. qanswer_sdk/models/widget_configs.py +109 -0
  611. qanswer_sdk/models/x_wiki_add_request.py +97 -0
  612. qanswer_sdk/models/x_wiki_download_by_ids.py +89 -0
  613. qanswer_sdk/py.typed +0 -0
  614. qanswer_sdk/rest.py +258 -0
  615. qanswer_sdk-0.1.0.dev0.dist-info/METADATA +252 -0
  616. qanswer_sdk-0.1.0.dev0.dist-info/RECORD +618 -0
  617. qanswer_sdk-0.1.0.dev0.dist-info/WHEEL +5 -0
  618. qanswer_sdk-0.1.0.dev0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,2175 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ free-text-client
5
+
6
+ QAnswer 2.0 API
7
+
8
+ The version of the OpenAPI document: 2.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import StrictInt, StrictStr
20
+ from typing import Any, Optional
21
+ from qanswer_sdk.models.auth_link_response import AuthLinkResponse
22
+ from qanswer_sdk.models.create_connector_request import CreateConnectorRequest
23
+ from qanswer_sdk.models.create_connector_response import CreateConnectorResponse
24
+ from qanswer_sdk.models.g_drive_connector_info import GDriveConnectorInfo
25
+ from qanswer_sdk.models.g_drive_download_request import GDriveDownloadRequest
26
+ from qanswer_sdk.models.g_drive_refresh_request import GDriveRefreshRequest
27
+ from qanswer_sdk.models.list_files_connector_response import ListFilesConnectorResponse
28
+ from qanswer_sdk.models.status_response import StatusResponse
29
+
30
+ from qanswer_sdk.api_client import ApiClient, RequestSerialized
31
+ from qanswer_sdk.api_response import ApiResponse
32
+ from qanswer_sdk.rest import RESTResponseType
33
+
34
+
35
+ class ConnectorGoogleDriveApi:
36
+ """NOTE: This class is auto generated by OpenAPI Generator
37
+ Ref: https://openapi-generator.tech
38
+
39
+ Do not edit the class manually.
40
+ """
41
+
42
+ def __init__(self, api_client=None) -> None:
43
+ if api_client is None:
44
+ api_client = ApiClient.get_default()
45
+ self.api_client = api_client
46
+
47
+
48
+ @validate_call
49
+ def create_gdrive_connector(
50
+ self,
51
+ create_connector_request: CreateConnectorRequest,
52
+ q_answer_api_key: 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
+ ) -> CreateConnectorResponse:
66
+ """Create Gdrive Connector
67
+
68
+ Create GDrive Connector
69
+
70
+ :param create_connector_request: (required)
71
+ :type create_connector_request: CreateConnectorRequest
72
+ :param q_answer_api_key:
73
+ :type q_answer_api_key: str
74
+ :param _request_timeout: timeout setting for this request. If one
75
+ number provided, it will be total request
76
+ timeout. It can also be a pair (tuple) of
77
+ (connection, read) timeouts.
78
+ :type _request_timeout: int, tuple(int, int), optional
79
+ :param _request_auth: set to override the auth_settings for an a single
80
+ request; this effectively ignores the
81
+ authentication in the spec for a single request.
82
+ :type _request_auth: dict, optional
83
+ :param _content_type: force content-type for the request.
84
+ :type _content_type: str, Optional
85
+ :param _headers: set to override the headers for a single
86
+ request; this effectively ignores the headers
87
+ in the spec for a single request.
88
+ :type _headers: dict, optional
89
+ :param _host_index: set to override the host_index for a single
90
+ request; this effectively ignores the host_index
91
+ in the spec for a single request.
92
+ :type _host_index: int, optional
93
+ :return: Returns the result object.
94
+ """ # noqa: E501
95
+
96
+ _param = self._create_gdrive_connector_serialize(
97
+ create_connector_request=create_connector_request,
98
+ q_answer_api_key=q_answer_api_key,
99
+ _request_auth=_request_auth,
100
+ _content_type=_content_type,
101
+ _headers=_headers,
102
+ _host_index=_host_index
103
+ )
104
+
105
+ _response_types_map: Dict[str, Optional[str]] = {
106
+ '200': "CreateConnectorResponse",
107
+ '422': "HTTPValidationError",
108
+ }
109
+ response_data = self.api_client.call_api(
110
+ *_param,
111
+ _request_timeout=_request_timeout
112
+ )
113
+ response_data.read()
114
+ return self.api_client.response_deserialize(
115
+ response_data=response_data,
116
+ response_types_map=_response_types_map,
117
+ ).data
118
+
119
+
120
+ @validate_call
121
+ def create_gdrive_connector_with_http_info(
122
+ self,
123
+ create_connector_request: CreateConnectorRequest,
124
+ q_answer_api_key: Optional[StrictStr] = None,
125
+ _request_timeout: Union[
126
+ None,
127
+ Annotated[StrictFloat, Field(gt=0)],
128
+ Tuple[
129
+ Annotated[StrictFloat, Field(gt=0)],
130
+ Annotated[StrictFloat, Field(gt=0)]
131
+ ]
132
+ ] = None,
133
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
134
+ _content_type: Optional[StrictStr] = None,
135
+ _headers: Optional[Dict[StrictStr, Any]] = None,
136
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
137
+ ) -> ApiResponse[CreateConnectorResponse]:
138
+ """Create Gdrive Connector
139
+
140
+ Create GDrive Connector
141
+
142
+ :param create_connector_request: (required)
143
+ :type create_connector_request: CreateConnectorRequest
144
+ :param q_answer_api_key:
145
+ :type q_answer_api_key: str
146
+ :param _request_timeout: timeout setting for this request. If one
147
+ number provided, it will be total request
148
+ timeout. It can also be a pair (tuple) of
149
+ (connection, read) timeouts.
150
+ :type _request_timeout: int, tuple(int, int), optional
151
+ :param _request_auth: set to override the auth_settings for an a single
152
+ request; this effectively ignores the
153
+ authentication in the spec for a single request.
154
+ :type _request_auth: dict, optional
155
+ :param _content_type: force content-type for the request.
156
+ :type _content_type: str, Optional
157
+ :param _headers: set to override the headers for a single
158
+ request; this effectively ignores the headers
159
+ in the spec for a single request.
160
+ :type _headers: dict, optional
161
+ :param _host_index: set to override the host_index for a single
162
+ request; this effectively ignores the host_index
163
+ in the spec for a single request.
164
+ :type _host_index: int, optional
165
+ :return: Returns the result object.
166
+ """ # noqa: E501
167
+
168
+ _param = self._create_gdrive_connector_serialize(
169
+ create_connector_request=create_connector_request,
170
+ q_answer_api_key=q_answer_api_key,
171
+ _request_auth=_request_auth,
172
+ _content_type=_content_type,
173
+ _headers=_headers,
174
+ _host_index=_host_index
175
+ )
176
+
177
+ _response_types_map: Dict[str, Optional[str]] = {
178
+ '200': "CreateConnectorResponse",
179
+ '422': "HTTPValidationError",
180
+ }
181
+ response_data = self.api_client.call_api(
182
+ *_param,
183
+ _request_timeout=_request_timeout
184
+ )
185
+ response_data.read()
186
+ return self.api_client.response_deserialize(
187
+ response_data=response_data,
188
+ response_types_map=_response_types_map,
189
+ )
190
+
191
+
192
+ @validate_call
193
+ def create_gdrive_connector_without_preload_content(
194
+ self,
195
+ create_connector_request: CreateConnectorRequest,
196
+ q_answer_api_key: Optional[StrictStr] = None,
197
+ _request_timeout: Union[
198
+ None,
199
+ Annotated[StrictFloat, Field(gt=0)],
200
+ Tuple[
201
+ Annotated[StrictFloat, Field(gt=0)],
202
+ Annotated[StrictFloat, Field(gt=0)]
203
+ ]
204
+ ] = None,
205
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
206
+ _content_type: Optional[StrictStr] = None,
207
+ _headers: Optional[Dict[StrictStr, Any]] = None,
208
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
209
+ ) -> RESTResponseType:
210
+ """Create Gdrive Connector
211
+
212
+ Create GDrive Connector
213
+
214
+ :param create_connector_request: (required)
215
+ :type create_connector_request: CreateConnectorRequest
216
+ :param q_answer_api_key:
217
+ :type q_answer_api_key: str
218
+ :param _request_timeout: timeout setting for this request. If one
219
+ number provided, it will be total request
220
+ timeout. It can also be a pair (tuple) of
221
+ (connection, read) timeouts.
222
+ :type _request_timeout: int, tuple(int, int), optional
223
+ :param _request_auth: set to override the auth_settings for an a single
224
+ request; this effectively ignores the
225
+ authentication in the spec for a single request.
226
+ :type _request_auth: dict, optional
227
+ :param _content_type: force content-type for the request.
228
+ :type _content_type: str, Optional
229
+ :param _headers: set to override the headers for a single
230
+ request; this effectively ignores the headers
231
+ in the spec for a single request.
232
+ :type _headers: dict, optional
233
+ :param _host_index: set to override the host_index for a single
234
+ request; this effectively ignores the host_index
235
+ in the spec for a single request.
236
+ :type _host_index: int, optional
237
+ :return: Returns the result object.
238
+ """ # noqa: E501
239
+
240
+ _param = self._create_gdrive_connector_serialize(
241
+ create_connector_request=create_connector_request,
242
+ q_answer_api_key=q_answer_api_key,
243
+ _request_auth=_request_auth,
244
+ _content_type=_content_type,
245
+ _headers=_headers,
246
+ _host_index=_host_index
247
+ )
248
+
249
+ _response_types_map: Dict[str, Optional[str]] = {
250
+ '200': "CreateConnectorResponse",
251
+ '422': "HTTPValidationError",
252
+ }
253
+ response_data = self.api_client.call_api(
254
+ *_param,
255
+ _request_timeout=_request_timeout
256
+ )
257
+ return response_data.response
258
+
259
+
260
+ def _create_gdrive_connector_serialize(
261
+ self,
262
+ create_connector_request,
263
+ q_answer_api_key,
264
+ _request_auth,
265
+ _content_type,
266
+ _headers,
267
+ _host_index,
268
+ ) -> RequestSerialized:
269
+
270
+ _host = None
271
+
272
+ _collection_formats: Dict[str, str] = {
273
+ }
274
+
275
+ _path_params: Dict[str, str] = {}
276
+ _query_params: List[Tuple[str, str]] = []
277
+ _header_params: Dict[str, Optional[str]] = _headers or {}
278
+ _form_params: List[Tuple[str, str]] = []
279
+ _files: Dict[
280
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
281
+ ] = {}
282
+ _body_params: Optional[bytes] = None
283
+
284
+ # process the path parameters
285
+ # process the query parameters
286
+ # process the header parameters
287
+ if q_answer_api_key is not None:
288
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
289
+ # process the form parameters
290
+ # process the body parameter
291
+ if create_connector_request is not None:
292
+ _body_params = create_connector_request
293
+
294
+
295
+ # set the HTTP header `Accept`
296
+ if 'Accept' not in _header_params:
297
+ _header_params['Accept'] = self.api_client.select_header_accept(
298
+ [
299
+ 'application/json'
300
+ ]
301
+ )
302
+
303
+ # set the HTTP header `Content-Type`
304
+ if _content_type:
305
+ _header_params['Content-Type'] = _content_type
306
+ else:
307
+ _default_content_type = (
308
+ self.api_client.select_header_content_type(
309
+ [
310
+ 'application/json'
311
+ ]
312
+ )
313
+ )
314
+ if _default_content_type is not None:
315
+ _header_params['Content-Type'] = _default_content_type
316
+
317
+ # authentication setting
318
+ _auth_settings: List[str] = [
319
+ 'QAnswer-Api-Key',
320
+ 'Bearer token'
321
+ ]
322
+
323
+ return self.api_client.param_serialize(
324
+ method='POST',
325
+ resource_path='/api/connectors/google-drive/create',
326
+ path_params=_path_params,
327
+ query_params=_query_params,
328
+ header_params=_header_params,
329
+ body=_body_params,
330
+ post_params=_form_params,
331
+ files=_files,
332
+ auth_settings=_auth_settings,
333
+ collection_formats=_collection_formats,
334
+ _host=_host,
335
+ _request_auth=_request_auth
336
+ )
337
+
338
+
339
+
340
+
341
+ @validate_call
342
+ def download_gdrive_files(
343
+ self,
344
+ g_drive_download_request: GDriveDownloadRequest,
345
+ _request_timeout: Union[
346
+ None,
347
+ Annotated[StrictFloat, Field(gt=0)],
348
+ Tuple[
349
+ Annotated[StrictFloat, Field(gt=0)],
350
+ Annotated[StrictFloat, Field(gt=0)]
351
+ ]
352
+ ] = None,
353
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
354
+ _content_type: Optional[StrictStr] = None,
355
+ _headers: Optional[Dict[StrictStr, Any]] = None,
356
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
357
+ ) -> StatusResponse:
358
+ """Download Gdrive Files
359
+
360
+ Download GDrive files
361
+
362
+ :param g_drive_download_request: (required)
363
+ :type g_drive_download_request: GDriveDownloadRequest
364
+ :param _request_timeout: timeout setting for this request. If one
365
+ number provided, it will be total request
366
+ timeout. It can also be a pair (tuple) of
367
+ (connection, read) timeouts.
368
+ :type _request_timeout: int, tuple(int, int), optional
369
+ :param _request_auth: set to override the auth_settings for an a single
370
+ request; this effectively ignores the
371
+ authentication in the spec for a single request.
372
+ :type _request_auth: dict, optional
373
+ :param _content_type: force content-type for the request.
374
+ :type _content_type: str, Optional
375
+ :param _headers: set to override the headers for a single
376
+ request; this effectively ignores the headers
377
+ in the spec for a single request.
378
+ :type _headers: dict, optional
379
+ :param _host_index: set to override the host_index for a single
380
+ request; this effectively ignores the host_index
381
+ in the spec for a single request.
382
+ :type _host_index: int, optional
383
+ :return: Returns the result object.
384
+ """ # noqa: E501
385
+
386
+ _param = self._download_gdrive_files_serialize(
387
+ g_drive_download_request=g_drive_download_request,
388
+ _request_auth=_request_auth,
389
+ _content_type=_content_type,
390
+ _headers=_headers,
391
+ _host_index=_host_index
392
+ )
393
+
394
+ _response_types_map: Dict[str, Optional[str]] = {
395
+ '200': "StatusResponse",
396
+ '422': "HTTPValidationError",
397
+ }
398
+ response_data = self.api_client.call_api(
399
+ *_param,
400
+ _request_timeout=_request_timeout
401
+ )
402
+ response_data.read()
403
+ return self.api_client.response_deserialize(
404
+ response_data=response_data,
405
+ response_types_map=_response_types_map,
406
+ ).data
407
+
408
+
409
+ @validate_call
410
+ def download_gdrive_files_with_http_info(
411
+ self,
412
+ g_drive_download_request: GDriveDownloadRequest,
413
+ _request_timeout: Union[
414
+ None,
415
+ Annotated[StrictFloat, Field(gt=0)],
416
+ Tuple[
417
+ Annotated[StrictFloat, Field(gt=0)],
418
+ Annotated[StrictFloat, Field(gt=0)]
419
+ ]
420
+ ] = None,
421
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
422
+ _content_type: Optional[StrictStr] = None,
423
+ _headers: Optional[Dict[StrictStr, Any]] = None,
424
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
425
+ ) -> ApiResponse[StatusResponse]:
426
+ """Download Gdrive Files
427
+
428
+ Download GDrive files
429
+
430
+ :param g_drive_download_request: (required)
431
+ :type g_drive_download_request: GDriveDownloadRequest
432
+ :param _request_timeout: timeout setting for this request. If one
433
+ number provided, it will be total request
434
+ timeout. It can also be a pair (tuple) of
435
+ (connection, read) timeouts.
436
+ :type _request_timeout: int, tuple(int, int), optional
437
+ :param _request_auth: set to override the auth_settings for an a single
438
+ request; this effectively ignores the
439
+ authentication in the spec for a single request.
440
+ :type _request_auth: dict, optional
441
+ :param _content_type: force content-type for the request.
442
+ :type _content_type: str, Optional
443
+ :param _headers: set to override the headers for a single
444
+ request; this effectively ignores the headers
445
+ in the spec for a single request.
446
+ :type _headers: dict, optional
447
+ :param _host_index: set to override the host_index for a single
448
+ request; this effectively ignores the host_index
449
+ in the spec for a single request.
450
+ :type _host_index: int, optional
451
+ :return: Returns the result object.
452
+ """ # noqa: E501
453
+
454
+ _param = self._download_gdrive_files_serialize(
455
+ g_drive_download_request=g_drive_download_request,
456
+ _request_auth=_request_auth,
457
+ _content_type=_content_type,
458
+ _headers=_headers,
459
+ _host_index=_host_index
460
+ )
461
+
462
+ _response_types_map: Dict[str, Optional[str]] = {
463
+ '200': "StatusResponse",
464
+ '422': "HTTPValidationError",
465
+ }
466
+ response_data = self.api_client.call_api(
467
+ *_param,
468
+ _request_timeout=_request_timeout
469
+ )
470
+ response_data.read()
471
+ return self.api_client.response_deserialize(
472
+ response_data=response_data,
473
+ response_types_map=_response_types_map,
474
+ )
475
+
476
+
477
+ @validate_call
478
+ def download_gdrive_files_without_preload_content(
479
+ self,
480
+ g_drive_download_request: GDriveDownloadRequest,
481
+ _request_timeout: Union[
482
+ None,
483
+ Annotated[StrictFloat, Field(gt=0)],
484
+ Tuple[
485
+ Annotated[StrictFloat, Field(gt=0)],
486
+ Annotated[StrictFloat, Field(gt=0)]
487
+ ]
488
+ ] = None,
489
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
490
+ _content_type: Optional[StrictStr] = None,
491
+ _headers: Optional[Dict[StrictStr, Any]] = None,
492
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
493
+ ) -> RESTResponseType:
494
+ """Download Gdrive Files
495
+
496
+ Download GDrive files
497
+
498
+ :param g_drive_download_request: (required)
499
+ :type g_drive_download_request: GDriveDownloadRequest
500
+ :param _request_timeout: timeout setting for this request. If one
501
+ number provided, it will be total request
502
+ timeout. It can also be a pair (tuple) of
503
+ (connection, read) timeouts.
504
+ :type _request_timeout: int, tuple(int, int), optional
505
+ :param _request_auth: set to override the auth_settings for an a single
506
+ request; this effectively ignores the
507
+ authentication in the spec for a single request.
508
+ :type _request_auth: dict, optional
509
+ :param _content_type: force content-type for the request.
510
+ :type _content_type: str, Optional
511
+ :param _headers: set to override the headers for a single
512
+ request; this effectively ignores the headers
513
+ in the spec for a single request.
514
+ :type _headers: dict, optional
515
+ :param _host_index: set to override the host_index for a single
516
+ request; this effectively ignores the host_index
517
+ in the spec for a single request.
518
+ :type _host_index: int, optional
519
+ :return: Returns the result object.
520
+ """ # noqa: E501
521
+
522
+ _param = self._download_gdrive_files_serialize(
523
+ g_drive_download_request=g_drive_download_request,
524
+ _request_auth=_request_auth,
525
+ _content_type=_content_type,
526
+ _headers=_headers,
527
+ _host_index=_host_index
528
+ )
529
+
530
+ _response_types_map: Dict[str, Optional[str]] = {
531
+ '200': "StatusResponse",
532
+ '422': "HTTPValidationError",
533
+ }
534
+ response_data = self.api_client.call_api(
535
+ *_param,
536
+ _request_timeout=_request_timeout
537
+ )
538
+ return response_data.response
539
+
540
+
541
+ def _download_gdrive_files_serialize(
542
+ self,
543
+ g_drive_download_request,
544
+ _request_auth,
545
+ _content_type,
546
+ _headers,
547
+ _host_index,
548
+ ) -> RequestSerialized:
549
+
550
+ _host = None
551
+
552
+ _collection_formats: Dict[str, str] = {
553
+ }
554
+
555
+ _path_params: Dict[str, str] = {}
556
+ _query_params: List[Tuple[str, str]] = []
557
+ _header_params: Dict[str, Optional[str]] = _headers or {}
558
+ _form_params: List[Tuple[str, str]] = []
559
+ _files: Dict[
560
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
561
+ ] = {}
562
+ _body_params: Optional[bytes] = None
563
+
564
+ # process the path parameters
565
+ # process the query parameters
566
+ # process the header parameters
567
+ # process the form parameters
568
+ # process the body parameter
569
+ if g_drive_download_request is not None:
570
+ _body_params = g_drive_download_request
571
+
572
+
573
+ # set the HTTP header `Accept`
574
+ if 'Accept' not in _header_params:
575
+ _header_params['Accept'] = self.api_client.select_header_accept(
576
+ [
577
+ 'application/json'
578
+ ]
579
+ )
580
+
581
+ # set the HTTP header `Content-Type`
582
+ if _content_type:
583
+ _header_params['Content-Type'] = _content_type
584
+ else:
585
+ _default_content_type = (
586
+ self.api_client.select_header_content_type(
587
+ [
588
+ 'application/json'
589
+ ]
590
+ )
591
+ )
592
+ if _default_content_type is not None:
593
+ _header_params['Content-Type'] = _default_content_type
594
+
595
+ # authentication setting
596
+ _auth_settings: List[str] = [
597
+ 'QAnswer-Api-Key',
598
+ 'Bearer token'
599
+ ]
600
+
601
+ return self.api_client.param_serialize(
602
+ method='POST',
603
+ resource_path='/api/connectors/google-drive/add',
604
+ path_params=_path_params,
605
+ query_params=_query_params,
606
+ header_params=_header_params,
607
+ body=_body_params,
608
+ post_params=_form_params,
609
+ files=_files,
610
+ auth_settings=_auth_settings,
611
+ collection_formats=_collection_formats,
612
+ _host=_host,
613
+ _request_auth=_request_auth
614
+ )
615
+
616
+
617
+
618
+
619
+ @validate_call
620
+ def gdrive_callback(
621
+ self,
622
+ code: Optional[StrictStr] = None,
623
+ state: Optional[StrictStr] = None,
624
+ error: Optional[StrictStr] = None,
625
+ _request_timeout: Union[
626
+ None,
627
+ Annotated[StrictFloat, Field(gt=0)],
628
+ Tuple[
629
+ Annotated[StrictFloat, Field(gt=0)],
630
+ Annotated[StrictFloat, Field(gt=0)]
631
+ ]
632
+ ] = None,
633
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
634
+ _content_type: Optional[StrictStr] = None,
635
+ _headers: Optional[Dict[StrictStr, Any]] = None,
636
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
637
+ ) -> object:
638
+ """Gdrive Callback
639
+
640
+ GDrive callback
641
+
642
+ :param code:
643
+ :type code: str
644
+ :param state:
645
+ :type state: str
646
+ :param error:
647
+ :type error: str
648
+ :param _request_timeout: timeout setting for this request. If one
649
+ number provided, it will be total request
650
+ timeout. It can also be a pair (tuple) of
651
+ (connection, read) timeouts.
652
+ :type _request_timeout: int, tuple(int, int), optional
653
+ :param _request_auth: set to override the auth_settings for an a single
654
+ request; this effectively ignores the
655
+ authentication in the spec for a single request.
656
+ :type _request_auth: dict, optional
657
+ :param _content_type: force content-type for the request.
658
+ :type _content_type: str, Optional
659
+ :param _headers: set to override the headers for a single
660
+ request; this effectively ignores the headers
661
+ in the spec for a single request.
662
+ :type _headers: dict, optional
663
+ :param _host_index: set to override the host_index for a single
664
+ request; this effectively ignores the host_index
665
+ in the spec for a single request.
666
+ :type _host_index: int, optional
667
+ :return: Returns the result object.
668
+ """ # noqa: E501
669
+
670
+ _param = self._gdrive_callback_serialize(
671
+ code=code,
672
+ state=state,
673
+ error=error,
674
+ _request_auth=_request_auth,
675
+ _content_type=_content_type,
676
+ _headers=_headers,
677
+ _host_index=_host_index
678
+ )
679
+
680
+ _response_types_map: Dict[str, Optional[str]] = {
681
+ '200': "object",
682
+ '422': "HTTPValidationError",
683
+ }
684
+ response_data = self.api_client.call_api(
685
+ *_param,
686
+ _request_timeout=_request_timeout
687
+ )
688
+ response_data.read()
689
+ return self.api_client.response_deserialize(
690
+ response_data=response_data,
691
+ response_types_map=_response_types_map,
692
+ ).data
693
+
694
+
695
+ @validate_call
696
+ def gdrive_callback_with_http_info(
697
+ self,
698
+ code: Optional[StrictStr] = None,
699
+ state: Optional[StrictStr] = None,
700
+ error: Optional[StrictStr] = None,
701
+ _request_timeout: Union[
702
+ None,
703
+ Annotated[StrictFloat, Field(gt=0)],
704
+ Tuple[
705
+ Annotated[StrictFloat, Field(gt=0)],
706
+ Annotated[StrictFloat, Field(gt=0)]
707
+ ]
708
+ ] = None,
709
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
710
+ _content_type: Optional[StrictStr] = None,
711
+ _headers: Optional[Dict[StrictStr, Any]] = None,
712
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
713
+ ) -> ApiResponse[object]:
714
+ """Gdrive Callback
715
+
716
+ GDrive callback
717
+
718
+ :param code:
719
+ :type code: str
720
+ :param state:
721
+ :type state: str
722
+ :param error:
723
+ :type error: str
724
+ :param _request_timeout: timeout setting for this request. If one
725
+ number provided, it will be total request
726
+ timeout. It can also be a pair (tuple) of
727
+ (connection, read) timeouts.
728
+ :type _request_timeout: int, tuple(int, int), optional
729
+ :param _request_auth: set to override the auth_settings for an a single
730
+ request; this effectively ignores the
731
+ authentication in the spec for a single request.
732
+ :type _request_auth: dict, optional
733
+ :param _content_type: force content-type for the request.
734
+ :type _content_type: str, Optional
735
+ :param _headers: set to override the headers for a single
736
+ request; this effectively ignores the headers
737
+ in the spec for a single request.
738
+ :type _headers: dict, optional
739
+ :param _host_index: set to override the host_index for a single
740
+ request; this effectively ignores the host_index
741
+ in the spec for a single request.
742
+ :type _host_index: int, optional
743
+ :return: Returns the result object.
744
+ """ # noqa: E501
745
+
746
+ _param = self._gdrive_callback_serialize(
747
+ code=code,
748
+ state=state,
749
+ error=error,
750
+ _request_auth=_request_auth,
751
+ _content_type=_content_type,
752
+ _headers=_headers,
753
+ _host_index=_host_index
754
+ )
755
+
756
+ _response_types_map: Dict[str, Optional[str]] = {
757
+ '200': "object",
758
+ '422': "HTTPValidationError",
759
+ }
760
+ response_data = self.api_client.call_api(
761
+ *_param,
762
+ _request_timeout=_request_timeout
763
+ )
764
+ response_data.read()
765
+ return self.api_client.response_deserialize(
766
+ response_data=response_data,
767
+ response_types_map=_response_types_map,
768
+ )
769
+
770
+
771
+ @validate_call
772
+ def gdrive_callback_without_preload_content(
773
+ self,
774
+ code: Optional[StrictStr] = None,
775
+ state: Optional[StrictStr] = None,
776
+ error: Optional[StrictStr] = None,
777
+ _request_timeout: Union[
778
+ None,
779
+ Annotated[StrictFloat, Field(gt=0)],
780
+ Tuple[
781
+ Annotated[StrictFloat, Field(gt=0)],
782
+ Annotated[StrictFloat, Field(gt=0)]
783
+ ]
784
+ ] = None,
785
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
786
+ _content_type: Optional[StrictStr] = None,
787
+ _headers: Optional[Dict[StrictStr, Any]] = None,
788
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
789
+ ) -> RESTResponseType:
790
+ """Gdrive Callback
791
+
792
+ GDrive callback
793
+
794
+ :param code:
795
+ :type code: str
796
+ :param state:
797
+ :type state: str
798
+ :param error:
799
+ :type error: str
800
+ :param _request_timeout: timeout setting for this request. If one
801
+ number provided, it will be total request
802
+ timeout. It can also be a pair (tuple) of
803
+ (connection, read) timeouts.
804
+ :type _request_timeout: int, tuple(int, int), optional
805
+ :param _request_auth: set to override the auth_settings for an a single
806
+ request; this effectively ignores the
807
+ authentication in the spec for a single request.
808
+ :type _request_auth: dict, optional
809
+ :param _content_type: force content-type for the request.
810
+ :type _content_type: str, Optional
811
+ :param _headers: set to override the headers for a single
812
+ request; this effectively ignores the headers
813
+ in the spec for a single request.
814
+ :type _headers: dict, optional
815
+ :param _host_index: set to override the host_index for a single
816
+ request; this effectively ignores the host_index
817
+ in the spec for a single request.
818
+ :type _host_index: int, optional
819
+ :return: Returns the result object.
820
+ """ # noqa: E501
821
+
822
+ _param = self._gdrive_callback_serialize(
823
+ code=code,
824
+ state=state,
825
+ error=error,
826
+ _request_auth=_request_auth,
827
+ _content_type=_content_type,
828
+ _headers=_headers,
829
+ _host_index=_host_index
830
+ )
831
+
832
+ _response_types_map: Dict[str, Optional[str]] = {
833
+ '200': "object",
834
+ '422': "HTTPValidationError",
835
+ }
836
+ response_data = self.api_client.call_api(
837
+ *_param,
838
+ _request_timeout=_request_timeout
839
+ )
840
+ return response_data.response
841
+
842
+
843
+ def _gdrive_callback_serialize(
844
+ self,
845
+ code,
846
+ state,
847
+ error,
848
+ _request_auth,
849
+ _content_type,
850
+ _headers,
851
+ _host_index,
852
+ ) -> RequestSerialized:
853
+
854
+ _host = None
855
+
856
+ _collection_formats: Dict[str, str] = {
857
+ }
858
+
859
+ _path_params: Dict[str, str] = {}
860
+ _query_params: List[Tuple[str, str]] = []
861
+ _header_params: Dict[str, Optional[str]] = _headers or {}
862
+ _form_params: List[Tuple[str, str]] = []
863
+ _files: Dict[
864
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
865
+ ] = {}
866
+ _body_params: Optional[bytes] = None
867
+
868
+ # process the path parameters
869
+ # process the query parameters
870
+ if code is not None:
871
+
872
+ _query_params.append(('code', code))
873
+
874
+ if state is not None:
875
+
876
+ _query_params.append(('state', state))
877
+
878
+ if error is not None:
879
+
880
+ _query_params.append(('error', error))
881
+
882
+ # process the header parameters
883
+ # process the form parameters
884
+ # process the body parameter
885
+
886
+
887
+ # set the HTTP header `Accept`
888
+ if 'Accept' not in _header_params:
889
+ _header_params['Accept'] = self.api_client.select_header_accept(
890
+ [
891
+ 'application/json'
892
+ ]
893
+ )
894
+
895
+
896
+ # authentication setting
897
+ _auth_settings: List[str] = [
898
+ ]
899
+
900
+ return self.api_client.param_serialize(
901
+ method='GET',
902
+ resource_path='/api/connectors/google-drive/callback',
903
+ path_params=_path_params,
904
+ query_params=_query_params,
905
+ header_params=_header_params,
906
+ body=_body_params,
907
+ post_params=_form_params,
908
+ files=_files,
909
+ auth_settings=_auth_settings,
910
+ collection_formats=_collection_formats,
911
+ _host=_host,
912
+ _request_auth=_request_auth
913
+ )
914
+
915
+
916
+
917
+
918
+ @validate_call
919
+ def get_gdrive_auth_link(
920
+ self,
921
+ username: StrictStr,
922
+ dataset: StrictStr,
923
+ connector_id: Optional[StrictInt] = None,
924
+ chatting_origin: Optional[StrictStr] = None,
925
+ q_answer_api_key: Optional[StrictStr] = None,
926
+ _request_timeout: Union[
927
+ None,
928
+ Annotated[StrictFloat, Field(gt=0)],
929
+ Tuple[
930
+ Annotated[StrictFloat, Field(gt=0)],
931
+ Annotated[StrictFloat, Field(gt=0)]
932
+ ]
933
+ ] = None,
934
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
935
+ _content_type: Optional[StrictStr] = None,
936
+ _headers: Optional[Dict[StrictStr, Any]] = None,
937
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
938
+ ) -> AuthLinkResponse:
939
+ """Get Gdrive Auth Link
940
+
941
+ Get authentication link for GDrive Connector
942
+
943
+ :param username: (required)
944
+ :type username: str
945
+ :param dataset: (required)
946
+ :type dataset: str
947
+ :param connector_id:
948
+ :type connector_id: int
949
+ :param chatting_origin:
950
+ :type chatting_origin: str
951
+ :param q_answer_api_key:
952
+ :type q_answer_api_key: str
953
+ :param _request_timeout: timeout setting for this request. If one
954
+ number provided, it will be total request
955
+ timeout. It can also be a pair (tuple) of
956
+ (connection, read) timeouts.
957
+ :type _request_timeout: int, tuple(int, int), optional
958
+ :param _request_auth: set to override the auth_settings for an a single
959
+ request; this effectively ignores the
960
+ authentication in the spec for a single request.
961
+ :type _request_auth: dict, optional
962
+ :param _content_type: force content-type for the request.
963
+ :type _content_type: str, Optional
964
+ :param _headers: set to override the headers for a single
965
+ request; this effectively ignores the headers
966
+ in the spec for a single request.
967
+ :type _headers: dict, optional
968
+ :param _host_index: set to override the host_index for a single
969
+ request; this effectively ignores the host_index
970
+ in the spec for a single request.
971
+ :type _host_index: int, optional
972
+ :return: Returns the result object.
973
+ """ # noqa: E501
974
+
975
+ _param = self._get_gdrive_auth_link_serialize(
976
+ username=username,
977
+ dataset=dataset,
978
+ connector_id=connector_id,
979
+ chatting_origin=chatting_origin,
980
+ q_answer_api_key=q_answer_api_key,
981
+ _request_auth=_request_auth,
982
+ _content_type=_content_type,
983
+ _headers=_headers,
984
+ _host_index=_host_index
985
+ )
986
+
987
+ _response_types_map: Dict[str, Optional[str]] = {
988
+ '200': "AuthLinkResponse",
989
+ '422': "HTTPValidationError",
990
+ }
991
+ response_data = self.api_client.call_api(
992
+ *_param,
993
+ _request_timeout=_request_timeout
994
+ )
995
+ response_data.read()
996
+ return self.api_client.response_deserialize(
997
+ response_data=response_data,
998
+ response_types_map=_response_types_map,
999
+ ).data
1000
+
1001
+
1002
+ @validate_call
1003
+ def get_gdrive_auth_link_with_http_info(
1004
+ self,
1005
+ username: StrictStr,
1006
+ dataset: StrictStr,
1007
+ connector_id: Optional[StrictInt] = None,
1008
+ chatting_origin: Optional[StrictStr] = None,
1009
+ q_answer_api_key: Optional[StrictStr] = None,
1010
+ _request_timeout: Union[
1011
+ None,
1012
+ Annotated[StrictFloat, Field(gt=0)],
1013
+ Tuple[
1014
+ Annotated[StrictFloat, Field(gt=0)],
1015
+ Annotated[StrictFloat, Field(gt=0)]
1016
+ ]
1017
+ ] = None,
1018
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1019
+ _content_type: Optional[StrictStr] = None,
1020
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1021
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1022
+ ) -> ApiResponse[AuthLinkResponse]:
1023
+ """Get Gdrive Auth Link
1024
+
1025
+ Get authentication link for GDrive Connector
1026
+
1027
+ :param username: (required)
1028
+ :type username: str
1029
+ :param dataset: (required)
1030
+ :type dataset: str
1031
+ :param connector_id:
1032
+ :type connector_id: int
1033
+ :param chatting_origin:
1034
+ :type chatting_origin: str
1035
+ :param q_answer_api_key:
1036
+ :type q_answer_api_key: str
1037
+ :param _request_timeout: timeout setting for this request. If one
1038
+ number provided, it will be total request
1039
+ timeout. It can also be a pair (tuple) of
1040
+ (connection, read) timeouts.
1041
+ :type _request_timeout: int, tuple(int, int), optional
1042
+ :param _request_auth: set to override the auth_settings for an a single
1043
+ request; this effectively ignores the
1044
+ authentication in the spec for a single request.
1045
+ :type _request_auth: dict, optional
1046
+ :param _content_type: force content-type for the request.
1047
+ :type _content_type: str, Optional
1048
+ :param _headers: set to override the headers for a single
1049
+ request; this effectively ignores the headers
1050
+ in the spec for a single request.
1051
+ :type _headers: dict, optional
1052
+ :param _host_index: set to override the host_index for a single
1053
+ request; this effectively ignores the host_index
1054
+ in the spec for a single request.
1055
+ :type _host_index: int, optional
1056
+ :return: Returns the result object.
1057
+ """ # noqa: E501
1058
+
1059
+ _param = self._get_gdrive_auth_link_serialize(
1060
+ username=username,
1061
+ dataset=dataset,
1062
+ connector_id=connector_id,
1063
+ chatting_origin=chatting_origin,
1064
+ q_answer_api_key=q_answer_api_key,
1065
+ _request_auth=_request_auth,
1066
+ _content_type=_content_type,
1067
+ _headers=_headers,
1068
+ _host_index=_host_index
1069
+ )
1070
+
1071
+ _response_types_map: Dict[str, Optional[str]] = {
1072
+ '200': "AuthLinkResponse",
1073
+ '422': "HTTPValidationError",
1074
+ }
1075
+ response_data = self.api_client.call_api(
1076
+ *_param,
1077
+ _request_timeout=_request_timeout
1078
+ )
1079
+ response_data.read()
1080
+ return self.api_client.response_deserialize(
1081
+ response_data=response_data,
1082
+ response_types_map=_response_types_map,
1083
+ )
1084
+
1085
+
1086
+ @validate_call
1087
+ def get_gdrive_auth_link_without_preload_content(
1088
+ self,
1089
+ username: StrictStr,
1090
+ dataset: StrictStr,
1091
+ connector_id: Optional[StrictInt] = None,
1092
+ chatting_origin: Optional[StrictStr] = None,
1093
+ q_answer_api_key: Optional[StrictStr] = None,
1094
+ _request_timeout: Union[
1095
+ None,
1096
+ Annotated[StrictFloat, Field(gt=0)],
1097
+ Tuple[
1098
+ Annotated[StrictFloat, Field(gt=0)],
1099
+ Annotated[StrictFloat, Field(gt=0)]
1100
+ ]
1101
+ ] = None,
1102
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1103
+ _content_type: Optional[StrictStr] = None,
1104
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1105
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1106
+ ) -> RESTResponseType:
1107
+ """Get Gdrive Auth Link
1108
+
1109
+ Get authentication link for GDrive Connector
1110
+
1111
+ :param username: (required)
1112
+ :type username: str
1113
+ :param dataset: (required)
1114
+ :type dataset: str
1115
+ :param connector_id:
1116
+ :type connector_id: int
1117
+ :param chatting_origin:
1118
+ :type chatting_origin: str
1119
+ :param q_answer_api_key:
1120
+ :type q_answer_api_key: str
1121
+ :param _request_timeout: timeout setting for this request. If one
1122
+ number provided, it will be total request
1123
+ timeout. It can also be a pair (tuple) of
1124
+ (connection, read) timeouts.
1125
+ :type _request_timeout: int, tuple(int, int), optional
1126
+ :param _request_auth: set to override the auth_settings for an a single
1127
+ request; this effectively ignores the
1128
+ authentication in the spec for a single request.
1129
+ :type _request_auth: dict, optional
1130
+ :param _content_type: force content-type for the request.
1131
+ :type _content_type: str, Optional
1132
+ :param _headers: set to override the headers for a single
1133
+ request; this effectively ignores the headers
1134
+ in the spec for a single request.
1135
+ :type _headers: dict, optional
1136
+ :param _host_index: set to override the host_index for a single
1137
+ request; this effectively ignores the host_index
1138
+ in the spec for a single request.
1139
+ :type _host_index: int, optional
1140
+ :return: Returns the result object.
1141
+ """ # noqa: E501
1142
+
1143
+ _param = self._get_gdrive_auth_link_serialize(
1144
+ username=username,
1145
+ dataset=dataset,
1146
+ connector_id=connector_id,
1147
+ chatting_origin=chatting_origin,
1148
+ q_answer_api_key=q_answer_api_key,
1149
+ _request_auth=_request_auth,
1150
+ _content_type=_content_type,
1151
+ _headers=_headers,
1152
+ _host_index=_host_index
1153
+ )
1154
+
1155
+ _response_types_map: Dict[str, Optional[str]] = {
1156
+ '200': "AuthLinkResponse",
1157
+ '422': "HTTPValidationError",
1158
+ }
1159
+ response_data = self.api_client.call_api(
1160
+ *_param,
1161
+ _request_timeout=_request_timeout
1162
+ )
1163
+ return response_data.response
1164
+
1165
+
1166
+ def _get_gdrive_auth_link_serialize(
1167
+ self,
1168
+ username,
1169
+ dataset,
1170
+ connector_id,
1171
+ chatting_origin,
1172
+ q_answer_api_key,
1173
+ _request_auth,
1174
+ _content_type,
1175
+ _headers,
1176
+ _host_index,
1177
+ ) -> RequestSerialized:
1178
+
1179
+ _host = None
1180
+
1181
+ _collection_formats: Dict[str, str] = {
1182
+ }
1183
+
1184
+ _path_params: Dict[str, str] = {}
1185
+ _query_params: List[Tuple[str, str]] = []
1186
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1187
+ _form_params: List[Tuple[str, str]] = []
1188
+ _files: Dict[
1189
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1190
+ ] = {}
1191
+ _body_params: Optional[bytes] = None
1192
+
1193
+ # process the path parameters
1194
+ # process the query parameters
1195
+ if username is not None:
1196
+
1197
+ _query_params.append(('username', username))
1198
+
1199
+ if dataset is not None:
1200
+
1201
+ _query_params.append(('dataset', dataset))
1202
+
1203
+ if connector_id is not None:
1204
+
1205
+ _query_params.append(('connectorId', connector_id))
1206
+
1207
+ if chatting_origin is not None:
1208
+
1209
+ _query_params.append(('chattingOrigin', chatting_origin))
1210
+
1211
+ # process the header parameters
1212
+ if q_answer_api_key is not None:
1213
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
1214
+ # process the form parameters
1215
+ # process the body parameter
1216
+
1217
+
1218
+ # set the HTTP header `Accept`
1219
+ if 'Accept' not in _header_params:
1220
+ _header_params['Accept'] = self.api_client.select_header_accept(
1221
+ [
1222
+ 'application/json'
1223
+ ]
1224
+ )
1225
+
1226
+
1227
+ # authentication setting
1228
+ _auth_settings: List[str] = [
1229
+ 'QAnswer-Api-Key',
1230
+ 'Bearer token'
1231
+ ]
1232
+
1233
+ return self.api_client.param_serialize(
1234
+ method='GET',
1235
+ resource_path='/api/connectors/google-drive/authorization-link',
1236
+ path_params=_path_params,
1237
+ query_params=_query_params,
1238
+ header_params=_header_params,
1239
+ body=_body_params,
1240
+ post_params=_form_params,
1241
+ files=_files,
1242
+ auth_settings=_auth_settings,
1243
+ collection_formats=_collection_formats,
1244
+ _host=_host,
1245
+ _request_auth=_request_auth
1246
+ )
1247
+
1248
+
1249
+
1250
+
1251
+ @validate_call
1252
+ def get_gdrive_info(
1253
+ self,
1254
+ username: StrictStr,
1255
+ dataset: StrictStr,
1256
+ connector_id: Optional[StrictInt] = None,
1257
+ q_answer_api_key: Optional[StrictStr] = None,
1258
+ _request_timeout: Union[
1259
+ None,
1260
+ Annotated[StrictFloat, Field(gt=0)],
1261
+ Tuple[
1262
+ Annotated[StrictFloat, Field(gt=0)],
1263
+ Annotated[StrictFloat, Field(gt=0)]
1264
+ ]
1265
+ ] = None,
1266
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1267
+ _content_type: Optional[StrictStr] = None,
1268
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1269
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1270
+ ) -> GDriveConnectorInfo:
1271
+ """Get Gdrive Info
1272
+
1273
+ Get GDrive connector info
1274
+
1275
+ :param username: (required)
1276
+ :type username: str
1277
+ :param dataset: (required)
1278
+ :type dataset: str
1279
+ :param connector_id:
1280
+ :type connector_id: int
1281
+ :param q_answer_api_key:
1282
+ :type q_answer_api_key: str
1283
+ :param _request_timeout: timeout setting for this request. If one
1284
+ number provided, it will be total request
1285
+ timeout. It can also be a pair (tuple) of
1286
+ (connection, read) timeouts.
1287
+ :type _request_timeout: int, tuple(int, int), optional
1288
+ :param _request_auth: set to override the auth_settings for an a single
1289
+ request; this effectively ignores the
1290
+ authentication in the spec for a single request.
1291
+ :type _request_auth: dict, optional
1292
+ :param _content_type: force content-type for the request.
1293
+ :type _content_type: str, Optional
1294
+ :param _headers: set to override the headers for a single
1295
+ request; this effectively ignores the headers
1296
+ in the spec for a single request.
1297
+ :type _headers: dict, optional
1298
+ :param _host_index: set to override the host_index for a single
1299
+ request; this effectively ignores the host_index
1300
+ in the spec for a single request.
1301
+ :type _host_index: int, optional
1302
+ :return: Returns the result object.
1303
+ """ # noqa: E501
1304
+
1305
+ _param = self._get_gdrive_info_serialize(
1306
+ username=username,
1307
+ dataset=dataset,
1308
+ connector_id=connector_id,
1309
+ q_answer_api_key=q_answer_api_key,
1310
+ _request_auth=_request_auth,
1311
+ _content_type=_content_type,
1312
+ _headers=_headers,
1313
+ _host_index=_host_index
1314
+ )
1315
+
1316
+ _response_types_map: Dict[str, Optional[str]] = {
1317
+ '200': "GDriveConnectorInfo",
1318
+ '422': "HTTPValidationError",
1319
+ }
1320
+ response_data = self.api_client.call_api(
1321
+ *_param,
1322
+ _request_timeout=_request_timeout
1323
+ )
1324
+ response_data.read()
1325
+ return self.api_client.response_deserialize(
1326
+ response_data=response_data,
1327
+ response_types_map=_response_types_map,
1328
+ ).data
1329
+
1330
+
1331
+ @validate_call
1332
+ def get_gdrive_info_with_http_info(
1333
+ self,
1334
+ username: StrictStr,
1335
+ dataset: StrictStr,
1336
+ connector_id: Optional[StrictInt] = None,
1337
+ q_answer_api_key: Optional[StrictStr] = None,
1338
+ _request_timeout: Union[
1339
+ None,
1340
+ Annotated[StrictFloat, Field(gt=0)],
1341
+ Tuple[
1342
+ Annotated[StrictFloat, Field(gt=0)],
1343
+ Annotated[StrictFloat, Field(gt=0)]
1344
+ ]
1345
+ ] = None,
1346
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1347
+ _content_type: Optional[StrictStr] = None,
1348
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1349
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1350
+ ) -> ApiResponse[GDriveConnectorInfo]:
1351
+ """Get Gdrive Info
1352
+
1353
+ Get GDrive connector info
1354
+
1355
+ :param username: (required)
1356
+ :type username: str
1357
+ :param dataset: (required)
1358
+ :type dataset: str
1359
+ :param connector_id:
1360
+ :type connector_id: int
1361
+ :param q_answer_api_key:
1362
+ :type q_answer_api_key: str
1363
+ :param _request_timeout: timeout setting for this request. If one
1364
+ number provided, it will be total request
1365
+ timeout. It can also be a pair (tuple) of
1366
+ (connection, read) timeouts.
1367
+ :type _request_timeout: int, tuple(int, int), optional
1368
+ :param _request_auth: set to override the auth_settings for an a single
1369
+ request; this effectively ignores the
1370
+ authentication in the spec for a single request.
1371
+ :type _request_auth: dict, optional
1372
+ :param _content_type: force content-type for the request.
1373
+ :type _content_type: str, Optional
1374
+ :param _headers: set to override the headers for a single
1375
+ request; this effectively ignores the headers
1376
+ in the spec for a single request.
1377
+ :type _headers: dict, optional
1378
+ :param _host_index: set to override the host_index for a single
1379
+ request; this effectively ignores the host_index
1380
+ in the spec for a single request.
1381
+ :type _host_index: int, optional
1382
+ :return: Returns the result object.
1383
+ """ # noqa: E501
1384
+
1385
+ _param = self._get_gdrive_info_serialize(
1386
+ username=username,
1387
+ dataset=dataset,
1388
+ connector_id=connector_id,
1389
+ q_answer_api_key=q_answer_api_key,
1390
+ _request_auth=_request_auth,
1391
+ _content_type=_content_type,
1392
+ _headers=_headers,
1393
+ _host_index=_host_index
1394
+ )
1395
+
1396
+ _response_types_map: Dict[str, Optional[str]] = {
1397
+ '200': "GDriveConnectorInfo",
1398
+ '422': "HTTPValidationError",
1399
+ }
1400
+ response_data = self.api_client.call_api(
1401
+ *_param,
1402
+ _request_timeout=_request_timeout
1403
+ )
1404
+ response_data.read()
1405
+ return self.api_client.response_deserialize(
1406
+ response_data=response_data,
1407
+ response_types_map=_response_types_map,
1408
+ )
1409
+
1410
+
1411
+ @validate_call
1412
+ def get_gdrive_info_without_preload_content(
1413
+ self,
1414
+ username: StrictStr,
1415
+ dataset: StrictStr,
1416
+ connector_id: Optional[StrictInt] = None,
1417
+ q_answer_api_key: Optional[StrictStr] = None,
1418
+ _request_timeout: Union[
1419
+ None,
1420
+ Annotated[StrictFloat, Field(gt=0)],
1421
+ Tuple[
1422
+ Annotated[StrictFloat, Field(gt=0)],
1423
+ Annotated[StrictFloat, Field(gt=0)]
1424
+ ]
1425
+ ] = None,
1426
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1427
+ _content_type: Optional[StrictStr] = None,
1428
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1429
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1430
+ ) -> RESTResponseType:
1431
+ """Get Gdrive Info
1432
+
1433
+ Get GDrive connector info
1434
+
1435
+ :param username: (required)
1436
+ :type username: str
1437
+ :param dataset: (required)
1438
+ :type dataset: str
1439
+ :param connector_id:
1440
+ :type connector_id: int
1441
+ :param q_answer_api_key:
1442
+ :type q_answer_api_key: str
1443
+ :param _request_timeout: timeout setting for this request. If one
1444
+ number provided, it will be total request
1445
+ timeout. It can also be a pair (tuple) of
1446
+ (connection, read) timeouts.
1447
+ :type _request_timeout: int, tuple(int, int), optional
1448
+ :param _request_auth: set to override the auth_settings for an a single
1449
+ request; this effectively ignores the
1450
+ authentication in the spec for a single request.
1451
+ :type _request_auth: dict, optional
1452
+ :param _content_type: force content-type for the request.
1453
+ :type _content_type: str, Optional
1454
+ :param _headers: set to override the headers for a single
1455
+ request; this effectively ignores the headers
1456
+ in the spec for a single request.
1457
+ :type _headers: dict, optional
1458
+ :param _host_index: set to override the host_index for a single
1459
+ request; this effectively ignores the host_index
1460
+ in the spec for a single request.
1461
+ :type _host_index: int, optional
1462
+ :return: Returns the result object.
1463
+ """ # noqa: E501
1464
+
1465
+ _param = self._get_gdrive_info_serialize(
1466
+ username=username,
1467
+ dataset=dataset,
1468
+ connector_id=connector_id,
1469
+ q_answer_api_key=q_answer_api_key,
1470
+ _request_auth=_request_auth,
1471
+ _content_type=_content_type,
1472
+ _headers=_headers,
1473
+ _host_index=_host_index
1474
+ )
1475
+
1476
+ _response_types_map: Dict[str, Optional[str]] = {
1477
+ '200': "GDriveConnectorInfo",
1478
+ '422': "HTTPValidationError",
1479
+ }
1480
+ response_data = self.api_client.call_api(
1481
+ *_param,
1482
+ _request_timeout=_request_timeout
1483
+ )
1484
+ return response_data.response
1485
+
1486
+
1487
+ def _get_gdrive_info_serialize(
1488
+ self,
1489
+ username,
1490
+ dataset,
1491
+ connector_id,
1492
+ q_answer_api_key,
1493
+ _request_auth,
1494
+ _content_type,
1495
+ _headers,
1496
+ _host_index,
1497
+ ) -> RequestSerialized:
1498
+
1499
+ _host = None
1500
+
1501
+ _collection_formats: Dict[str, str] = {
1502
+ }
1503
+
1504
+ _path_params: Dict[str, str] = {}
1505
+ _query_params: List[Tuple[str, str]] = []
1506
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1507
+ _form_params: List[Tuple[str, str]] = []
1508
+ _files: Dict[
1509
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1510
+ ] = {}
1511
+ _body_params: Optional[bytes] = None
1512
+
1513
+ # process the path parameters
1514
+ # process the query parameters
1515
+ if username is not None:
1516
+
1517
+ _query_params.append(('username', username))
1518
+
1519
+ if dataset is not None:
1520
+
1521
+ _query_params.append(('dataset', dataset))
1522
+
1523
+ if connector_id is not None:
1524
+
1525
+ _query_params.append(('connectorId', connector_id))
1526
+
1527
+ # process the header parameters
1528
+ if q_answer_api_key is not None:
1529
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
1530
+ # process the form parameters
1531
+ # process the body parameter
1532
+
1533
+
1534
+ # set the HTTP header `Accept`
1535
+ if 'Accept' not in _header_params:
1536
+ _header_params['Accept'] = self.api_client.select_header_accept(
1537
+ [
1538
+ 'application/json'
1539
+ ]
1540
+ )
1541
+
1542
+
1543
+ # authentication setting
1544
+ _auth_settings: List[str] = [
1545
+ 'QAnswer-Api-Key',
1546
+ 'Bearer token'
1547
+ ]
1548
+
1549
+ return self.api_client.param_serialize(
1550
+ method='GET',
1551
+ resource_path='/api/connectors/google-drive/info',
1552
+ path_params=_path_params,
1553
+ query_params=_query_params,
1554
+ header_params=_header_params,
1555
+ body=_body_params,
1556
+ post_params=_form_params,
1557
+ files=_files,
1558
+ auth_settings=_auth_settings,
1559
+ collection_formats=_collection_formats,
1560
+ _host=_host,
1561
+ _request_auth=_request_auth
1562
+ )
1563
+
1564
+
1565
+
1566
+
1567
+ @validate_call
1568
+ def list_gdrive_files(
1569
+ self,
1570
+ username: StrictStr,
1571
+ dataset: StrictStr,
1572
+ connector_id: Optional[StrictInt] = None,
1573
+ folder_id: Optional[StrictStr] = None,
1574
+ q_answer_api_key: Optional[StrictStr] = None,
1575
+ _request_timeout: Union[
1576
+ None,
1577
+ Annotated[StrictFloat, Field(gt=0)],
1578
+ Tuple[
1579
+ Annotated[StrictFloat, Field(gt=0)],
1580
+ Annotated[StrictFloat, Field(gt=0)]
1581
+ ]
1582
+ ] = None,
1583
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1584
+ _content_type: Optional[StrictStr] = None,
1585
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1586
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1587
+ ) -> ListFilesConnectorResponse:
1588
+ """List Gdrive Files
1589
+
1590
+ List GDrive files
1591
+
1592
+ :param username: (required)
1593
+ :type username: str
1594
+ :param dataset: (required)
1595
+ :type dataset: str
1596
+ :param connector_id:
1597
+ :type connector_id: int
1598
+ :param folder_id:
1599
+ :type folder_id: str
1600
+ :param q_answer_api_key:
1601
+ :type q_answer_api_key: str
1602
+ :param _request_timeout: timeout setting for this request. If one
1603
+ number provided, it will be total request
1604
+ timeout. It can also be a pair (tuple) of
1605
+ (connection, read) timeouts.
1606
+ :type _request_timeout: int, tuple(int, int), optional
1607
+ :param _request_auth: set to override the auth_settings for an a single
1608
+ request; this effectively ignores the
1609
+ authentication in the spec for a single request.
1610
+ :type _request_auth: dict, optional
1611
+ :param _content_type: force content-type for the request.
1612
+ :type _content_type: str, Optional
1613
+ :param _headers: set to override the headers for a single
1614
+ request; this effectively ignores the headers
1615
+ in the spec for a single request.
1616
+ :type _headers: dict, optional
1617
+ :param _host_index: set to override the host_index for a single
1618
+ request; this effectively ignores the host_index
1619
+ in the spec for a single request.
1620
+ :type _host_index: int, optional
1621
+ :return: Returns the result object.
1622
+ """ # noqa: E501
1623
+
1624
+ _param = self._list_gdrive_files_serialize(
1625
+ username=username,
1626
+ dataset=dataset,
1627
+ connector_id=connector_id,
1628
+ folder_id=folder_id,
1629
+ q_answer_api_key=q_answer_api_key,
1630
+ _request_auth=_request_auth,
1631
+ _content_type=_content_type,
1632
+ _headers=_headers,
1633
+ _host_index=_host_index
1634
+ )
1635
+
1636
+ _response_types_map: Dict[str, Optional[str]] = {
1637
+ '200': "ListFilesConnectorResponse",
1638
+ '422': "HTTPValidationError",
1639
+ }
1640
+ response_data = self.api_client.call_api(
1641
+ *_param,
1642
+ _request_timeout=_request_timeout
1643
+ )
1644
+ response_data.read()
1645
+ return self.api_client.response_deserialize(
1646
+ response_data=response_data,
1647
+ response_types_map=_response_types_map,
1648
+ ).data
1649
+
1650
+
1651
+ @validate_call
1652
+ def list_gdrive_files_with_http_info(
1653
+ self,
1654
+ username: StrictStr,
1655
+ dataset: StrictStr,
1656
+ connector_id: Optional[StrictInt] = None,
1657
+ folder_id: Optional[StrictStr] = None,
1658
+ q_answer_api_key: Optional[StrictStr] = None,
1659
+ _request_timeout: Union[
1660
+ None,
1661
+ Annotated[StrictFloat, Field(gt=0)],
1662
+ Tuple[
1663
+ Annotated[StrictFloat, Field(gt=0)],
1664
+ Annotated[StrictFloat, Field(gt=0)]
1665
+ ]
1666
+ ] = None,
1667
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1668
+ _content_type: Optional[StrictStr] = None,
1669
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1670
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1671
+ ) -> ApiResponse[ListFilesConnectorResponse]:
1672
+ """List Gdrive Files
1673
+
1674
+ List GDrive files
1675
+
1676
+ :param username: (required)
1677
+ :type username: str
1678
+ :param dataset: (required)
1679
+ :type dataset: str
1680
+ :param connector_id:
1681
+ :type connector_id: int
1682
+ :param folder_id:
1683
+ :type folder_id: str
1684
+ :param q_answer_api_key:
1685
+ :type q_answer_api_key: str
1686
+ :param _request_timeout: timeout setting for this request. If one
1687
+ number provided, it will be total request
1688
+ timeout. It can also be a pair (tuple) of
1689
+ (connection, read) timeouts.
1690
+ :type _request_timeout: int, tuple(int, int), optional
1691
+ :param _request_auth: set to override the auth_settings for an a single
1692
+ request; this effectively ignores the
1693
+ authentication in the spec for a single request.
1694
+ :type _request_auth: dict, optional
1695
+ :param _content_type: force content-type for the request.
1696
+ :type _content_type: str, Optional
1697
+ :param _headers: set to override the headers for a single
1698
+ request; this effectively ignores the headers
1699
+ in the spec for a single request.
1700
+ :type _headers: dict, optional
1701
+ :param _host_index: set to override the host_index for a single
1702
+ request; this effectively ignores the host_index
1703
+ in the spec for a single request.
1704
+ :type _host_index: int, optional
1705
+ :return: Returns the result object.
1706
+ """ # noqa: E501
1707
+
1708
+ _param = self._list_gdrive_files_serialize(
1709
+ username=username,
1710
+ dataset=dataset,
1711
+ connector_id=connector_id,
1712
+ folder_id=folder_id,
1713
+ q_answer_api_key=q_answer_api_key,
1714
+ _request_auth=_request_auth,
1715
+ _content_type=_content_type,
1716
+ _headers=_headers,
1717
+ _host_index=_host_index
1718
+ )
1719
+
1720
+ _response_types_map: Dict[str, Optional[str]] = {
1721
+ '200': "ListFilesConnectorResponse",
1722
+ '422': "HTTPValidationError",
1723
+ }
1724
+ response_data = self.api_client.call_api(
1725
+ *_param,
1726
+ _request_timeout=_request_timeout
1727
+ )
1728
+ response_data.read()
1729
+ return self.api_client.response_deserialize(
1730
+ response_data=response_data,
1731
+ response_types_map=_response_types_map,
1732
+ )
1733
+
1734
+
1735
+ @validate_call
1736
+ def list_gdrive_files_without_preload_content(
1737
+ self,
1738
+ username: StrictStr,
1739
+ dataset: StrictStr,
1740
+ connector_id: Optional[StrictInt] = None,
1741
+ folder_id: Optional[StrictStr] = None,
1742
+ q_answer_api_key: Optional[StrictStr] = None,
1743
+ _request_timeout: Union[
1744
+ None,
1745
+ Annotated[StrictFloat, Field(gt=0)],
1746
+ Tuple[
1747
+ Annotated[StrictFloat, Field(gt=0)],
1748
+ Annotated[StrictFloat, Field(gt=0)]
1749
+ ]
1750
+ ] = None,
1751
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1752
+ _content_type: Optional[StrictStr] = None,
1753
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1754
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1755
+ ) -> RESTResponseType:
1756
+ """List Gdrive Files
1757
+
1758
+ List GDrive files
1759
+
1760
+ :param username: (required)
1761
+ :type username: str
1762
+ :param dataset: (required)
1763
+ :type dataset: str
1764
+ :param connector_id:
1765
+ :type connector_id: int
1766
+ :param folder_id:
1767
+ :type folder_id: str
1768
+ :param q_answer_api_key:
1769
+ :type q_answer_api_key: str
1770
+ :param _request_timeout: timeout setting for this request. If one
1771
+ number provided, it will be total request
1772
+ timeout. It can also be a pair (tuple) of
1773
+ (connection, read) timeouts.
1774
+ :type _request_timeout: int, tuple(int, int), optional
1775
+ :param _request_auth: set to override the auth_settings for an a single
1776
+ request; this effectively ignores the
1777
+ authentication in the spec for a single request.
1778
+ :type _request_auth: dict, optional
1779
+ :param _content_type: force content-type for the request.
1780
+ :type _content_type: str, Optional
1781
+ :param _headers: set to override the headers for a single
1782
+ request; this effectively ignores the headers
1783
+ in the spec for a single request.
1784
+ :type _headers: dict, optional
1785
+ :param _host_index: set to override the host_index for a single
1786
+ request; this effectively ignores the host_index
1787
+ in the spec for a single request.
1788
+ :type _host_index: int, optional
1789
+ :return: Returns the result object.
1790
+ """ # noqa: E501
1791
+
1792
+ _param = self._list_gdrive_files_serialize(
1793
+ username=username,
1794
+ dataset=dataset,
1795
+ connector_id=connector_id,
1796
+ folder_id=folder_id,
1797
+ q_answer_api_key=q_answer_api_key,
1798
+ _request_auth=_request_auth,
1799
+ _content_type=_content_type,
1800
+ _headers=_headers,
1801
+ _host_index=_host_index
1802
+ )
1803
+
1804
+ _response_types_map: Dict[str, Optional[str]] = {
1805
+ '200': "ListFilesConnectorResponse",
1806
+ '422': "HTTPValidationError",
1807
+ }
1808
+ response_data = self.api_client.call_api(
1809
+ *_param,
1810
+ _request_timeout=_request_timeout
1811
+ )
1812
+ return response_data.response
1813
+
1814
+
1815
+ def _list_gdrive_files_serialize(
1816
+ self,
1817
+ username,
1818
+ dataset,
1819
+ connector_id,
1820
+ folder_id,
1821
+ q_answer_api_key,
1822
+ _request_auth,
1823
+ _content_type,
1824
+ _headers,
1825
+ _host_index,
1826
+ ) -> RequestSerialized:
1827
+
1828
+ _host = None
1829
+
1830
+ _collection_formats: Dict[str, str] = {
1831
+ }
1832
+
1833
+ _path_params: Dict[str, str] = {}
1834
+ _query_params: List[Tuple[str, str]] = []
1835
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1836
+ _form_params: List[Tuple[str, str]] = []
1837
+ _files: Dict[
1838
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1839
+ ] = {}
1840
+ _body_params: Optional[bytes] = None
1841
+
1842
+ # process the path parameters
1843
+ # process the query parameters
1844
+ if username is not None:
1845
+
1846
+ _query_params.append(('username', username))
1847
+
1848
+ if dataset is not None:
1849
+
1850
+ _query_params.append(('dataset', dataset))
1851
+
1852
+ if connector_id is not None:
1853
+
1854
+ _query_params.append(('connectorId', connector_id))
1855
+
1856
+ if folder_id is not None:
1857
+
1858
+ _query_params.append(('folderId', folder_id))
1859
+
1860
+ # process the header parameters
1861
+ if q_answer_api_key is not None:
1862
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
1863
+ # process the form parameters
1864
+ # process the body parameter
1865
+
1866
+
1867
+ # set the HTTP header `Accept`
1868
+ if 'Accept' not in _header_params:
1869
+ _header_params['Accept'] = self.api_client.select_header_accept(
1870
+ [
1871
+ 'application/json'
1872
+ ]
1873
+ )
1874
+
1875
+
1876
+ # authentication setting
1877
+ _auth_settings: List[str] = [
1878
+ 'QAnswer-Api-Key',
1879
+ 'Bearer token'
1880
+ ]
1881
+
1882
+ return self.api_client.param_serialize(
1883
+ method='GET',
1884
+ resource_path='/api/connectors/google-drive/list',
1885
+ path_params=_path_params,
1886
+ query_params=_query_params,
1887
+ header_params=_header_params,
1888
+ body=_body_params,
1889
+ post_params=_form_params,
1890
+ files=_files,
1891
+ auth_settings=_auth_settings,
1892
+ collection_formats=_collection_formats,
1893
+ _host=_host,
1894
+ _request_auth=_request_auth
1895
+ )
1896
+
1897
+
1898
+
1899
+
1900
+ @validate_call
1901
+ def refresh_gdrive_connector(
1902
+ self,
1903
+ g_drive_refresh_request: GDriveRefreshRequest,
1904
+ _request_timeout: Union[
1905
+ None,
1906
+ Annotated[StrictFloat, Field(gt=0)],
1907
+ Tuple[
1908
+ Annotated[StrictFloat, Field(gt=0)],
1909
+ Annotated[StrictFloat, Field(gt=0)]
1910
+ ]
1911
+ ] = None,
1912
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1913
+ _content_type: Optional[StrictStr] = None,
1914
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1915
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1916
+ ) -> StatusResponse:
1917
+ """Refresh Gdrive Connector
1918
+
1919
+ Sync Google Drive connector: detect new, modified, and deleted files.
1920
+
1921
+ :param g_drive_refresh_request: (required)
1922
+ :type g_drive_refresh_request: GDriveRefreshRequest
1923
+ :param _request_timeout: timeout setting for this request. If one
1924
+ number provided, it will be total request
1925
+ timeout. It can also be a pair (tuple) of
1926
+ (connection, read) timeouts.
1927
+ :type _request_timeout: int, tuple(int, int), optional
1928
+ :param _request_auth: set to override the auth_settings for an a single
1929
+ request; this effectively ignores the
1930
+ authentication in the spec for a single request.
1931
+ :type _request_auth: dict, optional
1932
+ :param _content_type: force content-type for the request.
1933
+ :type _content_type: str, Optional
1934
+ :param _headers: set to override the headers for a single
1935
+ request; this effectively ignores the headers
1936
+ in the spec for a single request.
1937
+ :type _headers: dict, optional
1938
+ :param _host_index: set to override the host_index for a single
1939
+ request; this effectively ignores the host_index
1940
+ in the spec for a single request.
1941
+ :type _host_index: int, optional
1942
+ :return: Returns the result object.
1943
+ """ # noqa: E501
1944
+
1945
+ _param = self._refresh_gdrive_connector_serialize(
1946
+ g_drive_refresh_request=g_drive_refresh_request,
1947
+ _request_auth=_request_auth,
1948
+ _content_type=_content_type,
1949
+ _headers=_headers,
1950
+ _host_index=_host_index
1951
+ )
1952
+
1953
+ _response_types_map: Dict[str, Optional[str]] = {
1954
+ '200': "StatusResponse",
1955
+ '422': "HTTPValidationError",
1956
+ }
1957
+ response_data = self.api_client.call_api(
1958
+ *_param,
1959
+ _request_timeout=_request_timeout
1960
+ )
1961
+ response_data.read()
1962
+ return self.api_client.response_deserialize(
1963
+ response_data=response_data,
1964
+ response_types_map=_response_types_map,
1965
+ ).data
1966
+
1967
+
1968
+ @validate_call
1969
+ def refresh_gdrive_connector_with_http_info(
1970
+ self,
1971
+ g_drive_refresh_request: GDriveRefreshRequest,
1972
+ _request_timeout: Union[
1973
+ None,
1974
+ Annotated[StrictFloat, Field(gt=0)],
1975
+ Tuple[
1976
+ Annotated[StrictFloat, Field(gt=0)],
1977
+ Annotated[StrictFloat, Field(gt=0)]
1978
+ ]
1979
+ ] = None,
1980
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1981
+ _content_type: Optional[StrictStr] = None,
1982
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1983
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1984
+ ) -> ApiResponse[StatusResponse]:
1985
+ """Refresh Gdrive Connector
1986
+
1987
+ Sync Google Drive connector: detect new, modified, and deleted files.
1988
+
1989
+ :param g_drive_refresh_request: (required)
1990
+ :type g_drive_refresh_request: GDriveRefreshRequest
1991
+ :param _request_timeout: timeout setting for this request. If one
1992
+ number provided, it will be total request
1993
+ timeout. It can also be a pair (tuple) of
1994
+ (connection, read) timeouts.
1995
+ :type _request_timeout: int, tuple(int, int), optional
1996
+ :param _request_auth: set to override the auth_settings for an a single
1997
+ request; this effectively ignores the
1998
+ authentication in the spec for a single request.
1999
+ :type _request_auth: dict, optional
2000
+ :param _content_type: force content-type for the request.
2001
+ :type _content_type: str, Optional
2002
+ :param _headers: set to override the headers for a single
2003
+ request; this effectively ignores the headers
2004
+ in the spec for a single request.
2005
+ :type _headers: dict, optional
2006
+ :param _host_index: set to override the host_index for a single
2007
+ request; this effectively ignores the host_index
2008
+ in the spec for a single request.
2009
+ :type _host_index: int, optional
2010
+ :return: Returns the result object.
2011
+ """ # noqa: E501
2012
+
2013
+ _param = self._refresh_gdrive_connector_serialize(
2014
+ g_drive_refresh_request=g_drive_refresh_request,
2015
+ _request_auth=_request_auth,
2016
+ _content_type=_content_type,
2017
+ _headers=_headers,
2018
+ _host_index=_host_index
2019
+ )
2020
+
2021
+ _response_types_map: Dict[str, Optional[str]] = {
2022
+ '200': "StatusResponse",
2023
+ '422': "HTTPValidationError",
2024
+ }
2025
+ response_data = self.api_client.call_api(
2026
+ *_param,
2027
+ _request_timeout=_request_timeout
2028
+ )
2029
+ response_data.read()
2030
+ return self.api_client.response_deserialize(
2031
+ response_data=response_data,
2032
+ response_types_map=_response_types_map,
2033
+ )
2034
+
2035
+
2036
+ @validate_call
2037
+ def refresh_gdrive_connector_without_preload_content(
2038
+ self,
2039
+ g_drive_refresh_request: GDriveRefreshRequest,
2040
+ _request_timeout: Union[
2041
+ None,
2042
+ Annotated[StrictFloat, Field(gt=0)],
2043
+ Tuple[
2044
+ Annotated[StrictFloat, Field(gt=0)],
2045
+ Annotated[StrictFloat, Field(gt=0)]
2046
+ ]
2047
+ ] = None,
2048
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2049
+ _content_type: Optional[StrictStr] = None,
2050
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2051
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2052
+ ) -> RESTResponseType:
2053
+ """Refresh Gdrive Connector
2054
+
2055
+ Sync Google Drive connector: detect new, modified, and deleted files.
2056
+
2057
+ :param g_drive_refresh_request: (required)
2058
+ :type g_drive_refresh_request: GDriveRefreshRequest
2059
+ :param _request_timeout: timeout setting for this request. If one
2060
+ number provided, it will be total request
2061
+ timeout. It can also be a pair (tuple) of
2062
+ (connection, read) timeouts.
2063
+ :type _request_timeout: int, tuple(int, int), optional
2064
+ :param _request_auth: set to override the auth_settings for an a single
2065
+ request; this effectively ignores the
2066
+ authentication in the spec for a single request.
2067
+ :type _request_auth: dict, optional
2068
+ :param _content_type: force content-type for the request.
2069
+ :type _content_type: str, Optional
2070
+ :param _headers: set to override the headers for a single
2071
+ request; this effectively ignores the headers
2072
+ in the spec for a single request.
2073
+ :type _headers: dict, optional
2074
+ :param _host_index: set to override the host_index for a single
2075
+ request; this effectively ignores the host_index
2076
+ in the spec for a single request.
2077
+ :type _host_index: int, optional
2078
+ :return: Returns the result object.
2079
+ """ # noqa: E501
2080
+
2081
+ _param = self._refresh_gdrive_connector_serialize(
2082
+ g_drive_refresh_request=g_drive_refresh_request,
2083
+ _request_auth=_request_auth,
2084
+ _content_type=_content_type,
2085
+ _headers=_headers,
2086
+ _host_index=_host_index
2087
+ )
2088
+
2089
+ _response_types_map: Dict[str, Optional[str]] = {
2090
+ '200': "StatusResponse",
2091
+ '422': "HTTPValidationError",
2092
+ }
2093
+ response_data = self.api_client.call_api(
2094
+ *_param,
2095
+ _request_timeout=_request_timeout
2096
+ )
2097
+ return response_data.response
2098
+
2099
+
2100
+ def _refresh_gdrive_connector_serialize(
2101
+ self,
2102
+ g_drive_refresh_request,
2103
+ _request_auth,
2104
+ _content_type,
2105
+ _headers,
2106
+ _host_index,
2107
+ ) -> RequestSerialized:
2108
+
2109
+ _host = None
2110
+
2111
+ _collection_formats: Dict[str, str] = {
2112
+ }
2113
+
2114
+ _path_params: Dict[str, str] = {}
2115
+ _query_params: List[Tuple[str, str]] = []
2116
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2117
+ _form_params: List[Tuple[str, str]] = []
2118
+ _files: Dict[
2119
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2120
+ ] = {}
2121
+ _body_params: Optional[bytes] = None
2122
+
2123
+ # process the path parameters
2124
+ # process the query parameters
2125
+ # process the header parameters
2126
+ # process the form parameters
2127
+ # process the body parameter
2128
+ if g_drive_refresh_request is not None:
2129
+ _body_params = g_drive_refresh_request
2130
+
2131
+
2132
+ # set the HTTP header `Accept`
2133
+ if 'Accept' not in _header_params:
2134
+ _header_params['Accept'] = self.api_client.select_header_accept(
2135
+ [
2136
+ 'application/json'
2137
+ ]
2138
+ )
2139
+
2140
+ # set the HTTP header `Content-Type`
2141
+ if _content_type:
2142
+ _header_params['Content-Type'] = _content_type
2143
+ else:
2144
+ _default_content_type = (
2145
+ self.api_client.select_header_content_type(
2146
+ [
2147
+ 'application/json'
2148
+ ]
2149
+ )
2150
+ )
2151
+ if _default_content_type is not None:
2152
+ _header_params['Content-Type'] = _default_content_type
2153
+
2154
+ # authentication setting
2155
+ _auth_settings: List[str] = [
2156
+ 'QAnswer-Api-Key',
2157
+ 'Bearer token'
2158
+ ]
2159
+
2160
+ return self.api_client.param_serialize(
2161
+ method='POST',
2162
+ resource_path='/api/connectors/google-drive/refresh',
2163
+ path_params=_path_params,
2164
+ query_params=_query_params,
2165
+ header_params=_header_params,
2166
+ body=_body_params,
2167
+ post_params=_form_params,
2168
+ files=_files,
2169
+ auth_settings=_auth_settings,
2170
+ collection_formats=_collection_formats,
2171
+ _host=_host,
2172
+ _request_auth=_request_auth
2173
+ )
2174
+
2175
+