qanswer_sdk 3.1193.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qanswer_sdk/__init__.py +366 -0
- qanswer_sdk/api/__init__.py +47 -0
- qanswer_sdk/api/admin_api.py +11207 -0
- qanswer_sdk/api/ai_assistant_access_rights_api.py +5331 -0
- qanswer_sdk/api/ai_assistant_api.py +4377 -0
- qanswer_sdk/api/bot_slack_api.py +814 -0
- qanswer_sdk/api/chat_completion_api.py +309 -0
- qanswer_sdk/api/chatbot_api.py +1091 -0
- qanswer_sdk/api/connector_document_api.py +1406 -0
- qanswer_sdk/api/connector_e_consilium_api.py +326 -0
- qanswer_sdk/api/connector_e_consilium_search_index_connector_api.py +1215 -0
- qanswer_sdk/api/connector_google_drive_api.py +1870 -0
- qanswer_sdk/api/connector_one_drive_api.py +1559 -0
- qanswer_sdk/api/connector_onenote_api.py +1576 -0
- qanswer_sdk/api/connector_pinecone_api.py +892 -0
- qanswer_sdk/api/connector_publication_office_controller_api.py +1215 -0
- qanswer_sdk/api/connector_qn_a_api.py +1538 -0
- qanswer_sdk/api/connector_rdf_answer_api.py +1445 -0
- qanswer_sdk/api/connector_rdf_api.py +5318 -0
- qanswer_sdk/api/connector_sharepoint_api.py +2584 -0
- qanswer_sdk/api/connector_websearch_api.py +326 -0
- qanswer_sdk/api/connector_website_api.py +2068 -0
- qanswer_sdk/api/connectors_api.py +1497 -0
- qanswer_sdk/api/connectors_data_api.py +3697 -0
- qanswer_sdk/api/conversation_logs_api.py +6668 -0
- qanswer_sdk/api/dataset_config_api.py +2178 -0
- qanswer_sdk/api/debug_api.py +282 -0
- qanswer_sdk/api/llm_api.py +563 -0
- qanswer_sdk/api/llm_consumption_controller_api.py +310 -0
- qanswer_sdk/api/organizations_teams_api.py +8465 -0
- qanswer_sdk/api/payment_api.py +1546 -0
- qanswer_sdk/api/socket_api.py +2975 -0
- qanswer_sdk/api/speech_to_text_api.py +734 -0
- qanswer_sdk/api/tag_api.py +2396 -0
- qanswer_sdk/api/task_chat_api.py +2064 -0
- qanswer_sdk/api/task_rdf_linker_api.py +4382 -0
- qanswer_sdk/api/task_rdf_sparql_endpoint_api.py +3522 -0
- qanswer_sdk/api/task_rdf_text_linker_api.py +1346 -0
- qanswer_sdk/api/task_relation_extraction_api.py +2977 -0
- qanswer_sdk/api/task_report_copilot_api.py +2980 -0
- qanswer_sdk/api/task_search_api.py +1784 -0
- qanswer_sdk/api/task_sparql2text_api.py +326 -0
- qanswer_sdk/api/task_text2sparql_api.py +908 -0
- qanswer_sdk/api/task_text_classification_api.py +914 -0
- qanswer_sdk/api/user_api.py +7098 -0
- qanswer_sdk/api_client.py +797 -0
- qanswer_sdk/api_response.py +21 -0
- qanswer_sdk/configuration.py +487 -0
- qanswer_sdk/exceptions.py +199 -0
- qanswer_sdk/models/__init__.py +307 -0
- qanswer_sdk/models/access_pdf_payload_model.py +109 -0
- qanswer_sdk/models/add_qn_a_request.py +103 -0
- qanswer_sdk/models/add_synonyms.py +91 -0
- qanswer_sdk/models/add_synonyms_resp.py +89 -0
- qanswer_sdk/models/aggregate.py +97 -0
- qanswer_sdk/models/aggregation.py +112 -0
- qanswer_sdk/models/aggregations_group.py +102 -0
- qanswer_sdk/models/ai_assistant_dto.py +103 -0
- qanswer_sdk/models/ai_assistant_shared_access.py +113 -0
- qanswer_sdk/models/allowed_file_extensions.py +98 -0
- qanswer_sdk/models/api_response.py +87 -0
- qanswer_sdk/models/applied_metadata_filter.py +98 -0
- qanswer_sdk/models/assistant_message_stop.py +93 -0
- qanswer_sdk/models/auth_link_response.py +91 -0
- qanswer_sdk/models/autocompletion_config.py +93 -0
- qanswer_sdk/models/available_connectors_response.py +99 -0
- qanswer_sdk/models/available_embedding_models_response.py +95 -0
- qanswer_sdk/models/available_endpoints_response.py +95 -0
- qanswer_sdk/models/available_logs_visibility_policy.py +103 -0
- qanswer_sdk/models/available_space_quota_for_dataset.py +91 -0
- qanswer_sdk/models/available_storage_preference.py +103 -0
- qanswer_sdk/models/base_connectors_response.py +89 -0
- qanswer_sdk/models/base_conversation_response.py +89 -0
- qanswer_sdk/models/base_feedback_response.py +89 -0
- qanswer_sdk/models/branding_data.py +87 -0
- qanswer_sdk/models/cell.py +89 -0
- qanswer_sdk/models/change_password.py +89 -0
- qanswer_sdk/models/change_password_admin.py +89 -0
- qanswer_sdk/models/change_role.py +96 -0
- qanswer_sdk/models/chat_task_settings.py +135 -0
- qanswer_sdk/models/chat_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/chat_task_update.py +129 -0
- qanswer_sdk/models/chatbot_chat_payload.py +115 -0
- qanswer_sdk/models/chatbot_conversation_model.py +141 -0
- qanswer_sdk/models/chatbot_response.py +119 -0
- qanswer_sdk/models/check_mode_response.py +100 -0
- qanswer_sdk/models/class_info.py +89 -0
- qanswer_sdk/models/connector_model.py +112 -0
- qanswer_sdk/models/content_item.py +130 -0
- qanswer_sdk/models/conversation_message.py +186 -0
- qanswer_sdk/models/conversation_model.py +131 -0
- qanswer_sdk/models/conversation_statistics.py +95 -0
- qanswer_sdk/models/conversation_update.py +93 -0
- qanswer_sdk/models/conversation_users_stats.py +99 -0
- qanswer_sdk/models/conversation_users_stats_response.py +99 -0
- qanswer_sdk/models/coordinates.py +89 -0
- qanswer_sdk/models/cost_summary.py +99 -0
- qanswer_sdk/models/create_connector_request.py +93 -0
- qanswer_sdk/models/create_connector_response.py +95 -0
- qanswer_sdk/models/create_pinecone_connector_request.py +95 -0
- qanswer_sdk/models/create_sharepoint_connector_from_certificate_request.py +103 -0
- qanswer_sdk/models/create_sharepoint_connector_request.py +101 -0
- qanswer_sdk/models/dataset_config_request.py +187 -0
- qanswer_sdk/models/dataset_default_values_model.py +141 -0
- qanswer_sdk/models/dataset_description.py +91 -0
- qanswer_sdk/models/dataset_detail.py +133 -0
- qanswer_sdk/models/dataset_detail_kg.py +158 -0
- qanswer_sdk/models/dataset_schema.py +207 -0
- qanswer_sdk/models/dataset_update_object.py +195 -0
- qanswer_sdk/models/dataset_users_response.py +87 -0
- qanswer_sdk/models/default_prompt.py +106 -0
- qanswer_sdk/models/delete_connector_model.py +96 -0
- qanswer_sdk/models/delete_connector_request.py +99 -0
- qanswer_sdk/models/delete_connectors_response.py +91 -0
- qanswer_sdk/models/delete_qn_a_pair_request.py +95 -0
- qanswer_sdk/models/delete_qn_a_pair_response.py +89 -0
- qanswer_sdk/models/delete_synonym.py +91 -0
- qanswer_sdk/models/delete_synonym_resp.py +89 -0
- qanswer_sdk/models/diarization_segment.py +93 -0
- qanswer_sdk/models/document_content_response.py +91 -0
- qanswer_sdk/models/document_content_update_model.py +95 -0
- qanswer_sdk/models/document_file_delete_by_connector_model.py +99 -0
- qanswer_sdk/models/document_metadata.py +107 -0
- qanswer_sdk/models/document_metadata_list_wrapper.py +95 -0
- qanswer_sdk/models/document_status_response.py +89 -0
- qanswer_sdk/models/e_consilium_search_index_search_response.py +113 -0
- qanswer_sdk/models/econsilium_file_metadata.py +105 -0
- qanswer_sdk/models/econsilium_search_index_add_payload.py +105 -0
- qanswer_sdk/models/econsilium_search_index_additional_fields.py +101 -0
- qanswer_sdk/models/email_request.py +87 -0
- qanswer_sdk/models/embedding_endpoint.py +139 -0
- qanswer_sdk/models/embedding_endpoint_create.py +137 -0
- qanswer_sdk/models/embedding_endpoint_update.py +131 -0
- qanswer_sdk/models/embedding_endpoint_validation_response.py +96 -0
- qanswer_sdk/models/embedding_model.py +96 -0
- qanswer_sdk/models/entity.py +97 -0
- qanswer_sdk/models/entity_linker_response.py +99 -0
- qanswer_sdk/models/entity_model.py +99 -0
- qanswer_sdk/models/extra_body.py +91 -0
- qanswer_sdk/models/extract_hyper_links_payload.py +102 -0
- qanswer_sdk/models/extract_robot_links_payload.py +88 -0
- qanswer_sdk/models/extract_robot_links_response.py +88 -0
- qanswer_sdk/models/fact.py +96 -0
- qanswer_sdk/models/feedback_model.py +107 -0
- qanswer_sdk/models/feedback_update.py +103 -0
- qanswer_sdk/models/file_es_meta_data.py +89 -0
- qanswer_sdk/models/file_folder_model.py +113 -0
- qanswer_sdk/models/file_model.py +134 -0
- qanswer_sdk/models/files_by_connector_model.py +89 -0
- qanswer_sdk/models/format_return.py +87 -0
- qanswer_sdk/models/g_drive_connector_info.py +95 -0
- qanswer_sdk/models/g_drive_download_by_ids.py +89 -0
- qanswer_sdk/models/g_drive_download_request.py +101 -0
- qanswer_sdk/models/generation_params.py +89 -0
- qanswer_sdk/models/get_connector_by_id_response.py +91 -0
- qanswer_sdk/models/get_conversation_response.py +95 -0
- qanswer_sdk/models/guardrail_endpoint.py +121 -0
- qanswer_sdk/models/has_lucene_index_result.py +87 -0
- qanswer_sdk/models/index_config.py +95 -0
- qanswer_sdk/models/install_response.py +89 -0
- qanswer_sdk/models/is_enabled_response.py +87 -0
- qanswer_sdk/models/is_merging_result.py +87 -0
- qanswer_sdk/models/json_nullable_file_failure_reason.py +87 -0
- qanswer_sdk/models/json_nullable_source_metadata.py +87 -0
- qanswer_sdk/models/jwt_authentication_response.py +93 -0
- qanswer_sdk/models/label.py +89 -0
- qanswer_sdk/models/labeled_node.py +89 -0
- qanswer_sdk/models/link.py +103 -0
- qanswer_sdk/models/link_extraction_response.py +97 -0
- qanswer_sdk/models/link_result_paginated.py +97 -0
- qanswer_sdk/models/linker.py +103 -0
- qanswer_sdk/models/linking_result.py +95 -0
- qanswer_sdk/models/links.py +99 -0
- qanswer_sdk/models/list_chatbot_conversation_response.py +105 -0
- qanswer_sdk/models/list_connectors_response.py +95 -0
- qanswer_sdk/models/list_conversation_response.py +105 -0
- qanswer_sdk/models/list_feedback_response.py +105 -0
- qanswer_sdk/models/list_files_connector_response.py +101 -0
- qanswer_sdk/models/list_socket_events.py +95 -0
- qanswer_sdk/models/list_synonyms_model.py +89 -0
- qanswer_sdk/models/llm_context_ranges_response.py +93 -0
- qanswer_sdk/models/llm_cost.py +108 -0
- qanswer_sdk/models/llm_details.py +111 -0
- qanswer_sdk/models/llm_endpoint.py +167 -0
- qanswer_sdk/models/llm_endpoint_create.py +165 -0
- qanswer_sdk/models/llm_endpoint_default_prompts.py +93 -0
- qanswer_sdk/models/llm_endpoint_update.py +163 -0
- qanswer_sdk/models/llm_endpoint_validation_response.py +96 -0
- qanswer_sdk/models/login_request.py +89 -0
- qanswer_sdk/models/logo.py +89 -0
- qanswer_sdk/models/lucene_index_request_result.py +87 -0
- qanswer_sdk/models/merge_request_result.py +87 -0
- qanswer_sdk/models/messages_stats_per_day_response.py +99 -0
- qanswer_sdk/models/modify_connector_request.py +111 -0
- qanswer_sdk/models/o_auth_service.py +89 -0
- qanswer_sdk/models/one_drive_download_by_ids.py +89 -0
- qanswer_sdk/models/one_drive_download_request.py +101 -0
- qanswer_sdk/models/one_note_download_by_ids.py +91 -0
- qanswer_sdk/models/one_note_download_request.py +101 -0
- qanswer_sdk/models/organization.py +93 -0
- qanswer_sdk/models/organization_creation.py +91 -0
- qanswer_sdk/models/organization_filter.py +87 -0
- qanswer_sdk/models/organization_shared.py +105 -0
- qanswer_sdk/models/page_organization.py +123 -0
- qanswer_sdk/models/page_team_with_count.py +123 -0
- qanswer_sdk/models/pageable.py +92 -0
- qanswer_sdk/models/pageable_object.py +101 -0
- qanswer_sdk/models/password.py +89 -0
- qanswer_sdk/models/pinecone_index_model.py +91 -0
- qanswer_sdk/models/plan.py +123 -0
- qanswer_sdk/models/predicted_class.py +89 -0
- qanswer_sdk/models/prompt_token_count_details.py +99 -0
- qanswer_sdk/models/provider.py +87 -0
- qanswer_sdk/models/publication_add_payload.py +103 -0
- qanswer_sdk/models/publication_file_metadata.py +105 -0
- qanswer_sdk/models/publication_office_additional_fields.py +111 -0
- qanswer_sdk/models/publication_search_index_search_response.py +113 -0
- qanswer_sdk/models/qa_context.py +129 -0
- qanswer_sdk/models/qa_contexts.py +116 -0
- qanswer_sdk/models/qa_metadata_payload.py +123 -0
- qanswer_sdk/models/qa_table.py +102 -0
- qanswer_sdk/models/qn_a_pair_model.py +103 -0
- qanswer_sdk/models/qn_a_pair_response.py +95 -0
- qanswer_sdk/models/question_completion.py +89 -0
- qanswer_sdk/models/rag_params.py +89 -0
- qanswer_sdk/models/rag_payload.py +154 -0
- qanswer_sdk/models/rag_response.py +150 -0
- qanswer_sdk/models/ranker_config.py +93 -0
- qanswer_sdk/models/reference_model.py +95 -0
- qanswer_sdk/models/refresh_token_request.py +87 -0
- qanswer_sdk/models/refresh_website_connector_payload.py +94 -0
- qanswer_sdk/models/register_pinecone_connector_request.py +95 -0
- qanswer_sdk/models/relation_extraction_configuration.py +105 -0
- qanswer_sdk/models/relation_extraction_payload.py +111 -0
- qanswer_sdk/models/relation_extraction_result.py +101 -0
- qanswer_sdk/models/relation_extraction_schema.py +101 -0
- qanswer_sdk/models/relation_extraction_task_settings.py +123 -0
- qanswer_sdk/models/relation_extraction_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/relation_extraction_task_update.py +117 -0
- qanswer_sdk/models/relation_extraction_template_payload.py +97 -0
- qanswer_sdk/models/relation_extraction_template_update_payload.py +95 -0
- qanswer_sdk/models/relation_model.py +89 -0
- qanswer_sdk/models/report_copilot_create_payload.py +103 -0
- qanswer_sdk/models/report_copilot_export_template_as_docx_payload_simplified.py +91 -0
- qanswer_sdk/models/report_copilot_generation_from_slots_payload.py +95 -0
- qanswer_sdk/models/report_copilot_generation_from_slots_response.py +95 -0
- qanswer_sdk/models/report_copilot_refinement_payload.py +104 -0
- qanswer_sdk/models/report_copilot_refinement_response.py +87 -0
- qanswer_sdk/models/report_copilot_slot_task_settings.py +125 -0
- qanswer_sdk/models/report_copilot_slot_task_update.py +119 -0
- qanswer_sdk/models/report_copilot_task_settings.py +123 -0
- qanswer_sdk/models/report_copilot_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/report_copilot_task_update.py +117 -0
- qanswer_sdk/models/report_copilot_template.py +107 -0
- qanswer_sdk/models/report_copilot_template_simplified.py +95 -0
- qanswer_sdk/models/report_copilot_update_payload.py +101 -0
- qanswer_sdk/models/reset_password.py +87 -0
- qanswer_sdk/models/response_audit_model.py +99 -0
- qanswer_sdk/models/response_audit_stats_response.py +101 -0
- qanswer_sdk/models/retreive_all_synonyms_resp.py +99 -0
- qanswer_sdk/models/retry_params.py +89 -0
- qanswer_sdk/models/role.py +99 -0
- qanswer_sdk/models/search_document_response.py +105 -0
- qanswer_sdk/models/search_index_payload.py +114 -0
- qanswer_sdk/models/search_metadata_filter.py +89 -0
- qanswer_sdk/models/search_payload.py +124 -0
- qanswer_sdk/models/search_response.py +113 -0
- qanswer_sdk/models/search_task_settings.py +131 -0
- qanswer_sdk/models/search_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/search_task_update.py +123 -0
- qanswer_sdk/models/set_logo1_request.py +87 -0
- qanswer_sdk/models/share_point_download_by_ids.py +99 -0
- qanswer_sdk/models/share_point_download_request.py +101 -0
- qanswer_sdk/models/shared_organization_access.py +109 -0
- qanswer_sdk/models/shared_team_access.py +107 -0
- qanswer_sdk/models/shared_user.py +99 -0
- qanswer_sdk/models/sign_up_request.py +96 -0
- qanswer_sdk/models/signout_request.py +87 -0
- qanswer_sdk/models/slot.py +138 -0
- qanswer_sdk/models/slot_in_prompt.py +91 -0
- qanswer_sdk/models/slot_update.py +138 -0
- qanswer_sdk/models/socket_conversation_message.py +207 -0
- qanswer_sdk/models/socket_data_extraction.py +109 -0
- qanswer_sdk/models/socket_file_metadata.py +172 -0
- qanswer_sdk/models/socket_join_conversation.py +97 -0
- qanswer_sdk/models/socket_join_dataset.py +93 -0
- qanswer_sdk/models/socket_report_continuation_response.py +106 -0
- qanswer_sdk/models/socket_report_copilot_generation_from_slots_response.py +120 -0
- qanswer_sdk/models/socket_report_copilot_refinement_response.py +108 -0
- qanswer_sdk/models/socket_speech2_text_response.py +99 -0
- qanswer_sdk/models/socket_stop_conversation.py +97 -0
- qanswer_sdk/models/sort_object.py +91 -0
- qanswer_sdk/models/source.py +125 -0
- qanswer_sdk/models/sparql2_text_payload.py +97 -0
- qanswer_sdk/models/speech2_text_response.py +87 -0
- qanswer_sdk/models/speech2_text_with_diarization_response.py +106 -0
- qanswer_sdk/models/stat_per_date.py +89 -0
- qanswer_sdk/models/status_response.py +89 -0
- qanswer_sdk/models/subject_model.py +91 -0
- qanswer_sdk/models/suggestion_list_response.py +87 -0
- qanswer_sdk/models/summa_server.py +101 -0
- qanswer_sdk/models/tag_payload.py +87 -0
- qanswer_sdk/models/tag_qa_list_payload.py +100 -0
- qanswer_sdk/models/tag_qa_payload.py +91 -0
- qanswer_sdk/models/team.py +93 -0
- qanswer_sdk/models/team_creation.py +89 -0
- qanswer_sdk/models/team_filter.py +91 -0
- qanswer_sdk/models/team_shared.py +105 -0
- qanswer_sdk/models/team_with_count.py +95 -0
- qanswer_sdk/models/terms_bucket.py +89 -0
- qanswer_sdk/models/text2_sparql_payload.py +156 -0
- qanswer_sdk/models/text2_sparql_task_settings.py +123 -0
- qanswer_sdk/models/text2_sparql_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/text2_sparql_task_update.py +117 -0
- qanswer_sdk/models/text_classification_payload.py +99 -0
- qanswer_sdk/models/text_classification_response.py +87 -0
- qanswer_sdk/models/text_classification_v2_payload.py +99 -0
- qanswer_sdk/models/text_classification_v2_response.py +95 -0
- qanswer_sdk/models/total_stat.py +96 -0
- qanswer_sdk/models/ui_mappings.py +141 -0
- qanswer_sdk/models/update_metadata_model.py +95 -0
- qanswer_sdk/models/update_qn_a_pair_request.py +101 -0
- qanswer_sdk/models/update_qn_a_pair_response.py +89 -0
- qanswer_sdk/models/update_synonyms.py +93 -0
- qanswer_sdk/models/update_synonyms_resp.py +89 -0
- qanswer_sdk/models/uri_mapping.py +89 -0
- qanswer_sdk/models/user.py +91 -0
- qanswer_sdk/models/user_chatbot_setting_payload.py +106 -0
- qanswer_sdk/models/user_chatbot_setting_response.py +105 -0
- qanswer_sdk/models/user_dataset.py +144 -0
- qanswer_sdk/models/user_dataset_api_key.py +116 -0
- qanswer_sdk/models/user_filter.py +101 -0
- qanswer_sdk/models/user_identity_availability.py +87 -0
- qanswer_sdk/models/user_list_dto.py +101 -0
- qanswer_sdk/models/user_oauth_token.py +96 -0
- qanswer_sdk/models/user_profile.py +184 -0
- qanswer_sdk/models/user_profile_list_dto.py +101 -0
- qanswer_sdk/models/user_profile_paginated.py +101 -0
- qanswer_sdk/models/website_add_payload.py +98 -0
- qanswer_sdk/models/website_connector_settings.py +160 -0
- qanswer_sdk/models/widget_configs.py +105 -0
- qanswer_sdk/py.typed +0 -0
- qanswer_sdk/rest.py +257 -0
- qanswer_sdk-3.1193.0.dist-info/METADATA +125 -0
- qanswer_sdk-3.1193.0.dist-info/RECORD +346 -0
- qanswer_sdk-3.1193.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,98 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
QAnswer: Api Documentation
|
5
|
+
|
6
|
+
APIs provided by QAnswer
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
+
from typing import Optional, Set
|
23
|
+
from typing_extensions import Self
|
24
|
+
|
25
|
+
class AllowedFileExtensions(BaseModel):
|
26
|
+
"""
|
27
|
+
AllowedFileExtensions
|
28
|
+
""" # noqa: E501
|
29
|
+
extensions: Optional[List[StrictStr]] = None
|
30
|
+
__properties: ClassVar[List[str]] = ["extensions"]
|
31
|
+
|
32
|
+
@field_validator('extensions')
|
33
|
+
def extensions_validate_enum(cls, value):
|
34
|
+
"""Validates the enum"""
|
35
|
+
if value is None:
|
36
|
+
return value
|
37
|
+
|
38
|
+
for i in value:
|
39
|
+
if i not in set(['doc', 'docx', 'dotx', 'odt', 'txt', 'pdf', 'PDF', 'csv', 'xlsx', 'xlsm', 'ods', 'ppt', 'pptx', 'rtf', 'html', 'md', 'odp', 'zip']):
|
40
|
+
raise ValueError("each list item must be one of ('doc', 'docx', 'dotx', 'odt', 'txt', 'pdf', 'PDF', 'csv', 'xlsx', 'xlsm', 'ods', 'ppt', 'pptx', 'rtf', 'html', 'md', 'odp', 'zip')")
|
41
|
+
return value
|
42
|
+
|
43
|
+
model_config = ConfigDict(
|
44
|
+
populate_by_name=True,
|
45
|
+
validate_assignment=True,
|
46
|
+
protected_namespaces=(),
|
47
|
+
)
|
48
|
+
|
49
|
+
|
50
|
+
def to_str(self) -> str:
|
51
|
+
"""Returns the string representation of the model using alias"""
|
52
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
53
|
+
|
54
|
+
def to_json(self) -> str:
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
56
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
57
|
+
return json.dumps(self.to_dict())
|
58
|
+
|
59
|
+
@classmethod
|
60
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
61
|
+
"""Create an instance of AllowedFileExtensions from a JSON string"""
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
63
|
+
|
64
|
+
def to_dict(self) -> Dict[str, Any]:
|
65
|
+
"""Return the dictionary representation of the model using alias.
|
66
|
+
|
67
|
+
This has the following differences from calling pydantic's
|
68
|
+
`self.model_dump(by_alias=True)`:
|
69
|
+
|
70
|
+
* `None` is only added to the output dict for nullable fields that
|
71
|
+
were set at model initialization. Other fields with value `None`
|
72
|
+
are ignored.
|
73
|
+
"""
|
74
|
+
excluded_fields: Set[str] = set([
|
75
|
+
])
|
76
|
+
|
77
|
+
_dict = self.model_dump(
|
78
|
+
by_alias=True,
|
79
|
+
exclude=excluded_fields,
|
80
|
+
exclude_none=True,
|
81
|
+
)
|
82
|
+
return _dict
|
83
|
+
|
84
|
+
@classmethod
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
86
|
+
"""Create an instance of AllowedFileExtensions from a dict"""
|
87
|
+
if obj is None:
|
88
|
+
return None
|
89
|
+
|
90
|
+
if not isinstance(obj, dict):
|
91
|
+
return cls.model_validate(obj)
|
92
|
+
|
93
|
+
_obj = cls.model_validate({
|
94
|
+
"extensions": obj.get("extensions")
|
95
|
+
})
|
96
|
+
return _obj
|
97
|
+
|
98
|
+
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
QAnswer: Api Documentation
|
5
|
+
|
6
|
+
APIs provided by QAnswer
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
+
from typing import Optional, Set
|
23
|
+
from typing_extensions import Self
|
24
|
+
|
25
|
+
class ApiResponse(BaseModel):
|
26
|
+
"""
|
27
|
+
ApiResponse
|
28
|
+
""" # noqa: E501
|
29
|
+
message: Optional[StrictStr] = None
|
30
|
+
__properties: ClassVar[List[str]] = ["message"]
|
31
|
+
|
32
|
+
model_config = ConfigDict(
|
33
|
+
populate_by_name=True,
|
34
|
+
validate_assignment=True,
|
35
|
+
protected_namespaces=(),
|
36
|
+
)
|
37
|
+
|
38
|
+
|
39
|
+
def to_str(self) -> str:
|
40
|
+
"""Returns the string representation of the model using alias"""
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
42
|
+
|
43
|
+
def to_json(self) -> str:
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
46
|
+
return json.dumps(self.to_dict())
|
47
|
+
|
48
|
+
@classmethod
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
50
|
+
"""Create an instance of ApiResponse from a JSON string"""
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
52
|
+
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
55
|
+
|
56
|
+
This has the following differences from calling pydantic's
|
57
|
+
`self.model_dump(by_alias=True)`:
|
58
|
+
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
60
|
+
were set at model initialization. Other fields with value `None`
|
61
|
+
are ignored.
|
62
|
+
"""
|
63
|
+
excluded_fields: Set[str] = set([
|
64
|
+
])
|
65
|
+
|
66
|
+
_dict = self.model_dump(
|
67
|
+
by_alias=True,
|
68
|
+
exclude=excluded_fields,
|
69
|
+
exclude_none=True,
|
70
|
+
)
|
71
|
+
return _dict
|
72
|
+
|
73
|
+
@classmethod
|
74
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
75
|
+
"""Create an instance of ApiResponse from a dict"""
|
76
|
+
if obj is None:
|
77
|
+
return None
|
78
|
+
|
79
|
+
if not isinstance(obj, dict):
|
80
|
+
return cls.model_validate(obj)
|
81
|
+
|
82
|
+
_obj = cls.model_validate({
|
83
|
+
"message": obj.get("message")
|
84
|
+
})
|
85
|
+
return _obj
|
86
|
+
|
87
|
+
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
QAnswer: Api Documentation
|
5
|
+
|
6
|
+
APIs provided by QAnswer
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
22
|
+
from typing import Optional, Set
|
23
|
+
from typing_extensions import Self
|
24
|
+
|
25
|
+
class AppliedMetadataFilter(BaseModel):
|
26
|
+
"""
|
27
|
+
AppliedMetadataFilter
|
28
|
+
""" # noqa: E501
|
29
|
+
key: StrictStr
|
30
|
+
value: Dict[str, Any]
|
31
|
+
type: StrictStr
|
32
|
+
__properties: ClassVar[List[str]] = ["key", "value", "type"]
|
33
|
+
|
34
|
+
@field_validator('type')
|
35
|
+
def type_validate_enum(cls, value):
|
36
|
+
"""Validates the enum"""
|
37
|
+
if value not in set(['auto_filter', 'user_applied_filter']):
|
38
|
+
raise ValueError("must be one of enum values ('auto_filter', 'user_applied_filter')")
|
39
|
+
return value
|
40
|
+
|
41
|
+
model_config = ConfigDict(
|
42
|
+
populate_by_name=True,
|
43
|
+
validate_assignment=True,
|
44
|
+
protected_namespaces=(),
|
45
|
+
)
|
46
|
+
|
47
|
+
|
48
|
+
def to_str(self) -> str:
|
49
|
+
"""Returns the string representation of the model using alias"""
|
50
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
51
|
+
|
52
|
+
def to_json(self) -> str:
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
54
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
55
|
+
return json.dumps(self.to_dict())
|
56
|
+
|
57
|
+
@classmethod
|
58
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
59
|
+
"""Create an instance of AppliedMetadataFilter from a JSON string"""
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
61
|
+
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
64
|
+
|
65
|
+
This has the following differences from calling pydantic's
|
66
|
+
`self.model_dump(by_alias=True)`:
|
67
|
+
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
69
|
+
were set at model initialization. Other fields with value `None`
|
70
|
+
are ignored.
|
71
|
+
"""
|
72
|
+
excluded_fields: Set[str] = set([
|
73
|
+
])
|
74
|
+
|
75
|
+
_dict = self.model_dump(
|
76
|
+
by_alias=True,
|
77
|
+
exclude=excluded_fields,
|
78
|
+
exclude_none=True,
|
79
|
+
)
|
80
|
+
return _dict
|
81
|
+
|
82
|
+
@classmethod
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
84
|
+
"""Create an instance of AppliedMetadataFilter from a dict"""
|
85
|
+
if obj is None:
|
86
|
+
return None
|
87
|
+
|
88
|
+
if not isinstance(obj, dict):
|
89
|
+
return cls.model_validate(obj)
|
90
|
+
|
91
|
+
_obj = cls.model_validate({
|
92
|
+
"key": obj.get("key"),
|
93
|
+
"value": obj.get("value"),
|
94
|
+
"type": obj.get("type")
|
95
|
+
})
|
96
|
+
return _obj
|
97
|
+
|
98
|
+
|
@@ -0,0 +1,93 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
QAnswer: Api Documentation
|
5
|
+
|
6
|
+
APIs provided by QAnswer
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
22
|
+
from typing import Optional, Set
|
23
|
+
from typing_extensions import Self
|
24
|
+
|
25
|
+
class AssistantMessageStop(BaseModel):
|
26
|
+
"""
|
27
|
+
AssistantMessageStop
|
28
|
+
""" # noqa: E501
|
29
|
+
username: StrictStr = Field(description="The username of the user.")
|
30
|
+
dataset: StrictStr = Field(description="The dataset to be queried for information.")
|
31
|
+
conversation_id: StrictStr = Field(description="Unique identifier for the conversation.")
|
32
|
+
message_id: StrictStr = Field(description="ID of the message that is stopped")
|
33
|
+
__properties: ClassVar[List[str]] = ["username", "dataset", "conversation_id", "message_id"]
|
34
|
+
|
35
|
+
model_config = ConfigDict(
|
36
|
+
populate_by_name=True,
|
37
|
+
validate_assignment=True,
|
38
|
+
protected_namespaces=(),
|
39
|
+
)
|
40
|
+
|
41
|
+
|
42
|
+
def to_str(self) -> str:
|
43
|
+
"""Returns the string representation of the model using alias"""
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
45
|
+
|
46
|
+
def to_json(self) -> str:
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
49
|
+
return json.dumps(self.to_dict())
|
50
|
+
|
51
|
+
@classmethod
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
53
|
+
"""Create an instance of AssistantMessageStop from a JSON string"""
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
55
|
+
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
58
|
+
|
59
|
+
This has the following differences from calling pydantic's
|
60
|
+
`self.model_dump(by_alias=True)`:
|
61
|
+
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
63
|
+
were set at model initialization. Other fields with value `None`
|
64
|
+
are ignored.
|
65
|
+
"""
|
66
|
+
excluded_fields: Set[str] = set([
|
67
|
+
])
|
68
|
+
|
69
|
+
_dict = self.model_dump(
|
70
|
+
by_alias=True,
|
71
|
+
exclude=excluded_fields,
|
72
|
+
exclude_none=True,
|
73
|
+
)
|
74
|
+
return _dict
|
75
|
+
|
76
|
+
@classmethod
|
77
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
78
|
+
"""Create an instance of AssistantMessageStop from a dict"""
|
79
|
+
if obj is None:
|
80
|
+
return None
|
81
|
+
|
82
|
+
if not isinstance(obj, dict):
|
83
|
+
return cls.model_validate(obj)
|
84
|
+
|
85
|
+
_obj = cls.model_validate({
|
86
|
+
"username": obj.get("username"),
|
87
|
+
"dataset": obj.get("dataset"),
|
88
|
+
"conversation_id": obj.get("conversation_id"),
|
89
|
+
"message_id": obj.get("message_id")
|
90
|
+
})
|
91
|
+
return _obj
|
92
|
+
|
93
|
+
|
@@ -0,0 +1,91 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
QAnswer: Api Documentation
|
5
|
+
|
6
|
+
APIs provided by QAnswer
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
+
from typing import Optional, Set
|
23
|
+
from typing_extensions import Self
|
24
|
+
|
25
|
+
class AuthLinkResponse(BaseModel):
|
26
|
+
"""
|
27
|
+
AuthLinkResponse
|
28
|
+
""" # noqa: E501
|
29
|
+
status: Optional[StrictBool] = None
|
30
|
+
message: Optional[StrictStr] = None
|
31
|
+
authlink: Optional[StrictStr] = None
|
32
|
+
__properties: ClassVar[List[str]] = ["status", "message", "authlink"]
|
33
|
+
|
34
|
+
model_config = ConfigDict(
|
35
|
+
populate_by_name=True,
|
36
|
+
validate_assignment=True,
|
37
|
+
protected_namespaces=(),
|
38
|
+
)
|
39
|
+
|
40
|
+
|
41
|
+
def to_str(self) -> str:
|
42
|
+
"""Returns the string representation of the model using alias"""
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
44
|
+
|
45
|
+
def to_json(self) -> str:
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
48
|
+
return json.dumps(self.to_dict())
|
49
|
+
|
50
|
+
@classmethod
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
52
|
+
"""Create an instance of AuthLinkResponse from a JSON string"""
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
54
|
+
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
57
|
+
|
58
|
+
This has the following differences from calling pydantic's
|
59
|
+
`self.model_dump(by_alias=True)`:
|
60
|
+
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
62
|
+
were set at model initialization. Other fields with value `None`
|
63
|
+
are ignored.
|
64
|
+
"""
|
65
|
+
excluded_fields: Set[str] = set([
|
66
|
+
])
|
67
|
+
|
68
|
+
_dict = self.model_dump(
|
69
|
+
by_alias=True,
|
70
|
+
exclude=excluded_fields,
|
71
|
+
exclude_none=True,
|
72
|
+
)
|
73
|
+
return _dict
|
74
|
+
|
75
|
+
@classmethod
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
77
|
+
"""Create an instance of AuthLinkResponse from a dict"""
|
78
|
+
if obj is None:
|
79
|
+
return None
|
80
|
+
|
81
|
+
if not isinstance(obj, dict):
|
82
|
+
return cls.model_validate(obj)
|
83
|
+
|
84
|
+
_obj = cls.model_validate({
|
85
|
+
"status": obj.get("status"),
|
86
|
+
"message": obj.get("message"),
|
87
|
+
"authlink": obj.get("authlink")
|
88
|
+
})
|
89
|
+
return _obj
|
90
|
+
|
91
|
+
|
@@ -0,0 +1,93 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
QAnswer: Api Documentation
|
5
|
+
|
6
|
+
APIs provided by QAnswer
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
+
from typing import Optional, Set
|
23
|
+
from typing_extensions import Self
|
24
|
+
|
25
|
+
class AutocompletionConfig(BaseModel):
|
26
|
+
"""
|
27
|
+
AutocompletionConfig
|
28
|
+
""" # noqa: E501
|
29
|
+
question_suggestion: Optional[StrictBool] = Field(default=None, alias="questionSuggestion")
|
30
|
+
graph_suggestion: Optional[StrictBool] = Field(default=None, alias="graphSuggestion")
|
31
|
+
data_suggestion: Optional[StrictBool] = Field(default=None, alias="dataSuggestion")
|
32
|
+
data_suggestion_type: Optional[StrictStr] = Field(default=None, alias="dataSuggestionType")
|
33
|
+
__properties: ClassVar[List[str]] = ["questionSuggestion", "graphSuggestion", "dataSuggestion", "dataSuggestionType"]
|
34
|
+
|
35
|
+
model_config = ConfigDict(
|
36
|
+
populate_by_name=True,
|
37
|
+
validate_assignment=True,
|
38
|
+
protected_namespaces=(),
|
39
|
+
)
|
40
|
+
|
41
|
+
|
42
|
+
def to_str(self) -> str:
|
43
|
+
"""Returns the string representation of the model using alias"""
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
45
|
+
|
46
|
+
def to_json(self) -> str:
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
49
|
+
return json.dumps(self.to_dict())
|
50
|
+
|
51
|
+
@classmethod
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
53
|
+
"""Create an instance of AutocompletionConfig from a JSON string"""
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
55
|
+
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
58
|
+
|
59
|
+
This has the following differences from calling pydantic's
|
60
|
+
`self.model_dump(by_alias=True)`:
|
61
|
+
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
63
|
+
were set at model initialization. Other fields with value `None`
|
64
|
+
are ignored.
|
65
|
+
"""
|
66
|
+
excluded_fields: Set[str] = set([
|
67
|
+
])
|
68
|
+
|
69
|
+
_dict = self.model_dump(
|
70
|
+
by_alias=True,
|
71
|
+
exclude=excluded_fields,
|
72
|
+
exclude_none=True,
|
73
|
+
)
|
74
|
+
return _dict
|
75
|
+
|
76
|
+
@classmethod
|
77
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
78
|
+
"""Create an instance of AutocompletionConfig from a dict"""
|
79
|
+
if obj is None:
|
80
|
+
return None
|
81
|
+
|
82
|
+
if not isinstance(obj, dict):
|
83
|
+
return cls.model_validate(obj)
|
84
|
+
|
85
|
+
_obj = cls.model_validate({
|
86
|
+
"questionSuggestion": obj.get("questionSuggestion"),
|
87
|
+
"graphSuggestion": obj.get("graphSuggestion"),
|
88
|
+
"dataSuggestion": obj.get("dataSuggestion"),
|
89
|
+
"dataSuggestionType": obj.get("dataSuggestionType")
|
90
|
+
})
|
91
|
+
return _obj
|
92
|
+
|
93
|
+
|
@@ -0,0 +1,99 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
QAnswer: Api Documentation
|
5
|
+
|
6
|
+
APIs provided by QAnswer
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr, field_validator
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
+
from typing import Optional, Set
|
23
|
+
from typing_extensions import Self
|
24
|
+
|
25
|
+
class AvailableConnectorsResponse(BaseModel):
|
26
|
+
"""
|
27
|
+
AvailableConnectorsResponse
|
28
|
+
""" # noqa: E501
|
29
|
+
status: Optional[StrictBool] = None
|
30
|
+
message: Optional[StrictStr] = None
|
31
|
+
available_connectors: List[StrictStr]
|
32
|
+
__properties: ClassVar[List[str]] = ["status", "message", "available_connectors"]
|
33
|
+
|
34
|
+
@field_validator('available_connectors')
|
35
|
+
def available_connectors_validate_enum(cls, value):
|
36
|
+
"""Validates the enum"""
|
37
|
+
for i in value:
|
38
|
+
if i not in set(['document', 'website', 'qna', 'pinecone', 'rdf', 'websearch', 'econsilium', 'econsilium_search_index', 'publication_office', 'onedrive', 'sharepoint', 'gdrive', 'onenote']):
|
39
|
+
raise ValueError("each list item must be one of ('document', 'website', 'qna', 'pinecone', 'rdf', 'websearch', 'econsilium', 'econsilium_search_index', 'publication_office', 'onedrive', 'sharepoint', 'gdrive', 'onenote')")
|
40
|
+
return value
|
41
|
+
|
42
|
+
model_config = ConfigDict(
|
43
|
+
populate_by_name=True,
|
44
|
+
validate_assignment=True,
|
45
|
+
protected_namespaces=(),
|
46
|
+
)
|
47
|
+
|
48
|
+
|
49
|
+
def to_str(self) -> str:
|
50
|
+
"""Returns the string representation of the model using alias"""
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
52
|
+
|
53
|
+
def to_json(self) -> str:
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
56
|
+
return json.dumps(self.to_dict())
|
57
|
+
|
58
|
+
@classmethod
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
60
|
+
"""Create an instance of AvailableConnectorsResponse from a JSON string"""
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
62
|
+
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
65
|
+
|
66
|
+
This has the following differences from calling pydantic's
|
67
|
+
`self.model_dump(by_alias=True)`:
|
68
|
+
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
70
|
+
were set at model initialization. Other fields with value `None`
|
71
|
+
are ignored.
|
72
|
+
"""
|
73
|
+
excluded_fields: Set[str] = set([
|
74
|
+
])
|
75
|
+
|
76
|
+
_dict = self.model_dump(
|
77
|
+
by_alias=True,
|
78
|
+
exclude=excluded_fields,
|
79
|
+
exclude_none=True,
|
80
|
+
)
|
81
|
+
return _dict
|
82
|
+
|
83
|
+
@classmethod
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
85
|
+
"""Create an instance of AvailableConnectorsResponse from a dict"""
|
86
|
+
if obj is None:
|
87
|
+
return None
|
88
|
+
|
89
|
+
if not isinstance(obj, dict):
|
90
|
+
return cls.model_validate(obj)
|
91
|
+
|
92
|
+
_obj = cls.model_validate({
|
93
|
+
"status": obj.get("status"),
|
94
|
+
"message": obj.get("message"),
|
95
|
+
"available_connectors": obj.get("available_connectors")
|
96
|
+
})
|
97
|
+
return _obj
|
98
|
+
|
99
|
+
|