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,4404 @@
|
|
|
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, StrictInt, StrictStr
|
|
20
|
+
from typing import Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from qanswer_sdk.models.assistant_retention_response import AssistantRetentionResponse
|
|
23
|
+
from qanswer_sdk.models.retention_policy_dto import RetentionPolicyDto
|
|
24
|
+
from qanswer_sdk.models.retention_policy_update import RetentionPolicyUpdate
|
|
25
|
+
from qanswer_sdk.models.retention_preview_response import RetentionPreviewResponse
|
|
26
|
+
from qanswer_sdk.models.retention_run_progress_event import RetentionRunProgressEvent
|
|
27
|
+
from qanswer_sdk.models.retention_run_status_response import RetentionRunStatusResponse
|
|
28
|
+
from qanswer_sdk.models.retention_sweep_result import RetentionSweepResult
|
|
29
|
+
|
|
30
|
+
from qanswer_sdk.api_client import ApiClient, RequestSerialized
|
|
31
|
+
from qanswer_sdk.api_response import ApiResponse
|
|
32
|
+
from qanswer_sdk.rest import RESTResponseType
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class RetentionPolicyApi:
|
|
36
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
37
|
+
Ref: https://openapi-generator.tech
|
|
38
|
+
|
|
39
|
+
Do not edit the class manually.
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
def __init__(self, api_client=None) -> None:
|
|
43
|
+
if api_client is None:
|
|
44
|
+
api_client = ApiClient.get_default()
|
|
45
|
+
self.api_client = api_client
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@validate_call
|
|
49
|
+
def get_assistant_policy(
|
|
50
|
+
self,
|
|
51
|
+
username: StrictStr,
|
|
52
|
+
dataset: StrictStr,
|
|
53
|
+
_request_timeout: Union[
|
|
54
|
+
None,
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Tuple[
|
|
57
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
58
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
59
|
+
]
|
|
60
|
+
] = None,
|
|
61
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_content_type: Optional[StrictStr] = None,
|
|
63
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
64
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
65
|
+
) -> AssistantRetentionResponse:
|
|
66
|
+
"""Get Assistant Policy
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
:param username: (required)
|
|
70
|
+
:type username: str
|
|
71
|
+
:param dataset: (required)
|
|
72
|
+
:type dataset: str
|
|
73
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
74
|
+
number provided, it will be total request
|
|
75
|
+
timeout. It can also be a pair (tuple) of
|
|
76
|
+
(connection, read) timeouts.
|
|
77
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
78
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
79
|
+
request; this effectively ignores the
|
|
80
|
+
authentication in the spec for a single request.
|
|
81
|
+
:type _request_auth: dict, optional
|
|
82
|
+
:param _content_type: force content-type for the request.
|
|
83
|
+
:type _content_type: str, Optional
|
|
84
|
+
:param _headers: set to override the headers for a single
|
|
85
|
+
request; this effectively ignores the headers
|
|
86
|
+
in the spec for a single request.
|
|
87
|
+
:type _headers: dict, optional
|
|
88
|
+
:param _host_index: set to override the host_index for a single
|
|
89
|
+
request; this effectively ignores the host_index
|
|
90
|
+
in the spec for a single request.
|
|
91
|
+
:type _host_index: int, optional
|
|
92
|
+
:return: Returns the result object.
|
|
93
|
+
""" # noqa: E501
|
|
94
|
+
|
|
95
|
+
_param = self._get_assistant_policy_serialize(
|
|
96
|
+
username=username,
|
|
97
|
+
dataset=dataset,
|
|
98
|
+
_request_auth=_request_auth,
|
|
99
|
+
_content_type=_content_type,
|
|
100
|
+
_headers=_headers,
|
|
101
|
+
_host_index=_host_index
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
105
|
+
'200': "AssistantRetentionResponse",
|
|
106
|
+
'422': "HTTPValidationError",
|
|
107
|
+
}
|
|
108
|
+
response_data = self.api_client.call_api(
|
|
109
|
+
*_param,
|
|
110
|
+
_request_timeout=_request_timeout
|
|
111
|
+
)
|
|
112
|
+
response_data.read()
|
|
113
|
+
return self.api_client.response_deserialize(
|
|
114
|
+
response_data=response_data,
|
|
115
|
+
response_types_map=_response_types_map,
|
|
116
|
+
).data
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
@validate_call
|
|
120
|
+
def get_assistant_policy_with_http_info(
|
|
121
|
+
self,
|
|
122
|
+
username: StrictStr,
|
|
123
|
+
dataset: StrictStr,
|
|
124
|
+
_request_timeout: Union[
|
|
125
|
+
None,
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
127
|
+
Tuple[
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
129
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
130
|
+
]
|
|
131
|
+
] = None,
|
|
132
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
133
|
+
_content_type: Optional[StrictStr] = None,
|
|
134
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
135
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
136
|
+
) -> ApiResponse[AssistantRetentionResponse]:
|
|
137
|
+
"""Get Assistant Policy
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
:param username: (required)
|
|
141
|
+
:type username: str
|
|
142
|
+
:param dataset: (required)
|
|
143
|
+
:type dataset: str
|
|
144
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
145
|
+
number provided, it will be total request
|
|
146
|
+
timeout. It can also be a pair (tuple) of
|
|
147
|
+
(connection, read) timeouts.
|
|
148
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
149
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
150
|
+
request; this effectively ignores the
|
|
151
|
+
authentication in the spec for a single request.
|
|
152
|
+
:type _request_auth: dict, optional
|
|
153
|
+
:param _content_type: force content-type for the request.
|
|
154
|
+
:type _content_type: str, Optional
|
|
155
|
+
:param _headers: set to override the headers for a single
|
|
156
|
+
request; this effectively ignores the headers
|
|
157
|
+
in the spec for a single request.
|
|
158
|
+
:type _headers: dict, optional
|
|
159
|
+
:param _host_index: set to override the host_index for a single
|
|
160
|
+
request; this effectively ignores the host_index
|
|
161
|
+
in the spec for a single request.
|
|
162
|
+
:type _host_index: int, optional
|
|
163
|
+
:return: Returns the result object.
|
|
164
|
+
""" # noqa: E501
|
|
165
|
+
|
|
166
|
+
_param = self._get_assistant_policy_serialize(
|
|
167
|
+
username=username,
|
|
168
|
+
dataset=dataset,
|
|
169
|
+
_request_auth=_request_auth,
|
|
170
|
+
_content_type=_content_type,
|
|
171
|
+
_headers=_headers,
|
|
172
|
+
_host_index=_host_index
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
176
|
+
'200': "AssistantRetentionResponse",
|
|
177
|
+
'422': "HTTPValidationError",
|
|
178
|
+
}
|
|
179
|
+
response_data = self.api_client.call_api(
|
|
180
|
+
*_param,
|
|
181
|
+
_request_timeout=_request_timeout
|
|
182
|
+
)
|
|
183
|
+
response_data.read()
|
|
184
|
+
return self.api_client.response_deserialize(
|
|
185
|
+
response_data=response_data,
|
|
186
|
+
response_types_map=_response_types_map,
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
@validate_call
|
|
191
|
+
def get_assistant_policy_without_preload_content(
|
|
192
|
+
self,
|
|
193
|
+
username: StrictStr,
|
|
194
|
+
dataset: StrictStr,
|
|
195
|
+
_request_timeout: Union[
|
|
196
|
+
None,
|
|
197
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
198
|
+
Tuple[
|
|
199
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
200
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
201
|
+
]
|
|
202
|
+
] = None,
|
|
203
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
204
|
+
_content_type: Optional[StrictStr] = None,
|
|
205
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
206
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
207
|
+
) -> RESTResponseType:
|
|
208
|
+
"""Get Assistant Policy
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
:param username: (required)
|
|
212
|
+
:type username: str
|
|
213
|
+
:param dataset: (required)
|
|
214
|
+
:type dataset: str
|
|
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._get_assistant_policy_serialize(
|
|
238
|
+
username=username,
|
|
239
|
+
dataset=dataset,
|
|
240
|
+
_request_auth=_request_auth,
|
|
241
|
+
_content_type=_content_type,
|
|
242
|
+
_headers=_headers,
|
|
243
|
+
_host_index=_host_index
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
247
|
+
'200': "AssistantRetentionResponse",
|
|
248
|
+
'422': "HTTPValidationError",
|
|
249
|
+
}
|
|
250
|
+
response_data = self.api_client.call_api(
|
|
251
|
+
*_param,
|
|
252
|
+
_request_timeout=_request_timeout
|
|
253
|
+
)
|
|
254
|
+
return response_data.response
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
def _get_assistant_policy_serialize(
|
|
258
|
+
self,
|
|
259
|
+
username,
|
|
260
|
+
dataset,
|
|
261
|
+
_request_auth,
|
|
262
|
+
_content_type,
|
|
263
|
+
_headers,
|
|
264
|
+
_host_index,
|
|
265
|
+
) -> RequestSerialized:
|
|
266
|
+
|
|
267
|
+
_host = None
|
|
268
|
+
|
|
269
|
+
_collection_formats: Dict[str, str] = {
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
_path_params: Dict[str, str] = {}
|
|
273
|
+
_query_params: List[Tuple[str, str]] = []
|
|
274
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
275
|
+
_form_params: List[Tuple[str, str]] = []
|
|
276
|
+
_files: Dict[
|
|
277
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
278
|
+
] = {}
|
|
279
|
+
_body_params: Optional[bytes] = None
|
|
280
|
+
|
|
281
|
+
# process the path parameters
|
|
282
|
+
# process the query parameters
|
|
283
|
+
if username is not None:
|
|
284
|
+
|
|
285
|
+
_query_params.append(('username', username))
|
|
286
|
+
|
|
287
|
+
if dataset is not None:
|
|
288
|
+
|
|
289
|
+
_query_params.append(('dataset', dataset))
|
|
290
|
+
|
|
291
|
+
# process the header parameters
|
|
292
|
+
# process the form parameters
|
|
293
|
+
# process the body parameter
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
# set the HTTP header `Accept`
|
|
297
|
+
if 'Accept' not in _header_params:
|
|
298
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
299
|
+
[
|
|
300
|
+
'application/json'
|
|
301
|
+
]
|
|
302
|
+
)
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
# authentication setting
|
|
306
|
+
_auth_settings: List[str] = [
|
|
307
|
+
'QAnswer-Api-Key',
|
|
308
|
+
'Bearer token'
|
|
309
|
+
]
|
|
310
|
+
|
|
311
|
+
return self.api_client.param_serialize(
|
|
312
|
+
method='GET',
|
|
313
|
+
resource_path='/api/retention-policy/assistant',
|
|
314
|
+
path_params=_path_params,
|
|
315
|
+
query_params=_query_params,
|
|
316
|
+
header_params=_header_params,
|
|
317
|
+
body=_body_params,
|
|
318
|
+
post_params=_form_params,
|
|
319
|
+
files=_files,
|
|
320
|
+
auth_settings=_auth_settings,
|
|
321
|
+
collection_formats=_collection_formats,
|
|
322
|
+
_host=_host,
|
|
323
|
+
_request_auth=_request_auth
|
|
324
|
+
)
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
@validate_call
|
|
330
|
+
def get_organization_policy(
|
|
331
|
+
self,
|
|
332
|
+
organization_id: StrictInt,
|
|
333
|
+
_request_timeout: Union[
|
|
334
|
+
None,
|
|
335
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
336
|
+
Tuple[
|
|
337
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
338
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
339
|
+
]
|
|
340
|
+
] = None,
|
|
341
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
342
|
+
_content_type: Optional[StrictStr] = None,
|
|
343
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
344
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
345
|
+
) -> RetentionPolicyDto:
|
|
346
|
+
"""Get Organization Policy
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
:param organization_id: (required)
|
|
350
|
+
:type organization_id: int
|
|
351
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
352
|
+
number provided, it will be total request
|
|
353
|
+
timeout. It can also be a pair (tuple) of
|
|
354
|
+
(connection, read) timeouts.
|
|
355
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
356
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
357
|
+
request; this effectively ignores the
|
|
358
|
+
authentication in the spec for a single request.
|
|
359
|
+
:type _request_auth: dict, optional
|
|
360
|
+
:param _content_type: force content-type for the request.
|
|
361
|
+
:type _content_type: str, Optional
|
|
362
|
+
:param _headers: set to override the headers for a single
|
|
363
|
+
request; this effectively ignores the headers
|
|
364
|
+
in the spec for a single request.
|
|
365
|
+
:type _headers: dict, optional
|
|
366
|
+
:param _host_index: set to override the host_index for a single
|
|
367
|
+
request; this effectively ignores the host_index
|
|
368
|
+
in the spec for a single request.
|
|
369
|
+
:type _host_index: int, optional
|
|
370
|
+
:return: Returns the result object.
|
|
371
|
+
""" # noqa: E501
|
|
372
|
+
|
|
373
|
+
_param = self._get_organization_policy_serialize(
|
|
374
|
+
organization_id=organization_id,
|
|
375
|
+
_request_auth=_request_auth,
|
|
376
|
+
_content_type=_content_type,
|
|
377
|
+
_headers=_headers,
|
|
378
|
+
_host_index=_host_index
|
|
379
|
+
)
|
|
380
|
+
|
|
381
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
382
|
+
'200': "RetentionPolicyDto",
|
|
383
|
+
'422': "HTTPValidationError",
|
|
384
|
+
}
|
|
385
|
+
response_data = self.api_client.call_api(
|
|
386
|
+
*_param,
|
|
387
|
+
_request_timeout=_request_timeout
|
|
388
|
+
)
|
|
389
|
+
response_data.read()
|
|
390
|
+
return self.api_client.response_deserialize(
|
|
391
|
+
response_data=response_data,
|
|
392
|
+
response_types_map=_response_types_map,
|
|
393
|
+
).data
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
@validate_call
|
|
397
|
+
def get_organization_policy_with_http_info(
|
|
398
|
+
self,
|
|
399
|
+
organization_id: StrictInt,
|
|
400
|
+
_request_timeout: Union[
|
|
401
|
+
None,
|
|
402
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
403
|
+
Tuple[
|
|
404
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
405
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
406
|
+
]
|
|
407
|
+
] = None,
|
|
408
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
409
|
+
_content_type: Optional[StrictStr] = None,
|
|
410
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
411
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
412
|
+
) -> ApiResponse[RetentionPolicyDto]:
|
|
413
|
+
"""Get Organization Policy
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
:param organization_id: (required)
|
|
417
|
+
:type organization_id: int
|
|
418
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
419
|
+
number provided, it will be total request
|
|
420
|
+
timeout. It can also be a pair (tuple) of
|
|
421
|
+
(connection, read) timeouts.
|
|
422
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
423
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
424
|
+
request; this effectively ignores the
|
|
425
|
+
authentication in the spec for a single request.
|
|
426
|
+
:type _request_auth: dict, optional
|
|
427
|
+
:param _content_type: force content-type for the request.
|
|
428
|
+
:type _content_type: str, Optional
|
|
429
|
+
:param _headers: set to override the headers for a single
|
|
430
|
+
request; this effectively ignores the headers
|
|
431
|
+
in the spec for a single request.
|
|
432
|
+
:type _headers: dict, optional
|
|
433
|
+
:param _host_index: set to override the host_index for a single
|
|
434
|
+
request; this effectively ignores the host_index
|
|
435
|
+
in the spec for a single request.
|
|
436
|
+
:type _host_index: int, optional
|
|
437
|
+
:return: Returns the result object.
|
|
438
|
+
""" # noqa: E501
|
|
439
|
+
|
|
440
|
+
_param = self._get_organization_policy_serialize(
|
|
441
|
+
organization_id=organization_id,
|
|
442
|
+
_request_auth=_request_auth,
|
|
443
|
+
_content_type=_content_type,
|
|
444
|
+
_headers=_headers,
|
|
445
|
+
_host_index=_host_index
|
|
446
|
+
)
|
|
447
|
+
|
|
448
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
449
|
+
'200': "RetentionPolicyDto",
|
|
450
|
+
'422': "HTTPValidationError",
|
|
451
|
+
}
|
|
452
|
+
response_data = self.api_client.call_api(
|
|
453
|
+
*_param,
|
|
454
|
+
_request_timeout=_request_timeout
|
|
455
|
+
)
|
|
456
|
+
response_data.read()
|
|
457
|
+
return self.api_client.response_deserialize(
|
|
458
|
+
response_data=response_data,
|
|
459
|
+
response_types_map=_response_types_map,
|
|
460
|
+
)
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
@validate_call
|
|
464
|
+
def get_organization_policy_without_preload_content(
|
|
465
|
+
self,
|
|
466
|
+
organization_id: StrictInt,
|
|
467
|
+
_request_timeout: Union[
|
|
468
|
+
None,
|
|
469
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
470
|
+
Tuple[
|
|
471
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
472
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
473
|
+
]
|
|
474
|
+
] = None,
|
|
475
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
476
|
+
_content_type: Optional[StrictStr] = None,
|
|
477
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
478
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
479
|
+
) -> RESTResponseType:
|
|
480
|
+
"""Get Organization Policy
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
:param organization_id: (required)
|
|
484
|
+
:type organization_id: int
|
|
485
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
486
|
+
number provided, it will be total request
|
|
487
|
+
timeout. It can also be a pair (tuple) of
|
|
488
|
+
(connection, read) timeouts.
|
|
489
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
490
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
491
|
+
request; this effectively ignores the
|
|
492
|
+
authentication in the spec for a single request.
|
|
493
|
+
:type _request_auth: dict, optional
|
|
494
|
+
:param _content_type: force content-type for the request.
|
|
495
|
+
:type _content_type: str, Optional
|
|
496
|
+
:param _headers: set to override the headers for a single
|
|
497
|
+
request; this effectively ignores the headers
|
|
498
|
+
in the spec for a single request.
|
|
499
|
+
:type _headers: dict, optional
|
|
500
|
+
:param _host_index: set to override the host_index for a single
|
|
501
|
+
request; this effectively ignores the host_index
|
|
502
|
+
in the spec for a single request.
|
|
503
|
+
:type _host_index: int, optional
|
|
504
|
+
:return: Returns the result object.
|
|
505
|
+
""" # noqa: E501
|
|
506
|
+
|
|
507
|
+
_param = self._get_organization_policy_serialize(
|
|
508
|
+
organization_id=organization_id,
|
|
509
|
+
_request_auth=_request_auth,
|
|
510
|
+
_content_type=_content_type,
|
|
511
|
+
_headers=_headers,
|
|
512
|
+
_host_index=_host_index
|
|
513
|
+
)
|
|
514
|
+
|
|
515
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
516
|
+
'200': "RetentionPolicyDto",
|
|
517
|
+
'422': "HTTPValidationError",
|
|
518
|
+
}
|
|
519
|
+
response_data = self.api_client.call_api(
|
|
520
|
+
*_param,
|
|
521
|
+
_request_timeout=_request_timeout
|
|
522
|
+
)
|
|
523
|
+
return response_data.response
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
def _get_organization_policy_serialize(
|
|
527
|
+
self,
|
|
528
|
+
organization_id,
|
|
529
|
+
_request_auth,
|
|
530
|
+
_content_type,
|
|
531
|
+
_headers,
|
|
532
|
+
_host_index,
|
|
533
|
+
) -> RequestSerialized:
|
|
534
|
+
|
|
535
|
+
_host = None
|
|
536
|
+
|
|
537
|
+
_collection_formats: Dict[str, str] = {
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
_path_params: Dict[str, str] = {}
|
|
541
|
+
_query_params: List[Tuple[str, str]] = []
|
|
542
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
543
|
+
_form_params: List[Tuple[str, str]] = []
|
|
544
|
+
_files: Dict[
|
|
545
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
546
|
+
] = {}
|
|
547
|
+
_body_params: Optional[bytes] = None
|
|
548
|
+
|
|
549
|
+
# process the path parameters
|
|
550
|
+
# process the query parameters
|
|
551
|
+
if organization_id is not None:
|
|
552
|
+
|
|
553
|
+
_query_params.append(('organizationId', organization_id))
|
|
554
|
+
|
|
555
|
+
# process the header parameters
|
|
556
|
+
# process the form parameters
|
|
557
|
+
# process the body parameter
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
# set the HTTP header `Accept`
|
|
561
|
+
if 'Accept' not in _header_params:
|
|
562
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
563
|
+
[
|
|
564
|
+
'application/json'
|
|
565
|
+
]
|
|
566
|
+
)
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
# authentication setting
|
|
570
|
+
_auth_settings: List[str] = [
|
|
571
|
+
'QAnswer-Api-Key',
|
|
572
|
+
'Bearer token'
|
|
573
|
+
]
|
|
574
|
+
|
|
575
|
+
return self.api_client.param_serialize(
|
|
576
|
+
method='GET',
|
|
577
|
+
resource_path='/api/retention-policy/organization',
|
|
578
|
+
path_params=_path_params,
|
|
579
|
+
query_params=_query_params,
|
|
580
|
+
header_params=_header_params,
|
|
581
|
+
body=_body_params,
|
|
582
|
+
post_params=_form_params,
|
|
583
|
+
files=_files,
|
|
584
|
+
auth_settings=_auth_settings,
|
|
585
|
+
collection_formats=_collection_formats,
|
|
586
|
+
_host=_host,
|
|
587
|
+
_request_auth=_request_auth
|
|
588
|
+
)
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
@validate_call
|
|
594
|
+
def get_retention_run_status(
|
|
595
|
+
self,
|
|
596
|
+
scope: Annotated[StrictStr, Field(description="system | organization | assistant")],
|
|
597
|
+
organization_id: Optional[StrictInt] = None,
|
|
598
|
+
username: Optional[StrictStr] = None,
|
|
599
|
+
dataset: Optional[StrictStr] = None,
|
|
600
|
+
_request_timeout: Union[
|
|
601
|
+
None,
|
|
602
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
603
|
+
Tuple[
|
|
604
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
605
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
606
|
+
]
|
|
607
|
+
] = None,
|
|
608
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
609
|
+
_content_type: Optional[StrictStr] = None,
|
|
610
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
611
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
612
|
+
) -> RetentionRunStatusResponse:
|
|
613
|
+
"""Get Retention Run Status
|
|
614
|
+
|
|
615
|
+
Return the current run-now progress so the UI recovers after a refresh.
|
|
616
|
+
|
|
617
|
+
:param scope: system | organization | assistant (required)
|
|
618
|
+
:type scope: str
|
|
619
|
+
:param organization_id:
|
|
620
|
+
:type organization_id: int
|
|
621
|
+
:param username:
|
|
622
|
+
:type username: str
|
|
623
|
+
:param dataset:
|
|
624
|
+
:type dataset: str
|
|
625
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
626
|
+
number provided, it will be total request
|
|
627
|
+
timeout. It can also be a pair (tuple) of
|
|
628
|
+
(connection, read) timeouts.
|
|
629
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
630
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
631
|
+
request; this effectively ignores the
|
|
632
|
+
authentication in the spec for a single request.
|
|
633
|
+
:type _request_auth: dict, optional
|
|
634
|
+
:param _content_type: force content-type for the request.
|
|
635
|
+
:type _content_type: str, Optional
|
|
636
|
+
:param _headers: set to override the headers for a single
|
|
637
|
+
request; this effectively ignores the headers
|
|
638
|
+
in the spec for a single request.
|
|
639
|
+
:type _headers: dict, optional
|
|
640
|
+
:param _host_index: set to override the host_index for a single
|
|
641
|
+
request; this effectively ignores the host_index
|
|
642
|
+
in the spec for a single request.
|
|
643
|
+
:type _host_index: int, optional
|
|
644
|
+
:return: Returns the result object.
|
|
645
|
+
""" # noqa: E501
|
|
646
|
+
|
|
647
|
+
_param = self._get_retention_run_status_serialize(
|
|
648
|
+
scope=scope,
|
|
649
|
+
organization_id=organization_id,
|
|
650
|
+
username=username,
|
|
651
|
+
dataset=dataset,
|
|
652
|
+
_request_auth=_request_auth,
|
|
653
|
+
_content_type=_content_type,
|
|
654
|
+
_headers=_headers,
|
|
655
|
+
_host_index=_host_index
|
|
656
|
+
)
|
|
657
|
+
|
|
658
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
659
|
+
'200': "RetentionRunStatusResponse",
|
|
660
|
+
'422': "HTTPValidationError",
|
|
661
|
+
}
|
|
662
|
+
response_data = self.api_client.call_api(
|
|
663
|
+
*_param,
|
|
664
|
+
_request_timeout=_request_timeout
|
|
665
|
+
)
|
|
666
|
+
response_data.read()
|
|
667
|
+
return self.api_client.response_deserialize(
|
|
668
|
+
response_data=response_data,
|
|
669
|
+
response_types_map=_response_types_map,
|
|
670
|
+
).data
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
@validate_call
|
|
674
|
+
def get_retention_run_status_with_http_info(
|
|
675
|
+
self,
|
|
676
|
+
scope: Annotated[StrictStr, Field(description="system | organization | assistant")],
|
|
677
|
+
organization_id: Optional[StrictInt] = None,
|
|
678
|
+
username: Optional[StrictStr] = None,
|
|
679
|
+
dataset: Optional[StrictStr] = None,
|
|
680
|
+
_request_timeout: Union[
|
|
681
|
+
None,
|
|
682
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
683
|
+
Tuple[
|
|
684
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
685
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
686
|
+
]
|
|
687
|
+
] = None,
|
|
688
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
689
|
+
_content_type: Optional[StrictStr] = None,
|
|
690
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
691
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
692
|
+
) -> ApiResponse[RetentionRunStatusResponse]:
|
|
693
|
+
"""Get Retention Run Status
|
|
694
|
+
|
|
695
|
+
Return the current run-now progress so the UI recovers after a refresh.
|
|
696
|
+
|
|
697
|
+
:param scope: system | organization | assistant (required)
|
|
698
|
+
:type scope: str
|
|
699
|
+
:param organization_id:
|
|
700
|
+
:type organization_id: int
|
|
701
|
+
:param username:
|
|
702
|
+
:type username: str
|
|
703
|
+
:param dataset:
|
|
704
|
+
:type dataset: str
|
|
705
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
706
|
+
number provided, it will be total request
|
|
707
|
+
timeout. It can also be a pair (tuple) of
|
|
708
|
+
(connection, read) timeouts.
|
|
709
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
710
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
711
|
+
request; this effectively ignores the
|
|
712
|
+
authentication in the spec for a single request.
|
|
713
|
+
:type _request_auth: dict, optional
|
|
714
|
+
:param _content_type: force content-type for the request.
|
|
715
|
+
:type _content_type: str, Optional
|
|
716
|
+
:param _headers: set to override the headers for a single
|
|
717
|
+
request; this effectively ignores the headers
|
|
718
|
+
in the spec for a single request.
|
|
719
|
+
:type _headers: dict, optional
|
|
720
|
+
:param _host_index: set to override the host_index for a single
|
|
721
|
+
request; this effectively ignores the host_index
|
|
722
|
+
in the spec for a single request.
|
|
723
|
+
:type _host_index: int, optional
|
|
724
|
+
:return: Returns the result object.
|
|
725
|
+
""" # noqa: E501
|
|
726
|
+
|
|
727
|
+
_param = self._get_retention_run_status_serialize(
|
|
728
|
+
scope=scope,
|
|
729
|
+
organization_id=organization_id,
|
|
730
|
+
username=username,
|
|
731
|
+
dataset=dataset,
|
|
732
|
+
_request_auth=_request_auth,
|
|
733
|
+
_content_type=_content_type,
|
|
734
|
+
_headers=_headers,
|
|
735
|
+
_host_index=_host_index
|
|
736
|
+
)
|
|
737
|
+
|
|
738
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
739
|
+
'200': "RetentionRunStatusResponse",
|
|
740
|
+
'422': "HTTPValidationError",
|
|
741
|
+
}
|
|
742
|
+
response_data = self.api_client.call_api(
|
|
743
|
+
*_param,
|
|
744
|
+
_request_timeout=_request_timeout
|
|
745
|
+
)
|
|
746
|
+
response_data.read()
|
|
747
|
+
return self.api_client.response_deserialize(
|
|
748
|
+
response_data=response_data,
|
|
749
|
+
response_types_map=_response_types_map,
|
|
750
|
+
)
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
@validate_call
|
|
754
|
+
def get_retention_run_status_without_preload_content(
|
|
755
|
+
self,
|
|
756
|
+
scope: Annotated[StrictStr, Field(description="system | organization | assistant")],
|
|
757
|
+
organization_id: Optional[StrictInt] = None,
|
|
758
|
+
username: Optional[StrictStr] = None,
|
|
759
|
+
dataset: Optional[StrictStr] = None,
|
|
760
|
+
_request_timeout: Union[
|
|
761
|
+
None,
|
|
762
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
763
|
+
Tuple[
|
|
764
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
765
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
766
|
+
]
|
|
767
|
+
] = None,
|
|
768
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
769
|
+
_content_type: Optional[StrictStr] = None,
|
|
770
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
771
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
772
|
+
) -> RESTResponseType:
|
|
773
|
+
"""Get Retention Run Status
|
|
774
|
+
|
|
775
|
+
Return the current run-now progress so the UI recovers after a refresh.
|
|
776
|
+
|
|
777
|
+
:param scope: system | organization | assistant (required)
|
|
778
|
+
:type scope: str
|
|
779
|
+
:param organization_id:
|
|
780
|
+
:type organization_id: int
|
|
781
|
+
:param username:
|
|
782
|
+
:type username: str
|
|
783
|
+
:param dataset:
|
|
784
|
+
:type dataset: str
|
|
785
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
786
|
+
number provided, it will be total request
|
|
787
|
+
timeout. It can also be a pair (tuple) of
|
|
788
|
+
(connection, read) timeouts.
|
|
789
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
790
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
791
|
+
request; this effectively ignores the
|
|
792
|
+
authentication in the spec for a single request.
|
|
793
|
+
:type _request_auth: dict, optional
|
|
794
|
+
:param _content_type: force content-type for the request.
|
|
795
|
+
:type _content_type: str, Optional
|
|
796
|
+
:param _headers: set to override the headers for a single
|
|
797
|
+
request; this effectively ignores the headers
|
|
798
|
+
in the spec for a single request.
|
|
799
|
+
:type _headers: dict, optional
|
|
800
|
+
:param _host_index: set to override the host_index for a single
|
|
801
|
+
request; this effectively ignores the host_index
|
|
802
|
+
in the spec for a single request.
|
|
803
|
+
:type _host_index: int, optional
|
|
804
|
+
:return: Returns the result object.
|
|
805
|
+
""" # noqa: E501
|
|
806
|
+
|
|
807
|
+
_param = self._get_retention_run_status_serialize(
|
|
808
|
+
scope=scope,
|
|
809
|
+
organization_id=organization_id,
|
|
810
|
+
username=username,
|
|
811
|
+
dataset=dataset,
|
|
812
|
+
_request_auth=_request_auth,
|
|
813
|
+
_content_type=_content_type,
|
|
814
|
+
_headers=_headers,
|
|
815
|
+
_host_index=_host_index
|
|
816
|
+
)
|
|
817
|
+
|
|
818
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
819
|
+
'200': "RetentionRunStatusResponse",
|
|
820
|
+
'422': "HTTPValidationError",
|
|
821
|
+
}
|
|
822
|
+
response_data = self.api_client.call_api(
|
|
823
|
+
*_param,
|
|
824
|
+
_request_timeout=_request_timeout
|
|
825
|
+
)
|
|
826
|
+
return response_data.response
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
def _get_retention_run_status_serialize(
|
|
830
|
+
self,
|
|
831
|
+
scope,
|
|
832
|
+
organization_id,
|
|
833
|
+
username,
|
|
834
|
+
dataset,
|
|
835
|
+
_request_auth,
|
|
836
|
+
_content_type,
|
|
837
|
+
_headers,
|
|
838
|
+
_host_index,
|
|
839
|
+
) -> RequestSerialized:
|
|
840
|
+
|
|
841
|
+
_host = None
|
|
842
|
+
|
|
843
|
+
_collection_formats: Dict[str, str] = {
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
_path_params: Dict[str, str] = {}
|
|
847
|
+
_query_params: List[Tuple[str, str]] = []
|
|
848
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
849
|
+
_form_params: List[Tuple[str, str]] = []
|
|
850
|
+
_files: Dict[
|
|
851
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
852
|
+
] = {}
|
|
853
|
+
_body_params: Optional[bytes] = None
|
|
854
|
+
|
|
855
|
+
# process the path parameters
|
|
856
|
+
# process the query parameters
|
|
857
|
+
if scope is not None:
|
|
858
|
+
|
|
859
|
+
_query_params.append(('scope', scope))
|
|
860
|
+
|
|
861
|
+
if organization_id is not None:
|
|
862
|
+
|
|
863
|
+
_query_params.append(('organizationId', organization_id))
|
|
864
|
+
|
|
865
|
+
if username is not None:
|
|
866
|
+
|
|
867
|
+
_query_params.append(('username', username))
|
|
868
|
+
|
|
869
|
+
if dataset is not None:
|
|
870
|
+
|
|
871
|
+
_query_params.append(('dataset', dataset))
|
|
872
|
+
|
|
873
|
+
# process the header parameters
|
|
874
|
+
# process the form parameters
|
|
875
|
+
# process the body parameter
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
# set the HTTP header `Accept`
|
|
879
|
+
if 'Accept' not in _header_params:
|
|
880
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
881
|
+
[
|
|
882
|
+
'application/json'
|
|
883
|
+
]
|
|
884
|
+
)
|
|
885
|
+
|
|
886
|
+
|
|
887
|
+
# authentication setting
|
|
888
|
+
_auth_settings: List[str] = [
|
|
889
|
+
'QAnswer-Api-Key',
|
|
890
|
+
'Bearer token'
|
|
891
|
+
]
|
|
892
|
+
|
|
893
|
+
return self.api_client.param_serialize(
|
|
894
|
+
method='GET',
|
|
895
|
+
resource_path='/api/retention-policy/run-status',
|
|
896
|
+
path_params=_path_params,
|
|
897
|
+
query_params=_query_params,
|
|
898
|
+
header_params=_header_params,
|
|
899
|
+
body=_body_params,
|
|
900
|
+
post_params=_form_params,
|
|
901
|
+
files=_files,
|
|
902
|
+
auth_settings=_auth_settings,
|
|
903
|
+
collection_formats=_collection_formats,
|
|
904
|
+
_host=_host,
|
|
905
|
+
_request_auth=_request_auth
|
|
906
|
+
)
|
|
907
|
+
|
|
908
|
+
|
|
909
|
+
|
|
910
|
+
|
|
911
|
+
@validate_call
|
|
912
|
+
def get_system_policy(
|
|
913
|
+
self,
|
|
914
|
+
_request_timeout: Union[
|
|
915
|
+
None,
|
|
916
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
917
|
+
Tuple[
|
|
918
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
919
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
920
|
+
]
|
|
921
|
+
] = None,
|
|
922
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
923
|
+
_content_type: Optional[StrictStr] = None,
|
|
924
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
925
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
926
|
+
) -> RetentionPolicyDto:
|
|
927
|
+
"""Get System Policy
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
931
|
+
number provided, it will be total request
|
|
932
|
+
timeout. It can also be a pair (tuple) of
|
|
933
|
+
(connection, read) timeouts.
|
|
934
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
935
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
936
|
+
request; this effectively ignores the
|
|
937
|
+
authentication in the spec for a single request.
|
|
938
|
+
:type _request_auth: dict, optional
|
|
939
|
+
:param _content_type: force content-type for the request.
|
|
940
|
+
:type _content_type: str, Optional
|
|
941
|
+
:param _headers: set to override the headers for a single
|
|
942
|
+
request; this effectively ignores the headers
|
|
943
|
+
in the spec for a single request.
|
|
944
|
+
:type _headers: dict, optional
|
|
945
|
+
:param _host_index: set to override the host_index for a single
|
|
946
|
+
request; this effectively ignores the host_index
|
|
947
|
+
in the spec for a single request.
|
|
948
|
+
:type _host_index: int, optional
|
|
949
|
+
:return: Returns the result object.
|
|
950
|
+
""" # noqa: E501
|
|
951
|
+
|
|
952
|
+
_param = self._get_system_policy_serialize(
|
|
953
|
+
_request_auth=_request_auth,
|
|
954
|
+
_content_type=_content_type,
|
|
955
|
+
_headers=_headers,
|
|
956
|
+
_host_index=_host_index
|
|
957
|
+
)
|
|
958
|
+
|
|
959
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
960
|
+
'200': "RetentionPolicyDto",
|
|
961
|
+
}
|
|
962
|
+
response_data = self.api_client.call_api(
|
|
963
|
+
*_param,
|
|
964
|
+
_request_timeout=_request_timeout
|
|
965
|
+
)
|
|
966
|
+
response_data.read()
|
|
967
|
+
return self.api_client.response_deserialize(
|
|
968
|
+
response_data=response_data,
|
|
969
|
+
response_types_map=_response_types_map,
|
|
970
|
+
).data
|
|
971
|
+
|
|
972
|
+
|
|
973
|
+
@validate_call
|
|
974
|
+
def get_system_policy_with_http_info(
|
|
975
|
+
self,
|
|
976
|
+
_request_timeout: Union[
|
|
977
|
+
None,
|
|
978
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
979
|
+
Tuple[
|
|
980
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
981
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
982
|
+
]
|
|
983
|
+
] = None,
|
|
984
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
985
|
+
_content_type: Optional[StrictStr] = None,
|
|
986
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
987
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
988
|
+
) -> ApiResponse[RetentionPolicyDto]:
|
|
989
|
+
"""Get System Policy
|
|
990
|
+
|
|
991
|
+
|
|
992
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
993
|
+
number provided, it will be total request
|
|
994
|
+
timeout. It can also be a pair (tuple) of
|
|
995
|
+
(connection, read) timeouts.
|
|
996
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
997
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
998
|
+
request; this effectively ignores the
|
|
999
|
+
authentication in the spec for a single request.
|
|
1000
|
+
:type _request_auth: dict, optional
|
|
1001
|
+
:param _content_type: force content-type for the request.
|
|
1002
|
+
:type _content_type: str, Optional
|
|
1003
|
+
:param _headers: set to override the headers for a single
|
|
1004
|
+
request; this effectively ignores the headers
|
|
1005
|
+
in the spec for a single request.
|
|
1006
|
+
:type _headers: dict, optional
|
|
1007
|
+
:param _host_index: set to override the host_index for a single
|
|
1008
|
+
request; this effectively ignores the host_index
|
|
1009
|
+
in the spec for a single request.
|
|
1010
|
+
:type _host_index: int, optional
|
|
1011
|
+
:return: Returns the result object.
|
|
1012
|
+
""" # noqa: E501
|
|
1013
|
+
|
|
1014
|
+
_param = self._get_system_policy_serialize(
|
|
1015
|
+
_request_auth=_request_auth,
|
|
1016
|
+
_content_type=_content_type,
|
|
1017
|
+
_headers=_headers,
|
|
1018
|
+
_host_index=_host_index
|
|
1019
|
+
)
|
|
1020
|
+
|
|
1021
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1022
|
+
'200': "RetentionPolicyDto",
|
|
1023
|
+
}
|
|
1024
|
+
response_data = self.api_client.call_api(
|
|
1025
|
+
*_param,
|
|
1026
|
+
_request_timeout=_request_timeout
|
|
1027
|
+
)
|
|
1028
|
+
response_data.read()
|
|
1029
|
+
return self.api_client.response_deserialize(
|
|
1030
|
+
response_data=response_data,
|
|
1031
|
+
response_types_map=_response_types_map,
|
|
1032
|
+
)
|
|
1033
|
+
|
|
1034
|
+
|
|
1035
|
+
@validate_call
|
|
1036
|
+
def get_system_policy_without_preload_content(
|
|
1037
|
+
self,
|
|
1038
|
+
_request_timeout: Union[
|
|
1039
|
+
None,
|
|
1040
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1041
|
+
Tuple[
|
|
1042
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1043
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1044
|
+
]
|
|
1045
|
+
] = None,
|
|
1046
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1047
|
+
_content_type: Optional[StrictStr] = None,
|
|
1048
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1049
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1050
|
+
) -> RESTResponseType:
|
|
1051
|
+
"""Get System Policy
|
|
1052
|
+
|
|
1053
|
+
|
|
1054
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1055
|
+
number provided, it will be total request
|
|
1056
|
+
timeout. It can also be a pair (tuple) of
|
|
1057
|
+
(connection, read) timeouts.
|
|
1058
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1059
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1060
|
+
request; this effectively ignores the
|
|
1061
|
+
authentication in the spec for a single request.
|
|
1062
|
+
:type _request_auth: dict, optional
|
|
1063
|
+
:param _content_type: force content-type for the request.
|
|
1064
|
+
:type _content_type: str, Optional
|
|
1065
|
+
:param _headers: set to override the headers for a single
|
|
1066
|
+
request; this effectively ignores the headers
|
|
1067
|
+
in the spec for a single request.
|
|
1068
|
+
:type _headers: dict, optional
|
|
1069
|
+
:param _host_index: set to override the host_index for a single
|
|
1070
|
+
request; this effectively ignores the host_index
|
|
1071
|
+
in the spec for a single request.
|
|
1072
|
+
:type _host_index: int, optional
|
|
1073
|
+
:return: Returns the result object.
|
|
1074
|
+
""" # noqa: E501
|
|
1075
|
+
|
|
1076
|
+
_param = self._get_system_policy_serialize(
|
|
1077
|
+
_request_auth=_request_auth,
|
|
1078
|
+
_content_type=_content_type,
|
|
1079
|
+
_headers=_headers,
|
|
1080
|
+
_host_index=_host_index
|
|
1081
|
+
)
|
|
1082
|
+
|
|
1083
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1084
|
+
'200': "RetentionPolicyDto",
|
|
1085
|
+
}
|
|
1086
|
+
response_data = self.api_client.call_api(
|
|
1087
|
+
*_param,
|
|
1088
|
+
_request_timeout=_request_timeout
|
|
1089
|
+
)
|
|
1090
|
+
return response_data.response
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
def _get_system_policy_serialize(
|
|
1094
|
+
self,
|
|
1095
|
+
_request_auth,
|
|
1096
|
+
_content_type,
|
|
1097
|
+
_headers,
|
|
1098
|
+
_host_index,
|
|
1099
|
+
) -> RequestSerialized:
|
|
1100
|
+
|
|
1101
|
+
_host = None
|
|
1102
|
+
|
|
1103
|
+
_collection_formats: Dict[str, str] = {
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
_path_params: Dict[str, str] = {}
|
|
1107
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1108
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1109
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1110
|
+
_files: Dict[
|
|
1111
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1112
|
+
] = {}
|
|
1113
|
+
_body_params: Optional[bytes] = None
|
|
1114
|
+
|
|
1115
|
+
# process the path parameters
|
|
1116
|
+
# process the query parameters
|
|
1117
|
+
# process the header parameters
|
|
1118
|
+
# process the form parameters
|
|
1119
|
+
# process the body parameter
|
|
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
|
+
|
|
1131
|
+
# authentication setting
|
|
1132
|
+
_auth_settings: List[str] = [
|
|
1133
|
+
'QAnswer-Api-Key',
|
|
1134
|
+
'Bearer token'
|
|
1135
|
+
]
|
|
1136
|
+
|
|
1137
|
+
return self.api_client.param_serialize(
|
|
1138
|
+
method='GET',
|
|
1139
|
+
resource_path='/api/retention-policy/system',
|
|
1140
|
+
path_params=_path_params,
|
|
1141
|
+
query_params=_query_params,
|
|
1142
|
+
header_params=_header_params,
|
|
1143
|
+
body=_body_params,
|
|
1144
|
+
post_params=_form_params,
|
|
1145
|
+
files=_files,
|
|
1146
|
+
auth_settings=_auth_settings,
|
|
1147
|
+
collection_formats=_collection_formats,
|
|
1148
|
+
_host=_host,
|
|
1149
|
+
_request_auth=_request_auth
|
|
1150
|
+
)
|
|
1151
|
+
|
|
1152
|
+
|
|
1153
|
+
|
|
1154
|
+
|
|
1155
|
+
@validate_call
|
|
1156
|
+
def preview_assistant_policy(
|
|
1157
|
+
self,
|
|
1158
|
+
username: StrictStr,
|
|
1159
|
+
dataset: StrictStr,
|
|
1160
|
+
_request_timeout: Union[
|
|
1161
|
+
None,
|
|
1162
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1163
|
+
Tuple[
|
|
1164
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1165
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1166
|
+
]
|
|
1167
|
+
] = None,
|
|
1168
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1169
|
+
_content_type: Optional[StrictStr] = None,
|
|
1170
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1171
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1172
|
+
) -> RetentionPreviewResponse:
|
|
1173
|
+
"""Preview Assistant Policy
|
|
1174
|
+
|
|
1175
|
+
|
|
1176
|
+
:param username: (required)
|
|
1177
|
+
:type username: str
|
|
1178
|
+
:param dataset: (required)
|
|
1179
|
+
:type dataset: str
|
|
1180
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1181
|
+
number provided, it will be total request
|
|
1182
|
+
timeout. It can also be a pair (tuple) of
|
|
1183
|
+
(connection, read) timeouts.
|
|
1184
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1185
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1186
|
+
request; this effectively ignores the
|
|
1187
|
+
authentication in the spec for a single request.
|
|
1188
|
+
:type _request_auth: dict, optional
|
|
1189
|
+
:param _content_type: force content-type for the request.
|
|
1190
|
+
:type _content_type: str, Optional
|
|
1191
|
+
:param _headers: set to override the headers for a single
|
|
1192
|
+
request; this effectively ignores the headers
|
|
1193
|
+
in the spec for a single request.
|
|
1194
|
+
:type _headers: dict, optional
|
|
1195
|
+
:param _host_index: set to override the host_index for a single
|
|
1196
|
+
request; this effectively ignores the host_index
|
|
1197
|
+
in the spec for a single request.
|
|
1198
|
+
:type _host_index: int, optional
|
|
1199
|
+
:return: Returns the result object.
|
|
1200
|
+
""" # noqa: E501
|
|
1201
|
+
|
|
1202
|
+
_param = self._preview_assistant_policy_serialize(
|
|
1203
|
+
username=username,
|
|
1204
|
+
dataset=dataset,
|
|
1205
|
+
_request_auth=_request_auth,
|
|
1206
|
+
_content_type=_content_type,
|
|
1207
|
+
_headers=_headers,
|
|
1208
|
+
_host_index=_host_index
|
|
1209
|
+
)
|
|
1210
|
+
|
|
1211
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1212
|
+
'200': "RetentionPreviewResponse",
|
|
1213
|
+
'422': "HTTPValidationError",
|
|
1214
|
+
}
|
|
1215
|
+
response_data = self.api_client.call_api(
|
|
1216
|
+
*_param,
|
|
1217
|
+
_request_timeout=_request_timeout
|
|
1218
|
+
)
|
|
1219
|
+
response_data.read()
|
|
1220
|
+
return self.api_client.response_deserialize(
|
|
1221
|
+
response_data=response_data,
|
|
1222
|
+
response_types_map=_response_types_map,
|
|
1223
|
+
).data
|
|
1224
|
+
|
|
1225
|
+
|
|
1226
|
+
@validate_call
|
|
1227
|
+
def preview_assistant_policy_with_http_info(
|
|
1228
|
+
self,
|
|
1229
|
+
username: StrictStr,
|
|
1230
|
+
dataset: StrictStr,
|
|
1231
|
+
_request_timeout: Union[
|
|
1232
|
+
None,
|
|
1233
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1234
|
+
Tuple[
|
|
1235
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1236
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1237
|
+
]
|
|
1238
|
+
] = None,
|
|
1239
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1240
|
+
_content_type: Optional[StrictStr] = None,
|
|
1241
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1242
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1243
|
+
) -> ApiResponse[RetentionPreviewResponse]:
|
|
1244
|
+
"""Preview Assistant Policy
|
|
1245
|
+
|
|
1246
|
+
|
|
1247
|
+
:param username: (required)
|
|
1248
|
+
:type username: str
|
|
1249
|
+
:param dataset: (required)
|
|
1250
|
+
:type dataset: str
|
|
1251
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1252
|
+
number provided, it will be total request
|
|
1253
|
+
timeout. It can also be a pair (tuple) of
|
|
1254
|
+
(connection, read) timeouts.
|
|
1255
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1256
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1257
|
+
request; this effectively ignores the
|
|
1258
|
+
authentication in the spec for a single request.
|
|
1259
|
+
:type _request_auth: dict, optional
|
|
1260
|
+
:param _content_type: force content-type for the request.
|
|
1261
|
+
:type _content_type: str, Optional
|
|
1262
|
+
:param _headers: set to override the headers for a single
|
|
1263
|
+
request; this effectively ignores the headers
|
|
1264
|
+
in the spec for a single request.
|
|
1265
|
+
:type _headers: dict, optional
|
|
1266
|
+
:param _host_index: set to override the host_index for a single
|
|
1267
|
+
request; this effectively ignores the host_index
|
|
1268
|
+
in the spec for a single request.
|
|
1269
|
+
:type _host_index: int, optional
|
|
1270
|
+
:return: Returns the result object.
|
|
1271
|
+
""" # noqa: E501
|
|
1272
|
+
|
|
1273
|
+
_param = self._preview_assistant_policy_serialize(
|
|
1274
|
+
username=username,
|
|
1275
|
+
dataset=dataset,
|
|
1276
|
+
_request_auth=_request_auth,
|
|
1277
|
+
_content_type=_content_type,
|
|
1278
|
+
_headers=_headers,
|
|
1279
|
+
_host_index=_host_index
|
|
1280
|
+
)
|
|
1281
|
+
|
|
1282
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1283
|
+
'200': "RetentionPreviewResponse",
|
|
1284
|
+
'422': "HTTPValidationError",
|
|
1285
|
+
}
|
|
1286
|
+
response_data = self.api_client.call_api(
|
|
1287
|
+
*_param,
|
|
1288
|
+
_request_timeout=_request_timeout
|
|
1289
|
+
)
|
|
1290
|
+
response_data.read()
|
|
1291
|
+
return self.api_client.response_deserialize(
|
|
1292
|
+
response_data=response_data,
|
|
1293
|
+
response_types_map=_response_types_map,
|
|
1294
|
+
)
|
|
1295
|
+
|
|
1296
|
+
|
|
1297
|
+
@validate_call
|
|
1298
|
+
def preview_assistant_policy_without_preload_content(
|
|
1299
|
+
self,
|
|
1300
|
+
username: StrictStr,
|
|
1301
|
+
dataset: StrictStr,
|
|
1302
|
+
_request_timeout: Union[
|
|
1303
|
+
None,
|
|
1304
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1305
|
+
Tuple[
|
|
1306
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1307
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1308
|
+
]
|
|
1309
|
+
] = None,
|
|
1310
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1311
|
+
_content_type: Optional[StrictStr] = None,
|
|
1312
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1313
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1314
|
+
) -> RESTResponseType:
|
|
1315
|
+
"""Preview Assistant Policy
|
|
1316
|
+
|
|
1317
|
+
|
|
1318
|
+
:param username: (required)
|
|
1319
|
+
:type username: str
|
|
1320
|
+
:param dataset: (required)
|
|
1321
|
+
:type dataset: str
|
|
1322
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1323
|
+
number provided, it will be total request
|
|
1324
|
+
timeout. It can also be a pair (tuple) of
|
|
1325
|
+
(connection, read) timeouts.
|
|
1326
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1327
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1328
|
+
request; this effectively ignores the
|
|
1329
|
+
authentication in the spec for a single request.
|
|
1330
|
+
:type _request_auth: dict, optional
|
|
1331
|
+
:param _content_type: force content-type for the request.
|
|
1332
|
+
:type _content_type: str, Optional
|
|
1333
|
+
:param _headers: set to override the headers for a single
|
|
1334
|
+
request; this effectively ignores the headers
|
|
1335
|
+
in the spec for a single request.
|
|
1336
|
+
:type _headers: dict, optional
|
|
1337
|
+
:param _host_index: set to override the host_index for a single
|
|
1338
|
+
request; this effectively ignores the host_index
|
|
1339
|
+
in the spec for a single request.
|
|
1340
|
+
:type _host_index: int, optional
|
|
1341
|
+
:return: Returns the result object.
|
|
1342
|
+
""" # noqa: E501
|
|
1343
|
+
|
|
1344
|
+
_param = self._preview_assistant_policy_serialize(
|
|
1345
|
+
username=username,
|
|
1346
|
+
dataset=dataset,
|
|
1347
|
+
_request_auth=_request_auth,
|
|
1348
|
+
_content_type=_content_type,
|
|
1349
|
+
_headers=_headers,
|
|
1350
|
+
_host_index=_host_index
|
|
1351
|
+
)
|
|
1352
|
+
|
|
1353
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1354
|
+
'200': "RetentionPreviewResponse",
|
|
1355
|
+
'422': "HTTPValidationError",
|
|
1356
|
+
}
|
|
1357
|
+
response_data = self.api_client.call_api(
|
|
1358
|
+
*_param,
|
|
1359
|
+
_request_timeout=_request_timeout
|
|
1360
|
+
)
|
|
1361
|
+
return response_data.response
|
|
1362
|
+
|
|
1363
|
+
|
|
1364
|
+
def _preview_assistant_policy_serialize(
|
|
1365
|
+
self,
|
|
1366
|
+
username,
|
|
1367
|
+
dataset,
|
|
1368
|
+
_request_auth,
|
|
1369
|
+
_content_type,
|
|
1370
|
+
_headers,
|
|
1371
|
+
_host_index,
|
|
1372
|
+
) -> RequestSerialized:
|
|
1373
|
+
|
|
1374
|
+
_host = None
|
|
1375
|
+
|
|
1376
|
+
_collection_formats: Dict[str, str] = {
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
_path_params: Dict[str, str] = {}
|
|
1380
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1381
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1382
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1383
|
+
_files: Dict[
|
|
1384
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1385
|
+
] = {}
|
|
1386
|
+
_body_params: Optional[bytes] = None
|
|
1387
|
+
|
|
1388
|
+
# process the path parameters
|
|
1389
|
+
# process the query parameters
|
|
1390
|
+
if username is not None:
|
|
1391
|
+
|
|
1392
|
+
_query_params.append(('username', username))
|
|
1393
|
+
|
|
1394
|
+
if dataset is not None:
|
|
1395
|
+
|
|
1396
|
+
_query_params.append(('dataset', dataset))
|
|
1397
|
+
|
|
1398
|
+
# process the header parameters
|
|
1399
|
+
# process the form parameters
|
|
1400
|
+
# process the body parameter
|
|
1401
|
+
|
|
1402
|
+
|
|
1403
|
+
# set the HTTP header `Accept`
|
|
1404
|
+
if 'Accept' not in _header_params:
|
|
1405
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1406
|
+
[
|
|
1407
|
+
'application/json'
|
|
1408
|
+
]
|
|
1409
|
+
)
|
|
1410
|
+
|
|
1411
|
+
|
|
1412
|
+
# authentication setting
|
|
1413
|
+
_auth_settings: List[str] = [
|
|
1414
|
+
'QAnswer-Api-Key',
|
|
1415
|
+
'Bearer token'
|
|
1416
|
+
]
|
|
1417
|
+
|
|
1418
|
+
return self.api_client.param_serialize(
|
|
1419
|
+
method='GET',
|
|
1420
|
+
resource_path='/api/retention-policy/assistant/preview',
|
|
1421
|
+
path_params=_path_params,
|
|
1422
|
+
query_params=_query_params,
|
|
1423
|
+
header_params=_header_params,
|
|
1424
|
+
body=_body_params,
|
|
1425
|
+
post_params=_form_params,
|
|
1426
|
+
files=_files,
|
|
1427
|
+
auth_settings=_auth_settings,
|
|
1428
|
+
collection_formats=_collection_formats,
|
|
1429
|
+
_host=_host,
|
|
1430
|
+
_request_auth=_request_auth
|
|
1431
|
+
)
|
|
1432
|
+
|
|
1433
|
+
|
|
1434
|
+
|
|
1435
|
+
|
|
1436
|
+
@validate_call
|
|
1437
|
+
def preview_organization_policy(
|
|
1438
|
+
self,
|
|
1439
|
+
organization_id: StrictInt,
|
|
1440
|
+
_request_timeout: Union[
|
|
1441
|
+
None,
|
|
1442
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1443
|
+
Tuple[
|
|
1444
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1445
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1446
|
+
]
|
|
1447
|
+
] = None,
|
|
1448
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1449
|
+
_content_type: Optional[StrictStr] = None,
|
|
1450
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1451
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1452
|
+
) -> RetentionPreviewResponse:
|
|
1453
|
+
"""Preview Organization Policy
|
|
1454
|
+
|
|
1455
|
+
|
|
1456
|
+
:param organization_id: (required)
|
|
1457
|
+
:type organization_id: int
|
|
1458
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1459
|
+
number provided, it will be total request
|
|
1460
|
+
timeout. It can also be a pair (tuple) of
|
|
1461
|
+
(connection, read) timeouts.
|
|
1462
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1463
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1464
|
+
request; this effectively ignores the
|
|
1465
|
+
authentication in the spec for a single request.
|
|
1466
|
+
:type _request_auth: dict, optional
|
|
1467
|
+
:param _content_type: force content-type for the request.
|
|
1468
|
+
:type _content_type: str, Optional
|
|
1469
|
+
:param _headers: set to override the headers for a single
|
|
1470
|
+
request; this effectively ignores the headers
|
|
1471
|
+
in the spec for a single request.
|
|
1472
|
+
:type _headers: dict, optional
|
|
1473
|
+
:param _host_index: set to override the host_index for a single
|
|
1474
|
+
request; this effectively ignores the host_index
|
|
1475
|
+
in the spec for a single request.
|
|
1476
|
+
:type _host_index: int, optional
|
|
1477
|
+
:return: Returns the result object.
|
|
1478
|
+
""" # noqa: E501
|
|
1479
|
+
|
|
1480
|
+
_param = self._preview_organization_policy_serialize(
|
|
1481
|
+
organization_id=organization_id,
|
|
1482
|
+
_request_auth=_request_auth,
|
|
1483
|
+
_content_type=_content_type,
|
|
1484
|
+
_headers=_headers,
|
|
1485
|
+
_host_index=_host_index
|
|
1486
|
+
)
|
|
1487
|
+
|
|
1488
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1489
|
+
'200': "RetentionPreviewResponse",
|
|
1490
|
+
'422': "HTTPValidationError",
|
|
1491
|
+
}
|
|
1492
|
+
response_data = self.api_client.call_api(
|
|
1493
|
+
*_param,
|
|
1494
|
+
_request_timeout=_request_timeout
|
|
1495
|
+
)
|
|
1496
|
+
response_data.read()
|
|
1497
|
+
return self.api_client.response_deserialize(
|
|
1498
|
+
response_data=response_data,
|
|
1499
|
+
response_types_map=_response_types_map,
|
|
1500
|
+
).data
|
|
1501
|
+
|
|
1502
|
+
|
|
1503
|
+
@validate_call
|
|
1504
|
+
def preview_organization_policy_with_http_info(
|
|
1505
|
+
self,
|
|
1506
|
+
organization_id: StrictInt,
|
|
1507
|
+
_request_timeout: Union[
|
|
1508
|
+
None,
|
|
1509
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1510
|
+
Tuple[
|
|
1511
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1512
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1513
|
+
]
|
|
1514
|
+
] = None,
|
|
1515
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1516
|
+
_content_type: Optional[StrictStr] = None,
|
|
1517
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1518
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1519
|
+
) -> ApiResponse[RetentionPreviewResponse]:
|
|
1520
|
+
"""Preview Organization Policy
|
|
1521
|
+
|
|
1522
|
+
|
|
1523
|
+
:param organization_id: (required)
|
|
1524
|
+
:type organization_id: int
|
|
1525
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1526
|
+
number provided, it will be total request
|
|
1527
|
+
timeout. It can also be a pair (tuple) of
|
|
1528
|
+
(connection, read) timeouts.
|
|
1529
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1530
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1531
|
+
request; this effectively ignores the
|
|
1532
|
+
authentication in the spec for a single request.
|
|
1533
|
+
:type _request_auth: dict, optional
|
|
1534
|
+
:param _content_type: force content-type for the request.
|
|
1535
|
+
:type _content_type: str, Optional
|
|
1536
|
+
:param _headers: set to override the headers for a single
|
|
1537
|
+
request; this effectively ignores the headers
|
|
1538
|
+
in the spec for a single request.
|
|
1539
|
+
:type _headers: dict, optional
|
|
1540
|
+
:param _host_index: set to override the host_index for a single
|
|
1541
|
+
request; this effectively ignores the host_index
|
|
1542
|
+
in the spec for a single request.
|
|
1543
|
+
:type _host_index: int, optional
|
|
1544
|
+
:return: Returns the result object.
|
|
1545
|
+
""" # noqa: E501
|
|
1546
|
+
|
|
1547
|
+
_param = self._preview_organization_policy_serialize(
|
|
1548
|
+
organization_id=organization_id,
|
|
1549
|
+
_request_auth=_request_auth,
|
|
1550
|
+
_content_type=_content_type,
|
|
1551
|
+
_headers=_headers,
|
|
1552
|
+
_host_index=_host_index
|
|
1553
|
+
)
|
|
1554
|
+
|
|
1555
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1556
|
+
'200': "RetentionPreviewResponse",
|
|
1557
|
+
'422': "HTTPValidationError",
|
|
1558
|
+
}
|
|
1559
|
+
response_data = self.api_client.call_api(
|
|
1560
|
+
*_param,
|
|
1561
|
+
_request_timeout=_request_timeout
|
|
1562
|
+
)
|
|
1563
|
+
response_data.read()
|
|
1564
|
+
return self.api_client.response_deserialize(
|
|
1565
|
+
response_data=response_data,
|
|
1566
|
+
response_types_map=_response_types_map,
|
|
1567
|
+
)
|
|
1568
|
+
|
|
1569
|
+
|
|
1570
|
+
@validate_call
|
|
1571
|
+
def preview_organization_policy_without_preload_content(
|
|
1572
|
+
self,
|
|
1573
|
+
organization_id: StrictInt,
|
|
1574
|
+
_request_timeout: Union[
|
|
1575
|
+
None,
|
|
1576
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1577
|
+
Tuple[
|
|
1578
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1579
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1580
|
+
]
|
|
1581
|
+
] = None,
|
|
1582
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1583
|
+
_content_type: Optional[StrictStr] = None,
|
|
1584
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1585
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1586
|
+
) -> RESTResponseType:
|
|
1587
|
+
"""Preview Organization Policy
|
|
1588
|
+
|
|
1589
|
+
|
|
1590
|
+
:param organization_id: (required)
|
|
1591
|
+
:type organization_id: int
|
|
1592
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1593
|
+
number provided, it will be total request
|
|
1594
|
+
timeout. It can also be a pair (tuple) of
|
|
1595
|
+
(connection, read) timeouts.
|
|
1596
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1597
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1598
|
+
request; this effectively ignores the
|
|
1599
|
+
authentication in the spec for a single request.
|
|
1600
|
+
:type _request_auth: dict, optional
|
|
1601
|
+
:param _content_type: force content-type for the request.
|
|
1602
|
+
:type _content_type: str, Optional
|
|
1603
|
+
:param _headers: set to override the headers for a single
|
|
1604
|
+
request; this effectively ignores the headers
|
|
1605
|
+
in the spec for a single request.
|
|
1606
|
+
:type _headers: dict, optional
|
|
1607
|
+
:param _host_index: set to override the host_index for a single
|
|
1608
|
+
request; this effectively ignores the host_index
|
|
1609
|
+
in the spec for a single request.
|
|
1610
|
+
:type _host_index: int, optional
|
|
1611
|
+
:return: Returns the result object.
|
|
1612
|
+
""" # noqa: E501
|
|
1613
|
+
|
|
1614
|
+
_param = self._preview_organization_policy_serialize(
|
|
1615
|
+
organization_id=organization_id,
|
|
1616
|
+
_request_auth=_request_auth,
|
|
1617
|
+
_content_type=_content_type,
|
|
1618
|
+
_headers=_headers,
|
|
1619
|
+
_host_index=_host_index
|
|
1620
|
+
)
|
|
1621
|
+
|
|
1622
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1623
|
+
'200': "RetentionPreviewResponse",
|
|
1624
|
+
'422': "HTTPValidationError",
|
|
1625
|
+
}
|
|
1626
|
+
response_data = self.api_client.call_api(
|
|
1627
|
+
*_param,
|
|
1628
|
+
_request_timeout=_request_timeout
|
|
1629
|
+
)
|
|
1630
|
+
return response_data.response
|
|
1631
|
+
|
|
1632
|
+
|
|
1633
|
+
def _preview_organization_policy_serialize(
|
|
1634
|
+
self,
|
|
1635
|
+
organization_id,
|
|
1636
|
+
_request_auth,
|
|
1637
|
+
_content_type,
|
|
1638
|
+
_headers,
|
|
1639
|
+
_host_index,
|
|
1640
|
+
) -> RequestSerialized:
|
|
1641
|
+
|
|
1642
|
+
_host = None
|
|
1643
|
+
|
|
1644
|
+
_collection_formats: Dict[str, str] = {
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
_path_params: Dict[str, str] = {}
|
|
1648
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1649
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1650
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1651
|
+
_files: Dict[
|
|
1652
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1653
|
+
] = {}
|
|
1654
|
+
_body_params: Optional[bytes] = None
|
|
1655
|
+
|
|
1656
|
+
# process the path parameters
|
|
1657
|
+
# process the query parameters
|
|
1658
|
+
if organization_id is not None:
|
|
1659
|
+
|
|
1660
|
+
_query_params.append(('organizationId', organization_id))
|
|
1661
|
+
|
|
1662
|
+
# process the header parameters
|
|
1663
|
+
# process the form parameters
|
|
1664
|
+
# process the body parameter
|
|
1665
|
+
|
|
1666
|
+
|
|
1667
|
+
# set the HTTP header `Accept`
|
|
1668
|
+
if 'Accept' not in _header_params:
|
|
1669
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1670
|
+
[
|
|
1671
|
+
'application/json'
|
|
1672
|
+
]
|
|
1673
|
+
)
|
|
1674
|
+
|
|
1675
|
+
|
|
1676
|
+
# authentication setting
|
|
1677
|
+
_auth_settings: List[str] = [
|
|
1678
|
+
'QAnswer-Api-Key',
|
|
1679
|
+
'Bearer token'
|
|
1680
|
+
]
|
|
1681
|
+
|
|
1682
|
+
return self.api_client.param_serialize(
|
|
1683
|
+
method='GET',
|
|
1684
|
+
resource_path='/api/retention-policy/organization/preview',
|
|
1685
|
+
path_params=_path_params,
|
|
1686
|
+
query_params=_query_params,
|
|
1687
|
+
header_params=_header_params,
|
|
1688
|
+
body=_body_params,
|
|
1689
|
+
post_params=_form_params,
|
|
1690
|
+
files=_files,
|
|
1691
|
+
auth_settings=_auth_settings,
|
|
1692
|
+
collection_formats=_collection_formats,
|
|
1693
|
+
_host=_host,
|
|
1694
|
+
_request_auth=_request_auth
|
|
1695
|
+
)
|
|
1696
|
+
|
|
1697
|
+
|
|
1698
|
+
|
|
1699
|
+
|
|
1700
|
+
@validate_call
|
|
1701
|
+
def preview_system_policy(
|
|
1702
|
+
self,
|
|
1703
|
+
_request_timeout: Union[
|
|
1704
|
+
None,
|
|
1705
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1706
|
+
Tuple[
|
|
1707
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1708
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1709
|
+
]
|
|
1710
|
+
] = None,
|
|
1711
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1712
|
+
_content_type: Optional[StrictStr] = None,
|
|
1713
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1714
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1715
|
+
) -> RetentionPreviewResponse:
|
|
1716
|
+
"""Preview System Policy
|
|
1717
|
+
|
|
1718
|
+
|
|
1719
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1720
|
+
number provided, it will be total request
|
|
1721
|
+
timeout. It can also be a pair (tuple) of
|
|
1722
|
+
(connection, read) timeouts.
|
|
1723
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1724
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1725
|
+
request; this effectively ignores the
|
|
1726
|
+
authentication in the spec for a single request.
|
|
1727
|
+
:type _request_auth: dict, optional
|
|
1728
|
+
:param _content_type: force content-type for the request.
|
|
1729
|
+
:type _content_type: str, Optional
|
|
1730
|
+
:param _headers: set to override the headers for a single
|
|
1731
|
+
request; this effectively ignores the headers
|
|
1732
|
+
in the spec for a single request.
|
|
1733
|
+
:type _headers: dict, optional
|
|
1734
|
+
:param _host_index: set to override the host_index for a single
|
|
1735
|
+
request; this effectively ignores the host_index
|
|
1736
|
+
in the spec for a single request.
|
|
1737
|
+
:type _host_index: int, optional
|
|
1738
|
+
:return: Returns the result object.
|
|
1739
|
+
""" # noqa: E501
|
|
1740
|
+
|
|
1741
|
+
_param = self._preview_system_policy_serialize(
|
|
1742
|
+
_request_auth=_request_auth,
|
|
1743
|
+
_content_type=_content_type,
|
|
1744
|
+
_headers=_headers,
|
|
1745
|
+
_host_index=_host_index
|
|
1746
|
+
)
|
|
1747
|
+
|
|
1748
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1749
|
+
'200': "RetentionPreviewResponse",
|
|
1750
|
+
}
|
|
1751
|
+
response_data = self.api_client.call_api(
|
|
1752
|
+
*_param,
|
|
1753
|
+
_request_timeout=_request_timeout
|
|
1754
|
+
)
|
|
1755
|
+
response_data.read()
|
|
1756
|
+
return self.api_client.response_deserialize(
|
|
1757
|
+
response_data=response_data,
|
|
1758
|
+
response_types_map=_response_types_map,
|
|
1759
|
+
).data
|
|
1760
|
+
|
|
1761
|
+
|
|
1762
|
+
@validate_call
|
|
1763
|
+
def preview_system_policy_with_http_info(
|
|
1764
|
+
self,
|
|
1765
|
+
_request_timeout: Union[
|
|
1766
|
+
None,
|
|
1767
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1768
|
+
Tuple[
|
|
1769
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1770
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1771
|
+
]
|
|
1772
|
+
] = None,
|
|
1773
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1774
|
+
_content_type: Optional[StrictStr] = None,
|
|
1775
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1776
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1777
|
+
) -> ApiResponse[RetentionPreviewResponse]:
|
|
1778
|
+
"""Preview System Policy
|
|
1779
|
+
|
|
1780
|
+
|
|
1781
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1782
|
+
number provided, it will be total request
|
|
1783
|
+
timeout. It can also be a pair (tuple) of
|
|
1784
|
+
(connection, read) timeouts.
|
|
1785
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1786
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1787
|
+
request; this effectively ignores the
|
|
1788
|
+
authentication in the spec for a single request.
|
|
1789
|
+
:type _request_auth: dict, optional
|
|
1790
|
+
:param _content_type: force content-type for the request.
|
|
1791
|
+
:type _content_type: str, Optional
|
|
1792
|
+
:param _headers: set to override the headers for a single
|
|
1793
|
+
request; this effectively ignores the headers
|
|
1794
|
+
in the spec for a single request.
|
|
1795
|
+
:type _headers: dict, optional
|
|
1796
|
+
:param _host_index: set to override the host_index for a single
|
|
1797
|
+
request; this effectively ignores the host_index
|
|
1798
|
+
in the spec for a single request.
|
|
1799
|
+
:type _host_index: int, optional
|
|
1800
|
+
:return: Returns the result object.
|
|
1801
|
+
""" # noqa: E501
|
|
1802
|
+
|
|
1803
|
+
_param = self._preview_system_policy_serialize(
|
|
1804
|
+
_request_auth=_request_auth,
|
|
1805
|
+
_content_type=_content_type,
|
|
1806
|
+
_headers=_headers,
|
|
1807
|
+
_host_index=_host_index
|
|
1808
|
+
)
|
|
1809
|
+
|
|
1810
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1811
|
+
'200': "RetentionPreviewResponse",
|
|
1812
|
+
}
|
|
1813
|
+
response_data = self.api_client.call_api(
|
|
1814
|
+
*_param,
|
|
1815
|
+
_request_timeout=_request_timeout
|
|
1816
|
+
)
|
|
1817
|
+
response_data.read()
|
|
1818
|
+
return self.api_client.response_deserialize(
|
|
1819
|
+
response_data=response_data,
|
|
1820
|
+
response_types_map=_response_types_map,
|
|
1821
|
+
)
|
|
1822
|
+
|
|
1823
|
+
|
|
1824
|
+
@validate_call
|
|
1825
|
+
def preview_system_policy_without_preload_content(
|
|
1826
|
+
self,
|
|
1827
|
+
_request_timeout: Union[
|
|
1828
|
+
None,
|
|
1829
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1830
|
+
Tuple[
|
|
1831
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1832
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1833
|
+
]
|
|
1834
|
+
] = None,
|
|
1835
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1836
|
+
_content_type: Optional[StrictStr] = None,
|
|
1837
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1838
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1839
|
+
) -> RESTResponseType:
|
|
1840
|
+
"""Preview System Policy
|
|
1841
|
+
|
|
1842
|
+
|
|
1843
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1844
|
+
number provided, it will be total request
|
|
1845
|
+
timeout. It can also be a pair (tuple) of
|
|
1846
|
+
(connection, read) timeouts.
|
|
1847
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1848
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1849
|
+
request; this effectively ignores the
|
|
1850
|
+
authentication in the spec for a single request.
|
|
1851
|
+
:type _request_auth: dict, optional
|
|
1852
|
+
:param _content_type: force content-type for the request.
|
|
1853
|
+
:type _content_type: str, Optional
|
|
1854
|
+
:param _headers: set to override the headers for a single
|
|
1855
|
+
request; this effectively ignores the headers
|
|
1856
|
+
in the spec for a single request.
|
|
1857
|
+
:type _headers: dict, optional
|
|
1858
|
+
:param _host_index: set to override the host_index for a single
|
|
1859
|
+
request; this effectively ignores the host_index
|
|
1860
|
+
in the spec for a single request.
|
|
1861
|
+
:type _host_index: int, optional
|
|
1862
|
+
:return: Returns the result object.
|
|
1863
|
+
""" # noqa: E501
|
|
1864
|
+
|
|
1865
|
+
_param = self._preview_system_policy_serialize(
|
|
1866
|
+
_request_auth=_request_auth,
|
|
1867
|
+
_content_type=_content_type,
|
|
1868
|
+
_headers=_headers,
|
|
1869
|
+
_host_index=_host_index
|
|
1870
|
+
)
|
|
1871
|
+
|
|
1872
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1873
|
+
'200': "RetentionPreviewResponse",
|
|
1874
|
+
}
|
|
1875
|
+
response_data = self.api_client.call_api(
|
|
1876
|
+
*_param,
|
|
1877
|
+
_request_timeout=_request_timeout
|
|
1878
|
+
)
|
|
1879
|
+
return response_data.response
|
|
1880
|
+
|
|
1881
|
+
|
|
1882
|
+
def _preview_system_policy_serialize(
|
|
1883
|
+
self,
|
|
1884
|
+
_request_auth,
|
|
1885
|
+
_content_type,
|
|
1886
|
+
_headers,
|
|
1887
|
+
_host_index,
|
|
1888
|
+
) -> RequestSerialized:
|
|
1889
|
+
|
|
1890
|
+
_host = None
|
|
1891
|
+
|
|
1892
|
+
_collection_formats: Dict[str, str] = {
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1895
|
+
_path_params: Dict[str, str] = {}
|
|
1896
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1897
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1898
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1899
|
+
_files: Dict[
|
|
1900
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1901
|
+
] = {}
|
|
1902
|
+
_body_params: Optional[bytes] = None
|
|
1903
|
+
|
|
1904
|
+
# process the path parameters
|
|
1905
|
+
# process the query parameters
|
|
1906
|
+
# process the header parameters
|
|
1907
|
+
# process the form parameters
|
|
1908
|
+
# process the body parameter
|
|
1909
|
+
|
|
1910
|
+
|
|
1911
|
+
# set the HTTP header `Accept`
|
|
1912
|
+
if 'Accept' not in _header_params:
|
|
1913
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1914
|
+
[
|
|
1915
|
+
'application/json'
|
|
1916
|
+
]
|
|
1917
|
+
)
|
|
1918
|
+
|
|
1919
|
+
|
|
1920
|
+
# authentication setting
|
|
1921
|
+
_auth_settings: List[str] = [
|
|
1922
|
+
'QAnswer-Api-Key',
|
|
1923
|
+
'Bearer token'
|
|
1924
|
+
]
|
|
1925
|
+
|
|
1926
|
+
return self.api_client.param_serialize(
|
|
1927
|
+
method='GET',
|
|
1928
|
+
resource_path='/api/retention-policy/system/preview',
|
|
1929
|
+
path_params=_path_params,
|
|
1930
|
+
query_params=_query_params,
|
|
1931
|
+
header_params=_header_params,
|
|
1932
|
+
body=_body_params,
|
|
1933
|
+
post_params=_form_params,
|
|
1934
|
+
files=_files,
|
|
1935
|
+
auth_settings=_auth_settings,
|
|
1936
|
+
collection_formats=_collection_formats,
|
|
1937
|
+
_host=_host,
|
|
1938
|
+
_request_auth=_request_auth
|
|
1939
|
+
)
|
|
1940
|
+
|
|
1941
|
+
|
|
1942
|
+
|
|
1943
|
+
|
|
1944
|
+
@validate_call
|
|
1945
|
+
def run_assistant_retention_now(
|
|
1946
|
+
self,
|
|
1947
|
+
username: StrictStr,
|
|
1948
|
+
dataset: StrictStr,
|
|
1949
|
+
_request_timeout: Union[
|
|
1950
|
+
None,
|
|
1951
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1952
|
+
Tuple[
|
|
1953
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1954
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1955
|
+
]
|
|
1956
|
+
] = None,
|
|
1957
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1958
|
+
_content_type: Optional[StrictStr] = None,
|
|
1959
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1960
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1961
|
+
) -> RetentionSweepResult:
|
|
1962
|
+
"""Run Assistant Retention Now
|
|
1963
|
+
|
|
1964
|
+
Immediately apply this assistant's retention policy (assistant write access).
|
|
1965
|
+
|
|
1966
|
+
:param username: (required)
|
|
1967
|
+
:type username: str
|
|
1968
|
+
:param dataset: (required)
|
|
1969
|
+
:type dataset: str
|
|
1970
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1971
|
+
number provided, it will be total request
|
|
1972
|
+
timeout. It can also be a pair (tuple) of
|
|
1973
|
+
(connection, read) timeouts.
|
|
1974
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1975
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1976
|
+
request; this effectively ignores the
|
|
1977
|
+
authentication in the spec for a single request.
|
|
1978
|
+
:type _request_auth: dict, optional
|
|
1979
|
+
:param _content_type: force content-type for the request.
|
|
1980
|
+
:type _content_type: str, Optional
|
|
1981
|
+
:param _headers: set to override the headers for a single
|
|
1982
|
+
request; this effectively ignores the headers
|
|
1983
|
+
in the spec for a single request.
|
|
1984
|
+
:type _headers: dict, optional
|
|
1985
|
+
:param _host_index: set to override the host_index for a single
|
|
1986
|
+
request; this effectively ignores the host_index
|
|
1987
|
+
in the spec for a single request.
|
|
1988
|
+
:type _host_index: int, optional
|
|
1989
|
+
:return: Returns the result object.
|
|
1990
|
+
""" # noqa: E501
|
|
1991
|
+
|
|
1992
|
+
_param = self._run_assistant_retention_now_serialize(
|
|
1993
|
+
username=username,
|
|
1994
|
+
dataset=dataset,
|
|
1995
|
+
_request_auth=_request_auth,
|
|
1996
|
+
_content_type=_content_type,
|
|
1997
|
+
_headers=_headers,
|
|
1998
|
+
_host_index=_host_index
|
|
1999
|
+
)
|
|
2000
|
+
|
|
2001
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2002
|
+
'200': "RetentionSweepResult",
|
|
2003
|
+
'422': "HTTPValidationError",
|
|
2004
|
+
}
|
|
2005
|
+
response_data = self.api_client.call_api(
|
|
2006
|
+
*_param,
|
|
2007
|
+
_request_timeout=_request_timeout
|
|
2008
|
+
)
|
|
2009
|
+
response_data.read()
|
|
2010
|
+
return self.api_client.response_deserialize(
|
|
2011
|
+
response_data=response_data,
|
|
2012
|
+
response_types_map=_response_types_map,
|
|
2013
|
+
).data
|
|
2014
|
+
|
|
2015
|
+
|
|
2016
|
+
@validate_call
|
|
2017
|
+
def run_assistant_retention_now_with_http_info(
|
|
2018
|
+
self,
|
|
2019
|
+
username: StrictStr,
|
|
2020
|
+
dataset: StrictStr,
|
|
2021
|
+
_request_timeout: Union[
|
|
2022
|
+
None,
|
|
2023
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2024
|
+
Tuple[
|
|
2025
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2026
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2027
|
+
]
|
|
2028
|
+
] = None,
|
|
2029
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2030
|
+
_content_type: Optional[StrictStr] = None,
|
|
2031
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2032
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2033
|
+
) -> ApiResponse[RetentionSweepResult]:
|
|
2034
|
+
"""Run Assistant Retention Now
|
|
2035
|
+
|
|
2036
|
+
Immediately apply this assistant's retention policy (assistant write access).
|
|
2037
|
+
|
|
2038
|
+
:param username: (required)
|
|
2039
|
+
:type username: str
|
|
2040
|
+
:param dataset: (required)
|
|
2041
|
+
:type dataset: str
|
|
2042
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2043
|
+
number provided, it will be total request
|
|
2044
|
+
timeout. It can also be a pair (tuple) of
|
|
2045
|
+
(connection, read) timeouts.
|
|
2046
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2047
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2048
|
+
request; this effectively ignores the
|
|
2049
|
+
authentication in the spec for a single request.
|
|
2050
|
+
:type _request_auth: dict, optional
|
|
2051
|
+
:param _content_type: force content-type for the request.
|
|
2052
|
+
:type _content_type: str, Optional
|
|
2053
|
+
:param _headers: set to override the headers for a single
|
|
2054
|
+
request; this effectively ignores the headers
|
|
2055
|
+
in the spec for a single request.
|
|
2056
|
+
:type _headers: dict, optional
|
|
2057
|
+
:param _host_index: set to override the host_index for a single
|
|
2058
|
+
request; this effectively ignores the host_index
|
|
2059
|
+
in the spec for a single request.
|
|
2060
|
+
:type _host_index: int, optional
|
|
2061
|
+
:return: Returns the result object.
|
|
2062
|
+
""" # noqa: E501
|
|
2063
|
+
|
|
2064
|
+
_param = self._run_assistant_retention_now_serialize(
|
|
2065
|
+
username=username,
|
|
2066
|
+
dataset=dataset,
|
|
2067
|
+
_request_auth=_request_auth,
|
|
2068
|
+
_content_type=_content_type,
|
|
2069
|
+
_headers=_headers,
|
|
2070
|
+
_host_index=_host_index
|
|
2071
|
+
)
|
|
2072
|
+
|
|
2073
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2074
|
+
'200': "RetentionSweepResult",
|
|
2075
|
+
'422': "HTTPValidationError",
|
|
2076
|
+
}
|
|
2077
|
+
response_data = self.api_client.call_api(
|
|
2078
|
+
*_param,
|
|
2079
|
+
_request_timeout=_request_timeout
|
|
2080
|
+
)
|
|
2081
|
+
response_data.read()
|
|
2082
|
+
return self.api_client.response_deserialize(
|
|
2083
|
+
response_data=response_data,
|
|
2084
|
+
response_types_map=_response_types_map,
|
|
2085
|
+
)
|
|
2086
|
+
|
|
2087
|
+
|
|
2088
|
+
@validate_call
|
|
2089
|
+
def run_assistant_retention_now_without_preload_content(
|
|
2090
|
+
self,
|
|
2091
|
+
username: StrictStr,
|
|
2092
|
+
dataset: StrictStr,
|
|
2093
|
+
_request_timeout: Union[
|
|
2094
|
+
None,
|
|
2095
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2096
|
+
Tuple[
|
|
2097
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2098
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2099
|
+
]
|
|
2100
|
+
] = None,
|
|
2101
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2102
|
+
_content_type: Optional[StrictStr] = None,
|
|
2103
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2104
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2105
|
+
) -> RESTResponseType:
|
|
2106
|
+
"""Run Assistant Retention Now
|
|
2107
|
+
|
|
2108
|
+
Immediately apply this assistant's retention policy (assistant write access).
|
|
2109
|
+
|
|
2110
|
+
:param username: (required)
|
|
2111
|
+
:type username: str
|
|
2112
|
+
:param dataset: (required)
|
|
2113
|
+
:type dataset: str
|
|
2114
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2115
|
+
number provided, it will be total request
|
|
2116
|
+
timeout. It can also be a pair (tuple) of
|
|
2117
|
+
(connection, read) timeouts.
|
|
2118
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2119
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2120
|
+
request; this effectively ignores the
|
|
2121
|
+
authentication in the spec for a single request.
|
|
2122
|
+
:type _request_auth: dict, optional
|
|
2123
|
+
:param _content_type: force content-type for the request.
|
|
2124
|
+
:type _content_type: str, Optional
|
|
2125
|
+
:param _headers: set to override the headers for a single
|
|
2126
|
+
request; this effectively ignores the headers
|
|
2127
|
+
in the spec for a single request.
|
|
2128
|
+
:type _headers: dict, optional
|
|
2129
|
+
:param _host_index: set to override the host_index for a single
|
|
2130
|
+
request; this effectively ignores the host_index
|
|
2131
|
+
in the spec for a single request.
|
|
2132
|
+
:type _host_index: int, optional
|
|
2133
|
+
:return: Returns the result object.
|
|
2134
|
+
""" # noqa: E501
|
|
2135
|
+
|
|
2136
|
+
_param = self._run_assistant_retention_now_serialize(
|
|
2137
|
+
username=username,
|
|
2138
|
+
dataset=dataset,
|
|
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': "RetentionSweepResult",
|
|
2147
|
+
'422': "HTTPValidationError",
|
|
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 _run_assistant_retention_now_serialize(
|
|
2157
|
+
self,
|
|
2158
|
+
username,
|
|
2159
|
+
dataset,
|
|
2160
|
+
_request_auth,
|
|
2161
|
+
_content_type,
|
|
2162
|
+
_headers,
|
|
2163
|
+
_host_index,
|
|
2164
|
+
) -> RequestSerialized:
|
|
2165
|
+
|
|
2166
|
+
_host = None
|
|
2167
|
+
|
|
2168
|
+
_collection_formats: Dict[str, str] = {
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
_path_params: Dict[str, str] = {}
|
|
2172
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2173
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2174
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2175
|
+
_files: Dict[
|
|
2176
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2177
|
+
] = {}
|
|
2178
|
+
_body_params: Optional[bytes] = None
|
|
2179
|
+
|
|
2180
|
+
# process the path parameters
|
|
2181
|
+
# process the query parameters
|
|
2182
|
+
if username is not None:
|
|
2183
|
+
|
|
2184
|
+
_query_params.append(('username', username))
|
|
2185
|
+
|
|
2186
|
+
if dataset is not None:
|
|
2187
|
+
|
|
2188
|
+
_query_params.append(('dataset', dataset))
|
|
2189
|
+
|
|
2190
|
+
# process the header parameters
|
|
2191
|
+
# process the form parameters
|
|
2192
|
+
# process the body parameter
|
|
2193
|
+
|
|
2194
|
+
|
|
2195
|
+
# set the HTTP header `Accept`
|
|
2196
|
+
if 'Accept' not in _header_params:
|
|
2197
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2198
|
+
[
|
|
2199
|
+
'application/json'
|
|
2200
|
+
]
|
|
2201
|
+
)
|
|
2202
|
+
|
|
2203
|
+
|
|
2204
|
+
# authentication setting
|
|
2205
|
+
_auth_settings: List[str] = [
|
|
2206
|
+
'QAnswer-Api-Key',
|
|
2207
|
+
'Bearer token'
|
|
2208
|
+
]
|
|
2209
|
+
|
|
2210
|
+
return self.api_client.param_serialize(
|
|
2211
|
+
method='POST',
|
|
2212
|
+
resource_path='/api/retention-policy/assistant/run-now',
|
|
2213
|
+
path_params=_path_params,
|
|
2214
|
+
query_params=_query_params,
|
|
2215
|
+
header_params=_header_params,
|
|
2216
|
+
body=_body_params,
|
|
2217
|
+
post_params=_form_params,
|
|
2218
|
+
files=_files,
|
|
2219
|
+
auth_settings=_auth_settings,
|
|
2220
|
+
collection_formats=_collection_formats,
|
|
2221
|
+
_host=_host,
|
|
2222
|
+
_request_auth=_request_auth
|
|
2223
|
+
)
|
|
2224
|
+
|
|
2225
|
+
|
|
2226
|
+
|
|
2227
|
+
|
|
2228
|
+
@validate_call
|
|
2229
|
+
def run_organization_retention_now(
|
|
2230
|
+
self,
|
|
2231
|
+
organization_id: StrictInt,
|
|
2232
|
+
_request_timeout: Union[
|
|
2233
|
+
None,
|
|
2234
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2235
|
+
Tuple[
|
|
2236
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2237
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2238
|
+
]
|
|
2239
|
+
] = None,
|
|
2240
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2241
|
+
_content_type: Optional[StrictStr] = None,
|
|
2242
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2243
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2244
|
+
) -> RetentionSweepResult:
|
|
2245
|
+
"""Run Organization Retention Now
|
|
2246
|
+
|
|
2247
|
+
Immediately apply this organisation's retention policy (org admin).
|
|
2248
|
+
|
|
2249
|
+
:param organization_id: (required)
|
|
2250
|
+
:type organization_id: int
|
|
2251
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2252
|
+
number provided, it will be total request
|
|
2253
|
+
timeout. It can also be a pair (tuple) of
|
|
2254
|
+
(connection, read) timeouts.
|
|
2255
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2256
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2257
|
+
request; this effectively ignores the
|
|
2258
|
+
authentication in the spec for a single request.
|
|
2259
|
+
:type _request_auth: dict, optional
|
|
2260
|
+
:param _content_type: force content-type for the request.
|
|
2261
|
+
:type _content_type: str, Optional
|
|
2262
|
+
:param _headers: set to override the headers for a single
|
|
2263
|
+
request; this effectively ignores the headers
|
|
2264
|
+
in the spec for a single request.
|
|
2265
|
+
:type _headers: dict, optional
|
|
2266
|
+
:param _host_index: set to override the host_index for a single
|
|
2267
|
+
request; this effectively ignores the host_index
|
|
2268
|
+
in the spec for a single request.
|
|
2269
|
+
:type _host_index: int, optional
|
|
2270
|
+
:return: Returns the result object.
|
|
2271
|
+
""" # noqa: E501
|
|
2272
|
+
|
|
2273
|
+
_param = self._run_organization_retention_now_serialize(
|
|
2274
|
+
organization_id=organization_id,
|
|
2275
|
+
_request_auth=_request_auth,
|
|
2276
|
+
_content_type=_content_type,
|
|
2277
|
+
_headers=_headers,
|
|
2278
|
+
_host_index=_host_index
|
|
2279
|
+
)
|
|
2280
|
+
|
|
2281
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2282
|
+
'200': "RetentionSweepResult",
|
|
2283
|
+
'422': "HTTPValidationError",
|
|
2284
|
+
}
|
|
2285
|
+
response_data = self.api_client.call_api(
|
|
2286
|
+
*_param,
|
|
2287
|
+
_request_timeout=_request_timeout
|
|
2288
|
+
)
|
|
2289
|
+
response_data.read()
|
|
2290
|
+
return self.api_client.response_deserialize(
|
|
2291
|
+
response_data=response_data,
|
|
2292
|
+
response_types_map=_response_types_map,
|
|
2293
|
+
).data
|
|
2294
|
+
|
|
2295
|
+
|
|
2296
|
+
@validate_call
|
|
2297
|
+
def run_organization_retention_now_with_http_info(
|
|
2298
|
+
self,
|
|
2299
|
+
organization_id: StrictInt,
|
|
2300
|
+
_request_timeout: Union[
|
|
2301
|
+
None,
|
|
2302
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2303
|
+
Tuple[
|
|
2304
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2305
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2306
|
+
]
|
|
2307
|
+
] = None,
|
|
2308
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2309
|
+
_content_type: Optional[StrictStr] = None,
|
|
2310
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2311
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2312
|
+
) -> ApiResponse[RetentionSweepResult]:
|
|
2313
|
+
"""Run Organization Retention Now
|
|
2314
|
+
|
|
2315
|
+
Immediately apply this organisation's retention policy (org admin).
|
|
2316
|
+
|
|
2317
|
+
:param organization_id: (required)
|
|
2318
|
+
:type organization_id: int
|
|
2319
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2320
|
+
number provided, it will be total request
|
|
2321
|
+
timeout. It can also be a pair (tuple) of
|
|
2322
|
+
(connection, read) timeouts.
|
|
2323
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2324
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2325
|
+
request; this effectively ignores the
|
|
2326
|
+
authentication in the spec for a single request.
|
|
2327
|
+
:type _request_auth: dict, optional
|
|
2328
|
+
:param _content_type: force content-type for the request.
|
|
2329
|
+
:type _content_type: str, Optional
|
|
2330
|
+
:param _headers: set to override the headers for a single
|
|
2331
|
+
request; this effectively ignores the headers
|
|
2332
|
+
in the spec for a single request.
|
|
2333
|
+
:type _headers: dict, optional
|
|
2334
|
+
:param _host_index: set to override the host_index for a single
|
|
2335
|
+
request; this effectively ignores the host_index
|
|
2336
|
+
in the spec for a single request.
|
|
2337
|
+
:type _host_index: int, optional
|
|
2338
|
+
:return: Returns the result object.
|
|
2339
|
+
""" # noqa: E501
|
|
2340
|
+
|
|
2341
|
+
_param = self._run_organization_retention_now_serialize(
|
|
2342
|
+
organization_id=organization_id,
|
|
2343
|
+
_request_auth=_request_auth,
|
|
2344
|
+
_content_type=_content_type,
|
|
2345
|
+
_headers=_headers,
|
|
2346
|
+
_host_index=_host_index
|
|
2347
|
+
)
|
|
2348
|
+
|
|
2349
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2350
|
+
'200': "RetentionSweepResult",
|
|
2351
|
+
'422': "HTTPValidationError",
|
|
2352
|
+
}
|
|
2353
|
+
response_data = self.api_client.call_api(
|
|
2354
|
+
*_param,
|
|
2355
|
+
_request_timeout=_request_timeout
|
|
2356
|
+
)
|
|
2357
|
+
response_data.read()
|
|
2358
|
+
return self.api_client.response_deserialize(
|
|
2359
|
+
response_data=response_data,
|
|
2360
|
+
response_types_map=_response_types_map,
|
|
2361
|
+
)
|
|
2362
|
+
|
|
2363
|
+
|
|
2364
|
+
@validate_call
|
|
2365
|
+
def run_organization_retention_now_without_preload_content(
|
|
2366
|
+
self,
|
|
2367
|
+
organization_id: StrictInt,
|
|
2368
|
+
_request_timeout: Union[
|
|
2369
|
+
None,
|
|
2370
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2371
|
+
Tuple[
|
|
2372
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2373
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2374
|
+
]
|
|
2375
|
+
] = None,
|
|
2376
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2377
|
+
_content_type: Optional[StrictStr] = None,
|
|
2378
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2379
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2380
|
+
) -> RESTResponseType:
|
|
2381
|
+
"""Run Organization Retention Now
|
|
2382
|
+
|
|
2383
|
+
Immediately apply this organisation's retention policy (org admin).
|
|
2384
|
+
|
|
2385
|
+
:param organization_id: (required)
|
|
2386
|
+
:type organization_id: int
|
|
2387
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2388
|
+
number provided, it will be total request
|
|
2389
|
+
timeout. It can also be a pair (tuple) of
|
|
2390
|
+
(connection, read) timeouts.
|
|
2391
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2392
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2393
|
+
request; this effectively ignores the
|
|
2394
|
+
authentication in the spec for a single request.
|
|
2395
|
+
:type _request_auth: dict, optional
|
|
2396
|
+
:param _content_type: force content-type for the request.
|
|
2397
|
+
:type _content_type: str, Optional
|
|
2398
|
+
:param _headers: set to override the headers for a single
|
|
2399
|
+
request; this effectively ignores the headers
|
|
2400
|
+
in the spec for a single request.
|
|
2401
|
+
:type _headers: dict, optional
|
|
2402
|
+
:param _host_index: set to override the host_index for a single
|
|
2403
|
+
request; this effectively ignores the host_index
|
|
2404
|
+
in the spec for a single request.
|
|
2405
|
+
:type _host_index: int, optional
|
|
2406
|
+
:return: Returns the result object.
|
|
2407
|
+
""" # noqa: E501
|
|
2408
|
+
|
|
2409
|
+
_param = self._run_organization_retention_now_serialize(
|
|
2410
|
+
organization_id=organization_id,
|
|
2411
|
+
_request_auth=_request_auth,
|
|
2412
|
+
_content_type=_content_type,
|
|
2413
|
+
_headers=_headers,
|
|
2414
|
+
_host_index=_host_index
|
|
2415
|
+
)
|
|
2416
|
+
|
|
2417
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2418
|
+
'200': "RetentionSweepResult",
|
|
2419
|
+
'422': "HTTPValidationError",
|
|
2420
|
+
}
|
|
2421
|
+
response_data = self.api_client.call_api(
|
|
2422
|
+
*_param,
|
|
2423
|
+
_request_timeout=_request_timeout
|
|
2424
|
+
)
|
|
2425
|
+
return response_data.response
|
|
2426
|
+
|
|
2427
|
+
|
|
2428
|
+
def _run_organization_retention_now_serialize(
|
|
2429
|
+
self,
|
|
2430
|
+
organization_id,
|
|
2431
|
+
_request_auth,
|
|
2432
|
+
_content_type,
|
|
2433
|
+
_headers,
|
|
2434
|
+
_host_index,
|
|
2435
|
+
) -> RequestSerialized:
|
|
2436
|
+
|
|
2437
|
+
_host = None
|
|
2438
|
+
|
|
2439
|
+
_collection_formats: Dict[str, str] = {
|
|
2440
|
+
}
|
|
2441
|
+
|
|
2442
|
+
_path_params: Dict[str, str] = {}
|
|
2443
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2444
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2445
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2446
|
+
_files: Dict[
|
|
2447
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2448
|
+
] = {}
|
|
2449
|
+
_body_params: Optional[bytes] = None
|
|
2450
|
+
|
|
2451
|
+
# process the path parameters
|
|
2452
|
+
# process the query parameters
|
|
2453
|
+
if organization_id is not None:
|
|
2454
|
+
|
|
2455
|
+
_query_params.append(('organizationId', organization_id))
|
|
2456
|
+
|
|
2457
|
+
# process the header parameters
|
|
2458
|
+
# process the form parameters
|
|
2459
|
+
# process the body parameter
|
|
2460
|
+
|
|
2461
|
+
|
|
2462
|
+
# set the HTTP header `Accept`
|
|
2463
|
+
if 'Accept' not in _header_params:
|
|
2464
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2465
|
+
[
|
|
2466
|
+
'application/json'
|
|
2467
|
+
]
|
|
2468
|
+
)
|
|
2469
|
+
|
|
2470
|
+
|
|
2471
|
+
# authentication setting
|
|
2472
|
+
_auth_settings: List[str] = [
|
|
2473
|
+
'QAnswer-Api-Key',
|
|
2474
|
+
'Bearer token'
|
|
2475
|
+
]
|
|
2476
|
+
|
|
2477
|
+
return self.api_client.param_serialize(
|
|
2478
|
+
method='POST',
|
|
2479
|
+
resource_path='/api/retention-policy/organization/run-now',
|
|
2480
|
+
path_params=_path_params,
|
|
2481
|
+
query_params=_query_params,
|
|
2482
|
+
header_params=_header_params,
|
|
2483
|
+
body=_body_params,
|
|
2484
|
+
post_params=_form_params,
|
|
2485
|
+
files=_files,
|
|
2486
|
+
auth_settings=_auth_settings,
|
|
2487
|
+
collection_formats=_collection_formats,
|
|
2488
|
+
_host=_host,
|
|
2489
|
+
_request_auth=_request_auth
|
|
2490
|
+
)
|
|
2491
|
+
|
|
2492
|
+
|
|
2493
|
+
|
|
2494
|
+
|
|
2495
|
+
@validate_call
|
|
2496
|
+
def run_retention_sweep_now(
|
|
2497
|
+
self,
|
|
2498
|
+
_request_timeout: Union[
|
|
2499
|
+
None,
|
|
2500
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2501
|
+
Tuple[
|
|
2502
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2503
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2504
|
+
]
|
|
2505
|
+
] = None,
|
|
2506
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2507
|
+
_content_type: Optional[StrictStr] = None,
|
|
2508
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2509
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2510
|
+
) -> RetentionSweepResult:
|
|
2511
|
+
"""Run Retention Sweep Now
|
|
2512
|
+
|
|
2513
|
+
Run the full retention sweep now, synchronously (system admin only). Runs in-request rather than via Celery so it works without a broker/worker and actually performs the deletion immediately, returning the deleted count. The scheduled daily sweep still runs through Celery beat.
|
|
2514
|
+
|
|
2515
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2516
|
+
number provided, it will be total request
|
|
2517
|
+
timeout. It can also be a pair (tuple) of
|
|
2518
|
+
(connection, read) timeouts.
|
|
2519
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2520
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2521
|
+
request; this effectively ignores the
|
|
2522
|
+
authentication in the spec for a single request.
|
|
2523
|
+
:type _request_auth: dict, optional
|
|
2524
|
+
:param _content_type: force content-type for the request.
|
|
2525
|
+
:type _content_type: str, Optional
|
|
2526
|
+
:param _headers: set to override the headers for a single
|
|
2527
|
+
request; this effectively ignores the headers
|
|
2528
|
+
in the spec for a single request.
|
|
2529
|
+
:type _headers: dict, optional
|
|
2530
|
+
:param _host_index: set to override the host_index for a single
|
|
2531
|
+
request; this effectively ignores the host_index
|
|
2532
|
+
in the spec for a single request.
|
|
2533
|
+
:type _host_index: int, optional
|
|
2534
|
+
:return: Returns the result object.
|
|
2535
|
+
""" # noqa: E501
|
|
2536
|
+
|
|
2537
|
+
_param = self._run_retention_sweep_now_serialize(
|
|
2538
|
+
_request_auth=_request_auth,
|
|
2539
|
+
_content_type=_content_type,
|
|
2540
|
+
_headers=_headers,
|
|
2541
|
+
_host_index=_host_index
|
|
2542
|
+
)
|
|
2543
|
+
|
|
2544
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2545
|
+
'200': "RetentionSweepResult",
|
|
2546
|
+
}
|
|
2547
|
+
response_data = self.api_client.call_api(
|
|
2548
|
+
*_param,
|
|
2549
|
+
_request_timeout=_request_timeout
|
|
2550
|
+
)
|
|
2551
|
+
response_data.read()
|
|
2552
|
+
return self.api_client.response_deserialize(
|
|
2553
|
+
response_data=response_data,
|
|
2554
|
+
response_types_map=_response_types_map,
|
|
2555
|
+
).data
|
|
2556
|
+
|
|
2557
|
+
|
|
2558
|
+
@validate_call
|
|
2559
|
+
def run_retention_sweep_now_with_http_info(
|
|
2560
|
+
self,
|
|
2561
|
+
_request_timeout: Union[
|
|
2562
|
+
None,
|
|
2563
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2564
|
+
Tuple[
|
|
2565
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2566
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2567
|
+
]
|
|
2568
|
+
] = None,
|
|
2569
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2570
|
+
_content_type: Optional[StrictStr] = None,
|
|
2571
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2572
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2573
|
+
) -> ApiResponse[RetentionSweepResult]:
|
|
2574
|
+
"""Run Retention Sweep Now
|
|
2575
|
+
|
|
2576
|
+
Run the full retention sweep now, synchronously (system admin only). Runs in-request rather than via Celery so it works without a broker/worker and actually performs the deletion immediately, returning the deleted count. The scheduled daily sweep still runs through Celery beat.
|
|
2577
|
+
|
|
2578
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2579
|
+
number provided, it will be total request
|
|
2580
|
+
timeout. It can also be a pair (tuple) of
|
|
2581
|
+
(connection, read) timeouts.
|
|
2582
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2583
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2584
|
+
request; this effectively ignores the
|
|
2585
|
+
authentication in the spec for a single request.
|
|
2586
|
+
:type _request_auth: dict, optional
|
|
2587
|
+
:param _content_type: force content-type for the request.
|
|
2588
|
+
:type _content_type: str, Optional
|
|
2589
|
+
:param _headers: set to override the headers for a single
|
|
2590
|
+
request; this effectively ignores the headers
|
|
2591
|
+
in the spec for a single request.
|
|
2592
|
+
:type _headers: dict, optional
|
|
2593
|
+
:param _host_index: set to override the host_index for a single
|
|
2594
|
+
request; this effectively ignores the host_index
|
|
2595
|
+
in the spec for a single request.
|
|
2596
|
+
:type _host_index: int, optional
|
|
2597
|
+
:return: Returns the result object.
|
|
2598
|
+
""" # noqa: E501
|
|
2599
|
+
|
|
2600
|
+
_param = self._run_retention_sweep_now_serialize(
|
|
2601
|
+
_request_auth=_request_auth,
|
|
2602
|
+
_content_type=_content_type,
|
|
2603
|
+
_headers=_headers,
|
|
2604
|
+
_host_index=_host_index
|
|
2605
|
+
)
|
|
2606
|
+
|
|
2607
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2608
|
+
'200': "RetentionSweepResult",
|
|
2609
|
+
}
|
|
2610
|
+
response_data = self.api_client.call_api(
|
|
2611
|
+
*_param,
|
|
2612
|
+
_request_timeout=_request_timeout
|
|
2613
|
+
)
|
|
2614
|
+
response_data.read()
|
|
2615
|
+
return self.api_client.response_deserialize(
|
|
2616
|
+
response_data=response_data,
|
|
2617
|
+
response_types_map=_response_types_map,
|
|
2618
|
+
)
|
|
2619
|
+
|
|
2620
|
+
|
|
2621
|
+
@validate_call
|
|
2622
|
+
def run_retention_sweep_now_without_preload_content(
|
|
2623
|
+
self,
|
|
2624
|
+
_request_timeout: Union[
|
|
2625
|
+
None,
|
|
2626
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2627
|
+
Tuple[
|
|
2628
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2629
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2630
|
+
]
|
|
2631
|
+
] = None,
|
|
2632
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2633
|
+
_content_type: Optional[StrictStr] = None,
|
|
2634
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2635
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2636
|
+
) -> RESTResponseType:
|
|
2637
|
+
"""Run Retention Sweep Now
|
|
2638
|
+
|
|
2639
|
+
Run the full retention sweep now, synchronously (system admin only). Runs in-request rather than via Celery so it works without a broker/worker and actually performs the deletion immediately, returning the deleted count. The scheduled daily sweep still runs through Celery beat.
|
|
2640
|
+
|
|
2641
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2642
|
+
number provided, it will be total request
|
|
2643
|
+
timeout. It can also be a pair (tuple) of
|
|
2644
|
+
(connection, read) timeouts.
|
|
2645
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2646
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2647
|
+
request; this effectively ignores the
|
|
2648
|
+
authentication in the spec for a single request.
|
|
2649
|
+
:type _request_auth: dict, optional
|
|
2650
|
+
:param _content_type: force content-type for the request.
|
|
2651
|
+
:type _content_type: str, Optional
|
|
2652
|
+
:param _headers: set to override the headers for a single
|
|
2653
|
+
request; this effectively ignores the headers
|
|
2654
|
+
in the spec for a single request.
|
|
2655
|
+
:type _headers: dict, optional
|
|
2656
|
+
:param _host_index: set to override the host_index for a single
|
|
2657
|
+
request; this effectively ignores the host_index
|
|
2658
|
+
in the spec for a single request.
|
|
2659
|
+
:type _host_index: int, optional
|
|
2660
|
+
:return: Returns the result object.
|
|
2661
|
+
""" # noqa: E501
|
|
2662
|
+
|
|
2663
|
+
_param = self._run_retention_sweep_now_serialize(
|
|
2664
|
+
_request_auth=_request_auth,
|
|
2665
|
+
_content_type=_content_type,
|
|
2666
|
+
_headers=_headers,
|
|
2667
|
+
_host_index=_host_index
|
|
2668
|
+
)
|
|
2669
|
+
|
|
2670
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2671
|
+
'200': "RetentionSweepResult",
|
|
2672
|
+
}
|
|
2673
|
+
response_data = self.api_client.call_api(
|
|
2674
|
+
*_param,
|
|
2675
|
+
_request_timeout=_request_timeout
|
|
2676
|
+
)
|
|
2677
|
+
return response_data.response
|
|
2678
|
+
|
|
2679
|
+
|
|
2680
|
+
def _run_retention_sweep_now_serialize(
|
|
2681
|
+
self,
|
|
2682
|
+
_request_auth,
|
|
2683
|
+
_content_type,
|
|
2684
|
+
_headers,
|
|
2685
|
+
_host_index,
|
|
2686
|
+
) -> RequestSerialized:
|
|
2687
|
+
|
|
2688
|
+
_host = None
|
|
2689
|
+
|
|
2690
|
+
_collection_formats: Dict[str, str] = {
|
|
2691
|
+
}
|
|
2692
|
+
|
|
2693
|
+
_path_params: Dict[str, str] = {}
|
|
2694
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2695
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2696
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2697
|
+
_files: Dict[
|
|
2698
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2699
|
+
] = {}
|
|
2700
|
+
_body_params: Optional[bytes] = None
|
|
2701
|
+
|
|
2702
|
+
# process the path parameters
|
|
2703
|
+
# process the query parameters
|
|
2704
|
+
# process the header parameters
|
|
2705
|
+
# process the form parameters
|
|
2706
|
+
# process the body parameter
|
|
2707
|
+
|
|
2708
|
+
|
|
2709
|
+
# set the HTTP header `Accept`
|
|
2710
|
+
if 'Accept' not in _header_params:
|
|
2711
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2712
|
+
[
|
|
2713
|
+
'application/json'
|
|
2714
|
+
]
|
|
2715
|
+
)
|
|
2716
|
+
|
|
2717
|
+
|
|
2718
|
+
# authentication setting
|
|
2719
|
+
_auth_settings: List[str] = [
|
|
2720
|
+
'QAnswer-Api-Key',
|
|
2721
|
+
'Bearer token'
|
|
2722
|
+
]
|
|
2723
|
+
|
|
2724
|
+
return self.api_client.param_serialize(
|
|
2725
|
+
method='POST',
|
|
2726
|
+
resource_path='/api/retention-policy/run-now',
|
|
2727
|
+
path_params=_path_params,
|
|
2728
|
+
query_params=_query_params,
|
|
2729
|
+
header_params=_header_params,
|
|
2730
|
+
body=_body_params,
|
|
2731
|
+
post_params=_form_params,
|
|
2732
|
+
files=_files,
|
|
2733
|
+
auth_settings=_auth_settings,
|
|
2734
|
+
collection_formats=_collection_formats,
|
|
2735
|
+
_host=_host,
|
|
2736
|
+
_request_auth=_request_auth
|
|
2737
|
+
)
|
|
2738
|
+
|
|
2739
|
+
|
|
2740
|
+
|
|
2741
|
+
|
|
2742
|
+
@validate_call
|
|
2743
|
+
def set_assistant_policy(
|
|
2744
|
+
self,
|
|
2745
|
+
username: StrictStr,
|
|
2746
|
+
dataset: StrictStr,
|
|
2747
|
+
retention_policy_update: RetentionPolicyUpdate,
|
|
2748
|
+
_request_timeout: Union[
|
|
2749
|
+
None,
|
|
2750
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2751
|
+
Tuple[
|
|
2752
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2753
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2754
|
+
]
|
|
2755
|
+
] = None,
|
|
2756
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2757
|
+
_content_type: Optional[StrictStr] = None,
|
|
2758
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2759
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2760
|
+
) -> RetentionPolicyDto:
|
|
2761
|
+
"""Set Assistant Policy
|
|
2762
|
+
|
|
2763
|
+
|
|
2764
|
+
:param username: (required)
|
|
2765
|
+
:type username: str
|
|
2766
|
+
:param dataset: (required)
|
|
2767
|
+
:type dataset: str
|
|
2768
|
+
:param retention_policy_update: (required)
|
|
2769
|
+
:type retention_policy_update: RetentionPolicyUpdate
|
|
2770
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2771
|
+
number provided, it will be total request
|
|
2772
|
+
timeout. It can also be a pair (tuple) of
|
|
2773
|
+
(connection, read) timeouts.
|
|
2774
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2775
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2776
|
+
request; this effectively ignores the
|
|
2777
|
+
authentication in the spec for a single request.
|
|
2778
|
+
:type _request_auth: dict, optional
|
|
2779
|
+
:param _content_type: force content-type for the request.
|
|
2780
|
+
:type _content_type: str, Optional
|
|
2781
|
+
:param _headers: set to override the headers for a single
|
|
2782
|
+
request; this effectively ignores the headers
|
|
2783
|
+
in the spec for a single request.
|
|
2784
|
+
:type _headers: dict, optional
|
|
2785
|
+
:param _host_index: set to override the host_index for a single
|
|
2786
|
+
request; this effectively ignores the host_index
|
|
2787
|
+
in the spec for a single request.
|
|
2788
|
+
:type _host_index: int, optional
|
|
2789
|
+
:return: Returns the result object.
|
|
2790
|
+
""" # noqa: E501
|
|
2791
|
+
|
|
2792
|
+
_param = self._set_assistant_policy_serialize(
|
|
2793
|
+
username=username,
|
|
2794
|
+
dataset=dataset,
|
|
2795
|
+
retention_policy_update=retention_policy_update,
|
|
2796
|
+
_request_auth=_request_auth,
|
|
2797
|
+
_content_type=_content_type,
|
|
2798
|
+
_headers=_headers,
|
|
2799
|
+
_host_index=_host_index
|
|
2800
|
+
)
|
|
2801
|
+
|
|
2802
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2803
|
+
'200': "RetentionPolicyDto",
|
|
2804
|
+
'422': "HTTPValidationError",
|
|
2805
|
+
}
|
|
2806
|
+
response_data = self.api_client.call_api(
|
|
2807
|
+
*_param,
|
|
2808
|
+
_request_timeout=_request_timeout
|
|
2809
|
+
)
|
|
2810
|
+
response_data.read()
|
|
2811
|
+
return self.api_client.response_deserialize(
|
|
2812
|
+
response_data=response_data,
|
|
2813
|
+
response_types_map=_response_types_map,
|
|
2814
|
+
).data
|
|
2815
|
+
|
|
2816
|
+
|
|
2817
|
+
@validate_call
|
|
2818
|
+
def set_assistant_policy_with_http_info(
|
|
2819
|
+
self,
|
|
2820
|
+
username: StrictStr,
|
|
2821
|
+
dataset: StrictStr,
|
|
2822
|
+
retention_policy_update: RetentionPolicyUpdate,
|
|
2823
|
+
_request_timeout: Union[
|
|
2824
|
+
None,
|
|
2825
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2826
|
+
Tuple[
|
|
2827
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2828
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2829
|
+
]
|
|
2830
|
+
] = None,
|
|
2831
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2832
|
+
_content_type: Optional[StrictStr] = None,
|
|
2833
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2834
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2835
|
+
) -> ApiResponse[RetentionPolicyDto]:
|
|
2836
|
+
"""Set Assistant Policy
|
|
2837
|
+
|
|
2838
|
+
|
|
2839
|
+
:param username: (required)
|
|
2840
|
+
:type username: str
|
|
2841
|
+
:param dataset: (required)
|
|
2842
|
+
:type dataset: str
|
|
2843
|
+
:param retention_policy_update: (required)
|
|
2844
|
+
:type retention_policy_update: RetentionPolicyUpdate
|
|
2845
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2846
|
+
number provided, it will be total request
|
|
2847
|
+
timeout. It can also be a pair (tuple) of
|
|
2848
|
+
(connection, read) timeouts.
|
|
2849
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2850
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2851
|
+
request; this effectively ignores the
|
|
2852
|
+
authentication in the spec for a single request.
|
|
2853
|
+
:type _request_auth: dict, optional
|
|
2854
|
+
:param _content_type: force content-type for the request.
|
|
2855
|
+
:type _content_type: str, Optional
|
|
2856
|
+
:param _headers: set to override the headers for a single
|
|
2857
|
+
request; this effectively ignores the headers
|
|
2858
|
+
in the spec for a single request.
|
|
2859
|
+
:type _headers: dict, optional
|
|
2860
|
+
:param _host_index: set to override the host_index for a single
|
|
2861
|
+
request; this effectively ignores the host_index
|
|
2862
|
+
in the spec for a single request.
|
|
2863
|
+
:type _host_index: int, optional
|
|
2864
|
+
:return: Returns the result object.
|
|
2865
|
+
""" # noqa: E501
|
|
2866
|
+
|
|
2867
|
+
_param = self._set_assistant_policy_serialize(
|
|
2868
|
+
username=username,
|
|
2869
|
+
dataset=dataset,
|
|
2870
|
+
retention_policy_update=retention_policy_update,
|
|
2871
|
+
_request_auth=_request_auth,
|
|
2872
|
+
_content_type=_content_type,
|
|
2873
|
+
_headers=_headers,
|
|
2874
|
+
_host_index=_host_index
|
|
2875
|
+
)
|
|
2876
|
+
|
|
2877
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2878
|
+
'200': "RetentionPolicyDto",
|
|
2879
|
+
'422': "HTTPValidationError",
|
|
2880
|
+
}
|
|
2881
|
+
response_data = self.api_client.call_api(
|
|
2882
|
+
*_param,
|
|
2883
|
+
_request_timeout=_request_timeout
|
|
2884
|
+
)
|
|
2885
|
+
response_data.read()
|
|
2886
|
+
return self.api_client.response_deserialize(
|
|
2887
|
+
response_data=response_data,
|
|
2888
|
+
response_types_map=_response_types_map,
|
|
2889
|
+
)
|
|
2890
|
+
|
|
2891
|
+
|
|
2892
|
+
@validate_call
|
|
2893
|
+
def set_assistant_policy_without_preload_content(
|
|
2894
|
+
self,
|
|
2895
|
+
username: StrictStr,
|
|
2896
|
+
dataset: StrictStr,
|
|
2897
|
+
retention_policy_update: RetentionPolicyUpdate,
|
|
2898
|
+
_request_timeout: Union[
|
|
2899
|
+
None,
|
|
2900
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2901
|
+
Tuple[
|
|
2902
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2903
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2904
|
+
]
|
|
2905
|
+
] = None,
|
|
2906
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2907
|
+
_content_type: Optional[StrictStr] = None,
|
|
2908
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2909
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2910
|
+
) -> RESTResponseType:
|
|
2911
|
+
"""Set Assistant Policy
|
|
2912
|
+
|
|
2913
|
+
|
|
2914
|
+
:param username: (required)
|
|
2915
|
+
:type username: str
|
|
2916
|
+
:param dataset: (required)
|
|
2917
|
+
:type dataset: str
|
|
2918
|
+
:param retention_policy_update: (required)
|
|
2919
|
+
:type retention_policy_update: RetentionPolicyUpdate
|
|
2920
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2921
|
+
number provided, it will be total request
|
|
2922
|
+
timeout. It can also be a pair (tuple) of
|
|
2923
|
+
(connection, read) timeouts.
|
|
2924
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2925
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2926
|
+
request; this effectively ignores the
|
|
2927
|
+
authentication in the spec for a single request.
|
|
2928
|
+
:type _request_auth: dict, optional
|
|
2929
|
+
:param _content_type: force content-type for the request.
|
|
2930
|
+
:type _content_type: str, Optional
|
|
2931
|
+
:param _headers: set to override the headers for a single
|
|
2932
|
+
request; this effectively ignores the headers
|
|
2933
|
+
in the spec for a single request.
|
|
2934
|
+
:type _headers: dict, optional
|
|
2935
|
+
:param _host_index: set to override the host_index for a single
|
|
2936
|
+
request; this effectively ignores the host_index
|
|
2937
|
+
in the spec for a single request.
|
|
2938
|
+
:type _host_index: int, optional
|
|
2939
|
+
:return: Returns the result object.
|
|
2940
|
+
""" # noqa: E501
|
|
2941
|
+
|
|
2942
|
+
_param = self._set_assistant_policy_serialize(
|
|
2943
|
+
username=username,
|
|
2944
|
+
dataset=dataset,
|
|
2945
|
+
retention_policy_update=retention_policy_update,
|
|
2946
|
+
_request_auth=_request_auth,
|
|
2947
|
+
_content_type=_content_type,
|
|
2948
|
+
_headers=_headers,
|
|
2949
|
+
_host_index=_host_index
|
|
2950
|
+
)
|
|
2951
|
+
|
|
2952
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2953
|
+
'200': "RetentionPolicyDto",
|
|
2954
|
+
'422': "HTTPValidationError",
|
|
2955
|
+
}
|
|
2956
|
+
response_data = self.api_client.call_api(
|
|
2957
|
+
*_param,
|
|
2958
|
+
_request_timeout=_request_timeout
|
|
2959
|
+
)
|
|
2960
|
+
return response_data.response
|
|
2961
|
+
|
|
2962
|
+
|
|
2963
|
+
def _set_assistant_policy_serialize(
|
|
2964
|
+
self,
|
|
2965
|
+
username,
|
|
2966
|
+
dataset,
|
|
2967
|
+
retention_policy_update,
|
|
2968
|
+
_request_auth,
|
|
2969
|
+
_content_type,
|
|
2970
|
+
_headers,
|
|
2971
|
+
_host_index,
|
|
2972
|
+
) -> RequestSerialized:
|
|
2973
|
+
|
|
2974
|
+
_host = None
|
|
2975
|
+
|
|
2976
|
+
_collection_formats: Dict[str, str] = {
|
|
2977
|
+
}
|
|
2978
|
+
|
|
2979
|
+
_path_params: Dict[str, str] = {}
|
|
2980
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2981
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2982
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2983
|
+
_files: Dict[
|
|
2984
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2985
|
+
] = {}
|
|
2986
|
+
_body_params: Optional[bytes] = None
|
|
2987
|
+
|
|
2988
|
+
# process the path parameters
|
|
2989
|
+
# process the query parameters
|
|
2990
|
+
if username is not None:
|
|
2991
|
+
|
|
2992
|
+
_query_params.append(('username', username))
|
|
2993
|
+
|
|
2994
|
+
if dataset is not None:
|
|
2995
|
+
|
|
2996
|
+
_query_params.append(('dataset', dataset))
|
|
2997
|
+
|
|
2998
|
+
# process the header parameters
|
|
2999
|
+
# process the form parameters
|
|
3000
|
+
# process the body parameter
|
|
3001
|
+
if retention_policy_update is not None:
|
|
3002
|
+
_body_params = retention_policy_update
|
|
3003
|
+
|
|
3004
|
+
|
|
3005
|
+
# set the HTTP header `Accept`
|
|
3006
|
+
if 'Accept' not in _header_params:
|
|
3007
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3008
|
+
[
|
|
3009
|
+
'application/json'
|
|
3010
|
+
]
|
|
3011
|
+
)
|
|
3012
|
+
|
|
3013
|
+
# set the HTTP header `Content-Type`
|
|
3014
|
+
if _content_type:
|
|
3015
|
+
_header_params['Content-Type'] = _content_type
|
|
3016
|
+
else:
|
|
3017
|
+
_default_content_type = (
|
|
3018
|
+
self.api_client.select_header_content_type(
|
|
3019
|
+
[
|
|
3020
|
+
'application/json'
|
|
3021
|
+
]
|
|
3022
|
+
)
|
|
3023
|
+
)
|
|
3024
|
+
if _default_content_type is not None:
|
|
3025
|
+
_header_params['Content-Type'] = _default_content_type
|
|
3026
|
+
|
|
3027
|
+
# authentication setting
|
|
3028
|
+
_auth_settings: List[str] = [
|
|
3029
|
+
'QAnswer-Api-Key',
|
|
3030
|
+
'Bearer token'
|
|
3031
|
+
]
|
|
3032
|
+
|
|
3033
|
+
return self.api_client.param_serialize(
|
|
3034
|
+
method='PUT',
|
|
3035
|
+
resource_path='/api/retention-policy/assistant',
|
|
3036
|
+
path_params=_path_params,
|
|
3037
|
+
query_params=_query_params,
|
|
3038
|
+
header_params=_header_params,
|
|
3039
|
+
body=_body_params,
|
|
3040
|
+
post_params=_form_params,
|
|
3041
|
+
files=_files,
|
|
3042
|
+
auth_settings=_auth_settings,
|
|
3043
|
+
collection_formats=_collection_formats,
|
|
3044
|
+
_host=_host,
|
|
3045
|
+
_request_auth=_request_auth
|
|
3046
|
+
)
|
|
3047
|
+
|
|
3048
|
+
|
|
3049
|
+
|
|
3050
|
+
|
|
3051
|
+
@validate_call
|
|
3052
|
+
def set_organization_policy(
|
|
3053
|
+
self,
|
|
3054
|
+
organization_id: StrictInt,
|
|
3055
|
+
retention_policy_update: RetentionPolicyUpdate,
|
|
3056
|
+
_request_timeout: Union[
|
|
3057
|
+
None,
|
|
3058
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3059
|
+
Tuple[
|
|
3060
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3061
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3062
|
+
]
|
|
3063
|
+
] = None,
|
|
3064
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3065
|
+
_content_type: Optional[StrictStr] = None,
|
|
3066
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3067
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3068
|
+
) -> RetentionPolicyDto:
|
|
3069
|
+
"""Set Organization Policy
|
|
3070
|
+
|
|
3071
|
+
|
|
3072
|
+
:param organization_id: (required)
|
|
3073
|
+
:type organization_id: int
|
|
3074
|
+
:param retention_policy_update: (required)
|
|
3075
|
+
:type retention_policy_update: RetentionPolicyUpdate
|
|
3076
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3077
|
+
number provided, it will be total request
|
|
3078
|
+
timeout. It can also be a pair (tuple) of
|
|
3079
|
+
(connection, read) timeouts.
|
|
3080
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3081
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3082
|
+
request; this effectively ignores the
|
|
3083
|
+
authentication in the spec for a single request.
|
|
3084
|
+
:type _request_auth: dict, optional
|
|
3085
|
+
:param _content_type: force content-type for the request.
|
|
3086
|
+
:type _content_type: str, Optional
|
|
3087
|
+
:param _headers: set to override the headers for a single
|
|
3088
|
+
request; this effectively ignores the headers
|
|
3089
|
+
in the spec for a single request.
|
|
3090
|
+
:type _headers: dict, optional
|
|
3091
|
+
:param _host_index: set to override the host_index for a single
|
|
3092
|
+
request; this effectively ignores the host_index
|
|
3093
|
+
in the spec for a single request.
|
|
3094
|
+
:type _host_index: int, optional
|
|
3095
|
+
:return: Returns the result object.
|
|
3096
|
+
""" # noqa: E501
|
|
3097
|
+
|
|
3098
|
+
_param = self._set_organization_policy_serialize(
|
|
3099
|
+
organization_id=organization_id,
|
|
3100
|
+
retention_policy_update=retention_policy_update,
|
|
3101
|
+
_request_auth=_request_auth,
|
|
3102
|
+
_content_type=_content_type,
|
|
3103
|
+
_headers=_headers,
|
|
3104
|
+
_host_index=_host_index
|
|
3105
|
+
)
|
|
3106
|
+
|
|
3107
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3108
|
+
'200': "RetentionPolicyDto",
|
|
3109
|
+
'422': "HTTPValidationError",
|
|
3110
|
+
}
|
|
3111
|
+
response_data = self.api_client.call_api(
|
|
3112
|
+
*_param,
|
|
3113
|
+
_request_timeout=_request_timeout
|
|
3114
|
+
)
|
|
3115
|
+
response_data.read()
|
|
3116
|
+
return self.api_client.response_deserialize(
|
|
3117
|
+
response_data=response_data,
|
|
3118
|
+
response_types_map=_response_types_map,
|
|
3119
|
+
).data
|
|
3120
|
+
|
|
3121
|
+
|
|
3122
|
+
@validate_call
|
|
3123
|
+
def set_organization_policy_with_http_info(
|
|
3124
|
+
self,
|
|
3125
|
+
organization_id: StrictInt,
|
|
3126
|
+
retention_policy_update: RetentionPolicyUpdate,
|
|
3127
|
+
_request_timeout: Union[
|
|
3128
|
+
None,
|
|
3129
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3130
|
+
Tuple[
|
|
3131
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3132
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3133
|
+
]
|
|
3134
|
+
] = None,
|
|
3135
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3136
|
+
_content_type: Optional[StrictStr] = None,
|
|
3137
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3138
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3139
|
+
) -> ApiResponse[RetentionPolicyDto]:
|
|
3140
|
+
"""Set Organization Policy
|
|
3141
|
+
|
|
3142
|
+
|
|
3143
|
+
:param organization_id: (required)
|
|
3144
|
+
:type organization_id: int
|
|
3145
|
+
:param retention_policy_update: (required)
|
|
3146
|
+
:type retention_policy_update: RetentionPolicyUpdate
|
|
3147
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3148
|
+
number provided, it will be total request
|
|
3149
|
+
timeout. It can also be a pair (tuple) of
|
|
3150
|
+
(connection, read) timeouts.
|
|
3151
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3152
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3153
|
+
request; this effectively ignores the
|
|
3154
|
+
authentication in the spec for a single request.
|
|
3155
|
+
:type _request_auth: dict, optional
|
|
3156
|
+
:param _content_type: force content-type for the request.
|
|
3157
|
+
:type _content_type: str, Optional
|
|
3158
|
+
:param _headers: set to override the headers for a single
|
|
3159
|
+
request; this effectively ignores the headers
|
|
3160
|
+
in the spec for a single request.
|
|
3161
|
+
:type _headers: dict, optional
|
|
3162
|
+
:param _host_index: set to override the host_index for a single
|
|
3163
|
+
request; this effectively ignores the host_index
|
|
3164
|
+
in the spec for a single request.
|
|
3165
|
+
:type _host_index: int, optional
|
|
3166
|
+
:return: Returns the result object.
|
|
3167
|
+
""" # noqa: E501
|
|
3168
|
+
|
|
3169
|
+
_param = self._set_organization_policy_serialize(
|
|
3170
|
+
organization_id=organization_id,
|
|
3171
|
+
retention_policy_update=retention_policy_update,
|
|
3172
|
+
_request_auth=_request_auth,
|
|
3173
|
+
_content_type=_content_type,
|
|
3174
|
+
_headers=_headers,
|
|
3175
|
+
_host_index=_host_index
|
|
3176
|
+
)
|
|
3177
|
+
|
|
3178
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3179
|
+
'200': "RetentionPolicyDto",
|
|
3180
|
+
'422': "HTTPValidationError",
|
|
3181
|
+
}
|
|
3182
|
+
response_data = self.api_client.call_api(
|
|
3183
|
+
*_param,
|
|
3184
|
+
_request_timeout=_request_timeout
|
|
3185
|
+
)
|
|
3186
|
+
response_data.read()
|
|
3187
|
+
return self.api_client.response_deserialize(
|
|
3188
|
+
response_data=response_data,
|
|
3189
|
+
response_types_map=_response_types_map,
|
|
3190
|
+
)
|
|
3191
|
+
|
|
3192
|
+
|
|
3193
|
+
@validate_call
|
|
3194
|
+
def set_organization_policy_without_preload_content(
|
|
3195
|
+
self,
|
|
3196
|
+
organization_id: StrictInt,
|
|
3197
|
+
retention_policy_update: RetentionPolicyUpdate,
|
|
3198
|
+
_request_timeout: Union[
|
|
3199
|
+
None,
|
|
3200
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3201
|
+
Tuple[
|
|
3202
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3203
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3204
|
+
]
|
|
3205
|
+
] = None,
|
|
3206
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3207
|
+
_content_type: Optional[StrictStr] = None,
|
|
3208
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3209
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3210
|
+
) -> RESTResponseType:
|
|
3211
|
+
"""Set Organization Policy
|
|
3212
|
+
|
|
3213
|
+
|
|
3214
|
+
:param organization_id: (required)
|
|
3215
|
+
:type organization_id: int
|
|
3216
|
+
:param retention_policy_update: (required)
|
|
3217
|
+
:type retention_policy_update: RetentionPolicyUpdate
|
|
3218
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3219
|
+
number provided, it will be total request
|
|
3220
|
+
timeout. It can also be a pair (tuple) of
|
|
3221
|
+
(connection, read) timeouts.
|
|
3222
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3223
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3224
|
+
request; this effectively ignores the
|
|
3225
|
+
authentication in the spec for a single request.
|
|
3226
|
+
:type _request_auth: dict, optional
|
|
3227
|
+
:param _content_type: force content-type for the request.
|
|
3228
|
+
:type _content_type: str, Optional
|
|
3229
|
+
:param _headers: set to override the headers for a single
|
|
3230
|
+
request; this effectively ignores the headers
|
|
3231
|
+
in the spec for a single request.
|
|
3232
|
+
:type _headers: dict, optional
|
|
3233
|
+
:param _host_index: set to override the host_index for a single
|
|
3234
|
+
request; this effectively ignores the host_index
|
|
3235
|
+
in the spec for a single request.
|
|
3236
|
+
:type _host_index: int, optional
|
|
3237
|
+
:return: Returns the result object.
|
|
3238
|
+
""" # noqa: E501
|
|
3239
|
+
|
|
3240
|
+
_param = self._set_organization_policy_serialize(
|
|
3241
|
+
organization_id=organization_id,
|
|
3242
|
+
retention_policy_update=retention_policy_update,
|
|
3243
|
+
_request_auth=_request_auth,
|
|
3244
|
+
_content_type=_content_type,
|
|
3245
|
+
_headers=_headers,
|
|
3246
|
+
_host_index=_host_index
|
|
3247
|
+
)
|
|
3248
|
+
|
|
3249
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3250
|
+
'200': "RetentionPolicyDto",
|
|
3251
|
+
'422': "HTTPValidationError",
|
|
3252
|
+
}
|
|
3253
|
+
response_data = self.api_client.call_api(
|
|
3254
|
+
*_param,
|
|
3255
|
+
_request_timeout=_request_timeout
|
|
3256
|
+
)
|
|
3257
|
+
return response_data.response
|
|
3258
|
+
|
|
3259
|
+
|
|
3260
|
+
def _set_organization_policy_serialize(
|
|
3261
|
+
self,
|
|
3262
|
+
organization_id,
|
|
3263
|
+
retention_policy_update,
|
|
3264
|
+
_request_auth,
|
|
3265
|
+
_content_type,
|
|
3266
|
+
_headers,
|
|
3267
|
+
_host_index,
|
|
3268
|
+
) -> RequestSerialized:
|
|
3269
|
+
|
|
3270
|
+
_host = None
|
|
3271
|
+
|
|
3272
|
+
_collection_formats: Dict[str, str] = {
|
|
3273
|
+
}
|
|
3274
|
+
|
|
3275
|
+
_path_params: Dict[str, str] = {}
|
|
3276
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3277
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3278
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3279
|
+
_files: Dict[
|
|
3280
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3281
|
+
] = {}
|
|
3282
|
+
_body_params: Optional[bytes] = None
|
|
3283
|
+
|
|
3284
|
+
# process the path parameters
|
|
3285
|
+
# process the query parameters
|
|
3286
|
+
if organization_id is not None:
|
|
3287
|
+
|
|
3288
|
+
_query_params.append(('organizationId', organization_id))
|
|
3289
|
+
|
|
3290
|
+
# process the header parameters
|
|
3291
|
+
# process the form parameters
|
|
3292
|
+
# process the body parameter
|
|
3293
|
+
if retention_policy_update is not None:
|
|
3294
|
+
_body_params = retention_policy_update
|
|
3295
|
+
|
|
3296
|
+
|
|
3297
|
+
# set the HTTP header `Accept`
|
|
3298
|
+
if 'Accept' not in _header_params:
|
|
3299
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3300
|
+
[
|
|
3301
|
+
'application/json'
|
|
3302
|
+
]
|
|
3303
|
+
)
|
|
3304
|
+
|
|
3305
|
+
# set the HTTP header `Content-Type`
|
|
3306
|
+
if _content_type:
|
|
3307
|
+
_header_params['Content-Type'] = _content_type
|
|
3308
|
+
else:
|
|
3309
|
+
_default_content_type = (
|
|
3310
|
+
self.api_client.select_header_content_type(
|
|
3311
|
+
[
|
|
3312
|
+
'application/json'
|
|
3313
|
+
]
|
|
3314
|
+
)
|
|
3315
|
+
)
|
|
3316
|
+
if _default_content_type is not None:
|
|
3317
|
+
_header_params['Content-Type'] = _default_content_type
|
|
3318
|
+
|
|
3319
|
+
# authentication setting
|
|
3320
|
+
_auth_settings: List[str] = [
|
|
3321
|
+
'QAnswer-Api-Key',
|
|
3322
|
+
'Bearer token'
|
|
3323
|
+
]
|
|
3324
|
+
|
|
3325
|
+
return self.api_client.param_serialize(
|
|
3326
|
+
method='PUT',
|
|
3327
|
+
resource_path='/api/retention-policy/organization',
|
|
3328
|
+
path_params=_path_params,
|
|
3329
|
+
query_params=_query_params,
|
|
3330
|
+
header_params=_header_params,
|
|
3331
|
+
body=_body_params,
|
|
3332
|
+
post_params=_form_params,
|
|
3333
|
+
files=_files,
|
|
3334
|
+
auth_settings=_auth_settings,
|
|
3335
|
+
collection_formats=_collection_formats,
|
|
3336
|
+
_host=_host,
|
|
3337
|
+
_request_auth=_request_auth
|
|
3338
|
+
)
|
|
3339
|
+
|
|
3340
|
+
|
|
3341
|
+
|
|
3342
|
+
|
|
3343
|
+
@validate_call
|
|
3344
|
+
def set_system_policy(
|
|
3345
|
+
self,
|
|
3346
|
+
retention_policy_update: RetentionPolicyUpdate,
|
|
3347
|
+
_request_timeout: Union[
|
|
3348
|
+
None,
|
|
3349
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3350
|
+
Tuple[
|
|
3351
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3352
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3353
|
+
]
|
|
3354
|
+
] = None,
|
|
3355
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3356
|
+
_content_type: Optional[StrictStr] = None,
|
|
3357
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3358
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3359
|
+
) -> RetentionPolicyDto:
|
|
3360
|
+
"""Set System Policy
|
|
3361
|
+
|
|
3362
|
+
|
|
3363
|
+
:param retention_policy_update: (required)
|
|
3364
|
+
:type retention_policy_update: RetentionPolicyUpdate
|
|
3365
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3366
|
+
number provided, it will be total request
|
|
3367
|
+
timeout. It can also be a pair (tuple) of
|
|
3368
|
+
(connection, read) timeouts.
|
|
3369
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3370
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3371
|
+
request; this effectively ignores the
|
|
3372
|
+
authentication in the spec for a single request.
|
|
3373
|
+
:type _request_auth: dict, optional
|
|
3374
|
+
:param _content_type: force content-type for the request.
|
|
3375
|
+
:type _content_type: str, Optional
|
|
3376
|
+
:param _headers: set to override the headers for a single
|
|
3377
|
+
request; this effectively ignores the headers
|
|
3378
|
+
in the spec for a single request.
|
|
3379
|
+
:type _headers: dict, optional
|
|
3380
|
+
:param _host_index: set to override the host_index for a single
|
|
3381
|
+
request; this effectively ignores the host_index
|
|
3382
|
+
in the spec for a single request.
|
|
3383
|
+
:type _host_index: int, optional
|
|
3384
|
+
:return: Returns the result object.
|
|
3385
|
+
""" # noqa: E501
|
|
3386
|
+
|
|
3387
|
+
_param = self._set_system_policy_serialize(
|
|
3388
|
+
retention_policy_update=retention_policy_update,
|
|
3389
|
+
_request_auth=_request_auth,
|
|
3390
|
+
_content_type=_content_type,
|
|
3391
|
+
_headers=_headers,
|
|
3392
|
+
_host_index=_host_index
|
|
3393
|
+
)
|
|
3394
|
+
|
|
3395
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3396
|
+
'200': "RetentionPolicyDto",
|
|
3397
|
+
'422': "HTTPValidationError",
|
|
3398
|
+
}
|
|
3399
|
+
response_data = self.api_client.call_api(
|
|
3400
|
+
*_param,
|
|
3401
|
+
_request_timeout=_request_timeout
|
|
3402
|
+
)
|
|
3403
|
+
response_data.read()
|
|
3404
|
+
return self.api_client.response_deserialize(
|
|
3405
|
+
response_data=response_data,
|
|
3406
|
+
response_types_map=_response_types_map,
|
|
3407
|
+
).data
|
|
3408
|
+
|
|
3409
|
+
|
|
3410
|
+
@validate_call
|
|
3411
|
+
def set_system_policy_with_http_info(
|
|
3412
|
+
self,
|
|
3413
|
+
retention_policy_update: RetentionPolicyUpdate,
|
|
3414
|
+
_request_timeout: Union[
|
|
3415
|
+
None,
|
|
3416
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3417
|
+
Tuple[
|
|
3418
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3419
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3420
|
+
]
|
|
3421
|
+
] = None,
|
|
3422
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3423
|
+
_content_type: Optional[StrictStr] = None,
|
|
3424
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3425
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3426
|
+
) -> ApiResponse[RetentionPolicyDto]:
|
|
3427
|
+
"""Set System Policy
|
|
3428
|
+
|
|
3429
|
+
|
|
3430
|
+
:param retention_policy_update: (required)
|
|
3431
|
+
:type retention_policy_update: RetentionPolicyUpdate
|
|
3432
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3433
|
+
number provided, it will be total request
|
|
3434
|
+
timeout. It can also be a pair (tuple) of
|
|
3435
|
+
(connection, read) timeouts.
|
|
3436
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3437
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3438
|
+
request; this effectively ignores the
|
|
3439
|
+
authentication in the spec for a single request.
|
|
3440
|
+
:type _request_auth: dict, optional
|
|
3441
|
+
:param _content_type: force content-type for the request.
|
|
3442
|
+
:type _content_type: str, Optional
|
|
3443
|
+
:param _headers: set to override the headers for a single
|
|
3444
|
+
request; this effectively ignores the headers
|
|
3445
|
+
in the spec for a single request.
|
|
3446
|
+
:type _headers: dict, optional
|
|
3447
|
+
:param _host_index: set to override the host_index for a single
|
|
3448
|
+
request; this effectively ignores the host_index
|
|
3449
|
+
in the spec for a single request.
|
|
3450
|
+
:type _host_index: int, optional
|
|
3451
|
+
:return: Returns the result object.
|
|
3452
|
+
""" # noqa: E501
|
|
3453
|
+
|
|
3454
|
+
_param = self._set_system_policy_serialize(
|
|
3455
|
+
retention_policy_update=retention_policy_update,
|
|
3456
|
+
_request_auth=_request_auth,
|
|
3457
|
+
_content_type=_content_type,
|
|
3458
|
+
_headers=_headers,
|
|
3459
|
+
_host_index=_host_index
|
|
3460
|
+
)
|
|
3461
|
+
|
|
3462
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3463
|
+
'200': "RetentionPolicyDto",
|
|
3464
|
+
'422': "HTTPValidationError",
|
|
3465
|
+
}
|
|
3466
|
+
response_data = self.api_client.call_api(
|
|
3467
|
+
*_param,
|
|
3468
|
+
_request_timeout=_request_timeout
|
|
3469
|
+
)
|
|
3470
|
+
response_data.read()
|
|
3471
|
+
return self.api_client.response_deserialize(
|
|
3472
|
+
response_data=response_data,
|
|
3473
|
+
response_types_map=_response_types_map,
|
|
3474
|
+
)
|
|
3475
|
+
|
|
3476
|
+
|
|
3477
|
+
@validate_call
|
|
3478
|
+
def set_system_policy_without_preload_content(
|
|
3479
|
+
self,
|
|
3480
|
+
retention_policy_update: RetentionPolicyUpdate,
|
|
3481
|
+
_request_timeout: Union[
|
|
3482
|
+
None,
|
|
3483
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3484
|
+
Tuple[
|
|
3485
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3486
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3487
|
+
]
|
|
3488
|
+
] = None,
|
|
3489
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3490
|
+
_content_type: Optional[StrictStr] = None,
|
|
3491
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3492
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3493
|
+
) -> RESTResponseType:
|
|
3494
|
+
"""Set System Policy
|
|
3495
|
+
|
|
3496
|
+
|
|
3497
|
+
:param retention_policy_update: (required)
|
|
3498
|
+
:type retention_policy_update: RetentionPolicyUpdate
|
|
3499
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3500
|
+
number provided, it will be total request
|
|
3501
|
+
timeout. It can also be a pair (tuple) of
|
|
3502
|
+
(connection, read) timeouts.
|
|
3503
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3504
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3505
|
+
request; this effectively ignores the
|
|
3506
|
+
authentication in the spec for a single request.
|
|
3507
|
+
:type _request_auth: dict, optional
|
|
3508
|
+
:param _content_type: force content-type for the request.
|
|
3509
|
+
:type _content_type: str, Optional
|
|
3510
|
+
:param _headers: set to override the headers for a single
|
|
3511
|
+
request; this effectively ignores the headers
|
|
3512
|
+
in the spec for a single request.
|
|
3513
|
+
:type _headers: dict, optional
|
|
3514
|
+
:param _host_index: set to override the host_index for a single
|
|
3515
|
+
request; this effectively ignores the host_index
|
|
3516
|
+
in the spec for a single request.
|
|
3517
|
+
:type _host_index: int, optional
|
|
3518
|
+
:return: Returns the result object.
|
|
3519
|
+
""" # noqa: E501
|
|
3520
|
+
|
|
3521
|
+
_param = self._set_system_policy_serialize(
|
|
3522
|
+
retention_policy_update=retention_policy_update,
|
|
3523
|
+
_request_auth=_request_auth,
|
|
3524
|
+
_content_type=_content_type,
|
|
3525
|
+
_headers=_headers,
|
|
3526
|
+
_host_index=_host_index
|
|
3527
|
+
)
|
|
3528
|
+
|
|
3529
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3530
|
+
'200': "RetentionPolicyDto",
|
|
3531
|
+
'422': "HTTPValidationError",
|
|
3532
|
+
}
|
|
3533
|
+
response_data = self.api_client.call_api(
|
|
3534
|
+
*_param,
|
|
3535
|
+
_request_timeout=_request_timeout
|
|
3536
|
+
)
|
|
3537
|
+
return response_data.response
|
|
3538
|
+
|
|
3539
|
+
|
|
3540
|
+
def _set_system_policy_serialize(
|
|
3541
|
+
self,
|
|
3542
|
+
retention_policy_update,
|
|
3543
|
+
_request_auth,
|
|
3544
|
+
_content_type,
|
|
3545
|
+
_headers,
|
|
3546
|
+
_host_index,
|
|
3547
|
+
) -> RequestSerialized:
|
|
3548
|
+
|
|
3549
|
+
_host = None
|
|
3550
|
+
|
|
3551
|
+
_collection_formats: Dict[str, str] = {
|
|
3552
|
+
}
|
|
3553
|
+
|
|
3554
|
+
_path_params: Dict[str, str] = {}
|
|
3555
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3556
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3557
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3558
|
+
_files: Dict[
|
|
3559
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3560
|
+
] = {}
|
|
3561
|
+
_body_params: Optional[bytes] = None
|
|
3562
|
+
|
|
3563
|
+
# process the path parameters
|
|
3564
|
+
# process the query parameters
|
|
3565
|
+
# process the header parameters
|
|
3566
|
+
# process the form parameters
|
|
3567
|
+
# process the body parameter
|
|
3568
|
+
if retention_policy_update is not None:
|
|
3569
|
+
_body_params = retention_policy_update
|
|
3570
|
+
|
|
3571
|
+
|
|
3572
|
+
# set the HTTP header `Accept`
|
|
3573
|
+
if 'Accept' not in _header_params:
|
|
3574
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3575
|
+
[
|
|
3576
|
+
'application/json'
|
|
3577
|
+
]
|
|
3578
|
+
)
|
|
3579
|
+
|
|
3580
|
+
# set the HTTP header `Content-Type`
|
|
3581
|
+
if _content_type:
|
|
3582
|
+
_header_params['Content-Type'] = _content_type
|
|
3583
|
+
else:
|
|
3584
|
+
_default_content_type = (
|
|
3585
|
+
self.api_client.select_header_content_type(
|
|
3586
|
+
[
|
|
3587
|
+
'application/json'
|
|
3588
|
+
]
|
|
3589
|
+
)
|
|
3590
|
+
)
|
|
3591
|
+
if _default_content_type is not None:
|
|
3592
|
+
_header_params['Content-Type'] = _default_content_type
|
|
3593
|
+
|
|
3594
|
+
# authentication setting
|
|
3595
|
+
_auth_settings: List[str] = [
|
|
3596
|
+
'QAnswer-Api-Key',
|
|
3597
|
+
'Bearer token'
|
|
3598
|
+
]
|
|
3599
|
+
|
|
3600
|
+
return self.api_client.param_serialize(
|
|
3601
|
+
method='PUT',
|
|
3602
|
+
resource_path='/api/retention-policy/system',
|
|
3603
|
+
path_params=_path_params,
|
|
3604
|
+
query_params=_query_params,
|
|
3605
|
+
header_params=_header_params,
|
|
3606
|
+
body=_body_params,
|
|
3607
|
+
post_params=_form_params,
|
|
3608
|
+
files=_files,
|
|
3609
|
+
auth_settings=_auth_settings,
|
|
3610
|
+
collection_formats=_collection_formats,
|
|
3611
|
+
_host=_host,
|
|
3612
|
+
_request_auth=_request_auth
|
|
3613
|
+
)
|
|
3614
|
+
|
|
3615
|
+
|
|
3616
|
+
|
|
3617
|
+
|
|
3618
|
+
@validate_call
|
|
3619
|
+
def stream_assistant_retention_now(
|
|
3620
|
+
self,
|
|
3621
|
+
username: StrictStr,
|
|
3622
|
+
dataset: StrictStr,
|
|
3623
|
+
_request_timeout: Union[
|
|
3624
|
+
None,
|
|
3625
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3626
|
+
Tuple[
|
|
3627
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3628
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3629
|
+
]
|
|
3630
|
+
] = None,
|
|
3631
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3632
|
+
_content_type: Optional[StrictStr] = None,
|
|
3633
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3634
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3635
|
+
) -> RetentionRunProgressEvent:
|
|
3636
|
+
"""Stream Assistant Retention Now
|
|
3637
|
+
|
|
3638
|
+
|
|
3639
|
+
:param username: (required)
|
|
3640
|
+
:type username: str
|
|
3641
|
+
:param dataset: (required)
|
|
3642
|
+
:type dataset: str
|
|
3643
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3644
|
+
number provided, it will be total request
|
|
3645
|
+
timeout. It can also be a pair (tuple) of
|
|
3646
|
+
(connection, read) timeouts.
|
|
3647
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3648
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3649
|
+
request; this effectively ignores the
|
|
3650
|
+
authentication in the spec for a single request.
|
|
3651
|
+
:type _request_auth: dict, optional
|
|
3652
|
+
:param _content_type: force content-type for the request.
|
|
3653
|
+
:type _content_type: str, Optional
|
|
3654
|
+
:param _headers: set to override the headers for a single
|
|
3655
|
+
request; this effectively ignores the headers
|
|
3656
|
+
in the spec for a single request.
|
|
3657
|
+
:type _headers: dict, optional
|
|
3658
|
+
:param _host_index: set to override the host_index for a single
|
|
3659
|
+
request; this effectively ignores the host_index
|
|
3660
|
+
in the spec for a single request.
|
|
3661
|
+
:type _host_index: int, optional
|
|
3662
|
+
:return: Returns the result object.
|
|
3663
|
+
""" # noqa: E501
|
|
3664
|
+
|
|
3665
|
+
_param = self._stream_assistant_retention_now_serialize(
|
|
3666
|
+
username=username,
|
|
3667
|
+
dataset=dataset,
|
|
3668
|
+
_request_auth=_request_auth,
|
|
3669
|
+
_content_type=_content_type,
|
|
3670
|
+
_headers=_headers,
|
|
3671
|
+
_host_index=_host_index
|
|
3672
|
+
)
|
|
3673
|
+
|
|
3674
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3675
|
+
'200': "RetentionRunProgressEvent",
|
|
3676
|
+
'422': "HTTPValidationError",
|
|
3677
|
+
}
|
|
3678
|
+
response_data = self.api_client.call_api(
|
|
3679
|
+
*_param,
|
|
3680
|
+
_request_timeout=_request_timeout
|
|
3681
|
+
)
|
|
3682
|
+
response_data.read()
|
|
3683
|
+
return self.api_client.response_deserialize(
|
|
3684
|
+
response_data=response_data,
|
|
3685
|
+
response_types_map=_response_types_map,
|
|
3686
|
+
).data
|
|
3687
|
+
|
|
3688
|
+
|
|
3689
|
+
@validate_call
|
|
3690
|
+
def stream_assistant_retention_now_with_http_info(
|
|
3691
|
+
self,
|
|
3692
|
+
username: StrictStr,
|
|
3693
|
+
dataset: StrictStr,
|
|
3694
|
+
_request_timeout: Union[
|
|
3695
|
+
None,
|
|
3696
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3697
|
+
Tuple[
|
|
3698
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3699
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3700
|
+
]
|
|
3701
|
+
] = None,
|
|
3702
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3703
|
+
_content_type: Optional[StrictStr] = None,
|
|
3704
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3705
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3706
|
+
) -> ApiResponse[RetentionRunProgressEvent]:
|
|
3707
|
+
"""Stream Assistant Retention Now
|
|
3708
|
+
|
|
3709
|
+
|
|
3710
|
+
:param username: (required)
|
|
3711
|
+
:type username: str
|
|
3712
|
+
:param dataset: (required)
|
|
3713
|
+
:type dataset: str
|
|
3714
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3715
|
+
number provided, it will be total request
|
|
3716
|
+
timeout. It can also be a pair (tuple) of
|
|
3717
|
+
(connection, read) timeouts.
|
|
3718
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3719
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3720
|
+
request; this effectively ignores the
|
|
3721
|
+
authentication in the spec for a single request.
|
|
3722
|
+
:type _request_auth: dict, optional
|
|
3723
|
+
:param _content_type: force content-type for the request.
|
|
3724
|
+
:type _content_type: str, Optional
|
|
3725
|
+
:param _headers: set to override the headers for a single
|
|
3726
|
+
request; this effectively ignores the headers
|
|
3727
|
+
in the spec for a single request.
|
|
3728
|
+
:type _headers: dict, optional
|
|
3729
|
+
:param _host_index: set to override the host_index for a single
|
|
3730
|
+
request; this effectively ignores the host_index
|
|
3731
|
+
in the spec for a single request.
|
|
3732
|
+
:type _host_index: int, optional
|
|
3733
|
+
:return: Returns the result object.
|
|
3734
|
+
""" # noqa: E501
|
|
3735
|
+
|
|
3736
|
+
_param = self._stream_assistant_retention_now_serialize(
|
|
3737
|
+
username=username,
|
|
3738
|
+
dataset=dataset,
|
|
3739
|
+
_request_auth=_request_auth,
|
|
3740
|
+
_content_type=_content_type,
|
|
3741
|
+
_headers=_headers,
|
|
3742
|
+
_host_index=_host_index
|
|
3743
|
+
)
|
|
3744
|
+
|
|
3745
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3746
|
+
'200': "RetentionRunProgressEvent",
|
|
3747
|
+
'422': "HTTPValidationError",
|
|
3748
|
+
}
|
|
3749
|
+
response_data = self.api_client.call_api(
|
|
3750
|
+
*_param,
|
|
3751
|
+
_request_timeout=_request_timeout
|
|
3752
|
+
)
|
|
3753
|
+
response_data.read()
|
|
3754
|
+
return self.api_client.response_deserialize(
|
|
3755
|
+
response_data=response_data,
|
|
3756
|
+
response_types_map=_response_types_map,
|
|
3757
|
+
)
|
|
3758
|
+
|
|
3759
|
+
|
|
3760
|
+
@validate_call
|
|
3761
|
+
def stream_assistant_retention_now_without_preload_content(
|
|
3762
|
+
self,
|
|
3763
|
+
username: StrictStr,
|
|
3764
|
+
dataset: StrictStr,
|
|
3765
|
+
_request_timeout: Union[
|
|
3766
|
+
None,
|
|
3767
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3768
|
+
Tuple[
|
|
3769
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3770
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3771
|
+
]
|
|
3772
|
+
] = None,
|
|
3773
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3774
|
+
_content_type: Optional[StrictStr] = None,
|
|
3775
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3776
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3777
|
+
) -> RESTResponseType:
|
|
3778
|
+
"""Stream Assistant Retention Now
|
|
3779
|
+
|
|
3780
|
+
|
|
3781
|
+
:param username: (required)
|
|
3782
|
+
:type username: str
|
|
3783
|
+
:param dataset: (required)
|
|
3784
|
+
:type dataset: str
|
|
3785
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3786
|
+
number provided, it will be total request
|
|
3787
|
+
timeout. It can also be a pair (tuple) of
|
|
3788
|
+
(connection, read) timeouts.
|
|
3789
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3790
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3791
|
+
request; this effectively ignores the
|
|
3792
|
+
authentication in the spec for a single request.
|
|
3793
|
+
:type _request_auth: dict, optional
|
|
3794
|
+
:param _content_type: force content-type for the request.
|
|
3795
|
+
:type _content_type: str, Optional
|
|
3796
|
+
:param _headers: set to override the headers for a single
|
|
3797
|
+
request; this effectively ignores the headers
|
|
3798
|
+
in the spec for a single request.
|
|
3799
|
+
:type _headers: dict, optional
|
|
3800
|
+
:param _host_index: set to override the host_index for a single
|
|
3801
|
+
request; this effectively ignores the host_index
|
|
3802
|
+
in the spec for a single request.
|
|
3803
|
+
:type _host_index: int, optional
|
|
3804
|
+
:return: Returns the result object.
|
|
3805
|
+
""" # noqa: E501
|
|
3806
|
+
|
|
3807
|
+
_param = self._stream_assistant_retention_now_serialize(
|
|
3808
|
+
username=username,
|
|
3809
|
+
dataset=dataset,
|
|
3810
|
+
_request_auth=_request_auth,
|
|
3811
|
+
_content_type=_content_type,
|
|
3812
|
+
_headers=_headers,
|
|
3813
|
+
_host_index=_host_index
|
|
3814
|
+
)
|
|
3815
|
+
|
|
3816
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3817
|
+
'200': "RetentionRunProgressEvent",
|
|
3818
|
+
'422': "HTTPValidationError",
|
|
3819
|
+
}
|
|
3820
|
+
response_data = self.api_client.call_api(
|
|
3821
|
+
*_param,
|
|
3822
|
+
_request_timeout=_request_timeout
|
|
3823
|
+
)
|
|
3824
|
+
return response_data.response
|
|
3825
|
+
|
|
3826
|
+
|
|
3827
|
+
def _stream_assistant_retention_now_serialize(
|
|
3828
|
+
self,
|
|
3829
|
+
username,
|
|
3830
|
+
dataset,
|
|
3831
|
+
_request_auth,
|
|
3832
|
+
_content_type,
|
|
3833
|
+
_headers,
|
|
3834
|
+
_host_index,
|
|
3835
|
+
) -> RequestSerialized:
|
|
3836
|
+
|
|
3837
|
+
_host = None
|
|
3838
|
+
|
|
3839
|
+
_collection_formats: Dict[str, str] = {
|
|
3840
|
+
}
|
|
3841
|
+
|
|
3842
|
+
_path_params: Dict[str, str] = {}
|
|
3843
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3844
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3845
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3846
|
+
_files: Dict[
|
|
3847
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3848
|
+
] = {}
|
|
3849
|
+
_body_params: Optional[bytes] = None
|
|
3850
|
+
|
|
3851
|
+
# process the path parameters
|
|
3852
|
+
# process the query parameters
|
|
3853
|
+
if username is not None:
|
|
3854
|
+
|
|
3855
|
+
_query_params.append(('username', username))
|
|
3856
|
+
|
|
3857
|
+
if dataset is not None:
|
|
3858
|
+
|
|
3859
|
+
_query_params.append(('dataset', dataset))
|
|
3860
|
+
|
|
3861
|
+
# process the header parameters
|
|
3862
|
+
# process the form parameters
|
|
3863
|
+
# process the body parameter
|
|
3864
|
+
|
|
3865
|
+
|
|
3866
|
+
# set the HTTP header `Accept`
|
|
3867
|
+
if 'Accept' not in _header_params:
|
|
3868
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3869
|
+
[
|
|
3870
|
+
'application/json'
|
|
3871
|
+
]
|
|
3872
|
+
)
|
|
3873
|
+
|
|
3874
|
+
|
|
3875
|
+
# authentication setting
|
|
3876
|
+
_auth_settings: List[str] = [
|
|
3877
|
+
'QAnswer-Api-Key',
|
|
3878
|
+
'Bearer token'
|
|
3879
|
+
]
|
|
3880
|
+
|
|
3881
|
+
return self.api_client.param_serialize(
|
|
3882
|
+
method='POST',
|
|
3883
|
+
resource_path='/api/retention-policy/assistant/run-now/stream',
|
|
3884
|
+
path_params=_path_params,
|
|
3885
|
+
query_params=_query_params,
|
|
3886
|
+
header_params=_header_params,
|
|
3887
|
+
body=_body_params,
|
|
3888
|
+
post_params=_form_params,
|
|
3889
|
+
files=_files,
|
|
3890
|
+
auth_settings=_auth_settings,
|
|
3891
|
+
collection_formats=_collection_formats,
|
|
3892
|
+
_host=_host,
|
|
3893
|
+
_request_auth=_request_auth
|
|
3894
|
+
)
|
|
3895
|
+
|
|
3896
|
+
|
|
3897
|
+
|
|
3898
|
+
|
|
3899
|
+
@validate_call
|
|
3900
|
+
def stream_organization_retention_now(
|
|
3901
|
+
self,
|
|
3902
|
+
organization_id: StrictInt,
|
|
3903
|
+
_request_timeout: Union[
|
|
3904
|
+
None,
|
|
3905
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3906
|
+
Tuple[
|
|
3907
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3908
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3909
|
+
]
|
|
3910
|
+
] = None,
|
|
3911
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3912
|
+
_content_type: Optional[StrictStr] = None,
|
|
3913
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3914
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3915
|
+
) -> RetentionRunProgressEvent:
|
|
3916
|
+
"""Stream Organization Retention Now
|
|
3917
|
+
|
|
3918
|
+
|
|
3919
|
+
:param organization_id: (required)
|
|
3920
|
+
:type organization_id: int
|
|
3921
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3922
|
+
number provided, it will be total request
|
|
3923
|
+
timeout. It can also be a pair (tuple) of
|
|
3924
|
+
(connection, read) timeouts.
|
|
3925
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3926
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3927
|
+
request; this effectively ignores the
|
|
3928
|
+
authentication in the spec for a single request.
|
|
3929
|
+
:type _request_auth: dict, optional
|
|
3930
|
+
:param _content_type: force content-type for the request.
|
|
3931
|
+
:type _content_type: str, Optional
|
|
3932
|
+
:param _headers: set to override the headers for a single
|
|
3933
|
+
request; this effectively ignores the headers
|
|
3934
|
+
in the spec for a single request.
|
|
3935
|
+
:type _headers: dict, optional
|
|
3936
|
+
:param _host_index: set to override the host_index for a single
|
|
3937
|
+
request; this effectively ignores the host_index
|
|
3938
|
+
in the spec for a single request.
|
|
3939
|
+
:type _host_index: int, optional
|
|
3940
|
+
:return: Returns the result object.
|
|
3941
|
+
""" # noqa: E501
|
|
3942
|
+
|
|
3943
|
+
_param = self._stream_organization_retention_now_serialize(
|
|
3944
|
+
organization_id=organization_id,
|
|
3945
|
+
_request_auth=_request_auth,
|
|
3946
|
+
_content_type=_content_type,
|
|
3947
|
+
_headers=_headers,
|
|
3948
|
+
_host_index=_host_index
|
|
3949
|
+
)
|
|
3950
|
+
|
|
3951
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3952
|
+
'200': "RetentionRunProgressEvent",
|
|
3953
|
+
'422': "HTTPValidationError",
|
|
3954
|
+
}
|
|
3955
|
+
response_data = self.api_client.call_api(
|
|
3956
|
+
*_param,
|
|
3957
|
+
_request_timeout=_request_timeout
|
|
3958
|
+
)
|
|
3959
|
+
response_data.read()
|
|
3960
|
+
return self.api_client.response_deserialize(
|
|
3961
|
+
response_data=response_data,
|
|
3962
|
+
response_types_map=_response_types_map,
|
|
3963
|
+
).data
|
|
3964
|
+
|
|
3965
|
+
|
|
3966
|
+
@validate_call
|
|
3967
|
+
def stream_organization_retention_now_with_http_info(
|
|
3968
|
+
self,
|
|
3969
|
+
organization_id: StrictInt,
|
|
3970
|
+
_request_timeout: Union[
|
|
3971
|
+
None,
|
|
3972
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3973
|
+
Tuple[
|
|
3974
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3975
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3976
|
+
]
|
|
3977
|
+
] = None,
|
|
3978
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3979
|
+
_content_type: Optional[StrictStr] = None,
|
|
3980
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3981
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3982
|
+
) -> ApiResponse[RetentionRunProgressEvent]:
|
|
3983
|
+
"""Stream Organization Retention Now
|
|
3984
|
+
|
|
3985
|
+
|
|
3986
|
+
:param organization_id: (required)
|
|
3987
|
+
:type organization_id: int
|
|
3988
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3989
|
+
number provided, it will be total request
|
|
3990
|
+
timeout. It can also be a pair (tuple) of
|
|
3991
|
+
(connection, read) timeouts.
|
|
3992
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3993
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3994
|
+
request; this effectively ignores the
|
|
3995
|
+
authentication in the spec for a single request.
|
|
3996
|
+
:type _request_auth: dict, optional
|
|
3997
|
+
:param _content_type: force content-type for the request.
|
|
3998
|
+
:type _content_type: str, Optional
|
|
3999
|
+
:param _headers: set to override the headers for a single
|
|
4000
|
+
request; this effectively ignores the headers
|
|
4001
|
+
in the spec for a single request.
|
|
4002
|
+
:type _headers: dict, optional
|
|
4003
|
+
:param _host_index: set to override the host_index for a single
|
|
4004
|
+
request; this effectively ignores the host_index
|
|
4005
|
+
in the spec for a single request.
|
|
4006
|
+
:type _host_index: int, optional
|
|
4007
|
+
:return: Returns the result object.
|
|
4008
|
+
""" # noqa: E501
|
|
4009
|
+
|
|
4010
|
+
_param = self._stream_organization_retention_now_serialize(
|
|
4011
|
+
organization_id=organization_id,
|
|
4012
|
+
_request_auth=_request_auth,
|
|
4013
|
+
_content_type=_content_type,
|
|
4014
|
+
_headers=_headers,
|
|
4015
|
+
_host_index=_host_index
|
|
4016
|
+
)
|
|
4017
|
+
|
|
4018
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4019
|
+
'200': "RetentionRunProgressEvent",
|
|
4020
|
+
'422': "HTTPValidationError",
|
|
4021
|
+
}
|
|
4022
|
+
response_data = self.api_client.call_api(
|
|
4023
|
+
*_param,
|
|
4024
|
+
_request_timeout=_request_timeout
|
|
4025
|
+
)
|
|
4026
|
+
response_data.read()
|
|
4027
|
+
return self.api_client.response_deserialize(
|
|
4028
|
+
response_data=response_data,
|
|
4029
|
+
response_types_map=_response_types_map,
|
|
4030
|
+
)
|
|
4031
|
+
|
|
4032
|
+
|
|
4033
|
+
@validate_call
|
|
4034
|
+
def stream_organization_retention_now_without_preload_content(
|
|
4035
|
+
self,
|
|
4036
|
+
organization_id: StrictInt,
|
|
4037
|
+
_request_timeout: Union[
|
|
4038
|
+
None,
|
|
4039
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4040
|
+
Tuple[
|
|
4041
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4042
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4043
|
+
]
|
|
4044
|
+
] = None,
|
|
4045
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4046
|
+
_content_type: Optional[StrictStr] = None,
|
|
4047
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4048
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4049
|
+
) -> RESTResponseType:
|
|
4050
|
+
"""Stream Organization Retention Now
|
|
4051
|
+
|
|
4052
|
+
|
|
4053
|
+
:param organization_id: (required)
|
|
4054
|
+
:type organization_id: int
|
|
4055
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4056
|
+
number provided, it will be total request
|
|
4057
|
+
timeout. It can also be a pair (tuple) of
|
|
4058
|
+
(connection, read) timeouts.
|
|
4059
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4060
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4061
|
+
request; this effectively ignores the
|
|
4062
|
+
authentication in the spec for a single request.
|
|
4063
|
+
:type _request_auth: dict, optional
|
|
4064
|
+
:param _content_type: force content-type for the request.
|
|
4065
|
+
:type _content_type: str, Optional
|
|
4066
|
+
:param _headers: set to override the headers for a single
|
|
4067
|
+
request; this effectively ignores the headers
|
|
4068
|
+
in the spec for a single request.
|
|
4069
|
+
:type _headers: dict, optional
|
|
4070
|
+
:param _host_index: set to override the host_index for a single
|
|
4071
|
+
request; this effectively ignores the host_index
|
|
4072
|
+
in the spec for a single request.
|
|
4073
|
+
:type _host_index: int, optional
|
|
4074
|
+
:return: Returns the result object.
|
|
4075
|
+
""" # noqa: E501
|
|
4076
|
+
|
|
4077
|
+
_param = self._stream_organization_retention_now_serialize(
|
|
4078
|
+
organization_id=organization_id,
|
|
4079
|
+
_request_auth=_request_auth,
|
|
4080
|
+
_content_type=_content_type,
|
|
4081
|
+
_headers=_headers,
|
|
4082
|
+
_host_index=_host_index
|
|
4083
|
+
)
|
|
4084
|
+
|
|
4085
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4086
|
+
'200': "RetentionRunProgressEvent",
|
|
4087
|
+
'422': "HTTPValidationError",
|
|
4088
|
+
}
|
|
4089
|
+
response_data = self.api_client.call_api(
|
|
4090
|
+
*_param,
|
|
4091
|
+
_request_timeout=_request_timeout
|
|
4092
|
+
)
|
|
4093
|
+
return response_data.response
|
|
4094
|
+
|
|
4095
|
+
|
|
4096
|
+
def _stream_organization_retention_now_serialize(
|
|
4097
|
+
self,
|
|
4098
|
+
organization_id,
|
|
4099
|
+
_request_auth,
|
|
4100
|
+
_content_type,
|
|
4101
|
+
_headers,
|
|
4102
|
+
_host_index,
|
|
4103
|
+
) -> RequestSerialized:
|
|
4104
|
+
|
|
4105
|
+
_host = None
|
|
4106
|
+
|
|
4107
|
+
_collection_formats: Dict[str, str] = {
|
|
4108
|
+
}
|
|
4109
|
+
|
|
4110
|
+
_path_params: Dict[str, str] = {}
|
|
4111
|
+
_query_params: List[Tuple[str, str]] = []
|
|
4112
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
4113
|
+
_form_params: List[Tuple[str, str]] = []
|
|
4114
|
+
_files: Dict[
|
|
4115
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
4116
|
+
] = {}
|
|
4117
|
+
_body_params: Optional[bytes] = None
|
|
4118
|
+
|
|
4119
|
+
# process the path parameters
|
|
4120
|
+
# process the query parameters
|
|
4121
|
+
if organization_id is not None:
|
|
4122
|
+
|
|
4123
|
+
_query_params.append(('organizationId', organization_id))
|
|
4124
|
+
|
|
4125
|
+
# process the header parameters
|
|
4126
|
+
# process the form parameters
|
|
4127
|
+
# process the body parameter
|
|
4128
|
+
|
|
4129
|
+
|
|
4130
|
+
# set the HTTP header `Accept`
|
|
4131
|
+
if 'Accept' not in _header_params:
|
|
4132
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
4133
|
+
[
|
|
4134
|
+
'application/json'
|
|
4135
|
+
]
|
|
4136
|
+
)
|
|
4137
|
+
|
|
4138
|
+
|
|
4139
|
+
# authentication setting
|
|
4140
|
+
_auth_settings: List[str] = [
|
|
4141
|
+
'QAnswer-Api-Key',
|
|
4142
|
+
'Bearer token'
|
|
4143
|
+
]
|
|
4144
|
+
|
|
4145
|
+
return self.api_client.param_serialize(
|
|
4146
|
+
method='POST',
|
|
4147
|
+
resource_path='/api/retention-policy/organization/run-now/stream',
|
|
4148
|
+
path_params=_path_params,
|
|
4149
|
+
query_params=_query_params,
|
|
4150
|
+
header_params=_header_params,
|
|
4151
|
+
body=_body_params,
|
|
4152
|
+
post_params=_form_params,
|
|
4153
|
+
files=_files,
|
|
4154
|
+
auth_settings=_auth_settings,
|
|
4155
|
+
collection_formats=_collection_formats,
|
|
4156
|
+
_host=_host,
|
|
4157
|
+
_request_auth=_request_auth
|
|
4158
|
+
)
|
|
4159
|
+
|
|
4160
|
+
|
|
4161
|
+
|
|
4162
|
+
|
|
4163
|
+
@validate_call
|
|
4164
|
+
def stream_system_retention_now(
|
|
4165
|
+
self,
|
|
4166
|
+
_request_timeout: Union[
|
|
4167
|
+
None,
|
|
4168
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4169
|
+
Tuple[
|
|
4170
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4171
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4172
|
+
]
|
|
4173
|
+
] = None,
|
|
4174
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4175
|
+
_content_type: Optional[StrictStr] = None,
|
|
4176
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4177
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4178
|
+
) -> RetentionRunProgressEvent:
|
|
4179
|
+
"""Stream System Retention Now
|
|
4180
|
+
|
|
4181
|
+
|
|
4182
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4183
|
+
number provided, it will be total request
|
|
4184
|
+
timeout. It can also be a pair (tuple) of
|
|
4185
|
+
(connection, read) timeouts.
|
|
4186
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4187
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4188
|
+
request; this effectively ignores the
|
|
4189
|
+
authentication in the spec for a single request.
|
|
4190
|
+
:type _request_auth: dict, optional
|
|
4191
|
+
:param _content_type: force content-type for the request.
|
|
4192
|
+
:type _content_type: str, Optional
|
|
4193
|
+
:param _headers: set to override the headers for a single
|
|
4194
|
+
request; this effectively ignores the headers
|
|
4195
|
+
in the spec for a single request.
|
|
4196
|
+
:type _headers: dict, optional
|
|
4197
|
+
:param _host_index: set to override the host_index for a single
|
|
4198
|
+
request; this effectively ignores the host_index
|
|
4199
|
+
in the spec for a single request.
|
|
4200
|
+
:type _host_index: int, optional
|
|
4201
|
+
:return: Returns the result object.
|
|
4202
|
+
""" # noqa: E501
|
|
4203
|
+
|
|
4204
|
+
_param = self._stream_system_retention_now_serialize(
|
|
4205
|
+
_request_auth=_request_auth,
|
|
4206
|
+
_content_type=_content_type,
|
|
4207
|
+
_headers=_headers,
|
|
4208
|
+
_host_index=_host_index
|
|
4209
|
+
)
|
|
4210
|
+
|
|
4211
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4212
|
+
'200': "RetentionRunProgressEvent",
|
|
4213
|
+
}
|
|
4214
|
+
response_data = self.api_client.call_api(
|
|
4215
|
+
*_param,
|
|
4216
|
+
_request_timeout=_request_timeout
|
|
4217
|
+
)
|
|
4218
|
+
response_data.read()
|
|
4219
|
+
return self.api_client.response_deserialize(
|
|
4220
|
+
response_data=response_data,
|
|
4221
|
+
response_types_map=_response_types_map,
|
|
4222
|
+
).data
|
|
4223
|
+
|
|
4224
|
+
|
|
4225
|
+
@validate_call
|
|
4226
|
+
def stream_system_retention_now_with_http_info(
|
|
4227
|
+
self,
|
|
4228
|
+
_request_timeout: Union[
|
|
4229
|
+
None,
|
|
4230
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4231
|
+
Tuple[
|
|
4232
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4233
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4234
|
+
]
|
|
4235
|
+
] = None,
|
|
4236
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4237
|
+
_content_type: Optional[StrictStr] = None,
|
|
4238
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4239
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4240
|
+
) -> ApiResponse[RetentionRunProgressEvent]:
|
|
4241
|
+
"""Stream System Retention Now
|
|
4242
|
+
|
|
4243
|
+
|
|
4244
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4245
|
+
number provided, it will be total request
|
|
4246
|
+
timeout. It can also be a pair (tuple) of
|
|
4247
|
+
(connection, read) timeouts.
|
|
4248
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4249
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4250
|
+
request; this effectively ignores the
|
|
4251
|
+
authentication in the spec for a single request.
|
|
4252
|
+
:type _request_auth: dict, optional
|
|
4253
|
+
:param _content_type: force content-type for the request.
|
|
4254
|
+
:type _content_type: str, Optional
|
|
4255
|
+
:param _headers: set to override the headers for a single
|
|
4256
|
+
request; this effectively ignores the headers
|
|
4257
|
+
in the spec for a single request.
|
|
4258
|
+
:type _headers: dict, optional
|
|
4259
|
+
:param _host_index: set to override the host_index for a single
|
|
4260
|
+
request; this effectively ignores the host_index
|
|
4261
|
+
in the spec for a single request.
|
|
4262
|
+
:type _host_index: int, optional
|
|
4263
|
+
:return: Returns the result object.
|
|
4264
|
+
""" # noqa: E501
|
|
4265
|
+
|
|
4266
|
+
_param = self._stream_system_retention_now_serialize(
|
|
4267
|
+
_request_auth=_request_auth,
|
|
4268
|
+
_content_type=_content_type,
|
|
4269
|
+
_headers=_headers,
|
|
4270
|
+
_host_index=_host_index
|
|
4271
|
+
)
|
|
4272
|
+
|
|
4273
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4274
|
+
'200': "RetentionRunProgressEvent",
|
|
4275
|
+
}
|
|
4276
|
+
response_data = self.api_client.call_api(
|
|
4277
|
+
*_param,
|
|
4278
|
+
_request_timeout=_request_timeout
|
|
4279
|
+
)
|
|
4280
|
+
response_data.read()
|
|
4281
|
+
return self.api_client.response_deserialize(
|
|
4282
|
+
response_data=response_data,
|
|
4283
|
+
response_types_map=_response_types_map,
|
|
4284
|
+
)
|
|
4285
|
+
|
|
4286
|
+
|
|
4287
|
+
@validate_call
|
|
4288
|
+
def stream_system_retention_now_without_preload_content(
|
|
4289
|
+
self,
|
|
4290
|
+
_request_timeout: Union[
|
|
4291
|
+
None,
|
|
4292
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4293
|
+
Tuple[
|
|
4294
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4295
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4296
|
+
]
|
|
4297
|
+
] = None,
|
|
4298
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4299
|
+
_content_type: Optional[StrictStr] = None,
|
|
4300
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4301
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4302
|
+
) -> RESTResponseType:
|
|
4303
|
+
"""Stream System Retention Now
|
|
4304
|
+
|
|
4305
|
+
|
|
4306
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4307
|
+
number provided, it will be total request
|
|
4308
|
+
timeout. It can also be a pair (tuple) of
|
|
4309
|
+
(connection, read) timeouts.
|
|
4310
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4311
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4312
|
+
request; this effectively ignores the
|
|
4313
|
+
authentication in the spec for a single request.
|
|
4314
|
+
:type _request_auth: dict, optional
|
|
4315
|
+
:param _content_type: force content-type for the request.
|
|
4316
|
+
:type _content_type: str, Optional
|
|
4317
|
+
:param _headers: set to override the headers for a single
|
|
4318
|
+
request; this effectively ignores the headers
|
|
4319
|
+
in the spec for a single request.
|
|
4320
|
+
:type _headers: dict, optional
|
|
4321
|
+
:param _host_index: set to override the host_index for a single
|
|
4322
|
+
request; this effectively ignores the host_index
|
|
4323
|
+
in the spec for a single request.
|
|
4324
|
+
:type _host_index: int, optional
|
|
4325
|
+
:return: Returns the result object.
|
|
4326
|
+
""" # noqa: E501
|
|
4327
|
+
|
|
4328
|
+
_param = self._stream_system_retention_now_serialize(
|
|
4329
|
+
_request_auth=_request_auth,
|
|
4330
|
+
_content_type=_content_type,
|
|
4331
|
+
_headers=_headers,
|
|
4332
|
+
_host_index=_host_index
|
|
4333
|
+
)
|
|
4334
|
+
|
|
4335
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4336
|
+
'200': "RetentionRunProgressEvent",
|
|
4337
|
+
}
|
|
4338
|
+
response_data = self.api_client.call_api(
|
|
4339
|
+
*_param,
|
|
4340
|
+
_request_timeout=_request_timeout
|
|
4341
|
+
)
|
|
4342
|
+
return response_data.response
|
|
4343
|
+
|
|
4344
|
+
|
|
4345
|
+
def _stream_system_retention_now_serialize(
|
|
4346
|
+
self,
|
|
4347
|
+
_request_auth,
|
|
4348
|
+
_content_type,
|
|
4349
|
+
_headers,
|
|
4350
|
+
_host_index,
|
|
4351
|
+
) -> RequestSerialized:
|
|
4352
|
+
|
|
4353
|
+
_host = None
|
|
4354
|
+
|
|
4355
|
+
_collection_formats: Dict[str, str] = {
|
|
4356
|
+
}
|
|
4357
|
+
|
|
4358
|
+
_path_params: Dict[str, str] = {}
|
|
4359
|
+
_query_params: List[Tuple[str, str]] = []
|
|
4360
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
4361
|
+
_form_params: List[Tuple[str, str]] = []
|
|
4362
|
+
_files: Dict[
|
|
4363
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
4364
|
+
] = {}
|
|
4365
|
+
_body_params: Optional[bytes] = None
|
|
4366
|
+
|
|
4367
|
+
# process the path parameters
|
|
4368
|
+
# process the query parameters
|
|
4369
|
+
# process the header parameters
|
|
4370
|
+
# process the form parameters
|
|
4371
|
+
# process the body parameter
|
|
4372
|
+
|
|
4373
|
+
|
|
4374
|
+
# set the HTTP header `Accept`
|
|
4375
|
+
if 'Accept' not in _header_params:
|
|
4376
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
4377
|
+
[
|
|
4378
|
+
'application/json'
|
|
4379
|
+
]
|
|
4380
|
+
)
|
|
4381
|
+
|
|
4382
|
+
|
|
4383
|
+
# authentication setting
|
|
4384
|
+
_auth_settings: List[str] = [
|
|
4385
|
+
'QAnswer-Api-Key',
|
|
4386
|
+
'Bearer token'
|
|
4387
|
+
]
|
|
4388
|
+
|
|
4389
|
+
return self.api_client.param_serialize(
|
|
4390
|
+
method='POST',
|
|
4391
|
+
resource_path='/api/retention-policy/run-now/stream',
|
|
4392
|
+
path_params=_path_params,
|
|
4393
|
+
query_params=_query_params,
|
|
4394
|
+
header_params=_header_params,
|
|
4395
|
+
body=_body_params,
|
|
4396
|
+
post_params=_form_params,
|
|
4397
|
+
files=_files,
|
|
4398
|
+
auth_settings=_auth_settings,
|
|
4399
|
+
collection_formats=_collection_formats,
|
|
4400
|
+
_host=_host,
|
|
4401
|
+
_request_auth=_request_auth
|
|
4402
|
+
)
|
|
4403
|
+
|
|
4404
|
+
|