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.
- qanswer_sdk/__init__.py +1256 -0
- qanswer_sdk/api/__init__.py +63 -0
- qanswer_sdk/api/admin_api.py +7893 -0
- qanswer_sdk/api/ai_assistant_access_rights_api.py +5881 -0
- qanswer_sdk/api/ai_assistant_api.py +11047 -0
- qanswer_sdk/api/anthropic_compatible_api.py +311 -0
- qanswer_sdk/api/auto_complete_api.py +612 -0
- qanswer_sdk/api/bot_slack_api.py +1015 -0
- qanswer_sdk/api/branding_api.py +5733 -0
- qanswer_sdk/api/bulk_reindex_api.py +2029 -0
- qanswer_sdk/api/chatbot_api.py +1102 -0
- qanswer_sdk/api/connector_audio_api.py +3469 -0
- qanswer_sdk/api/connector_document_api.py +2685 -0
- qanswer_sdk/api/connector_e_consilium_api.py +333 -0
- qanswer_sdk/api/connector_e_consilium_search_index_api_api.py +1231 -0
- qanswer_sdk/api/connector_google_drive_api.py +2175 -0
- qanswer_sdk/api/connector_imapapi_api.py +1866 -0
- qanswer_sdk/api/connector_one_drive_api.py +1579 -0
- qanswer_sdk/api/connector_onenote_api.py +1596 -0
- qanswer_sdk/api/connector_pinecone_api.py +893 -0
- qanswer_sdk/api/connector_publication_office_api_api.py +1230 -0
- qanswer_sdk/api/connector_qn_a_api.py +1521 -0
- qanswer_sdk/api/connector_rdf_answer_api.py +1454 -0
- qanswer_sdk/api/connector_rdf_api.py +5090 -0
- qanswer_sdk/api/connector_sharepoint_api.py +3926 -0
- qanswer_sdk/api/connector_websearch_api.py +332 -0
- qanswer_sdk/api/connector_website_api.py +3108 -0
- qanswer_sdk/api/connector_x_wiki_api_api.py +1278 -0
- qanswer_sdk/api/connectors_api.py +6946 -0
- qanswer_sdk/api/connectors_data_api.py +5903 -0
- qanswer_sdk/api/conversation_logs_api.py +14228 -0
- qanswer_sdk/api/dataset_config_api.py +4016 -0
- qanswer_sdk/api/debug_api.py +278 -0
- qanswer_sdk/api/default_api.py +763 -0
- qanswer_sdk/api/frontend_config_api.py +270 -0
- qanswer_sdk/api/health_check_api_api.py +278 -0
- qanswer_sdk/api/mcp_api.py +10758 -0
- qanswer_sdk/api/metadata_api.py +1309 -0
- qanswer_sdk/api/notifications_api.py +1842 -0
- qanswer_sdk/api/o_auth2_api.py +648 -0
- qanswer_sdk/api/open_ai_compatible_api.py +1093 -0
- qanswer_sdk/api/payment_api.py +1854 -0
- qanswer_sdk/api/retention_policy_api.py +4404 -0
- qanswer_sdk/api/socket_api.py +4706 -0
- qanswer_sdk/api/speech_to_text_api.py +968 -0
- qanswer_sdk/api/task_ai_excel_api.py +3749 -0
- qanswer_sdk/api/task_chat_api.py +2079 -0
- qanswer_sdk/api/task_entity_linking_api.py +315 -0
- qanswer_sdk/api/task_rdf_linker_api.py +4407 -0
- qanswer_sdk/api/task_rdf_sparql_endpoint_api.py +3355 -0
- qanswer_sdk/api/task_rdf_text_linker_api.py +1513 -0
- qanswer_sdk/api/task_report_copilot_api.py +7355 -0
- qanswer_sdk/api/task_search_api.py +2142 -0
- qanswer_sdk/api/task_text2sparql_api.py +947 -0
- qanswer_sdk/api/task_text_classification_api.py +592 -0
- qanswer_sdk/api/tasks_api.py +26394 -0
- qanswer_sdk/api/tool_embedder_api.py +5532 -0
- qanswer_sdk/api/tool_llm_api.py +6364 -0
- qanswer_sdk/api/unit_organizations_api.py +8600 -0
- qanswer_sdk/api/unit_teams_api.py +4492 -0
- qanswer_sdk/api/unit_user_api.py +12759 -0
- qanswer_sdk/api_client.py +804 -0
- qanswer_sdk/api_response.py +21 -0
- qanswer_sdk/configuration.py +614 -0
- qanswer_sdk/exceptions.py +216 -0
- qanswer_sdk/models/__init__.py +562 -0
- qanswer_sdk/models/access_audio_spans_response_model.py +91 -0
- qanswer_sdk/models/access_pdf_payload_model.py +102 -0
- qanswer_sdk/models/access_type.py +42 -0
- qanswer_sdk/models/access_type_shared.py +38 -0
- qanswer_sdk/models/add_qn_a_request.py +103 -0
- qanswer_sdk/models/add_synonyms.py +93 -0
- qanswer_sdk/models/add_synonyms_resp.py +89 -0
- qanswer_sdk/models/admin_overall_stats_response.py +105 -0
- qanswer_sdk/models/admin_user_overall_stats.py +99 -0
- qanswer_sdk/models/advanced_o_auth2_mcp_authentication_config.py +95 -0
- qanswer_sdk/models/aggregate.py +93 -0
- qanswer_sdk/models/aggregation.py +110 -0
- qanswer_sdk/models/aggregation_type.py +41 -0
- qanswer_sdk/models/aggregations_group.py +102 -0
- qanswer_sdk/models/ai_assistant_clone_response.py +91 -0
- qanswer_sdk/models/ai_assistant_dto.py +113 -0
- qanswer_sdk/models/ai_assistant_filter_dto.py +113 -0
- qanswer_sdk/models/ai_assistant_list.py +101 -0
- qanswer_sdk/models/ai_assistant_share_response.py +93 -0
- qanswer_sdk/models/ai_assistant_shared_access.py +95 -0
- qanswer_sdk/models/ai_excel_entity_result.py +97 -0
- qanswer_sdk/models/ai_excel_entity_search_payload.py +95 -0
- qanswer_sdk/models/ai_excel_entity_search_response.py +103 -0
- qanswer_sdk/models/ai_excel_global_settings.py +95 -0
- qanswer_sdk/models/ai_excel_global_settings_request.py +95 -0
- qanswer_sdk/models/ai_excel_task_settings.py +119 -0
- qanswer_sdk/models/ai_excel_task_update.py +119 -0
- qanswer_sdk/models/ai_excel_template_create.py +119 -0
- qanswer_sdk/models/ai_excel_template_read.py +121 -0
- qanswer_sdk/models/ai_excel_template_settings_request.py +91 -0
- qanswer_sdk/models/ai_excel_template_update.py +125 -0
- qanswer_sdk/models/ai_excel_templates_search_request.py +104 -0
- qanswer_sdk/models/ai_excel_templates_search_response.py +101 -0
- qanswer_sdk/models/allowed_extension.py +53 -0
- qanswer_sdk/models/allowed_file_extensions.py +88 -0
- qanswer_sdk/models/api_key_header_type.py +39 -0
- qanswer_sdk/models/api_key_mcp_authentication_config.py +98 -0
- qanswer_sdk/models/applied_filter_type.py +37 -0
- qanswer_sdk/models/applied_metadata_filter.py +97 -0
- qanswer_sdk/models/apply_template_task_settings_to_slots_response.py +89 -0
- qanswer_sdk/models/assistant_category_color_definition.py +89 -0
- qanswer_sdk/models/assistant_category_color_item.py +89 -0
- qanswer_sdk/models/assistant_category_colors_update_payload.py +95 -0
- qanswer_sdk/models/assistant_category_count.py +91 -0
- qanswer_sdk/models/assistant_message_stop.py +93 -0
- qanswer_sdk/models/assistant_retention_response.py +97 -0
- qanswer_sdk/models/assistant_task.py +43 -0
- qanswer_sdk/models/assistant_template_with_tools_selection_dto.py +123 -0
- qanswer_sdk/models/audio_allowed_file_extensions.py +87 -0
- qanswer_sdk/models/audio_format.py +37 -0
- qanswer_sdk/models/audio_segment.py +95 -0
- qanswer_sdk/models/audio_segment_update_payload.py +97 -0
- qanswer_sdk/models/audio_segment_update_response.py +91 -0
- qanswer_sdk/models/audio_speaker_update_payload.py +99 -0
- qanswer_sdk/models/audio_speaker_update_response.py +91 -0
- qanswer_sdk/models/audio_transcription_list_response.py +101 -0
- qanswer_sdk/models/audio_transcription_mode.py +37 -0
- qanswer_sdk/models/audio_transcription_record.py +101 -0
- qanswer_sdk/models/audio_transcription_status.py +39 -0
- qanswer_sdk/models/audio_upload_response.py +91 -0
- qanswer_sdk/models/audio_word_segment.py +93 -0
- qanswer_sdk/models/audio_word_span_change.py +94 -0
- qanswer_sdk/models/audio_word_span_update_payload.py +104 -0
- qanswer_sdk/models/audio_word_span_update_response.py +91 -0
- qanswer_sdk/models/audio_word_update_payload.py +100 -0
- qanswer_sdk/models/audio_word_update_response.py +91 -0
- qanswer_sdk/models/auth_link_response.py +91 -0
- qanswer_sdk/models/auto_bot_description_request.py +89 -0
- qanswer_sdk/models/auto_bot_description_response.py +87 -0
- qanswer_sdk/models/available_aggregation.py +92 -0
- qanswer_sdk/models/available_connectors_response.py +92 -0
- qanswer_sdk/models/available_logs_visibility_policy.py +91 -0
- qanswer_sdk/models/available_space_quota_for_dataset.py +95 -0
- qanswer_sdk/models/available_storage_preference.py +91 -0
- qanswer_sdk/models/base_connectors_response.py +89 -0
- qanswer_sdk/models/base_conversation_response.py +89 -0
- qanswer_sdk/models/base_feedback_response.py +89 -0
- qanswer_sdk/models/bot_answer_length.py +38 -0
- qanswer_sdk/models/branding_app_title.py +87 -0
- qanswer_sdk/models/branding_system_message.py +87 -0
- qanswer_sdk/models/bulk_reindex_counts_by_type.py +89 -0
- qanswer_sdk/models/bulk_reindex_item_status.py +41 -0
- qanswer_sdk/models/bulk_reindex_job_detail_dto.py +103 -0
- qanswer_sdk/models/bulk_reindex_job_dto.py +125 -0
- qanswer_sdk/models/bulk_reindex_job_item_dto.py +113 -0
- qanswer_sdk/models/bulk_reindex_job_item_sort_by.py +40 -0
- qanswer_sdk/models/bulk_reindex_job_status.py +41 -0
- qanswer_sdk/models/bulk_reindex_jobs_list_response.py +97 -0
- qanswer_sdk/models/bulk_reindex_preview_counts.py +99 -0
- qanswer_sdk/models/bulk_reindex_preview_request.py +91 -0
- qanswer_sdk/models/bulk_reindex_preview_response.py +102 -0
- qanswer_sdk/models/bulk_reindex_skip_reason.py +40 -0
- qanswer_sdk/models/bulk_reindex_sort_order.py +37 -0
- qanswer_sdk/models/bulk_reindex_submit_request.py +94 -0
- qanswer_sdk/models/bulk_update_tool_selections_request.py +87 -0
- qanswer_sdk/models/capability_type.py +37 -0
- qanswer_sdk/models/cell.py +89 -0
- qanswer_sdk/models/change_password.py +89 -0
- qanswer_sdk/models/change_password_admin.py +89 -0
- qanswer_sdk/models/change_role.py +90 -0
- qanswer_sdk/models/chat_task_settings.py +141 -0
- qanswer_sdk/models/chat_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/chat_task_update.py +139 -0
- qanswer_sdk/models/chatbot_chat_payload.py +150 -0
- qanswer_sdk/models/chatbot_default_settings_response.py +95 -0
- qanswer_sdk/models/chatbot_llm_dto.py +120 -0
- qanswer_sdk/models/chatbot_response.py +143 -0
- qanswer_sdk/models/chatbot_setting_dto.py +99 -0
- qanswer_sdk/models/chatbot_setting_request.py +91 -0
- qanswer_sdk/models/class_info.py +89 -0
- qanswer_sdk/models/config.py +228 -0
- qanswer_sdk/models/config1.py +138 -0
- qanswer_sdk/models/connector_config_list_response.py +99 -0
- qanswer_sdk/models/connector_config_model.py +96 -0
- qanswer_sdk/models/connector_config_patch_payload.py +93 -0
- qanswer_sdk/models/connector_config_response.py +95 -0
- qanswer_sdk/models/connector_config_sync_response.py +93 -0
- qanswer_sdk/models/connector_config_type.py +37 -0
- qanswer_sdk/models/connector_model.py +114 -0
- qanswer_sdk/models/connector_type.py +51 -0
- qanswer_sdk/models/connector_type_dto.py +92 -0
- qanswer_sdk/models/connector_type_list_dto.py +95 -0
- qanswer_sdk/models/content_item.py +106 -0
- qanswer_sdk/models/content_item_type.py +39 -0
- qanswer_sdk/models/conversation_aggregations_request.py +107 -0
- qanswer_sdk/models/conversation_message.py +230 -0
- qanswer_sdk/models/conversation_message_error_key.py +52 -0
- qanswer_sdk/models/conversation_message_search_result.py +112 -0
- qanswer_sdk/models/conversation_model.py +144 -0
- qanswer_sdk/models/conversation_overall_stats.py +97 -0
- qanswer_sdk/models/conversation_overall_stats_response.py +95 -0
- qanswer_sdk/models/conversation_retention_response.py +91 -0
- qanswer_sdk/models/conversation_statistics.py +95 -0
- qanswer_sdk/models/conversation_update.py +93 -0
- qanswer_sdk/models/conversation_users_stats.py +99 -0
- qanswer_sdk/models/conversation_users_stats_response.py +99 -0
- qanswer_sdk/models/coordinates.py +89 -0
- qanswer_sdk/models/cost_summary_dto.py +99 -0
- qanswer_sdk/models/create_connector_request.py +95 -0
- qanswer_sdk/models/create_connector_response.py +95 -0
- qanswer_sdk/models/create_imap_connector_request.py +105 -0
- qanswer_sdk/models/create_pinecone_connector_request.py +97 -0
- qanswer_sdk/models/create_sharepoint_connector_from_certificate_request.py +105 -0
- qanswer_sdk/models/create_sharepoint_connector_request.py +103 -0
- qanswer_sdk/models/create_x_wiki_connector_request.py +103 -0
- qanswer_sdk/models/credits_info_dto.py +95 -0
- qanswer_sdk/models/credits_info_global_dto.py +97 -0
- qanswer_sdk/models/currency.py +38 -0
- qanswer_sdk/models/data.py +211 -0
- qanswer_sdk/models/data_filling_mode.py +39 -0
- qanswer_sdk/models/data_storage_preference.py +38 -0
- qanswer_sdk/models/dataset_config_request.py +138 -0
- qanswer_sdk/models/dataset_default_values_model.py +129 -0
- qanswer_sdk/models/dataset_detail.py +128 -0
- qanswer_sdk/models/dataset_detail_kg.py +88 -0
- qanswer_sdk/models/dataset_schema.py +193 -0
- qanswer_sdk/models/dataset_type.py +38 -0
- qanswer_sdk/models/dataset_update_object.py +185 -0
- qanswer_sdk/models/dataset_users_response.py +87 -0
- qanswer_sdk/models/default_prompt.py +100 -0
- qanswer_sdk/models/delete_connector_model.py +90 -0
- qanswer_sdk/models/delete_connector_request.py +99 -0
- qanswer_sdk/models/delete_connectors_response.py +89 -0
- qanswer_sdk/models/delete_files_status_response.py +91 -0
- qanswer_sdk/models/delete_index.py +91 -0
- qanswer_sdk/models/delete_index_resp.py +89 -0
- qanswer_sdk/models/delete_qn_a_pair_request.py +95 -0
- qanswer_sdk/models/delete_qn_a_pair_response.py +89 -0
- qanswer_sdk/models/delete_synonym.py +93 -0
- qanswer_sdk/models/delete_synonym_resp.py +89 -0
- qanswer_sdk/models/delete_synonyms.py +91 -0
- qanswer_sdk/models/diarization_queue_status.py +99 -0
- qanswer_sdk/models/document_content_response.py +91 -0
- qanswer_sdk/models/document_content_update_model.py +99 -0
- qanswer_sdk/models/document_file_delete_by_connector_model.py +101 -0
- qanswer_sdk/models/document_file_delete_by_id_model.py +91 -0
- qanswer_sdk/models/document_parsing_task_settings.py +124 -0
- qanswer_sdk/models/document_parsing_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/document_parsing_task_update.py +121 -0
- qanswer_sdk/models/document_status_group.py +39 -0
- qanswer_sdk/models/document_status_response.py +89 -0
- qanswer_sdk/models/dummy_error.py +89 -0
- qanswer_sdk/models/duplicate_ai_excel_template_request.py +97 -0
- qanswer_sdk/models/duplicate_ai_excel_template_response.py +87 -0
- qanswer_sdk/models/duplicate_report_template_payload.py +97 -0
- qanswer_sdk/models/duplicate_report_template_response.py +87 -0
- qanswer_sdk/models/e_consilium_connector_config.py +108 -0
- qanswer_sdk/models/e_consilium_search_index_search_response.py +113 -0
- qanswer_sdk/models/econsilium_file_metadata.py +105 -0
- qanswer_sdk/models/econsilium_search_index_add_payload.py +107 -0
- qanswer_sdk/models/econsilium_search_index_additional_fields.py +103 -0
- qanswer_sdk/models/effective_retention_dto.py +95 -0
- qanswer_sdk/models/email_folder.py +91 -0
- qanswer_sdk/models/email_request.py +87 -0
- qanswer_sdk/models/embedder_cost_filter.py +112 -0
- qanswer_sdk/models/embedder_cost_list.py +101 -0
- qanswer_sdk/models/embedder_create_dto.py +143 -0
- qanswer_sdk/models/embedder_detailed_dto.py +163 -0
- qanswer_sdk/models/embedder_dto.py +103 -0
- qanswer_sdk/models/embedder_list_dto.py +101 -0
- qanswer_sdk/models/embedder_ref.py +95 -0
- qanswer_sdk/models/embedder_update_dto.py +135 -0
- qanswer_sdk/models/embedding_endpoint_import_failure.py +89 -0
- qanswer_sdk/models/embedding_endpoint_import_response.py +99 -0
- qanswer_sdk/models/embedding_endpoint_modality.py +37 -0
- qanswer_sdk/models/embedding_endpoint_validation_response.py +90 -0
- qanswer_sdk/models/embedding_provider.py +44 -0
- qanswer_sdk/models/enable_enhanced_context_payload.py +91 -0
- qanswer_sdk/models/enable_enhanced_context_response.py +87 -0
- qanswer_sdk/models/endpoint_status.py +38 -0
- qanswer_sdk/models/entity_description_dto.py +93 -0
- qanswer_sdk/models/entity_linking_payload.py +97 -0
- qanswer_sdk/models/entity_linking_response.py +97 -0
- qanswer_sdk/models/entity_model_in_linking.py +95 -0
- qanswer_sdk/models/es_meta_data.py +92 -0
- qanswer_sdk/models/es_meta_data_value.py +87 -0
- qanswer_sdk/models/evaluate_feedback_response.py +109 -0
- qanswer_sdk/models/evaluate_single_feedback_response.py +97 -0
- qanswer_sdk/models/extra_body.py +91 -0
- qanswer_sdk/models/extract_hyper_links_payload.py +100 -0
- qanswer_sdk/models/extract_robot_links_payload.py +88 -0
- qanswer_sdk/models/extract_robot_links_response.py +88 -0
- qanswer_sdk/models/extraction_strategy.py +38 -0
- qanswer_sdk/models/fact.py +96 -0
- qanswer_sdk/models/feedback_evaluation_history_entries_response.py +101 -0
- qanswer_sdk/models/feedback_evaluation_history_entry_model.py +105 -0
- qanswer_sdk/models/feedback_model.py +132 -0
- qanswer_sdk/models/feedback_response.py +95 -0
- qanswer_sdk/models/feedback_update.py +105 -0
- qanswer_sdk/models/file_acl_principal.py +99 -0
- qanswer_sdk/models/file_acl_response.py +101 -0
- qanswer_sdk/models/file_es_meta_data.py +116 -0
- qanswer_sdk/models/file_failure_reason.py +49 -0
- qanswer_sdk/models/file_folder_model.py +117 -0
- qanswer_sdk/models/file_model.py +124 -0
- qanswer_sdk/models/file_status.py +43 -0
- qanswer_sdk/models/file_type.py +37 -0
- qanswer_sdk/models/file_upload_payload.py +107 -0
- qanswer_sdk/models/files_by_connector_model.py +89 -0
- qanswer_sdk/models/g_drive_connector_info.py +96 -0
- qanswer_sdk/models/g_drive_download_by_ids.py +89 -0
- qanswer_sdk/models/g_drive_download_request.py +103 -0
- qanswer_sdk/models/g_drive_refresh_request.py +91 -0
- qanswer_sdk/models/generation_params.py +89 -0
- qanswer_sdk/models/get_connector_by_id_response.py +91 -0
- qanswer_sdk/models/get_conversation_response.py +95 -0
- qanswer_sdk/models/global_config_dto.py +155 -0
- qanswer_sdk/models/google_drive_connector_config.py +110 -0
- qanswer_sdk/models/guardrail_endpoint.py +112 -0
- qanswer_sdk/models/guardrail_mode.py +38 -0
- qanswer_sdk/models/highlight_audio_payload_model.py +100 -0
- qanswer_sdk/models/http_validation_error.py +95 -0
- qanswer_sdk/models/iframe_strategy.py +38 -0
- qanswer_sdk/models/image_url_detail.py +38 -0
- qanswer_sdk/models/imap_add_payload.py +105 -0
- qanswer_sdk/models/imap_additional_fields.py +101 -0
- qanswer_sdk/models/imap_file_metadata.py +108 -0
- qanswer_sdk/models/imap_search_response.py +113 -0
- qanswer_sdk/models/index_config.py +89 -0
- qanswer_sdk/models/install_response.py +89 -0
- qanswer_sdk/models/interface_origin.py +47 -0
- qanswer_sdk/models/ip2_geo_response.py +91 -0
- qanswer_sdk/models/is_enabled_response.py +87 -0
- qanswer_sdk/models/jwt_authentication_response.py +93 -0
- qanswer_sdk/models/label.py +89 -0
- qanswer_sdk/models/labeled_node.py +89 -0
- qanswer_sdk/models/language.py +38 -0
- qanswer_sdk/models/last_updated_template_conversation_id_response.py +87 -0
- qanswer_sdk/models/link.py +99 -0
- qanswer_sdk/models/link_extraction_response.py +97 -0
- qanswer_sdk/models/link_result_paginated.py +97 -0
- qanswer_sdk/models/linked_entity_model_in_linking.py +99 -0
- qanswer_sdk/models/linker.py +103 -0
- qanswer_sdk/models/linking_result.py +95 -0
- qanswer_sdk/models/links.py +99 -0
- qanswer_sdk/models/list_connectors_response.py +95 -0
- qanswer_sdk/models/list_conversation_response.py +105 -0
- qanswer_sdk/models/list_feedback_response.py +105 -0
- qanswer_sdk/models/list_files_connector_response.py +107 -0
- qanswer_sdk/models/list_socket_events.py +88 -0
- qanswer_sdk/models/list_synonyms_model.py +95 -0
- qanswer_sdk/models/llm_context_ranges.py +93 -0
- qanswer_sdk/models/llm_cost_filter.py +112 -0
- qanswer_sdk/models/llm_cost_list.py +101 -0
- qanswer_sdk/models/llm_create_dto.py +177 -0
- qanswer_sdk/models/llm_detailed_dto.py +198 -0
- qanswer_sdk/models/llm_dto.py +120 -0
- qanswer_sdk/models/llm_endpoint.py +179 -0
- qanswer_sdk/models/llm_endpoint_default_prompts.py +93 -0
- qanswer_sdk/models/llm_endpoint_import_failure.py +89 -0
- qanswer_sdk/models/llm_endpoint_import_response.py +99 -0
- qanswer_sdk/models/llm_endpoint_modality.py +37 -0
- qanswer_sdk/models/llm_endpoint_provider.py +44 -0
- qanswer_sdk/models/llm_endpoint_read.py +179 -0
- qanswer_sdk/models/llm_endpoint_validation_response.py +90 -0
- qanswer_sdk/models/llm_health_response.py +89 -0
- qanswer_sdk/models/llm_list_detailed_dto.py +101 -0
- qanswer_sdk/models/llm_list_dto.py +101 -0
- qanswer_sdk/models/llm_update_dto.py +174 -0
- qanswer_sdk/models/location_details.py +97 -0
- qanswer_sdk/models/log_stats_request.py +100 -0
- qanswer_sdk/models/login_request.py +89 -0
- qanswer_sdk/models/logs_visibility_policy.py +38 -0
- qanswer_sdk/models/logs_visibility_policy_payload.py +92 -0
- qanswer_sdk/models/logs_visibility_policy_response.py +92 -0
- qanswer_sdk/models/mcp_auth_field_definition.py +98 -0
- qanswer_sdk/models/mcp_auth_field_type.py +37 -0
- qanswer_sdk/models/mcp_authentication_type.py +39 -0
- qanswer_sdk/models/mcp_connection.py +108 -0
- qanswer_sdk/models/mcp_connection_create.py +100 -0
- qanswer_sdk/models/mcp_server.py +146 -0
- qanswer_sdk/models/mcp_server_create.py +116 -0
- qanswer_sdk/models/mcp_server_type.py +37 -0
- qanswer_sdk/models/mcp_server_update.py +114 -0
- qanswer_sdk/models/mcp_tool_dto.py +131 -0
- qanswer_sdk/models/mcp_tool_info.py +95 -0
- qanswer_sdk/models/mcp_tool_selection_source.py +37 -0
- qanswer_sdk/models/mcp_tool_sync_action.py +39 -0
- qanswer_sdk/models/mcp_tool_sync_diff.py +94 -0
- qanswer_sdk/models/mcp_tool_sync_preview.py +95 -0
- qanswer_sdk/models/mcp_tool_update.py +91 -0
- qanswer_sdk/models/mcp_transport.py +37 -0
- qanswer_sdk/models/mcp_visibility.py +38 -0
- qanswer_sdk/models/mcpo_auth2_authorize_body.py +105 -0
- qanswer_sdk/models/mcpo_auth2_initiating_origin.py +42 -0
- qanswer_sdk/models/message_role.py +38 -0
- qanswer_sdk/models/messages_stats_per_day_response.py +99 -0
- qanswer_sdk/models/microsoft_connector_config.py +110 -0
- qanswer_sdk/models/modify_connector_request.py +98 -0
- qanswer_sdk/models/modify_file_display_name_request.py +97 -0
- qanswer_sdk/models/notification_dto.py +114 -0
- qanswer_sdk/models/notification_filter.py +107 -0
- qanswer_sdk/models/notification_list_dto.py +101 -0
- qanswer_sdk/models/notification_payload_add_to_org_dto.py +87 -0
- qanswer_sdk/models/notification_payload_add_to_team_dto.py +89 -0
- qanswer_sdk/models/notification_payload_ai_assistant_shared_dto.py +100 -0
- qanswer_sdk/models/notification_payload_conversation_shared_dto.py +96 -0
- qanswer_sdk/models/notification_payload_human_takeover_requested_dto.py +89 -0
- qanswer_sdk/models/notification_payload_quota_reaching_dto.py +91 -0
- qanswer_sdk/models/notification_read_dto.py +89 -0
- qanswer_sdk/models/notification_type.py +44 -0
- qanswer_sdk/models/o_auth_redirect_response.py +89 -0
- qanswer_sdk/models/o_auth_service_dto.py +89 -0
- qanswer_sdk/models/one_drive_download_by_ids.py +89 -0
- qanswer_sdk/models/one_drive_download_request.py +103 -0
- qanswer_sdk/models/one_note_download_by_ids.py +91 -0
- qanswer_sdk/models/one_note_download_request.py +103 -0
- qanswer_sdk/models/org_llm_detailed_dto.py +105 -0
- qanswer_sdk/models/org_llm_features_dto.py +89 -0
- qanswer_sdk/models/org_role.py +37 -0
- qanswer_sdk/models/org_user_profile_dto.py +210 -0
- qanswer_sdk/models/org_user_profile_list_dto.py +101 -0
- qanswer_sdk/models/organization_admin_dto.py +97 -0
- qanswer_sdk/models/organization_creation_dto.py +91 -0
- qanswer_sdk/models/organization_dto.py +93 -0
- qanswer_sdk/models/organization_list_dto.py +101 -0
- qanswer_sdk/models/organization_user_dto.py +101 -0
- qanswer_sdk/models/organization_user_list_dto.py +101 -0
- qanswer_sdk/models/paginated_report_templates.py +101 -0
- qanswer_sdk/models/password.py +89 -0
- qanswer_sdk/models/pinecone_index_model.py +91 -0
- qanswer_sdk/models/plan_dto.py +108 -0
- qanswer_sdk/models/predicted_class.py +89 -0
- qanswer_sdk/models/prepare_synonyms_upload_resp.py +99 -0
- qanswer_sdk/models/prepared_synonym_group.py +87 -0
- qanswer_sdk/models/pricing_plan.py +51 -0
- qanswer_sdk/models/pricing_type.py +38 -0
- qanswer_sdk/models/prompt_type.py +49 -0
- qanswer_sdk/models/provider.py +87 -0
- qanswer_sdk/models/publication_add_payload.py +105 -0
- qanswer_sdk/models/publication_file_metadata.py +105 -0
- qanswer_sdk/models/publication_office_additional_fields.py +111 -0
- qanswer_sdk/models/publication_office_connector_config.py +112 -0
- qanswer_sdk/models/publication_search_index_search_response.py +113 -0
- qanswer_sdk/models/qa_context.py +129 -0
- qanswer_sdk/models/qa_context_display_type.py +44 -0
- qanswer_sdk/models/qa_contexts.py +106 -0
- qanswer_sdk/models/qa_table.py +100 -0
- qanswer_sdk/models/qn_a_pair_model.py +103 -0
- qanswer_sdk/models/qn_a_pair_response.py +95 -0
- qanswer_sdk/models/rag_payload.py +185 -0
- qanswer_sdk/models/rag_response.py +147 -0
- qanswer_sdk/models/rdf_entity_linker_response.py +99 -0
- qanswer_sdk/models/rdf_linked_entity.py +97 -0
- qanswer_sdk/models/reasoning_effort.py +39 -0
- qanswer_sdk/models/reference_model.py +99 -0
- qanswer_sdk/models/refresh_frequency.py +39 -0
- qanswer_sdk/models/refresh_token_request.py +87 -0
- qanswer_sdk/models/refresh_website_connector_links_payload.py +96 -0
- qanswer_sdk/models/refresh_website_connector_payload.py +94 -0
- qanswer_sdk/models/register_pinecone_connector_request.py +95 -0
- qanswer_sdk/models/report_copilot_generation_from_slots_ack.py +91 -0
- qanswer_sdk/models/report_copilot_generation_from_slots_payload.py +95 -0
- qanswer_sdk/models/report_copilot_refinement_payload.py +106 -0
- qanswer_sdk/models/report_copilot_refinement_response.py +87 -0
- qanswer_sdk/models/report_copilot_slot_feedback_update.py +95 -0
- qanswer_sdk/models/report_copilot_slot_feedback_update_response.py +95 -0
- qanswer_sdk/models/report_copilot_slot_task_settings.py +121 -0
- qanswer_sdk/models/report_copilot_slot_task_settings_update.py +121 -0
- qanswer_sdk/models/report_copilot_task_settings.py +119 -0
- qanswer_sdk/models/report_copilot_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/report_copilot_task_update.py +119 -0
- qanswer_sdk/models/report_template.py +155 -0
- qanswer_sdk/models/report_template_create_payload.py +132 -0
- qanswer_sdk/models/report_template_image_upload_response.py +87 -0
- qanswer_sdk/models/report_template_simplified.py +116 -0
- qanswer_sdk/models/report_template_simplified_payload.py +91 -0
- qanswer_sdk/models/report_template_task_settings_update_payload.py +91 -0
- qanswer_sdk/models/report_template_update_payload.py +136 -0
- qanswer_sdk/models/report_templates_search_payload.py +106 -0
- qanswer_sdk/models/reset_password.py +87 -0
- qanswer_sdk/models/response_audit_model.py +99 -0
- qanswer_sdk/models/response_audit_stats_response.py +101 -0
- qanswer_sdk/models/response_get_dummy_union_connector_config_model_api_connectors_config_dummy_models_union_get.py +228 -0
- qanswer_sdk/models/retention_policy_dto.py +106 -0
- qanswer_sdk/models/retention_policy_update.py +101 -0
- qanswer_sdk/models/retention_preview_response.py +92 -0
- qanswer_sdk/models/retention_run_progress_event.py +98 -0
- qanswer_sdk/models/retention_run_status_response.py +91 -0
- qanswer_sdk/models/retention_scope_type.py +38 -0
- qanswer_sdk/models/retention_sweep_result.py +89 -0
- qanswer_sdk/models/retention_unit.py +38 -0
- qanswer_sdk/models/retreive_all_synonyms_resp.py +99 -0
- qanswer_sdk/models/retry_params.py +89 -0
- qanswer_sdk/models/return_type.py +38 -0
- qanswer_sdk/models/role.py +90 -0
- qanswer_sdk/models/role_name.py +37 -0
- qanswer_sdk/models/scrolling_strategy.py +37 -0
- qanswer_sdk/models/search_conversation_messages_response.py +105 -0
- qanswer_sdk/models/search_document_response.py +107 -0
- qanswer_sdk/models/search_index_payload.py +114 -0
- qanswer_sdk/models/search_metadata_filter.py +94 -0
- qanswer_sdk/models/search_payload.py +150 -0
- qanswer_sdk/models/search_response.py +120 -0
- qanswer_sdk/models/search_synonyms_resp.py +91 -0
- qanswer_sdk/models/search_task_settings.py +135 -0
- qanswer_sdk/models/search_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/search_task_update.py +133 -0
- qanswer_sdk/models/sender_type.py +38 -0
- qanswer_sdk/models/serve_pdf200_response.py +87 -0
- qanswer_sdk/models/share_point_connector_settings.py +99 -0
- qanswer_sdk/models/share_point_download_by_ids.py +99 -0
- qanswer_sdk/models/share_point_download_request.py +103 -0
- qanswer_sdk/models/shared_by.py +38 -0
- qanswer_sdk/models/shared_entity_type.py +38 -0
- qanswer_sdk/models/shared_organization_access_dto.py +116 -0
- qanswer_sdk/models/shared_team_access_dto.py +116 -0
- qanswer_sdk/models/shared_user.py +90 -0
- qanswer_sdk/models/sign_out_request.py +87 -0
- qanswer_sdk/models/sign_up_request.py +99 -0
- qanswer_sdk/models/slot.py +153 -0
- qanswer_sdk/models/slot_history_entry.py +119 -0
- qanswer_sdk/models/slot_in_prompt.py +91 -0
- qanswer_sdk/models/slot_info_with_latest_version.py +95 -0
- qanswer_sdk/models/slot_update.py +133 -0
- qanswer_sdk/models/socker_join_user.py +91 -0
- qanswer_sdk/models/socket_audio_transcription_status.py +102 -0
- qanswer_sdk/models/socket_conversation_message.py +245 -0
- qanswer_sdk/models/socket_dataset_reindexing_status.py +97 -0
- qanswer_sdk/models/socket_events_q_answer.py +55 -0
- qanswer_sdk/models/socket_feedback_evaluation_progress.py +108 -0
- qanswer_sdk/models/socket_file_metadata.py +194 -0
- qanswer_sdk/models/socket_file_status_batch.py +103 -0
- qanswer_sdk/models/socket_file_status_item.py +99 -0
- qanswer_sdk/models/socket_join_conversation.py +97 -0
- qanswer_sdk/models/socket_join_dataset.py +93 -0
- qanswer_sdk/models/socket_message_status.py +40 -0
- qanswer_sdk/models/socket_notification.py +109 -0
- qanswer_sdk/models/socket_report_continuation_response.py +100 -0
- qanswer_sdk/models/socket_report_copilot_generation_from_slots_response.py +116 -0
- qanswer_sdk/models/socket_report_copilot_generation_from_template_response.py +116 -0
- qanswer_sdk/models/socket_report_copilot_refinement_response.py +102 -0
- qanswer_sdk/models/socket_speech2_text_response.py +122 -0
- qanswer_sdk/models/socket_stop_conversation.py +97 -0
- qanswer_sdk/models/source.py +125 -0
- qanswer_sdk/models/source_metadata.py +109 -0
- qanswer_sdk/models/speech2_text_response.py +110 -0
- qanswer_sdk/models/stat_per_date.py +89 -0
- qanswer_sdk/models/status_response.py +89 -0
- qanswer_sdk/models/storage_active_status.py +37 -0
- qanswer_sdk/models/subscription_response.py +92 -0
- qanswer_sdk/models/subscription_status.py +39 -0
- qanswer_sdk/models/suggested_replies.py +87 -0
- qanswer_sdk/models/suggestion_list_response.py +87 -0
- qanswer_sdk/models/summa_server.py +101 -0
- qanswer_sdk/models/task_category.py +61 -0
- qanswer_sdk/models/task_name.py +43 -0
- qanswer_sdk/models/team_admin_dto.py +95 -0
- qanswer_sdk/models/team_creation_dto.py +89 -0
- qanswer_sdk/models/team_dto.py +93 -0
- qanswer_sdk/models/team_list_dto.py +101 -0
- qanswer_sdk/models/team_list_dto_teams_inner.py +149 -0
- qanswer_sdk/models/team_role.py +37 -0
- qanswer_sdk/models/team_with_count_dto.py +95 -0
- qanswer_sdk/models/teams_bot_auth_type.py +38 -0
- qanswer_sdk/models/teams_bot_registration_dto.py +107 -0
- qanswer_sdk/models/teams_bot_registration_upsert_dto.py +105 -0
- qanswer_sdk/models/template_clip_structure.py +114 -0
- qanswer_sdk/models/template_toggle_request.py +93 -0
- qanswer_sdk/models/terms_bucket.py +107 -0
- qanswer_sdk/models/test_imap_connection_payload.py +95 -0
- qanswer_sdk/models/text2_sparql_payload.py +187 -0
- qanswer_sdk/models/text2_sparql_task_settings.py +119 -0
- qanswer_sdk/models/text2_sparql_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/text2_sparql_task_update.py +119 -0
- qanswer_sdk/models/text_classification_payload.py +99 -0
- qanswer_sdk/models/text_classification_response.py +87 -0
- qanswer_sdk/models/text_classification_v2_payload.py +99 -0
- qanswer_sdk/models/text_classification_v2_response.py +95 -0
- qanswer_sdk/models/thinking_block.py +91 -0
- qanswer_sdk/models/tool_selection.py +89 -0
- qanswer_sdk/models/total_stat.py +96 -0
- qanswer_sdk/models/ui_mappings.py +141 -0
- qanswer_sdk/models/update_file_es_meta_data.py +116 -0
- qanswer_sdk/models/update_metadata_model.py +97 -0
- qanswer_sdk/models/update_qn_a_pair_request.py +101 -0
- qanswer_sdk/models/update_qn_a_pair_response.py +89 -0
- qanswer_sdk/models/update_synonyms.py +95 -0
- qanswer_sdk/models/update_synonyms_resp.py +89 -0
- qanswer_sdk/models/upload_metadata.py +115 -0
- qanswer_sdk/models/user_credits_config_dto.py +99 -0
- qanswer_sdk/models/user_credits_dto.py +106 -0
- qanswer_sdk/models/user_dataset_api_key_dto.py +120 -0
- qanswer_sdk/models/user_dataset_mcp_tool_selection_dto.py +100 -0
- qanswer_sdk/models/user_dto.py +91 -0
- qanswer_sdk/models/user_identity_availability.py +87 -0
- qanswer_sdk/models/user_info_dto.py +95 -0
- qanswer_sdk/models/user_list_dto.py +101 -0
- qanswer_sdk/models/user_log_dto.py +102 -0
- qanswer_sdk/models/user_logs_list_dto.py +97 -0
- qanswer_sdk/models/user_mcp_tool_selection_dto.py +107 -0
- qanswer_sdk/models/user_oauth_token_dto.py +96 -0
- qanswer_sdk/models/user_profile_dto.py +199 -0
- qanswer_sdk/models/user_profile_list_dto.py +101 -0
- qanswer_sdk/models/user_team_dto.py +94 -0
- qanswer_sdk/models/validation_error.py +108 -0
- qanswer_sdk/models/validation_error_loc_inner.py +138 -0
- qanswer_sdk/models/warn_visibility.py +40 -0
- qanswer_sdk/models/websearch_connector_config.py +102 -0
- qanswer_sdk/models/websearch_scraping_site.py +91 -0
- qanswer_sdk/models/website_add_payload.py +102 -0
- qanswer_sdk/models/website_connector_config.py +102 -0
- qanswer_sdk/models/website_connector_settings.py +123 -0
- qanswer_sdk/models/widget_configs.py +109 -0
- qanswer_sdk/models/x_wiki_add_request.py +97 -0
- qanswer_sdk/models/x_wiki_download_by_ids.py +89 -0
- qanswer_sdk/py.typed +0 -0
- qanswer_sdk/rest.py +258 -0
- qanswer_sdk-0.1.0.dev0.dist-info/METADATA +252 -0
- qanswer_sdk-0.1.0.dev0.dist-info/RECORD +618 -0
- qanswer_sdk-0.1.0.dev0.dist-info/WHEEL +5 -0
- qanswer_sdk-0.1.0.dev0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,3355 @@
|
|
|
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 Field, StrictBool, StrictBytes, StrictStr
|
|
20
|
+
from typing import Any, Dict, Optional, Tuple, Union
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
|
|
23
|
+
from qanswer_sdk.api_client import ApiClient, RequestSerialized
|
|
24
|
+
from qanswer_sdk.api_response import ApiResponse
|
|
25
|
+
from qanswer_sdk.rest import RESTResponseType
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class TaskRDFSparqlEndpointApi:
|
|
29
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
30
|
+
Ref: https://openapi-generator.tech
|
|
31
|
+
|
|
32
|
+
Do not edit the class manually.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
def __init__(self, api_client=None) -> None:
|
|
36
|
+
if api_client is None:
|
|
37
|
+
api_client = ApiClient.get_default()
|
|
38
|
+
self.api_client = api_client
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@validate_call
|
|
42
|
+
def get_format(
|
|
43
|
+
self,
|
|
44
|
+
username: StrictStr,
|
|
45
|
+
dataset: StrictStr,
|
|
46
|
+
query: Optional[StrictStr] = None,
|
|
47
|
+
base_uri: Optional[StrictStr] = None,
|
|
48
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
49
|
+
_request_timeout: Union[
|
|
50
|
+
None,
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
+
Tuple[
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
55
|
+
]
|
|
56
|
+
] = None,
|
|
57
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
58
|
+
_content_type: Optional[StrictStr] = None,
|
|
59
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
61
|
+
) -> Dict[str, object]:
|
|
62
|
+
"""Pretty-format a SPARQL query
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
:param username: (required)
|
|
66
|
+
:type username: str
|
|
67
|
+
:param dataset: (required)
|
|
68
|
+
:type dataset: str
|
|
69
|
+
:param query:
|
|
70
|
+
:type query: str
|
|
71
|
+
:param base_uri:
|
|
72
|
+
:type base_uri: str
|
|
73
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
74
|
+
:type q_answer_api_key: str
|
|
75
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
76
|
+
number provided, it will be total request
|
|
77
|
+
timeout. It can also be a pair (tuple) of
|
|
78
|
+
(connection, read) timeouts.
|
|
79
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
80
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
81
|
+
request; this effectively ignores the
|
|
82
|
+
authentication in the spec for a single request.
|
|
83
|
+
:type _request_auth: dict, optional
|
|
84
|
+
:param _content_type: force content-type for the request.
|
|
85
|
+
:type _content_type: str, Optional
|
|
86
|
+
:param _headers: set to override the headers for a single
|
|
87
|
+
request; this effectively ignores the headers
|
|
88
|
+
in the spec for a single request.
|
|
89
|
+
:type _headers: dict, optional
|
|
90
|
+
:param _host_index: set to override the host_index for a single
|
|
91
|
+
request; this effectively ignores the host_index
|
|
92
|
+
in the spec for a single request.
|
|
93
|
+
:type _host_index: int, optional
|
|
94
|
+
:return: Returns the result object.
|
|
95
|
+
""" # noqa: E501
|
|
96
|
+
|
|
97
|
+
_param = self._get_format_serialize(
|
|
98
|
+
username=username,
|
|
99
|
+
dataset=dataset,
|
|
100
|
+
query=query,
|
|
101
|
+
base_uri=base_uri,
|
|
102
|
+
q_answer_api_key=q_answer_api_key,
|
|
103
|
+
_request_auth=_request_auth,
|
|
104
|
+
_content_type=_content_type,
|
|
105
|
+
_headers=_headers,
|
|
106
|
+
_host_index=_host_index
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
110
|
+
'200': "Dict[str, object]",
|
|
111
|
+
'422': "HTTPValidationError",
|
|
112
|
+
}
|
|
113
|
+
response_data = self.api_client.call_api(
|
|
114
|
+
*_param,
|
|
115
|
+
_request_timeout=_request_timeout
|
|
116
|
+
)
|
|
117
|
+
response_data.read()
|
|
118
|
+
return self.api_client.response_deserialize(
|
|
119
|
+
response_data=response_data,
|
|
120
|
+
response_types_map=_response_types_map,
|
|
121
|
+
).data
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
@validate_call
|
|
125
|
+
def get_format_with_http_info(
|
|
126
|
+
self,
|
|
127
|
+
username: StrictStr,
|
|
128
|
+
dataset: StrictStr,
|
|
129
|
+
query: Optional[StrictStr] = None,
|
|
130
|
+
base_uri: Optional[StrictStr] = None,
|
|
131
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
132
|
+
_request_timeout: Union[
|
|
133
|
+
None,
|
|
134
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
135
|
+
Tuple[
|
|
136
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
137
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
138
|
+
]
|
|
139
|
+
] = None,
|
|
140
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
141
|
+
_content_type: Optional[StrictStr] = None,
|
|
142
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
143
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
144
|
+
) -> ApiResponse[Dict[str, object]]:
|
|
145
|
+
"""Pretty-format a SPARQL query
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
:param username: (required)
|
|
149
|
+
:type username: str
|
|
150
|
+
:param dataset: (required)
|
|
151
|
+
:type dataset: str
|
|
152
|
+
:param query:
|
|
153
|
+
:type query: str
|
|
154
|
+
:param base_uri:
|
|
155
|
+
:type base_uri: str
|
|
156
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
157
|
+
:type q_answer_api_key: str
|
|
158
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
159
|
+
number provided, it will be total request
|
|
160
|
+
timeout. It can also be a pair (tuple) of
|
|
161
|
+
(connection, read) timeouts.
|
|
162
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
163
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
164
|
+
request; this effectively ignores the
|
|
165
|
+
authentication in the spec for a single request.
|
|
166
|
+
:type _request_auth: dict, optional
|
|
167
|
+
:param _content_type: force content-type for the request.
|
|
168
|
+
:type _content_type: str, Optional
|
|
169
|
+
:param _headers: set to override the headers for a single
|
|
170
|
+
request; this effectively ignores the headers
|
|
171
|
+
in the spec for a single request.
|
|
172
|
+
:type _headers: dict, optional
|
|
173
|
+
:param _host_index: set to override the host_index for a single
|
|
174
|
+
request; this effectively ignores the host_index
|
|
175
|
+
in the spec for a single request.
|
|
176
|
+
:type _host_index: int, optional
|
|
177
|
+
:return: Returns the result object.
|
|
178
|
+
""" # noqa: E501
|
|
179
|
+
|
|
180
|
+
_param = self._get_format_serialize(
|
|
181
|
+
username=username,
|
|
182
|
+
dataset=dataset,
|
|
183
|
+
query=query,
|
|
184
|
+
base_uri=base_uri,
|
|
185
|
+
q_answer_api_key=q_answer_api_key,
|
|
186
|
+
_request_auth=_request_auth,
|
|
187
|
+
_content_type=_content_type,
|
|
188
|
+
_headers=_headers,
|
|
189
|
+
_host_index=_host_index
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
193
|
+
'200': "Dict[str, object]",
|
|
194
|
+
'422': "HTTPValidationError",
|
|
195
|
+
}
|
|
196
|
+
response_data = self.api_client.call_api(
|
|
197
|
+
*_param,
|
|
198
|
+
_request_timeout=_request_timeout
|
|
199
|
+
)
|
|
200
|
+
response_data.read()
|
|
201
|
+
return self.api_client.response_deserialize(
|
|
202
|
+
response_data=response_data,
|
|
203
|
+
response_types_map=_response_types_map,
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
@validate_call
|
|
208
|
+
def get_format_without_preload_content(
|
|
209
|
+
self,
|
|
210
|
+
username: StrictStr,
|
|
211
|
+
dataset: StrictStr,
|
|
212
|
+
query: Optional[StrictStr] = None,
|
|
213
|
+
base_uri: Optional[StrictStr] = None,
|
|
214
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
215
|
+
_request_timeout: Union[
|
|
216
|
+
None,
|
|
217
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
218
|
+
Tuple[
|
|
219
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
220
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
221
|
+
]
|
|
222
|
+
] = None,
|
|
223
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
224
|
+
_content_type: Optional[StrictStr] = None,
|
|
225
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
226
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
227
|
+
) -> RESTResponseType:
|
|
228
|
+
"""Pretty-format a SPARQL query
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
:param username: (required)
|
|
232
|
+
:type username: str
|
|
233
|
+
:param dataset: (required)
|
|
234
|
+
:type dataset: str
|
|
235
|
+
:param query:
|
|
236
|
+
:type query: str
|
|
237
|
+
:param base_uri:
|
|
238
|
+
:type base_uri: str
|
|
239
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
240
|
+
:type q_answer_api_key: str
|
|
241
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
242
|
+
number provided, it will be total request
|
|
243
|
+
timeout. It can also be a pair (tuple) of
|
|
244
|
+
(connection, read) timeouts.
|
|
245
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
246
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
247
|
+
request; this effectively ignores the
|
|
248
|
+
authentication in the spec for a single request.
|
|
249
|
+
:type _request_auth: dict, optional
|
|
250
|
+
:param _content_type: force content-type for the request.
|
|
251
|
+
:type _content_type: str, Optional
|
|
252
|
+
:param _headers: set to override the headers for a single
|
|
253
|
+
request; this effectively ignores the headers
|
|
254
|
+
in the spec for a single request.
|
|
255
|
+
:type _headers: dict, optional
|
|
256
|
+
:param _host_index: set to override the host_index for a single
|
|
257
|
+
request; this effectively ignores the host_index
|
|
258
|
+
in the spec for a single request.
|
|
259
|
+
:type _host_index: int, optional
|
|
260
|
+
:return: Returns the result object.
|
|
261
|
+
""" # noqa: E501
|
|
262
|
+
|
|
263
|
+
_param = self._get_format_serialize(
|
|
264
|
+
username=username,
|
|
265
|
+
dataset=dataset,
|
|
266
|
+
query=query,
|
|
267
|
+
base_uri=base_uri,
|
|
268
|
+
q_answer_api_key=q_answer_api_key,
|
|
269
|
+
_request_auth=_request_auth,
|
|
270
|
+
_content_type=_content_type,
|
|
271
|
+
_headers=_headers,
|
|
272
|
+
_host_index=_host_index
|
|
273
|
+
)
|
|
274
|
+
|
|
275
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
276
|
+
'200': "Dict[str, object]",
|
|
277
|
+
'422': "HTTPValidationError",
|
|
278
|
+
}
|
|
279
|
+
response_data = self.api_client.call_api(
|
|
280
|
+
*_param,
|
|
281
|
+
_request_timeout=_request_timeout
|
|
282
|
+
)
|
|
283
|
+
return response_data.response
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
def _get_format_serialize(
|
|
287
|
+
self,
|
|
288
|
+
username,
|
|
289
|
+
dataset,
|
|
290
|
+
query,
|
|
291
|
+
base_uri,
|
|
292
|
+
q_answer_api_key,
|
|
293
|
+
_request_auth,
|
|
294
|
+
_content_type,
|
|
295
|
+
_headers,
|
|
296
|
+
_host_index,
|
|
297
|
+
) -> RequestSerialized:
|
|
298
|
+
|
|
299
|
+
_host = None
|
|
300
|
+
|
|
301
|
+
_collection_formats: Dict[str, str] = {
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
_path_params: Dict[str, str] = {}
|
|
305
|
+
_query_params: List[Tuple[str, str]] = []
|
|
306
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
307
|
+
_form_params: List[Tuple[str, str]] = []
|
|
308
|
+
_files: Dict[
|
|
309
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
310
|
+
] = {}
|
|
311
|
+
_body_params: Optional[bytes] = None
|
|
312
|
+
|
|
313
|
+
# process the path parameters
|
|
314
|
+
if username is not None:
|
|
315
|
+
_path_params['username'] = username
|
|
316
|
+
if dataset is not None:
|
|
317
|
+
_path_params['dataset'] = dataset
|
|
318
|
+
# process the query parameters
|
|
319
|
+
if query is not None:
|
|
320
|
+
|
|
321
|
+
_query_params.append(('query', query))
|
|
322
|
+
|
|
323
|
+
if base_uri is not None:
|
|
324
|
+
|
|
325
|
+
_query_params.append(('baseURI', base_uri))
|
|
326
|
+
|
|
327
|
+
# process the header parameters
|
|
328
|
+
if q_answer_api_key is not None:
|
|
329
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
330
|
+
# process the form parameters
|
|
331
|
+
# process the body parameter
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
# set the HTTP header `Accept`
|
|
335
|
+
if 'Accept' not in _header_params:
|
|
336
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
337
|
+
[
|
|
338
|
+
'application/json'
|
|
339
|
+
]
|
|
340
|
+
)
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
# authentication setting
|
|
344
|
+
_auth_settings: List[str] = [
|
|
345
|
+
]
|
|
346
|
+
|
|
347
|
+
return self.api_client.param_serialize(
|
|
348
|
+
method='GET',
|
|
349
|
+
resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/format',
|
|
350
|
+
path_params=_path_params,
|
|
351
|
+
query_params=_query_params,
|
|
352
|
+
header_params=_header_params,
|
|
353
|
+
body=_body_params,
|
|
354
|
+
post_params=_form_params,
|
|
355
|
+
files=_files,
|
|
356
|
+
auth_settings=_auth_settings,
|
|
357
|
+
collection_formats=_collection_formats,
|
|
358
|
+
_host=_host,
|
|
359
|
+
_request_auth=_request_auth
|
|
360
|
+
)
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
@validate_call
|
|
366
|
+
def get_prefixes(
|
|
367
|
+
self,
|
|
368
|
+
username: StrictStr,
|
|
369
|
+
dataset: StrictStr,
|
|
370
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
371
|
+
_request_timeout: Union[
|
|
372
|
+
None,
|
|
373
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
374
|
+
Tuple[
|
|
375
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
376
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
377
|
+
]
|
|
378
|
+
] = None,
|
|
379
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
380
|
+
_content_type: Optional[StrictStr] = None,
|
|
381
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
382
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
383
|
+
) -> Dict[str, str]:
|
|
384
|
+
"""Get SPARQL prefixes for a dataset
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
:param username: (required)
|
|
388
|
+
:type username: str
|
|
389
|
+
:param dataset: (required)
|
|
390
|
+
:type dataset: str
|
|
391
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
392
|
+
:type q_answer_api_key: str
|
|
393
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
394
|
+
number provided, it will be total request
|
|
395
|
+
timeout. It can also be a pair (tuple) of
|
|
396
|
+
(connection, read) timeouts.
|
|
397
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
398
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
399
|
+
request; this effectively ignores the
|
|
400
|
+
authentication in the spec for a single request.
|
|
401
|
+
:type _request_auth: dict, optional
|
|
402
|
+
:param _content_type: force content-type for the request.
|
|
403
|
+
:type _content_type: str, Optional
|
|
404
|
+
:param _headers: set to override the headers for a single
|
|
405
|
+
request; this effectively ignores the headers
|
|
406
|
+
in the spec for a single request.
|
|
407
|
+
:type _headers: dict, optional
|
|
408
|
+
:param _host_index: set to override the host_index for a single
|
|
409
|
+
request; this effectively ignores the host_index
|
|
410
|
+
in the spec for a single request.
|
|
411
|
+
:type _host_index: int, optional
|
|
412
|
+
:return: Returns the result object.
|
|
413
|
+
""" # noqa: E501
|
|
414
|
+
|
|
415
|
+
_param = self._get_prefixes_serialize(
|
|
416
|
+
username=username,
|
|
417
|
+
dataset=dataset,
|
|
418
|
+
q_answer_api_key=q_answer_api_key,
|
|
419
|
+
_request_auth=_request_auth,
|
|
420
|
+
_content_type=_content_type,
|
|
421
|
+
_headers=_headers,
|
|
422
|
+
_host_index=_host_index
|
|
423
|
+
)
|
|
424
|
+
|
|
425
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
426
|
+
'200': "Dict[str, str]",
|
|
427
|
+
'422': "HTTPValidationError",
|
|
428
|
+
}
|
|
429
|
+
response_data = self.api_client.call_api(
|
|
430
|
+
*_param,
|
|
431
|
+
_request_timeout=_request_timeout
|
|
432
|
+
)
|
|
433
|
+
response_data.read()
|
|
434
|
+
return self.api_client.response_deserialize(
|
|
435
|
+
response_data=response_data,
|
|
436
|
+
response_types_map=_response_types_map,
|
|
437
|
+
).data
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
@validate_call
|
|
441
|
+
def get_prefixes_with_http_info(
|
|
442
|
+
self,
|
|
443
|
+
username: StrictStr,
|
|
444
|
+
dataset: StrictStr,
|
|
445
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
446
|
+
_request_timeout: Union[
|
|
447
|
+
None,
|
|
448
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
449
|
+
Tuple[
|
|
450
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
451
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
452
|
+
]
|
|
453
|
+
] = None,
|
|
454
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
455
|
+
_content_type: Optional[StrictStr] = None,
|
|
456
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
457
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
458
|
+
) -> ApiResponse[Dict[str, str]]:
|
|
459
|
+
"""Get SPARQL prefixes for a dataset
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
:param username: (required)
|
|
463
|
+
:type username: str
|
|
464
|
+
:param dataset: (required)
|
|
465
|
+
:type dataset: str
|
|
466
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
467
|
+
:type q_answer_api_key: str
|
|
468
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
469
|
+
number provided, it will be total request
|
|
470
|
+
timeout. It can also be a pair (tuple) of
|
|
471
|
+
(connection, read) timeouts.
|
|
472
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
473
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
474
|
+
request; this effectively ignores the
|
|
475
|
+
authentication in the spec for a single request.
|
|
476
|
+
:type _request_auth: dict, optional
|
|
477
|
+
:param _content_type: force content-type for the request.
|
|
478
|
+
:type _content_type: str, Optional
|
|
479
|
+
:param _headers: set to override the headers for a single
|
|
480
|
+
request; this effectively ignores the headers
|
|
481
|
+
in the spec for a single request.
|
|
482
|
+
:type _headers: dict, optional
|
|
483
|
+
:param _host_index: set to override the host_index for a single
|
|
484
|
+
request; this effectively ignores the host_index
|
|
485
|
+
in the spec for a single request.
|
|
486
|
+
:type _host_index: int, optional
|
|
487
|
+
:return: Returns the result object.
|
|
488
|
+
""" # noqa: E501
|
|
489
|
+
|
|
490
|
+
_param = self._get_prefixes_serialize(
|
|
491
|
+
username=username,
|
|
492
|
+
dataset=dataset,
|
|
493
|
+
q_answer_api_key=q_answer_api_key,
|
|
494
|
+
_request_auth=_request_auth,
|
|
495
|
+
_content_type=_content_type,
|
|
496
|
+
_headers=_headers,
|
|
497
|
+
_host_index=_host_index
|
|
498
|
+
)
|
|
499
|
+
|
|
500
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
501
|
+
'200': "Dict[str, str]",
|
|
502
|
+
'422': "HTTPValidationError",
|
|
503
|
+
}
|
|
504
|
+
response_data = self.api_client.call_api(
|
|
505
|
+
*_param,
|
|
506
|
+
_request_timeout=_request_timeout
|
|
507
|
+
)
|
|
508
|
+
response_data.read()
|
|
509
|
+
return self.api_client.response_deserialize(
|
|
510
|
+
response_data=response_data,
|
|
511
|
+
response_types_map=_response_types_map,
|
|
512
|
+
)
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
@validate_call
|
|
516
|
+
def get_prefixes_without_preload_content(
|
|
517
|
+
self,
|
|
518
|
+
username: StrictStr,
|
|
519
|
+
dataset: StrictStr,
|
|
520
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
521
|
+
_request_timeout: Union[
|
|
522
|
+
None,
|
|
523
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
524
|
+
Tuple[
|
|
525
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
526
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
527
|
+
]
|
|
528
|
+
] = None,
|
|
529
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
530
|
+
_content_type: Optional[StrictStr] = None,
|
|
531
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
532
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
533
|
+
) -> RESTResponseType:
|
|
534
|
+
"""Get SPARQL prefixes for a dataset
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
:param username: (required)
|
|
538
|
+
:type username: str
|
|
539
|
+
:param dataset: (required)
|
|
540
|
+
:type dataset: str
|
|
541
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
542
|
+
:type q_answer_api_key: str
|
|
543
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
544
|
+
number provided, it will be total request
|
|
545
|
+
timeout. It can also be a pair (tuple) of
|
|
546
|
+
(connection, read) timeouts.
|
|
547
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
548
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
549
|
+
request; this effectively ignores the
|
|
550
|
+
authentication in the spec for a single request.
|
|
551
|
+
:type _request_auth: dict, optional
|
|
552
|
+
:param _content_type: force content-type for the request.
|
|
553
|
+
:type _content_type: str, Optional
|
|
554
|
+
:param _headers: set to override the headers for a single
|
|
555
|
+
request; this effectively ignores the headers
|
|
556
|
+
in the spec for a single request.
|
|
557
|
+
:type _headers: dict, optional
|
|
558
|
+
:param _host_index: set to override the host_index for a single
|
|
559
|
+
request; this effectively ignores the host_index
|
|
560
|
+
in the spec for a single request.
|
|
561
|
+
:type _host_index: int, optional
|
|
562
|
+
:return: Returns the result object.
|
|
563
|
+
""" # noqa: E501
|
|
564
|
+
|
|
565
|
+
_param = self._get_prefixes_serialize(
|
|
566
|
+
username=username,
|
|
567
|
+
dataset=dataset,
|
|
568
|
+
q_answer_api_key=q_answer_api_key,
|
|
569
|
+
_request_auth=_request_auth,
|
|
570
|
+
_content_type=_content_type,
|
|
571
|
+
_headers=_headers,
|
|
572
|
+
_host_index=_host_index
|
|
573
|
+
)
|
|
574
|
+
|
|
575
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
576
|
+
'200': "Dict[str, str]",
|
|
577
|
+
'422': "HTTPValidationError",
|
|
578
|
+
}
|
|
579
|
+
response_data = self.api_client.call_api(
|
|
580
|
+
*_param,
|
|
581
|
+
_request_timeout=_request_timeout
|
|
582
|
+
)
|
|
583
|
+
return response_data.response
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
def _get_prefixes_serialize(
|
|
587
|
+
self,
|
|
588
|
+
username,
|
|
589
|
+
dataset,
|
|
590
|
+
q_answer_api_key,
|
|
591
|
+
_request_auth,
|
|
592
|
+
_content_type,
|
|
593
|
+
_headers,
|
|
594
|
+
_host_index,
|
|
595
|
+
) -> RequestSerialized:
|
|
596
|
+
|
|
597
|
+
_host = None
|
|
598
|
+
|
|
599
|
+
_collection_formats: Dict[str, str] = {
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
_path_params: Dict[str, str] = {}
|
|
603
|
+
_query_params: List[Tuple[str, str]] = []
|
|
604
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
605
|
+
_form_params: List[Tuple[str, str]] = []
|
|
606
|
+
_files: Dict[
|
|
607
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
608
|
+
] = {}
|
|
609
|
+
_body_params: Optional[bytes] = None
|
|
610
|
+
|
|
611
|
+
# process the path parameters
|
|
612
|
+
if username is not None:
|
|
613
|
+
_path_params['username'] = username
|
|
614
|
+
if dataset is not None:
|
|
615
|
+
_path_params['dataset'] = dataset
|
|
616
|
+
# process the query parameters
|
|
617
|
+
# process the header parameters
|
|
618
|
+
if q_answer_api_key is not None:
|
|
619
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
620
|
+
# process the form parameters
|
|
621
|
+
# process the body parameter
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
# set the HTTP header `Accept`
|
|
625
|
+
if 'Accept' not in _header_params:
|
|
626
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
627
|
+
[
|
|
628
|
+
'application/json'
|
|
629
|
+
]
|
|
630
|
+
)
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
# authentication setting
|
|
634
|
+
_auth_settings: List[str] = [
|
|
635
|
+
'QAnswer-Api-Key',
|
|
636
|
+
'Bearer token'
|
|
637
|
+
]
|
|
638
|
+
|
|
639
|
+
return self.api_client.param_serialize(
|
|
640
|
+
method='GET',
|
|
641
|
+
resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/prefixes',
|
|
642
|
+
path_params=_path_params,
|
|
643
|
+
query_params=_query_params,
|
|
644
|
+
header_params=_header_params,
|
|
645
|
+
body=_body_params,
|
|
646
|
+
post_params=_form_params,
|
|
647
|
+
files=_files,
|
|
648
|
+
auth_settings=_auth_settings,
|
|
649
|
+
collection_formats=_collection_formats,
|
|
650
|
+
_host=_host,
|
|
651
|
+
_request_auth=_request_auth
|
|
652
|
+
)
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
@validate_call
|
|
658
|
+
def has_index(
|
|
659
|
+
self,
|
|
660
|
+
username: StrictStr,
|
|
661
|
+
dataset: StrictStr,
|
|
662
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
663
|
+
_request_timeout: Union[
|
|
664
|
+
None,
|
|
665
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
666
|
+
Tuple[
|
|
667
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
668
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
669
|
+
]
|
|
670
|
+
] = None,
|
|
671
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
672
|
+
_content_type: Optional[StrictStr] = None,
|
|
673
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
674
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
675
|
+
) -> bool:
|
|
676
|
+
"""Check if dataset has an index
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
:param username: (required)
|
|
680
|
+
:type username: str
|
|
681
|
+
:param dataset: (required)
|
|
682
|
+
:type dataset: str
|
|
683
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
684
|
+
:type q_answer_api_key: str
|
|
685
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
686
|
+
number provided, it will be total request
|
|
687
|
+
timeout. It can also be a pair (tuple) of
|
|
688
|
+
(connection, read) timeouts.
|
|
689
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
690
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
691
|
+
request; this effectively ignores the
|
|
692
|
+
authentication in the spec for a single request.
|
|
693
|
+
:type _request_auth: dict, optional
|
|
694
|
+
:param _content_type: force content-type for the request.
|
|
695
|
+
:type _content_type: str, Optional
|
|
696
|
+
:param _headers: set to override the headers for a single
|
|
697
|
+
request; this effectively ignores the headers
|
|
698
|
+
in the spec for a single request.
|
|
699
|
+
:type _headers: dict, optional
|
|
700
|
+
:param _host_index: set to override the host_index for a single
|
|
701
|
+
request; this effectively ignores the host_index
|
|
702
|
+
in the spec for a single request.
|
|
703
|
+
:type _host_index: int, optional
|
|
704
|
+
:return: Returns the result object.
|
|
705
|
+
""" # noqa: E501
|
|
706
|
+
|
|
707
|
+
_param = self._has_index_serialize(
|
|
708
|
+
username=username,
|
|
709
|
+
dataset=dataset,
|
|
710
|
+
q_answer_api_key=q_answer_api_key,
|
|
711
|
+
_request_auth=_request_auth,
|
|
712
|
+
_content_type=_content_type,
|
|
713
|
+
_headers=_headers,
|
|
714
|
+
_host_index=_host_index
|
|
715
|
+
)
|
|
716
|
+
|
|
717
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
718
|
+
'200': "bool",
|
|
719
|
+
'422': "HTTPValidationError",
|
|
720
|
+
}
|
|
721
|
+
response_data = self.api_client.call_api(
|
|
722
|
+
*_param,
|
|
723
|
+
_request_timeout=_request_timeout
|
|
724
|
+
)
|
|
725
|
+
response_data.read()
|
|
726
|
+
return self.api_client.response_deserialize(
|
|
727
|
+
response_data=response_data,
|
|
728
|
+
response_types_map=_response_types_map,
|
|
729
|
+
).data
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
@validate_call
|
|
733
|
+
def has_index_with_http_info(
|
|
734
|
+
self,
|
|
735
|
+
username: StrictStr,
|
|
736
|
+
dataset: StrictStr,
|
|
737
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
738
|
+
_request_timeout: Union[
|
|
739
|
+
None,
|
|
740
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
741
|
+
Tuple[
|
|
742
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
743
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
744
|
+
]
|
|
745
|
+
] = None,
|
|
746
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
747
|
+
_content_type: Optional[StrictStr] = None,
|
|
748
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
749
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
750
|
+
) -> ApiResponse[bool]:
|
|
751
|
+
"""Check if dataset has an index
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
:param username: (required)
|
|
755
|
+
:type username: str
|
|
756
|
+
:param dataset: (required)
|
|
757
|
+
:type dataset: str
|
|
758
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
759
|
+
:type q_answer_api_key: str
|
|
760
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
761
|
+
number provided, it will be total request
|
|
762
|
+
timeout. It can also be a pair (tuple) of
|
|
763
|
+
(connection, read) timeouts.
|
|
764
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
765
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
766
|
+
request; this effectively ignores the
|
|
767
|
+
authentication in the spec for a single request.
|
|
768
|
+
:type _request_auth: dict, optional
|
|
769
|
+
:param _content_type: force content-type for the request.
|
|
770
|
+
:type _content_type: str, Optional
|
|
771
|
+
:param _headers: set to override the headers for a single
|
|
772
|
+
request; this effectively ignores the headers
|
|
773
|
+
in the spec for a single request.
|
|
774
|
+
:type _headers: dict, optional
|
|
775
|
+
:param _host_index: set to override the host_index for a single
|
|
776
|
+
request; this effectively ignores the host_index
|
|
777
|
+
in the spec for a single request.
|
|
778
|
+
:type _host_index: int, optional
|
|
779
|
+
:return: Returns the result object.
|
|
780
|
+
""" # noqa: E501
|
|
781
|
+
|
|
782
|
+
_param = self._has_index_serialize(
|
|
783
|
+
username=username,
|
|
784
|
+
dataset=dataset,
|
|
785
|
+
q_answer_api_key=q_answer_api_key,
|
|
786
|
+
_request_auth=_request_auth,
|
|
787
|
+
_content_type=_content_type,
|
|
788
|
+
_headers=_headers,
|
|
789
|
+
_host_index=_host_index
|
|
790
|
+
)
|
|
791
|
+
|
|
792
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
793
|
+
'200': "bool",
|
|
794
|
+
'422': "HTTPValidationError",
|
|
795
|
+
}
|
|
796
|
+
response_data = self.api_client.call_api(
|
|
797
|
+
*_param,
|
|
798
|
+
_request_timeout=_request_timeout
|
|
799
|
+
)
|
|
800
|
+
response_data.read()
|
|
801
|
+
return self.api_client.response_deserialize(
|
|
802
|
+
response_data=response_data,
|
|
803
|
+
response_types_map=_response_types_map,
|
|
804
|
+
)
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
@validate_call
|
|
808
|
+
def has_index_without_preload_content(
|
|
809
|
+
self,
|
|
810
|
+
username: StrictStr,
|
|
811
|
+
dataset: StrictStr,
|
|
812
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
813
|
+
_request_timeout: Union[
|
|
814
|
+
None,
|
|
815
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
816
|
+
Tuple[
|
|
817
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
818
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
819
|
+
]
|
|
820
|
+
] = None,
|
|
821
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
822
|
+
_content_type: Optional[StrictStr] = None,
|
|
823
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
824
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
825
|
+
) -> RESTResponseType:
|
|
826
|
+
"""Check if dataset has an index
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
:param username: (required)
|
|
830
|
+
:type username: str
|
|
831
|
+
:param dataset: (required)
|
|
832
|
+
:type dataset: str
|
|
833
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
834
|
+
:type q_answer_api_key: str
|
|
835
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
836
|
+
number provided, it will be total request
|
|
837
|
+
timeout. It can also be a pair (tuple) of
|
|
838
|
+
(connection, read) timeouts.
|
|
839
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
840
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
841
|
+
request; this effectively ignores the
|
|
842
|
+
authentication in the spec for a single request.
|
|
843
|
+
:type _request_auth: dict, optional
|
|
844
|
+
:param _content_type: force content-type for the request.
|
|
845
|
+
:type _content_type: str, Optional
|
|
846
|
+
:param _headers: set to override the headers for a single
|
|
847
|
+
request; this effectively ignores the headers
|
|
848
|
+
in the spec for a single request.
|
|
849
|
+
:type _headers: dict, optional
|
|
850
|
+
:param _host_index: set to override the host_index for a single
|
|
851
|
+
request; this effectively ignores the host_index
|
|
852
|
+
in the spec for a single request.
|
|
853
|
+
:type _host_index: int, optional
|
|
854
|
+
:return: Returns the result object.
|
|
855
|
+
""" # noqa: E501
|
|
856
|
+
|
|
857
|
+
_param = self._has_index_serialize(
|
|
858
|
+
username=username,
|
|
859
|
+
dataset=dataset,
|
|
860
|
+
q_answer_api_key=q_answer_api_key,
|
|
861
|
+
_request_auth=_request_auth,
|
|
862
|
+
_content_type=_content_type,
|
|
863
|
+
_headers=_headers,
|
|
864
|
+
_host_index=_host_index
|
|
865
|
+
)
|
|
866
|
+
|
|
867
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
868
|
+
'200': "bool",
|
|
869
|
+
'422': "HTTPValidationError",
|
|
870
|
+
}
|
|
871
|
+
response_data = self.api_client.call_api(
|
|
872
|
+
*_param,
|
|
873
|
+
_request_timeout=_request_timeout
|
|
874
|
+
)
|
|
875
|
+
return response_data.response
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
def _has_index_serialize(
|
|
879
|
+
self,
|
|
880
|
+
username,
|
|
881
|
+
dataset,
|
|
882
|
+
q_answer_api_key,
|
|
883
|
+
_request_auth,
|
|
884
|
+
_content_type,
|
|
885
|
+
_headers,
|
|
886
|
+
_host_index,
|
|
887
|
+
) -> RequestSerialized:
|
|
888
|
+
|
|
889
|
+
_host = None
|
|
890
|
+
|
|
891
|
+
_collection_formats: Dict[str, str] = {
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
_path_params: Dict[str, str] = {}
|
|
895
|
+
_query_params: List[Tuple[str, str]] = []
|
|
896
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
897
|
+
_form_params: List[Tuple[str, str]] = []
|
|
898
|
+
_files: Dict[
|
|
899
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
900
|
+
] = {}
|
|
901
|
+
_body_params: Optional[bytes] = None
|
|
902
|
+
|
|
903
|
+
# process the path parameters
|
|
904
|
+
if username is not None:
|
|
905
|
+
_path_params['username'] = username
|
|
906
|
+
if dataset is not None:
|
|
907
|
+
_path_params['dataset'] = dataset
|
|
908
|
+
# process the query parameters
|
|
909
|
+
# process the header parameters
|
|
910
|
+
if q_answer_api_key is not None:
|
|
911
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
912
|
+
# process the form parameters
|
|
913
|
+
# process the body parameter
|
|
914
|
+
|
|
915
|
+
|
|
916
|
+
# set the HTTP header `Accept`
|
|
917
|
+
if 'Accept' not in _header_params:
|
|
918
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
919
|
+
[
|
|
920
|
+
'application/json'
|
|
921
|
+
]
|
|
922
|
+
)
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
# authentication setting
|
|
926
|
+
_auth_settings: List[str] = [
|
|
927
|
+
'QAnswer-Api-Key',
|
|
928
|
+
'Bearer token'
|
|
929
|
+
]
|
|
930
|
+
|
|
931
|
+
return self.api_client.param_serialize(
|
|
932
|
+
method='GET',
|
|
933
|
+
resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/has-index',
|
|
934
|
+
path_params=_path_params,
|
|
935
|
+
query_params=_query_params,
|
|
936
|
+
header_params=_header_params,
|
|
937
|
+
body=_body_params,
|
|
938
|
+
post_params=_form_params,
|
|
939
|
+
files=_files,
|
|
940
|
+
auth_settings=_auth_settings,
|
|
941
|
+
collection_formats=_collection_formats,
|
|
942
|
+
_host=_host,
|
|
943
|
+
_request_auth=_request_auth
|
|
944
|
+
)
|
|
945
|
+
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
|
|
949
|
+
@validate_call
|
|
950
|
+
def is_merging(
|
|
951
|
+
self,
|
|
952
|
+
username: StrictStr,
|
|
953
|
+
dataset: StrictStr,
|
|
954
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
955
|
+
_request_timeout: Union[
|
|
956
|
+
None,
|
|
957
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
958
|
+
Tuple[
|
|
959
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
960
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
961
|
+
]
|
|
962
|
+
] = None,
|
|
963
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
964
|
+
_content_type: Optional[StrictStr] = None,
|
|
965
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
966
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
967
|
+
) -> Dict[str, object]:
|
|
968
|
+
"""Check if dataset is merging
|
|
969
|
+
|
|
970
|
+
|
|
971
|
+
:param username: (required)
|
|
972
|
+
:type username: str
|
|
973
|
+
:param dataset: (required)
|
|
974
|
+
:type dataset: str
|
|
975
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
976
|
+
:type q_answer_api_key: str
|
|
977
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
978
|
+
number provided, it will be total request
|
|
979
|
+
timeout. It can also be a pair (tuple) of
|
|
980
|
+
(connection, read) timeouts.
|
|
981
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
982
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
983
|
+
request; this effectively ignores the
|
|
984
|
+
authentication in the spec for a single request.
|
|
985
|
+
:type _request_auth: dict, optional
|
|
986
|
+
:param _content_type: force content-type for the request.
|
|
987
|
+
:type _content_type: str, Optional
|
|
988
|
+
:param _headers: set to override the headers for a single
|
|
989
|
+
request; this effectively ignores the headers
|
|
990
|
+
in the spec for a single request.
|
|
991
|
+
:type _headers: dict, optional
|
|
992
|
+
:param _host_index: set to override the host_index for a single
|
|
993
|
+
request; this effectively ignores the host_index
|
|
994
|
+
in the spec for a single request.
|
|
995
|
+
:type _host_index: int, optional
|
|
996
|
+
:return: Returns the result object.
|
|
997
|
+
""" # noqa: E501
|
|
998
|
+
|
|
999
|
+
_param = self._is_merging_serialize(
|
|
1000
|
+
username=username,
|
|
1001
|
+
dataset=dataset,
|
|
1002
|
+
q_answer_api_key=q_answer_api_key,
|
|
1003
|
+
_request_auth=_request_auth,
|
|
1004
|
+
_content_type=_content_type,
|
|
1005
|
+
_headers=_headers,
|
|
1006
|
+
_host_index=_host_index
|
|
1007
|
+
)
|
|
1008
|
+
|
|
1009
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1010
|
+
'200': "Dict[str, object]",
|
|
1011
|
+
'422': "HTTPValidationError",
|
|
1012
|
+
}
|
|
1013
|
+
response_data = self.api_client.call_api(
|
|
1014
|
+
*_param,
|
|
1015
|
+
_request_timeout=_request_timeout
|
|
1016
|
+
)
|
|
1017
|
+
response_data.read()
|
|
1018
|
+
return self.api_client.response_deserialize(
|
|
1019
|
+
response_data=response_data,
|
|
1020
|
+
response_types_map=_response_types_map,
|
|
1021
|
+
).data
|
|
1022
|
+
|
|
1023
|
+
|
|
1024
|
+
@validate_call
|
|
1025
|
+
def is_merging_with_http_info(
|
|
1026
|
+
self,
|
|
1027
|
+
username: StrictStr,
|
|
1028
|
+
dataset: StrictStr,
|
|
1029
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1030
|
+
_request_timeout: Union[
|
|
1031
|
+
None,
|
|
1032
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1033
|
+
Tuple[
|
|
1034
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1035
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1036
|
+
]
|
|
1037
|
+
] = None,
|
|
1038
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1039
|
+
_content_type: Optional[StrictStr] = None,
|
|
1040
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1041
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1042
|
+
) -> ApiResponse[Dict[str, object]]:
|
|
1043
|
+
"""Check if dataset is merging
|
|
1044
|
+
|
|
1045
|
+
|
|
1046
|
+
:param username: (required)
|
|
1047
|
+
:type username: str
|
|
1048
|
+
:param dataset: (required)
|
|
1049
|
+
:type dataset: str
|
|
1050
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1051
|
+
:type q_answer_api_key: str
|
|
1052
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1053
|
+
number provided, it will be total request
|
|
1054
|
+
timeout. It can also be a pair (tuple) of
|
|
1055
|
+
(connection, read) timeouts.
|
|
1056
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1057
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1058
|
+
request; this effectively ignores the
|
|
1059
|
+
authentication in the spec for a single request.
|
|
1060
|
+
:type _request_auth: dict, optional
|
|
1061
|
+
:param _content_type: force content-type for the request.
|
|
1062
|
+
:type _content_type: str, Optional
|
|
1063
|
+
:param _headers: set to override the headers for a single
|
|
1064
|
+
request; this effectively ignores the headers
|
|
1065
|
+
in the spec for a single request.
|
|
1066
|
+
:type _headers: dict, optional
|
|
1067
|
+
:param _host_index: set to override the host_index for a single
|
|
1068
|
+
request; this effectively ignores the host_index
|
|
1069
|
+
in the spec for a single request.
|
|
1070
|
+
:type _host_index: int, optional
|
|
1071
|
+
:return: Returns the result object.
|
|
1072
|
+
""" # noqa: E501
|
|
1073
|
+
|
|
1074
|
+
_param = self._is_merging_serialize(
|
|
1075
|
+
username=username,
|
|
1076
|
+
dataset=dataset,
|
|
1077
|
+
q_answer_api_key=q_answer_api_key,
|
|
1078
|
+
_request_auth=_request_auth,
|
|
1079
|
+
_content_type=_content_type,
|
|
1080
|
+
_headers=_headers,
|
|
1081
|
+
_host_index=_host_index
|
|
1082
|
+
)
|
|
1083
|
+
|
|
1084
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1085
|
+
'200': "Dict[str, object]",
|
|
1086
|
+
'422': "HTTPValidationError",
|
|
1087
|
+
}
|
|
1088
|
+
response_data = self.api_client.call_api(
|
|
1089
|
+
*_param,
|
|
1090
|
+
_request_timeout=_request_timeout
|
|
1091
|
+
)
|
|
1092
|
+
response_data.read()
|
|
1093
|
+
return self.api_client.response_deserialize(
|
|
1094
|
+
response_data=response_data,
|
|
1095
|
+
response_types_map=_response_types_map,
|
|
1096
|
+
)
|
|
1097
|
+
|
|
1098
|
+
|
|
1099
|
+
@validate_call
|
|
1100
|
+
def is_merging_without_preload_content(
|
|
1101
|
+
self,
|
|
1102
|
+
username: StrictStr,
|
|
1103
|
+
dataset: StrictStr,
|
|
1104
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1105
|
+
_request_timeout: Union[
|
|
1106
|
+
None,
|
|
1107
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1108
|
+
Tuple[
|
|
1109
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1110
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1111
|
+
]
|
|
1112
|
+
] = None,
|
|
1113
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1114
|
+
_content_type: Optional[StrictStr] = None,
|
|
1115
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1116
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1117
|
+
) -> RESTResponseType:
|
|
1118
|
+
"""Check if dataset is merging
|
|
1119
|
+
|
|
1120
|
+
|
|
1121
|
+
:param username: (required)
|
|
1122
|
+
:type username: str
|
|
1123
|
+
:param dataset: (required)
|
|
1124
|
+
:type dataset: str
|
|
1125
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1126
|
+
:type q_answer_api_key: str
|
|
1127
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1128
|
+
number provided, it will be total request
|
|
1129
|
+
timeout. It can also be a pair (tuple) of
|
|
1130
|
+
(connection, read) timeouts.
|
|
1131
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1132
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1133
|
+
request; this effectively ignores the
|
|
1134
|
+
authentication in the spec for a single request.
|
|
1135
|
+
:type _request_auth: dict, optional
|
|
1136
|
+
:param _content_type: force content-type for the request.
|
|
1137
|
+
:type _content_type: str, Optional
|
|
1138
|
+
:param _headers: set to override the headers for a single
|
|
1139
|
+
request; this effectively ignores the headers
|
|
1140
|
+
in the spec for a single request.
|
|
1141
|
+
:type _headers: dict, optional
|
|
1142
|
+
:param _host_index: set to override the host_index for a single
|
|
1143
|
+
request; this effectively ignores the host_index
|
|
1144
|
+
in the spec for a single request.
|
|
1145
|
+
:type _host_index: int, optional
|
|
1146
|
+
:return: Returns the result object.
|
|
1147
|
+
""" # noqa: E501
|
|
1148
|
+
|
|
1149
|
+
_param = self._is_merging_serialize(
|
|
1150
|
+
username=username,
|
|
1151
|
+
dataset=dataset,
|
|
1152
|
+
q_answer_api_key=q_answer_api_key,
|
|
1153
|
+
_request_auth=_request_auth,
|
|
1154
|
+
_content_type=_content_type,
|
|
1155
|
+
_headers=_headers,
|
|
1156
|
+
_host_index=_host_index
|
|
1157
|
+
)
|
|
1158
|
+
|
|
1159
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1160
|
+
'200': "Dict[str, object]",
|
|
1161
|
+
'422': "HTTPValidationError",
|
|
1162
|
+
}
|
|
1163
|
+
response_data = self.api_client.call_api(
|
|
1164
|
+
*_param,
|
|
1165
|
+
_request_timeout=_request_timeout
|
|
1166
|
+
)
|
|
1167
|
+
return response_data.response
|
|
1168
|
+
|
|
1169
|
+
|
|
1170
|
+
def _is_merging_serialize(
|
|
1171
|
+
self,
|
|
1172
|
+
username,
|
|
1173
|
+
dataset,
|
|
1174
|
+
q_answer_api_key,
|
|
1175
|
+
_request_auth,
|
|
1176
|
+
_content_type,
|
|
1177
|
+
_headers,
|
|
1178
|
+
_host_index,
|
|
1179
|
+
) -> RequestSerialized:
|
|
1180
|
+
|
|
1181
|
+
_host = None
|
|
1182
|
+
|
|
1183
|
+
_collection_formats: Dict[str, str] = {
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
_path_params: Dict[str, str] = {}
|
|
1187
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1188
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1189
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1190
|
+
_files: Dict[
|
|
1191
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1192
|
+
] = {}
|
|
1193
|
+
_body_params: Optional[bytes] = None
|
|
1194
|
+
|
|
1195
|
+
# process the path parameters
|
|
1196
|
+
if username is not None:
|
|
1197
|
+
_path_params['username'] = username
|
|
1198
|
+
if dataset is not None:
|
|
1199
|
+
_path_params['dataset'] = dataset
|
|
1200
|
+
# process the query parameters
|
|
1201
|
+
# process the header parameters
|
|
1202
|
+
if q_answer_api_key is not None:
|
|
1203
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
1204
|
+
# process the form parameters
|
|
1205
|
+
# process the body parameter
|
|
1206
|
+
|
|
1207
|
+
|
|
1208
|
+
# set the HTTP header `Accept`
|
|
1209
|
+
if 'Accept' not in _header_params:
|
|
1210
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1211
|
+
[
|
|
1212
|
+
'application/json'
|
|
1213
|
+
]
|
|
1214
|
+
)
|
|
1215
|
+
|
|
1216
|
+
|
|
1217
|
+
# authentication setting
|
|
1218
|
+
_auth_settings: List[str] = [
|
|
1219
|
+
'QAnswer-Api-Key',
|
|
1220
|
+
'Bearer token'
|
|
1221
|
+
]
|
|
1222
|
+
|
|
1223
|
+
return self.api_client.param_serialize(
|
|
1224
|
+
method='GET',
|
|
1225
|
+
resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/is-merging',
|
|
1226
|
+
path_params=_path_params,
|
|
1227
|
+
query_params=_query_params,
|
|
1228
|
+
header_params=_header_params,
|
|
1229
|
+
body=_body_params,
|
|
1230
|
+
post_params=_form_params,
|
|
1231
|
+
files=_files,
|
|
1232
|
+
auth_settings=_auth_settings,
|
|
1233
|
+
collection_formats=_collection_formats,
|
|
1234
|
+
_host=_host,
|
|
1235
|
+
_request_auth=_request_auth
|
|
1236
|
+
)
|
|
1237
|
+
|
|
1238
|
+
|
|
1239
|
+
|
|
1240
|
+
|
|
1241
|
+
@validate_call
|
|
1242
|
+
def load(
|
|
1243
|
+
self,
|
|
1244
|
+
username: StrictStr,
|
|
1245
|
+
dataset: StrictStr,
|
|
1246
|
+
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
1247
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1248
|
+
_request_timeout: Union[
|
|
1249
|
+
None,
|
|
1250
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1251
|
+
Tuple[
|
|
1252
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1253
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1254
|
+
]
|
|
1255
|
+
] = None,
|
|
1256
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1257
|
+
_content_type: Optional[StrictStr] = None,
|
|
1258
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1259
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1260
|
+
) -> object:
|
|
1261
|
+
"""Load data into a dataset
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
:param username: (required)
|
|
1265
|
+
:type username: str
|
|
1266
|
+
:param dataset: (required)
|
|
1267
|
+
:type dataset: str
|
|
1268
|
+
:param file: (required)
|
|
1269
|
+
:type file: bytearray
|
|
1270
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1271
|
+
:type q_answer_api_key: str
|
|
1272
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1273
|
+
number provided, it will be total request
|
|
1274
|
+
timeout. It can also be a pair (tuple) of
|
|
1275
|
+
(connection, read) timeouts.
|
|
1276
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1277
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1278
|
+
request; this effectively ignores the
|
|
1279
|
+
authentication in the spec for a single request.
|
|
1280
|
+
:type _request_auth: dict, optional
|
|
1281
|
+
:param _content_type: force content-type for the request.
|
|
1282
|
+
:type _content_type: str, Optional
|
|
1283
|
+
:param _headers: set to override the headers for a single
|
|
1284
|
+
request; this effectively ignores the headers
|
|
1285
|
+
in the spec for a single request.
|
|
1286
|
+
:type _headers: dict, optional
|
|
1287
|
+
:param _host_index: set to override the host_index for a single
|
|
1288
|
+
request; this effectively ignores the host_index
|
|
1289
|
+
in the spec for a single request.
|
|
1290
|
+
:type _host_index: int, optional
|
|
1291
|
+
:return: Returns the result object.
|
|
1292
|
+
""" # noqa: E501
|
|
1293
|
+
|
|
1294
|
+
_param = self._load_serialize(
|
|
1295
|
+
username=username,
|
|
1296
|
+
dataset=dataset,
|
|
1297
|
+
file=file,
|
|
1298
|
+
q_answer_api_key=q_answer_api_key,
|
|
1299
|
+
_request_auth=_request_auth,
|
|
1300
|
+
_content_type=_content_type,
|
|
1301
|
+
_headers=_headers,
|
|
1302
|
+
_host_index=_host_index
|
|
1303
|
+
)
|
|
1304
|
+
|
|
1305
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1306
|
+
'200': "object",
|
|
1307
|
+
'422': "HTTPValidationError",
|
|
1308
|
+
}
|
|
1309
|
+
response_data = self.api_client.call_api(
|
|
1310
|
+
*_param,
|
|
1311
|
+
_request_timeout=_request_timeout
|
|
1312
|
+
)
|
|
1313
|
+
response_data.read()
|
|
1314
|
+
return self.api_client.response_deserialize(
|
|
1315
|
+
response_data=response_data,
|
|
1316
|
+
response_types_map=_response_types_map,
|
|
1317
|
+
).data
|
|
1318
|
+
|
|
1319
|
+
|
|
1320
|
+
@validate_call
|
|
1321
|
+
def load_with_http_info(
|
|
1322
|
+
self,
|
|
1323
|
+
username: StrictStr,
|
|
1324
|
+
dataset: StrictStr,
|
|
1325
|
+
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
1326
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1327
|
+
_request_timeout: Union[
|
|
1328
|
+
None,
|
|
1329
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1330
|
+
Tuple[
|
|
1331
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1332
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1333
|
+
]
|
|
1334
|
+
] = None,
|
|
1335
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1336
|
+
_content_type: Optional[StrictStr] = None,
|
|
1337
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1338
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1339
|
+
) -> ApiResponse[object]:
|
|
1340
|
+
"""Load data into a dataset
|
|
1341
|
+
|
|
1342
|
+
|
|
1343
|
+
:param username: (required)
|
|
1344
|
+
:type username: str
|
|
1345
|
+
:param dataset: (required)
|
|
1346
|
+
:type dataset: str
|
|
1347
|
+
:param file: (required)
|
|
1348
|
+
:type file: bytearray
|
|
1349
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1350
|
+
:type q_answer_api_key: str
|
|
1351
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1352
|
+
number provided, it will be total request
|
|
1353
|
+
timeout. It can also be a pair (tuple) of
|
|
1354
|
+
(connection, read) timeouts.
|
|
1355
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1356
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1357
|
+
request; this effectively ignores the
|
|
1358
|
+
authentication in the spec for a single request.
|
|
1359
|
+
:type _request_auth: dict, optional
|
|
1360
|
+
:param _content_type: force content-type for the request.
|
|
1361
|
+
:type _content_type: str, Optional
|
|
1362
|
+
:param _headers: set to override the headers for a single
|
|
1363
|
+
request; this effectively ignores the headers
|
|
1364
|
+
in the spec for a single request.
|
|
1365
|
+
:type _headers: dict, optional
|
|
1366
|
+
:param _host_index: set to override the host_index for a single
|
|
1367
|
+
request; this effectively ignores the host_index
|
|
1368
|
+
in the spec for a single request.
|
|
1369
|
+
:type _host_index: int, optional
|
|
1370
|
+
:return: Returns the result object.
|
|
1371
|
+
""" # noqa: E501
|
|
1372
|
+
|
|
1373
|
+
_param = self._load_serialize(
|
|
1374
|
+
username=username,
|
|
1375
|
+
dataset=dataset,
|
|
1376
|
+
file=file,
|
|
1377
|
+
q_answer_api_key=q_answer_api_key,
|
|
1378
|
+
_request_auth=_request_auth,
|
|
1379
|
+
_content_type=_content_type,
|
|
1380
|
+
_headers=_headers,
|
|
1381
|
+
_host_index=_host_index
|
|
1382
|
+
)
|
|
1383
|
+
|
|
1384
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1385
|
+
'200': "object",
|
|
1386
|
+
'422': "HTTPValidationError",
|
|
1387
|
+
}
|
|
1388
|
+
response_data = self.api_client.call_api(
|
|
1389
|
+
*_param,
|
|
1390
|
+
_request_timeout=_request_timeout
|
|
1391
|
+
)
|
|
1392
|
+
response_data.read()
|
|
1393
|
+
return self.api_client.response_deserialize(
|
|
1394
|
+
response_data=response_data,
|
|
1395
|
+
response_types_map=_response_types_map,
|
|
1396
|
+
)
|
|
1397
|
+
|
|
1398
|
+
|
|
1399
|
+
@validate_call
|
|
1400
|
+
def load_without_preload_content(
|
|
1401
|
+
self,
|
|
1402
|
+
username: StrictStr,
|
|
1403
|
+
dataset: StrictStr,
|
|
1404
|
+
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
1405
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1406
|
+
_request_timeout: Union[
|
|
1407
|
+
None,
|
|
1408
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1409
|
+
Tuple[
|
|
1410
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1411
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1412
|
+
]
|
|
1413
|
+
] = None,
|
|
1414
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1415
|
+
_content_type: Optional[StrictStr] = None,
|
|
1416
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1417
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1418
|
+
) -> RESTResponseType:
|
|
1419
|
+
"""Load data into a dataset
|
|
1420
|
+
|
|
1421
|
+
|
|
1422
|
+
:param username: (required)
|
|
1423
|
+
:type username: str
|
|
1424
|
+
:param dataset: (required)
|
|
1425
|
+
:type dataset: str
|
|
1426
|
+
:param file: (required)
|
|
1427
|
+
:type file: bytearray
|
|
1428
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1429
|
+
:type q_answer_api_key: str
|
|
1430
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1431
|
+
number provided, it will be total request
|
|
1432
|
+
timeout. It can also be a pair (tuple) of
|
|
1433
|
+
(connection, read) timeouts.
|
|
1434
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1435
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1436
|
+
request; this effectively ignores the
|
|
1437
|
+
authentication in the spec for a single request.
|
|
1438
|
+
:type _request_auth: dict, optional
|
|
1439
|
+
:param _content_type: force content-type for the request.
|
|
1440
|
+
:type _content_type: str, Optional
|
|
1441
|
+
:param _headers: set to override the headers for a single
|
|
1442
|
+
request; this effectively ignores the headers
|
|
1443
|
+
in the spec for a single request.
|
|
1444
|
+
:type _headers: dict, optional
|
|
1445
|
+
:param _host_index: set to override the host_index for a single
|
|
1446
|
+
request; this effectively ignores the host_index
|
|
1447
|
+
in the spec for a single request.
|
|
1448
|
+
:type _host_index: int, optional
|
|
1449
|
+
:return: Returns the result object.
|
|
1450
|
+
""" # noqa: E501
|
|
1451
|
+
|
|
1452
|
+
_param = self._load_serialize(
|
|
1453
|
+
username=username,
|
|
1454
|
+
dataset=dataset,
|
|
1455
|
+
file=file,
|
|
1456
|
+
q_answer_api_key=q_answer_api_key,
|
|
1457
|
+
_request_auth=_request_auth,
|
|
1458
|
+
_content_type=_content_type,
|
|
1459
|
+
_headers=_headers,
|
|
1460
|
+
_host_index=_host_index
|
|
1461
|
+
)
|
|
1462
|
+
|
|
1463
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1464
|
+
'200': "object",
|
|
1465
|
+
'422': "HTTPValidationError",
|
|
1466
|
+
}
|
|
1467
|
+
response_data = self.api_client.call_api(
|
|
1468
|
+
*_param,
|
|
1469
|
+
_request_timeout=_request_timeout
|
|
1470
|
+
)
|
|
1471
|
+
return response_data.response
|
|
1472
|
+
|
|
1473
|
+
|
|
1474
|
+
def _load_serialize(
|
|
1475
|
+
self,
|
|
1476
|
+
username,
|
|
1477
|
+
dataset,
|
|
1478
|
+
file,
|
|
1479
|
+
q_answer_api_key,
|
|
1480
|
+
_request_auth,
|
|
1481
|
+
_content_type,
|
|
1482
|
+
_headers,
|
|
1483
|
+
_host_index,
|
|
1484
|
+
) -> RequestSerialized:
|
|
1485
|
+
|
|
1486
|
+
_host = None
|
|
1487
|
+
|
|
1488
|
+
_collection_formats: Dict[str, str] = {
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
_path_params: Dict[str, str] = {}
|
|
1492
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1493
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1494
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1495
|
+
_files: Dict[
|
|
1496
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1497
|
+
] = {}
|
|
1498
|
+
_body_params: Optional[bytes] = None
|
|
1499
|
+
|
|
1500
|
+
# process the path parameters
|
|
1501
|
+
if username is not None:
|
|
1502
|
+
_path_params['username'] = username
|
|
1503
|
+
if dataset is not None:
|
|
1504
|
+
_path_params['dataset'] = dataset
|
|
1505
|
+
# process the query parameters
|
|
1506
|
+
# process the header parameters
|
|
1507
|
+
if q_answer_api_key is not None:
|
|
1508
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
1509
|
+
# process the form parameters
|
|
1510
|
+
if file is not None:
|
|
1511
|
+
_files['file'] = file
|
|
1512
|
+
# process the body parameter
|
|
1513
|
+
|
|
1514
|
+
|
|
1515
|
+
# set the HTTP header `Accept`
|
|
1516
|
+
if 'Accept' not in _header_params:
|
|
1517
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1518
|
+
[
|
|
1519
|
+
'application/json'
|
|
1520
|
+
]
|
|
1521
|
+
)
|
|
1522
|
+
|
|
1523
|
+
# set the HTTP header `Content-Type`
|
|
1524
|
+
if _content_type:
|
|
1525
|
+
_header_params['Content-Type'] = _content_type
|
|
1526
|
+
else:
|
|
1527
|
+
_default_content_type = (
|
|
1528
|
+
self.api_client.select_header_content_type(
|
|
1529
|
+
[
|
|
1530
|
+
'multipart/form-data'
|
|
1531
|
+
]
|
|
1532
|
+
)
|
|
1533
|
+
)
|
|
1534
|
+
if _default_content_type is not None:
|
|
1535
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1536
|
+
|
|
1537
|
+
# authentication setting
|
|
1538
|
+
_auth_settings: List[str] = [
|
|
1539
|
+
'QAnswer-Api-Key',
|
|
1540
|
+
'Bearer token'
|
|
1541
|
+
]
|
|
1542
|
+
|
|
1543
|
+
return self.api_client.param_serialize(
|
|
1544
|
+
method='POST',
|
|
1545
|
+
resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/load',
|
|
1546
|
+
path_params=_path_params,
|
|
1547
|
+
query_params=_query_params,
|
|
1548
|
+
header_params=_header_params,
|
|
1549
|
+
body=_body_params,
|
|
1550
|
+
post_params=_form_params,
|
|
1551
|
+
files=_files,
|
|
1552
|
+
auth_settings=_auth_settings,
|
|
1553
|
+
collection_formats=_collection_formats,
|
|
1554
|
+
_host=_host,
|
|
1555
|
+
_request_auth=_request_auth
|
|
1556
|
+
)
|
|
1557
|
+
|
|
1558
|
+
|
|
1559
|
+
|
|
1560
|
+
|
|
1561
|
+
@validate_call
|
|
1562
|
+
def merge(
|
|
1563
|
+
self,
|
|
1564
|
+
username: StrictStr,
|
|
1565
|
+
dataset: StrictStr,
|
|
1566
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1567
|
+
_request_timeout: Union[
|
|
1568
|
+
None,
|
|
1569
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1570
|
+
Tuple[
|
|
1571
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1572
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1573
|
+
]
|
|
1574
|
+
] = None,
|
|
1575
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1576
|
+
_content_type: Optional[StrictStr] = None,
|
|
1577
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1578
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1579
|
+
) -> Dict[str, object]:
|
|
1580
|
+
"""Trigger HDT dump (merge)
|
|
1581
|
+
|
|
1582
|
+
|
|
1583
|
+
:param username: (required)
|
|
1584
|
+
:type username: str
|
|
1585
|
+
:param dataset: (required)
|
|
1586
|
+
:type dataset: str
|
|
1587
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1588
|
+
:type q_answer_api_key: str
|
|
1589
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1590
|
+
number provided, it will be total request
|
|
1591
|
+
timeout. It can also be a pair (tuple) of
|
|
1592
|
+
(connection, read) timeouts.
|
|
1593
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1594
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1595
|
+
request; this effectively ignores the
|
|
1596
|
+
authentication in the spec for a single request.
|
|
1597
|
+
:type _request_auth: dict, optional
|
|
1598
|
+
:param _content_type: force content-type for the request.
|
|
1599
|
+
:type _content_type: str, Optional
|
|
1600
|
+
:param _headers: set to override the headers for a single
|
|
1601
|
+
request; this effectively ignores the headers
|
|
1602
|
+
in the spec for a single request.
|
|
1603
|
+
:type _headers: dict, optional
|
|
1604
|
+
:param _host_index: set to override the host_index for a single
|
|
1605
|
+
request; this effectively ignores the host_index
|
|
1606
|
+
in the spec for a single request.
|
|
1607
|
+
:type _host_index: int, optional
|
|
1608
|
+
:return: Returns the result object.
|
|
1609
|
+
""" # noqa: E501
|
|
1610
|
+
|
|
1611
|
+
_param = self._merge_serialize(
|
|
1612
|
+
username=username,
|
|
1613
|
+
dataset=dataset,
|
|
1614
|
+
q_answer_api_key=q_answer_api_key,
|
|
1615
|
+
_request_auth=_request_auth,
|
|
1616
|
+
_content_type=_content_type,
|
|
1617
|
+
_headers=_headers,
|
|
1618
|
+
_host_index=_host_index
|
|
1619
|
+
)
|
|
1620
|
+
|
|
1621
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1622
|
+
'200': "Dict[str, object]",
|
|
1623
|
+
'422': "HTTPValidationError",
|
|
1624
|
+
}
|
|
1625
|
+
response_data = self.api_client.call_api(
|
|
1626
|
+
*_param,
|
|
1627
|
+
_request_timeout=_request_timeout
|
|
1628
|
+
)
|
|
1629
|
+
response_data.read()
|
|
1630
|
+
return self.api_client.response_deserialize(
|
|
1631
|
+
response_data=response_data,
|
|
1632
|
+
response_types_map=_response_types_map,
|
|
1633
|
+
).data
|
|
1634
|
+
|
|
1635
|
+
|
|
1636
|
+
@validate_call
|
|
1637
|
+
def merge_with_http_info(
|
|
1638
|
+
self,
|
|
1639
|
+
username: StrictStr,
|
|
1640
|
+
dataset: StrictStr,
|
|
1641
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1642
|
+
_request_timeout: Union[
|
|
1643
|
+
None,
|
|
1644
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1645
|
+
Tuple[
|
|
1646
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1647
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1648
|
+
]
|
|
1649
|
+
] = None,
|
|
1650
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1651
|
+
_content_type: Optional[StrictStr] = None,
|
|
1652
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1653
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1654
|
+
) -> ApiResponse[Dict[str, object]]:
|
|
1655
|
+
"""Trigger HDT dump (merge)
|
|
1656
|
+
|
|
1657
|
+
|
|
1658
|
+
:param username: (required)
|
|
1659
|
+
:type username: str
|
|
1660
|
+
:param dataset: (required)
|
|
1661
|
+
:type dataset: str
|
|
1662
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1663
|
+
:type q_answer_api_key: str
|
|
1664
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1665
|
+
number provided, it will be total request
|
|
1666
|
+
timeout. It can also be a pair (tuple) of
|
|
1667
|
+
(connection, read) timeouts.
|
|
1668
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1669
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1670
|
+
request; this effectively ignores the
|
|
1671
|
+
authentication in the spec for a single request.
|
|
1672
|
+
:type _request_auth: dict, optional
|
|
1673
|
+
:param _content_type: force content-type for the request.
|
|
1674
|
+
:type _content_type: str, Optional
|
|
1675
|
+
:param _headers: set to override the headers for a single
|
|
1676
|
+
request; this effectively ignores the headers
|
|
1677
|
+
in the spec for a single request.
|
|
1678
|
+
:type _headers: dict, optional
|
|
1679
|
+
:param _host_index: set to override the host_index for a single
|
|
1680
|
+
request; this effectively ignores the host_index
|
|
1681
|
+
in the spec for a single request.
|
|
1682
|
+
:type _host_index: int, optional
|
|
1683
|
+
:return: Returns the result object.
|
|
1684
|
+
""" # noqa: E501
|
|
1685
|
+
|
|
1686
|
+
_param = self._merge_serialize(
|
|
1687
|
+
username=username,
|
|
1688
|
+
dataset=dataset,
|
|
1689
|
+
q_answer_api_key=q_answer_api_key,
|
|
1690
|
+
_request_auth=_request_auth,
|
|
1691
|
+
_content_type=_content_type,
|
|
1692
|
+
_headers=_headers,
|
|
1693
|
+
_host_index=_host_index
|
|
1694
|
+
)
|
|
1695
|
+
|
|
1696
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1697
|
+
'200': "Dict[str, object]",
|
|
1698
|
+
'422': "HTTPValidationError",
|
|
1699
|
+
}
|
|
1700
|
+
response_data = self.api_client.call_api(
|
|
1701
|
+
*_param,
|
|
1702
|
+
_request_timeout=_request_timeout
|
|
1703
|
+
)
|
|
1704
|
+
response_data.read()
|
|
1705
|
+
return self.api_client.response_deserialize(
|
|
1706
|
+
response_data=response_data,
|
|
1707
|
+
response_types_map=_response_types_map,
|
|
1708
|
+
)
|
|
1709
|
+
|
|
1710
|
+
|
|
1711
|
+
@validate_call
|
|
1712
|
+
def merge_without_preload_content(
|
|
1713
|
+
self,
|
|
1714
|
+
username: StrictStr,
|
|
1715
|
+
dataset: StrictStr,
|
|
1716
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1717
|
+
_request_timeout: Union[
|
|
1718
|
+
None,
|
|
1719
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1720
|
+
Tuple[
|
|
1721
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1722
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1723
|
+
]
|
|
1724
|
+
] = None,
|
|
1725
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1726
|
+
_content_type: Optional[StrictStr] = None,
|
|
1727
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1728
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1729
|
+
) -> RESTResponseType:
|
|
1730
|
+
"""Trigger HDT dump (merge)
|
|
1731
|
+
|
|
1732
|
+
|
|
1733
|
+
:param username: (required)
|
|
1734
|
+
:type username: str
|
|
1735
|
+
:param dataset: (required)
|
|
1736
|
+
:type dataset: str
|
|
1737
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1738
|
+
:type q_answer_api_key: str
|
|
1739
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1740
|
+
number provided, it will be total request
|
|
1741
|
+
timeout. It can also be a pair (tuple) of
|
|
1742
|
+
(connection, read) timeouts.
|
|
1743
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1744
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1745
|
+
request; this effectively ignores the
|
|
1746
|
+
authentication in the spec for a single request.
|
|
1747
|
+
:type _request_auth: dict, optional
|
|
1748
|
+
:param _content_type: force content-type for the request.
|
|
1749
|
+
:type _content_type: str, Optional
|
|
1750
|
+
:param _headers: set to override the headers for a single
|
|
1751
|
+
request; this effectively ignores the headers
|
|
1752
|
+
in the spec for a single request.
|
|
1753
|
+
:type _headers: dict, optional
|
|
1754
|
+
:param _host_index: set to override the host_index for a single
|
|
1755
|
+
request; this effectively ignores the host_index
|
|
1756
|
+
in the spec for a single request.
|
|
1757
|
+
:type _host_index: int, optional
|
|
1758
|
+
:return: Returns the result object.
|
|
1759
|
+
""" # noqa: E501
|
|
1760
|
+
|
|
1761
|
+
_param = self._merge_serialize(
|
|
1762
|
+
username=username,
|
|
1763
|
+
dataset=dataset,
|
|
1764
|
+
q_answer_api_key=q_answer_api_key,
|
|
1765
|
+
_request_auth=_request_auth,
|
|
1766
|
+
_content_type=_content_type,
|
|
1767
|
+
_headers=_headers,
|
|
1768
|
+
_host_index=_host_index
|
|
1769
|
+
)
|
|
1770
|
+
|
|
1771
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1772
|
+
'200': "Dict[str, object]",
|
|
1773
|
+
'422': "HTTPValidationError",
|
|
1774
|
+
}
|
|
1775
|
+
response_data = self.api_client.call_api(
|
|
1776
|
+
*_param,
|
|
1777
|
+
_request_timeout=_request_timeout
|
|
1778
|
+
)
|
|
1779
|
+
return response_data.response
|
|
1780
|
+
|
|
1781
|
+
|
|
1782
|
+
def _merge_serialize(
|
|
1783
|
+
self,
|
|
1784
|
+
username,
|
|
1785
|
+
dataset,
|
|
1786
|
+
q_answer_api_key,
|
|
1787
|
+
_request_auth,
|
|
1788
|
+
_content_type,
|
|
1789
|
+
_headers,
|
|
1790
|
+
_host_index,
|
|
1791
|
+
) -> RequestSerialized:
|
|
1792
|
+
|
|
1793
|
+
_host = None
|
|
1794
|
+
|
|
1795
|
+
_collection_formats: Dict[str, str] = {
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
_path_params: Dict[str, str] = {}
|
|
1799
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1800
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1801
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1802
|
+
_files: Dict[
|
|
1803
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1804
|
+
] = {}
|
|
1805
|
+
_body_params: Optional[bytes] = None
|
|
1806
|
+
|
|
1807
|
+
# process the path parameters
|
|
1808
|
+
if username is not None:
|
|
1809
|
+
_path_params['username'] = username
|
|
1810
|
+
if dataset is not None:
|
|
1811
|
+
_path_params['dataset'] = dataset
|
|
1812
|
+
# process the query parameters
|
|
1813
|
+
# process the header parameters
|
|
1814
|
+
if q_answer_api_key is not None:
|
|
1815
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
1816
|
+
# process the form parameters
|
|
1817
|
+
# process the body parameter
|
|
1818
|
+
|
|
1819
|
+
|
|
1820
|
+
# set the HTTP header `Accept`
|
|
1821
|
+
if 'Accept' not in _header_params:
|
|
1822
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1823
|
+
[
|
|
1824
|
+
'application/json'
|
|
1825
|
+
]
|
|
1826
|
+
)
|
|
1827
|
+
|
|
1828
|
+
|
|
1829
|
+
# authentication setting
|
|
1830
|
+
_auth_settings: List[str] = [
|
|
1831
|
+
'QAnswer-Api-Key',
|
|
1832
|
+
'Bearer token'
|
|
1833
|
+
]
|
|
1834
|
+
|
|
1835
|
+
return self.api_client.param_serialize(
|
|
1836
|
+
method='GET',
|
|
1837
|
+
resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/merge',
|
|
1838
|
+
path_params=_path_params,
|
|
1839
|
+
query_params=_query_params,
|
|
1840
|
+
header_params=_header_params,
|
|
1841
|
+
body=_body_params,
|
|
1842
|
+
post_params=_form_params,
|
|
1843
|
+
files=_files,
|
|
1844
|
+
auth_settings=_auth_settings,
|
|
1845
|
+
collection_formats=_collection_formats,
|
|
1846
|
+
_host=_host,
|
|
1847
|
+
_request_auth=_request_auth
|
|
1848
|
+
)
|
|
1849
|
+
|
|
1850
|
+
|
|
1851
|
+
|
|
1852
|
+
|
|
1853
|
+
@validate_call
|
|
1854
|
+
def reindex(
|
|
1855
|
+
self,
|
|
1856
|
+
username: StrictStr,
|
|
1857
|
+
dataset: StrictStr,
|
|
1858
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1859
|
+
_request_timeout: Union[
|
|
1860
|
+
None,
|
|
1861
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1862
|
+
Tuple[
|
|
1863
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1864
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1865
|
+
]
|
|
1866
|
+
] = None,
|
|
1867
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1868
|
+
_content_type: Optional[StrictStr] = None,
|
|
1869
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1870
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1871
|
+
) -> object:
|
|
1872
|
+
"""Reindex a dataset
|
|
1873
|
+
|
|
1874
|
+
|
|
1875
|
+
:param username: (required)
|
|
1876
|
+
:type username: str
|
|
1877
|
+
:param dataset: (required)
|
|
1878
|
+
:type dataset: str
|
|
1879
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1880
|
+
:type q_answer_api_key: str
|
|
1881
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1882
|
+
number provided, it will be total request
|
|
1883
|
+
timeout. It can also be a pair (tuple) of
|
|
1884
|
+
(connection, read) timeouts.
|
|
1885
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1886
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1887
|
+
request; this effectively ignores the
|
|
1888
|
+
authentication in the spec for a single request.
|
|
1889
|
+
:type _request_auth: dict, optional
|
|
1890
|
+
:param _content_type: force content-type for the request.
|
|
1891
|
+
:type _content_type: str, Optional
|
|
1892
|
+
:param _headers: set to override the headers for a single
|
|
1893
|
+
request; this effectively ignores the headers
|
|
1894
|
+
in the spec for a single request.
|
|
1895
|
+
:type _headers: dict, optional
|
|
1896
|
+
:param _host_index: set to override the host_index for a single
|
|
1897
|
+
request; this effectively ignores the host_index
|
|
1898
|
+
in the spec for a single request.
|
|
1899
|
+
:type _host_index: int, optional
|
|
1900
|
+
:return: Returns the result object.
|
|
1901
|
+
""" # noqa: E501
|
|
1902
|
+
|
|
1903
|
+
_param = self._reindex_serialize(
|
|
1904
|
+
username=username,
|
|
1905
|
+
dataset=dataset,
|
|
1906
|
+
q_answer_api_key=q_answer_api_key,
|
|
1907
|
+
_request_auth=_request_auth,
|
|
1908
|
+
_content_type=_content_type,
|
|
1909
|
+
_headers=_headers,
|
|
1910
|
+
_host_index=_host_index
|
|
1911
|
+
)
|
|
1912
|
+
|
|
1913
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1914
|
+
'200': "object",
|
|
1915
|
+
'422': "HTTPValidationError",
|
|
1916
|
+
}
|
|
1917
|
+
response_data = self.api_client.call_api(
|
|
1918
|
+
*_param,
|
|
1919
|
+
_request_timeout=_request_timeout
|
|
1920
|
+
)
|
|
1921
|
+
response_data.read()
|
|
1922
|
+
return self.api_client.response_deserialize(
|
|
1923
|
+
response_data=response_data,
|
|
1924
|
+
response_types_map=_response_types_map,
|
|
1925
|
+
).data
|
|
1926
|
+
|
|
1927
|
+
|
|
1928
|
+
@validate_call
|
|
1929
|
+
def reindex_with_http_info(
|
|
1930
|
+
self,
|
|
1931
|
+
username: StrictStr,
|
|
1932
|
+
dataset: StrictStr,
|
|
1933
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1934
|
+
_request_timeout: Union[
|
|
1935
|
+
None,
|
|
1936
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1937
|
+
Tuple[
|
|
1938
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1939
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1940
|
+
]
|
|
1941
|
+
] = None,
|
|
1942
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1943
|
+
_content_type: Optional[StrictStr] = None,
|
|
1944
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1945
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1946
|
+
) -> ApiResponse[object]:
|
|
1947
|
+
"""Reindex a dataset
|
|
1948
|
+
|
|
1949
|
+
|
|
1950
|
+
:param username: (required)
|
|
1951
|
+
:type username: str
|
|
1952
|
+
:param dataset: (required)
|
|
1953
|
+
:type dataset: str
|
|
1954
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1955
|
+
:type q_answer_api_key: str
|
|
1956
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1957
|
+
number provided, it will be total request
|
|
1958
|
+
timeout. It can also be a pair (tuple) of
|
|
1959
|
+
(connection, read) timeouts.
|
|
1960
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1961
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1962
|
+
request; this effectively ignores the
|
|
1963
|
+
authentication in the spec for a single request.
|
|
1964
|
+
:type _request_auth: dict, optional
|
|
1965
|
+
:param _content_type: force content-type for the request.
|
|
1966
|
+
:type _content_type: str, Optional
|
|
1967
|
+
:param _headers: set to override the headers for a single
|
|
1968
|
+
request; this effectively ignores the headers
|
|
1969
|
+
in the spec for a single request.
|
|
1970
|
+
:type _headers: dict, optional
|
|
1971
|
+
:param _host_index: set to override the host_index for a single
|
|
1972
|
+
request; this effectively ignores the host_index
|
|
1973
|
+
in the spec for a single request.
|
|
1974
|
+
:type _host_index: int, optional
|
|
1975
|
+
:return: Returns the result object.
|
|
1976
|
+
""" # noqa: E501
|
|
1977
|
+
|
|
1978
|
+
_param = self._reindex_serialize(
|
|
1979
|
+
username=username,
|
|
1980
|
+
dataset=dataset,
|
|
1981
|
+
q_answer_api_key=q_answer_api_key,
|
|
1982
|
+
_request_auth=_request_auth,
|
|
1983
|
+
_content_type=_content_type,
|
|
1984
|
+
_headers=_headers,
|
|
1985
|
+
_host_index=_host_index
|
|
1986
|
+
)
|
|
1987
|
+
|
|
1988
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1989
|
+
'200': "object",
|
|
1990
|
+
'422': "HTTPValidationError",
|
|
1991
|
+
}
|
|
1992
|
+
response_data = self.api_client.call_api(
|
|
1993
|
+
*_param,
|
|
1994
|
+
_request_timeout=_request_timeout
|
|
1995
|
+
)
|
|
1996
|
+
response_data.read()
|
|
1997
|
+
return self.api_client.response_deserialize(
|
|
1998
|
+
response_data=response_data,
|
|
1999
|
+
response_types_map=_response_types_map,
|
|
2000
|
+
)
|
|
2001
|
+
|
|
2002
|
+
|
|
2003
|
+
@validate_call
|
|
2004
|
+
def reindex_without_preload_content(
|
|
2005
|
+
self,
|
|
2006
|
+
username: StrictStr,
|
|
2007
|
+
dataset: StrictStr,
|
|
2008
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2009
|
+
_request_timeout: Union[
|
|
2010
|
+
None,
|
|
2011
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2012
|
+
Tuple[
|
|
2013
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2014
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2015
|
+
]
|
|
2016
|
+
] = None,
|
|
2017
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2018
|
+
_content_type: Optional[StrictStr] = None,
|
|
2019
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2020
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2021
|
+
) -> RESTResponseType:
|
|
2022
|
+
"""Reindex a dataset
|
|
2023
|
+
|
|
2024
|
+
|
|
2025
|
+
:param username: (required)
|
|
2026
|
+
:type username: str
|
|
2027
|
+
:param dataset: (required)
|
|
2028
|
+
:type dataset: str
|
|
2029
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2030
|
+
:type q_answer_api_key: str
|
|
2031
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2032
|
+
number provided, it will be total request
|
|
2033
|
+
timeout. It can also be a pair (tuple) of
|
|
2034
|
+
(connection, read) timeouts.
|
|
2035
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2036
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2037
|
+
request; this effectively ignores the
|
|
2038
|
+
authentication in the spec for a single request.
|
|
2039
|
+
:type _request_auth: dict, optional
|
|
2040
|
+
:param _content_type: force content-type for the request.
|
|
2041
|
+
:type _content_type: str, Optional
|
|
2042
|
+
:param _headers: set to override the headers for a single
|
|
2043
|
+
request; this effectively ignores the headers
|
|
2044
|
+
in the spec for a single request.
|
|
2045
|
+
:type _headers: dict, optional
|
|
2046
|
+
:param _host_index: set to override the host_index for a single
|
|
2047
|
+
request; this effectively ignores the host_index
|
|
2048
|
+
in the spec for a single request.
|
|
2049
|
+
:type _host_index: int, optional
|
|
2050
|
+
:return: Returns the result object.
|
|
2051
|
+
""" # noqa: E501
|
|
2052
|
+
|
|
2053
|
+
_param = self._reindex_serialize(
|
|
2054
|
+
username=username,
|
|
2055
|
+
dataset=dataset,
|
|
2056
|
+
q_answer_api_key=q_answer_api_key,
|
|
2057
|
+
_request_auth=_request_auth,
|
|
2058
|
+
_content_type=_content_type,
|
|
2059
|
+
_headers=_headers,
|
|
2060
|
+
_host_index=_host_index
|
|
2061
|
+
)
|
|
2062
|
+
|
|
2063
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2064
|
+
'200': "object",
|
|
2065
|
+
'422': "HTTPValidationError",
|
|
2066
|
+
}
|
|
2067
|
+
response_data = self.api_client.call_api(
|
|
2068
|
+
*_param,
|
|
2069
|
+
_request_timeout=_request_timeout
|
|
2070
|
+
)
|
|
2071
|
+
return response_data.response
|
|
2072
|
+
|
|
2073
|
+
|
|
2074
|
+
def _reindex_serialize(
|
|
2075
|
+
self,
|
|
2076
|
+
username,
|
|
2077
|
+
dataset,
|
|
2078
|
+
q_answer_api_key,
|
|
2079
|
+
_request_auth,
|
|
2080
|
+
_content_type,
|
|
2081
|
+
_headers,
|
|
2082
|
+
_host_index,
|
|
2083
|
+
) -> RequestSerialized:
|
|
2084
|
+
|
|
2085
|
+
_host = None
|
|
2086
|
+
|
|
2087
|
+
_collection_formats: Dict[str, str] = {
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
_path_params: Dict[str, str] = {}
|
|
2091
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2092
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2093
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2094
|
+
_files: Dict[
|
|
2095
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2096
|
+
] = {}
|
|
2097
|
+
_body_params: Optional[bytes] = None
|
|
2098
|
+
|
|
2099
|
+
# process the path parameters
|
|
2100
|
+
if username is not None:
|
|
2101
|
+
_path_params['username'] = username
|
|
2102
|
+
if dataset is not None:
|
|
2103
|
+
_path_params['dataset'] = dataset
|
|
2104
|
+
# process the query parameters
|
|
2105
|
+
# process the header parameters
|
|
2106
|
+
if q_answer_api_key is not None:
|
|
2107
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
2108
|
+
# process the form parameters
|
|
2109
|
+
# process the body parameter
|
|
2110
|
+
|
|
2111
|
+
|
|
2112
|
+
# set the HTTP header `Accept`
|
|
2113
|
+
if 'Accept' not in _header_params:
|
|
2114
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2115
|
+
[
|
|
2116
|
+
'application/json'
|
|
2117
|
+
]
|
|
2118
|
+
)
|
|
2119
|
+
|
|
2120
|
+
|
|
2121
|
+
# authentication setting
|
|
2122
|
+
_auth_settings: List[str] = [
|
|
2123
|
+
'QAnswer-Api-Key',
|
|
2124
|
+
'Bearer token'
|
|
2125
|
+
]
|
|
2126
|
+
|
|
2127
|
+
return self.api_client.param_serialize(
|
|
2128
|
+
method='GET',
|
|
2129
|
+
resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/reindex',
|
|
2130
|
+
path_params=_path_params,
|
|
2131
|
+
query_params=_query_params,
|
|
2132
|
+
header_params=_header_params,
|
|
2133
|
+
body=_body_params,
|
|
2134
|
+
post_params=_form_params,
|
|
2135
|
+
files=_files,
|
|
2136
|
+
auth_settings=_auth_settings,
|
|
2137
|
+
collection_formats=_collection_formats,
|
|
2138
|
+
_host=_host,
|
|
2139
|
+
_request_auth=_request_auth
|
|
2140
|
+
)
|
|
2141
|
+
|
|
2142
|
+
|
|
2143
|
+
|
|
2144
|
+
|
|
2145
|
+
@validate_call
|
|
2146
|
+
def set_prefixes(
|
|
2147
|
+
self,
|
|
2148
|
+
username: StrictStr,
|
|
2149
|
+
dataset: StrictStr,
|
|
2150
|
+
request_body: Dict[str, StrictStr],
|
|
2151
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2152
|
+
_request_timeout: Union[
|
|
2153
|
+
None,
|
|
2154
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2155
|
+
Tuple[
|
|
2156
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2157
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2158
|
+
]
|
|
2159
|
+
] = None,
|
|
2160
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2161
|
+
_content_type: Optional[StrictStr] = None,
|
|
2162
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2163
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2164
|
+
) -> object:
|
|
2165
|
+
"""Set SPARQL prefixes for a dataset
|
|
2166
|
+
|
|
2167
|
+
|
|
2168
|
+
:param username: (required)
|
|
2169
|
+
:type username: str
|
|
2170
|
+
:param dataset: (required)
|
|
2171
|
+
:type dataset: str
|
|
2172
|
+
:param request_body: (required)
|
|
2173
|
+
:type request_body: Dict[str, str]
|
|
2174
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2175
|
+
:type q_answer_api_key: str
|
|
2176
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2177
|
+
number provided, it will be total request
|
|
2178
|
+
timeout. It can also be a pair (tuple) of
|
|
2179
|
+
(connection, read) timeouts.
|
|
2180
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2181
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2182
|
+
request; this effectively ignores the
|
|
2183
|
+
authentication in the spec for a single request.
|
|
2184
|
+
:type _request_auth: dict, optional
|
|
2185
|
+
:param _content_type: force content-type for the request.
|
|
2186
|
+
:type _content_type: str, Optional
|
|
2187
|
+
:param _headers: set to override the headers for a single
|
|
2188
|
+
request; this effectively ignores the headers
|
|
2189
|
+
in the spec for a single request.
|
|
2190
|
+
:type _headers: dict, optional
|
|
2191
|
+
:param _host_index: set to override the host_index for a single
|
|
2192
|
+
request; this effectively ignores the host_index
|
|
2193
|
+
in the spec for a single request.
|
|
2194
|
+
:type _host_index: int, optional
|
|
2195
|
+
:return: Returns the result object.
|
|
2196
|
+
""" # noqa: E501
|
|
2197
|
+
|
|
2198
|
+
_param = self._set_prefixes_serialize(
|
|
2199
|
+
username=username,
|
|
2200
|
+
dataset=dataset,
|
|
2201
|
+
request_body=request_body,
|
|
2202
|
+
q_answer_api_key=q_answer_api_key,
|
|
2203
|
+
_request_auth=_request_auth,
|
|
2204
|
+
_content_type=_content_type,
|
|
2205
|
+
_headers=_headers,
|
|
2206
|
+
_host_index=_host_index
|
|
2207
|
+
)
|
|
2208
|
+
|
|
2209
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2210
|
+
'200': "object",
|
|
2211
|
+
'422': "HTTPValidationError",
|
|
2212
|
+
}
|
|
2213
|
+
response_data = self.api_client.call_api(
|
|
2214
|
+
*_param,
|
|
2215
|
+
_request_timeout=_request_timeout
|
|
2216
|
+
)
|
|
2217
|
+
response_data.read()
|
|
2218
|
+
return self.api_client.response_deserialize(
|
|
2219
|
+
response_data=response_data,
|
|
2220
|
+
response_types_map=_response_types_map,
|
|
2221
|
+
).data
|
|
2222
|
+
|
|
2223
|
+
|
|
2224
|
+
@validate_call
|
|
2225
|
+
def set_prefixes_with_http_info(
|
|
2226
|
+
self,
|
|
2227
|
+
username: StrictStr,
|
|
2228
|
+
dataset: StrictStr,
|
|
2229
|
+
request_body: Dict[str, StrictStr],
|
|
2230
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2231
|
+
_request_timeout: Union[
|
|
2232
|
+
None,
|
|
2233
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2234
|
+
Tuple[
|
|
2235
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2236
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2237
|
+
]
|
|
2238
|
+
] = None,
|
|
2239
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2240
|
+
_content_type: Optional[StrictStr] = None,
|
|
2241
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2242
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2243
|
+
) -> ApiResponse[object]:
|
|
2244
|
+
"""Set SPARQL prefixes for a dataset
|
|
2245
|
+
|
|
2246
|
+
|
|
2247
|
+
:param username: (required)
|
|
2248
|
+
:type username: str
|
|
2249
|
+
:param dataset: (required)
|
|
2250
|
+
:type dataset: str
|
|
2251
|
+
:param request_body: (required)
|
|
2252
|
+
:type request_body: Dict[str, str]
|
|
2253
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2254
|
+
:type q_answer_api_key: str
|
|
2255
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2256
|
+
number provided, it will be total request
|
|
2257
|
+
timeout. It can also be a pair (tuple) of
|
|
2258
|
+
(connection, read) timeouts.
|
|
2259
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2260
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2261
|
+
request; this effectively ignores the
|
|
2262
|
+
authentication in the spec for a single request.
|
|
2263
|
+
:type _request_auth: dict, optional
|
|
2264
|
+
:param _content_type: force content-type for the request.
|
|
2265
|
+
:type _content_type: str, Optional
|
|
2266
|
+
:param _headers: set to override the headers for a single
|
|
2267
|
+
request; this effectively ignores the headers
|
|
2268
|
+
in the spec for a single request.
|
|
2269
|
+
:type _headers: dict, optional
|
|
2270
|
+
:param _host_index: set to override the host_index for a single
|
|
2271
|
+
request; this effectively ignores the host_index
|
|
2272
|
+
in the spec for a single request.
|
|
2273
|
+
:type _host_index: int, optional
|
|
2274
|
+
:return: Returns the result object.
|
|
2275
|
+
""" # noqa: E501
|
|
2276
|
+
|
|
2277
|
+
_param = self._set_prefixes_serialize(
|
|
2278
|
+
username=username,
|
|
2279
|
+
dataset=dataset,
|
|
2280
|
+
request_body=request_body,
|
|
2281
|
+
q_answer_api_key=q_answer_api_key,
|
|
2282
|
+
_request_auth=_request_auth,
|
|
2283
|
+
_content_type=_content_type,
|
|
2284
|
+
_headers=_headers,
|
|
2285
|
+
_host_index=_host_index
|
|
2286
|
+
)
|
|
2287
|
+
|
|
2288
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2289
|
+
'200': "object",
|
|
2290
|
+
'422': "HTTPValidationError",
|
|
2291
|
+
}
|
|
2292
|
+
response_data = self.api_client.call_api(
|
|
2293
|
+
*_param,
|
|
2294
|
+
_request_timeout=_request_timeout
|
|
2295
|
+
)
|
|
2296
|
+
response_data.read()
|
|
2297
|
+
return self.api_client.response_deserialize(
|
|
2298
|
+
response_data=response_data,
|
|
2299
|
+
response_types_map=_response_types_map,
|
|
2300
|
+
)
|
|
2301
|
+
|
|
2302
|
+
|
|
2303
|
+
@validate_call
|
|
2304
|
+
def set_prefixes_without_preload_content(
|
|
2305
|
+
self,
|
|
2306
|
+
username: StrictStr,
|
|
2307
|
+
dataset: StrictStr,
|
|
2308
|
+
request_body: Dict[str, StrictStr],
|
|
2309
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2310
|
+
_request_timeout: Union[
|
|
2311
|
+
None,
|
|
2312
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2313
|
+
Tuple[
|
|
2314
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2315
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2316
|
+
]
|
|
2317
|
+
] = None,
|
|
2318
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2319
|
+
_content_type: Optional[StrictStr] = None,
|
|
2320
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2321
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2322
|
+
) -> RESTResponseType:
|
|
2323
|
+
"""Set SPARQL prefixes for a dataset
|
|
2324
|
+
|
|
2325
|
+
|
|
2326
|
+
:param username: (required)
|
|
2327
|
+
:type username: str
|
|
2328
|
+
:param dataset: (required)
|
|
2329
|
+
:type dataset: str
|
|
2330
|
+
:param request_body: (required)
|
|
2331
|
+
:type request_body: Dict[str, str]
|
|
2332
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2333
|
+
:type q_answer_api_key: str
|
|
2334
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2335
|
+
number provided, it will be total request
|
|
2336
|
+
timeout. It can also be a pair (tuple) of
|
|
2337
|
+
(connection, read) timeouts.
|
|
2338
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2339
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2340
|
+
request; this effectively ignores the
|
|
2341
|
+
authentication in the spec for a single request.
|
|
2342
|
+
:type _request_auth: dict, optional
|
|
2343
|
+
:param _content_type: force content-type for the request.
|
|
2344
|
+
:type _content_type: str, Optional
|
|
2345
|
+
:param _headers: set to override the headers for a single
|
|
2346
|
+
request; this effectively ignores the headers
|
|
2347
|
+
in the spec for a single request.
|
|
2348
|
+
:type _headers: dict, optional
|
|
2349
|
+
:param _host_index: set to override the host_index for a single
|
|
2350
|
+
request; this effectively ignores the host_index
|
|
2351
|
+
in the spec for a single request.
|
|
2352
|
+
:type _host_index: int, optional
|
|
2353
|
+
:return: Returns the result object.
|
|
2354
|
+
""" # noqa: E501
|
|
2355
|
+
|
|
2356
|
+
_param = self._set_prefixes_serialize(
|
|
2357
|
+
username=username,
|
|
2358
|
+
dataset=dataset,
|
|
2359
|
+
request_body=request_body,
|
|
2360
|
+
q_answer_api_key=q_answer_api_key,
|
|
2361
|
+
_request_auth=_request_auth,
|
|
2362
|
+
_content_type=_content_type,
|
|
2363
|
+
_headers=_headers,
|
|
2364
|
+
_host_index=_host_index
|
|
2365
|
+
)
|
|
2366
|
+
|
|
2367
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2368
|
+
'200': "object",
|
|
2369
|
+
'422': "HTTPValidationError",
|
|
2370
|
+
}
|
|
2371
|
+
response_data = self.api_client.call_api(
|
|
2372
|
+
*_param,
|
|
2373
|
+
_request_timeout=_request_timeout
|
|
2374
|
+
)
|
|
2375
|
+
return response_data.response
|
|
2376
|
+
|
|
2377
|
+
|
|
2378
|
+
def _set_prefixes_serialize(
|
|
2379
|
+
self,
|
|
2380
|
+
username,
|
|
2381
|
+
dataset,
|
|
2382
|
+
request_body,
|
|
2383
|
+
q_answer_api_key,
|
|
2384
|
+
_request_auth,
|
|
2385
|
+
_content_type,
|
|
2386
|
+
_headers,
|
|
2387
|
+
_host_index,
|
|
2388
|
+
) -> RequestSerialized:
|
|
2389
|
+
|
|
2390
|
+
_host = None
|
|
2391
|
+
|
|
2392
|
+
_collection_formats: Dict[str, str] = {
|
|
2393
|
+
}
|
|
2394
|
+
|
|
2395
|
+
_path_params: Dict[str, str] = {}
|
|
2396
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2397
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2398
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2399
|
+
_files: Dict[
|
|
2400
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2401
|
+
] = {}
|
|
2402
|
+
_body_params: Optional[bytes] = None
|
|
2403
|
+
|
|
2404
|
+
# process the path parameters
|
|
2405
|
+
if username is not None:
|
|
2406
|
+
_path_params['username'] = username
|
|
2407
|
+
if dataset is not None:
|
|
2408
|
+
_path_params['dataset'] = dataset
|
|
2409
|
+
# process the query parameters
|
|
2410
|
+
# process the header parameters
|
|
2411
|
+
if q_answer_api_key is not None:
|
|
2412
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
2413
|
+
# process the form parameters
|
|
2414
|
+
# process the body parameter
|
|
2415
|
+
if request_body is not None:
|
|
2416
|
+
_body_params = request_body
|
|
2417
|
+
|
|
2418
|
+
|
|
2419
|
+
# set the HTTP header `Accept`
|
|
2420
|
+
if 'Accept' not in _header_params:
|
|
2421
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2422
|
+
[
|
|
2423
|
+
'application/json'
|
|
2424
|
+
]
|
|
2425
|
+
)
|
|
2426
|
+
|
|
2427
|
+
# set the HTTP header `Content-Type`
|
|
2428
|
+
if _content_type:
|
|
2429
|
+
_header_params['Content-Type'] = _content_type
|
|
2430
|
+
else:
|
|
2431
|
+
_default_content_type = (
|
|
2432
|
+
self.api_client.select_header_content_type(
|
|
2433
|
+
[
|
|
2434
|
+
'application/json'
|
|
2435
|
+
]
|
|
2436
|
+
)
|
|
2437
|
+
)
|
|
2438
|
+
if _default_content_type is not None:
|
|
2439
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2440
|
+
|
|
2441
|
+
# authentication setting
|
|
2442
|
+
_auth_settings: List[str] = [
|
|
2443
|
+
'QAnswer-Api-Key',
|
|
2444
|
+
'Bearer token'
|
|
2445
|
+
]
|
|
2446
|
+
|
|
2447
|
+
return self.api_client.param_serialize(
|
|
2448
|
+
method='POST',
|
|
2449
|
+
resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/set-prefixes',
|
|
2450
|
+
path_params=_path_params,
|
|
2451
|
+
query_params=_query_params,
|
|
2452
|
+
header_params=_header_params,
|
|
2453
|
+
body=_body_params,
|
|
2454
|
+
post_params=_form_params,
|
|
2455
|
+
files=_files,
|
|
2456
|
+
auth_settings=_auth_settings,
|
|
2457
|
+
collection_formats=_collection_formats,
|
|
2458
|
+
_host=_host,
|
|
2459
|
+
_request_auth=_request_auth
|
|
2460
|
+
)
|
|
2461
|
+
|
|
2462
|
+
|
|
2463
|
+
|
|
2464
|
+
|
|
2465
|
+
@validate_call
|
|
2466
|
+
def sparql_endpoint_get(
|
|
2467
|
+
self,
|
|
2468
|
+
username: StrictStr,
|
|
2469
|
+
dataset: StrictStr,
|
|
2470
|
+
query: StrictStr,
|
|
2471
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2472
|
+
_request_timeout: Union[
|
|
2473
|
+
None,
|
|
2474
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2475
|
+
Tuple[
|
|
2476
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2477
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2478
|
+
]
|
|
2479
|
+
] = None,
|
|
2480
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2481
|
+
_content_type: Optional[StrictStr] = None,
|
|
2482
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2483
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2484
|
+
) -> object:
|
|
2485
|
+
"""Execute a SPARQL query on a dataset (GET)
|
|
2486
|
+
|
|
2487
|
+
|
|
2488
|
+
:param username: (required)
|
|
2489
|
+
:type username: str
|
|
2490
|
+
:param dataset: (required)
|
|
2491
|
+
:type dataset: str
|
|
2492
|
+
:param query: (required)
|
|
2493
|
+
:type query: str
|
|
2494
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2495
|
+
:type q_answer_api_key: str
|
|
2496
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2497
|
+
number provided, it will be total request
|
|
2498
|
+
timeout. It can also be a pair (tuple) of
|
|
2499
|
+
(connection, read) timeouts.
|
|
2500
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2501
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2502
|
+
request; this effectively ignores the
|
|
2503
|
+
authentication in the spec for a single request.
|
|
2504
|
+
:type _request_auth: dict, optional
|
|
2505
|
+
:param _content_type: force content-type for the request.
|
|
2506
|
+
:type _content_type: str, Optional
|
|
2507
|
+
:param _headers: set to override the headers for a single
|
|
2508
|
+
request; this effectively ignores the headers
|
|
2509
|
+
in the spec for a single request.
|
|
2510
|
+
:type _headers: dict, optional
|
|
2511
|
+
:param _host_index: set to override the host_index for a single
|
|
2512
|
+
request; this effectively ignores the host_index
|
|
2513
|
+
in the spec for a single request.
|
|
2514
|
+
:type _host_index: int, optional
|
|
2515
|
+
:return: Returns the result object.
|
|
2516
|
+
""" # noqa: E501
|
|
2517
|
+
|
|
2518
|
+
_param = self._sparql_endpoint_get_serialize(
|
|
2519
|
+
username=username,
|
|
2520
|
+
dataset=dataset,
|
|
2521
|
+
query=query,
|
|
2522
|
+
q_answer_api_key=q_answer_api_key,
|
|
2523
|
+
_request_auth=_request_auth,
|
|
2524
|
+
_content_type=_content_type,
|
|
2525
|
+
_headers=_headers,
|
|
2526
|
+
_host_index=_host_index
|
|
2527
|
+
)
|
|
2528
|
+
|
|
2529
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2530
|
+
'200': "object",
|
|
2531
|
+
'422': "HTTPValidationError",
|
|
2532
|
+
}
|
|
2533
|
+
response_data = self.api_client.call_api(
|
|
2534
|
+
*_param,
|
|
2535
|
+
_request_timeout=_request_timeout
|
|
2536
|
+
)
|
|
2537
|
+
response_data.read()
|
|
2538
|
+
return self.api_client.response_deserialize(
|
|
2539
|
+
response_data=response_data,
|
|
2540
|
+
response_types_map=_response_types_map,
|
|
2541
|
+
).data
|
|
2542
|
+
|
|
2543
|
+
|
|
2544
|
+
@validate_call
|
|
2545
|
+
def sparql_endpoint_get_with_http_info(
|
|
2546
|
+
self,
|
|
2547
|
+
username: StrictStr,
|
|
2548
|
+
dataset: StrictStr,
|
|
2549
|
+
query: StrictStr,
|
|
2550
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2551
|
+
_request_timeout: Union[
|
|
2552
|
+
None,
|
|
2553
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2554
|
+
Tuple[
|
|
2555
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2556
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2557
|
+
]
|
|
2558
|
+
] = None,
|
|
2559
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2560
|
+
_content_type: Optional[StrictStr] = None,
|
|
2561
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2562
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2563
|
+
) -> ApiResponse[object]:
|
|
2564
|
+
"""Execute a SPARQL query on a dataset (GET)
|
|
2565
|
+
|
|
2566
|
+
|
|
2567
|
+
:param username: (required)
|
|
2568
|
+
:type username: str
|
|
2569
|
+
:param dataset: (required)
|
|
2570
|
+
:type dataset: str
|
|
2571
|
+
:param query: (required)
|
|
2572
|
+
:type query: str
|
|
2573
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2574
|
+
:type q_answer_api_key: str
|
|
2575
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2576
|
+
number provided, it will be total request
|
|
2577
|
+
timeout. It can also be a pair (tuple) of
|
|
2578
|
+
(connection, read) timeouts.
|
|
2579
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2580
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2581
|
+
request; this effectively ignores the
|
|
2582
|
+
authentication in the spec for a single request.
|
|
2583
|
+
:type _request_auth: dict, optional
|
|
2584
|
+
:param _content_type: force content-type for the request.
|
|
2585
|
+
:type _content_type: str, Optional
|
|
2586
|
+
:param _headers: set to override the headers for a single
|
|
2587
|
+
request; this effectively ignores the headers
|
|
2588
|
+
in the spec for a single request.
|
|
2589
|
+
:type _headers: dict, optional
|
|
2590
|
+
:param _host_index: set to override the host_index for a single
|
|
2591
|
+
request; this effectively ignores the host_index
|
|
2592
|
+
in the spec for a single request.
|
|
2593
|
+
:type _host_index: int, optional
|
|
2594
|
+
:return: Returns the result object.
|
|
2595
|
+
""" # noqa: E501
|
|
2596
|
+
|
|
2597
|
+
_param = self._sparql_endpoint_get_serialize(
|
|
2598
|
+
username=username,
|
|
2599
|
+
dataset=dataset,
|
|
2600
|
+
query=query,
|
|
2601
|
+
q_answer_api_key=q_answer_api_key,
|
|
2602
|
+
_request_auth=_request_auth,
|
|
2603
|
+
_content_type=_content_type,
|
|
2604
|
+
_headers=_headers,
|
|
2605
|
+
_host_index=_host_index
|
|
2606
|
+
)
|
|
2607
|
+
|
|
2608
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2609
|
+
'200': "object",
|
|
2610
|
+
'422': "HTTPValidationError",
|
|
2611
|
+
}
|
|
2612
|
+
response_data = self.api_client.call_api(
|
|
2613
|
+
*_param,
|
|
2614
|
+
_request_timeout=_request_timeout
|
|
2615
|
+
)
|
|
2616
|
+
response_data.read()
|
|
2617
|
+
return self.api_client.response_deserialize(
|
|
2618
|
+
response_data=response_data,
|
|
2619
|
+
response_types_map=_response_types_map,
|
|
2620
|
+
)
|
|
2621
|
+
|
|
2622
|
+
|
|
2623
|
+
@validate_call
|
|
2624
|
+
def sparql_endpoint_get_without_preload_content(
|
|
2625
|
+
self,
|
|
2626
|
+
username: StrictStr,
|
|
2627
|
+
dataset: StrictStr,
|
|
2628
|
+
query: StrictStr,
|
|
2629
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2630
|
+
_request_timeout: Union[
|
|
2631
|
+
None,
|
|
2632
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2633
|
+
Tuple[
|
|
2634
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2635
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2636
|
+
]
|
|
2637
|
+
] = None,
|
|
2638
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2639
|
+
_content_type: Optional[StrictStr] = None,
|
|
2640
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2641
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2642
|
+
) -> RESTResponseType:
|
|
2643
|
+
"""Execute a SPARQL query on a dataset (GET)
|
|
2644
|
+
|
|
2645
|
+
|
|
2646
|
+
:param username: (required)
|
|
2647
|
+
:type username: str
|
|
2648
|
+
:param dataset: (required)
|
|
2649
|
+
:type dataset: str
|
|
2650
|
+
:param query: (required)
|
|
2651
|
+
:type query: str
|
|
2652
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2653
|
+
:type q_answer_api_key: str
|
|
2654
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2655
|
+
number provided, it will be total request
|
|
2656
|
+
timeout. It can also be a pair (tuple) of
|
|
2657
|
+
(connection, read) timeouts.
|
|
2658
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2659
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2660
|
+
request; this effectively ignores the
|
|
2661
|
+
authentication in the spec for a single request.
|
|
2662
|
+
:type _request_auth: dict, optional
|
|
2663
|
+
:param _content_type: force content-type for the request.
|
|
2664
|
+
:type _content_type: str, Optional
|
|
2665
|
+
:param _headers: set to override the headers for a single
|
|
2666
|
+
request; this effectively ignores the headers
|
|
2667
|
+
in the spec for a single request.
|
|
2668
|
+
:type _headers: dict, optional
|
|
2669
|
+
:param _host_index: set to override the host_index for a single
|
|
2670
|
+
request; this effectively ignores the host_index
|
|
2671
|
+
in the spec for a single request.
|
|
2672
|
+
:type _host_index: int, optional
|
|
2673
|
+
:return: Returns the result object.
|
|
2674
|
+
""" # noqa: E501
|
|
2675
|
+
|
|
2676
|
+
_param = self._sparql_endpoint_get_serialize(
|
|
2677
|
+
username=username,
|
|
2678
|
+
dataset=dataset,
|
|
2679
|
+
query=query,
|
|
2680
|
+
q_answer_api_key=q_answer_api_key,
|
|
2681
|
+
_request_auth=_request_auth,
|
|
2682
|
+
_content_type=_content_type,
|
|
2683
|
+
_headers=_headers,
|
|
2684
|
+
_host_index=_host_index
|
|
2685
|
+
)
|
|
2686
|
+
|
|
2687
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2688
|
+
'200': "object",
|
|
2689
|
+
'422': "HTTPValidationError",
|
|
2690
|
+
}
|
|
2691
|
+
response_data = self.api_client.call_api(
|
|
2692
|
+
*_param,
|
|
2693
|
+
_request_timeout=_request_timeout
|
|
2694
|
+
)
|
|
2695
|
+
return response_data.response
|
|
2696
|
+
|
|
2697
|
+
|
|
2698
|
+
def _sparql_endpoint_get_serialize(
|
|
2699
|
+
self,
|
|
2700
|
+
username,
|
|
2701
|
+
dataset,
|
|
2702
|
+
query,
|
|
2703
|
+
q_answer_api_key,
|
|
2704
|
+
_request_auth,
|
|
2705
|
+
_content_type,
|
|
2706
|
+
_headers,
|
|
2707
|
+
_host_index,
|
|
2708
|
+
) -> RequestSerialized:
|
|
2709
|
+
|
|
2710
|
+
_host = None
|
|
2711
|
+
|
|
2712
|
+
_collection_formats: Dict[str, str] = {
|
|
2713
|
+
}
|
|
2714
|
+
|
|
2715
|
+
_path_params: Dict[str, str] = {}
|
|
2716
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2717
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2718
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2719
|
+
_files: Dict[
|
|
2720
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2721
|
+
] = {}
|
|
2722
|
+
_body_params: Optional[bytes] = None
|
|
2723
|
+
|
|
2724
|
+
# process the path parameters
|
|
2725
|
+
if username is not None:
|
|
2726
|
+
_path_params['username'] = username
|
|
2727
|
+
if dataset is not None:
|
|
2728
|
+
_path_params['dataset'] = dataset
|
|
2729
|
+
# process the query parameters
|
|
2730
|
+
if query is not None:
|
|
2731
|
+
|
|
2732
|
+
_query_params.append(('query', query))
|
|
2733
|
+
|
|
2734
|
+
# process the header parameters
|
|
2735
|
+
if q_answer_api_key is not None:
|
|
2736
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
2737
|
+
# process the form parameters
|
|
2738
|
+
# process the body parameter
|
|
2739
|
+
|
|
2740
|
+
|
|
2741
|
+
# set the HTTP header `Accept`
|
|
2742
|
+
if 'Accept' not in _header_params:
|
|
2743
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2744
|
+
[
|
|
2745
|
+
'application/json'
|
|
2746
|
+
]
|
|
2747
|
+
)
|
|
2748
|
+
|
|
2749
|
+
|
|
2750
|
+
# authentication setting
|
|
2751
|
+
_auth_settings: List[str] = [
|
|
2752
|
+
'QAnswer-Api-Key',
|
|
2753
|
+
'Bearer token'
|
|
2754
|
+
]
|
|
2755
|
+
|
|
2756
|
+
return self.api_client.param_serialize(
|
|
2757
|
+
method='GET',
|
|
2758
|
+
resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/sparql',
|
|
2759
|
+
path_params=_path_params,
|
|
2760
|
+
query_params=_query_params,
|
|
2761
|
+
header_params=_header_params,
|
|
2762
|
+
body=_body_params,
|
|
2763
|
+
post_params=_form_params,
|
|
2764
|
+
files=_files,
|
|
2765
|
+
auth_settings=_auth_settings,
|
|
2766
|
+
collection_formats=_collection_formats,
|
|
2767
|
+
_host=_host,
|
|
2768
|
+
_request_auth=_request_auth
|
|
2769
|
+
)
|
|
2770
|
+
|
|
2771
|
+
|
|
2772
|
+
|
|
2773
|
+
|
|
2774
|
+
@validate_call
|
|
2775
|
+
def sparql_endpoint_post(
|
|
2776
|
+
self,
|
|
2777
|
+
username: StrictStr,
|
|
2778
|
+
dataset: StrictStr,
|
|
2779
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2780
|
+
_request_timeout: Union[
|
|
2781
|
+
None,
|
|
2782
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2783
|
+
Tuple[
|
|
2784
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2785
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2786
|
+
]
|
|
2787
|
+
] = None,
|
|
2788
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2789
|
+
_content_type: Optional[StrictStr] = None,
|
|
2790
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2791
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2792
|
+
) -> object:
|
|
2793
|
+
"""Execute a SPARQL query on a dataset (POST)
|
|
2794
|
+
|
|
2795
|
+
|
|
2796
|
+
:param username: (required)
|
|
2797
|
+
:type username: str
|
|
2798
|
+
:param dataset: (required)
|
|
2799
|
+
:type dataset: str
|
|
2800
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2801
|
+
:type q_answer_api_key: str
|
|
2802
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2803
|
+
number provided, it will be total request
|
|
2804
|
+
timeout. It can also be a pair (tuple) of
|
|
2805
|
+
(connection, read) timeouts.
|
|
2806
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2807
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2808
|
+
request; this effectively ignores the
|
|
2809
|
+
authentication in the spec for a single request.
|
|
2810
|
+
:type _request_auth: dict, optional
|
|
2811
|
+
:param _content_type: force content-type for the request.
|
|
2812
|
+
:type _content_type: str, Optional
|
|
2813
|
+
:param _headers: set to override the headers for a single
|
|
2814
|
+
request; this effectively ignores the headers
|
|
2815
|
+
in the spec for a single request.
|
|
2816
|
+
:type _headers: dict, optional
|
|
2817
|
+
:param _host_index: set to override the host_index for a single
|
|
2818
|
+
request; this effectively ignores the host_index
|
|
2819
|
+
in the spec for a single request.
|
|
2820
|
+
:type _host_index: int, optional
|
|
2821
|
+
:return: Returns the result object.
|
|
2822
|
+
""" # noqa: E501
|
|
2823
|
+
|
|
2824
|
+
_param = self._sparql_endpoint_post_serialize(
|
|
2825
|
+
username=username,
|
|
2826
|
+
dataset=dataset,
|
|
2827
|
+
q_answer_api_key=q_answer_api_key,
|
|
2828
|
+
_request_auth=_request_auth,
|
|
2829
|
+
_content_type=_content_type,
|
|
2830
|
+
_headers=_headers,
|
|
2831
|
+
_host_index=_host_index
|
|
2832
|
+
)
|
|
2833
|
+
|
|
2834
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2835
|
+
'200': "object",
|
|
2836
|
+
'422': "HTTPValidationError",
|
|
2837
|
+
}
|
|
2838
|
+
response_data = self.api_client.call_api(
|
|
2839
|
+
*_param,
|
|
2840
|
+
_request_timeout=_request_timeout
|
|
2841
|
+
)
|
|
2842
|
+
response_data.read()
|
|
2843
|
+
return self.api_client.response_deserialize(
|
|
2844
|
+
response_data=response_data,
|
|
2845
|
+
response_types_map=_response_types_map,
|
|
2846
|
+
).data
|
|
2847
|
+
|
|
2848
|
+
|
|
2849
|
+
@validate_call
|
|
2850
|
+
def sparql_endpoint_post_with_http_info(
|
|
2851
|
+
self,
|
|
2852
|
+
username: StrictStr,
|
|
2853
|
+
dataset: StrictStr,
|
|
2854
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2855
|
+
_request_timeout: Union[
|
|
2856
|
+
None,
|
|
2857
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2858
|
+
Tuple[
|
|
2859
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2860
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2861
|
+
]
|
|
2862
|
+
] = None,
|
|
2863
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2864
|
+
_content_type: Optional[StrictStr] = None,
|
|
2865
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2866
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2867
|
+
) -> ApiResponse[object]:
|
|
2868
|
+
"""Execute a SPARQL query on a dataset (POST)
|
|
2869
|
+
|
|
2870
|
+
|
|
2871
|
+
:param username: (required)
|
|
2872
|
+
:type username: str
|
|
2873
|
+
:param dataset: (required)
|
|
2874
|
+
:type dataset: str
|
|
2875
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2876
|
+
:type q_answer_api_key: str
|
|
2877
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2878
|
+
number provided, it will be total request
|
|
2879
|
+
timeout. It can also be a pair (tuple) of
|
|
2880
|
+
(connection, read) timeouts.
|
|
2881
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2882
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2883
|
+
request; this effectively ignores the
|
|
2884
|
+
authentication in the spec for a single request.
|
|
2885
|
+
:type _request_auth: dict, optional
|
|
2886
|
+
:param _content_type: force content-type for the request.
|
|
2887
|
+
:type _content_type: str, Optional
|
|
2888
|
+
:param _headers: set to override the headers for a single
|
|
2889
|
+
request; this effectively ignores the headers
|
|
2890
|
+
in the spec for a single request.
|
|
2891
|
+
:type _headers: dict, optional
|
|
2892
|
+
:param _host_index: set to override the host_index for a single
|
|
2893
|
+
request; this effectively ignores the host_index
|
|
2894
|
+
in the spec for a single request.
|
|
2895
|
+
:type _host_index: int, optional
|
|
2896
|
+
:return: Returns the result object.
|
|
2897
|
+
""" # noqa: E501
|
|
2898
|
+
|
|
2899
|
+
_param = self._sparql_endpoint_post_serialize(
|
|
2900
|
+
username=username,
|
|
2901
|
+
dataset=dataset,
|
|
2902
|
+
q_answer_api_key=q_answer_api_key,
|
|
2903
|
+
_request_auth=_request_auth,
|
|
2904
|
+
_content_type=_content_type,
|
|
2905
|
+
_headers=_headers,
|
|
2906
|
+
_host_index=_host_index
|
|
2907
|
+
)
|
|
2908
|
+
|
|
2909
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2910
|
+
'200': "object",
|
|
2911
|
+
'422': "HTTPValidationError",
|
|
2912
|
+
}
|
|
2913
|
+
response_data = self.api_client.call_api(
|
|
2914
|
+
*_param,
|
|
2915
|
+
_request_timeout=_request_timeout
|
|
2916
|
+
)
|
|
2917
|
+
response_data.read()
|
|
2918
|
+
return self.api_client.response_deserialize(
|
|
2919
|
+
response_data=response_data,
|
|
2920
|
+
response_types_map=_response_types_map,
|
|
2921
|
+
)
|
|
2922
|
+
|
|
2923
|
+
|
|
2924
|
+
@validate_call
|
|
2925
|
+
def sparql_endpoint_post_without_preload_content(
|
|
2926
|
+
self,
|
|
2927
|
+
username: StrictStr,
|
|
2928
|
+
dataset: StrictStr,
|
|
2929
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2930
|
+
_request_timeout: Union[
|
|
2931
|
+
None,
|
|
2932
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2933
|
+
Tuple[
|
|
2934
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2935
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2936
|
+
]
|
|
2937
|
+
] = None,
|
|
2938
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2939
|
+
_content_type: Optional[StrictStr] = None,
|
|
2940
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2941
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2942
|
+
) -> RESTResponseType:
|
|
2943
|
+
"""Execute a SPARQL query on a dataset (POST)
|
|
2944
|
+
|
|
2945
|
+
|
|
2946
|
+
:param username: (required)
|
|
2947
|
+
:type username: str
|
|
2948
|
+
:param dataset: (required)
|
|
2949
|
+
:type dataset: str
|
|
2950
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2951
|
+
:type q_answer_api_key: str
|
|
2952
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2953
|
+
number provided, it will be total request
|
|
2954
|
+
timeout. It can also be a pair (tuple) of
|
|
2955
|
+
(connection, read) timeouts.
|
|
2956
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2957
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2958
|
+
request; this effectively ignores the
|
|
2959
|
+
authentication in the spec for a single request.
|
|
2960
|
+
:type _request_auth: dict, optional
|
|
2961
|
+
:param _content_type: force content-type for the request.
|
|
2962
|
+
:type _content_type: str, Optional
|
|
2963
|
+
:param _headers: set to override the headers for a single
|
|
2964
|
+
request; this effectively ignores the headers
|
|
2965
|
+
in the spec for a single request.
|
|
2966
|
+
:type _headers: dict, optional
|
|
2967
|
+
:param _host_index: set to override the host_index for a single
|
|
2968
|
+
request; this effectively ignores the host_index
|
|
2969
|
+
in the spec for a single request.
|
|
2970
|
+
:type _host_index: int, optional
|
|
2971
|
+
:return: Returns the result object.
|
|
2972
|
+
""" # noqa: E501
|
|
2973
|
+
|
|
2974
|
+
_param = self._sparql_endpoint_post_serialize(
|
|
2975
|
+
username=username,
|
|
2976
|
+
dataset=dataset,
|
|
2977
|
+
q_answer_api_key=q_answer_api_key,
|
|
2978
|
+
_request_auth=_request_auth,
|
|
2979
|
+
_content_type=_content_type,
|
|
2980
|
+
_headers=_headers,
|
|
2981
|
+
_host_index=_host_index
|
|
2982
|
+
)
|
|
2983
|
+
|
|
2984
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2985
|
+
'200': "object",
|
|
2986
|
+
'422': "HTTPValidationError",
|
|
2987
|
+
}
|
|
2988
|
+
response_data = self.api_client.call_api(
|
|
2989
|
+
*_param,
|
|
2990
|
+
_request_timeout=_request_timeout
|
|
2991
|
+
)
|
|
2992
|
+
return response_data.response
|
|
2993
|
+
|
|
2994
|
+
|
|
2995
|
+
def _sparql_endpoint_post_serialize(
|
|
2996
|
+
self,
|
|
2997
|
+
username,
|
|
2998
|
+
dataset,
|
|
2999
|
+
q_answer_api_key,
|
|
3000
|
+
_request_auth,
|
|
3001
|
+
_content_type,
|
|
3002
|
+
_headers,
|
|
3003
|
+
_host_index,
|
|
3004
|
+
) -> RequestSerialized:
|
|
3005
|
+
|
|
3006
|
+
_host = None
|
|
3007
|
+
|
|
3008
|
+
_collection_formats: Dict[str, str] = {
|
|
3009
|
+
}
|
|
3010
|
+
|
|
3011
|
+
_path_params: Dict[str, str] = {}
|
|
3012
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3013
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3014
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3015
|
+
_files: Dict[
|
|
3016
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3017
|
+
] = {}
|
|
3018
|
+
_body_params: Optional[bytes] = None
|
|
3019
|
+
|
|
3020
|
+
# process the path parameters
|
|
3021
|
+
if username is not None:
|
|
3022
|
+
_path_params['username'] = username
|
|
3023
|
+
if dataset is not None:
|
|
3024
|
+
_path_params['dataset'] = dataset
|
|
3025
|
+
# process the query parameters
|
|
3026
|
+
# process the header parameters
|
|
3027
|
+
if q_answer_api_key is not None:
|
|
3028
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
3029
|
+
# process the form parameters
|
|
3030
|
+
# process the body parameter
|
|
3031
|
+
|
|
3032
|
+
|
|
3033
|
+
# set the HTTP header `Accept`
|
|
3034
|
+
if 'Accept' not in _header_params:
|
|
3035
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3036
|
+
[
|
|
3037
|
+
'application/json'
|
|
3038
|
+
]
|
|
3039
|
+
)
|
|
3040
|
+
|
|
3041
|
+
|
|
3042
|
+
# authentication setting
|
|
3043
|
+
_auth_settings: List[str] = [
|
|
3044
|
+
'QAnswer-Api-Key',
|
|
3045
|
+
'Bearer token'
|
|
3046
|
+
]
|
|
3047
|
+
|
|
3048
|
+
return self.api_client.param_serialize(
|
|
3049
|
+
method='POST',
|
|
3050
|
+
resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/sparql',
|
|
3051
|
+
path_params=_path_params,
|
|
3052
|
+
query_params=_query_params,
|
|
3053
|
+
header_params=_header_params,
|
|
3054
|
+
body=_body_params,
|
|
3055
|
+
post_params=_form_params,
|
|
3056
|
+
files=_files,
|
|
3057
|
+
auth_settings=_auth_settings,
|
|
3058
|
+
collection_formats=_collection_formats,
|
|
3059
|
+
_host=_host,
|
|
3060
|
+
_request_auth=_request_auth
|
|
3061
|
+
)
|
|
3062
|
+
|
|
3063
|
+
|
|
3064
|
+
|
|
3065
|
+
|
|
3066
|
+
@validate_call
|
|
3067
|
+
def text2rdf(
|
|
3068
|
+
self,
|
|
3069
|
+
username: StrictStr,
|
|
3070
|
+
dataset: StrictStr,
|
|
3071
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
3072
|
+
_request_timeout: Union[
|
|
3073
|
+
None,
|
|
3074
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3075
|
+
Tuple[
|
|
3076
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3077
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3078
|
+
]
|
|
3079
|
+
] = None,
|
|
3080
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3081
|
+
_content_type: Optional[StrictStr] = None,
|
|
3082
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3083
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3084
|
+
) -> object:
|
|
3085
|
+
"""Convert text to RDF triples
|
|
3086
|
+
|
|
3087
|
+
|
|
3088
|
+
:param username: (required)
|
|
3089
|
+
:type username: str
|
|
3090
|
+
:param dataset: (required)
|
|
3091
|
+
:type dataset: str
|
|
3092
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
3093
|
+
:type q_answer_api_key: str
|
|
3094
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3095
|
+
number provided, it will be total request
|
|
3096
|
+
timeout. It can also be a pair (tuple) of
|
|
3097
|
+
(connection, read) timeouts.
|
|
3098
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3099
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3100
|
+
request; this effectively ignores the
|
|
3101
|
+
authentication in the spec for a single request.
|
|
3102
|
+
:type _request_auth: dict, optional
|
|
3103
|
+
:param _content_type: force content-type for the request.
|
|
3104
|
+
:type _content_type: str, Optional
|
|
3105
|
+
:param _headers: set to override the headers for a single
|
|
3106
|
+
request; this effectively ignores the headers
|
|
3107
|
+
in the spec for a single request.
|
|
3108
|
+
:type _headers: dict, optional
|
|
3109
|
+
:param _host_index: set to override the host_index for a single
|
|
3110
|
+
request; this effectively ignores the host_index
|
|
3111
|
+
in the spec for a single request.
|
|
3112
|
+
:type _host_index: int, optional
|
|
3113
|
+
:return: Returns the result object.
|
|
3114
|
+
""" # noqa: E501
|
|
3115
|
+
|
|
3116
|
+
_param = self._text2rdf_serialize(
|
|
3117
|
+
username=username,
|
|
3118
|
+
dataset=dataset,
|
|
3119
|
+
q_answer_api_key=q_answer_api_key,
|
|
3120
|
+
_request_auth=_request_auth,
|
|
3121
|
+
_content_type=_content_type,
|
|
3122
|
+
_headers=_headers,
|
|
3123
|
+
_host_index=_host_index
|
|
3124
|
+
)
|
|
3125
|
+
|
|
3126
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3127
|
+
'200': "object",
|
|
3128
|
+
'422': "HTTPValidationError",
|
|
3129
|
+
}
|
|
3130
|
+
response_data = self.api_client.call_api(
|
|
3131
|
+
*_param,
|
|
3132
|
+
_request_timeout=_request_timeout
|
|
3133
|
+
)
|
|
3134
|
+
response_data.read()
|
|
3135
|
+
return self.api_client.response_deserialize(
|
|
3136
|
+
response_data=response_data,
|
|
3137
|
+
response_types_map=_response_types_map,
|
|
3138
|
+
).data
|
|
3139
|
+
|
|
3140
|
+
|
|
3141
|
+
@validate_call
|
|
3142
|
+
def text2rdf_with_http_info(
|
|
3143
|
+
self,
|
|
3144
|
+
username: StrictStr,
|
|
3145
|
+
dataset: StrictStr,
|
|
3146
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
3147
|
+
_request_timeout: Union[
|
|
3148
|
+
None,
|
|
3149
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3150
|
+
Tuple[
|
|
3151
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3152
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3153
|
+
]
|
|
3154
|
+
] = None,
|
|
3155
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3156
|
+
_content_type: Optional[StrictStr] = None,
|
|
3157
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3158
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3159
|
+
) -> ApiResponse[object]:
|
|
3160
|
+
"""Convert text to RDF triples
|
|
3161
|
+
|
|
3162
|
+
|
|
3163
|
+
:param username: (required)
|
|
3164
|
+
:type username: str
|
|
3165
|
+
:param dataset: (required)
|
|
3166
|
+
:type dataset: str
|
|
3167
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
3168
|
+
:type q_answer_api_key: str
|
|
3169
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3170
|
+
number provided, it will be total request
|
|
3171
|
+
timeout. It can also be a pair (tuple) of
|
|
3172
|
+
(connection, read) timeouts.
|
|
3173
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3174
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3175
|
+
request; this effectively ignores the
|
|
3176
|
+
authentication in the spec for a single request.
|
|
3177
|
+
:type _request_auth: dict, optional
|
|
3178
|
+
:param _content_type: force content-type for the request.
|
|
3179
|
+
:type _content_type: str, Optional
|
|
3180
|
+
:param _headers: set to override the headers for a single
|
|
3181
|
+
request; this effectively ignores the headers
|
|
3182
|
+
in the spec for a single request.
|
|
3183
|
+
:type _headers: dict, optional
|
|
3184
|
+
:param _host_index: set to override the host_index for a single
|
|
3185
|
+
request; this effectively ignores the host_index
|
|
3186
|
+
in the spec for a single request.
|
|
3187
|
+
:type _host_index: int, optional
|
|
3188
|
+
:return: Returns the result object.
|
|
3189
|
+
""" # noqa: E501
|
|
3190
|
+
|
|
3191
|
+
_param = self._text2rdf_serialize(
|
|
3192
|
+
username=username,
|
|
3193
|
+
dataset=dataset,
|
|
3194
|
+
q_answer_api_key=q_answer_api_key,
|
|
3195
|
+
_request_auth=_request_auth,
|
|
3196
|
+
_content_type=_content_type,
|
|
3197
|
+
_headers=_headers,
|
|
3198
|
+
_host_index=_host_index
|
|
3199
|
+
)
|
|
3200
|
+
|
|
3201
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3202
|
+
'200': "object",
|
|
3203
|
+
'422': "HTTPValidationError",
|
|
3204
|
+
}
|
|
3205
|
+
response_data = self.api_client.call_api(
|
|
3206
|
+
*_param,
|
|
3207
|
+
_request_timeout=_request_timeout
|
|
3208
|
+
)
|
|
3209
|
+
response_data.read()
|
|
3210
|
+
return self.api_client.response_deserialize(
|
|
3211
|
+
response_data=response_data,
|
|
3212
|
+
response_types_map=_response_types_map,
|
|
3213
|
+
)
|
|
3214
|
+
|
|
3215
|
+
|
|
3216
|
+
@validate_call
|
|
3217
|
+
def text2rdf_without_preload_content(
|
|
3218
|
+
self,
|
|
3219
|
+
username: StrictStr,
|
|
3220
|
+
dataset: StrictStr,
|
|
3221
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
3222
|
+
_request_timeout: Union[
|
|
3223
|
+
None,
|
|
3224
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3225
|
+
Tuple[
|
|
3226
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3227
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3228
|
+
]
|
|
3229
|
+
] = None,
|
|
3230
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3231
|
+
_content_type: Optional[StrictStr] = None,
|
|
3232
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3233
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3234
|
+
) -> RESTResponseType:
|
|
3235
|
+
"""Convert text to RDF triples
|
|
3236
|
+
|
|
3237
|
+
|
|
3238
|
+
:param username: (required)
|
|
3239
|
+
:type username: str
|
|
3240
|
+
:param dataset: (required)
|
|
3241
|
+
:type dataset: str
|
|
3242
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
3243
|
+
:type q_answer_api_key: str
|
|
3244
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3245
|
+
number provided, it will be total request
|
|
3246
|
+
timeout. It can also be a pair (tuple) of
|
|
3247
|
+
(connection, read) timeouts.
|
|
3248
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3249
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3250
|
+
request; this effectively ignores the
|
|
3251
|
+
authentication in the spec for a single request.
|
|
3252
|
+
:type _request_auth: dict, optional
|
|
3253
|
+
:param _content_type: force content-type for the request.
|
|
3254
|
+
:type _content_type: str, Optional
|
|
3255
|
+
:param _headers: set to override the headers for a single
|
|
3256
|
+
request; this effectively ignores the headers
|
|
3257
|
+
in the spec for a single request.
|
|
3258
|
+
:type _headers: dict, optional
|
|
3259
|
+
:param _host_index: set to override the host_index for a single
|
|
3260
|
+
request; this effectively ignores the host_index
|
|
3261
|
+
in the spec for a single request.
|
|
3262
|
+
:type _host_index: int, optional
|
|
3263
|
+
:return: Returns the result object.
|
|
3264
|
+
""" # noqa: E501
|
|
3265
|
+
|
|
3266
|
+
_param = self._text2rdf_serialize(
|
|
3267
|
+
username=username,
|
|
3268
|
+
dataset=dataset,
|
|
3269
|
+
q_answer_api_key=q_answer_api_key,
|
|
3270
|
+
_request_auth=_request_auth,
|
|
3271
|
+
_content_type=_content_type,
|
|
3272
|
+
_headers=_headers,
|
|
3273
|
+
_host_index=_host_index
|
|
3274
|
+
)
|
|
3275
|
+
|
|
3276
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3277
|
+
'200': "object",
|
|
3278
|
+
'422': "HTTPValidationError",
|
|
3279
|
+
}
|
|
3280
|
+
response_data = self.api_client.call_api(
|
|
3281
|
+
*_param,
|
|
3282
|
+
_request_timeout=_request_timeout
|
|
3283
|
+
)
|
|
3284
|
+
return response_data.response
|
|
3285
|
+
|
|
3286
|
+
|
|
3287
|
+
def _text2rdf_serialize(
|
|
3288
|
+
self,
|
|
3289
|
+
username,
|
|
3290
|
+
dataset,
|
|
3291
|
+
q_answer_api_key,
|
|
3292
|
+
_request_auth,
|
|
3293
|
+
_content_type,
|
|
3294
|
+
_headers,
|
|
3295
|
+
_host_index,
|
|
3296
|
+
) -> RequestSerialized:
|
|
3297
|
+
|
|
3298
|
+
_host = None
|
|
3299
|
+
|
|
3300
|
+
_collection_formats: Dict[str, str] = {
|
|
3301
|
+
}
|
|
3302
|
+
|
|
3303
|
+
_path_params: Dict[str, str] = {}
|
|
3304
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3305
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3306
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3307
|
+
_files: Dict[
|
|
3308
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3309
|
+
] = {}
|
|
3310
|
+
_body_params: Optional[bytes] = None
|
|
3311
|
+
|
|
3312
|
+
# process the path parameters
|
|
3313
|
+
if username is not None:
|
|
3314
|
+
_path_params['username'] = username
|
|
3315
|
+
if dataset is not None:
|
|
3316
|
+
_path_params['dataset'] = dataset
|
|
3317
|
+
# process the query parameters
|
|
3318
|
+
# process the header parameters
|
|
3319
|
+
if q_answer_api_key is not None:
|
|
3320
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
3321
|
+
# process the form parameters
|
|
3322
|
+
# process the body parameter
|
|
3323
|
+
|
|
3324
|
+
|
|
3325
|
+
# set the HTTP header `Accept`
|
|
3326
|
+
if 'Accept' not in _header_params:
|
|
3327
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3328
|
+
[
|
|
3329
|
+
'application/json'
|
|
3330
|
+
]
|
|
3331
|
+
)
|
|
3332
|
+
|
|
3333
|
+
|
|
3334
|
+
# authentication setting
|
|
3335
|
+
_auth_settings: List[str] = [
|
|
3336
|
+
'QAnswer-Api-Key',
|
|
3337
|
+
'Bearer token'
|
|
3338
|
+
]
|
|
3339
|
+
|
|
3340
|
+
return self.api_client.param_serialize(
|
|
3341
|
+
method='POST',
|
|
3342
|
+
resource_path='/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/text2rdf',
|
|
3343
|
+
path_params=_path_params,
|
|
3344
|
+
query_params=_query_params,
|
|
3345
|
+
header_params=_header_params,
|
|
3346
|
+
body=_body_params,
|
|
3347
|
+
post_params=_form_params,
|
|
3348
|
+
files=_files,
|
|
3349
|
+
auth_settings=_auth_settings,
|
|
3350
|
+
collection_formats=_collection_formats,
|
|
3351
|
+
_host=_host,
|
|
3352
|
+
_request_auth=_request_auth
|
|
3353
|
+
)
|
|
3354
|
+
|
|
3355
|
+
|