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