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