From 5323ab99b3eae6c21cd80df47bc5d259738e4b03 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 24 Jul 2018 19:00:24 +0000 Subject: [PATCH 1/6] Generated from 8dfedc91e10fb96edb9aff8158500e9d369ab36a [Cognitive Services] Update endpoint URL template for LUIS. --- .../language/luis/authoring/__init__.py | 18 + .../luis/authoring/luis_authoring_client.py | 114 + .../luis/authoring/models/__init__.py | 325 + .../models/application_create_object.py | 59 + .../models/application_create_object_py3.py | 59 + .../models/application_info_response.py | 69 + .../models/application_info_response_py3.py | 69 + .../models/application_publish_object.py | 37 + .../models/application_publish_object_py3.py | 37 + .../application_setting_update_object.py | 29 + .../application_setting_update_object_py3.py | 29 + .../authoring/models/application_settings.py | 40 + .../models/application_settings_py3.py | 40 + .../models/application_update_object.py | 32 + .../models/application_update_object_py3.py | 32 + .../authoring/models/available_culture.py | 32 + .../authoring/models/available_culture_py3.py | 32 + .../models/available_prebuilt_entity_model.py | 36 + .../available_prebuilt_entity_model_py3.py | 36 + .../authoring/models/batch_label_example.py | 38 + .../models/batch_label_example_py3.py | 38 + .../luis/authoring/models/child_entity.py | 38 + .../luis/authoring/models/child_entity_py3.py | 38 + .../luis/authoring/models/closed_list.py | 37 + .../models/closed_list_entity_extractor.py | 62 + .../closed_list_entity_extractor_py3.py | 62 + .../models/closed_list_model_create_object.py | 33 + .../closed_list_model_create_object_py3.py | 33 + .../models/closed_list_model_patch_object.py | 29 + .../closed_list_model_patch_object_py3.py | 29 + .../models/closed_list_model_update_object.py | 33 + .../closed_list_model_update_object_py3.py | 33 + .../luis/authoring/models/closed_list_py3.py | 37 + .../authoring/models/collaborators_array.py | 28 + .../models/collaborators_array_py3.py | 28 + .../composite_child_model_create_object.py | 28 + ...composite_child_model_create_object_py3.py | 28 + .../models/composite_entity_extractor.py | 62 + .../models/composite_entity_extractor_py3.py | 62 + .../models/composite_entity_model.py | 32 + .../models/composite_entity_model_py3.py | 32 + .../authoring/models/custom_prebuilt_model.py | 65 + .../models/custom_prebuilt_model_py3.py | 65 + .../luis/authoring/models/endpoint_info.py | 53 + .../authoring/models/endpoint_info_py3.py | 53 + .../models/enqueue_training_response.py | 34 + .../models/enqueue_training_response_py3.py | 34 + .../models/entities_suggestion_example.py | 42 + .../models/entities_suggestion_example_py3.py | 42 + .../luis/authoring/models/entity_extractor.py | 65 + .../authoring/models/entity_extractor_py3.py | 65 + .../luis/authoring/models/entity_label.py | 47 + .../authoring/models/entity_label_object.py | 47 + .../models/entity_label_object_py3.py | 47 + .../luis/authoring/models/entity_label_py3.py | 47 + .../authoring/models/entity_model_info.py | 53 + .../authoring/models/entity_model_info_py3.py | 53 + .../authoring/models/entity_prediction.py | 51 + .../authoring/models/entity_prediction_py3.py | 51 + .../luis/authoring/models/entity_role.py | 32 + .../models/entity_role_create_object.py | 28 + .../models/entity_role_create_object_py3.py | 28 + .../luis/authoring/models/entity_role_py3.py | 32 + .../models/entity_role_update_object.py | 28 + .../models/entity_role_update_object_py3.py | 28 + .../luis/authoring/models/error_response.py | 46 + .../authoring/models/error_response_py3.py | 46 + .../authoring/models/example_label_object.py | 37 + .../models/example_label_object_py3.py | 37 + .../authoring/models/explicit_list_item.py | 32 + .../explicit_list_item_create_object.py | 28 + .../explicit_list_item_create_object_py3.py | 28 + .../models/explicit_list_item_py3.py | 32 + .../explicit_list_item_update_object.py | 28 + .../explicit_list_item_update_object_py3.py | 28 + .../authoring/models/feature_info_object.py | 36 + .../models/feature_info_object_py3.py | 36 + .../models/features_response_object.py | 34 + .../models/features_response_object_py3.py | 34 + .../models/hierarchical_child_entity.py | 49 + .../models/hierarchical_child_entity_py3.py | 49 + .../hierarchical_child_model_create_object.py | 28 + ...rarchical_child_model_create_object_py3.py | 28 + .../hierarchical_child_model_update_object.py | 28 + ...rarchical_child_model_update_object_py3.py | 28 + .../models/hierarchical_entity_extractor.py | 62 + .../hierarchical_entity_extractor_py3.py | 62 + .../models/hierarchical_entity_model.py | 32 + .../models/hierarchical_entity_model_py3.py | 32 + .../authoring/models/hierarchical_model.py | 41 + .../models/hierarchical_model_py3.py | 41 + .../authoring/models/intent_classifier.py | 56 + .../authoring/models/intent_classifier_py3.py | 56 + .../authoring/models/intent_prediction.py | 32 + .../authoring/models/intent_prediction_py3.py | 32 + .../models/intents_suggestion_example.py | 42 + .../models/intents_suggestion_example_py3.py | 42 + .../luis/authoring/models/json_entity.py | 46 + .../luis/authoring/models/json_entity_py3.py | 46 + .../authoring/models/json_model_feature.py | 51 + .../models/json_model_feature_py3.py | 51 + .../authoring/models/json_regex_feature.py | 36 + .../models/json_regex_feature_py3.py | 36 + .../luis/authoring/models/json_utterance.py | 37 + .../authoring/models/json_utterance_py3.py | 37 + .../models/label_example_response.py | 32 + .../models/label_example_response_py3.py | 32 + .../authoring/models/label_text_object.py | 32 + .../authoring/models/label_text_object_py3.py | 32 + .../authoring/models/labeled_utterance.py | 55 + .../authoring/models/labeled_utterance_py3.py | 55 + .../luis/authoring/models/luis_app.py | 100 + .../luis/authoring/models/luis_app_py3.py | 100 + .../models/luis_authoring_client_enums.py | 26 + .../authoring/models/model_create_object.py | 28 + .../models/model_create_object_py3.py | 28 + .../luis/authoring/models/model_info.py | 52 + .../luis/authoring/models/model_info_py3.py | 52 + .../authoring/models/model_info_response.py | 84 + .../models/model_info_response_py3.py | 84 + .../models/model_training_details.py | 46 + .../models/model_training_details_py3.py | 46 + .../authoring/models/model_training_info.py | 33 + .../models/model_training_info_py3.py | 33 + .../authoring/models/model_update_object.py | 28 + .../models/model_update_object_py3.py | 28 + .../luis/authoring/models/operation_error.py | 32 + .../authoring/models/operation_error_py3.py | 32 + .../luis/authoring/models/operation_status.py | 34 + .../authoring/models/operation_status_py3.py | 34 + .../luis/authoring/models/pattern_any.py | 36 + .../models/pattern_any_entity_extractor.py | 62 + .../pattern_any_entity_extractor_py3.py | 62 + .../models/pattern_any_model_create_object.py | 32 + .../pattern_any_model_create_object_py3.py | 32 + .../models/pattern_any_model_update_object.py | 32 + .../pattern_any_model_update_object_py3.py | 32 + .../luis/authoring/models/pattern_any_py3.py | 36 + .../authoring/models/pattern_create_object.py | 32 + .../models/pattern_create_object_py3.py | 32 + .../authoring/models/pattern_feature_info.py | 37 + .../models/pattern_feature_info_py3.py | 37 + .../luis/authoring/models/pattern_rule.py | 32 + .../models/pattern_rule_create_object.py | 32 + .../models/pattern_rule_create_object_py3.py | 32 + .../authoring/models/pattern_rule_info.py | 36 + .../authoring/models/pattern_rule_info_py3.py | 36 + .../luis/authoring/models/pattern_rule_py3.py | 32 + .../models/pattern_rule_update_object.py | 36 + .../models/pattern_rule_update_object_py3.py | 36 + .../authoring/models/pattern_update_object.py | 37 + .../models/pattern_update_object_py3.py | 37 + .../models/personal_assistants_response.py | 33 + .../personal_assistants_response_py3.py | 33 + .../models/phrase_list_feature_info.py | 51 + .../models/phrase_list_feature_info_py3.py | 51 + .../models/phraselist_create_object.py | 47 + .../models/phraselist_create_object_py3.py | 47 + .../models/phraselist_update_object.py | 52 + .../models/phraselist_update_object_py3.py | 52 + .../luis/authoring/models/prebuilt_domain.py | 50 + .../prebuilt_domain_create_base_object.py | 29 + .../prebuilt_domain_create_base_object_py3.py | 29 + .../models/prebuilt_domain_create_object.py | 33 + .../prebuilt_domain_create_object_py3.py | 33 + .../authoring/models/prebuilt_domain_item.py | 36 + .../models/prebuilt_domain_item_py3.py | 36 + .../prebuilt_domain_model_create_object.py | 33 + ...prebuilt_domain_model_create_object_py3.py | 33 + .../models/prebuilt_domain_object.py | 32 + .../models/prebuilt_domain_object_py3.py | 32 + .../authoring/models/prebuilt_domain_py3.py | 50 + .../luis/authoring/models/prebuilt_entity.py | 32 + .../models/prebuilt_entity_extractor.py | 57 + .../models/prebuilt_entity_extractor_py3.py | 57 + .../authoring/models/prebuilt_entity_py3.py | 32 + .../production_or_staging_endpoint_info.py | 46 + ...production_or_staging_endpoint_info_py3.py | 46 + .../models/publish_setting_update_object.py | 38 + .../publish_setting_update_object_py3.py | 38 + .../luis/authoring/models/publish_settings.py | 53 + .../authoring/models/publish_settings_py3.py | 53 + .../luis/authoring/models/regex_entity.py | 36 + .../models/regex_entity_extractor.py | 61 + .../models/regex_entity_extractor_py3.py | 61 + .../luis/authoring/models/regex_entity_py3.py | 36 + .../models/regex_model_create_object.py | 32 + .../models/regex_model_create_object_py3.py | 32 + .../models/regex_model_update_object.py | 32 + .../models/regex_model_update_object_py3.py | 32 + .../luis/authoring/models/sub_closed_list.py | 32 + .../authoring/models/sub_closed_list_py3.py | 32 + .../models/sub_closed_list_response.py | 34 + .../models/sub_closed_list_response_py3.py | 34 + .../authoring/models/task_update_object.py | 28 + .../models/task_update_object_py3.py | 28 + .../luis/authoring/models/user_access_list.py | 32 + .../authoring/models/user_access_list_py3.py | 32 + .../authoring/models/user_collaborator.py | 28 + .../authoring/models/user_collaborator_py3.py | 28 + .../luis/authoring/models/version_info.py | 82 + .../luis/authoring/models/version_info_py3.py | 82 + .../models/word_list_base_update_object.py | 32 + .../word_list_base_update_object_py3.py | 32 + .../luis/authoring/models/word_list_object.py | 32 + .../authoring/models/word_list_object_py3.py | 32 + .../luis/authoring/operations/__init__.py | 30 + .../authoring/operations/apps_operations.py | 1158 +++ .../operations/examples_operations.py | 291 + .../operations/features_operations.py | 423 + .../authoring/operations/model_operations.py | 6851 +++++++++++++++++ .../operations/pattern_operations.py | 554 ++ .../operations/permissions_operations.py | 278 + .../authoring/operations/train_operations.py | 158 + .../operations/versions_operations.py | 529 ++ .../language/luis/authoring/version.py | 13 + .../language/luis/runtime/__init__.py | 18 + .../luis/runtime/luis_runtime_client.py | 78 + .../language/luis/runtime/models/__init__.py | 43 + .../language/luis/runtime/models/api_error.py | 45 + .../luis/runtime/models/api_error_py3.py | 45 + .../runtime/models/composite_child_model.py | 39 + .../models/composite_child_model_py3.py | 39 + .../runtime/models/composite_entity_model.py | 45 + .../models/composite_entity_model_py3.py | 45 + .../luis/runtime/models/entity_model.py | 56 + .../luis/runtime/models/entity_model_py3.py | 56 + .../runtime/models/entity_with_resolution.py | 57 + .../models/entity_with_resolution_py3.py | 57 + .../luis/runtime/models/entity_with_score.py | 57 + .../runtime/models/entity_with_score_py3.py | 57 + .../luis/runtime/models/intent_model.py | 36 + .../luis/runtime/models/intent_model_py3.py | 36 + .../luis/runtime/models/luis_result.py | 60 + .../luis/runtime/models/luis_result_py3.py | 60 + .../language/luis/runtime/models/sentiment.py | 34 + .../luis/runtime/models/sentiment_py3.py | 34 + .../luis/runtime/operations/__init__.py | 16 + .../operations/prediction_operations.py | 122 + .../language/luis/runtime/version.py | 13 + 240 files changed, 20162 insertions(+) create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/__init__.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/luis_authoring_client.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/__init__.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_create_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_create_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_info_response.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_info_response_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_publish_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_publish_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_setting_update_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_setting_update_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_settings.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_settings_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_update_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_update_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/available_culture.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/available_culture_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/available_prebuilt_entity_model.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/available_prebuilt_entity_model_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/batch_label_example.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/batch_label_example_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/child_entity.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/child_entity_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_entity_extractor.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_entity_extractor_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_create_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_create_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_patch_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_patch_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_update_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_update_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/collaborators_array.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/collaborators_array_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_child_model_create_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_child_model_create_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_entity_extractor.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_entity_extractor_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_entity_model.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_entity_model_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/custom_prebuilt_model.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/custom_prebuilt_model_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/endpoint_info.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/endpoint_info_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/enqueue_training_response.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/enqueue_training_response_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entities_suggestion_example.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entities_suggestion_example_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_extractor.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_extractor_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_label.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_label_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_label_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_label_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_model_info.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_model_info_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_prediction.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_prediction_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role_create_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role_create_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role_update_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role_update_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/error_response.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/error_response_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/example_label_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/example_label_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item_create_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item_create_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item_update_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item_update_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/feature_info_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/feature_info_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/features_response_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/features_response_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_entity.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_entity_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_model_create_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_model_create_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_model_update_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_model_update_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_entity_extractor.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_entity_extractor_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_entity_model.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_entity_model_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_model.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_model_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intent_classifier.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intent_classifier_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intent_prediction.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intent_prediction_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intents_suggestion_example.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intents_suggestion_example_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_entity.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_entity_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_model_feature.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_model_feature_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_regex_feature.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_regex_feature_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_utterance.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_utterance_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/label_example_response.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/label_example_response_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/label_text_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/label_text_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/labeled_utterance.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/labeled_utterance_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/luis_app.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/luis_app_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/luis_authoring_client_enums.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_create_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_create_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_info.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_info_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_info_response.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_info_response_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_training_details.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_training_details_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_training_info.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_training_info_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_update_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_update_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/operation_error.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/operation_error_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/operation_status.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/operation_status_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_entity_extractor.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_entity_extractor_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_model_create_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_model_create_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_model_update_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_model_update_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_create_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_create_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_feature_info.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_feature_info_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_create_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_create_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_info.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_info_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_update_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_update_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_update_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_update_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/personal_assistants_response.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/personal_assistants_response_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phrase_list_feature_info.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phrase_list_feature_info_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phraselist_create_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phraselist_create_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phraselist_update_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phraselist_update_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_create_base_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_create_base_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_create_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_create_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_item.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_item_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_model_create_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_model_create_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_entity.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_entity_extractor.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_entity_extractor_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_entity_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/production_or_staging_endpoint_info.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/production_or_staging_endpoint_info_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/publish_setting_update_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/publish_setting_update_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/publish_settings.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/publish_settings_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_entity.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_entity_extractor.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_entity_extractor_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_entity_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_model_create_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_model_create_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_model_update_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_model_update_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/sub_closed_list.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/sub_closed_list_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/sub_closed_list_response.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/sub_closed_list_response_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/task_update_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/task_update_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/user_access_list.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/user_access_list_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/user_collaborator.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/user_collaborator_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/version_info.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/version_info_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/word_list_base_update_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/word_list_base_update_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/word_list_object.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/word_list_object_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/__init__.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/apps_operations.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/examples_operations.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/features_operations.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/model_operations.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/pattern_operations.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/permissions_operations.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/train_operations.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/versions_operations.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/version.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/__init__.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/luis_runtime_client.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/__init__.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/api_error.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/api_error_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/composite_child_model.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/composite_child_model_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/composite_entity_model.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/composite_entity_model_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_model.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_model_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_resolution.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_resolution_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_score.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_score_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/intent_model.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/intent_model_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/luis_result.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/luis_result_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/sentiment.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/sentiment_py3.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/operations/__init__.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/operations/prediction_operations.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/version.py diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/__init__.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/__init__.py new file mode 100644 index 000000000000..f26d1f82f71c --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .luis_authoring_client import LUISAuthoringClient +from .version import VERSION + +__all__ = ['LUISAuthoringClient'] + +__version__ = VERSION + diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/luis_authoring_client.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/luis_authoring_client.py new file mode 100644 index 000000000000..b6563fe9d625 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/luis_authoring_client.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Configuration, Serializer, Deserializer +from .version import VERSION +from msrest.exceptions import HttpOperationError +from .operations.features_operations import FeaturesOperations +from .operations.examples_operations import ExamplesOperations +from .operations.model_operations import ModelOperations +from .operations.apps_operations import AppsOperations +from .operations.versions_operations import VersionsOperations +from .operations.train_operations import TrainOperations +from .operations.permissions_operations import PermissionsOperations +from .operations.pattern_operations import PatternOperations +from . import models + + +class LUISAuthoringClientConfiguration(Configuration): + """Configuration for LUISAuthoringClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param endpoint: Supported Cognitive Services endpoints (protocol and + hostname, for example: https://westus.api.cognitive.microsoft.com). + :type endpoint: str + :param credentials: Subscription credentials which uniquely identify + client subscription. + :type credentials: None + """ + + def __init__( + self, endpoint, credentials): + + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + base_url = '{Endpoint}/luis/api/v2.0' + + super(LUISAuthoringClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-cognitiveservices-language-luis/{}'.format(VERSION)) + + self.endpoint = endpoint + self.credentials = credentials + + +class LUISAuthoringClient(SDKClient): + """LUISAuthoringClient + + :ivar config: Configuration for client. + :vartype config: LUISAuthoringClientConfiguration + + :ivar features: Features operations + :vartype features: azure.cognitiveservices.language.luis.authoring.operations.FeaturesOperations + :ivar examples: Examples operations + :vartype examples: azure.cognitiveservices.language.luis.authoring.operations.ExamplesOperations + :ivar model: Model operations + :vartype model: azure.cognitiveservices.language.luis.authoring.operations.ModelOperations + :ivar apps: Apps operations + :vartype apps: azure.cognitiveservices.language.luis.authoring.operations.AppsOperations + :ivar versions: Versions operations + :vartype versions: azure.cognitiveservices.language.luis.authoring.operations.VersionsOperations + :ivar train: Train operations + :vartype train: azure.cognitiveservices.language.luis.authoring.operations.TrainOperations + :ivar permissions: Permissions operations + :vartype permissions: azure.cognitiveservices.language.luis.authoring.operations.PermissionsOperations + :ivar pattern: Pattern operations + :vartype pattern: azure.cognitiveservices.language.luis.authoring.operations.PatternOperations + + :param endpoint: Supported Cognitive Services endpoints (protocol and + hostname, for example: https://westus.api.cognitive.microsoft.com). + :type endpoint: str + :param credentials: Subscription credentials which uniquely identify + client subscription. + :type credentials: None + """ + + def __init__( + self, endpoint, credentials): + + self.config = LUISAuthoringClientConfiguration(endpoint, credentials) + super(LUISAuthoringClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2.0' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.features = FeaturesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.examples = ExamplesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.model = ModelOperations( + self._client, self.config, self._serialize, self._deserialize) + self.apps = AppsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.versions = VersionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.train = TrainOperations( + self._client, self.config, self._serialize, self._deserialize) + self.permissions = PermissionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.pattern = PatternOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/__init__.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/__init__.py new file mode 100644 index 000000000000..ee0e09955392 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/__init__.py @@ -0,0 +1,325 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +try: + from .entity_label_object_py3 import EntityLabelObject + from .application_create_object_py3 import ApplicationCreateObject + from .prebuilt_domain_create_base_object_py3 import PrebuiltDomainCreateBaseObject + from .prebuilt_domain_create_object_py3 import PrebuiltDomainCreateObject + from .prebuilt_domain_model_create_object_py3 import PrebuiltDomainModelCreateObject + from .hierarchical_entity_model_py3 import HierarchicalEntityModel + from .composite_entity_model_py3 import CompositeEntityModel + from .json_entity_py3 import JSONEntity + from .application_setting_update_object_py3 import ApplicationSettingUpdateObject + from .publish_setting_update_object_py3 import PublishSettingUpdateObject + from .example_label_object_py3 import ExampleLabelObject + from .phraselist_create_object_py3 import PhraselistCreateObject + from .sub_closed_list_py3 import SubClosedList + from .sub_closed_list_response_py3 import SubClosedListResponse + from .application_update_object_py3 import ApplicationUpdateObject + from .json_regex_feature_py3 import JSONRegexFeature + from .pattern_update_object_py3 import PatternUpdateObject + from .closed_list_py3 import ClosedList + from .word_list_object_py3 import WordListObject + from .closed_list_model_patch_object_py3 import ClosedListModelPatchObject + from .json_model_feature_py3 import JSONModelFeature + from .model_create_object_py3 import ModelCreateObject + from .pattern_create_object_py3 import PatternCreateObject + from .word_list_base_update_object_py3 import WordListBaseUpdateObject + from .json_utterance_py3 import JSONUtterance + from .model_update_object_py3 import ModelUpdateObject + from .closed_list_model_update_object_py3 import ClosedListModelUpdateObject + from .closed_list_model_create_object_py3 import ClosedListModelCreateObject + from .version_info_py3 import VersionInfo + from .task_update_object_py3 import TaskUpdateObject + from .phraselist_update_object_py3 import PhraselistUpdateObject + from .prebuilt_domain_object_py3 import PrebuiltDomainObject + from .hierarchical_model_py3 import HierarchicalModel + from .application_publish_object_py3 import ApplicationPublishObject + from .pattern_any_py3 import PatternAny + from .regex_entity_py3 import RegexEntity + from .prebuilt_entity_py3 import PrebuiltEntity + from .pattern_rule_py3 import PatternRule + from .luis_app_py3 import LuisApp + from .entity_label_py3 import EntityLabel + from .intent_prediction_py3 import IntentPrediction + from .entity_prediction_py3 import EntityPrediction + from .labeled_utterance_py3 import LabeledUtterance + from .intents_suggestion_example_py3 import IntentsSuggestionExample + from .entities_suggestion_example_py3 import EntitiesSuggestionExample + from .personal_assistants_response_py3 import PersonalAssistantsResponse + from .model_info_py3 import ModelInfo + from .entity_role_py3 import EntityRole + from .child_entity_py3 import ChildEntity + from .explicit_list_item_py3 import ExplicitListItem + from .model_info_response_py3 import ModelInfoResponse + from .entity_model_info_py3 import EntityModelInfo + from .hierarchical_entity_extractor_py3 import HierarchicalEntityExtractor + from .composite_entity_extractor_py3 import CompositeEntityExtractor + from .closed_list_entity_extractor_py3 import ClosedListEntityExtractor + from .prebuilt_entity_extractor_py3 import PrebuiltEntityExtractor + from .hierarchical_child_entity_py3 import HierarchicalChildEntity + from .custom_prebuilt_model_py3 import CustomPrebuiltModel + from .intent_classifier_py3 import IntentClassifier + from .entity_extractor_py3 import EntityExtractor + from .phrase_list_feature_info_py3 import PhraseListFeatureInfo + from .pattern_feature_info_py3 import PatternFeatureInfo + from .features_response_object_py3 import FeaturesResponseObject + from .feature_info_object_py3 import FeatureInfoObject + from .label_example_response_py3 import LabelExampleResponse + from .operation_status_py3 import OperationStatus + from .batch_label_example_py3 import BatchLabelExample + from .application_info_response_py3 import ApplicationInfoResponse + from .production_or_staging_endpoint_info_py3 import ProductionOrStagingEndpointInfo + from .endpoint_info_py3 import EndpointInfo + from .available_culture_py3 import AvailableCulture + from .application_settings_py3 import ApplicationSettings + from .publish_settings_py3 import PublishSettings + from .available_prebuilt_entity_model_py3 import AvailablePrebuiltEntityModel + from .enqueue_training_response_py3 import EnqueueTrainingResponse + from .model_training_details_py3 import ModelTrainingDetails + from .model_training_info_py3 import ModelTrainingInfo + from .user_access_list_py3 import UserAccessList + from .user_collaborator_py3 import UserCollaborator + from .collaborators_array_py3 import CollaboratorsArray + from .error_response_py3 import ErrorResponse, ErrorResponseException + from .operation_error_py3 import OperationError + from .prebuilt_domain_item_py3 import PrebuiltDomainItem + from .prebuilt_domain_py3 import PrebuiltDomain + from .entity_role_create_object_py3 import EntityRoleCreateObject + from .regex_model_create_object_py3 import RegexModelCreateObject + from .pattern_any_model_create_object_py3 import PatternAnyModelCreateObject + from .explicit_list_item_create_object_py3 import ExplicitListItemCreateObject + from .regex_model_update_object_py3 import RegexModelUpdateObject + from .pattern_any_model_update_object_py3 import PatternAnyModelUpdateObject + from .entity_role_update_object_py3 import EntityRoleUpdateObject + from .explicit_list_item_update_object_py3 import ExplicitListItemUpdateObject + from .pattern_rule_create_object_py3 import PatternRuleCreateObject + from .pattern_rule_update_object_py3 import PatternRuleUpdateObject + from .regex_entity_extractor_py3 import RegexEntityExtractor + from .pattern_any_entity_extractor_py3 import PatternAnyEntityExtractor + from .pattern_rule_info_py3 import PatternRuleInfo + from .label_text_object_py3 import LabelTextObject + from .hierarchical_child_model_update_object_py3 import HierarchicalChildModelUpdateObject + from .hierarchical_child_model_create_object_py3 import HierarchicalChildModelCreateObject + from .composite_child_model_create_object_py3 import CompositeChildModelCreateObject +except (SyntaxError, ImportError): + from .entity_label_object import EntityLabelObject + from .application_create_object import ApplicationCreateObject + from .prebuilt_domain_create_base_object import PrebuiltDomainCreateBaseObject + from .prebuilt_domain_create_object import PrebuiltDomainCreateObject + from .prebuilt_domain_model_create_object import PrebuiltDomainModelCreateObject + from .hierarchical_entity_model import HierarchicalEntityModel + from .composite_entity_model import CompositeEntityModel + from .json_entity import JSONEntity + from .application_setting_update_object import ApplicationSettingUpdateObject + from .publish_setting_update_object import PublishSettingUpdateObject + from .example_label_object import ExampleLabelObject + from .phraselist_create_object import PhraselistCreateObject + from .sub_closed_list import SubClosedList + from .sub_closed_list_response import SubClosedListResponse + from .application_update_object import ApplicationUpdateObject + from .json_regex_feature import JSONRegexFeature + from .pattern_update_object import PatternUpdateObject + from .closed_list import ClosedList + from .word_list_object import WordListObject + from .closed_list_model_patch_object import ClosedListModelPatchObject + from .json_model_feature import JSONModelFeature + from .model_create_object import ModelCreateObject + from .pattern_create_object import PatternCreateObject + from .word_list_base_update_object import WordListBaseUpdateObject + from .json_utterance import JSONUtterance + from .model_update_object import ModelUpdateObject + from .closed_list_model_update_object import ClosedListModelUpdateObject + from .closed_list_model_create_object import ClosedListModelCreateObject + from .version_info import VersionInfo + from .task_update_object import TaskUpdateObject + from .phraselist_update_object import PhraselistUpdateObject + from .prebuilt_domain_object import PrebuiltDomainObject + from .hierarchical_model import HierarchicalModel + from .application_publish_object import ApplicationPublishObject + from .pattern_any import PatternAny + from .regex_entity import RegexEntity + from .prebuilt_entity import PrebuiltEntity + from .pattern_rule import PatternRule + from .luis_app import LuisApp + from .entity_label import EntityLabel + from .intent_prediction import IntentPrediction + from .entity_prediction import EntityPrediction + from .labeled_utterance import LabeledUtterance + from .intents_suggestion_example import IntentsSuggestionExample + from .entities_suggestion_example import EntitiesSuggestionExample + from .personal_assistants_response import PersonalAssistantsResponse + from .model_info import ModelInfo + from .entity_role import EntityRole + from .child_entity import ChildEntity + from .explicit_list_item import ExplicitListItem + from .model_info_response import ModelInfoResponse + from .entity_model_info import EntityModelInfo + from .hierarchical_entity_extractor import HierarchicalEntityExtractor + from .composite_entity_extractor import CompositeEntityExtractor + from .closed_list_entity_extractor import ClosedListEntityExtractor + from .prebuilt_entity_extractor import PrebuiltEntityExtractor + from .hierarchical_child_entity import HierarchicalChildEntity + from .custom_prebuilt_model import CustomPrebuiltModel + from .intent_classifier import IntentClassifier + from .entity_extractor import EntityExtractor + from .phrase_list_feature_info import PhraseListFeatureInfo + from .pattern_feature_info import PatternFeatureInfo + from .features_response_object import FeaturesResponseObject + from .feature_info_object import FeatureInfoObject + from .label_example_response import LabelExampleResponse + from .operation_status import OperationStatus + from .batch_label_example import BatchLabelExample + from .application_info_response import ApplicationInfoResponse + from .production_or_staging_endpoint_info import ProductionOrStagingEndpointInfo + from .endpoint_info import EndpointInfo + from .available_culture import AvailableCulture + from .application_settings import ApplicationSettings + from .publish_settings import PublishSettings + from .available_prebuilt_entity_model import AvailablePrebuiltEntityModel + from .enqueue_training_response import EnqueueTrainingResponse + from .model_training_details import ModelTrainingDetails + from .model_training_info import ModelTrainingInfo + from .user_access_list import UserAccessList + from .user_collaborator import UserCollaborator + from .collaborators_array import CollaboratorsArray + from .error_response import ErrorResponse, ErrorResponseException + from .operation_error import OperationError + from .prebuilt_domain_item import PrebuiltDomainItem + from .prebuilt_domain import PrebuiltDomain + from .entity_role_create_object import EntityRoleCreateObject + from .regex_model_create_object import RegexModelCreateObject + from .pattern_any_model_create_object import PatternAnyModelCreateObject + from .explicit_list_item_create_object import ExplicitListItemCreateObject + from .regex_model_update_object import RegexModelUpdateObject + from .pattern_any_model_update_object import PatternAnyModelUpdateObject + from .entity_role_update_object import EntityRoleUpdateObject + from .explicit_list_item_update_object import ExplicitListItemUpdateObject + from .pattern_rule_create_object import PatternRuleCreateObject + from .pattern_rule_update_object import PatternRuleUpdateObject + from .regex_entity_extractor import RegexEntityExtractor + from .pattern_any_entity_extractor import PatternAnyEntityExtractor + from .pattern_rule_info import PatternRuleInfo + from .label_text_object import LabelTextObject + from .hierarchical_child_model_update_object import HierarchicalChildModelUpdateObject + from .hierarchical_child_model_create_object import HierarchicalChildModelCreateObject + from .composite_child_model_create_object import CompositeChildModelCreateObject +from .luis_authoring_client_enums import ( + TrainingStatus, + OperationStatusType, +) + +__all__ = [ + 'EntityLabelObject', + 'ApplicationCreateObject', + 'PrebuiltDomainCreateBaseObject', + 'PrebuiltDomainCreateObject', + 'PrebuiltDomainModelCreateObject', + 'HierarchicalEntityModel', + 'CompositeEntityModel', + 'JSONEntity', + 'ApplicationSettingUpdateObject', + 'PublishSettingUpdateObject', + 'ExampleLabelObject', + 'PhraselistCreateObject', + 'SubClosedList', + 'SubClosedListResponse', + 'ApplicationUpdateObject', + 'JSONRegexFeature', + 'PatternUpdateObject', + 'ClosedList', + 'WordListObject', + 'ClosedListModelPatchObject', + 'JSONModelFeature', + 'ModelCreateObject', + 'PatternCreateObject', + 'WordListBaseUpdateObject', + 'JSONUtterance', + 'ModelUpdateObject', + 'ClosedListModelUpdateObject', + 'ClosedListModelCreateObject', + 'VersionInfo', + 'TaskUpdateObject', + 'PhraselistUpdateObject', + 'PrebuiltDomainObject', + 'HierarchicalModel', + 'ApplicationPublishObject', + 'PatternAny', + 'RegexEntity', + 'PrebuiltEntity', + 'PatternRule', + 'LuisApp', + 'EntityLabel', + 'IntentPrediction', + 'EntityPrediction', + 'LabeledUtterance', + 'IntentsSuggestionExample', + 'EntitiesSuggestionExample', + 'PersonalAssistantsResponse', + 'ModelInfo', + 'EntityRole', + 'ChildEntity', + 'ExplicitListItem', + 'ModelInfoResponse', + 'EntityModelInfo', + 'HierarchicalEntityExtractor', + 'CompositeEntityExtractor', + 'ClosedListEntityExtractor', + 'PrebuiltEntityExtractor', + 'HierarchicalChildEntity', + 'CustomPrebuiltModel', + 'IntentClassifier', + 'EntityExtractor', + 'PhraseListFeatureInfo', + 'PatternFeatureInfo', + 'FeaturesResponseObject', + 'FeatureInfoObject', + 'LabelExampleResponse', + 'OperationStatus', + 'BatchLabelExample', + 'ApplicationInfoResponse', + 'ProductionOrStagingEndpointInfo', + 'EndpointInfo', + 'AvailableCulture', + 'ApplicationSettings', + 'PublishSettings', + 'AvailablePrebuiltEntityModel', + 'EnqueueTrainingResponse', + 'ModelTrainingDetails', + 'ModelTrainingInfo', + 'UserAccessList', + 'UserCollaborator', + 'CollaboratorsArray', + 'ErrorResponse', 'ErrorResponseException', + 'OperationError', + 'PrebuiltDomainItem', + 'PrebuiltDomain', + 'EntityRoleCreateObject', + 'RegexModelCreateObject', + 'PatternAnyModelCreateObject', + 'ExplicitListItemCreateObject', + 'RegexModelUpdateObject', + 'PatternAnyModelUpdateObject', + 'EntityRoleUpdateObject', + 'ExplicitListItemUpdateObject', + 'PatternRuleCreateObject', + 'PatternRuleUpdateObject', + 'RegexEntityExtractor', + 'PatternAnyEntityExtractor', + 'PatternRuleInfo', + 'LabelTextObject', + 'HierarchicalChildModelUpdateObject', + 'HierarchicalChildModelCreateObject', + 'CompositeChildModelCreateObject', + 'TrainingStatus', + 'OperationStatusType', +] diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_create_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_create_object.py new file mode 100644 index 000000000000..7f57ee2d18f2 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_create_object.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationCreateObject(Model): + """Properties for creating a new LUIS Application. + + All required parameters must be populated in order to send to Azure. + + :param culture: Required. The culture for the new application. It is the + language that your app understands and speaks. E.g.: "en-us". Note: the + culture cannot be changed after the app is created. + :type culture: str + :param domain: The domain for the new application. Optional. E.g.: Comics. + :type domain: str + :param description: Description of the new application. Optional. + :type description: str + :param initial_version_id: The initial version ID. Optional. Default value + is: "0.1" + :type initial_version_id: str + :param usage_scenario: Defines the scenario for the new application. + Optional. E.g.: IoT. + :type usage_scenario: str + :param name: Required. The name for the new application. + :type name: str + """ + + _validation = { + 'culture': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'culture': {'key': 'culture', 'type': 'str'}, + 'domain': {'key': 'domain', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'initial_version_id': {'key': 'initialVersionId', 'type': 'str'}, + 'usage_scenario': {'key': 'usageScenario', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationCreateObject, self).__init__(**kwargs) + self.culture = kwargs.get('culture', None) + self.domain = kwargs.get('domain', None) + self.description = kwargs.get('description', None) + self.initial_version_id = kwargs.get('initial_version_id', None) + self.usage_scenario = kwargs.get('usage_scenario', None) + self.name = kwargs.get('name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_create_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_create_object_py3.py new file mode 100644 index 000000000000..88c8e1756f84 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_create_object_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationCreateObject(Model): + """Properties for creating a new LUIS Application. + + All required parameters must be populated in order to send to Azure. + + :param culture: Required. The culture for the new application. It is the + language that your app understands and speaks. E.g.: "en-us". Note: the + culture cannot be changed after the app is created. + :type culture: str + :param domain: The domain for the new application. Optional. E.g.: Comics. + :type domain: str + :param description: Description of the new application. Optional. + :type description: str + :param initial_version_id: The initial version ID. Optional. Default value + is: "0.1" + :type initial_version_id: str + :param usage_scenario: Defines the scenario for the new application. + Optional. E.g.: IoT. + :type usage_scenario: str + :param name: Required. The name for the new application. + :type name: str + """ + + _validation = { + 'culture': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'culture': {'key': 'culture', 'type': 'str'}, + 'domain': {'key': 'domain', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'initial_version_id': {'key': 'initialVersionId', 'type': 'str'}, + 'usage_scenario': {'key': 'usageScenario', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, culture: str, name: str, domain: str=None, description: str=None, initial_version_id: str=None, usage_scenario: str=None, **kwargs) -> None: + super(ApplicationCreateObject, self).__init__(**kwargs) + self.culture = culture + self.domain = domain + self.description = description + self.initial_version_id = initial_version_id + self.usage_scenario = usage_scenario + self.name = name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_info_response.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_info_response.py new file mode 100644 index 000000000000..8bfc55762b7c --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_info_response.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationInfoResponse(Model): + """Response containing the Application Info. + + :param id: The ID (GUID) of the application. + :type id: str + :param name: The name of the application. + :type name: str + :param description: The description of the application. + :type description: str + :param culture: The culture of the application. E.g.: en-us. + :type culture: str + :param usage_scenario: Defines the scenario for the new application. + Optional. E.g.: IoT. + :type usage_scenario: str + :param domain: The domain for the new application. Optional. E.g.: Comics. + :type domain: str + :param versions_count: Amount of model versions within the application. + :type versions_count: int + :param created_date_time: The version's creation timestamp. + :type created_date_time: str + :param endpoints: The Runtime endpoint URL for this model version. + :type endpoints: object + :param endpoint_hits_count: Number of calls made to this endpoint. + :type endpoint_hits_count: int + :param active_version: The version ID currently marked as active. + :type active_version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'culture': {'key': 'culture', 'type': 'str'}, + 'usage_scenario': {'key': 'usageScenario', 'type': 'str'}, + 'domain': {'key': 'domain', 'type': 'str'}, + 'versions_count': {'key': 'versionsCount', 'type': 'int'}, + 'created_date_time': {'key': 'createdDateTime', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': 'object'}, + 'endpoint_hits_count': {'key': 'endpointHitsCount', 'type': 'int'}, + 'active_version': {'key': 'activeVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationInfoResponse, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.culture = kwargs.get('culture', None) + self.usage_scenario = kwargs.get('usage_scenario', None) + self.domain = kwargs.get('domain', None) + self.versions_count = kwargs.get('versions_count', None) + self.created_date_time = kwargs.get('created_date_time', None) + self.endpoints = kwargs.get('endpoints', None) + self.endpoint_hits_count = kwargs.get('endpoint_hits_count', None) + self.active_version = kwargs.get('active_version', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_info_response_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_info_response_py3.py new file mode 100644 index 000000000000..0aa99a4257c2 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_info_response_py3.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationInfoResponse(Model): + """Response containing the Application Info. + + :param id: The ID (GUID) of the application. + :type id: str + :param name: The name of the application. + :type name: str + :param description: The description of the application. + :type description: str + :param culture: The culture of the application. E.g.: en-us. + :type culture: str + :param usage_scenario: Defines the scenario for the new application. + Optional. E.g.: IoT. + :type usage_scenario: str + :param domain: The domain for the new application. Optional. E.g.: Comics. + :type domain: str + :param versions_count: Amount of model versions within the application. + :type versions_count: int + :param created_date_time: The version's creation timestamp. + :type created_date_time: str + :param endpoints: The Runtime endpoint URL for this model version. + :type endpoints: object + :param endpoint_hits_count: Number of calls made to this endpoint. + :type endpoint_hits_count: int + :param active_version: The version ID currently marked as active. + :type active_version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'culture': {'key': 'culture', 'type': 'str'}, + 'usage_scenario': {'key': 'usageScenario', 'type': 'str'}, + 'domain': {'key': 'domain', 'type': 'str'}, + 'versions_count': {'key': 'versionsCount', 'type': 'int'}, + 'created_date_time': {'key': 'createdDateTime', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': 'object'}, + 'endpoint_hits_count': {'key': 'endpointHitsCount', 'type': 'int'}, + 'active_version': {'key': 'activeVersion', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, description: str=None, culture: str=None, usage_scenario: str=None, domain: str=None, versions_count: int=None, created_date_time: str=None, endpoints=None, endpoint_hits_count: int=None, active_version: str=None, **kwargs) -> None: + super(ApplicationInfoResponse, self).__init__(**kwargs) + self.id = id + self.name = name + self.description = description + self.culture = culture + self.usage_scenario = usage_scenario + self.domain = domain + self.versions_count = versions_count + self.created_date_time = created_date_time + self.endpoints = endpoints + self.endpoint_hits_count = endpoint_hits_count + self.active_version = active_version diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_publish_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_publish_object.py new file mode 100644 index 000000000000..756b803da141 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_publish_object.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationPublishObject(Model): + """Object model for publishing a specific application version. + + :param version_id: The version ID to publish. + :type version_id: str + :param is_staging: Indicates if the staging slot should be used, instead + of the Production one. Default value: False . + :type is_staging: bool + :param region: The target region that the application is published to. + :type region: str + """ + + _attribute_map = { + 'version_id': {'key': 'versionId', 'type': 'str'}, + 'is_staging': {'key': 'isStaging', 'type': 'bool'}, + 'region': {'key': 'region', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationPublishObject, self).__init__(**kwargs) + self.version_id = kwargs.get('version_id', None) + self.is_staging = kwargs.get('is_staging', False) + self.region = kwargs.get('region', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_publish_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_publish_object_py3.py new file mode 100644 index 000000000000..9064fb0e6440 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_publish_object_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationPublishObject(Model): + """Object model for publishing a specific application version. + + :param version_id: The version ID to publish. + :type version_id: str + :param is_staging: Indicates if the staging slot should be used, instead + of the Production one. Default value: False . + :type is_staging: bool + :param region: The target region that the application is published to. + :type region: str + """ + + _attribute_map = { + 'version_id': {'key': 'versionId', 'type': 'str'}, + 'is_staging': {'key': 'isStaging', 'type': 'bool'}, + 'region': {'key': 'region', 'type': 'str'}, + } + + def __init__(self, *, version_id: str=None, is_staging: bool=False, region: str=None, **kwargs) -> None: + super(ApplicationPublishObject, self).__init__(**kwargs) + self.version_id = version_id + self.is_staging = is_staging + self.region = region diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_setting_update_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_setting_update_object.py new file mode 100644 index 000000000000..b5c46a828235 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_setting_update_object.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationSettingUpdateObject(Model): + """Object model for updating an application's settings. + + :param public: Setting your application as public allows other people to + use your application's endpoint using their own keys. + :type public: bool + """ + + _attribute_map = { + 'public': {'key': 'public', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ApplicationSettingUpdateObject, self).__init__(**kwargs) + self.public = kwargs.get('public', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_setting_update_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_setting_update_object_py3.py new file mode 100644 index 000000000000..c5bcc5001375 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_setting_update_object_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationSettingUpdateObject(Model): + """Object model for updating an application's settings. + + :param public: Setting your application as public allows other people to + use your application's endpoint using their own keys. + :type public: bool + """ + + _attribute_map = { + 'public': {'key': 'public', 'type': 'bool'}, + } + + def __init__(self, *, public: bool=None, **kwargs) -> None: + super(ApplicationSettingUpdateObject, self).__init__(**kwargs) + self.public = public diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_settings.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_settings.py new file mode 100644 index 000000000000..c43606461e68 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_settings.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationSettings(Model): + """The application settings. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The application ID. + :type id: str + :param is_public: Required. Setting your application as public allows + other people to use your application's endpoint using their own keys. + :type is_public: bool + """ + + _validation = { + 'id': {'required': True}, + 'is_public': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'is_public': {'key': 'public', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ApplicationSettings, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.is_public = kwargs.get('is_public', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_settings_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_settings_py3.py new file mode 100644 index 000000000000..4f83bc503dd5 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_settings_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationSettings(Model): + """The application settings. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The application ID. + :type id: str + :param is_public: Required. Setting your application as public allows + other people to use your application's endpoint using their own keys. + :type is_public: bool + """ + + _validation = { + 'id': {'required': True}, + 'is_public': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'is_public': {'key': 'public', 'type': 'bool'}, + } + + def __init__(self, *, id: str, is_public: bool, **kwargs) -> None: + super(ApplicationSettings, self).__init__(**kwargs) + self.id = id + self.is_public = is_public diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_update_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_update_object.py new file mode 100644 index 000000000000..db8c5ada5fb5 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_update_object.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationUpdateObject(Model): + """Object model for updating the name or description of an application. + + :param name: The application's new name. + :type name: str + :param description: The application's new description. + :type description: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationUpdateObject, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_update_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_update_object_py3.py new file mode 100644 index 000000000000..bd238a339c57 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_update_object_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationUpdateObject(Model): + """Object model for updating the name or description of an application. + + :param name: The application's new name. + :type name: str + :param description: The application's new description. + :type description: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, description: str=None, **kwargs) -> None: + super(ApplicationUpdateObject, self).__init__(**kwargs) + self.name = name + self.description = description diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/available_culture.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/available_culture.py new file mode 100644 index 000000000000..6ff124d1249c --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/available_culture.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AvailableCulture(Model): + """Available culture for using in a new application. + + :param name: The language name. + :type name: str + :param code: The ISO value for the language. + :type code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AvailableCulture, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.code = kwargs.get('code', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/available_culture_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/available_culture_py3.py new file mode 100644 index 000000000000..ee056cef8914 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/available_culture_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AvailableCulture(Model): + """Available culture for using in a new application. + + :param name: The language name. + :type name: str + :param code: The ISO value for the language. + :type code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, code: str=None, **kwargs) -> None: + super(AvailableCulture, self).__init__(**kwargs) + self.name = name + self.code = code diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/available_prebuilt_entity_model.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/available_prebuilt_entity_model.py new file mode 100644 index 000000000000..c3c709a4b7e8 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/available_prebuilt_entity_model.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AvailablePrebuiltEntityModel(Model): + """Available Prebuilt entity model for using in an application. + + :param name: The entity name. + :type name: str + :param description: The entity description and usage information. + :type description: str + :param examples: Usage examples. + :type examples: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'examples': {'key': 'examples', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AvailablePrebuiltEntityModel, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.examples = kwargs.get('examples', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/available_prebuilt_entity_model_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/available_prebuilt_entity_model_py3.py new file mode 100644 index 000000000000..214e0e781840 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/available_prebuilt_entity_model_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AvailablePrebuiltEntityModel(Model): + """Available Prebuilt entity model for using in an application. + + :param name: The entity name. + :type name: str + :param description: The entity description and usage information. + :type description: str + :param examples: Usage examples. + :type examples: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'examples': {'key': 'examples', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, description: str=None, examples: str=None, **kwargs) -> None: + super(AvailablePrebuiltEntityModel, self).__init__(**kwargs) + self.name = name + self.description = description + self.examples = examples diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/batch_label_example.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/batch_label_example.py new file mode 100644 index 000000000000..ef22dc4cc368 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/batch_label_example.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BatchLabelExample(Model): + """Response when adding a batch of labeled examples. + + :param value: + :type value: + ~azure.cognitiveservices.language.luis.authoring.models.LabelExampleResponse + :param has_error: + :type has_error: bool + :param error: + :type error: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'LabelExampleResponse'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'error': {'key': 'error', 'type': 'OperationStatus'}, + } + + def __init__(self, **kwargs): + super(BatchLabelExample, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.has_error = kwargs.get('has_error', None) + self.error = kwargs.get('error', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/batch_label_example_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/batch_label_example_py3.py new file mode 100644 index 000000000000..aeaaa11185eb --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/batch_label_example_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BatchLabelExample(Model): + """Response when adding a batch of labeled examples. + + :param value: + :type value: + ~azure.cognitiveservices.language.luis.authoring.models.LabelExampleResponse + :param has_error: + :type has_error: bool + :param error: + :type error: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'LabelExampleResponse'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'error': {'key': 'error', 'type': 'OperationStatus'}, + } + + def __init__(self, *, value=None, has_error: bool=None, error=None, **kwargs) -> None: + super(BatchLabelExample, self).__init__(**kwargs) + self.value = value + self.has_error = has_error + self.error = error diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/child_entity.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/child_entity.py new file mode 100644 index 000000000000..2140a8292d41 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/child_entity.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChildEntity(Model): + """The base child entity type. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID (GUID) belonging to a child entity. + :type id: str + :param name: The name of a child entity. + :type name: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ChildEntity, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/child_entity_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/child_entity_py3.py new file mode 100644 index 000000000000..1eefcf49a464 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/child_entity_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChildEntity(Model): + """The base child entity type. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID (GUID) belonging to a child entity. + :type id: str + :param name: The name of a child entity. + :type name: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, id: str, name: str=None, **kwargs) -> None: + super(ChildEntity, self).__init__(**kwargs) + self.id = id + self.name = name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list.py new file mode 100644 index 000000000000..231dada76d24 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClosedList(Model): + """Exported Model - A Closed List. + + :param name: Name of the closed list feature. + :type name: str + :param sub_lists: Sublists for the feature. + :type sub_lists: + list[~azure.cognitiveservices.language.luis.authoring.models.SubClosedList] + :param roles: + :type roles: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'sub_lists': {'key': 'subLists', 'type': '[SubClosedList]'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ClosedList, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.sub_lists = kwargs.get('sub_lists', None) + self.roles = kwargs.get('roles', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_entity_extractor.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_entity_extractor.py new file mode 100644 index 000000000000..ee8ade0fdc75 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_entity_extractor.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClosedListEntityExtractor(Model): + """Closed List Entity Extractor. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param roles: + :type roles: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + :param sub_lists: List of sub-lists. + :type sub_lists: + list[~azure.cognitiveservices.language.luis.authoring.models.SubClosedListResponse] + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[EntityRole]'}, + 'sub_lists': {'key': 'subLists', 'type': '[SubClosedListResponse]'}, + } + + def __init__(self, **kwargs): + super(ClosedListEntityExtractor, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type_id = kwargs.get('type_id', None) + self.readable_type = kwargs.get('readable_type', None) + self.roles = kwargs.get('roles', None) + self.sub_lists = kwargs.get('sub_lists', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_entity_extractor_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_entity_extractor_py3.py new file mode 100644 index 000000000000..42ced309b058 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_entity_extractor_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClosedListEntityExtractor(Model): + """Closed List Entity Extractor. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param roles: + :type roles: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + :param sub_lists: List of sub-lists. + :type sub_lists: + list[~azure.cognitiveservices.language.luis.authoring.models.SubClosedListResponse] + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[EntityRole]'}, + 'sub_lists': {'key': 'subLists', 'type': '[SubClosedListResponse]'}, + } + + def __init__(self, *, id: str, readable_type, name: str=None, type_id: int=None, roles=None, sub_lists=None, **kwargs) -> None: + super(ClosedListEntityExtractor, self).__init__(**kwargs) + self.id = id + self.name = name + self.type_id = type_id + self.readable_type = readable_type + self.roles = roles + self.sub_lists = sub_lists diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_create_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_create_object.py new file mode 100644 index 000000000000..d420e6791575 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_create_object.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClosedListModelCreateObject(Model): + """Object model for creating a closed list. + + :param sub_lists: Sublists for the feature. + :type sub_lists: + list[~azure.cognitiveservices.language.luis.authoring.models.WordListObject] + :param name: Name of the closed list feature. + :type name: str + """ + + _attribute_map = { + 'sub_lists': {'key': 'subLists', 'type': '[WordListObject]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClosedListModelCreateObject, self).__init__(**kwargs) + self.sub_lists = kwargs.get('sub_lists', None) + self.name = kwargs.get('name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_create_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_create_object_py3.py new file mode 100644 index 000000000000..bb71e1d40a46 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_create_object_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClosedListModelCreateObject(Model): + """Object model for creating a closed list. + + :param sub_lists: Sublists for the feature. + :type sub_lists: + list[~azure.cognitiveservices.language.luis.authoring.models.WordListObject] + :param name: Name of the closed list feature. + :type name: str + """ + + _attribute_map = { + 'sub_lists': {'key': 'subLists', 'type': '[WordListObject]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, sub_lists=None, name: str=None, **kwargs) -> None: + super(ClosedListModelCreateObject, self).__init__(**kwargs) + self.sub_lists = sub_lists + self.name = name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_patch_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_patch_object.py new file mode 100644 index 000000000000..d77e774cdda8 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_patch_object.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClosedListModelPatchObject(Model): + """Object model for adding a batch of sublists to an existing closedlist. + + :param sub_lists: Sublists to add. + :type sub_lists: + list[~azure.cognitiveservices.language.luis.authoring.models.WordListObject] + """ + + _attribute_map = { + 'sub_lists': {'key': 'subLists', 'type': '[WordListObject]'}, + } + + def __init__(self, **kwargs): + super(ClosedListModelPatchObject, self).__init__(**kwargs) + self.sub_lists = kwargs.get('sub_lists', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_patch_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_patch_object_py3.py new file mode 100644 index 000000000000..cd1615f342bf --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_patch_object_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClosedListModelPatchObject(Model): + """Object model for adding a batch of sublists to an existing closedlist. + + :param sub_lists: Sublists to add. + :type sub_lists: + list[~azure.cognitiveservices.language.luis.authoring.models.WordListObject] + """ + + _attribute_map = { + 'sub_lists': {'key': 'subLists', 'type': '[WordListObject]'}, + } + + def __init__(self, *, sub_lists=None, **kwargs) -> None: + super(ClosedListModelPatchObject, self).__init__(**kwargs) + self.sub_lists = sub_lists diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_update_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_update_object.py new file mode 100644 index 000000000000..c9a72314d9bf --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_update_object.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClosedListModelUpdateObject(Model): + """Object model for updating a closed list. + + :param sub_lists: The new sublists for the feature. + :type sub_lists: + list[~azure.cognitiveservices.language.luis.authoring.models.WordListObject] + :param name: The new name of the closed list feature. + :type name: str + """ + + _attribute_map = { + 'sub_lists': {'key': 'subLists', 'type': '[WordListObject]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClosedListModelUpdateObject, self).__init__(**kwargs) + self.sub_lists = kwargs.get('sub_lists', None) + self.name = kwargs.get('name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_update_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_update_object_py3.py new file mode 100644 index 000000000000..8ca10a2d1d7d --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_model_update_object_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClosedListModelUpdateObject(Model): + """Object model for updating a closed list. + + :param sub_lists: The new sublists for the feature. + :type sub_lists: + list[~azure.cognitiveservices.language.luis.authoring.models.WordListObject] + :param name: The new name of the closed list feature. + :type name: str + """ + + _attribute_map = { + 'sub_lists': {'key': 'subLists', 'type': '[WordListObject]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, sub_lists=None, name: str=None, **kwargs) -> None: + super(ClosedListModelUpdateObject, self).__init__(**kwargs) + self.sub_lists = sub_lists + self.name = name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_py3.py new file mode 100644 index 000000000000..25c22b8b77ea --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/closed_list_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClosedList(Model): + """Exported Model - A Closed List. + + :param name: Name of the closed list feature. + :type name: str + :param sub_lists: Sublists for the feature. + :type sub_lists: + list[~azure.cognitiveservices.language.luis.authoring.models.SubClosedList] + :param roles: + :type roles: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'sub_lists': {'key': 'subLists', 'type': '[SubClosedList]'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + } + + def __init__(self, *, name: str=None, sub_lists=None, roles=None, **kwargs) -> None: + super(ClosedList, self).__init__(**kwargs) + self.name = name + self.sub_lists = sub_lists + self.roles = roles diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/collaborators_array.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/collaborators_array.py new file mode 100644 index 000000000000..c4088f683169 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/collaborators_array.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CollaboratorsArray(Model): + """CollaboratorsArray. + + :param emails: The email address of the users. + :type emails: list[str] + """ + + _attribute_map = { + 'emails': {'key': 'emails', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(CollaboratorsArray, self).__init__(**kwargs) + self.emails = kwargs.get('emails', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/collaborators_array_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/collaborators_array_py3.py new file mode 100644 index 000000000000..a8a2161ce6f2 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/collaborators_array_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CollaboratorsArray(Model): + """CollaboratorsArray. + + :param emails: The email address of the users. + :type emails: list[str] + """ + + _attribute_map = { + 'emails': {'key': 'emails', 'type': '[str]'}, + } + + def __init__(self, *, emails=None, **kwargs) -> None: + super(CollaboratorsArray, self).__init__(**kwargs) + self.emails = emails diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_child_model_create_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_child_model_create_object.py new file mode 100644 index 000000000000..ec9cd03dbf68 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_child_model_create_object.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CompositeChildModelCreateObject(Model): + """CompositeChildModelCreateObject. + + :param name: + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CompositeChildModelCreateObject, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_child_model_create_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_child_model_create_object_py3.py new file mode 100644 index 000000000000..4cb9d165eb8a --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_child_model_create_object_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CompositeChildModelCreateObject(Model): + """CompositeChildModelCreateObject. + + :param name: + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(CompositeChildModelCreateObject, self).__init__(**kwargs) + self.name = name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_entity_extractor.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_entity_extractor.py new file mode 100644 index 000000000000..1ca4c346d9d9 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_entity_extractor.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CompositeEntityExtractor(Model): + """A Composite Entity Extractor. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param roles: + :type roles: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + :param children: List of child entities. + :type children: + list[~azure.cognitiveservices.language.luis.authoring.models.ChildEntity] + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[EntityRole]'}, + 'children': {'key': 'children', 'type': '[ChildEntity]'}, + } + + def __init__(self, **kwargs): + super(CompositeEntityExtractor, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type_id = kwargs.get('type_id', None) + self.readable_type = kwargs.get('readable_type', None) + self.roles = kwargs.get('roles', None) + self.children = kwargs.get('children', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_entity_extractor_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_entity_extractor_py3.py new file mode 100644 index 000000000000..1b190fe165e2 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_entity_extractor_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CompositeEntityExtractor(Model): + """A Composite Entity Extractor. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param roles: + :type roles: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + :param children: List of child entities. + :type children: + list[~azure.cognitiveservices.language.luis.authoring.models.ChildEntity] + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[EntityRole]'}, + 'children': {'key': 'children', 'type': '[ChildEntity]'}, + } + + def __init__(self, *, id: str, readable_type, name: str=None, type_id: int=None, roles=None, children=None, **kwargs) -> None: + super(CompositeEntityExtractor, self).__init__(**kwargs) + self.id = id + self.name = name + self.type_id = type_id + self.readable_type = readable_type + self.roles = roles + self.children = children diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_entity_model.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_entity_model.py new file mode 100644 index 000000000000..39fdfc8fd2f4 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_entity_model.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CompositeEntityModel(Model): + """A composite entity. + + :param children: Child entities. + :type children: list[str] + :param name: Entity name. + :type name: str + """ + + _attribute_map = { + 'children': {'key': 'children', 'type': '[str]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CompositeEntityModel, self).__init__(**kwargs) + self.children = kwargs.get('children', None) + self.name = kwargs.get('name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_entity_model_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_entity_model_py3.py new file mode 100644 index 000000000000..bf35849c3f7d --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/composite_entity_model_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CompositeEntityModel(Model): + """A composite entity. + + :param children: Child entities. + :type children: list[str] + :param name: Entity name. + :type name: str + """ + + _attribute_map = { + 'children': {'key': 'children', 'type': '[str]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, children=None, name: str=None, **kwargs) -> None: + super(CompositeEntityModel, self).__init__(**kwargs) + self.children = children + self.name = name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/custom_prebuilt_model.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/custom_prebuilt_model.py new file mode 100644 index 000000000000..f19cb9c403dd --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/custom_prebuilt_model.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CustomPrebuiltModel(Model): + """A Custom Prebuilt model. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param custom_prebuilt_domain_name: The domain name. + :type custom_prebuilt_domain_name: str + :param custom_prebuilt_model_name: The intent name or entity name. + :type custom_prebuilt_model_name: str + :param roles: + :type roles: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'custom_prebuilt_domain_name': {'key': 'customPrebuiltDomainName', 'type': 'str'}, + 'custom_prebuilt_model_name': {'key': 'customPrebuiltModelName', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[EntityRole]'}, + } + + def __init__(self, **kwargs): + super(CustomPrebuiltModel, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type_id = kwargs.get('type_id', None) + self.readable_type = kwargs.get('readable_type', None) + self.custom_prebuilt_domain_name = kwargs.get('custom_prebuilt_domain_name', None) + self.custom_prebuilt_model_name = kwargs.get('custom_prebuilt_model_name', None) + self.roles = kwargs.get('roles', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/custom_prebuilt_model_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/custom_prebuilt_model_py3.py new file mode 100644 index 000000000000..c627964e95fc --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/custom_prebuilt_model_py3.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CustomPrebuiltModel(Model): + """A Custom Prebuilt model. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param custom_prebuilt_domain_name: The domain name. + :type custom_prebuilt_domain_name: str + :param custom_prebuilt_model_name: The intent name or entity name. + :type custom_prebuilt_model_name: str + :param roles: + :type roles: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'custom_prebuilt_domain_name': {'key': 'customPrebuiltDomainName', 'type': 'str'}, + 'custom_prebuilt_model_name': {'key': 'customPrebuiltModelName', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[EntityRole]'}, + } + + def __init__(self, *, id: str, readable_type, name: str=None, type_id: int=None, custom_prebuilt_domain_name: str=None, custom_prebuilt_model_name: str=None, roles=None, **kwargs) -> None: + super(CustomPrebuiltModel, self).__init__(**kwargs) + self.id = id + self.name = name + self.type_id = type_id + self.readable_type = readable_type + self.custom_prebuilt_domain_name = custom_prebuilt_domain_name + self.custom_prebuilt_model_name = custom_prebuilt_model_name + self.roles = roles diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/endpoint_info.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/endpoint_info.py new file mode 100644 index 000000000000..be6fd40e4f7d --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/endpoint_info.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EndpointInfo(Model): + """The base class "ProductionOrStagingEndpointInfo" inherits from. + + :param version_id: The version ID to publish. + :type version_id: str + :param is_staging: Indicates if the staging slot should be used, instead + of the Production one. + :type is_staging: bool + :param endpoint_url: The Runtime endpoint URL for this model version. + :type endpoint_url: str + :param region: The target region that the application is published to. + :type region: str + :param assigned_endpoint_key: The endpoint key. + :type assigned_endpoint_key: str + :param endpoint_region: The endpoint's region. + :type endpoint_region: str + :param published_date_time: Timestamp when was last published. + :type published_date_time: str + """ + + _attribute_map = { + 'version_id': {'key': 'versionId', 'type': 'str'}, + 'is_staging': {'key': 'isStaging', 'type': 'bool'}, + 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'assigned_endpoint_key': {'key': 'assignedEndpointKey', 'type': 'str'}, + 'endpoint_region': {'key': 'endpointRegion', 'type': 'str'}, + 'published_date_time': {'key': 'publishedDateTime', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EndpointInfo, self).__init__(**kwargs) + self.version_id = kwargs.get('version_id', None) + self.is_staging = kwargs.get('is_staging', None) + self.endpoint_url = kwargs.get('endpoint_url', None) + self.region = kwargs.get('region', None) + self.assigned_endpoint_key = kwargs.get('assigned_endpoint_key', None) + self.endpoint_region = kwargs.get('endpoint_region', None) + self.published_date_time = kwargs.get('published_date_time', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/endpoint_info_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/endpoint_info_py3.py new file mode 100644 index 000000000000..3e8f171a9067 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/endpoint_info_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EndpointInfo(Model): + """The base class "ProductionOrStagingEndpointInfo" inherits from. + + :param version_id: The version ID to publish. + :type version_id: str + :param is_staging: Indicates if the staging slot should be used, instead + of the Production one. + :type is_staging: bool + :param endpoint_url: The Runtime endpoint URL for this model version. + :type endpoint_url: str + :param region: The target region that the application is published to. + :type region: str + :param assigned_endpoint_key: The endpoint key. + :type assigned_endpoint_key: str + :param endpoint_region: The endpoint's region. + :type endpoint_region: str + :param published_date_time: Timestamp when was last published. + :type published_date_time: str + """ + + _attribute_map = { + 'version_id': {'key': 'versionId', 'type': 'str'}, + 'is_staging': {'key': 'isStaging', 'type': 'bool'}, + 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'assigned_endpoint_key': {'key': 'assignedEndpointKey', 'type': 'str'}, + 'endpoint_region': {'key': 'endpointRegion', 'type': 'str'}, + 'published_date_time': {'key': 'publishedDateTime', 'type': 'str'}, + } + + def __init__(self, *, version_id: str=None, is_staging: bool=None, endpoint_url: str=None, region: str=None, assigned_endpoint_key: str=None, endpoint_region: str=None, published_date_time: str=None, **kwargs) -> None: + super(EndpointInfo, self).__init__(**kwargs) + self.version_id = version_id + self.is_staging = is_staging + self.endpoint_url = endpoint_url + self.region = region + self.assigned_endpoint_key = assigned_endpoint_key + self.endpoint_region = endpoint_region + self.published_date_time = published_date_time diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/enqueue_training_response.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/enqueue_training_response.py new file mode 100644 index 000000000000..6f23a205a9e1 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/enqueue_training_response.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EnqueueTrainingResponse(Model): + """Response model when requesting to train the model. + + :param status_id: The train request status ID. + :type status_id: int + :param status: Possible values include: 'Queued', 'InProgress', + 'UpToDate', 'Fail', 'Success' + :type status: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + """ + + _attribute_map = { + 'status_id': {'key': 'statusId', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EnqueueTrainingResponse, self).__init__(**kwargs) + self.status_id = kwargs.get('status_id', None) + self.status = kwargs.get('status', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/enqueue_training_response_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/enqueue_training_response_py3.py new file mode 100644 index 000000000000..c54730dcc01b --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/enqueue_training_response_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EnqueueTrainingResponse(Model): + """Response model when requesting to train the model. + + :param status_id: The train request status ID. + :type status_id: int + :param status: Possible values include: 'Queued', 'InProgress', + 'UpToDate', 'Fail', 'Success' + :type status: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + """ + + _attribute_map = { + 'status_id': {'key': 'statusId', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, status_id: int=None, status=None, **kwargs) -> None: + super(EnqueueTrainingResponse, self).__init__(**kwargs) + self.status_id = status_id + self.status = status diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entities_suggestion_example.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entities_suggestion_example.py new file mode 100644 index 000000000000..df07486d1d28 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entities_suggestion_example.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntitiesSuggestionExample(Model): + """Predicted/suggested entity. + + :param text: The utterance. E.g.: what's the weather like in seattle? + :type text: str + :param tokenized_text: The utterance tokenized. + :type tokenized_text: list[str] + :param intent_predictions: Predicted/suggested intents. + :type intent_predictions: + list[~azure.cognitiveservices.language.luis.authoring.models.IntentPrediction] + :param entity_predictions: Predicted/suggested entities. + :type entity_predictions: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityPrediction] + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'tokenized_text': {'key': 'tokenizedText', 'type': '[str]'}, + 'intent_predictions': {'key': 'intentPredictions', 'type': '[IntentPrediction]'}, + 'entity_predictions': {'key': 'entityPredictions', 'type': '[EntityPrediction]'}, + } + + def __init__(self, **kwargs): + super(EntitiesSuggestionExample, self).__init__(**kwargs) + self.text = kwargs.get('text', None) + self.tokenized_text = kwargs.get('tokenized_text', None) + self.intent_predictions = kwargs.get('intent_predictions', None) + self.entity_predictions = kwargs.get('entity_predictions', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entities_suggestion_example_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entities_suggestion_example_py3.py new file mode 100644 index 000000000000..948832a55291 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entities_suggestion_example_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntitiesSuggestionExample(Model): + """Predicted/suggested entity. + + :param text: The utterance. E.g.: what's the weather like in seattle? + :type text: str + :param tokenized_text: The utterance tokenized. + :type tokenized_text: list[str] + :param intent_predictions: Predicted/suggested intents. + :type intent_predictions: + list[~azure.cognitiveservices.language.luis.authoring.models.IntentPrediction] + :param entity_predictions: Predicted/suggested entities. + :type entity_predictions: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityPrediction] + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'tokenized_text': {'key': 'tokenizedText', 'type': '[str]'}, + 'intent_predictions': {'key': 'intentPredictions', 'type': '[IntentPrediction]'}, + 'entity_predictions': {'key': 'entityPredictions', 'type': '[EntityPrediction]'}, + } + + def __init__(self, *, text: str=None, tokenized_text=None, intent_predictions=None, entity_predictions=None, **kwargs) -> None: + super(EntitiesSuggestionExample, self).__init__(**kwargs) + self.text = text + self.tokenized_text = tokenized_text + self.intent_predictions = intent_predictions + self.entity_predictions = entity_predictions diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_extractor.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_extractor.py new file mode 100644 index 000000000000..a822f047f14d --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_extractor.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityExtractor(Model): + """Entity Extractor. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param roles: + :type roles: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + :param custom_prebuilt_domain_name: The domain name. + :type custom_prebuilt_domain_name: str + :param custom_prebuilt_model_name: The intent name or entity name. + :type custom_prebuilt_model_name: str + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[EntityRole]'}, + 'custom_prebuilt_domain_name': {'key': 'customPrebuiltDomainName', 'type': 'str'}, + 'custom_prebuilt_model_name': {'key': 'customPrebuiltModelName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EntityExtractor, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type_id = kwargs.get('type_id', None) + self.readable_type = kwargs.get('readable_type', None) + self.roles = kwargs.get('roles', None) + self.custom_prebuilt_domain_name = kwargs.get('custom_prebuilt_domain_name', None) + self.custom_prebuilt_model_name = kwargs.get('custom_prebuilt_model_name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_extractor_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_extractor_py3.py new file mode 100644 index 000000000000..7dc4f3792f6d --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_extractor_py3.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityExtractor(Model): + """Entity Extractor. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param roles: + :type roles: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + :param custom_prebuilt_domain_name: The domain name. + :type custom_prebuilt_domain_name: str + :param custom_prebuilt_model_name: The intent name or entity name. + :type custom_prebuilt_model_name: str + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[EntityRole]'}, + 'custom_prebuilt_domain_name': {'key': 'customPrebuiltDomainName', 'type': 'str'}, + 'custom_prebuilt_model_name': {'key': 'customPrebuiltModelName', 'type': 'str'}, + } + + def __init__(self, *, id: str, readable_type, name: str=None, type_id: int=None, roles=None, custom_prebuilt_domain_name: str=None, custom_prebuilt_model_name: str=None, **kwargs) -> None: + super(EntityExtractor, self).__init__(**kwargs) + self.id = id + self.name = name + self.type_id = type_id + self.readable_type = readable_type + self.roles = roles + self.custom_prebuilt_domain_name = custom_prebuilt_domain_name + self.custom_prebuilt_model_name = custom_prebuilt_model_name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_label.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_label.py new file mode 100644 index 000000000000..3a6418ff8ac5 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_label.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityLabel(Model): + """Defines the entity type and position of the extracted entity within the + example. + + All required parameters must be populated in order to send to Azure. + + :param entity_name: Required. The entity type. + :type entity_name: str + :param start_token_index: Required. The index within the utterance where + the extracted entity starts. + :type start_token_index: int + :param end_token_index: Required. The index within the utterance where the + extracted entity ends. + :type end_token_index: int + """ + + _validation = { + 'entity_name': {'required': True}, + 'start_token_index': {'required': True}, + 'end_token_index': {'required': True}, + } + + _attribute_map = { + 'entity_name': {'key': 'entityName', 'type': 'str'}, + 'start_token_index': {'key': 'startTokenIndex', 'type': 'int'}, + 'end_token_index': {'key': 'endTokenIndex', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(EntityLabel, self).__init__(**kwargs) + self.entity_name = kwargs.get('entity_name', None) + self.start_token_index = kwargs.get('start_token_index', None) + self.end_token_index = kwargs.get('end_token_index', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_label_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_label_object.py new file mode 100644 index 000000000000..f5cede6b7586 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_label_object.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityLabelObject(Model): + """Defines the entity type and position of the extracted entity within the + example. + + All required parameters must be populated in order to send to Azure. + + :param entity_name: Required. The entity type. + :type entity_name: str + :param start_char_index: Required. The index within the utterance where + the extracted entity starts. + :type start_char_index: int + :param end_char_index: Required. The index within the utterance where the + extracted entity ends. + :type end_char_index: int + """ + + _validation = { + 'entity_name': {'required': True}, + 'start_char_index': {'required': True}, + 'end_char_index': {'required': True}, + } + + _attribute_map = { + 'entity_name': {'key': 'entityName', 'type': 'str'}, + 'start_char_index': {'key': 'startCharIndex', 'type': 'int'}, + 'end_char_index': {'key': 'endCharIndex', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(EntityLabelObject, self).__init__(**kwargs) + self.entity_name = kwargs.get('entity_name', None) + self.start_char_index = kwargs.get('start_char_index', None) + self.end_char_index = kwargs.get('end_char_index', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_label_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_label_object_py3.py new file mode 100644 index 000000000000..c90e44f8dc7f --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_label_object_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityLabelObject(Model): + """Defines the entity type and position of the extracted entity within the + example. + + All required parameters must be populated in order to send to Azure. + + :param entity_name: Required. The entity type. + :type entity_name: str + :param start_char_index: Required. The index within the utterance where + the extracted entity starts. + :type start_char_index: int + :param end_char_index: Required. The index within the utterance where the + extracted entity ends. + :type end_char_index: int + """ + + _validation = { + 'entity_name': {'required': True}, + 'start_char_index': {'required': True}, + 'end_char_index': {'required': True}, + } + + _attribute_map = { + 'entity_name': {'key': 'entityName', 'type': 'str'}, + 'start_char_index': {'key': 'startCharIndex', 'type': 'int'}, + 'end_char_index': {'key': 'endCharIndex', 'type': 'int'}, + } + + def __init__(self, *, entity_name: str, start_char_index: int, end_char_index: int, **kwargs) -> None: + super(EntityLabelObject, self).__init__(**kwargs) + self.entity_name = entity_name + self.start_char_index = start_char_index + self.end_char_index = end_char_index diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_label_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_label_py3.py new file mode 100644 index 000000000000..06ccfb1c2bc2 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_label_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityLabel(Model): + """Defines the entity type and position of the extracted entity within the + example. + + All required parameters must be populated in order to send to Azure. + + :param entity_name: Required. The entity type. + :type entity_name: str + :param start_token_index: Required. The index within the utterance where + the extracted entity starts. + :type start_token_index: int + :param end_token_index: Required. The index within the utterance where the + extracted entity ends. + :type end_token_index: int + """ + + _validation = { + 'entity_name': {'required': True}, + 'start_token_index': {'required': True}, + 'end_token_index': {'required': True}, + } + + _attribute_map = { + 'entity_name': {'key': 'entityName', 'type': 'str'}, + 'start_token_index': {'key': 'startTokenIndex', 'type': 'int'}, + 'end_token_index': {'key': 'endTokenIndex', 'type': 'int'}, + } + + def __init__(self, *, entity_name: str, start_token_index: int, end_token_index: int, **kwargs) -> None: + super(EntityLabel, self).__init__(**kwargs) + self.entity_name = entity_name + self.start_token_index = start_token_index + self.end_token_index = end_token_index diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_model_info.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_model_info.py new file mode 100644 index 000000000000..1cd4997cf66e --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_model_info.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .model_info import ModelInfo + + +class EntityModelInfo(ModelInfo): + """An Entity Extractor model info. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param roles: + :type roles: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[EntityRole]'}, + } + + def __init__(self, **kwargs): + super(EntityModelInfo, self).__init__(**kwargs) + self.roles = kwargs.get('roles', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_model_info_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_model_info_py3.py new file mode 100644 index 000000000000..74eec6f0838a --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_model_info_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .model_info_py3 import ModelInfo + + +class EntityModelInfo(ModelInfo): + """An Entity Extractor model info. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param roles: + :type roles: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[EntityRole]'}, + } + + def __init__(self, *, id: str, readable_type, name: str=None, type_id: int=None, roles=None, **kwargs) -> None: + super(EntityModelInfo, self).__init__(id=id, name=name, type_id=type_id, readable_type=readable_type, **kwargs) + self.roles = roles diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_prediction.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_prediction.py new file mode 100644 index 000000000000..03c1a2e8b706 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_prediction.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityPrediction(Model): + """A suggested entity. + + All required parameters must be populated in order to send to Azure. + + :param entity_name: Required. The entity's name + :type entity_name: str + :param start_token_index: Required. The index within the utterance where + the extracted entity starts. + :type start_token_index: int + :param end_token_index: Required. The index within the utterance where the + extracted entity ends. + :type end_token_index: int + :param phrase: Required. The actual token(s) that comprise the entity. + :type phrase: str + """ + + _validation = { + 'entity_name': {'required': True}, + 'start_token_index': {'required': True}, + 'end_token_index': {'required': True}, + 'phrase': {'required': True}, + } + + _attribute_map = { + 'entity_name': {'key': 'entityName', 'type': 'str'}, + 'start_token_index': {'key': 'startTokenIndex', 'type': 'int'}, + 'end_token_index': {'key': 'endTokenIndex', 'type': 'int'}, + 'phrase': {'key': 'phrase', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EntityPrediction, self).__init__(**kwargs) + self.entity_name = kwargs.get('entity_name', None) + self.start_token_index = kwargs.get('start_token_index', None) + self.end_token_index = kwargs.get('end_token_index', None) + self.phrase = kwargs.get('phrase', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_prediction_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_prediction_py3.py new file mode 100644 index 000000000000..d6ad26e879a5 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_prediction_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityPrediction(Model): + """A suggested entity. + + All required parameters must be populated in order to send to Azure. + + :param entity_name: Required. The entity's name + :type entity_name: str + :param start_token_index: Required. The index within the utterance where + the extracted entity starts. + :type start_token_index: int + :param end_token_index: Required. The index within the utterance where the + extracted entity ends. + :type end_token_index: int + :param phrase: Required. The actual token(s) that comprise the entity. + :type phrase: str + """ + + _validation = { + 'entity_name': {'required': True}, + 'start_token_index': {'required': True}, + 'end_token_index': {'required': True}, + 'phrase': {'required': True}, + } + + _attribute_map = { + 'entity_name': {'key': 'entityName', 'type': 'str'}, + 'start_token_index': {'key': 'startTokenIndex', 'type': 'int'}, + 'end_token_index': {'key': 'endTokenIndex', 'type': 'int'}, + 'phrase': {'key': 'phrase', 'type': 'str'}, + } + + def __init__(self, *, entity_name: str, start_token_index: int, end_token_index: int, phrase: str, **kwargs) -> None: + super(EntityPrediction, self).__init__(**kwargs) + self.entity_name = entity_name + self.start_token_index = start_token_index + self.end_token_index = end_token_index + self.phrase = phrase diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role.py new file mode 100644 index 000000000000..c86de8f372e9 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityRole(Model): + """Entity extractor role. + + :param id: The entity role ID. + :type id: str + :param name: The entity role name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EntityRole, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role_create_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role_create_object.py new file mode 100644 index 000000000000..49fe083921e6 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role_create_object.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityRoleCreateObject(Model): + """Object model for creating an entity role. + + :param name: The entity role name. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EntityRoleCreateObject, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role_create_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role_create_object_py3.py new file mode 100644 index 000000000000..d5b4bfb86c1b --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role_create_object_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityRoleCreateObject(Model): + """Object model for creating an entity role. + + :param name: The entity role name. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(EntityRoleCreateObject, self).__init__(**kwargs) + self.name = name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role_py3.py new file mode 100644 index 000000000000..ab1e5edbd89a --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityRole(Model): + """Entity extractor role. + + :param id: The entity role ID. + :type id: str + :param name: The entity role name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + super(EntityRole, self).__init__(**kwargs) + self.id = id + self.name = name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role_update_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role_update_object.py new file mode 100644 index 000000000000..bd0dbcc44860 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role_update_object.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityRoleUpdateObject(Model): + """Object model for updating an entity role. + + :param name: The entity role name. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EntityRoleUpdateObject, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role_update_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role_update_object_py3.py new file mode 100644 index 000000000000..045fec47a726 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/entity_role_update_object_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityRoleUpdateObject(Model): + """Object model for updating an entity role. + + :param name: The entity role name. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(EntityRoleUpdateObject, self).__init__(**kwargs) + self.name = name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/error_response.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/error_response.py new file mode 100644 index 000000000000..785a1f2dabc6 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/error_response.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Error response when invoking an operation on the API. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param error_type: + :type error_type: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'error_type': {'key': 'errorType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.error_type = kwargs.get('error_type', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/error_response_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/error_response_py3.py new file mode 100644 index 000000000000..314e2c8196d4 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/error_response_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Error response when invoking an operation on the API. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param error_type: + :type error_type: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'error_type': {'key': 'errorType', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, error_type: str=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.error_type = error_type + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/example_label_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/example_label_object.py new file mode 100644 index 000000000000..a9a12a017d9c --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/example_label_object.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ExampleLabelObject(Model): + """A labeled example. + + :param text: The sample's utterance. + :type text: str + :param entity_labels: The idenfied entities within the utterance. + :type entity_labels: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityLabelObject] + :param intent_name: The idenfitied intent representing the utterance. + :type intent_name: str + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'entity_labels': {'key': 'entityLabels', 'type': '[EntityLabelObject]'}, + 'intent_name': {'key': 'intentName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExampleLabelObject, self).__init__(**kwargs) + self.text = kwargs.get('text', None) + self.entity_labels = kwargs.get('entity_labels', None) + self.intent_name = kwargs.get('intent_name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/example_label_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/example_label_object_py3.py new file mode 100644 index 000000000000..6587bf9cbb17 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/example_label_object_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ExampleLabelObject(Model): + """A labeled example. + + :param text: The sample's utterance. + :type text: str + :param entity_labels: The idenfied entities within the utterance. + :type entity_labels: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityLabelObject] + :param intent_name: The idenfitied intent representing the utterance. + :type intent_name: str + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'entity_labels': {'key': 'entityLabels', 'type': '[EntityLabelObject]'}, + 'intent_name': {'key': 'intentName', 'type': 'str'}, + } + + def __init__(self, *, text: str=None, entity_labels=None, intent_name: str=None, **kwargs) -> None: + super(ExampleLabelObject, self).__init__(**kwargs) + self.text = text + self.entity_labels = entity_labels + self.intent_name = intent_name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item.py new file mode 100644 index 000000000000..86b51aaba7c7 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ExplicitListItem(Model): + """Explicit list item. + + :param id: The explicit list item ID. + :type id: long + :param explicit_list_item: The explicit list item value. + :type explicit_list_item: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'explicit_list_item': {'key': 'explicitListItem', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExplicitListItem, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.explicit_list_item = kwargs.get('explicit_list_item', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item_create_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item_create_object.py new file mode 100644 index 000000000000..3aeb5af59be9 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item_create_object.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ExplicitListItemCreateObject(Model): + """Object model for creating an explicit list item. + + :param explicit_list_item: The explicit list item. + :type explicit_list_item: str + """ + + _attribute_map = { + 'explicit_list_item': {'key': 'explicitListItem', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExplicitListItemCreateObject, self).__init__(**kwargs) + self.explicit_list_item = kwargs.get('explicit_list_item', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item_create_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item_create_object_py3.py new file mode 100644 index 000000000000..7e67471f71a2 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item_create_object_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ExplicitListItemCreateObject(Model): + """Object model for creating an explicit list item. + + :param explicit_list_item: The explicit list item. + :type explicit_list_item: str + """ + + _attribute_map = { + 'explicit_list_item': {'key': 'explicitListItem', 'type': 'str'}, + } + + def __init__(self, *, explicit_list_item: str=None, **kwargs) -> None: + super(ExplicitListItemCreateObject, self).__init__(**kwargs) + self.explicit_list_item = explicit_list_item diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item_py3.py new file mode 100644 index 000000000000..36b7652da4e2 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ExplicitListItem(Model): + """Explicit list item. + + :param id: The explicit list item ID. + :type id: long + :param explicit_list_item: The explicit list item value. + :type explicit_list_item: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'explicit_list_item': {'key': 'explicitListItem', 'type': 'str'}, + } + + def __init__(self, *, id: int=None, explicit_list_item: str=None, **kwargs) -> None: + super(ExplicitListItem, self).__init__(**kwargs) + self.id = id + self.explicit_list_item = explicit_list_item diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item_update_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item_update_object.py new file mode 100644 index 000000000000..cff018deba5a --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item_update_object.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ExplicitListItemUpdateObject(Model): + """Model object for updating an explicit list item. + + :param explicit_list_item: The explicit list item. + :type explicit_list_item: str + """ + + _attribute_map = { + 'explicit_list_item': {'key': 'explicitListItem', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExplicitListItemUpdateObject, self).__init__(**kwargs) + self.explicit_list_item = kwargs.get('explicit_list_item', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item_update_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item_update_object_py3.py new file mode 100644 index 000000000000..446cbfb32a55 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/explicit_list_item_update_object_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ExplicitListItemUpdateObject(Model): + """Model object for updating an explicit list item. + + :param explicit_list_item: The explicit list item. + :type explicit_list_item: str + """ + + _attribute_map = { + 'explicit_list_item': {'key': 'explicitListItem', 'type': 'str'}, + } + + def __init__(self, *, explicit_list_item: str=None, **kwargs) -> None: + super(ExplicitListItemUpdateObject, self).__init__(**kwargs) + self.explicit_list_item = explicit_list_item diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/feature_info_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/feature_info_object.py new file mode 100644 index 000000000000..78364a28b6c7 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/feature_info_object.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FeatureInfoObject(Model): + """The base class Features-related response objects inherit from. + + :param id: A six-digit ID used for Features. + :type id: int + :param name: The name of the Feature. + :type name: str + :param is_active: Indicates if the feature is enabled. + :type is_active: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_active': {'key': 'isActive', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(FeatureInfoObject, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.is_active = kwargs.get('is_active', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/feature_info_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/feature_info_object_py3.py new file mode 100644 index 000000000000..59cdbb215924 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/feature_info_object_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FeatureInfoObject(Model): + """The base class Features-related response objects inherit from. + + :param id: A six-digit ID used for Features. + :type id: int + :param name: The name of the Feature. + :type name: str + :param is_active: Indicates if the feature is enabled. + :type is_active: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_active': {'key': 'isActive', 'type': 'bool'}, + } + + def __init__(self, *, id: int=None, name: str=None, is_active: bool=None, **kwargs) -> None: + super(FeatureInfoObject, self).__init__(**kwargs) + self.id = id + self.name = name + self.is_active = is_active diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/features_response_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/features_response_object.py new file mode 100644 index 000000000000..e4ec1fb9388a --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/features_response_object.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FeaturesResponseObject(Model): + """Model Features, including Patterns and Phraselists. + + :param phraselist_features: + :type phraselist_features: + list[~azure.cognitiveservices.language.luis.authoring.models.PhraseListFeatureInfo] + :param pattern_features: + :type pattern_features: + list[~azure.cognitiveservices.language.luis.authoring.models.PatternFeatureInfo] + """ + + _attribute_map = { + 'phraselist_features': {'key': 'phraselistFeatures', 'type': '[PhraseListFeatureInfo]'}, + 'pattern_features': {'key': 'patternFeatures', 'type': '[PatternFeatureInfo]'}, + } + + def __init__(self, **kwargs): + super(FeaturesResponseObject, self).__init__(**kwargs) + self.phraselist_features = kwargs.get('phraselist_features', None) + self.pattern_features = kwargs.get('pattern_features', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/features_response_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/features_response_object_py3.py new file mode 100644 index 000000000000..3331170ab36b --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/features_response_object_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FeaturesResponseObject(Model): + """Model Features, including Patterns and Phraselists. + + :param phraselist_features: + :type phraselist_features: + list[~azure.cognitiveservices.language.luis.authoring.models.PhraseListFeatureInfo] + :param pattern_features: + :type pattern_features: + list[~azure.cognitiveservices.language.luis.authoring.models.PatternFeatureInfo] + """ + + _attribute_map = { + 'phraselist_features': {'key': 'phraselistFeatures', 'type': '[PhraseListFeatureInfo]'}, + 'pattern_features': {'key': 'patternFeatures', 'type': '[PatternFeatureInfo]'}, + } + + def __init__(self, *, phraselist_features=None, pattern_features=None, **kwargs) -> None: + super(FeaturesResponseObject, self).__init__(**kwargs) + self.phraselist_features = phraselist_features + self.pattern_features = pattern_features diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_entity.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_entity.py new file mode 100644 index 000000000000..87c2fbf3f79e --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_entity.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .child_entity import ChildEntity + + +class HierarchicalChildEntity(ChildEntity): + """A Hierarchical Child Entity. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID (GUID) belonging to a child entity. + :type id: str + :param name: The name of a child entity. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Possible values include: 'Entity Extractor', + 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', + 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt + Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HierarchicalChildEntity, self).__init__(**kwargs) + self.type_id = kwargs.get('type_id', None) + self.readable_type = kwargs.get('readable_type', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_entity_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_entity_py3.py new file mode 100644 index 000000000000..ee754559c193 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_entity_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .child_entity_py3 import ChildEntity + + +class HierarchicalChildEntity(ChildEntity): + """A Hierarchical Child Entity. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID (GUID) belonging to a child entity. + :type id: str + :param name: The name of a child entity. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Possible values include: 'Entity Extractor', + 'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor', + 'Composite Entity Extractor', 'Closed List Entity Extractor', 'Prebuilt + Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', + 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + } + + def __init__(self, *, id: str, name: str=None, type_id: int=None, readable_type=None, **kwargs) -> None: + super(HierarchicalChildEntity, self).__init__(id=id, name=name, **kwargs) + self.type_id = type_id + self.readable_type = readable_type diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_model_create_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_model_create_object.py new file mode 100644 index 000000000000..e74c62bccbc3 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_model_create_object.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HierarchicalChildModelCreateObject(Model): + """HierarchicalChildModelCreateObject. + + :param name: + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HierarchicalChildModelCreateObject, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_model_create_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_model_create_object_py3.py new file mode 100644 index 000000000000..4622b25d155d --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_model_create_object_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HierarchicalChildModelCreateObject(Model): + """HierarchicalChildModelCreateObject. + + :param name: + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(HierarchicalChildModelCreateObject, self).__init__(**kwargs) + self.name = name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_model_update_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_model_update_object.py new file mode 100644 index 000000000000..8920572a9a7d --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_model_update_object.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HierarchicalChildModelUpdateObject(Model): + """HierarchicalChildModelUpdateObject. + + :param name: + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HierarchicalChildModelUpdateObject, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_model_update_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_model_update_object_py3.py new file mode 100644 index 000000000000..16c36f966841 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_child_model_update_object_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HierarchicalChildModelUpdateObject(Model): + """HierarchicalChildModelUpdateObject. + + :param name: + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(HierarchicalChildModelUpdateObject, self).__init__(**kwargs) + self.name = name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_entity_extractor.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_entity_extractor.py new file mode 100644 index 000000000000..a65f80e4ac0f --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_entity_extractor.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HierarchicalEntityExtractor(Model): + """Hierarchical Entity Extractor. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param roles: + :type roles: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + :param children: List of child entities. + :type children: + list[~azure.cognitiveservices.language.luis.authoring.models.ChildEntity] + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[EntityRole]'}, + 'children': {'key': 'children', 'type': '[ChildEntity]'}, + } + + def __init__(self, **kwargs): + super(HierarchicalEntityExtractor, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type_id = kwargs.get('type_id', None) + self.readable_type = kwargs.get('readable_type', None) + self.roles = kwargs.get('roles', None) + self.children = kwargs.get('children', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_entity_extractor_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_entity_extractor_py3.py new file mode 100644 index 000000000000..c5900ea9cfe1 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_entity_extractor_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HierarchicalEntityExtractor(Model): + """Hierarchical Entity Extractor. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param roles: + :type roles: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + :param children: List of child entities. + :type children: + list[~azure.cognitiveservices.language.luis.authoring.models.ChildEntity] + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[EntityRole]'}, + 'children': {'key': 'children', 'type': '[ChildEntity]'}, + } + + def __init__(self, *, id: str, readable_type, name: str=None, type_id: int=None, roles=None, children=None, **kwargs) -> None: + super(HierarchicalEntityExtractor, self).__init__(**kwargs) + self.id = id + self.name = name + self.type_id = type_id + self.readable_type = readable_type + self.roles = roles + self.children = children diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_entity_model.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_entity_model.py new file mode 100644 index 000000000000..86ec000a0e78 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_entity_model.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HierarchicalEntityModel(Model): + """A Hierarchical Entity Extractor. + + :param children: Child entities. + :type children: list[str] + :param name: Entity name. + :type name: str + """ + + _attribute_map = { + 'children': {'key': 'children', 'type': '[str]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HierarchicalEntityModel, self).__init__(**kwargs) + self.children = kwargs.get('children', None) + self.name = kwargs.get('name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_entity_model_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_entity_model_py3.py new file mode 100644 index 000000000000..2c82cfddc4ac --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_entity_model_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HierarchicalEntityModel(Model): + """A Hierarchical Entity Extractor. + + :param children: Child entities. + :type children: list[str] + :param name: Entity name. + :type name: str + """ + + _attribute_map = { + 'children': {'key': 'children', 'type': '[str]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, children=None, name: str=None, **kwargs) -> None: + super(HierarchicalEntityModel, self).__init__(**kwargs) + self.children = children + self.name = name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_model.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_model.py new file mode 100644 index 000000000000..14a4de9d3c34 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_model.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HierarchicalModel(Model): + """HierarchicalModel. + + :param name: + :type name: str + :param children: + :type children: list[str] + :param inherits: + :type inherits: + ~azure.cognitiveservices.language.luis.authoring.models.PrebuiltDomainObject + :param roles: + :type roles: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'children': {'key': 'children', 'type': '[str]'}, + 'inherits': {'key': 'inherits', 'type': 'PrebuiltDomainObject'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(HierarchicalModel, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.children = kwargs.get('children', None) + self.inherits = kwargs.get('inherits', None) + self.roles = kwargs.get('roles', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_model_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_model_py3.py new file mode 100644 index 000000000000..7794051ac244 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/hierarchical_model_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HierarchicalModel(Model): + """HierarchicalModel. + + :param name: + :type name: str + :param children: + :type children: list[str] + :param inherits: + :type inherits: + ~azure.cognitiveservices.language.luis.authoring.models.PrebuiltDomainObject + :param roles: + :type roles: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'children': {'key': 'children', 'type': '[str]'}, + 'inherits': {'key': 'inherits', 'type': 'PrebuiltDomainObject'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + } + + def __init__(self, *, name: str=None, children=None, inherits=None, roles=None, **kwargs) -> None: + super(HierarchicalModel, self).__init__(**kwargs) + self.name = name + self.children = children + self.inherits = inherits + self.roles = roles diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intent_classifier.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intent_classifier.py new file mode 100644 index 000000000000..88650f92a6ee --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intent_classifier.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .model_info import ModelInfo + + +class IntentClassifier(ModelInfo): + """Intent Classifier. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param custom_prebuilt_domain_name: The domain name. + :type custom_prebuilt_domain_name: str + :param custom_prebuilt_model_name: The intent name or entity name. + :type custom_prebuilt_model_name: str + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'custom_prebuilt_domain_name': {'key': 'customPrebuiltDomainName', 'type': 'str'}, + 'custom_prebuilt_model_name': {'key': 'customPrebuiltModelName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntentClassifier, self).__init__(**kwargs) + self.custom_prebuilt_domain_name = kwargs.get('custom_prebuilt_domain_name', None) + self.custom_prebuilt_model_name = kwargs.get('custom_prebuilt_model_name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intent_classifier_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intent_classifier_py3.py new file mode 100644 index 000000000000..91b05e3768d3 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intent_classifier_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .model_info_py3 import ModelInfo + + +class IntentClassifier(ModelInfo): + """Intent Classifier. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param custom_prebuilt_domain_name: The domain name. + :type custom_prebuilt_domain_name: str + :param custom_prebuilt_model_name: The intent name or entity name. + :type custom_prebuilt_model_name: str + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'custom_prebuilt_domain_name': {'key': 'customPrebuiltDomainName', 'type': 'str'}, + 'custom_prebuilt_model_name': {'key': 'customPrebuiltModelName', 'type': 'str'}, + } + + def __init__(self, *, id: str, readable_type, name: str=None, type_id: int=None, custom_prebuilt_domain_name: str=None, custom_prebuilt_model_name: str=None, **kwargs) -> None: + super(IntentClassifier, self).__init__(id=id, name=name, type_id=type_id, readable_type=readable_type, **kwargs) + self.custom_prebuilt_domain_name = custom_prebuilt_domain_name + self.custom_prebuilt_model_name = custom_prebuilt_model_name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intent_prediction.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intent_prediction.py new file mode 100644 index 000000000000..69e3ba809573 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intent_prediction.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IntentPrediction(Model): + """A suggested intent. + + :param name: The intent's name + :type name: str + :param score: The intent's score, based on the prediction model. + :type score: float + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'score': {'key': 'score', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(IntentPrediction, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.score = kwargs.get('score', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intent_prediction_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intent_prediction_py3.py new file mode 100644 index 000000000000..093dfe044da3 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intent_prediction_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IntentPrediction(Model): + """A suggested intent. + + :param name: The intent's name + :type name: str + :param score: The intent's score, based on the prediction model. + :type score: float + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'score': {'key': 'score', 'type': 'float'}, + } + + def __init__(self, *, name: str=None, score: float=None, **kwargs) -> None: + super(IntentPrediction, self).__init__(**kwargs) + self.name = name + self.score = score diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intents_suggestion_example.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intents_suggestion_example.py new file mode 100644 index 000000000000..c4ba30053ab9 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intents_suggestion_example.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IntentsSuggestionExample(Model): + """Predicted/suggested intent. + + :param text: The utterance. E.g.: what's the weather like in seattle? + :type text: str + :param tokenized_text: The utterance tokenized. + :type tokenized_text: list[str] + :param intent_predictions: Predicted/suggested intents. + :type intent_predictions: + list[~azure.cognitiveservices.language.luis.authoring.models.IntentPrediction] + :param entity_predictions: Predicted/suggested entities. + :type entity_predictions: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityPrediction] + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'tokenized_text': {'key': 'tokenizedText', 'type': '[str]'}, + 'intent_predictions': {'key': 'intentPredictions', 'type': '[IntentPrediction]'}, + 'entity_predictions': {'key': 'entityPredictions', 'type': '[EntityPrediction]'}, + } + + def __init__(self, **kwargs): + super(IntentsSuggestionExample, self).__init__(**kwargs) + self.text = kwargs.get('text', None) + self.tokenized_text = kwargs.get('tokenized_text', None) + self.intent_predictions = kwargs.get('intent_predictions', None) + self.entity_predictions = kwargs.get('entity_predictions', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intents_suggestion_example_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intents_suggestion_example_py3.py new file mode 100644 index 000000000000..da45651d4f13 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/intents_suggestion_example_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IntentsSuggestionExample(Model): + """Predicted/suggested intent. + + :param text: The utterance. E.g.: what's the weather like in seattle? + :type text: str + :param tokenized_text: The utterance tokenized. + :type tokenized_text: list[str] + :param intent_predictions: Predicted/suggested intents. + :type intent_predictions: + list[~azure.cognitiveservices.language.luis.authoring.models.IntentPrediction] + :param entity_predictions: Predicted/suggested entities. + :type entity_predictions: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityPrediction] + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'tokenized_text': {'key': 'tokenizedText', 'type': '[str]'}, + 'intent_predictions': {'key': 'intentPredictions', 'type': '[IntentPrediction]'}, + 'entity_predictions': {'key': 'entityPredictions', 'type': '[EntityPrediction]'}, + } + + def __init__(self, *, text: str=None, tokenized_text=None, intent_predictions=None, entity_predictions=None, **kwargs) -> None: + super(IntentsSuggestionExample, self).__init__(**kwargs) + self.text = text + self.tokenized_text = tokenized_text + self.intent_predictions = intent_predictions + self.entity_predictions = entity_predictions diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_entity.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_entity.py new file mode 100644 index 000000000000..a353cd21826d --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_entity.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JSONEntity(Model): + """Exported Model - Extracted Entity from utterance. + + All required parameters must be populated in order to send to Azure. + + :param start_pos: Required. The index within the utterance where the + extracted entity starts. + :type start_pos: int + :param end_pos: Required. The index within the utterance where the + extracted entity ends. + :type end_pos: int + :param entity: Required. The entity name. + :type entity: str + """ + + _validation = { + 'start_pos': {'required': True}, + 'end_pos': {'required': True}, + 'entity': {'required': True}, + } + + _attribute_map = { + 'start_pos': {'key': 'startPos', 'type': 'int'}, + 'end_pos': {'key': 'endPos', 'type': 'int'}, + 'entity': {'key': 'entity', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JSONEntity, self).__init__(**kwargs) + self.start_pos = kwargs.get('start_pos', None) + self.end_pos = kwargs.get('end_pos', None) + self.entity = kwargs.get('entity', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_entity_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_entity_py3.py new file mode 100644 index 000000000000..4602592ca541 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_entity_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JSONEntity(Model): + """Exported Model - Extracted Entity from utterance. + + All required parameters must be populated in order to send to Azure. + + :param start_pos: Required. The index within the utterance where the + extracted entity starts. + :type start_pos: int + :param end_pos: Required. The index within the utterance where the + extracted entity ends. + :type end_pos: int + :param entity: Required. The entity name. + :type entity: str + """ + + _validation = { + 'start_pos': {'required': True}, + 'end_pos': {'required': True}, + 'entity': {'required': True}, + } + + _attribute_map = { + 'start_pos': {'key': 'startPos', 'type': 'int'}, + 'end_pos': {'key': 'endPos', 'type': 'int'}, + 'entity': {'key': 'entity', 'type': 'str'}, + } + + def __init__(self, *, start_pos: int, end_pos: int, entity: str, **kwargs) -> None: + super(JSONEntity, self).__init__(**kwargs) + self.start_pos = start_pos + self.end_pos = end_pos + self.entity = entity diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_model_feature.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_model_feature.py new file mode 100644 index 000000000000..18c5fbba3192 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_model_feature.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JSONModelFeature(Model): + """Exported Model - Phraselist Model Feature. + + :param activated: Indicates if the feature is enabled. + :type activated: bool + :param name: The Phraselist name. + :type name: str + :param words: List of comma-separated phrases that represent the + Phraselist. + :type words: str + :param mode: An exchangeable phrase list feature are serves as single + feature to the LUIS underlying training algorithm. It is used as a lexicon + lookup feature where its value is 1 if the lexicon contains a given word + or 0 if it doesn’t. Think of an exchangeable as a synonyms list. A + non-exchangeable phrase list feature has all the phrases in the list serve + as separate features to the underlying training algorithm. So, if you your + phrase list feature contains 5 phrases, they will be mapped to 5 separate + features. You can think of the non-exchangeable phrase list feature as an + additional bag of words that you are willing to add to LUIS existing + vocabulary features. Think of a non-exchangeable as set of different + words. Default value is true. + :type mode: bool + """ + + _attribute_map = { + 'activated': {'key': 'activated', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'words': {'key': 'words', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(JSONModelFeature, self).__init__(**kwargs) + self.activated = kwargs.get('activated', None) + self.name = kwargs.get('name', None) + self.words = kwargs.get('words', None) + self.mode = kwargs.get('mode', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_model_feature_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_model_feature_py3.py new file mode 100644 index 000000000000..fc26406206e0 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_model_feature_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JSONModelFeature(Model): + """Exported Model - Phraselist Model Feature. + + :param activated: Indicates if the feature is enabled. + :type activated: bool + :param name: The Phraselist name. + :type name: str + :param words: List of comma-separated phrases that represent the + Phraselist. + :type words: str + :param mode: An exchangeable phrase list feature are serves as single + feature to the LUIS underlying training algorithm. It is used as a lexicon + lookup feature where its value is 1 if the lexicon contains a given word + or 0 if it doesn’t. Think of an exchangeable as a synonyms list. A + non-exchangeable phrase list feature has all the phrases in the list serve + as separate features to the underlying training algorithm. So, if you your + phrase list feature contains 5 phrases, they will be mapped to 5 separate + features. You can think of the non-exchangeable phrase list feature as an + additional bag of words that you are willing to add to LUIS existing + vocabulary features. Think of a non-exchangeable as set of different + words. Default value is true. + :type mode: bool + """ + + _attribute_map = { + 'activated': {'key': 'activated', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'words': {'key': 'words', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'bool'}, + } + + def __init__(self, *, activated: bool=None, name: str=None, words: str=None, mode: bool=None, **kwargs) -> None: + super(JSONModelFeature, self).__init__(**kwargs) + self.activated = activated + self.name = name + self.words = words + self.mode = mode diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_regex_feature.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_regex_feature.py new file mode 100644 index 000000000000..9b369d218e65 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_regex_feature.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JSONRegexFeature(Model): + """Exported Model - A Pattern feature. + + :param pattern: The Regular Expression to match. + :type pattern: str + :param activated: Indicates if the Pattern feature is enabled. + :type activated: bool + :param name: Name of the feature. + :type name: str + """ + + _attribute_map = { + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'activated': {'key': 'activated', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JSONRegexFeature, self).__init__(**kwargs) + self.pattern = kwargs.get('pattern', None) + self.activated = kwargs.get('activated', None) + self.name = kwargs.get('name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_regex_feature_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_regex_feature_py3.py new file mode 100644 index 000000000000..c26b497612a4 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_regex_feature_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JSONRegexFeature(Model): + """Exported Model - A Pattern feature. + + :param pattern: The Regular Expression to match. + :type pattern: str + :param activated: Indicates if the Pattern feature is enabled. + :type activated: bool + :param name: Name of the feature. + :type name: str + """ + + _attribute_map = { + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'activated': {'key': 'activated', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, pattern: str=None, activated: bool=None, name: str=None, **kwargs) -> None: + super(JSONRegexFeature, self).__init__(**kwargs) + self.pattern = pattern + self.activated = activated + self.name = name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_utterance.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_utterance.py new file mode 100644 index 000000000000..df48abd671d4 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_utterance.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JSONUtterance(Model): + """Exported Model - Utterance that was used to train the model. + + :param text: The utterance. + :type text: str + :param intent: The matched intent. + :type intent: str + :param entities: The matched entities. + :type entities: + list[~azure.cognitiveservices.language.luis.authoring.models.JSONEntity] + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'intent': {'key': 'intent', 'type': 'str'}, + 'entities': {'key': 'entities', 'type': '[JSONEntity]'}, + } + + def __init__(self, **kwargs): + super(JSONUtterance, self).__init__(**kwargs) + self.text = kwargs.get('text', None) + self.intent = kwargs.get('intent', None) + self.entities = kwargs.get('entities', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_utterance_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_utterance_py3.py new file mode 100644 index 000000000000..ca672844ba10 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/json_utterance_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JSONUtterance(Model): + """Exported Model - Utterance that was used to train the model. + + :param text: The utterance. + :type text: str + :param intent: The matched intent. + :type intent: str + :param entities: The matched entities. + :type entities: + list[~azure.cognitiveservices.language.luis.authoring.models.JSONEntity] + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'intent': {'key': 'intent', 'type': 'str'}, + 'entities': {'key': 'entities', 'type': '[JSONEntity]'}, + } + + def __init__(self, *, text: str=None, intent: str=None, entities=None, **kwargs) -> None: + super(JSONUtterance, self).__init__(**kwargs) + self.text = text + self.intent = intent + self.entities = entities diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/label_example_response.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/label_example_response.py new file mode 100644 index 000000000000..2bf52c53b59a --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/label_example_response.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LabelExampleResponse(Model): + """Response when adding a labeled example. + + :param utterance_text: The sample's utterance. + :type utterance_text: str + :param example_id: The newly created sample ID. + :type example_id: int + """ + + _attribute_map = { + 'utterance_text': {'key': 'UtteranceText', 'type': 'str'}, + 'example_id': {'key': 'ExampleId', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(LabelExampleResponse, self).__init__(**kwargs) + self.utterance_text = kwargs.get('utterance_text', None) + self.example_id = kwargs.get('example_id', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/label_example_response_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/label_example_response_py3.py new file mode 100644 index 000000000000..a4a5280e1550 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/label_example_response_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LabelExampleResponse(Model): + """Response when adding a labeled example. + + :param utterance_text: The sample's utterance. + :type utterance_text: str + :param example_id: The newly created sample ID. + :type example_id: int + """ + + _attribute_map = { + 'utterance_text': {'key': 'UtteranceText', 'type': 'str'}, + 'example_id': {'key': 'ExampleId', 'type': 'int'}, + } + + def __init__(self, *, utterance_text: str=None, example_id: int=None, **kwargs) -> None: + super(LabelExampleResponse, self).__init__(**kwargs) + self.utterance_text = utterance_text + self.example_id = example_id diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/label_text_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/label_text_object.py new file mode 100644 index 000000000000..0c87d2f09353 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/label_text_object.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LabelTextObject(Model): + """An object containing the example's text. + + :param id: The ID of the Label. + :type id: int + :param text: The text of the label. + :type text: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'text': {'key': 'text', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabelTextObject, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.text = kwargs.get('text', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/label_text_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/label_text_object_py3.py new file mode 100644 index 000000000000..598047479fb2 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/label_text_object_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LabelTextObject(Model): + """An object containing the example's text. + + :param id: The ID of the Label. + :type id: int + :param text: The text of the label. + :type text: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'text': {'key': 'text', 'type': 'str'}, + } + + def __init__(self, *, id: int=None, text: str=None, **kwargs) -> None: + super(LabelTextObject, self).__init__(**kwargs) + self.id = id + self.text = text diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/labeled_utterance.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/labeled_utterance.py new file mode 100644 index 000000000000..ec41a2e0e16c --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/labeled_utterance.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LabeledUtterance(Model): + """A prediction and label pair of an example. + + :param id: ID of Labeled Utterance. + :type id: int + :param text: The utterance. E.g.: what's the weather like in seattle? + :type text: str + :param tokenized_text: The utterance tokenized. + :type tokenized_text: list[str] + :param intent_label: The intent matching the example. + :type intent_label: str + :param entity_labels: The entities matching the example. + :type entity_labels: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityLabel] + :param intent_predictions: List of suggested intents. + :type intent_predictions: + list[~azure.cognitiveservices.language.luis.authoring.models.IntentPrediction] + :param entity_predictions: List of suggested entities. + :type entity_predictions: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityPrediction] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'text': {'key': 'text', 'type': 'str'}, + 'tokenized_text': {'key': 'tokenizedText', 'type': '[str]'}, + 'intent_label': {'key': 'intentLabel', 'type': 'str'}, + 'entity_labels': {'key': 'entityLabels', 'type': '[EntityLabel]'}, + 'intent_predictions': {'key': 'intentPredictions', 'type': '[IntentPrediction]'}, + 'entity_predictions': {'key': 'entityPredictions', 'type': '[EntityPrediction]'}, + } + + def __init__(self, **kwargs): + super(LabeledUtterance, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.text = kwargs.get('text', None) + self.tokenized_text = kwargs.get('tokenized_text', None) + self.intent_label = kwargs.get('intent_label', None) + self.entity_labels = kwargs.get('entity_labels', None) + self.intent_predictions = kwargs.get('intent_predictions', None) + self.entity_predictions = kwargs.get('entity_predictions', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/labeled_utterance_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/labeled_utterance_py3.py new file mode 100644 index 000000000000..880eff8a2193 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/labeled_utterance_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LabeledUtterance(Model): + """A prediction and label pair of an example. + + :param id: ID of Labeled Utterance. + :type id: int + :param text: The utterance. E.g.: what's the weather like in seattle? + :type text: str + :param tokenized_text: The utterance tokenized. + :type tokenized_text: list[str] + :param intent_label: The intent matching the example. + :type intent_label: str + :param entity_labels: The entities matching the example. + :type entity_labels: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityLabel] + :param intent_predictions: List of suggested intents. + :type intent_predictions: + list[~azure.cognitiveservices.language.luis.authoring.models.IntentPrediction] + :param entity_predictions: List of suggested entities. + :type entity_predictions: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityPrediction] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'text': {'key': 'text', 'type': 'str'}, + 'tokenized_text': {'key': 'tokenizedText', 'type': '[str]'}, + 'intent_label': {'key': 'intentLabel', 'type': 'str'}, + 'entity_labels': {'key': 'entityLabels', 'type': '[EntityLabel]'}, + 'intent_predictions': {'key': 'intentPredictions', 'type': '[IntentPrediction]'}, + 'entity_predictions': {'key': 'entityPredictions', 'type': '[EntityPrediction]'}, + } + + def __init__(self, *, id: int=None, text: str=None, tokenized_text=None, intent_label: str=None, entity_labels=None, intent_predictions=None, entity_predictions=None, **kwargs) -> None: + super(LabeledUtterance, self).__init__(**kwargs) + self.id = id + self.text = text + self.tokenized_text = tokenized_text + self.intent_label = intent_label + self.entity_labels = entity_labels + self.intent_predictions = intent_predictions + self.entity_predictions = entity_predictions diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/luis_app.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/luis_app.py new file mode 100644 index 000000000000..aa605a52e0a8 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/luis_app.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LuisApp(Model): + """Exported Model - An exported LUIS Application. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: The name of the application. + :type name: str + :param version_id: The version ID of the application that was exported. + :type version_id: str + :param desc: The description of the application. + :type desc: str + :param culture: The culture of the application. E.g.: en-us. + :type culture: str + :param intents: List of intents. + :type intents: + list[~azure.cognitiveservices.language.luis.authoring.models.HierarchicalModel] + :param entities: List of entities. + :type entities: + list[~azure.cognitiveservices.language.luis.authoring.models.HierarchicalModel] + :param closed_lists: List of closed lists. + :type closed_lists: + list[~azure.cognitiveservices.language.luis.authoring.models.ClosedList] + :param composites: List of composite entities. + :type composites: + list[~azure.cognitiveservices.language.luis.authoring.models.HierarchicalModel] + :param pattern_any_entities: List of Pattern.Any entities. + :type pattern_any_entities: + list[~azure.cognitiveservices.language.luis.authoring.models.PatternAny] + :param regex_entities: List of regular expression entities. + :type regex_entities: + list[~azure.cognitiveservices.language.luis.authoring.models.RegexEntity] + :param prebuilt_entities: List of prebuilt entities. + :type prebuilt_entities: + list[~azure.cognitiveservices.language.luis.authoring.models.PrebuiltEntity] + :param regex_features: List of pattern features. + :type regex_features: + list[~azure.cognitiveservices.language.luis.authoring.models.JSONRegexFeature] + :param model_features: List of model features. + :type model_features: + list[~azure.cognitiveservices.language.luis.authoring.models.JSONModelFeature] + :param patterns: List of patterns. + :type patterns: + list[~azure.cognitiveservices.language.luis.authoring.models.PatternRule] + :param utterances: List of sample utterances. + :type utterances: + list[~azure.cognitiveservices.language.luis.authoring.models.JSONUtterance] + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version_id': {'key': 'versionId', 'type': 'str'}, + 'desc': {'key': 'desc', 'type': 'str'}, + 'culture': {'key': 'culture', 'type': 'str'}, + 'intents': {'key': 'intents', 'type': '[HierarchicalModel]'}, + 'entities': {'key': 'entities', 'type': '[HierarchicalModel]'}, + 'closed_lists': {'key': 'closedLists', 'type': '[ClosedList]'}, + 'composites': {'key': 'composites', 'type': '[HierarchicalModel]'}, + 'pattern_any_entities': {'key': 'patternAnyEntities', 'type': '[PatternAny]'}, + 'regex_entities': {'key': 'regex_entities', 'type': '[RegexEntity]'}, + 'prebuilt_entities': {'key': 'prebuiltEntities', 'type': '[PrebuiltEntity]'}, + 'regex_features': {'key': 'regex_features', 'type': '[JSONRegexFeature]'}, + 'model_features': {'key': 'model_features', 'type': '[JSONModelFeature]'}, + 'patterns': {'key': 'patterns', 'type': '[PatternRule]'}, + 'utterances': {'key': 'utterances', 'type': '[JSONUtterance]'}, + } + + def __init__(self, **kwargs): + super(LuisApp, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.name = kwargs.get('name', None) + self.version_id = kwargs.get('version_id', None) + self.desc = kwargs.get('desc', None) + self.culture = kwargs.get('culture', None) + self.intents = kwargs.get('intents', None) + self.entities = kwargs.get('entities', None) + self.closed_lists = kwargs.get('closed_lists', None) + self.composites = kwargs.get('composites', None) + self.pattern_any_entities = kwargs.get('pattern_any_entities', None) + self.regex_entities = kwargs.get('regex_entities', None) + self.prebuilt_entities = kwargs.get('prebuilt_entities', None) + self.regex_features = kwargs.get('regex_features', None) + self.model_features = kwargs.get('model_features', None) + self.patterns = kwargs.get('patterns', None) + self.utterances = kwargs.get('utterances', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/luis_app_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/luis_app_py3.py new file mode 100644 index 000000000000..1f2004d20a2d --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/luis_app_py3.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LuisApp(Model): + """Exported Model - An exported LUIS Application. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: The name of the application. + :type name: str + :param version_id: The version ID of the application that was exported. + :type version_id: str + :param desc: The description of the application. + :type desc: str + :param culture: The culture of the application. E.g.: en-us. + :type culture: str + :param intents: List of intents. + :type intents: + list[~azure.cognitiveservices.language.luis.authoring.models.HierarchicalModel] + :param entities: List of entities. + :type entities: + list[~azure.cognitiveservices.language.luis.authoring.models.HierarchicalModel] + :param closed_lists: List of closed lists. + :type closed_lists: + list[~azure.cognitiveservices.language.luis.authoring.models.ClosedList] + :param composites: List of composite entities. + :type composites: + list[~azure.cognitiveservices.language.luis.authoring.models.HierarchicalModel] + :param pattern_any_entities: List of Pattern.Any entities. + :type pattern_any_entities: + list[~azure.cognitiveservices.language.luis.authoring.models.PatternAny] + :param regex_entities: List of regular expression entities. + :type regex_entities: + list[~azure.cognitiveservices.language.luis.authoring.models.RegexEntity] + :param prebuilt_entities: List of prebuilt entities. + :type prebuilt_entities: + list[~azure.cognitiveservices.language.luis.authoring.models.PrebuiltEntity] + :param regex_features: List of pattern features. + :type regex_features: + list[~azure.cognitiveservices.language.luis.authoring.models.JSONRegexFeature] + :param model_features: List of model features. + :type model_features: + list[~azure.cognitiveservices.language.luis.authoring.models.JSONModelFeature] + :param patterns: List of patterns. + :type patterns: + list[~azure.cognitiveservices.language.luis.authoring.models.PatternRule] + :param utterances: List of sample utterances. + :type utterances: + list[~azure.cognitiveservices.language.luis.authoring.models.JSONUtterance] + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version_id': {'key': 'versionId', 'type': 'str'}, + 'desc': {'key': 'desc', 'type': 'str'}, + 'culture': {'key': 'culture', 'type': 'str'}, + 'intents': {'key': 'intents', 'type': '[HierarchicalModel]'}, + 'entities': {'key': 'entities', 'type': '[HierarchicalModel]'}, + 'closed_lists': {'key': 'closedLists', 'type': '[ClosedList]'}, + 'composites': {'key': 'composites', 'type': '[HierarchicalModel]'}, + 'pattern_any_entities': {'key': 'patternAnyEntities', 'type': '[PatternAny]'}, + 'regex_entities': {'key': 'regex_entities', 'type': '[RegexEntity]'}, + 'prebuilt_entities': {'key': 'prebuiltEntities', 'type': '[PrebuiltEntity]'}, + 'regex_features': {'key': 'regex_features', 'type': '[JSONRegexFeature]'}, + 'model_features': {'key': 'model_features', 'type': '[JSONModelFeature]'}, + 'patterns': {'key': 'patterns', 'type': '[PatternRule]'}, + 'utterances': {'key': 'utterances', 'type': '[JSONUtterance]'}, + } + + def __init__(self, *, additional_properties=None, name: str=None, version_id: str=None, desc: str=None, culture: str=None, intents=None, entities=None, closed_lists=None, composites=None, pattern_any_entities=None, regex_entities=None, prebuilt_entities=None, regex_features=None, model_features=None, patterns=None, utterances=None, **kwargs) -> None: + super(LuisApp, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.name = name + self.version_id = version_id + self.desc = desc + self.culture = culture + self.intents = intents + self.entities = entities + self.closed_lists = closed_lists + self.composites = composites + self.pattern_any_entities = pattern_any_entities + self.regex_entities = regex_entities + self.prebuilt_entities = prebuilt_entities + self.regex_features = regex_features + self.model_features = model_features + self.patterns = patterns + self.utterances = utterances diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/luis_authoring_client_enums.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/luis_authoring_client_enums.py new file mode 100644 index 000000000000..3bfeb07e7bff --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/luis_authoring_client_enums.py @@ -0,0 +1,26 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class TrainingStatus(str, Enum): + + needs_training = "NeedsTraining" + in_progress = "InProgress" + trained = "Trained" + + +class OperationStatusType(str, Enum): + + failed = "Failed" + failed = "FAILED" + success = "Success" diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_create_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_create_object.py new file mode 100644 index 000000000000..9b36ae03fc85 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_create_object.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ModelCreateObject(Model): + """Object model for creating a new entity extractor. + + :param name: Name of the new entity extractor. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ModelCreateObject, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_create_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_create_object_py3.py new file mode 100644 index 000000000000..23de13f0ad29 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_create_object_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ModelCreateObject(Model): + """Object model for creating a new entity extractor. + + :param name: Name of the new entity extractor. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(ModelCreateObject, self).__init__(**kwargs) + self.name = name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_info.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_info.py new file mode 100644 index 000000000000..e0c343a9962a --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_info.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ModelInfo(Model): + """Base type used in entity types. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ModelInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type_id = kwargs.get('type_id', None) + self.readable_type = kwargs.get('readable_type', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_info_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_info_py3.py new file mode 100644 index 000000000000..1bad46dbe1ff --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_info_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ModelInfo(Model): + """Base type used in entity types. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + } + + def __init__(self, *, id: str, readable_type, name: str=None, type_id: int=None, **kwargs) -> None: + super(ModelInfo, self).__init__(**kwargs) + self.id = id + self.name = name + self.type_id = type_id + self.readable_type = readable_type diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_info_response.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_info_response.py new file mode 100644 index 000000000000..248f6804eb0c --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_info_response.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ModelInfoResponse(Model): + """An application model info. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param roles: + :type roles: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + :param children: List of child entities. + :type children: + list[~azure.cognitiveservices.language.luis.authoring.models.ChildEntity] + :param sub_lists: List of sub-lists. + :type sub_lists: + list[~azure.cognitiveservices.language.luis.authoring.models.SubClosedListResponse] + :param custom_prebuilt_domain_name: The domain name. + :type custom_prebuilt_domain_name: str + :param custom_prebuilt_model_name: The intent name or entity name. + :type custom_prebuilt_model_name: str + :param regex_pattern: The Regex entity pattern. + :type regex_pattern: str + :param explicit_list: + :type explicit_list: + list[~azure.cognitiveservices.language.luis.authoring.models.ExplicitListItem] + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[EntityRole]'}, + 'children': {'key': 'children', 'type': '[ChildEntity]'}, + 'sub_lists': {'key': 'subLists', 'type': '[SubClosedListResponse]'}, + 'custom_prebuilt_domain_name': {'key': 'customPrebuiltDomainName', 'type': 'str'}, + 'custom_prebuilt_model_name': {'key': 'customPrebuiltModelName', 'type': 'str'}, + 'regex_pattern': {'key': 'regexPattern', 'type': 'str'}, + 'explicit_list': {'key': 'explicitList', 'type': '[ExplicitListItem]'}, + } + + def __init__(self, **kwargs): + super(ModelInfoResponse, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type_id = kwargs.get('type_id', None) + self.readable_type = kwargs.get('readable_type', None) + self.roles = kwargs.get('roles', None) + self.children = kwargs.get('children', None) + self.sub_lists = kwargs.get('sub_lists', None) + self.custom_prebuilt_domain_name = kwargs.get('custom_prebuilt_domain_name', None) + self.custom_prebuilt_model_name = kwargs.get('custom_prebuilt_model_name', None) + self.regex_pattern = kwargs.get('regex_pattern', None) + self.explicit_list = kwargs.get('explicit_list', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_info_response_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_info_response_py3.py new file mode 100644 index 000000000000..71c7a76372b8 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_info_response_py3.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ModelInfoResponse(Model): + """An application model info. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param roles: + :type roles: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + :param children: List of child entities. + :type children: + list[~azure.cognitiveservices.language.luis.authoring.models.ChildEntity] + :param sub_lists: List of sub-lists. + :type sub_lists: + list[~azure.cognitiveservices.language.luis.authoring.models.SubClosedListResponse] + :param custom_prebuilt_domain_name: The domain name. + :type custom_prebuilt_domain_name: str + :param custom_prebuilt_model_name: The intent name or entity name. + :type custom_prebuilt_model_name: str + :param regex_pattern: The Regex entity pattern. + :type regex_pattern: str + :param explicit_list: + :type explicit_list: + list[~azure.cognitiveservices.language.luis.authoring.models.ExplicitListItem] + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[EntityRole]'}, + 'children': {'key': 'children', 'type': '[ChildEntity]'}, + 'sub_lists': {'key': 'subLists', 'type': '[SubClosedListResponse]'}, + 'custom_prebuilt_domain_name': {'key': 'customPrebuiltDomainName', 'type': 'str'}, + 'custom_prebuilt_model_name': {'key': 'customPrebuiltModelName', 'type': 'str'}, + 'regex_pattern': {'key': 'regexPattern', 'type': 'str'}, + 'explicit_list': {'key': 'explicitList', 'type': '[ExplicitListItem]'}, + } + + def __init__(self, *, id: str, readable_type, name: str=None, type_id: int=None, roles=None, children=None, sub_lists=None, custom_prebuilt_domain_name: str=None, custom_prebuilt_model_name: str=None, regex_pattern: str=None, explicit_list=None, **kwargs) -> None: + super(ModelInfoResponse, self).__init__(**kwargs) + self.id = id + self.name = name + self.type_id = type_id + self.readable_type = readable_type + self.roles = roles + self.children = children + self.sub_lists = sub_lists + self.custom_prebuilt_domain_name = custom_prebuilt_domain_name + self.custom_prebuilt_model_name = custom_prebuilt_model_name + self.regex_pattern = regex_pattern + self.explicit_list = explicit_list diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_training_details.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_training_details.py new file mode 100644 index 000000000000..427253b29bd2 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_training_details.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ModelTrainingDetails(Model): + """Model Training Details. + + :param status_id: The train request status ID. + :type status_id: int + :param status: Possible values include: 'Queued', 'InProgress', + 'UpToDate', 'Fail', 'Success' + :type status: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param example_count: The count of examples used to train the model. + :type example_count: int + :param training_date_time: When the model was trained. + :type training_date_time: datetime + :param failure_reason: Reason for the training failure. + :type failure_reason: str + """ + + _attribute_map = { + 'status_id': {'key': 'statusId', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'str'}, + 'example_count': {'key': 'exampleCount', 'type': 'int'}, + 'training_date_time': {'key': 'trainingDateTime', 'type': 'iso-8601'}, + 'failure_reason': {'key': 'failureReason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ModelTrainingDetails, self).__init__(**kwargs) + self.status_id = kwargs.get('status_id', None) + self.status = kwargs.get('status', None) + self.example_count = kwargs.get('example_count', None) + self.training_date_time = kwargs.get('training_date_time', None) + self.failure_reason = kwargs.get('failure_reason', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_training_details_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_training_details_py3.py new file mode 100644 index 000000000000..c2543172aa13 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_training_details_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ModelTrainingDetails(Model): + """Model Training Details. + + :param status_id: The train request status ID. + :type status_id: int + :param status: Possible values include: 'Queued', 'InProgress', + 'UpToDate', 'Fail', 'Success' + :type status: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param example_count: The count of examples used to train the model. + :type example_count: int + :param training_date_time: When the model was trained. + :type training_date_time: datetime + :param failure_reason: Reason for the training failure. + :type failure_reason: str + """ + + _attribute_map = { + 'status_id': {'key': 'statusId', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'str'}, + 'example_count': {'key': 'exampleCount', 'type': 'int'}, + 'training_date_time': {'key': 'trainingDateTime', 'type': 'iso-8601'}, + 'failure_reason': {'key': 'failureReason', 'type': 'str'}, + } + + def __init__(self, *, status_id: int=None, status=None, example_count: int=None, training_date_time=None, failure_reason: str=None, **kwargs) -> None: + super(ModelTrainingDetails, self).__init__(**kwargs) + self.status_id = status_id + self.status = status + self.example_count = example_count + self.training_date_time = training_date_time + self.failure_reason = failure_reason diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_training_info.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_training_info.py new file mode 100644 index 000000000000..d109eb91ee90 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_training_info.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ModelTrainingInfo(Model): + """Model Training Info. + + :param model_id: The ID (GUID) of the model. + :type model_id: str + :param details: + :type details: + ~azure.cognitiveservices.language.luis.authoring.models.ModelTrainingDetails + """ + + _attribute_map = { + 'model_id': {'key': 'modelId', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'ModelTrainingDetails'}, + } + + def __init__(self, **kwargs): + super(ModelTrainingInfo, self).__init__(**kwargs) + self.model_id = kwargs.get('model_id', None) + self.details = kwargs.get('details', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_training_info_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_training_info_py3.py new file mode 100644 index 000000000000..8438b22feb5d --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_training_info_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ModelTrainingInfo(Model): + """Model Training Info. + + :param model_id: The ID (GUID) of the model. + :type model_id: str + :param details: + :type details: + ~azure.cognitiveservices.language.luis.authoring.models.ModelTrainingDetails + """ + + _attribute_map = { + 'model_id': {'key': 'modelId', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'ModelTrainingDetails'}, + } + + def __init__(self, *, model_id: str=None, details=None, **kwargs) -> None: + super(ModelTrainingInfo, self).__init__(**kwargs) + self.model_id = model_id + self.details = details diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_update_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_update_object.py new file mode 100644 index 000000000000..48a90ffdca19 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_update_object.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ModelUpdateObject(Model): + """Object model for updating an intent classifier. + + :param name: The entity's new name. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ModelUpdateObject, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_update_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_update_object_py3.py new file mode 100644 index 000000000000..6cd1883b9785 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/model_update_object_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ModelUpdateObject(Model): + """Object model for updating an intent classifier. + + :param name: The entity's new name. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(ModelUpdateObject, self).__init__(**kwargs) + self.name = name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/operation_error.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/operation_error.py new file mode 100644 index 000000000000..a462335ec3e6 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/operation_error.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationError(Model): + """Operation error details when invoking an operation on the API. + + :param code: + :type code: str + :param message: + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/operation_error_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/operation_error_py3.py new file mode 100644 index 000000000000..54bb37d5858a --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/operation_error_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationError(Model): + """Operation error details when invoking an operation on the API. + + :param code: + :type code: str + :param message: + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(OperationError, self).__init__(**kwargs) + self.code = code + self.message = message diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/operation_status.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/operation_status.py new file mode 100644 index 000000000000..5b248a947a07 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/operation_status.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationStatus(Model): + """Response of an Operation status. + + :param code: Status Code. Possible values include: 'Failed', 'FAILED', + 'Success' + :type code: str or + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatusType + :param message: Status details. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationStatus, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/operation_status_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/operation_status_py3.py new file mode 100644 index 000000000000..86eaec7a342b --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/operation_status_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationStatus(Model): + """Response of an Operation status. + + :param code: Status Code. Possible values include: 'Failed', 'FAILED', + 'Success' + :type code: str or + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatusType + :param message: Status details. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code=None, message: str=None, **kwargs) -> None: + super(OperationStatus, self).__init__(**kwargs) + self.code = code + self.message = message diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any.py new file mode 100644 index 000000000000..1e387ac9266c --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatternAny(Model): + """Pattern.Any Entity Extractor. + + :param name: + :type name: str + :param explicit_list: + :type explicit_list: list[str] + :param roles: + :type roles: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'explicit_list': {'key': 'explicitList', 'type': '[str]'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(PatternAny, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.explicit_list = kwargs.get('explicit_list', None) + self.roles = kwargs.get('roles', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_entity_extractor.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_entity_extractor.py new file mode 100644 index 000000000000..02734b005e2f --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_entity_extractor.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatternAnyEntityExtractor(Model): + """Pattern.Any Entity Extractor. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param roles: + :type roles: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + :param explicit_list: + :type explicit_list: + list[~azure.cognitiveservices.language.luis.authoring.models.ExplicitListItem] + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[EntityRole]'}, + 'explicit_list': {'key': 'explicitList', 'type': '[ExplicitListItem]'}, + } + + def __init__(self, **kwargs): + super(PatternAnyEntityExtractor, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type_id = kwargs.get('type_id', None) + self.readable_type = kwargs.get('readable_type', None) + self.roles = kwargs.get('roles', None) + self.explicit_list = kwargs.get('explicit_list', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_entity_extractor_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_entity_extractor_py3.py new file mode 100644 index 000000000000..d314c1efef96 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_entity_extractor_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatternAnyEntityExtractor(Model): + """Pattern.Any Entity Extractor. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param roles: + :type roles: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + :param explicit_list: + :type explicit_list: + list[~azure.cognitiveservices.language.luis.authoring.models.ExplicitListItem] + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[EntityRole]'}, + 'explicit_list': {'key': 'explicitList', 'type': '[ExplicitListItem]'}, + } + + def __init__(self, *, id: str, readable_type, name: str=None, type_id: int=None, roles=None, explicit_list=None, **kwargs) -> None: + super(PatternAnyEntityExtractor, self).__init__(**kwargs) + self.id = id + self.name = name + self.type_id = type_id + self.readable_type = readable_type + self.roles = roles + self.explicit_list = explicit_list diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_model_create_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_model_create_object.py new file mode 100644 index 000000000000..ffc81536f171 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_model_create_object.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatternAnyModelCreateObject(Model): + """Model object for creating a Pattern.Any entity model. + + :param name: The model name. + :type name: str + :param explicit_list: The Pattern.Any explicit list. + :type explicit_list: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'explicit_list': {'key': 'explicitList', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(PatternAnyModelCreateObject, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.explicit_list = kwargs.get('explicit_list', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_model_create_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_model_create_object_py3.py new file mode 100644 index 000000000000..e05d2e78fced --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_model_create_object_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatternAnyModelCreateObject(Model): + """Model object for creating a Pattern.Any entity model. + + :param name: The model name. + :type name: str + :param explicit_list: The Pattern.Any explicit list. + :type explicit_list: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'explicit_list': {'key': 'explicitList', 'type': '[str]'}, + } + + def __init__(self, *, name: str=None, explicit_list=None, **kwargs) -> None: + super(PatternAnyModelCreateObject, self).__init__(**kwargs) + self.name = name + self.explicit_list = explicit_list diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_model_update_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_model_update_object.py new file mode 100644 index 000000000000..5029778eec16 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_model_update_object.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatternAnyModelUpdateObject(Model): + """Model object for updating a Pattern.Any entity model. + + :param name: The model name. + :type name: str + :param explicit_list: The Pattern.Any explicit list. + :type explicit_list: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'explicit_list': {'key': 'explicitList', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(PatternAnyModelUpdateObject, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.explicit_list = kwargs.get('explicit_list', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_model_update_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_model_update_object_py3.py new file mode 100644 index 000000000000..5eebb8604e91 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_model_update_object_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatternAnyModelUpdateObject(Model): + """Model object for updating a Pattern.Any entity model. + + :param name: The model name. + :type name: str + :param explicit_list: The Pattern.Any explicit list. + :type explicit_list: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'explicit_list': {'key': 'explicitList', 'type': '[str]'}, + } + + def __init__(self, *, name: str=None, explicit_list=None, **kwargs) -> None: + super(PatternAnyModelUpdateObject, self).__init__(**kwargs) + self.name = name + self.explicit_list = explicit_list diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_py3.py new file mode 100644 index 000000000000..4530b80f785a --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_any_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatternAny(Model): + """Pattern.Any Entity Extractor. + + :param name: + :type name: str + :param explicit_list: + :type explicit_list: list[str] + :param roles: + :type roles: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'explicit_list': {'key': 'explicitList', 'type': '[str]'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + } + + def __init__(self, *, name: str=None, explicit_list=None, roles=None, **kwargs) -> None: + super(PatternAny, self).__init__(**kwargs) + self.name = name + self.explicit_list = explicit_list + self.roles = roles diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_create_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_create_object.py new file mode 100644 index 000000000000..bfe6cbd82afa --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_create_object.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatternCreateObject(Model): + """Object model for creating a Pattern feature. + + :param pattern: The Regular Expression to match. + :type pattern: str + :param name: Name of the feature. + :type name: str + """ + + _attribute_map = { + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PatternCreateObject, self).__init__(**kwargs) + self.pattern = kwargs.get('pattern', None) + self.name = kwargs.get('name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_create_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_create_object_py3.py new file mode 100644 index 000000000000..e3a04cf8ae1f --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_create_object_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatternCreateObject(Model): + """Object model for creating a Pattern feature. + + :param pattern: The Regular Expression to match. + :type pattern: str + :param name: Name of the feature. + :type name: str + """ + + _attribute_map = { + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, pattern: str=None, name: str=None, **kwargs) -> None: + super(PatternCreateObject, self).__init__(**kwargs) + self.pattern = pattern + self.name = name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_feature_info.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_feature_info.py new file mode 100644 index 000000000000..933ca9fe36d7 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_feature_info.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .feature_info_object import FeatureInfoObject + + +class PatternFeatureInfo(FeatureInfoObject): + """Pattern feature. + + :param id: A six-digit ID used for Features. + :type id: int + :param name: The name of the Feature. + :type name: str + :param is_active: Indicates if the feature is enabled. + :type is_active: bool + :param pattern: The Regular Expression to match. + :type pattern: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_active': {'key': 'isActive', 'type': 'bool'}, + 'pattern': {'key': 'pattern', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PatternFeatureInfo, self).__init__(**kwargs) + self.pattern = kwargs.get('pattern', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_feature_info_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_feature_info_py3.py new file mode 100644 index 000000000000..a4b40c91a2a5 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_feature_info_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .feature_info_object_py3 import FeatureInfoObject + + +class PatternFeatureInfo(FeatureInfoObject): + """Pattern feature. + + :param id: A six-digit ID used for Features. + :type id: int + :param name: The name of the Feature. + :type name: str + :param is_active: Indicates if the feature is enabled. + :type is_active: bool + :param pattern: The Regular Expression to match. + :type pattern: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_active': {'key': 'isActive', 'type': 'bool'}, + 'pattern': {'key': 'pattern', 'type': 'str'}, + } + + def __init__(self, *, id: int=None, name: str=None, is_active: bool=None, pattern: str=None, **kwargs) -> None: + super(PatternFeatureInfo, self).__init__(id=id, name=name, is_active=is_active, **kwargs) + self.pattern = pattern diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule.py new file mode 100644 index 000000000000..e33c0d6f09f2 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatternRule(Model): + """Pattern. + + :param pattern: The pattern text. + :type pattern: str + :param intent: The intent's name where the pattern belongs to. + :type intent: str + """ + + _attribute_map = { + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'intent': {'key': 'intent', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PatternRule, self).__init__(**kwargs) + self.pattern = kwargs.get('pattern', None) + self.intent = kwargs.get('intent', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_create_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_create_object.py new file mode 100644 index 000000000000..5a77116ae668 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_create_object.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatternRuleCreateObject(Model): + """Object model for creating a pattern. + + :param pattern: The pattern text. + :type pattern: str + :param intent: The intent's name which the pattern belongs to. + :type intent: str + """ + + _attribute_map = { + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'intent': {'key': 'intent', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PatternRuleCreateObject, self).__init__(**kwargs) + self.pattern = kwargs.get('pattern', None) + self.intent = kwargs.get('intent', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_create_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_create_object_py3.py new file mode 100644 index 000000000000..9e8ca81b8b09 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_create_object_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatternRuleCreateObject(Model): + """Object model for creating a pattern. + + :param pattern: The pattern text. + :type pattern: str + :param intent: The intent's name which the pattern belongs to. + :type intent: str + """ + + _attribute_map = { + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'intent': {'key': 'intent', 'type': 'str'}, + } + + def __init__(self, *, pattern: str=None, intent: str=None, **kwargs) -> None: + super(PatternRuleCreateObject, self).__init__(**kwargs) + self.pattern = pattern + self.intent = intent diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_info.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_info.py new file mode 100644 index 000000000000..6f0d52b08f30 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_info.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatternRuleInfo(Model): + """Pattern rule. + + :param id: The pattern ID. + :type id: str + :param pattern: The pattern text. + :type pattern: str + :param intent: The intent's name where the pattern belongs to. + :type intent: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'intent': {'key': 'intent', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PatternRuleInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.pattern = kwargs.get('pattern', None) + self.intent = kwargs.get('intent', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_info_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_info_py3.py new file mode 100644 index 000000000000..5596d02b5b2a --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_info_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatternRuleInfo(Model): + """Pattern rule. + + :param id: The pattern ID. + :type id: str + :param pattern: The pattern text. + :type pattern: str + :param intent: The intent's name where the pattern belongs to. + :type intent: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'intent': {'key': 'intent', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, pattern: str=None, intent: str=None, **kwargs) -> None: + super(PatternRuleInfo, self).__init__(**kwargs) + self.id = id + self.pattern = pattern + self.intent = intent diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_py3.py new file mode 100644 index 000000000000..d6cd7b10b903 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatternRule(Model): + """Pattern. + + :param pattern: The pattern text. + :type pattern: str + :param intent: The intent's name where the pattern belongs to. + :type intent: str + """ + + _attribute_map = { + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'intent': {'key': 'intent', 'type': 'str'}, + } + + def __init__(self, *, pattern: str=None, intent: str=None, **kwargs) -> None: + super(PatternRule, self).__init__(**kwargs) + self.pattern = pattern + self.intent = intent diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_update_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_update_object.py new file mode 100644 index 000000000000..ed8250d67e3d --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_update_object.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatternRuleUpdateObject(Model): + """Object model for updating a pattern. + + :param id: The pattern ID. + :type id: str + :param pattern: The pattern text. + :type pattern: str + :param intent: The intent's name which the pattern belongs to. + :type intent: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'intent': {'key': 'intent', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PatternRuleUpdateObject, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.pattern = kwargs.get('pattern', None) + self.intent = kwargs.get('intent', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_update_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_update_object_py3.py new file mode 100644 index 000000000000..c29a7d6f87f6 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_rule_update_object_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatternRuleUpdateObject(Model): + """Object model for updating a pattern. + + :param id: The pattern ID. + :type id: str + :param pattern: The pattern text. + :type pattern: str + :param intent: The intent's name which the pattern belongs to. + :type intent: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'intent': {'key': 'intent', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, pattern: str=None, intent: str=None, **kwargs) -> None: + super(PatternRuleUpdateObject, self).__init__(**kwargs) + self.id = id + self.pattern = pattern + self.intent = intent diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_update_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_update_object.py new file mode 100644 index 000000000000..bc6aceea21cd --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_update_object.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatternUpdateObject(Model): + """Object model for updating an existing Pattern feature. + + :param pattern: The Regular Expression to match. + :type pattern: str + :param name: Name of the feature. + :type name: str + :param is_active: Indicates if the Pattern feature is enabled. Default + value: True . + :type is_active: bool + """ + + _attribute_map = { + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_active': {'key': 'isActive', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(PatternUpdateObject, self).__init__(**kwargs) + self.pattern = kwargs.get('pattern', None) + self.name = kwargs.get('name', None) + self.is_active = kwargs.get('is_active', True) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_update_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_update_object_py3.py new file mode 100644 index 000000000000..c859ac4b8ef4 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/pattern_update_object_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatternUpdateObject(Model): + """Object model for updating an existing Pattern feature. + + :param pattern: The Regular Expression to match. + :type pattern: str + :param name: Name of the feature. + :type name: str + :param is_active: Indicates if the Pattern feature is enabled. Default + value: True . + :type is_active: bool + """ + + _attribute_map = { + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_active': {'key': 'isActive', 'type': 'bool'}, + } + + def __init__(self, *, pattern: str=None, name: str=None, is_active: bool=True, **kwargs) -> None: + super(PatternUpdateObject, self).__init__(**kwargs) + self.pattern = pattern + self.name = name + self.is_active = is_active diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/personal_assistants_response.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/personal_assistants_response.py new file mode 100644 index 000000000000..87df1ac3f3a4 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/personal_assistants_response.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PersonalAssistantsResponse(Model): + """Response containing user's endpoint keys and the endpoint URLs of the + prebuilt Cortana applications. + + :param endpoint_keys: + :type endpoint_keys: list[str] + :param endpoint_urls: + :type endpoint_urls: dict[str, str] + """ + + _attribute_map = { + 'endpoint_keys': {'key': 'endpointKeys', 'type': '[str]'}, + 'endpoint_urls': {'key': 'endpointUrls', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(PersonalAssistantsResponse, self).__init__(**kwargs) + self.endpoint_keys = kwargs.get('endpoint_keys', None) + self.endpoint_urls = kwargs.get('endpoint_urls', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/personal_assistants_response_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/personal_assistants_response_py3.py new file mode 100644 index 000000000000..1305c23bd049 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/personal_assistants_response_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PersonalAssistantsResponse(Model): + """Response containing user's endpoint keys and the endpoint URLs of the + prebuilt Cortana applications. + + :param endpoint_keys: + :type endpoint_keys: list[str] + :param endpoint_urls: + :type endpoint_urls: dict[str, str] + """ + + _attribute_map = { + 'endpoint_keys': {'key': 'endpointKeys', 'type': '[str]'}, + 'endpoint_urls': {'key': 'endpointUrls', 'type': '{str}'}, + } + + def __init__(self, *, endpoint_keys=None, endpoint_urls=None, **kwargs) -> None: + super(PersonalAssistantsResponse, self).__init__(**kwargs) + self.endpoint_keys = endpoint_keys + self.endpoint_urls = endpoint_urls diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phrase_list_feature_info.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phrase_list_feature_info.py new file mode 100644 index 000000000000..70b7793fd27e --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phrase_list_feature_info.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .feature_info_object import FeatureInfoObject + + +class PhraseListFeatureInfo(FeatureInfoObject): + """Phraselist Feature. + + :param id: A six-digit ID used for Features. + :type id: int + :param name: The name of the Feature. + :type name: str + :param is_active: Indicates if the feature is enabled. + :type is_active: bool + :param phrases: A list of comma-separated values. + :type phrases: str + :param is_exchangeable: An exchangeable phrase list feature are serves as + single feature to the LUIS underlying training algorithm. It is used as a + lexicon lookup feature where its value is 1 if the lexicon contains a + given word or 0 if it doesn’t. Think of an exchangeable as a synonyms + list. A non-exchangeable phrase list feature has all the phrases in the + list serve as separate features to the underlying training algorithm. So, + if you your phrase list feature contains 5 phrases, they will be mapped to + 5 separate features. You can think of the non-exchangeable phrase list + feature as an additional bag of words that you are willing to add to LUIS + existing vocabulary features. Think of a non-exchangeable as set of + different words. Default value is true. + :type is_exchangeable: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_active': {'key': 'isActive', 'type': 'bool'}, + 'phrases': {'key': 'phrases', 'type': 'str'}, + 'is_exchangeable': {'key': 'isExchangeable', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(PhraseListFeatureInfo, self).__init__(**kwargs) + self.phrases = kwargs.get('phrases', None) + self.is_exchangeable = kwargs.get('is_exchangeable', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phrase_list_feature_info_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phrase_list_feature_info_py3.py new file mode 100644 index 000000000000..46fbabbaade1 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phrase_list_feature_info_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .feature_info_object_py3 import FeatureInfoObject + + +class PhraseListFeatureInfo(FeatureInfoObject): + """Phraselist Feature. + + :param id: A six-digit ID used for Features. + :type id: int + :param name: The name of the Feature. + :type name: str + :param is_active: Indicates if the feature is enabled. + :type is_active: bool + :param phrases: A list of comma-separated values. + :type phrases: str + :param is_exchangeable: An exchangeable phrase list feature are serves as + single feature to the LUIS underlying training algorithm. It is used as a + lexicon lookup feature where its value is 1 if the lexicon contains a + given word or 0 if it doesn’t. Think of an exchangeable as a synonyms + list. A non-exchangeable phrase list feature has all the phrases in the + list serve as separate features to the underlying training algorithm. So, + if you your phrase list feature contains 5 phrases, they will be mapped to + 5 separate features. You can think of the non-exchangeable phrase list + feature as an additional bag of words that you are willing to add to LUIS + existing vocabulary features. Think of a non-exchangeable as set of + different words. Default value is true. + :type is_exchangeable: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_active': {'key': 'isActive', 'type': 'bool'}, + 'phrases': {'key': 'phrases', 'type': 'str'}, + 'is_exchangeable': {'key': 'isExchangeable', 'type': 'bool'}, + } + + def __init__(self, *, id: int=None, name: str=None, is_active: bool=None, phrases: str=None, is_exchangeable: bool=None, **kwargs) -> None: + super(PhraseListFeatureInfo, self).__init__(id=id, name=name, is_active=is_active, **kwargs) + self.phrases = phrases + self.is_exchangeable = is_exchangeable diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phraselist_create_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phraselist_create_object.py new file mode 100644 index 000000000000..2b6c02589ace --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phraselist_create_object.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PhraselistCreateObject(Model): + """Object model for creating a phraselist model. + + :param phrases: List of comma-separated phrases that represent the + Phraselist. + :type phrases: str + :param name: The Phraselist name. + :type name: str + :param is_exchangeable: An exchangeable phrase list feature are serves as + single feature to the LUIS underlying training algorithm. It is used as a + lexicon lookup feature where its value is 1 if the lexicon contains a + given word or 0 if it doesn’t. Think of an exchangeable as a synonyms + list. A non-exchangeable phrase list feature has all the phrases in the + list serve as separate features to the underlying training algorithm. So, + if you your phrase list feature contains 5 phrases, they will be mapped to + 5 separate features. You can think of the non-exchangeable phrase list + feature as an additional bag of words that you are willing to add to LUIS + existing vocabulary features. Think of a non-exchangeable as set of + different words. Default value is true. Default value: True . + :type is_exchangeable: bool + """ + + _attribute_map = { + 'phrases': {'key': 'phrases', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_exchangeable': {'key': 'isExchangeable', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(PhraselistCreateObject, self).__init__(**kwargs) + self.phrases = kwargs.get('phrases', None) + self.name = kwargs.get('name', None) + self.is_exchangeable = kwargs.get('is_exchangeable', True) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phraselist_create_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phraselist_create_object_py3.py new file mode 100644 index 000000000000..d11a160ab5cf --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phraselist_create_object_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PhraselistCreateObject(Model): + """Object model for creating a phraselist model. + + :param phrases: List of comma-separated phrases that represent the + Phraselist. + :type phrases: str + :param name: The Phraselist name. + :type name: str + :param is_exchangeable: An exchangeable phrase list feature are serves as + single feature to the LUIS underlying training algorithm. It is used as a + lexicon lookup feature where its value is 1 if the lexicon contains a + given word or 0 if it doesn’t. Think of an exchangeable as a synonyms + list. A non-exchangeable phrase list feature has all the phrases in the + list serve as separate features to the underlying training algorithm. So, + if you your phrase list feature contains 5 phrases, they will be mapped to + 5 separate features. You can think of the non-exchangeable phrase list + feature as an additional bag of words that you are willing to add to LUIS + existing vocabulary features. Think of a non-exchangeable as set of + different words. Default value is true. Default value: True . + :type is_exchangeable: bool + """ + + _attribute_map = { + 'phrases': {'key': 'phrases', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_exchangeable': {'key': 'isExchangeable', 'type': 'bool'}, + } + + def __init__(self, *, phrases: str=None, name: str=None, is_exchangeable: bool=True, **kwargs) -> None: + super(PhraselistCreateObject, self).__init__(**kwargs) + self.phrases = phrases + self.name = name + self.is_exchangeable = is_exchangeable diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phraselist_update_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phraselist_update_object.py new file mode 100644 index 000000000000..1868d7d5727e --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phraselist_update_object.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PhraselistUpdateObject(Model): + """Object model for updating a Phraselist. + + :param phrases: List of comma-separated phrases that represent the + Phraselist. + :type phrases: str + :param name: The Phraselist name. + :type name: str + :param is_active: Indicates if the Phraselist is enabled. Default value: + True . + :type is_active: bool + :param is_exchangeable: An exchangeable phrase list feature are serves as + single feature to the LUIS underlying training algorithm. It is used as a + lexicon lookup feature where its value is 1 if the lexicon contains a + given word or 0 if it doesn’t. Think of an exchangeable as a synonyms + list. A non-exchangeable phrase list feature has all the phrases in the + list serve as separate features to the underlying training algorithm. So, + if you your phrase list feature contains 5 phrases, they will be mapped to + 5 separate features. You can think of the non-exchangeable phrase list + feature as an additional bag of words that you are willing to add to LUIS + existing vocabulary features. Think of a non-exchangeable as set of + different words. Default value is true. Default value: True . + :type is_exchangeable: bool + """ + + _attribute_map = { + 'phrases': {'key': 'phrases', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_active': {'key': 'isActive', 'type': 'bool'}, + 'is_exchangeable': {'key': 'isExchangeable', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(PhraselistUpdateObject, self).__init__(**kwargs) + self.phrases = kwargs.get('phrases', None) + self.name = kwargs.get('name', None) + self.is_active = kwargs.get('is_active', True) + self.is_exchangeable = kwargs.get('is_exchangeable', True) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phraselist_update_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phraselist_update_object_py3.py new file mode 100644 index 000000000000..9b8229f22ea1 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/phraselist_update_object_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PhraselistUpdateObject(Model): + """Object model for updating a Phraselist. + + :param phrases: List of comma-separated phrases that represent the + Phraselist. + :type phrases: str + :param name: The Phraselist name. + :type name: str + :param is_active: Indicates if the Phraselist is enabled. Default value: + True . + :type is_active: bool + :param is_exchangeable: An exchangeable phrase list feature are serves as + single feature to the LUIS underlying training algorithm. It is used as a + lexicon lookup feature where its value is 1 if the lexicon contains a + given word or 0 if it doesn’t. Think of an exchangeable as a synonyms + list. A non-exchangeable phrase list feature has all the phrases in the + list serve as separate features to the underlying training algorithm. So, + if you your phrase list feature contains 5 phrases, they will be mapped to + 5 separate features. You can think of the non-exchangeable phrase list + feature as an additional bag of words that you are willing to add to LUIS + existing vocabulary features. Think of a non-exchangeable as set of + different words. Default value is true. Default value: True . + :type is_exchangeable: bool + """ + + _attribute_map = { + 'phrases': {'key': 'phrases', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_active': {'key': 'isActive', 'type': 'bool'}, + 'is_exchangeable': {'key': 'isExchangeable', 'type': 'bool'}, + } + + def __init__(self, *, phrases: str=None, name: str=None, is_active: bool=True, is_exchangeable: bool=True, **kwargs) -> None: + super(PhraselistUpdateObject, self).__init__(**kwargs) + self.phrases = phrases + self.name = name + self.is_active = is_active + self.is_exchangeable = is_exchangeable diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain.py new file mode 100644 index 000000000000..77282d007ba8 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PrebuiltDomain(Model): + """Prebuilt Domain. + + :param name: + :type name: str + :param culture: + :type culture: str + :param description: + :type description: str + :param examples: + :type examples: str + :param intents: + :type intents: + list[~azure.cognitiveservices.language.luis.authoring.models.PrebuiltDomainItem] + :param entities: + :type entities: + list[~azure.cognitiveservices.language.luis.authoring.models.PrebuiltDomainItem] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'culture': {'key': 'culture', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'examples': {'key': 'examples', 'type': 'str'}, + 'intents': {'key': 'intents', 'type': '[PrebuiltDomainItem]'}, + 'entities': {'key': 'entities', 'type': '[PrebuiltDomainItem]'}, + } + + def __init__(self, **kwargs): + super(PrebuiltDomain, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.culture = kwargs.get('culture', None) + self.description = kwargs.get('description', None) + self.examples = kwargs.get('examples', None) + self.intents = kwargs.get('intents', None) + self.entities = kwargs.get('entities', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_create_base_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_create_base_object.py new file mode 100644 index 000000000000..5dc7001070f1 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_create_base_object.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PrebuiltDomainCreateBaseObject(Model): + """A model object containing the name of the custom prebuilt entity and the + name of the domain to which this model belongs. + + :param domain_name: The domain name. + :type domain_name: str + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrebuiltDomainCreateBaseObject, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_create_base_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_create_base_object_py3.py new file mode 100644 index 000000000000..27f5a3362560 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_create_base_object_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PrebuiltDomainCreateBaseObject(Model): + """A model object containing the name of the custom prebuilt entity and the + name of the domain to which this model belongs. + + :param domain_name: The domain name. + :type domain_name: str + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + } + + def __init__(self, *, domain_name: str=None, **kwargs) -> None: + super(PrebuiltDomainCreateBaseObject, self).__init__(**kwargs) + self.domain_name = domain_name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_create_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_create_object.py new file mode 100644 index 000000000000..428e369de681 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_create_object.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PrebuiltDomainCreateObject(Model): + """A prebuilt domain create object containing the name and culture of the + domain. + + :param domain_name: The domain name. + :type domain_name: str + :param culture: The culture of the new domain. + :type culture: str + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'culture': {'key': 'culture', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrebuiltDomainCreateObject, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.culture = kwargs.get('culture', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_create_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_create_object_py3.py new file mode 100644 index 000000000000..fcf69ca20060 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_create_object_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PrebuiltDomainCreateObject(Model): + """A prebuilt domain create object containing the name and culture of the + domain. + + :param domain_name: The domain name. + :type domain_name: str + :param culture: The culture of the new domain. + :type culture: str + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'culture': {'key': 'culture', 'type': 'str'}, + } + + def __init__(self, *, domain_name: str=None, culture: str=None, **kwargs) -> None: + super(PrebuiltDomainCreateObject, self).__init__(**kwargs) + self.domain_name = domain_name + self.culture = culture diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_item.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_item.py new file mode 100644 index 000000000000..70c9a7f7724a --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_item.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PrebuiltDomainItem(Model): + """PrebuiltDomainItem. + + :param name: + :type name: str + :param description: + :type description: str + :param examples: + :type examples: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'examples': {'key': 'examples', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrebuiltDomainItem, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.examples = kwargs.get('examples', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_item_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_item_py3.py new file mode 100644 index 000000000000..c063a4d3b0ef --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_item_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PrebuiltDomainItem(Model): + """PrebuiltDomainItem. + + :param name: + :type name: str + :param description: + :type description: str + :param examples: + :type examples: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'examples': {'key': 'examples', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, description: str=None, examples: str=None, **kwargs) -> None: + super(PrebuiltDomainItem, self).__init__(**kwargs) + self.name = name + self.description = description + self.examples = examples diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_model_create_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_model_create_object.py new file mode 100644 index 000000000000..8c1e8bac0675 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_model_create_object.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PrebuiltDomainModelCreateObject(Model): + """A model object containing the name of the custom prebuilt intent or entity + and the name of the domain to which this model belongs. + + :param domain_name: The domain name. + :type domain_name: str + :param model_name: The intent name or entity name. + :type model_name: str + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'model_name': {'key': 'modelName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrebuiltDomainModelCreateObject, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.model_name = kwargs.get('model_name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_model_create_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_model_create_object_py3.py new file mode 100644 index 000000000000..bc84614944d5 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_model_create_object_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PrebuiltDomainModelCreateObject(Model): + """A model object containing the name of the custom prebuilt intent or entity + and the name of the domain to which this model belongs. + + :param domain_name: The domain name. + :type domain_name: str + :param model_name: The intent name or entity name. + :type model_name: str + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'model_name': {'key': 'modelName', 'type': 'str'}, + } + + def __init__(self, *, domain_name: str=None, model_name: str=None, **kwargs) -> None: + super(PrebuiltDomainModelCreateObject, self).__init__(**kwargs) + self.domain_name = domain_name + self.model_name = model_name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_object.py new file mode 100644 index 000000000000..042ca8a52dfd --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_object.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PrebuiltDomainObject(Model): + """PrebuiltDomainObject. + + :param domain_name: + :type domain_name: str + :param model_name: + :type model_name: str + """ + + _attribute_map = { + 'domain_name': {'key': 'domain_name', 'type': 'str'}, + 'model_name': {'key': 'model_name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrebuiltDomainObject, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.model_name = kwargs.get('model_name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_object_py3.py new file mode 100644 index 000000000000..08ccea442ee8 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_object_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PrebuiltDomainObject(Model): + """PrebuiltDomainObject. + + :param domain_name: + :type domain_name: str + :param model_name: + :type model_name: str + """ + + _attribute_map = { + 'domain_name': {'key': 'domain_name', 'type': 'str'}, + 'model_name': {'key': 'model_name', 'type': 'str'}, + } + + def __init__(self, *, domain_name: str=None, model_name: str=None, **kwargs) -> None: + super(PrebuiltDomainObject, self).__init__(**kwargs) + self.domain_name = domain_name + self.model_name = model_name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_py3.py new file mode 100644 index 000000000000..0f5a52578365 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_domain_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PrebuiltDomain(Model): + """Prebuilt Domain. + + :param name: + :type name: str + :param culture: + :type culture: str + :param description: + :type description: str + :param examples: + :type examples: str + :param intents: + :type intents: + list[~azure.cognitiveservices.language.luis.authoring.models.PrebuiltDomainItem] + :param entities: + :type entities: + list[~azure.cognitiveservices.language.luis.authoring.models.PrebuiltDomainItem] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'culture': {'key': 'culture', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'examples': {'key': 'examples', 'type': 'str'}, + 'intents': {'key': 'intents', 'type': '[PrebuiltDomainItem]'}, + 'entities': {'key': 'entities', 'type': '[PrebuiltDomainItem]'}, + } + + def __init__(self, *, name: str=None, culture: str=None, description: str=None, examples: str=None, intents=None, entities=None, **kwargs) -> None: + super(PrebuiltDomain, self).__init__(**kwargs) + self.name = name + self.culture = culture + self.description = description + self.examples = examples + self.intents = intents + self.entities = entities diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_entity.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_entity.py new file mode 100644 index 000000000000..fa1c4a731dd5 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_entity.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PrebuiltEntity(Model): + """Prebuilt Entity Extractor. + + :param name: + :type name: str + :param roles: + :type roles: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(PrebuiltEntity, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.roles = kwargs.get('roles', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_entity_extractor.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_entity_extractor.py new file mode 100644 index 000000000000..97a7074ab071 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_entity_extractor.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PrebuiltEntityExtractor(Model): + """Prebuilt Entity Extractor. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param roles: + :type roles: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[EntityRole]'}, + } + + def __init__(self, **kwargs): + super(PrebuiltEntityExtractor, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type_id = kwargs.get('type_id', None) + self.readable_type = kwargs.get('readable_type', None) + self.roles = kwargs.get('roles', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_entity_extractor_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_entity_extractor_py3.py new file mode 100644 index 000000000000..b6c64eed7c91 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_entity_extractor_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PrebuiltEntityExtractor(Model): + """Prebuilt Entity Extractor. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param roles: + :type roles: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[EntityRole]'}, + } + + def __init__(self, *, id: str, readable_type, name: str=None, type_id: int=None, roles=None, **kwargs) -> None: + super(PrebuiltEntityExtractor, self).__init__(**kwargs) + self.id = id + self.name = name + self.type_id = type_id + self.readable_type = readable_type + self.roles = roles diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_entity_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_entity_py3.py new file mode 100644 index 000000000000..3248f4797375 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/prebuilt_entity_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PrebuiltEntity(Model): + """Prebuilt Entity Extractor. + + :param name: + :type name: str + :param roles: + :type roles: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + } + + def __init__(self, *, name: str=None, roles=None, **kwargs) -> None: + super(PrebuiltEntity, self).__init__(**kwargs) + self.name = name + self.roles = roles diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/production_or_staging_endpoint_info.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/production_or_staging_endpoint_info.py new file mode 100644 index 000000000000..a51c82080aec --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/production_or_staging_endpoint_info.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .endpoint_info import EndpointInfo + + +class ProductionOrStagingEndpointInfo(EndpointInfo): + """ProductionOrStagingEndpointInfo. + + :param version_id: The version ID to publish. + :type version_id: str + :param is_staging: Indicates if the staging slot should be used, instead + of the Production one. + :type is_staging: bool + :param endpoint_url: The Runtime endpoint URL for this model version. + :type endpoint_url: str + :param region: The target region that the application is published to. + :type region: str + :param assigned_endpoint_key: The endpoint key. + :type assigned_endpoint_key: str + :param endpoint_region: The endpoint's region. + :type endpoint_region: str + :param published_date_time: Timestamp when was last published. + :type published_date_time: str + """ + + _attribute_map = { + 'version_id': {'key': 'versionId', 'type': 'str'}, + 'is_staging': {'key': 'isStaging', 'type': 'bool'}, + 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'assigned_endpoint_key': {'key': 'assignedEndpointKey', 'type': 'str'}, + 'endpoint_region': {'key': 'endpointRegion', 'type': 'str'}, + 'published_date_time': {'key': 'publishedDateTime', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProductionOrStagingEndpointInfo, self).__init__(**kwargs) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/production_or_staging_endpoint_info_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/production_or_staging_endpoint_info_py3.py new file mode 100644 index 000000000000..c6a1ee157c3e --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/production_or_staging_endpoint_info_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .endpoint_info_py3 import EndpointInfo + + +class ProductionOrStagingEndpointInfo(EndpointInfo): + """ProductionOrStagingEndpointInfo. + + :param version_id: The version ID to publish. + :type version_id: str + :param is_staging: Indicates if the staging slot should be used, instead + of the Production one. + :type is_staging: bool + :param endpoint_url: The Runtime endpoint URL for this model version. + :type endpoint_url: str + :param region: The target region that the application is published to. + :type region: str + :param assigned_endpoint_key: The endpoint key. + :type assigned_endpoint_key: str + :param endpoint_region: The endpoint's region. + :type endpoint_region: str + :param published_date_time: Timestamp when was last published. + :type published_date_time: str + """ + + _attribute_map = { + 'version_id': {'key': 'versionId', 'type': 'str'}, + 'is_staging': {'key': 'isStaging', 'type': 'bool'}, + 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'assigned_endpoint_key': {'key': 'assignedEndpointKey', 'type': 'str'}, + 'endpoint_region': {'key': 'endpointRegion', 'type': 'str'}, + 'published_date_time': {'key': 'publishedDateTime', 'type': 'str'}, + } + + def __init__(self, *, version_id: str=None, is_staging: bool=None, endpoint_url: str=None, region: str=None, assigned_endpoint_key: str=None, endpoint_region: str=None, published_date_time: str=None, **kwargs) -> None: + super(ProductionOrStagingEndpointInfo, self).__init__(version_id=version_id, is_staging=is_staging, endpoint_url=endpoint_url, region=region, assigned_endpoint_key=assigned_endpoint_key, endpoint_region=endpoint_region, published_date_time=published_date_time, **kwargs) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/publish_setting_update_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/publish_setting_update_object.py new file mode 100644 index 000000000000..40528595c704 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/publish_setting_update_object.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PublishSettingUpdateObject(Model): + """Object model for updating an application's publish settings. + + :param sentiment_analysis: Setting sentiment analysis as true returns the + Sentiment of the input utterance along with the resopnse + :type sentiment_analysis: bool + :param speech: Setting speech as public enables speech priming in your app + :type speech: bool + :param spell_checker: Setting spell checker as public enables spell + checking the input utterance. + :type spell_checker: bool + """ + + _attribute_map = { + 'sentiment_analysis': {'key': 'sentimentAnalysis', 'type': 'bool'}, + 'speech': {'key': 'speech', 'type': 'bool'}, + 'spell_checker': {'key': 'spellChecker', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(PublishSettingUpdateObject, self).__init__(**kwargs) + self.sentiment_analysis = kwargs.get('sentiment_analysis', None) + self.speech = kwargs.get('speech', None) + self.spell_checker = kwargs.get('spell_checker', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/publish_setting_update_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/publish_setting_update_object_py3.py new file mode 100644 index 000000000000..356e854eaa15 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/publish_setting_update_object_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PublishSettingUpdateObject(Model): + """Object model for updating an application's publish settings. + + :param sentiment_analysis: Setting sentiment analysis as true returns the + Sentiment of the input utterance along with the resopnse + :type sentiment_analysis: bool + :param speech: Setting speech as public enables speech priming in your app + :type speech: bool + :param spell_checker: Setting spell checker as public enables spell + checking the input utterance. + :type spell_checker: bool + """ + + _attribute_map = { + 'sentiment_analysis': {'key': 'sentimentAnalysis', 'type': 'bool'}, + 'speech': {'key': 'speech', 'type': 'bool'}, + 'spell_checker': {'key': 'spellChecker', 'type': 'bool'}, + } + + def __init__(self, *, sentiment_analysis: bool=None, speech: bool=None, spell_checker: bool=None, **kwargs) -> None: + super(PublishSettingUpdateObject, self).__init__(**kwargs) + self.sentiment_analysis = sentiment_analysis + self.speech = speech + self.spell_checker = spell_checker diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/publish_settings.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/publish_settings.py new file mode 100644 index 000000000000..1a099987d6de --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/publish_settings.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PublishSettings(Model): + """The application publish settings. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The application ID. + :type id: str + :param is_sentiment_analysis_enabled: Required. Setting sentiment analysis + as true returns the Sentiment of the input utterance along with the + resopnse + :type is_sentiment_analysis_enabled: bool + :param is_speech_enabled: Required. Setting speech as public enables + speech priming in your app + :type is_speech_enabled: bool + :param is_spell_checker_enabled: Required. Setting spell checker as public + enables spell checking the input utterance. + :type is_spell_checker_enabled: bool + """ + + _validation = { + 'id': {'required': True}, + 'is_sentiment_analysis_enabled': {'required': True}, + 'is_speech_enabled': {'required': True}, + 'is_spell_checker_enabled': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'is_sentiment_analysis_enabled': {'key': 'sentimentAnalysis', 'type': 'bool'}, + 'is_speech_enabled': {'key': 'speech', 'type': 'bool'}, + 'is_spell_checker_enabled': {'key': 'spellChecker', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(PublishSettings, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.is_sentiment_analysis_enabled = kwargs.get('is_sentiment_analysis_enabled', None) + self.is_speech_enabled = kwargs.get('is_speech_enabled', None) + self.is_spell_checker_enabled = kwargs.get('is_spell_checker_enabled', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/publish_settings_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/publish_settings_py3.py new file mode 100644 index 000000000000..0da2f80efdad --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/publish_settings_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PublishSettings(Model): + """The application publish settings. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The application ID. + :type id: str + :param is_sentiment_analysis_enabled: Required. Setting sentiment analysis + as true returns the Sentiment of the input utterance along with the + resopnse + :type is_sentiment_analysis_enabled: bool + :param is_speech_enabled: Required. Setting speech as public enables + speech priming in your app + :type is_speech_enabled: bool + :param is_spell_checker_enabled: Required. Setting spell checker as public + enables spell checking the input utterance. + :type is_spell_checker_enabled: bool + """ + + _validation = { + 'id': {'required': True}, + 'is_sentiment_analysis_enabled': {'required': True}, + 'is_speech_enabled': {'required': True}, + 'is_spell_checker_enabled': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'is_sentiment_analysis_enabled': {'key': 'sentimentAnalysis', 'type': 'bool'}, + 'is_speech_enabled': {'key': 'speech', 'type': 'bool'}, + 'is_spell_checker_enabled': {'key': 'spellChecker', 'type': 'bool'}, + } + + def __init__(self, *, id: str, is_sentiment_analysis_enabled: bool, is_speech_enabled: bool, is_spell_checker_enabled: bool, **kwargs) -> None: + super(PublishSettings, self).__init__(**kwargs) + self.id = id + self.is_sentiment_analysis_enabled = is_sentiment_analysis_enabled + self.is_speech_enabled = is_speech_enabled + self.is_spell_checker_enabled = is_spell_checker_enabled diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_entity.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_entity.py new file mode 100644 index 000000000000..2c8596418d26 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_entity.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RegexEntity(Model): + """Regular Expression Entity Extractor. + + :param name: + :type name: str + :param regex_pattern: + :type regex_pattern: str + :param roles: + :type roles: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'regex_pattern': {'key': 'regexPattern', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(RegexEntity, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.regex_pattern = kwargs.get('regex_pattern', None) + self.roles = kwargs.get('roles', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_entity_extractor.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_entity_extractor.py new file mode 100644 index 000000000000..967a662542bf --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_entity_extractor.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RegexEntityExtractor(Model): + """Regex Entity Extractor. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param roles: + :type roles: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + :param regex_pattern: The Regex entity pattern. + :type regex_pattern: str + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[EntityRole]'}, + 'regex_pattern': {'key': 'regexPattern', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegexEntityExtractor, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type_id = kwargs.get('type_id', None) + self.readable_type = kwargs.get('readable_type', None) + self.roles = kwargs.get('roles', None) + self.regex_pattern = kwargs.get('regex_pattern', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_entity_extractor_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_entity_extractor_py3.py new file mode 100644 index 000000000000..6537df3828bc --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_entity_extractor_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RegexEntityExtractor(Model): + """Regex Entity Extractor. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the Entity Model. + :type id: str + :param name: Name of the Entity Model. + :type name: str + :param type_id: The type ID of the Entity Model. + :type type_id: int + :param readable_type: Required. Possible values include: 'Entity + Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity + Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor', + 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity + Extractor', 'Regex Entity Extractor' + :type readable_type: str or + ~azure.cognitiveservices.language.luis.authoring.models.enum + :param roles: + :type roles: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + :param regex_pattern: The Regex entity pattern. + :type regex_pattern: str + """ + + _validation = { + 'id': {'required': True}, + 'readable_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'int'}, + 'readable_type': {'key': 'readableType', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[EntityRole]'}, + 'regex_pattern': {'key': 'regexPattern', 'type': 'str'}, + } + + def __init__(self, *, id: str, readable_type, name: str=None, type_id: int=None, roles=None, regex_pattern: str=None, **kwargs) -> None: + super(RegexEntityExtractor, self).__init__(**kwargs) + self.id = id + self.name = name + self.type_id = type_id + self.readable_type = readable_type + self.roles = roles + self.regex_pattern = regex_pattern diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_entity_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_entity_py3.py new file mode 100644 index 000000000000..46d45bc647cb --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_entity_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RegexEntity(Model): + """Regular Expression Entity Extractor. + + :param name: + :type name: str + :param regex_pattern: + :type regex_pattern: str + :param roles: + :type roles: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'regex_pattern': {'key': 'regexPattern', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + } + + def __init__(self, *, name: str=None, regex_pattern: str=None, roles=None, **kwargs) -> None: + super(RegexEntity, self).__init__(**kwargs) + self.name = name + self.regex_pattern = regex_pattern + self.roles = roles diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_model_create_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_model_create_object.py new file mode 100644 index 000000000000..2ce2bf2070e8 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_model_create_object.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RegexModelCreateObject(Model): + """Model object for creating a regex entity model. + + :param regex_pattern: The regex entity pattern. + :type regex_pattern: str + :param name: The model name. + :type name: str + """ + + _attribute_map = { + 'regex_pattern': {'key': 'regexPattern', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegexModelCreateObject, self).__init__(**kwargs) + self.regex_pattern = kwargs.get('regex_pattern', None) + self.name = kwargs.get('name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_model_create_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_model_create_object_py3.py new file mode 100644 index 000000000000..d4731ac8c7e0 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_model_create_object_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RegexModelCreateObject(Model): + """Model object for creating a regex entity model. + + :param regex_pattern: The regex entity pattern. + :type regex_pattern: str + :param name: The model name. + :type name: str + """ + + _attribute_map = { + 'regex_pattern': {'key': 'regexPattern', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, regex_pattern: str=None, name: str=None, **kwargs) -> None: + super(RegexModelCreateObject, self).__init__(**kwargs) + self.regex_pattern = regex_pattern + self.name = name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_model_update_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_model_update_object.py new file mode 100644 index 000000000000..f6032fbfac58 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_model_update_object.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RegexModelUpdateObject(Model): + """Model object for updating a regex entity model. + + :param regex_pattern: The regex entity pattern. + :type regex_pattern: str + :param name: The model name. + :type name: str + """ + + _attribute_map = { + 'regex_pattern': {'key': 'regexPattern', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegexModelUpdateObject, self).__init__(**kwargs) + self.regex_pattern = kwargs.get('regex_pattern', None) + self.name = kwargs.get('name', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_model_update_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_model_update_object_py3.py new file mode 100644 index 000000000000..8ac545b33f84 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/regex_model_update_object_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RegexModelUpdateObject(Model): + """Model object for updating a regex entity model. + + :param regex_pattern: The regex entity pattern. + :type regex_pattern: str + :param name: The model name. + :type name: str + """ + + _attribute_map = { + 'regex_pattern': {'key': 'regexPattern', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, regex_pattern: str=None, name: str=None, **kwargs) -> None: + super(RegexModelUpdateObject, self).__init__(**kwargs) + self.regex_pattern = regex_pattern + self.name = name diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/sub_closed_list.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/sub_closed_list.py new file mode 100644 index 000000000000..a17b5ccca12f --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/sub_closed_list.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubClosedList(Model): + """Sublist of items for a Closed list. + + :param canonical_form: The standard form that the list represents. + :type canonical_form: str + :param list: List of synonym words. + :type list: list[str] + """ + + _attribute_map = { + 'canonical_form': {'key': 'canonicalForm', 'type': 'str'}, + 'list': {'key': 'list', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(SubClosedList, self).__init__(**kwargs) + self.canonical_form = kwargs.get('canonical_form', None) + self.list = kwargs.get('list', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/sub_closed_list_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/sub_closed_list_py3.py new file mode 100644 index 000000000000..ebdf1743b646 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/sub_closed_list_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubClosedList(Model): + """Sublist of items for a Closed list. + + :param canonical_form: The standard form that the list represents. + :type canonical_form: str + :param list: List of synonym words. + :type list: list[str] + """ + + _attribute_map = { + 'canonical_form': {'key': 'canonicalForm', 'type': 'str'}, + 'list': {'key': 'list', 'type': '[str]'}, + } + + def __init__(self, *, canonical_form: str=None, list=None, **kwargs) -> None: + super(SubClosedList, self).__init__(**kwargs) + self.canonical_form = canonical_form + self.list = list diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/sub_closed_list_response.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/sub_closed_list_response.py new file mode 100644 index 000000000000..c9eb9f3629e5 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/sub_closed_list_response.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sub_closed_list import SubClosedList + + +class SubClosedListResponse(SubClosedList): + """Sublist of items for a Closed list. + + :param canonical_form: The standard form that the list represents. + :type canonical_form: str + :param list: List of synonym words. + :type list: list[str] + :param id: The sublist ID + :type id: int + """ + + _attribute_map = { + 'canonical_form': {'key': 'canonicalForm', 'type': 'str'}, + 'list': {'key': 'list', 'type': '[str]'}, + 'id': {'key': 'id', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(SubClosedListResponse, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/sub_closed_list_response_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/sub_closed_list_response_py3.py new file mode 100644 index 000000000000..ece19c644cdd --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/sub_closed_list_response_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sub_closed_list_py3 import SubClosedList + + +class SubClosedListResponse(SubClosedList): + """Sublist of items for a Closed list. + + :param canonical_form: The standard form that the list represents. + :type canonical_form: str + :param list: List of synonym words. + :type list: list[str] + :param id: The sublist ID + :type id: int + """ + + _attribute_map = { + 'canonical_form': {'key': 'canonicalForm', 'type': 'str'}, + 'list': {'key': 'list', 'type': '[str]'}, + 'id': {'key': 'id', 'type': 'int'}, + } + + def __init__(self, *, canonical_form: str=None, list=None, id: int=None, **kwargs) -> None: + super(SubClosedListResponse, self).__init__(canonical_form=canonical_form, list=list, **kwargs) + self.id = id diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/task_update_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/task_update_object.py new file mode 100644 index 000000000000..eb056c9d15f8 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/task_update_object.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TaskUpdateObject(Model): + """Object model for cloning an application's version. + + :param version: The new version for the cloned model. + :type version: str + """ + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TaskUpdateObject, self).__init__(**kwargs) + self.version = kwargs.get('version', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/task_update_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/task_update_object_py3.py new file mode 100644 index 000000000000..137f760a6f76 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/task_update_object_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TaskUpdateObject(Model): + """Object model for cloning an application's version. + + :param version: The new version for the cloned model. + :type version: str + """ + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, version: str=None, **kwargs) -> None: + super(TaskUpdateObject, self).__init__(**kwargs) + self.version = version diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/user_access_list.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/user_access_list.py new file mode 100644 index 000000000000..2ad79f2119d0 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/user_access_list.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UserAccessList(Model): + """List of user permissions. + + :param owner: The email address of owner of the application. + :type owner: str + :param emails: + :type emails: list[str] + """ + + _attribute_map = { + 'owner': {'key': 'owner', 'type': 'str'}, + 'emails': {'key': 'emails', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(UserAccessList, self).__init__(**kwargs) + self.owner = kwargs.get('owner', None) + self.emails = kwargs.get('emails', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/user_access_list_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/user_access_list_py3.py new file mode 100644 index 000000000000..8aef250b0288 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/user_access_list_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UserAccessList(Model): + """List of user permissions. + + :param owner: The email address of owner of the application. + :type owner: str + :param emails: + :type emails: list[str] + """ + + _attribute_map = { + 'owner': {'key': 'owner', 'type': 'str'}, + 'emails': {'key': 'emails', 'type': '[str]'}, + } + + def __init__(self, *, owner: str=None, emails=None, **kwargs) -> None: + super(UserAccessList, self).__init__(**kwargs) + self.owner = owner + self.emails = emails diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/user_collaborator.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/user_collaborator.py new file mode 100644 index 000000000000..847620cc4504 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/user_collaborator.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UserCollaborator(Model): + """UserCollaborator. + + :param email: The email address of the user. + :type email: str + """ + + _attribute_map = { + 'email': {'key': 'email', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserCollaborator, self).__init__(**kwargs) + self.email = kwargs.get('email', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/user_collaborator_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/user_collaborator_py3.py new file mode 100644 index 000000000000..07070c0c87d0 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/user_collaborator_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UserCollaborator(Model): + """UserCollaborator. + + :param email: The email address of the user. + :type email: str + """ + + _attribute_map = { + 'email': {'key': 'email', 'type': 'str'}, + } + + def __init__(self, *, email: str=None, **kwargs) -> None: + super(UserCollaborator, self).__init__(**kwargs) + self.email = email diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/version_info.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/version_info.py new file mode 100644 index 000000000000..70abdb2b3e09 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/version_info.py @@ -0,0 +1,82 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VersionInfo(Model): + """Object model of an application version. + + All required parameters must be populated in order to send to Azure. + + :param version: Required. The version ID. E.g.: "0.1" + :type version: str + :param created_date_time: The version's creation timestamp. + :type created_date_time: datetime + :param last_modified_date_time: Timestamp of the last update. + :type last_modified_date_time: datetime + :param last_trained_date_time: Timestamp of the last time the model was + trained. + :type last_trained_date_time: datetime + :param last_published_date_time: Timestamp when was last published. + :type last_published_date_time: datetime + :param endpoint_url: The Runtime endpoint URL for this model version. + :type endpoint_url: str + :param assigned_endpoint_key: The endpoint key. + :type assigned_endpoint_key: dict[str, str] + :param external_api_keys: External keys. + :type external_api_keys: object + :param intents_count: Number of intents in this model. + :type intents_count: int + :param entities_count: Number of entities in this model. + :type entities_count: int + :param endpoint_hits_count: Number of calls made to this endpoint. + :type endpoint_hits_count: int + :param training_status: Required. The current training status. Possible + values include: 'NeedsTraining', 'InProgress', 'Trained' + :type training_status: str or + ~azure.cognitiveservices.language.luis.authoring.models.TrainingStatus + """ + + _validation = { + 'version': {'required': True}, + 'training_status': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, + 'last_trained_date_time': {'key': 'lastTrainedDateTime', 'type': 'iso-8601'}, + 'last_published_date_time': {'key': 'lastPublishedDateTime', 'type': 'iso-8601'}, + 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, + 'assigned_endpoint_key': {'key': 'assignedEndpointKey', 'type': '{str}'}, + 'external_api_keys': {'key': 'externalApiKeys', 'type': 'object'}, + 'intents_count': {'key': 'intentsCount', 'type': 'int'}, + 'entities_count': {'key': 'entitiesCount', 'type': 'int'}, + 'endpoint_hits_count': {'key': 'endpointHitsCount', 'type': 'int'}, + 'training_status': {'key': 'trainingStatus', 'type': 'TrainingStatus'}, + } + + def __init__(self, **kwargs): + super(VersionInfo, self).__init__(**kwargs) + self.version = kwargs.get('version', None) + self.created_date_time = kwargs.get('created_date_time', None) + self.last_modified_date_time = kwargs.get('last_modified_date_time', None) + self.last_trained_date_time = kwargs.get('last_trained_date_time', None) + self.last_published_date_time = kwargs.get('last_published_date_time', None) + self.endpoint_url = kwargs.get('endpoint_url', None) + self.assigned_endpoint_key = kwargs.get('assigned_endpoint_key', None) + self.external_api_keys = kwargs.get('external_api_keys', None) + self.intents_count = kwargs.get('intents_count', None) + self.entities_count = kwargs.get('entities_count', None) + self.endpoint_hits_count = kwargs.get('endpoint_hits_count', None) + self.training_status = kwargs.get('training_status', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/version_info_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/version_info_py3.py new file mode 100644 index 000000000000..b888bf52f92c --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/version_info_py3.py @@ -0,0 +1,82 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VersionInfo(Model): + """Object model of an application version. + + All required parameters must be populated in order to send to Azure. + + :param version: Required. The version ID. E.g.: "0.1" + :type version: str + :param created_date_time: The version's creation timestamp. + :type created_date_time: datetime + :param last_modified_date_time: Timestamp of the last update. + :type last_modified_date_time: datetime + :param last_trained_date_time: Timestamp of the last time the model was + trained. + :type last_trained_date_time: datetime + :param last_published_date_time: Timestamp when was last published. + :type last_published_date_time: datetime + :param endpoint_url: The Runtime endpoint URL for this model version. + :type endpoint_url: str + :param assigned_endpoint_key: The endpoint key. + :type assigned_endpoint_key: dict[str, str] + :param external_api_keys: External keys. + :type external_api_keys: object + :param intents_count: Number of intents in this model. + :type intents_count: int + :param entities_count: Number of entities in this model. + :type entities_count: int + :param endpoint_hits_count: Number of calls made to this endpoint. + :type endpoint_hits_count: int + :param training_status: Required. The current training status. Possible + values include: 'NeedsTraining', 'InProgress', 'Trained' + :type training_status: str or + ~azure.cognitiveservices.language.luis.authoring.models.TrainingStatus + """ + + _validation = { + 'version': {'required': True}, + 'training_status': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, + 'last_trained_date_time': {'key': 'lastTrainedDateTime', 'type': 'iso-8601'}, + 'last_published_date_time': {'key': 'lastPublishedDateTime', 'type': 'iso-8601'}, + 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, + 'assigned_endpoint_key': {'key': 'assignedEndpointKey', 'type': '{str}'}, + 'external_api_keys': {'key': 'externalApiKeys', 'type': 'object'}, + 'intents_count': {'key': 'intentsCount', 'type': 'int'}, + 'entities_count': {'key': 'entitiesCount', 'type': 'int'}, + 'endpoint_hits_count': {'key': 'endpointHitsCount', 'type': 'int'}, + 'training_status': {'key': 'trainingStatus', 'type': 'TrainingStatus'}, + } + + def __init__(self, *, version: str, training_status, created_date_time=None, last_modified_date_time=None, last_trained_date_time=None, last_published_date_time=None, endpoint_url: str=None, assigned_endpoint_key=None, external_api_keys=None, intents_count: int=None, entities_count: int=None, endpoint_hits_count: int=None, **kwargs) -> None: + super(VersionInfo, self).__init__(**kwargs) + self.version = version + self.created_date_time = created_date_time + self.last_modified_date_time = last_modified_date_time + self.last_trained_date_time = last_trained_date_time + self.last_published_date_time = last_published_date_time + self.endpoint_url = endpoint_url + self.assigned_endpoint_key = assigned_endpoint_key + self.external_api_keys = external_api_keys + self.intents_count = intents_count + self.entities_count = entities_count + self.endpoint_hits_count = endpoint_hits_count + self.training_status = training_status diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/word_list_base_update_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/word_list_base_update_object.py new file mode 100644 index 000000000000..23e053d2f11d --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/word_list_base_update_object.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WordListBaseUpdateObject(Model): + """Object model for updating one of the closed list's sublists. + + :param canonical_form: The standard form that the list represents. + :type canonical_form: str + :param list: List of synonym words. + :type list: list[str] + """ + + _attribute_map = { + 'canonical_form': {'key': 'canonicalForm', 'type': 'str'}, + 'list': {'key': 'list', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(WordListBaseUpdateObject, self).__init__(**kwargs) + self.canonical_form = kwargs.get('canonical_form', None) + self.list = kwargs.get('list', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/word_list_base_update_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/word_list_base_update_object_py3.py new file mode 100644 index 000000000000..a8125b37bbe2 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/word_list_base_update_object_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WordListBaseUpdateObject(Model): + """Object model for updating one of the closed list's sublists. + + :param canonical_form: The standard form that the list represents. + :type canonical_form: str + :param list: List of synonym words. + :type list: list[str] + """ + + _attribute_map = { + 'canonical_form': {'key': 'canonicalForm', 'type': 'str'}, + 'list': {'key': 'list', 'type': '[str]'}, + } + + def __init__(self, *, canonical_form: str=None, list=None, **kwargs) -> None: + super(WordListBaseUpdateObject, self).__init__(**kwargs) + self.canonical_form = canonical_form + self.list = list diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/word_list_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/word_list_object.py new file mode 100644 index 000000000000..e91704e7c45f --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/word_list_object.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WordListObject(Model): + """Sublist of items for a Closed list. + + :param canonical_form: The standard form that the list represents. + :type canonical_form: str + :param list: List of synonym words. + :type list: list[str] + """ + + _attribute_map = { + 'canonical_form': {'key': 'canonicalForm', 'type': 'str'}, + 'list': {'key': 'list', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(WordListObject, self).__init__(**kwargs) + self.canonical_form = kwargs.get('canonical_form', None) + self.list = kwargs.get('list', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/word_list_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/word_list_object_py3.py new file mode 100644 index 000000000000..7b739930233a --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/word_list_object_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WordListObject(Model): + """Sublist of items for a Closed list. + + :param canonical_form: The standard form that the list represents. + :type canonical_form: str + :param list: List of synonym words. + :type list: list[str] + """ + + _attribute_map = { + 'canonical_form': {'key': 'canonicalForm', 'type': 'str'}, + 'list': {'key': 'list', 'type': '[str]'}, + } + + def __init__(self, *, canonical_form: str=None, list=None, **kwargs) -> None: + super(WordListObject, self).__init__(**kwargs) + self.canonical_form = canonical_form + self.list = list diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/__init__.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/__init__.py new file mode 100644 index 000000000000..a77faab1cd1d --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/__init__.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .features_operations import FeaturesOperations +from .examples_operations import ExamplesOperations +from .model_operations import ModelOperations +from .apps_operations import AppsOperations +from .versions_operations import VersionsOperations +from .train_operations import TrainOperations +from .permissions_operations import PermissionsOperations +from .pattern_operations import PatternOperations + +__all__ = [ + 'FeaturesOperations', + 'ExamplesOperations', + 'ModelOperations', + 'AppsOperations', + 'VersionsOperations', + 'TrainOperations', + 'PermissionsOperations', + 'PatternOperations', +] diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/apps_operations.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/apps_operations.py new file mode 100644 index 000000000000..18b46100b82a --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/apps_operations.py @@ -0,0 +1,1158 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse +from msrest.exceptions import HttpOperationError + +from .. import models + + +class AppsOperations(object): + """AppsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def add( + self, application_create_object, custom_headers=None, raw=False, **operation_config): + """Creates a new LUIS app. + + :param application_create_object: A model containing Name, Description + (optional), Culture, Usage Scenario (optional), Domain (optional) and + initial version ID (optional) of the application. Default value for + the version ID is 0.1. Note: the culture cannot be changed after the + app is created. + :type application_create_object: + ~azure.cognitiveservices.language.luis.authoring.models.ApplicationCreateObject + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.add.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(application_create_object, 'ApplicationCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add.metadata = {'url': '/apps/'} + + def list( + self, skip=0, take=100, custom_headers=None, raw=False, **operation_config): + """Lists all of the user applications. + + :param skip: The number of entries to skip. Default value is 0. + :type skip: int + :param take: The number of entries to return. Maximum page size is + 500. Default is 100. + :type take: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.ApplicationInfoResponse] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip is not None: + query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[ApplicationInfoResponse]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/apps/'} + + def import_method( + self, luis_app, app_name=None, custom_headers=None, raw=False, **operation_config): + """Imports an application to LUIS, the application's structure should be + included in in the request body. + + :param luis_app: A LUIS application structure. + :type luis_app: + ~azure.cognitiveservices.language.luis.authoring.models.LuisApp + :param app_name: The application name to create. If not specified, the + application name will be read from the imported object. + :type app_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.import_method.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if app_name is not None: + query_parameters['appName'] = self._serialize.query("app_name", app_name, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(luis_app, 'LuisApp') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + import_method.metadata = {'url': '/apps/import'} + + def list_cortana_endpoints( + self, custom_headers=None, raw=False, **operation_config): + """Gets the endpoint URLs for the prebuilt Cortana applications. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PersonalAssistantsResponse or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.PersonalAssistantsResponse + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_cortana_endpoints.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PersonalAssistantsResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_cortana_endpoints.metadata = {'url': '/apps/assistants'} + + def list_domains( + self, custom_headers=None, raw=False, **operation_config): + """Gets the available application domains. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[str] or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_domains.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[str]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_domains.metadata = {'url': '/apps/domains'} + + def list_usage_scenarios( + self, custom_headers=None, raw=False, **operation_config): + """Gets the application available usage scenarios. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[str] or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_usage_scenarios.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[str]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_usage_scenarios.metadata = {'url': '/apps/usagescenarios'} + + def list_supported_cultures( + self, custom_headers=None, raw=False, **operation_config): + """Gets the supported application cultures. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.AvailableCulture] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_supported_cultures.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[AvailableCulture]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_supported_cultures.metadata = {'url': '/apps/cultures'} + + def download_query_logs( + self, app_id, custom_headers=None, raw=False, callback=None, **operation_config): + """Gets the query logs of the past month for the application. + + :param app_id: The application ID. + :type app_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`HttpOperationError` + """ + # Construct URL + url = self.download_query_logs.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/octet-stream' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) + + if response.status_code not in [200]: + raise HttpOperationError(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + download_query_logs.metadata = {'url': '/apps/{appId}/querylogs'} + + def get( + self, app_id, custom_headers=None, raw=False, **operation_config): + """Gets the application info. + + :param app_id: The application ID. + :type app_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInfoResponse or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.ApplicationInfoResponse + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInfoResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/apps/{appId}'} + + def update( + self, app_id, name=None, description=None, custom_headers=None, raw=False, **operation_config): + """Updates the name or description of the application. + + :param app_id: The application ID. + :type app_id: str + :param name: The application's new name. + :type name: str + :param description: The application's new description. + :type description: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + application_update_object = models.ApplicationUpdateObject(name=name, description=description) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(application_update_object, 'ApplicationUpdateObject') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/apps/{appId}'} + + def delete( + self, app_id, custom_headers=None, raw=False, **operation_config): + """Deletes an application. + + :param app_id: The application ID. + :type app_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/apps/{appId}'} + + def publish( + self, app_id, application_publish_object, custom_headers=None, raw=False, **operation_config): + """Publishes a specific version of the application. + + :param app_id: The application ID. + :type app_id: str + :param application_publish_object: The application publish object. The + region is the target region that the application is published to. + :type application_publish_object: + ~azure.cognitiveservices.language.luis.authoring.models.ApplicationPublishObject + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProductionOrStagingEndpointInfo or ClientRawResponse if + raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.ProductionOrStagingEndpointInfo + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.publish.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(application_publish_object, 'ApplicationPublishObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('ProductionOrStagingEndpointInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + publish.metadata = {'url': '/apps/{appId}/publish'} + + def get_settings( + self, app_id, custom_headers=None, raw=False, **operation_config): + """Get the application settings. + + :param app_id: The application ID. + :type app_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationSettings or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.ApplicationSettings + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_settings.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ApplicationSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_settings.metadata = {'url': '/apps/{appId}/settings'} + + def update_settings( + self, app_id, public=None, custom_headers=None, raw=False, **operation_config): + """Updates the application settings. + + :param app_id: The application ID. + :type app_id: str + :param public: Setting your application as public allows other people + to use your application's endpoint using their own keys. + :type public: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + application_setting_update_object = models.ApplicationSettingUpdateObject(public=public) + + # Construct URL + url = self.update_settings.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(application_setting_update_object, 'ApplicationSettingUpdateObject') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_settings.metadata = {'url': '/apps/{appId}/settings'} + + def get_publish_settings( + self, app_id, custom_headers=None, raw=False, **operation_config): + """Get the application publish settings. + + :param app_id: The application ID. + :type app_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublishSettings or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.PublishSettings + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_publish_settings.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PublishSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_publish_settings.metadata = {'url': '/apps/{appId}/publishsettings'} + + def update_publish_settings( + self, app_id, publish_setting_update_object, custom_headers=None, raw=False, **operation_config): + """Updates the application publish settings. + + :param app_id: The application ID. + :type app_id: str + :param publish_setting_update_object: An object containing the new + publish application settings. + :type publish_setting_update_object: + ~azure.cognitiveservices.language.luis.authoring.models.PublishSettingUpdateObject + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update_publish_settings.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(publish_setting_update_object, 'PublishSettingUpdateObject') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_publish_settings.metadata = {'url': '/apps/{appId}/publishsettings'} + + def list_endpoints( + self, app_id, custom_headers=None, raw=False, **operation_config): + """Returns the available endpoint deployment regions and URLs. + + :param app_id: The application ID. + :type app_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: dict or ClientRawResponse if raw=true + :rtype: dict[str, str] or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_endpoints.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('{str}', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_endpoints.metadata = {'url': '/apps/{appId}/endpoints'} + + def list_available_custom_prebuilt_domains( + self, custom_headers=None, raw=False, **operation_config): + """Gets all the available custom prebuilt domains for all cultures. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.PrebuiltDomain] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_available_custom_prebuilt_domains.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[PrebuiltDomain]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_available_custom_prebuilt_domains.metadata = {'url': '/apps/customprebuiltdomains'} + + def add_custom_prebuilt_domain( + self, domain_name=None, culture=None, custom_headers=None, raw=False, **operation_config): + """Adds a prebuilt domain along with its models as a new application. + + :param domain_name: The domain name. + :type domain_name: str + :param culture: The culture of the new domain. + :type culture: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + prebuilt_domain_create_object = models.PrebuiltDomainCreateObject(domain_name=domain_name, culture=culture) + + # Construct URL + url = self.add_custom_prebuilt_domain.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(prebuilt_domain_create_object, 'PrebuiltDomainCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_custom_prebuilt_domain.metadata = {'url': '/apps/customprebuiltdomains'} + + def list_available_custom_prebuilt_domains_for_culture( + self, culture, custom_headers=None, raw=False, **operation_config): + """Gets all the available custom prebuilt domains for a specific culture. + + :param culture: Culture. + :type culture: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.PrebuiltDomain] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_available_custom_prebuilt_domains_for_culture.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'culture': self._serialize.url("culture", culture, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[PrebuiltDomain]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_available_custom_prebuilt_domains_for_culture.metadata = {'url': '/apps/customprebuiltdomains/{culture}'} diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/examples_operations.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/examples_operations.py new file mode 100644 index 000000000000..bf27cabcc64d --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/examples_operations.py @@ -0,0 +1,291 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ExamplesOperations(object): + """ExamplesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def add( + self, app_id, version_id, example_label_object, custom_headers=None, raw=False, **operation_config): + """Adds a labeled example to the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param example_label_object: An example label with the expected intent + and entities. + :type example_label_object: + ~azure.cognitiveservices.language.luis.authoring.models.ExampleLabelObject + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LabelExampleResponse or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.LabelExampleResponse + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.add.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(example_label_object, 'ExampleLabelObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('LabelExampleResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add.metadata = {'url': '/apps/{appId}/versions/{versionId}/example'} + + def batch( + self, app_id, version_id, example_label_object_array, custom_headers=None, raw=False, **operation_config): + """Adds a batch of labeled examples to the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param example_label_object_array: Array of examples. + :type example_label_object_array: + list[~azure.cognitiveservices.language.luis.authoring.models.ExampleLabelObject] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.BatchLabelExample] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.batch.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(example_label_object_array, '[ExampleLabelObject]') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 207]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('[BatchLabelExample]', response) + if response.status_code == 207: + deserialized = self._deserialize('[BatchLabelExample]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + batch.metadata = {'url': '/apps/{appId}/versions/{versionId}/examples'} + + def list( + self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config): + """Returns examples to be reviewed. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param skip: The number of entries to skip. Default value is 0. + :type skip: int + :param take: The number of entries to return. Maximum page size is + 500. Default is 100. + :type take: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.LabeledUtterance] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip is not None: + query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[LabeledUtterance]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/apps/{appId}/versions/{versionId}/examples'} + + def delete( + self, app_id, version_id, example_id, custom_headers=None, raw=False, **operation_config): + """Deletes the labeled example with the specified ID. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param example_id: The example ID. + :type example_id: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'exampleId': self._serialize.url("example_id", example_id, 'int') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/apps/{appId}/versions/{versionId}/examples/{exampleId}'} diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/features_operations.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/features_operations.py new file mode 100644 index 000000000000..9219e51591a3 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/features_operations.py @@ -0,0 +1,423 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class FeaturesOperations(object): + """FeaturesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def add_phrase_list( + self, app_id, version_id, phraselist_create_object, custom_headers=None, raw=False, **operation_config): + """Creates a new phraselist feature. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param phraselist_create_object: A Phraselist object containing Name, + comma-separated Phrases and the isExchangeable boolean. Default value + for isExchangeable is true. + :type phraselist_create_object: + ~azure.cognitiveservices.language.luis.authoring.models.PhraselistCreateObject + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: int or ClientRawResponse if raw=true + :rtype: int or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.add_phrase_list.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(phraselist_create_object, 'PhraselistCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('int', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_phrase_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/phraselists'} + + def list_phrase_lists( + self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config): + """Gets all the phraselist features. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param skip: The number of entries to skip. Default value is 0. + :type skip: int + :param take: The number of entries to return. Maximum page size is + 500. Default is 100. + :type take: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.PhraseListFeatureInfo] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_phrase_lists.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip is not None: + query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[PhraseListFeatureInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_phrase_lists.metadata = {'url': '/apps/{appId}/versions/{versionId}/phraselists'} + + def list( + self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config): + """Gets all the extraction features for the specified application version. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param skip: The number of entries to skip. Default value is 0. + :type skip: int + :param take: The number of entries to return. Maximum page size is + 500. Default is 100. + :type take: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FeaturesResponseObject or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.FeaturesResponseObject + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip is not None: + query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('FeaturesResponseObject', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/apps/{appId}/versions/{versionId}/features'} + + def get_phrase_list( + self, app_id, version_id, phraselist_id, custom_headers=None, raw=False, **operation_config): + """Gets phraselist feature info. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param phraselist_id: The ID of the feature to be retrieved. + :type phraselist_id: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PhraseListFeatureInfo or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.PhraseListFeatureInfo + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_phrase_list.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'phraselistId': self._serialize.url("phraselist_id", phraselist_id, 'int') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PhraseListFeatureInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_phrase_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/phraselists/{phraselistId}'} + + def update_phrase_list( + self, app_id, version_id, phraselist_id, phraselist_update_object=None, custom_headers=None, raw=False, **operation_config): + """Updates the phrases, the state and the name of the phraselist feature. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param phraselist_id: The ID of the feature to be updated. + :type phraselist_id: int + :param phraselist_update_object: The new values for: - Just a boolean + called IsActive, in which case the status of the feature will be + changed. - Name, Pattern, Mode, and a boolean called IsActive to + update the feature. + :type phraselist_update_object: + ~azure.cognitiveservices.language.luis.authoring.models.PhraselistUpdateObject + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update_phrase_list.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'phraselistId': self._serialize.url("phraselist_id", phraselist_id, 'int') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + if phraselist_update_object is not None: + body_content = self._serialize.body(phraselist_update_object, 'PhraselistUpdateObject') + else: + body_content = None + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_phrase_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/phraselists/{phraselistId}'} + + def delete_phrase_list( + self, app_id, version_id, phraselist_id, custom_headers=None, raw=False, **operation_config): + """Deletes a phraselist feature. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param phraselist_id: The ID of the feature to be deleted. + :type phraselist_id: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_phrase_list.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'phraselistId': self._serialize.url("phraselist_id", phraselist_id, 'int') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_phrase_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/phraselists/{phraselistId}'} diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/model_operations.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/model_operations.py new file mode 100644 index 000000000000..12eaada5a040 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/model_operations.py @@ -0,0 +1,6851 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse +from msrest.exceptions import HttpOperationError + +from .. import models + + +class ModelOperations(object): + """ModelOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def add_intent( + self, app_id, version_id, name=None, custom_headers=None, raw=False, **operation_config): + """Adds an intent classifier to the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param name: Name of the new entity extractor. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`HttpOperationError` + """ + intent_create_object = models.ModelCreateObject(name=name) + + # Construct URL + url = self.add_intent.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(intent_create_object, 'ModelCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise HttpOperationError(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_intent.metadata = {'url': '/apps/{appId}/versions/{versionId}/intents'} + + def list_intents( + self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config): + """Gets information about the intent models. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param skip: The number of entries to skip. Default value is 0. + :type skip: int + :param take: The number of entries to return. Maximum page size is + 500. Default is 100. + :type take: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.IntentClassifier] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_intents.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip is not None: + query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[IntentClassifier]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_intents.metadata = {'url': '/apps/{appId}/versions/{versionId}/intents'} + + def add_entity( + self, app_id, version_id, name=None, custom_headers=None, raw=False, **operation_config): + """Adds an entity extractor to the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param name: Name of the new entity extractor. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + model_create_object = models.ModelCreateObject(name=name) + + # Construct URL + url = self.add_entity.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(model_create_object, 'ModelCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities'} + + def list_entities( + self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config): + """Gets information about the entity models. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param skip: The number of entries to skip. Default value is 0. + :type skip: int + :param take: The number of entries to return. Maximum page size is + 500. Default is 100. + :type take: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityExtractor] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_entities.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip is not None: + query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[EntityExtractor]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_entities.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities'} + + def add_hierarchical_entity( + self, app_id, version_id, children=None, name=None, custom_headers=None, raw=False, **operation_config): + """Adds a hierarchical entity extractor to the application version. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param children: Child entities. + :type children: list[str] + :param name: Entity name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + hierarchical_model_create_object = models.HierarchicalEntityModel(children=children, name=name) + + # Construct URL + url = self.add_hierarchical_entity.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(hierarchical_model_create_object, 'HierarchicalEntityModel') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_hierarchical_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities'} + + def list_hierarchical_entities( + self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config): + """Gets information about the hierarchical entity models. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param skip: The number of entries to skip. Default value is 0. + :type skip: int + :param take: The number of entries to return. Maximum page size is + 500. Default is 100. + :type take: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.HierarchicalEntityExtractor] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_hierarchical_entities.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip is not None: + query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[HierarchicalEntityExtractor]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_hierarchical_entities.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities'} + + def add_composite_entity( + self, app_id, version_id, children=None, name=None, custom_headers=None, raw=False, **operation_config): + """Adds a composite entity extractor to the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param children: Child entities. + :type children: list[str] + :param name: Entity name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + composite_model_create_object = models.CompositeEntityModel(children=children, name=name) + + # Construct URL + url = self.add_composite_entity.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(composite_model_create_object, 'CompositeEntityModel') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_composite_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities'} + + def list_composite_entities( + self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config): + """Gets information about the composite entity models. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param skip: The number of entries to skip. Default value is 0. + :type skip: int + :param take: The number of entries to return. Maximum page size is + 500. Default is 100. + :type take: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.CompositeEntityExtractor] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_composite_entities.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip is not None: + query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[CompositeEntityExtractor]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_composite_entities.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities'} + + def list_closed_lists( + self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config): + """Gets information about the closedlist models. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param skip: The number of entries to skip. Default value is 0. + :type skip: int + :param take: The number of entries to return. Maximum page size is + 500. Default is 100. + :type take: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.ClosedListEntityExtractor] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_closed_lists.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip is not None: + query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[ClosedListEntityExtractor]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_closed_lists.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists'} + + def add_closed_list( + self, app_id, version_id, sub_lists=None, name=None, custom_headers=None, raw=False, **operation_config): + """Adds a closed list model to the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param sub_lists: Sublists for the feature. + :type sub_lists: + list[~azure.cognitiveservices.language.luis.authoring.models.WordListObject] + :param name: Name of the closed list feature. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + closed_list_model_create_object = models.ClosedListModelCreateObject(sub_lists=sub_lists, name=name) + + # Construct URL + url = self.add_closed_list.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(closed_list_model_create_object, 'ClosedListModelCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_closed_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists'} + + def add_prebuilt( + self, app_id, version_id, prebuilt_extractor_names, custom_headers=None, raw=False, **operation_config): + """Adds a list of prebuilt entity extractors to the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param prebuilt_extractor_names: An array of prebuilt entity extractor + names. + :type prebuilt_extractor_names: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.PrebuiltEntityExtractor] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.add_prebuilt.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(prebuilt_extractor_names, '[str]') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('[PrebuiltEntityExtractor]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_prebuilt.metadata = {'url': '/apps/{appId}/versions/{versionId}/prebuilts'} + + def list_prebuilts( + self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config): + """Gets information about the prebuilt entity models. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param skip: The number of entries to skip. Default value is 0. + :type skip: int + :param take: The number of entries to return. Maximum page size is + 500. Default is 100. + :type take: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.PrebuiltEntityExtractor] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_prebuilts.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip is not None: + query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[PrebuiltEntityExtractor]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_prebuilts.metadata = {'url': '/apps/{appId}/versions/{versionId}/prebuilts'} + + def list_prebuilt_entities( + self, app_id, version_id, custom_headers=None, raw=False, **operation_config): + """Gets all the available prebuilt entity extractors for the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.AvailablePrebuiltEntityModel] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_prebuilt_entities.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[AvailablePrebuiltEntityModel]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_prebuilt_entities.metadata = {'url': '/apps/{appId}/versions/{versionId}/listprebuilts'} + + def list_models( + self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config): + """Gets information about the application version models. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param skip: The number of entries to skip. Default value is 0. + :type skip: int + :param take: The number of entries to return. Maximum page size is + 500. Default is 100. + :type take: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.ModelInfoResponse] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_models.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip is not None: + query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[ModelInfoResponse]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_models.metadata = {'url': '/apps/{appId}/versions/{versionId}/models'} + + def examples_method( + self, app_id, version_id, model_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config): + """Gets the utterances for the given model in the given app version. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param model_id: The ID (GUID) of the model. + :type model_id: str + :param skip: The number of entries to skip. Default value is 0. + :type skip: int + :param take: The number of entries to return. Maximum page size is + 500. Default is 100. + :type take: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.LabelTextObject] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.examples_method.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'modelId': self._serialize.url("model_id", model_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip is not None: + query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[LabelTextObject]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + examples_method.metadata = {'url': '/apps/{appId}/versions/{versionId}/models/{modelId}/examples'} + + def get_intent( + self, app_id, version_id, intent_id, custom_headers=None, raw=False, **operation_config): + """Gets information about the intent model. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param intent_id: The intent classifier ID. + :type intent_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntentClassifier or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.IntentClassifier + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_intent.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'intentId': self._serialize.url("intent_id", intent_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('IntentClassifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_intent.metadata = {'url': '/apps/{appId}/versions/{versionId}/intents/{intentId}'} + + def update_intent( + self, app_id, version_id, intent_id, name=None, custom_headers=None, raw=False, **operation_config): + """Updates the name of an intent classifier. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param intent_id: The intent classifier ID. + :type intent_id: str + :param name: The entity's new name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + model_update_object = models.ModelUpdateObject(name=name) + + # Construct URL + url = self.update_intent.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'intentId': self._serialize.url("intent_id", intent_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(model_update_object, 'ModelUpdateObject') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_intent.metadata = {'url': '/apps/{appId}/versions/{versionId}/intents/{intentId}'} + + def delete_intent( + self, app_id, version_id, intent_id, delete_utterances=False, custom_headers=None, raw=False, **operation_config): + """Deletes an intent classifier from the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param intent_id: The intent classifier ID. + :type intent_id: str + :param delete_utterances: Also delete the intent's utterances (true). + Or move the utterances to the None intent (false - the default value). + :type delete_utterances: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_intent.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'intentId': self._serialize.url("intent_id", intent_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if delete_utterances is not None: + query_parameters['deleteUtterances'] = self._serialize.query("delete_utterances", delete_utterances, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_intent.metadata = {'url': '/apps/{appId}/versions/{versionId}/intents/{intentId}'} + + def get_entity( + self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config): + """Gets information about the entity model. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity extractor ID. + :type entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EntityExtractor or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.EntityExtractor + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('EntityExtractor', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}'} + + def update_entity( + self, app_id, version_id, entity_id, name=None, custom_headers=None, raw=False, **operation_config): + """Updates the name of an entity extractor. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity extractor ID. + :type entity_id: str + :param name: The entity's new name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + model_update_object = models.ModelUpdateObject(name=name) + + # Construct URL + url = self.update_entity.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(model_update_object, 'ModelUpdateObject') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}'} + + def delete_entity( + self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config): + """Deletes an entity extractor from the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity extractor ID. + :type entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_entity.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}'} + + def get_hierarchical_entity( + self, app_id, version_id, h_entity_id, custom_headers=None, raw=False, **operation_config): + """Gets information about the hierarchical entity model. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param h_entity_id: The hierarchical entity extractor ID. + :type h_entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HierarchicalEntityExtractor or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.HierarchicalEntityExtractor + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_hierarchical_entity.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('HierarchicalEntityExtractor', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hierarchical_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}'} + + def update_hierarchical_entity( + self, app_id, version_id, h_entity_id, children=None, name=None, custom_headers=None, raw=False, **operation_config): + """Updates the name and children of a hierarchical entity model. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param h_entity_id: The hierarchical entity extractor ID. + :type h_entity_id: str + :param children: Child entities. + :type children: list[str] + :param name: Entity name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + hierarchical_model_update_object = models.HierarchicalEntityModel(children=children, name=name) + + # Construct URL + url = self.update_hierarchical_entity.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(hierarchical_model_update_object, 'HierarchicalEntityModel') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_hierarchical_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}'} + + def delete_hierarchical_entity( + self, app_id, version_id, h_entity_id, custom_headers=None, raw=False, **operation_config): + """Deletes a hierarchical entity extractor from the application version. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param h_entity_id: The hierarchical entity extractor ID. + :type h_entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_hierarchical_entity.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_hierarchical_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}'} + + def get_composite_entity( + self, app_id, version_id, c_entity_id, custom_headers=None, raw=False, **operation_config): + """Gets information about the composite entity model. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param c_entity_id: The composite entity extractor ID. + :type c_entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CompositeEntityExtractor or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.CompositeEntityExtractor + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_composite_entity.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'cEntityId': self._serialize.url("c_entity_id", c_entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CompositeEntityExtractor', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_composite_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}'} + + def update_composite_entity( + self, app_id, version_id, c_entity_id, children=None, name=None, custom_headers=None, raw=False, **operation_config): + """Updates the composite entity extractor. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param c_entity_id: The composite entity extractor ID. + :type c_entity_id: str + :param children: Child entities. + :type children: list[str] + :param name: Entity name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + composite_model_update_object = models.CompositeEntityModel(children=children, name=name) + + # Construct URL + url = self.update_composite_entity.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'cEntityId': self._serialize.url("c_entity_id", c_entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(composite_model_update_object, 'CompositeEntityModel') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_composite_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}'} + + def delete_composite_entity( + self, app_id, version_id, c_entity_id, custom_headers=None, raw=False, **operation_config): + """Deletes a composite entity extractor from the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param c_entity_id: The composite entity extractor ID. + :type c_entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_composite_entity.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'cEntityId': self._serialize.url("c_entity_id", c_entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_composite_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}'} + + def get_closed_list( + self, app_id, version_id, cl_entity_id, custom_headers=None, raw=False, **operation_config): + """Gets information of a closed list model. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param cl_entity_id: The closed list model ID. + :type cl_entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ClosedListEntityExtractor or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.ClosedListEntityExtractor + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_closed_list.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'clEntityId': self._serialize.url("cl_entity_id", cl_entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ClosedListEntityExtractor', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_closed_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}'} + + def update_closed_list( + self, app_id, version_id, cl_entity_id, sub_lists=None, name=None, custom_headers=None, raw=False, **operation_config): + """Updates the closed list model. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param cl_entity_id: The closed list model ID. + :type cl_entity_id: str + :param sub_lists: The new sublists for the feature. + :type sub_lists: + list[~azure.cognitiveservices.language.luis.authoring.models.WordListObject] + :param name: The new name of the closed list feature. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + closed_list_model_update_object = models.ClosedListModelUpdateObject(sub_lists=sub_lists, name=name) + + # Construct URL + url = self.update_closed_list.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'clEntityId': self._serialize.url("cl_entity_id", cl_entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(closed_list_model_update_object, 'ClosedListModelUpdateObject') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_closed_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}'} + + def patch_closed_list( + self, app_id, version_id, cl_entity_id, sub_lists=None, custom_headers=None, raw=False, **operation_config): + """Adds a batch of sublists to an existing closedlist. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param cl_entity_id: The closed list model ID. + :type cl_entity_id: str + :param sub_lists: Sublists to add. + :type sub_lists: + list[~azure.cognitiveservices.language.luis.authoring.models.WordListObject] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + closed_list_model_patch_object = models.ClosedListModelPatchObject(sub_lists=sub_lists) + + # Construct URL + url = self.patch_closed_list.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'clEntityId': self._serialize.url("cl_entity_id", cl_entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(closed_list_model_patch_object, 'ClosedListModelPatchObject') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + patch_closed_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}'} + + def delete_closed_list( + self, app_id, version_id, cl_entity_id, custom_headers=None, raw=False, **operation_config): + """Deletes a closed list model from the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param cl_entity_id: The closed list model ID. + :type cl_entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_closed_list.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'clEntityId': self._serialize.url("cl_entity_id", cl_entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_closed_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}'} + + def get_prebuilt( + self, app_id, version_id, prebuilt_id, custom_headers=None, raw=False, **operation_config): + """Gets information about the prebuilt entity model. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param prebuilt_id: The prebuilt entity extractor ID. + :type prebuilt_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrebuiltEntityExtractor or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.PrebuiltEntityExtractor + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_prebuilt.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'prebuiltId': self._serialize.url("prebuilt_id", prebuilt_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PrebuiltEntityExtractor', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_prebuilt.metadata = {'url': '/apps/{appId}/versions/{versionId}/prebuilts/{prebuiltId}'} + + def delete_prebuilt( + self, app_id, version_id, prebuilt_id, custom_headers=None, raw=False, **operation_config): + """Deletes a prebuilt entity extractor from the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param prebuilt_id: The prebuilt entity extractor ID. + :type prebuilt_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_prebuilt.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'prebuiltId': self._serialize.url("prebuilt_id", prebuilt_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_prebuilt.metadata = {'url': '/apps/{appId}/versions/{versionId}/prebuilts/{prebuiltId}'} + + def delete_sub_list( + self, app_id, version_id, cl_entity_id, sub_list_id, custom_headers=None, raw=False, **operation_config): + """Deletes a sublist of a specific closed list model. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param cl_entity_id: The closed list entity extractor ID. + :type cl_entity_id: str + :param sub_list_id: The sublist ID. + :type sub_list_id: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_sub_list.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'clEntityId': self._serialize.url("cl_entity_id", cl_entity_id, 'str'), + 'subListId': self._serialize.url("sub_list_id", sub_list_id, 'int') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_sub_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists/{subListId}'} + + def update_sub_list( + self, app_id, version_id, cl_entity_id, sub_list_id, canonical_form=None, list=None, custom_headers=None, raw=False, **operation_config): + """Updates one of the closed list's sublists. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param cl_entity_id: The closed list entity extractor ID. + :type cl_entity_id: str + :param sub_list_id: The sublist ID. + :type sub_list_id: int + :param canonical_form: The standard form that the list represents. + :type canonical_form: str + :param list: List of synonym words. + :type list: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + word_list_base_update_object = models.WordListBaseUpdateObject(canonical_form=canonical_form, list=list) + + # Construct URL + url = self.update_sub_list.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'clEntityId': self._serialize.url("cl_entity_id", cl_entity_id, 'str'), + 'subListId': self._serialize.url("sub_list_id", sub_list_id, 'int') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(word_list_base_update_object, 'WordListBaseUpdateObject') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_sub_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists/{subListId}'} + + def get_intent_suggestions( + self, app_id, version_id, intent_id, take=100, custom_headers=None, raw=False, **operation_config): + """Suggests examples that would improve the accuracy of the intent model. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param intent_id: The intent classifier ID. + :type intent_id: str + :param take: The number of entries to return. Maximum page size is + 500. Default is 100. + :type take: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.IntentsSuggestionExample] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_intent_suggestions.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'intentId': self._serialize.url("intent_id", intent_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[IntentsSuggestionExample]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_intent_suggestions.metadata = {'url': '/apps/{appId}/versions/{versionId}/intents/{intentId}/suggest'} + + def get_entity_suggestions( + self, app_id, version_id, entity_id, take=100, custom_headers=None, raw=False, **operation_config): + """Get suggestion examples that would improve the accuracy of the entity + model. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The target entity extractor model to enhance. + :type entity_id: str + :param take: The number of entries to return. Maximum page size is + 500. Default is 100. + :type take: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.EntitiesSuggestionExample] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_suggestions.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[EntitiesSuggestionExample]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_entity_suggestions.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}/suggest'} + + def add_sub_list( + self, app_id, version_id, cl_entity_id, canonical_form=None, list=None, custom_headers=None, raw=False, **operation_config): + """Adds a list to an existing closed list. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param cl_entity_id: The closed list entity extractor ID. + :type cl_entity_id: str + :param canonical_form: The standard form that the list represents. + :type canonical_form: str + :param list: List of synonym words. + :type list: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: int or ClientRawResponse if raw=true + :rtype: int or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + word_list_create_object = models.WordListObject(canonical_form=canonical_form, list=list) + + # Construct URL + url = self.add_sub_list.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'clEntityId': self._serialize.url("cl_entity_id", cl_entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(word_list_create_object, 'WordListObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('int', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_sub_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists'} + + def add_custom_prebuilt_domain( + self, app_id, version_id, domain_name=None, custom_headers=None, raw=False, **operation_config): + """Adds a customizable prebuilt domain along with all of its models to + this application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param domain_name: The domain name. + :type domain_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[str] or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + prebuilt_domain_object = models.PrebuiltDomainCreateBaseObject(domain_name=domain_name) + + # Construct URL + url = self.add_custom_prebuilt_domain.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(prebuilt_domain_object, 'PrebuiltDomainCreateBaseObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('[str]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_custom_prebuilt_domain.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltdomains'} + + def add_custom_prebuilt_intent( + self, app_id, version_id, domain_name=None, model_name=None, custom_headers=None, raw=False, **operation_config): + """Adds a custom prebuilt intent model to the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param domain_name: The domain name. + :type domain_name: str + :param model_name: The intent name or entity name. + :type model_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + prebuilt_domain_model_create_object = models.PrebuiltDomainModelCreateObject(domain_name=domain_name, model_name=model_name) + + # Construct URL + url = self.add_custom_prebuilt_intent.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(prebuilt_domain_model_create_object, 'PrebuiltDomainModelCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_custom_prebuilt_intent.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltintents'} + + def list_custom_prebuilt_intents( + self, app_id, version_id, custom_headers=None, raw=False, **operation_config): + """Gets custom prebuilt intents information of this application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.IntentClassifier] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_custom_prebuilt_intents.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[IntentClassifier]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_custom_prebuilt_intents.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltintents'} + + def add_custom_prebuilt_entity( + self, app_id, version_id, domain_name=None, model_name=None, custom_headers=None, raw=False, **operation_config): + """Adds a custom prebuilt entity model to the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param domain_name: The domain name. + :type domain_name: str + :param model_name: The intent name or entity name. + :type model_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + prebuilt_domain_model_create_object = models.PrebuiltDomainModelCreateObject(domain_name=domain_name, model_name=model_name) + + # Construct URL + url = self.add_custom_prebuilt_entity.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(prebuilt_domain_model_create_object, 'PrebuiltDomainModelCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_custom_prebuilt_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltentities'} + + def list_custom_prebuilt_entities( + self, app_id, version_id, custom_headers=None, raw=False, **operation_config): + """Gets all custom prebuilt entities information of this application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityExtractor] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_custom_prebuilt_entities.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[EntityExtractor]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_custom_prebuilt_entities.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltentities'} + + def list_custom_prebuilt_models( + self, app_id, version_id, custom_headers=None, raw=False, **operation_config): + """Gets all custom prebuilt models information of this application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.CustomPrebuiltModel] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_custom_prebuilt_models.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[CustomPrebuiltModel]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_custom_prebuilt_models.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltmodels'} + + def delete_custom_prebuilt_domain( + self, app_id, version_id, domain_name, custom_headers=None, raw=False, **operation_config): + """Deletes a prebuilt domain's models from the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param domain_name: Domain name. + :type domain_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_custom_prebuilt_domain.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_custom_prebuilt_domain.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltdomains/{domainName}'} + + def get_hierarchical_entity_child( + self, app_id, version_id, h_entity_id, h_child_id, custom_headers=None, raw=False, **operation_config): + """Gets information about the hierarchical entity child model. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param h_entity_id: The hierarchical entity extractor ID. + :type h_entity_id: str + :param h_child_id: The hierarchical entity extractor child ID. + :type h_child_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HierarchicalChildEntity or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.HierarchicalChildEntity + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_hierarchical_entity_child.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str'), + 'hChildId': self._serialize.url("h_child_id", h_child_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('HierarchicalChildEntity', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hierarchical_entity_child.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}'} + + def update_hierarchical_entity_child( + self, app_id, version_id, h_entity_id, h_child_id, name=None, custom_headers=None, raw=False, **operation_config): + """Renames a single child in an existing hierarchical entity model. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param h_entity_id: The hierarchical entity extractor ID. + :type h_entity_id: str + :param h_child_id: The hierarchical entity extractor child ID. + :type h_child_id: str + :param name: + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + hierarchical_child_model_update_object = models.HierarchicalChildModelUpdateObject(name=name) + + # Construct URL + url = self.update_hierarchical_entity_child.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str'), + 'hChildId': self._serialize.url("h_child_id", h_child_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(hierarchical_child_model_update_object, 'HierarchicalChildModelUpdateObject') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_hierarchical_entity_child.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}'} + + def delete_hierarchical_entity_child( + self, app_id, version_id, h_entity_id, h_child_id, custom_headers=None, raw=False, **operation_config): + """Deletes a hierarchical entity extractor child from the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param h_entity_id: The hierarchical entity extractor ID. + :type h_entity_id: str + :param h_child_id: The hierarchical entity extractor child ID. + :type h_child_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_hierarchical_entity_child.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str'), + 'hChildId': self._serialize.url("h_child_id", h_child_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_hierarchical_entity_child.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}'} + + def add_hierarchical_entity_child( + self, app_id, version_id, h_entity_id, name=None, custom_headers=None, raw=False, **operation_config): + """Creates a single child in an existing hierarchical entity model. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param h_entity_id: The hierarchical entity extractor ID. + :type h_entity_id: str + :param name: + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + hierarchical_child_model_create_object = models.HierarchicalChildModelCreateObject(name=name) + + # Construct URL + url = self.add_hierarchical_entity_child.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(hierarchical_child_model_create_object, 'HierarchicalChildModelCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_hierarchical_entity_child.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children'} + + def add_composite_entity_child( + self, app_id, version_id, c_entity_id, name=None, custom_headers=None, raw=False, **operation_config): + """Creates a single child in an existing composite entity model. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param c_entity_id: The composite entity extractor ID. + :type c_entity_id: str + :param name: + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + composite_child_model_create_object = models.CompositeChildModelCreateObject(name=name) + + # Construct URL + url = self.add_composite_entity_child.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'cEntityId': self._serialize.url("c_entity_id", c_entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(composite_child_model_create_object, 'CompositeChildModelCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_composite_entity_child.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/children'} + + def delete_composite_entity_child( + self, app_id, version_id, c_entity_id, c_child_id, custom_headers=None, raw=False, **operation_config): + """Deletes a composite entity extractor child from the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param c_entity_id: The composite entity extractor ID. + :type c_entity_id: str + :param c_child_id: The hierarchical entity extractor child ID. + :type c_child_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_composite_entity_child.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'cEntityId': self._serialize.url("c_entity_id", c_entity_id, 'str'), + 'cChildId': self._serialize.url("c_child_id", c_child_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_composite_entity_child.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/children/{cChildId}'} + + def get_regex_entity_infos( + self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config): + """Gets information about the regex entity models. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param skip: The number of entries to skip. Default value is 0. + :type skip: int + :param take: The number of entries to return. Maximum page size is + 500. Default is 100. + :type take: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.RegexEntityExtractor] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_regex_entity_infos.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip is not None: + query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[RegexEntityExtractor]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_regex_entity_infos.metadata = {'url': '/apps/{appId}/versions/{versionId}/regexentities'} + + def create_regex_entity_model( + self, app_id, version_id, regex_pattern=None, name=None, custom_headers=None, raw=False, **operation_config): + """Adds a regex entity model to the application version. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param regex_pattern: The regex entity pattern. + :type regex_pattern: str + :param name: The model name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + regex_entity_extractor_create_obj = models.RegexModelCreateObject(regex_pattern=regex_pattern, name=name) + + # Construct URL + url = self.create_regex_entity_model.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(regex_entity_extractor_create_obj, 'RegexModelCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_regex_entity_model.metadata = {'url': '/apps/{appId}/versions/{versionId}/regexentities'} + + def get_pattern_any_entity_infos( + self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config): + """Get information about the Pattern.Any entity models. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param skip: The number of entries to skip. Default value is 0. + :type skip: int + :param take: The number of entries to return. Maximum page size is + 500. Default is 100. + :type take: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.PatternAnyEntityExtractor] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_pattern_any_entity_infos.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip is not None: + query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[PatternAnyEntityExtractor]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_pattern_any_entity_infos.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities'} + + def create_pattern_any_entity_model( + self, app_id, version_id, name=None, explicit_list=None, custom_headers=None, raw=False, **operation_config): + """Adds a pattern.any entity extractor to the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param name: The model name. + :type name: str + :param explicit_list: The Pattern.Any explicit list. + :type explicit_list: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + extractor_create_object = models.PatternAnyModelCreateObject(name=name, explicit_list=explicit_list) + + # Construct URL + url = self.create_pattern_any_entity_model.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(extractor_create_object, 'PatternAnyModelCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_pattern_any_entity_model.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities'} + + def get_entity_roles( + self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config): + """Get All Entity Roles for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: entity Id + :type entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_roles.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[EntityRole]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_entity_roles.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}/roles'} + + def create_entity_role( + self, app_id, version_id, entity_id, name=None, custom_headers=None, raw=False, **operation_config): + """Create an entity role for an entity in the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity model ID. + :type entity_id: str + :param name: The entity role name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + entity_role_create_object = models.EntityRoleCreateObject(name=name) + + # Construct URL + url = self.create_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(entity_role_create_object, 'EntityRoleCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}/roles'} + + def get_prebuilt_entity_roles( + self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config): + """Get All Entity Roles for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: entity Id + :type entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_prebuilt_entity_roles.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[EntityRole]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_prebuilt_entity_roles.metadata = {'url': '/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles'} + + def create_prebuilt_entity_role( + self, app_id, version_id, entity_id, name=None, custom_headers=None, raw=False, **operation_config): + """Create an entity role for an entity in the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity model ID. + :type entity_id: str + :param name: The entity role name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + entity_role_create_object = models.EntityRoleCreateObject(name=name) + + # Construct URL + url = self.create_prebuilt_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(entity_role_create_object, 'EntityRoleCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_prebuilt_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles'} + + def get_closed_list_entity_roles( + self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config): + """Get All Entity Roles for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: entity Id + :type entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_closed_list_entity_roles.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[EntityRole]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_closed_list_entity_roles.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles'} + + def create_closed_list_entity_role( + self, app_id, version_id, entity_id, name=None, custom_headers=None, raw=False, **operation_config): + """Create an entity role for an entity in the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity model ID. + :type entity_id: str + :param name: The entity role name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + entity_role_create_object = models.EntityRoleCreateObject(name=name) + + # Construct URL + url = self.create_closed_list_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(entity_role_create_object, 'EntityRoleCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_closed_list_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles'} + + def get_regex_entity_roles( + self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config): + """Get All Entity Roles for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: entity Id + :type entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_regex_entity_roles.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[EntityRole]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_regex_entity_roles.metadata = {'url': '/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles'} + + def create_regex_entity_role( + self, app_id, version_id, entity_id, name=None, custom_headers=None, raw=False, **operation_config): + """Create an entity role for an entity in the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity model ID. + :type entity_id: str + :param name: The entity role name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + entity_role_create_object = models.EntityRoleCreateObject(name=name) + + # Construct URL + url = self.create_regex_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(entity_role_create_object, 'EntityRoleCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_regex_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles'} + + def get_composite_entity_roles( + self, app_id, version_id, c_entity_id, custom_headers=None, raw=False, **operation_config): + """Get All Entity Roles for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param c_entity_id: The composite entity extractor ID. + :type c_entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_composite_entity_roles.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'cEntityId': self._serialize.url("c_entity_id", c_entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[EntityRole]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_composite_entity_roles.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles'} + + def create_composite_entity_role( + self, app_id, version_id, c_entity_id, name=None, custom_headers=None, raw=False, **operation_config): + """Create an entity role for an entity in the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param c_entity_id: The composite entity extractor ID. + :type c_entity_id: str + :param name: The entity role name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + entity_role_create_object = models.EntityRoleCreateObject(name=name) + + # Construct URL + url = self.create_composite_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'cEntityId': self._serialize.url("c_entity_id", c_entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(entity_role_create_object, 'EntityRoleCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_composite_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles'} + + def get_pattern_any_entity_roles( + self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config): + """Get All Entity Roles for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: entity Id + :type entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_pattern_any_entity_roles.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[EntityRole]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_pattern_any_entity_roles.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles'} + + def create_pattern_any_entity_role( + self, app_id, version_id, entity_id, name=None, custom_headers=None, raw=False, **operation_config): + """Create an entity role for an entity in the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity model ID. + :type entity_id: str + :param name: The entity role name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + entity_role_create_object = models.EntityRoleCreateObject(name=name) + + # Construct URL + url = self.create_pattern_any_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(entity_role_create_object, 'EntityRoleCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_pattern_any_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles'} + + def get_hierarchical_entity_roles( + self, app_id, version_id, h_entity_id, custom_headers=None, raw=False, **operation_config): + """Get All Entity Roles for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param h_entity_id: The hierarchical entity extractor ID. + :type h_entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_hierarchical_entity_roles.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[EntityRole]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hierarchical_entity_roles.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles'} + + def create_hierarchical_entity_role( + self, app_id, version_id, h_entity_id, name=None, custom_headers=None, raw=False, **operation_config): + """Create an entity role for an entity in the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param h_entity_id: The hierarchical entity extractor ID. + :type h_entity_id: str + :param name: The entity role name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + entity_role_create_object = models.EntityRoleCreateObject(name=name) + + # Construct URL + url = self.create_hierarchical_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(entity_role_create_object, 'EntityRoleCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_hierarchical_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles'} + + def get_custom_prebuilt_entity_roles( + self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config): + """Get All Entity Roles for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: entity Id + :type entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_custom_prebuilt_entity_roles.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[EntityRole]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_custom_prebuilt_entity_roles.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles'} + + def create_custom_prebuilt_entity_role( + self, app_id, version_id, entity_id, name=None, custom_headers=None, raw=False, **operation_config): + """Create an entity role for an entity in the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity model ID. + :type entity_id: str + :param name: The entity role name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + entity_role_create_object = models.EntityRoleCreateObject(name=name) + + # Construct URL + url = self.create_custom_prebuilt_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(entity_role_create_object, 'EntityRoleCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_custom_prebuilt_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles'} + + def get_explicit_list( + self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config): + """Get the explicit list of the pattern.any entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The Pattern.Any entity id. + :type entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.ExplicitListItem] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_explicit_list.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[ExplicitListItem]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_explicit_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist'} + + def add_explicit_list_item( + self, app_id, version_id, entity_id, explicit_list_item=None, custom_headers=None, raw=False, **operation_config): + """Add a new item to the explicit list for the Pattern.Any entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The Pattern.Any entity extractor ID. + :type entity_id: str + :param explicit_list_item: The explicit list item. + :type explicit_list_item: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: int or ClientRawResponse if raw=true + :rtype: int or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + item = models.ExplicitListItemCreateObject(explicit_list_item=explicit_list_item) + + # Construct URL + url = self.add_explicit_list_item.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(item, 'ExplicitListItemCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('int', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_explicit_list_item.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist'} + + def get_regex_entity_entity_info( + self, app_id, version_id, regex_entity_id, custom_headers=None, raw=False, **operation_config): + """Gets information of a regex entity model. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param regex_entity_id: The regex entity model ID. + :type regex_entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RegexEntityExtractor or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.RegexEntityExtractor + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_regex_entity_entity_info.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'regexEntityId': self._serialize.url("regex_entity_id", regex_entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RegexEntityExtractor', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_regex_entity_entity_info.metadata = {'url': '/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}'} + + def update_regex_entity_model( + self, app_id, version_id, regex_entity_id, regex_pattern=None, name=None, custom_headers=None, raw=False, **operation_config): + """Updates the regex entity model . + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param regex_entity_id: The regex entity extractor ID. + :type regex_entity_id: str + :param regex_pattern: The regex entity pattern. + :type regex_pattern: str + :param name: The model name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + regex_entity_update_object = models.RegexModelUpdateObject(regex_pattern=regex_pattern, name=name) + + # Construct URL + url = self.update_regex_entity_model.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'regexEntityId': self._serialize.url("regex_entity_id", regex_entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(regex_entity_update_object, 'RegexModelUpdateObject') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_regex_entity_model.metadata = {'url': '/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}'} + + def delete_regex_entity_model( + self, app_id, version_id, regex_entity_id, custom_headers=None, raw=False, **operation_config): + """Deletes a regex entity model from the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param regex_entity_id: The regex entity extractor ID. + :type regex_entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_regex_entity_model.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'regexEntityId': self._serialize.url("regex_entity_id", regex_entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_regex_entity_model.metadata = {'url': '/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}'} + + def get_pattern_any_entity_info( + self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config): + """Gets information about the application version's Pattern.Any model. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity extractor ID. + :type entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PatternAnyEntityExtractor or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.PatternAnyEntityExtractor + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_pattern_any_entity_info.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PatternAnyEntityExtractor', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_pattern_any_entity_info.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}'} + + def update_pattern_any_entity_model( + self, app_id, version_id, entity_id, name=None, explicit_list=None, custom_headers=None, raw=False, **operation_config): + """Updates the name and explicit list of a Pattern.Any entity model. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The Pattern.Any entity extractor ID. + :type entity_id: str + :param name: The model name. + :type name: str + :param explicit_list: The Pattern.Any explicit list. + :type explicit_list: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + pattern_any_update_object = models.PatternAnyModelUpdateObject(name=name, explicit_list=explicit_list) + + # Construct URL + url = self.update_pattern_any_entity_model.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(pattern_any_update_object, 'PatternAnyModelUpdateObject') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_pattern_any_entity_model.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}'} + + def delete_pattern_any_entity_model( + self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config): + """Deletes a Pattern.Any entity extractor from the application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The Pattern.Any entity extractor ID. + :type entity_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_pattern_any_entity_model.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_pattern_any_entity_model.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}'} + + def get_entity_role( + self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config): + """Get one entity role for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: entity ID. + :type entity_id: str + :param role_id: entity role ID. + :type role_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EntityRole or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.EntityRole or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('EntityRole', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}'} + + def update_entity_role( + self, app_id, version_id, entity_id, role_id, name=None, custom_headers=None, raw=False, **operation_config): + """Update an entity role for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity ID. + :type entity_id: str + :param role_id: The entity role ID. + :type role_id: str + :param name: The entity role name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + entity_role_update_object = models.EntityRoleUpdateObject(name=name) + + # Construct URL + url = self.update_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(entity_role_update_object, 'EntityRoleUpdateObject') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}'} + + def delete_entity_role( + self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config): + """Delete an entity role. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity ID. + :type entity_id: str + :param role_id: The entity role Id. + :type role_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}'} + + def get_prebuilt_entity_role( + self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config): + """Get one entity role for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: entity ID. + :type entity_id: str + :param role_id: entity role ID. + :type role_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EntityRole or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.EntityRole or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_prebuilt_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('EntityRole', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_prebuilt_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}'} + + def update_prebuilt_entity_role( + self, app_id, version_id, entity_id, role_id, name=None, custom_headers=None, raw=False, **operation_config): + """Update an entity role for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity ID. + :type entity_id: str + :param role_id: The entity role ID. + :type role_id: str + :param name: The entity role name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + entity_role_update_object = models.EntityRoleUpdateObject(name=name) + + # Construct URL + url = self.update_prebuilt_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(entity_role_update_object, 'EntityRoleUpdateObject') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_prebuilt_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}'} + + def delete_prebuilt_entity_role( + self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config): + """Delete an entity role. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity ID. + :type entity_id: str + :param role_id: The entity role Id. + :type role_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_prebuilt_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_prebuilt_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}'} + + def get_closed_list_entity_role( + self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config): + """Get one entity role for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: entity ID. + :type entity_id: str + :param role_id: entity role ID. + :type role_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EntityRole or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.EntityRole or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_closed_list_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('EntityRole', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_closed_list_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}'} + + def update_closed_list_entity_role( + self, app_id, version_id, entity_id, role_id, name=None, custom_headers=None, raw=False, **operation_config): + """Update an entity role for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity ID. + :type entity_id: str + :param role_id: The entity role ID. + :type role_id: str + :param name: The entity role name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + entity_role_update_object = models.EntityRoleUpdateObject(name=name) + + # Construct URL + url = self.update_closed_list_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(entity_role_update_object, 'EntityRoleUpdateObject') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_closed_list_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}'} + + def delete_closed_list_entity_role( + self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config): + """Delete an entity role. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity ID. + :type entity_id: str + :param role_id: The entity role Id. + :type role_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_closed_list_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_closed_list_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}'} + + def get_regex_entity_role( + self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config): + """Get one entity role for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: entity ID. + :type entity_id: str + :param role_id: entity role ID. + :type role_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EntityRole or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.EntityRole or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_regex_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('EntityRole', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_regex_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}'} + + def update_regex_entity_role( + self, app_id, version_id, entity_id, role_id, name=None, custom_headers=None, raw=False, **operation_config): + """Update an entity role for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity ID. + :type entity_id: str + :param role_id: The entity role ID. + :type role_id: str + :param name: The entity role name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + entity_role_update_object = models.EntityRoleUpdateObject(name=name) + + # Construct URL + url = self.update_regex_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(entity_role_update_object, 'EntityRoleUpdateObject') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_regex_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}'} + + def delete_regex_entity_role( + self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config): + """Delete an entity role. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity ID. + :type entity_id: str + :param role_id: The entity role Id. + :type role_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_regex_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_regex_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}'} + + def get_composite_entity_role( + self, app_id, version_id, c_entity_id, role_id, custom_headers=None, raw=False, **operation_config): + """Get one entity role for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param c_entity_id: The composite entity extractor ID. + :type c_entity_id: str + :param role_id: entity role ID. + :type role_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EntityRole or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.EntityRole or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_composite_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'cEntityId': self._serialize.url("c_entity_id", c_entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('EntityRole', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_composite_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}'} + + def update_composite_entity_role( + self, app_id, version_id, c_entity_id, role_id, name=None, custom_headers=None, raw=False, **operation_config): + """Update an entity role for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param c_entity_id: The composite entity extractor ID. + :type c_entity_id: str + :param role_id: The entity role ID. + :type role_id: str + :param name: The entity role name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + entity_role_update_object = models.EntityRoleUpdateObject(name=name) + + # Construct URL + url = self.update_composite_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'cEntityId': self._serialize.url("c_entity_id", c_entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(entity_role_update_object, 'EntityRoleUpdateObject') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_composite_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}'} + + def delete_composite_entity_role( + self, app_id, version_id, c_entity_id, role_id, custom_headers=None, raw=False, **operation_config): + """Delete an entity role. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param c_entity_id: The composite entity extractor ID. + :type c_entity_id: str + :param role_id: The entity role Id. + :type role_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_composite_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'cEntityId': self._serialize.url("c_entity_id", c_entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_composite_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}'} + + def get_pattern_any_entity_role( + self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config): + """Get one entity role for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: entity ID. + :type entity_id: str + :param role_id: entity role ID. + :type role_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EntityRole or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.EntityRole or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_pattern_any_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('EntityRole', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_pattern_any_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}'} + + def update_pattern_any_entity_role( + self, app_id, version_id, entity_id, role_id, name=None, custom_headers=None, raw=False, **operation_config): + """Update an entity role for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity ID. + :type entity_id: str + :param role_id: The entity role ID. + :type role_id: str + :param name: The entity role name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + entity_role_update_object = models.EntityRoleUpdateObject(name=name) + + # Construct URL + url = self.update_pattern_any_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(entity_role_update_object, 'EntityRoleUpdateObject') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_pattern_any_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}'} + + def delete_pattern_any_entity_role( + self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config): + """Delete an entity role. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity ID. + :type entity_id: str + :param role_id: The entity role Id. + :type role_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_pattern_any_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_pattern_any_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}'} + + def get_hierarchical_entity_role( + self, app_id, version_id, h_entity_id, role_id, custom_headers=None, raw=False, **operation_config): + """Get one entity role for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param h_entity_id: The hierarchical entity extractor ID. + :type h_entity_id: str + :param role_id: entity role ID. + :type role_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EntityRole or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.EntityRole or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_hierarchical_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('EntityRole', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_hierarchical_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}'} + + def update_hierarchical_entity_role( + self, app_id, version_id, h_entity_id, role_id, name=None, custom_headers=None, raw=False, **operation_config): + """Update an entity role for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param h_entity_id: The hierarchical entity extractor ID. + :type h_entity_id: str + :param role_id: The entity role ID. + :type role_id: str + :param name: The entity role name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + entity_role_update_object = models.EntityRoleUpdateObject(name=name) + + # Construct URL + url = self.update_hierarchical_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(entity_role_update_object, 'EntityRoleUpdateObject') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_hierarchical_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}'} + + def delete_hierarchical_entity_role( + self, app_id, version_id, h_entity_id, role_id, custom_headers=None, raw=False, **operation_config): + """Delete an entity role. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param h_entity_id: The hierarchical entity extractor ID. + :type h_entity_id: str + :param role_id: The entity role Id. + :type role_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_hierarchical_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_hierarchical_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}'} + + def get_custom_entity_role( + self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config): + """Get one entity role for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: entity ID. + :type entity_id: str + :param role_id: entity role ID. + :type role_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EntityRole or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.EntityRole or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_custom_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('EntityRole', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_custom_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}'} + + def update_custom_prebuilt_entity_role( + self, app_id, version_id, entity_id, role_id, name=None, custom_headers=None, raw=False, **operation_config): + """Update an entity role for a given entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity ID. + :type entity_id: str + :param role_id: The entity role ID. + :type role_id: str + :param name: The entity role name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + entity_role_update_object = models.EntityRoleUpdateObject(name=name) + + # Construct URL + url = self.update_custom_prebuilt_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(entity_role_update_object, 'EntityRoleUpdateObject') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_custom_prebuilt_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}'} + + def delete_custom_entity_role( + self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config): + """Delete an entity role. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The entity ID. + :type entity_id: str + :param role_id: The entity role Id. + :type role_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_custom_entity_role.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str'), + 'roleId': self._serialize.url("role_id", role_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_custom_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}'} + + def get_explicit_list_item( + self, app_id, version_id, entity_id, item_id, custom_headers=None, raw=False, **operation_config): + """Get the explicit list of the pattern.any entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The Pattern.Any entity Id. + :type entity_id: str + :param item_id: The explicit list item Id. + :type item_id: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ExplicitListItem or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.ExplicitListItem + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_explicit_list_item.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str'), + 'itemId': self._serialize.url("item_id", item_id, 'long') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ExplicitListItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_explicit_list_item.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}'} + + def update_explicit_list_item( + self, app_id, version_id, entity_id, item_id, explicit_list_item=None, custom_headers=None, raw=False, **operation_config): + """Updates an explicit list item for a Pattern.Any entity. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The Pattern.Any entity extractor ID. + :type entity_id: str + :param item_id: The explicit list item ID. + :type item_id: long + :param explicit_list_item: The explicit list item. + :type explicit_list_item: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + item = models.ExplicitListItemUpdateObject(explicit_list_item=explicit_list_item) + + # Construct URL + url = self.update_explicit_list_item.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str'), + 'itemId': self._serialize.url("item_id", item_id, 'long') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(item, 'ExplicitListItemUpdateObject') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_explicit_list_item.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}'} + + def delete_explicit_list_item( + self, app_id, version_id, entity_id, item_id, custom_headers=None, raw=False, **operation_config): + """Delete the explicit list item from the Pattern.any explicit list. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param entity_id: The pattern.any entity id. + :type entity_id: str + :param item_id: The explicit list item which will be deleted. + :type item_id: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_explicit_list_item.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'entityId': self._serialize.url("entity_id", entity_id, 'str'), + 'itemId': self._serialize.url("item_id", item_id, 'long') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_explicit_list_item.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}'} diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/pattern_operations.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/pattern_operations.py new file mode 100644 index 000000000000..1f10eca9da23 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/pattern_operations.py @@ -0,0 +1,554 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class PatternOperations(object): + """PatternOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def add_pattern( + self, app_id, version_id, pattern=None, intent=None, custom_headers=None, raw=False, **operation_config): + """Adds one pattern to the specified application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param pattern: The pattern text. + :type pattern: str + :param intent: The intent's name which the pattern belongs to. + :type intent: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PatternRuleInfo or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.PatternRuleInfo + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + pattern1 = models.PatternRuleCreateObject(pattern=pattern, intent=intent) + + # Construct URL + url = self.add_pattern.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(pattern1, 'PatternRuleCreateObject') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('PatternRuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_pattern.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternrule'} + + def get_patterns( + self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config): + """Returns an application version's patterns. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param skip: The number of entries to skip. Default value is 0. + :type skip: int + :param take: The number of entries to return. Maximum page size is + 500. Default is 100. + :type take: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.PatternRuleInfo] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_patterns.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip is not None: + query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[PatternRuleInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_patterns.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternrules'} + + def update_patterns( + self, app_id, version_id, patterns, custom_headers=None, raw=False, **operation_config): + """Updates patterns. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param patterns: An array represents the patterns. + :type patterns: + list[~azure.cognitiveservices.language.luis.authoring.models.PatternRuleUpdateObject] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.PatternRuleInfo] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update_patterns.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(patterns, '[PatternRuleUpdateObject]') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[PatternRuleInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_patterns.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternrules'} + + def batch_add_patterns( + self, app_id, version_id, patterns, custom_headers=None, raw=False, **operation_config): + """Adds a batch of patterns to the specified application. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param patterns: A JSON array containing patterns. + :type patterns: + list[~azure.cognitiveservices.language.luis.authoring.models.PatternRuleCreateObject] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.PatternRuleInfo] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.batch_add_patterns.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(patterns, '[PatternRuleCreateObject]') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('[PatternRuleInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + batch_add_patterns.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternrules'} + + def delete_patterns( + self, app_id, version_id, pattern_ids, custom_headers=None, raw=False, **operation_config): + """Deletes the patterns with the specified IDs. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param pattern_ids: The patterns IDs. + :type pattern_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_patterns.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(pattern_ids, '[str]') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_patterns.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternrules'} + + def update_pattern( + self, app_id, version_id, pattern_id, pattern, custom_headers=None, raw=False, **operation_config): + """Updates a pattern. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param pattern_id: The pattern ID. + :type pattern_id: str + :param pattern: An object representing a pattern. + :type pattern: + ~azure.cognitiveservices.language.luis.authoring.models.PatternRuleUpdateObject + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PatternRuleInfo or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.PatternRuleInfo + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update_pattern.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'patternId': self._serialize.url("pattern_id", pattern_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(pattern, 'PatternRuleUpdateObject') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PatternRuleInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_pattern.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternrules/{patternId}'} + + def delete_pattern( + self, app_id, version_id, pattern_id, custom_headers=None, raw=False, **operation_config): + """Deletes the pattern with the specified ID. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param pattern_id: The pattern ID. + :type pattern_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_pattern.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'patternId': self._serialize.url("pattern_id", pattern_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_pattern.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternrules/{patternId}'} + + def get_intent_patterns( + self, app_id, version_id, intent_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config): + """Returns patterns to be retrieved for the specific intent. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param intent_id: The intent classifier ID. + :type intent_id: str + :param skip: The number of entries to skip. Default value is 0. + :type skip: int + :param take: The number of entries to return. Maximum page size is + 500. Default is 100. + :type take: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.PatternRuleInfo] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_intent_patterns.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'intentId': self._serialize.url("intent_id", intent_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip is not None: + query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[PatternRuleInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_intent_patterns.metadata = {'url': '/apps/{appId}/versions/{versionId}/intents/{intentId}/patternrules'} diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/permissions_operations.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/permissions_operations.py new file mode 100644 index 000000000000..b79917aa1207 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/permissions_operations.py @@ -0,0 +1,278 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class PermissionsOperations(object): + """PermissionsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def list( + self, app_id, custom_headers=None, raw=False, **operation_config): + """Gets the list of user emails that have permissions to access your + application. + + :param app_id: The application ID. + :type app_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: UserAccessList or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.UserAccessList + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('UserAccessList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/apps/{appId}/permissions'} + + def add( + self, app_id, email=None, custom_headers=None, raw=False, **operation_config): + """Adds a user to the allowed list of users to access this LUIS + application. Users are added using their email address. + + :param app_id: The application ID. + :type app_id: str + :param email: The email address of the user. + :type email: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + user_to_add = models.UserCollaborator(email=email) + + # Construct URL + url = self.add.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(user_to_add, 'UserCollaborator') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add.metadata = {'url': '/apps/{appId}/permissions'} + + def delete( + self, app_id, email=None, custom_headers=None, raw=False, **operation_config): + """Removes a user from the allowed list of users to access this LUIS + application. Users are removed using their email address. + + :param app_id: The application ID. + :type app_id: str + :param email: The email address of the user. + :type email: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + user_to_delete = models.UserCollaborator(email=email) + + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(user_to_delete, 'UserCollaborator') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/apps/{appId}/permissions'} + + def update( + self, app_id, emails=None, custom_headers=None, raw=False, **operation_config): + """Replaces the current users access list with the one sent in the body. + If an empty list is sent, all access to other users will be removed. + + :param app_id: The application ID. + :type app_id: str + :param emails: The email address of the users. + :type emails: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + collaborators = models.CollaboratorsArray(emails=emails) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(collaborators, 'CollaboratorsArray') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/apps/{appId}/permissions'} diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/train_operations.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/train_operations.py new file mode 100644 index 000000000000..a2b0a8046e80 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/train_operations.py @@ -0,0 +1,158 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class TrainOperations(object): + """TrainOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def train_version( + self, app_id, version_id, custom_headers=None, raw=False, **operation_config): + """Sends a training request for a version of a specified LUIS app. This + POST request initiates a request asynchronously. To determine whether + the training request is successful, submit a GET request to get + training status. Note: The application version is not fully trained + unless all the models (intents and entities) are trained successfully + or are up to date. To verify training success, get the training status + at least once after training is complete. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EnqueueTrainingResponse or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.EnqueueTrainingResponse + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.train_version.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 202: + deserialized = self._deserialize('EnqueueTrainingResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + train_version.metadata = {'url': '/apps/{appId}/versions/{versionId}/train'} + + def get_status( + self, app_id, version_id, custom_headers=None, raw=False, **operation_config): + """Gets the training status of all models (intents and entities) for the + specified LUIS app. You must call the train API to train the LUIS app + before you call this API to get training status. "appID" specifies the + LUIS app ID. "versionId" specifies the version number of the LUIS app. + For example, "0.1". + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.ModelTrainingInfo] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_status.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[ModelTrainingInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_status.metadata = {'url': '/apps/{appId}/versions/{versionId}/train'} diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/versions_operations.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/versions_operations.py new file mode 100644 index 000000000000..45142ac03856 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/versions_operations.py @@ -0,0 +1,529 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class VersionsOperations(object): + """VersionsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def clone( + self, app_id, version_id, version=None, custom_headers=None, raw=False, **operation_config): + """Creates a new version using the current snapshot of the selected + application version. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param version: The new version for the cloned model. + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + version_clone_object = None + if version is not None: + version_clone_object = models.TaskUpdateObject(version=version) + + # Construct URL + url = self.clone.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + if version_clone_object is not None: + body_content = self._serialize.body(version_clone_object, 'TaskUpdateObject') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + clone.metadata = {'url': '/apps/{appId}/versions/{versionId}/clone'} + + def list( + self, app_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config): + """Gets the application versions info. + + :param app_id: The application ID. + :type app_id: str + :param skip: The number of entries to skip. Default value is 0. + :type skip: int + :param take: The number of entries to return. Maximum page size is + 500. Default is 100. + :type take: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.language.luis.authoring.models.VersionInfo] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip is not None: + query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[VersionInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/apps/{appId}/versions'} + + def get( + self, app_id, version_id, custom_headers=None, raw=False, **operation_config): + """Gets the version info. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VersionInfo or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.VersionInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VersionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/apps/{appId}/versions/{versionId}/'} + + def update( + self, app_id, version_id, version=None, custom_headers=None, raw=False, **operation_config): + """Updates the name or description of the application version. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param version: The new version for the cloned model. + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + version_update_object = models.TaskUpdateObject(version=version) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(version_update_object, 'TaskUpdateObject') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/apps/{appId}/versions/{versionId}/'} + + def delete( + self, app_id, version_id, custom_headers=None, raw=False, **operation_config): + """Deletes an application version. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/apps/{appId}/versions/{versionId}/'} + + def export( + self, app_id, version_id, custom_headers=None, raw=False, **operation_config): + """Exports a LUIS application to JSON format. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LuisApp or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.LuisApp or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.export.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LuisApp', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + export.metadata = {'url': '/apps/{appId}/versions/{versionId}/export'} + + def import_method( + self, app_id, luis_app, version_id=None, custom_headers=None, raw=False, **operation_config): + """Imports a new version into a LUIS application. + + :param app_id: The application ID. + :type app_id: str + :param luis_app: A LUIS application structure. + :type luis_app: + ~azure.cognitiveservices.language.luis.authoring.models.LuisApp + :param version_id: The new versionId to import. If not specified, the + versionId will be read from the imported object. + :type version_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.import_method.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if version_id is not None: + query_parameters['versionId'] = self._serialize.query("version_id", version_id, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(luis_app, 'LuisApp') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + import_method.metadata = {'url': '/apps/{appId}/versions/import'} + + def delete_unlabelled_utterance( + self, app_id, version_id, utterance, custom_headers=None, raw=False, **operation_config): + """Deleted an unlabelled utterance. + + :param app_id: The application ID. + :type app_id: str + :param version_id: The version ID. + :type version_id: str + :param utterance: The utterance text to delete. + :type utterance: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_unlabelled_utterance.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(utterance, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete_unlabelled_utterance.metadata = {'url': '/apps/{appId}/versions/{versionId}/suggest'} diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/version.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/version.py new file mode 100644 index 000000000000..63f83465c874 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "2.0" + diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/__init__.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/__init__.py new file mode 100644 index 000000000000..7a3d74853c85 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .luis_runtime_client import LUISRuntimeClient +from .version import VERSION + +__all__ = ['LUISRuntimeClient'] + +__version__ = VERSION + diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/luis_runtime_client.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/luis_runtime_client.py new file mode 100644 index 000000000000..d4448bbe781b --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/luis_runtime_client.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Configuration, Serializer, Deserializer +from .version import VERSION +from .operations.prediction_operations import PredictionOperations +from . import models + + +class LUISRuntimeClientConfiguration(Configuration): + """Configuration for LUISRuntimeClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param endpoint: Supported Cognitive Services endpoints (protocol and + hostname, for example: https://westus.api.cognitive.microsoft.com). + :type endpoint: str + :param credentials: Subscription credentials which uniquely identify + client subscription. + :type credentials: None + """ + + def __init__( + self, endpoint, credentials): + + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + base_url = '{Endpoint}/luis/v2.0' + + super(LUISRuntimeClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-cognitiveservices-language-luis/{}'.format(VERSION)) + + self.endpoint = endpoint + self.credentials = credentials + + +class LUISRuntimeClient(SDKClient): + """LUISRuntimeClient + + :ivar config: Configuration for client. + :vartype config: LUISRuntimeClientConfiguration + + :ivar prediction: Prediction operations + :vartype prediction: azure.cognitiveservices.language.luis.runtime.operations.PredictionOperations + + :param endpoint: Supported Cognitive Services endpoints (protocol and + hostname, for example: https://westus.api.cognitive.microsoft.com). + :type endpoint: str + :param credentials: Subscription credentials which uniquely identify + client subscription. + :type credentials: None + """ + + def __init__( + self, endpoint, credentials): + + self.config = LUISRuntimeClientConfiguration(endpoint, credentials) + super(LUISRuntimeClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2.0' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.prediction = PredictionOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/__init__.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/__init__.py new file mode 100644 index 000000000000..a17c1378159c --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/__init__.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +try: + from .intent_model_py3 import IntentModel + from .entity_model_py3 import EntityModel + from .composite_child_model_py3 import CompositeChildModel + from .composite_entity_model_py3 import CompositeEntityModel + from .sentiment_py3 import Sentiment + from .luis_result_py3 import LuisResult + from .entity_with_score_py3 import EntityWithScore + from .entity_with_resolution_py3 import EntityWithResolution + from .api_error_py3 import APIError, APIErrorException +except (SyntaxError, ImportError): + from .intent_model import IntentModel + from .entity_model import EntityModel + from .composite_child_model import CompositeChildModel + from .composite_entity_model import CompositeEntityModel + from .sentiment import Sentiment + from .luis_result import LuisResult + from .entity_with_score import EntityWithScore + from .entity_with_resolution import EntityWithResolution + from .api_error import APIError, APIErrorException + +__all__ = [ + 'IntentModel', + 'EntityModel', + 'CompositeChildModel', + 'CompositeEntityModel', + 'Sentiment', + 'LuisResult', + 'EntityWithScore', + 'EntityWithResolution', + 'APIError', 'APIErrorException', +] diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/api_error.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/api_error.py new file mode 100644 index 000000000000..13f85dd56829 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/api_error.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class APIError(Model): + """Error information returned by the API. + + :param status_code: HTTP Status code + :type status_code: str + :param message: Cause of the error. + :type message: str + """ + + _attribute_map = { + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(APIError, self).__init__(**kwargs) + self.status_code = kwargs.get('status_code', None) + self.message = kwargs.get('message', None) + + +class APIErrorException(HttpOperationError): + """Server responsed with exception of type: 'APIError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(APIErrorException, self).__init__(deserialize, response, 'APIError', *args) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/api_error_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/api_error_py3.py new file mode 100644 index 000000000000..cfde35f5288f --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/api_error_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class APIError(Model): + """Error information returned by the API. + + :param status_code: HTTP Status code + :type status_code: str + :param message: Cause of the error. + :type message: str + """ + + _attribute_map = { + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, status_code: str=None, message: str=None, **kwargs) -> None: + super(APIError, self).__init__(**kwargs) + self.status_code = status_code + self.message = message + + +class APIErrorException(HttpOperationError): + """Server responsed with exception of type: 'APIError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(APIErrorException, self).__init__(deserialize, response, 'APIError', *args) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/composite_child_model.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/composite_child_model.py new file mode 100644 index 000000000000..5ebd233ebcfd --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/composite_child_model.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CompositeChildModel(Model): + """Child entity in a LUIS Composite Entity. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of child entity. + :type type: str + :param value: Required. Value extracted by LUIS. + :type value: str + """ + + _validation = { + 'type': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CompositeChildModel, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.value = kwargs.get('value', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/composite_child_model_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/composite_child_model_py3.py new file mode 100644 index 000000000000..e02d60121c03 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/composite_child_model_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CompositeChildModel(Model): + """Child entity in a LUIS Composite Entity. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of child entity. + :type type: str + :param value: Required. Value extracted by LUIS. + :type value: str + """ + + _validation = { + 'type': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, type: str, value: str, **kwargs) -> None: + super(CompositeChildModel, self).__init__(**kwargs) + self.type = type + self.value = value diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/composite_entity_model.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/composite_entity_model.py new file mode 100644 index 000000000000..a41140ae6d3d --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/composite_entity_model.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CompositeEntityModel(Model): + """LUIS Composite Entity. + + All required parameters must be populated in order to send to Azure. + + :param parent_type: Required. Type/name of parent entity. + :type parent_type: str + :param value: Required. Value for composite entity extracted by LUIS. + :type value: str + :param children: Required. Child entities. + :type children: + list[~azure.cognitiveservices.language.luis.runtime.models.CompositeChildModel] + """ + + _validation = { + 'parent_type': {'required': True}, + 'value': {'required': True}, + 'children': {'required': True}, + } + + _attribute_map = { + 'parent_type': {'key': 'parentType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'children': {'key': 'children', 'type': '[CompositeChildModel]'}, + } + + def __init__(self, **kwargs): + super(CompositeEntityModel, self).__init__(**kwargs) + self.parent_type = kwargs.get('parent_type', None) + self.value = kwargs.get('value', None) + self.children = kwargs.get('children', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/composite_entity_model_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/composite_entity_model_py3.py new file mode 100644 index 000000000000..45ac985fffc4 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/composite_entity_model_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CompositeEntityModel(Model): + """LUIS Composite Entity. + + All required parameters must be populated in order to send to Azure. + + :param parent_type: Required. Type/name of parent entity. + :type parent_type: str + :param value: Required. Value for composite entity extracted by LUIS. + :type value: str + :param children: Required. Child entities. + :type children: + list[~azure.cognitiveservices.language.luis.runtime.models.CompositeChildModel] + """ + + _validation = { + 'parent_type': {'required': True}, + 'value': {'required': True}, + 'children': {'required': True}, + } + + _attribute_map = { + 'parent_type': {'key': 'parentType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'children': {'key': 'children', 'type': '[CompositeChildModel]'}, + } + + def __init__(self, *, parent_type: str, value: str, children, **kwargs) -> None: + super(CompositeEntityModel, self).__init__(**kwargs) + self.parent_type = parent_type + self.value = value + self.children = children diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_model.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_model.py new file mode 100644 index 000000000000..1fb54a94ab1e --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_model.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityModel(Model): + """An entity extracted from the utterance. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param entity: Required. Name of the entity, as defined in LUIS. + :type entity: str + :param type: Required. Type of the entity, as defined in LUIS. + :type type: str + :param start_index: Required. The position of the first character of the + matched entity within the utterance. + :type start_index: float + :param end_index: Required. The position of the last character of the + matched entity within the utterance. + :type end_index: float + """ + + _validation = { + 'entity': {'required': True}, + 'type': {'required': True}, + 'start_index': {'required': True}, + 'end_index': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'entity': {'key': 'entity', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_index': {'key': 'startIndex', 'type': 'float'}, + 'end_index': {'key': 'endIndex', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(EntityModel, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.entity = kwargs.get('entity', None) + self.type = kwargs.get('type', None) + self.start_index = kwargs.get('start_index', None) + self.end_index = kwargs.get('end_index', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_model_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_model_py3.py new file mode 100644 index 000000000000..f4fc575a3eca --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_model_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityModel(Model): + """An entity extracted from the utterance. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param entity: Required. Name of the entity, as defined in LUIS. + :type entity: str + :param type: Required. Type of the entity, as defined in LUIS. + :type type: str + :param start_index: Required. The position of the first character of the + matched entity within the utterance. + :type start_index: float + :param end_index: Required. The position of the last character of the + matched entity within the utterance. + :type end_index: float + """ + + _validation = { + 'entity': {'required': True}, + 'type': {'required': True}, + 'start_index': {'required': True}, + 'end_index': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'entity': {'key': 'entity', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_index': {'key': 'startIndex', 'type': 'float'}, + 'end_index': {'key': 'endIndex', 'type': 'float'}, + } + + def __init__(self, *, entity: str, type: str, start_index: float, end_index: float, additional_properties=None, **kwargs) -> None: + super(EntityModel, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.entity = entity + self.type = type + self.start_index = start_index + self.end_index = end_index diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_resolution.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_resolution.py new file mode 100644 index 000000000000..978a250f8a5e --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_resolution.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_model import EntityModel + + +class EntityWithResolution(EntityModel): + """EntityWithResolution. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param entity: Required. Name of the entity, as defined in LUIS. + :type entity: str + :param type: Required. Type of the entity, as defined in LUIS. + :type type: str + :param start_index: Required. The position of the first character of the + matched entity within the utterance. + :type start_index: float + :param end_index: Required. The position of the last character of the + matched entity within the utterance. + :type end_index: float + :param resolution: Required. Resolution values for pre-built LUIS + entities. + :type resolution: object + """ + + _validation = { + 'entity': {'required': True}, + 'type': {'required': True}, + 'start_index': {'required': True}, + 'end_index': {'required': True}, + 'resolution': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'entity': {'key': 'entity', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_index': {'key': 'startIndex', 'type': 'float'}, + 'end_index': {'key': 'endIndex', 'type': 'float'}, + 'resolution': {'key': 'resolution', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(EntityWithResolution, self).__init__(**kwargs) + self.resolution = kwargs.get('resolution', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_resolution_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_resolution_py3.py new file mode 100644 index 000000000000..635efbfa098c --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_resolution_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_model_py3 import EntityModel + + +class EntityWithResolution(EntityModel): + """EntityWithResolution. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param entity: Required. Name of the entity, as defined in LUIS. + :type entity: str + :param type: Required. Type of the entity, as defined in LUIS. + :type type: str + :param start_index: Required. The position of the first character of the + matched entity within the utterance. + :type start_index: float + :param end_index: Required. The position of the last character of the + matched entity within the utterance. + :type end_index: float + :param resolution: Required. Resolution values for pre-built LUIS + entities. + :type resolution: object + """ + + _validation = { + 'entity': {'required': True}, + 'type': {'required': True}, + 'start_index': {'required': True}, + 'end_index': {'required': True}, + 'resolution': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'entity': {'key': 'entity', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_index': {'key': 'startIndex', 'type': 'float'}, + 'end_index': {'key': 'endIndex', 'type': 'float'}, + 'resolution': {'key': 'resolution', 'type': 'object'}, + } + + def __init__(self, *, entity: str, type: str, start_index: float, end_index: float, resolution, additional_properties=None, **kwargs) -> None: + super(EntityWithResolution, self).__init__(additional_properties=additional_properties, entity=entity, type=type, start_index=start_index, end_index=end_index, **kwargs) + self.resolution = resolution diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_score.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_score.py new file mode 100644 index 000000000000..dc8943c3d0b9 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_score.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_model import EntityModel + + +class EntityWithScore(EntityModel): + """EntityWithScore. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param entity: Required. Name of the entity, as defined in LUIS. + :type entity: str + :param type: Required. Type of the entity, as defined in LUIS. + :type type: str + :param start_index: Required. The position of the first character of the + matched entity within the utterance. + :type start_index: float + :param end_index: Required. The position of the last character of the + matched entity within the utterance. + :type end_index: float + :param score: Required. Associated prediction score for the intent + (float). + :type score: float + """ + + _validation = { + 'entity': {'required': True}, + 'type': {'required': True}, + 'start_index': {'required': True}, + 'end_index': {'required': True}, + 'score': {'required': True, 'maximum': 1, 'minimum': 0}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'entity': {'key': 'entity', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_index': {'key': 'startIndex', 'type': 'float'}, + 'end_index': {'key': 'endIndex', 'type': 'float'}, + 'score': {'key': 'score', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(EntityWithScore, self).__init__(**kwargs) + self.score = kwargs.get('score', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_score_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_score_py3.py new file mode 100644 index 000000000000..676e4cd92d04 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_score_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_model_py3 import EntityModel + + +class EntityWithScore(EntityModel): + """EntityWithScore. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param entity: Required. Name of the entity, as defined in LUIS. + :type entity: str + :param type: Required. Type of the entity, as defined in LUIS. + :type type: str + :param start_index: Required. The position of the first character of the + matched entity within the utterance. + :type start_index: float + :param end_index: Required. The position of the last character of the + matched entity within the utterance. + :type end_index: float + :param score: Required. Associated prediction score for the intent + (float). + :type score: float + """ + + _validation = { + 'entity': {'required': True}, + 'type': {'required': True}, + 'start_index': {'required': True}, + 'end_index': {'required': True}, + 'score': {'required': True, 'maximum': 1, 'minimum': 0}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'entity': {'key': 'entity', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_index': {'key': 'startIndex', 'type': 'float'}, + 'end_index': {'key': 'endIndex', 'type': 'float'}, + 'score': {'key': 'score', 'type': 'float'}, + } + + def __init__(self, *, entity: str, type: str, start_index: float, end_index: float, score: float, additional_properties=None, **kwargs) -> None: + super(EntityWithScore, self).__init__(additional_properties=additional_properties, entity=entity, type=type, start_index=start_index, end_index=end_index, **kwargs) + self.score = score diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/intent_model.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/intent_model.py new file mode 100644 index 000000000000..dc2dc7e526b7 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/intent_model.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IntentModel(Model): + """An intent detected from the utterance. + + :param intent: Name of the intent, as defined in LUIS. + :type intent: str + :param score: Associated prediction score for the intent (float). + :type score: float + """ + + _validation = { + 'score': {'maximum': 1, 'minimum': 0}, + } + + _attribute_map = { + 'intent': {'key': 'intent', 'type': 'str'}, + 'score': {'key': 'score', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(IntentModel, self).__init__(**kwargs) + self.intent = kwargs.get('intent', None) + self.score = kwargs.get('score', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/intent_model_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/intent_model_py3.py new file mode 100644 index 000000000000..48e48ec42a0e --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/intent_model_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IntentModel(Model): + """An intent detected from the utterance. + + :param intent: Name of the intent, as defined in LUIS. + :type intent: str + :param score: Associated prediction score for the intent (float). + :type score: float + """ + + _validation = { + 'score': {'maximum': 1, 'minimum': 0}, + } + + _attribute_map = { + 'intent': {'key': 'intent', 'type': 'str'}, + 'score': {'key': 'score', 'type': 'float'}, + } + + def __init__(self, *, intent: str=None, score: float=None, **kwargs) -> None: + super(IntentModel, self).__init__(**kwargs) + self.intent = intent + self.score = score diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/luis_result.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/luis_result.py new file mode 100644 index 000000000000..15b9ac3de342 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/luis_result.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LuisResult(Model): + """Prediction, based on the input query, containing intent(s) and entities. + + :param query: The input utterance that was analized. + :type query: str + :param altered_query: The corrected utterance (when spell checking was + enabled). + :type altered_query: str + :param top_scoring_intent: + :type top_scoring_intent: + ~azure.cognitiveservices.language.luis.runtime.models.IntentModel + :param intents: All the intents (and their score) that were detected from + utterance. + :type intents: + list[~azure.cognitiveservices.language.luis.runtime.models.IntentModel] + :param entities: The entities extracted from the utterance. + :type entities: + list[~azure.cognitiveservices.language.luis.runtime.models.EntityModel] + :param composite_entities: The composite entities extracted from the + utterance. + :type composite_entities: + list[~azure.cognitiveservices.language.luis.runtime.models.CompositeEntityModel] + :param sentiment_analysis: + :type sentiment_analysis: + ~azure.cognitiveservices.language.luis.runtime.models.Sentiment + """ + + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'}, + 'altered_query': {'key': 'alteredQuery', 'type': 'str'}, + 'top_scoring_intent': {'key': 'topScoringIntent', 'type': 'IntentModel'}, + 'intents': {'key': 'intents', 'type': '[IntentModel]'}, + 'entities': {'key': 'entities', 'type': '[EntityModel]'}, + 'composite_entities': {'key': 'compositeEntities', 'type': '[CompositeEntityModel]'}, + 'sentiment_analysis': {'key': 'sentimentAnalysis', 'type': 'Sentiment'}, + } + + def __init__(self, **kwargs): + super(LuisResult, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.altered_query = kwargs.get('altered_query', None) + self.top_scoring_intent = kwargs.get('top_scoring_intent', None) + self.intents = kwargs.get('intents', None) + self.entities = kwargs.get('entities', None) + self.composite_entities = kwargs.get('composite_entities', None) + self.sentiment_analysis = kwargs.get('sentiment_analysis', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/luis_result_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/luis_result_py3.py new file mode 100644 index 000000000000..180a2aaf6114 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/luis_result_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LuisResult(Model): + """Prediction, based on the input query, containing intent(s) and entities. + + :param query: The input utterance that was analized. + :type query: str + :param altered_query: The corrected utterance (when spell checking was + enabled). + :type altered_query: str + :param top_scoring_intent: + :type top_scoring_intent: + ~azure.cognitiveservices.language.luis.runtime.models.IntentModel + :param intents: All the intents (and their score) that were detected from + utterance. + :type intents: + list[~azure.cognitiveservices.language.luis.runtime.models.IntentModel] + :param entities: The entities extracted from the utterance. + :type entities: + list[~azure.cognitiveservices.language.luis.runtime.models.EntityModel] + :param composite_entities: The composite entities extracted from the + utterance. + :type composite_entities: + list[~azure.cognitiveservices.language.luis.runtime.models.CompositeEntityModel] + :param sentiment_analysis: + :type sentiment_analysis: + ~azure.cognitiveservices.language.luis.runtime.models.Sentiment + """ + + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'}, + 'altered_query': {'key': 'alteredQuery', 'type': 'str'}, + 'top_scoring_intent': {'key': 'topScoringIntent', 'type': 'IntentModel'}, + 'intents': {'key': 'intents', 'type': '[IntentModel]'}, + 'entities': {'key': 'entities', 'type': '[EntityModel]'}, + 'composite_entities': {'key': 'compositeEntities', 'type': '[CompositeEntityModel]'}, + 'sentiment_analysis': {'key': 'sentimentAnalysis', 'type': 'Sentiment'}, + } + + def __init__(self, *, query: str=None, altered_query: str=None, top_scoring_intent=None, intents=None, entities=None, composite_entities=None, sentiment_analysis=None, **kwargs) -> None: + super(LuisResult, self).__init__(**kwargs) + self.query = query + self.altered_query = altered_query + self.top_scoring_intent = top_scoring_intent + self.intents = intents + self.entities = entities + self.composite_entities = composite_entities + self.sentiment_analysis = sentiment_analysis diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/sentiment.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/sentiment.py new file mode 100644 index 000000000000..55c1442e35fa --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/sentiment.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sentiment(Model): + """Sentiment of the input utterance. + + :param label: The polarity of the sentiment, can be positive, neutral or + negative. + :type label: str + :param score: Score of the sentiment, ranges from 0 (most negative) to 1 + (most positive). + :type score: float + """ + + _attribute_map = { + 'label': {'key': 'label', 'type': 'str'}, + 'score': {'key': 'score', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(Sentiment, self).__init__(**kwargs) + self.label = kwargs.get('label', None) + self.score = kwargs.get('score', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/sentiment_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/sentiment_py3.py new file mode 100644 index 000000000000..fd92f4706e71 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/sentiment_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sentiment(Model): + """Sentiment of the input utterance. + + :param label: The polarity of the sentiment, can be positive, neutral or + negative. + :type label: str + :param score: Score of the sentiment, ranges from 0 (most negative) to 1 + (most positive). + :type score: float + """ + + _attribute_map = { + 'label': {'key': 'label', 'type': 'str'}, + 'score': {'key': 'score', 'type': 'float'}, + } + + def __init__(self, *, label: str=None, score: float=None, **kwargs) -> None: + super(Sentiment, self).__init__(**kwargs) + self.label = label + self.score = score diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/operations/__init__.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/operations/__init__.py new file mode 100644 index 000000000000..5d73b7e5f993 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/operations/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .prediction_operations import PredictionOperations + +__all__ = [ + 'PredictionOperations', +] diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/operations/prediction_operations.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/operations/prediction_operations.py new file mode 100644 index 000000000000..295ea6133f3d --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/operations/prediction_operations.py @@ -0,0 +1,122 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class PredictionOperations(object): + """PredictionOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def resolve( + self, app_id, query, timezone_offset=None, verbose=None, staging=None, spell_check=None, bing_spell_check_subscription_key=None, log=None, custom_headers=None, raw=False, **operation_config): + """Gets predictions for a given utterance, in the form of intents and + entities. The current maximum query size is 500 characters. + + :param app_id: The LUIS application ID (Guid). + :type app_id: str + :param query: The utterance to predict. + :type query: str + :param timezone_offset: The timezone offset for the location of the + request. + :type timezone_offset: float + :param verbose: If true, return all intents instead of just the top + scoring intent. + :type verbose: bool + :param staging: Use the staging endpoint slot. + :type staging: bool + :param spell_check: Enable spell checking. + :type spell_check: bool + :param bing_spell_check_subscription_key: The subscription key to use + when enabling bing spell check + :type bing_spell_check_subscription_key: str + :param log: Log query (default is true) + :type log: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LuisResult or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.language.luis.runtime.models.LuisResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`APIErrorException` + """ + # Construct URL + url = self.resolve.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'appId': self._serialize.url("app_id", app_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if timezone_offset is not None: + query_parameters['timezoneOffset'] = self._serialize.query("timezone_offset", timezone_offset, 'float') + if verbose is not None: + query_parameters['verbose'] = self._serialize.query("verbose", verbose, 'bool') + if staging is not None: + query_parameters['staging'] = self._serialize.query("staging", staging, 'bool') + if spell_check is not None: + query_parameters['spellCheck'] = self._serialize.query("spell_check", spell_check, 'bool') + if bing_spell_check_subscription_key is not None: + query_parameters['bing-spell-check-subscription-key'] = self._serialize.query("bing_spell_check_subscription_key", bing_spell_check_subscription_key, 'str') + if log is not None: + query_parameters['log'] = self._serialize.query("log", log, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(query, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.APIErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LuisResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + resolve.metadata = {'url': '/apps/{appId}'} diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/version.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/version.py new file mode 100644 index 000000000000..63f83465c874 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "2.0" + From b56d59483f7ea7be230c7e77d4d39e6e87c2fc00 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 7 Aug 2018 18:01:50 +0000 Subject: [PATCH 2/6] Generated from 8dfedc91e10fb96edb9aff8158500e9d369ab36a [Cognitive Services] Update endpoint URL template for LUIS. --- .../language/luis/runtime/models/entity_model.py | 8 ++++---- .../language/luis/runtime/models/entity_model_py3.py | 10 +++++----- .../luis/runtime/models/entity_with_resolution.py | 8 ++++---- .../luis/runtime/models/entity_with_resolution_py3.py | 10 +++++----- .../language/luis/runtime/models/entity_with_score.py | 8 ++++---- .../luis/runtime/models/entity_with_score_py3.py | 10 +++++----- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_model.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_model.py index 1fb54a94ab1e..3c9ab0bea6bc 100644 --- a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_model.py +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_model.py @@ -26,10 +26,10 @@ class EntityModel(Model): :type type: str :param start_index: Required. The position of the first character of the matched entity within the utterance. - :type start_index: float + :type start_index: int :param end_index: Required. The position of the last character of the matched entity within the utterance. - :type end_index: float + :type end_index: int """ _validation = { @@ -43,8 +43,8 @@ class EntityModel(Model): 'additional_properties': {'key': '', 'type': '{object}'}, 'entity': {'key': 'entity', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'start_index': {'key': 'startIndex', 'type': 'float'}, - 'end_index': {'key': 'endIndex', 'type': 'float'}, + 'start_index': {'key': 'startIndex', 'type': 'int'}, + 'end_index': {'key': 'endIndex', 'type': 'int'}, } def __init__(self, **kwargs): diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_model_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_model_py3.py index f4fc575a3eca..d66eda908ac1 100644 --- a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_model_py3.py +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_model_py3.py @@ -26,10 +26,10 @@ class EntityModel(Model): :type type: str :param start_index: Required. The position of the first character of the matched entity within the utterance. - :type start_index: float + :type start_index: int :param end_index: Required. The position of the last character of the matched entity within the utterance. - :type end_index: float + :type end_index: int """ _validation = { @@ -43,11 +43,11 @@ class EntityModel(Model): 'additional_properties': {'key': '', 'type': '{object}'}, 'entity': {'key': 'entity', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'start_index': {'key': 'startIndex', 'type': 'float'}, - 'end_index': {'key': 'endIndex', 'type': 'float'}, + 'start_index': {'key': 'startIndex', 'type': 'int'}, + 'end_index': {'key': 'endIndex', 'type': 'int'}, } - def __init__(self, *, entity: str, type: str, start_index: float, end_index: float, additional_properties=None, **kwargs) -> None: + def __init__(self, *, entity: str, type: str, start_index: int, end_index: int, additional_properties=None, **kwargs) -> None: super(EntityModel, self).__init__(**kwargs) self.additional_properties = additional_properties self.entity = entity diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_resolution.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_resolution.py index 978a250f8a5e..6218f437891d 100644 --- a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_resolution.py +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_resolution.py @@ -26,10 +26,10 @@ class EntityWithResolution(EntityModel): :type type: str :param start_index: Required. The position of the first character of the matched entity within the utterance. - :type start_index: float + :type start_index: int :param end_index: Required. The position of the last character of the matched entity within the utterance. - :type end_index: float + :type end_index: int :param resolution: Required. Resolution values for pre-built LUIS entities. :type resolution: object @@ -47,8 +47,8 @@ class EntityWithResolution(EntityModel): 'additional_properties': {'key': '', 'type': '{object}'}, 'entity': {'key': 'entity', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'start_index': {'key': 'startIndex', 'type': 'float'}, - 'end_index': {'key': 'endIndex', 'type': 'float'}, + 'start_index': {'key': 'startIndex', 'type': 'int'}, + 'end_index': {'key': 'endIndex', 'type': 'int'}, 'resolution': {'key': 'resolution', 'type': 'object'}, } diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_resolution_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_resolution_py3.py index 635efbfa098c..a78adecd6d35 100644 --- a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_resolution_py3.py +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_resolution_py3.py @@ -26,10 +26,10 @@ class EntityWithResolution(EntityModel): :type type: str :param start_index: Required. The position of the first character of the matched entity within the utterance. - :type start_index: float + :type start_index: int :param end_index: Required. The position of the last character of the matched entity within the utterance. - :type end_index: float + :type end_index: int :param resolution: Required. Resolution values for pre-built LUIS entities. :type resolution: object @@ -47,11 +47,11 @@ class EntityWithResolution(EntityModel): 'additional_properties': {'key': '', 'type': '{object}'}, 'entity': {'key': 'entity', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'start_index': {'key': 'startIndex', 'type': 'float'}, - 'end_index': {'key': 'endIndex', 'type': 'float'}, + 'start_index': {'key': 'startIndex', 'type': 'int'}, + 'end_index': {'key': 'endIndex', 'type': 'int'}, 'resolution': {'key': 'resolution', 'type': 'object'}, } - def __init__(self, *, entity: str, type: str, start_index: float, end_index: float, resolution, additional_properties=None, **kwargs) -> None: + def __init__(self, *, entity: str, type: str, start_index: int, end_index: int, resolution, additional_properties=None, **kwargs) -> None: super(EntityWithResolution, self).__init__(additional_properties=additional_properties, entity=entity, type=type, start_index=start_index, end_index=end_index, **kwargs) self.resolution = resolution diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_score.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_score.py index dc8943c3d0b9..a31e75109740 100644 --- a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_score.py +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_score.py @@ -26,10 +26,10 @@ class EntityWithScore(EntityModel): :type type: str :param start_index: Required. The position of the first character of the matched entity within the utterance. - :type start_index: float + :type start_index: int :param end_index: Required. The position of the last character of the matched entity within the utterance. - :type end_index: float + :type end_index: int :param score: Required. Associated prediction score for the intent (float). :type score: float @@ -47,8 +47,8 @@ class EntityWithScore(EntityModel): 'additional_properties': {'key': '', 'type': '{object}'}, 'entity': {'key': 'entity', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'start_index': {'key': 'startIndex', 'type': 'float'}, - 'end_index': {'key': 'endIndex', 'type': 'float'}, + 'start_index': {'key': 'startIndex', 'type': 'int'}, + 'end_index': {'key': 'endIndex', 'type': 'int'}, 'score': {'key': 'score', 'type': 'float'}, } diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_score_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_score_py3.py index 676e4cd92d04..5193300a0938 100644 --- a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_score_py3.py +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/entity_with_score_py3.py @@ -26,10 +26,10 @@ class EntityWithScore(EntityModel): :type type: str :param start_index: Required. The position of the first character of the matched entity within the utterance. - :type start_index: float + :type start_index: int :param end_index: Required. The position of the last character of the matched entity within the utterance. - :type end_index: float + :type end_index: int :param score: Required. Associated prediction score for the intent (float). :type score: float @@ -47,11 +47,11 @@ class EntityWithScore(EntityModel): 'additional_properties': {'key': '', 'type': '{object}'}, 'entity': {'key': 'entity', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'start_index': {'key': 'startIndex', 'type': 'float'}, - 'end_index': {'key': 'endIndex', 'type': 'float'}, + 'start_index': {'key': 'startIndex', 'type': 'int'}, + 'end_index': {'key': 'endIndex', 'type': 'int'}, 'score': {'key': 'score', 'type': 'float'}, } - def __init__(self, *, entity: str, type: str, start_index: float, end_index: float, score: float, additional_properties=None, **kwargs) -> None: + def __init__(self, *, entity: str, type: str, start_index: int, end_index: int, score: float, additional_properties=None, **kwargs) -> None: super(EntityWithScore, self).__init__(additional_properties=additional_properties, entity=entity, type=type, start_index=start_index, end_index=end_index, **kwargs) self.score = score From a69ff05d392e7502c2822a066c2342e33727a67c Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Fri, 20 Jul 2018 16:16:04 -0700 Subject: [PATCH 3/6] Manual fix of LUIS enum --- .../luis/authoring/models/luis_authoring_client_enums.py | 1 - 1 file changed, 1 deletion(-) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/luis_authoring_client_enums.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/luis_authoring_client_enums.py index 3bfeb07e7bff..f85ad6da8c8e 100644 --- a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/luis_authoring_client_enums.py +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/luis_authoring_client_enums.py @@ -22,5 +22,4 @@ class TrainingStatus(str, Enum): class OperationStatusType(str, Enum): failed = "Failed" - failed = "FAILED" success = "Success" From eeee70021677fb3ea91890abd542dd85d78314b1 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 7 Aug 2018 11:26:23 -0700 Subject: [PATCH 4/6] LUIS packaging --- .../HISTORY.rst | 9 ++ .../MANIFEST.in | 2 + .../README.rst | 43 ++++++++++ .../azure/__init__.py | 1 + .../azure/cognitiveservices/__init__.py | 1 + .../cognitiveservices/language/__init__.py | 1 + .../language/luis/__init__.py | 1 + .../language/luis/version.py | 12 +++ .../azure_bdist_wheel.py | 54 ++++++++++++ .../sdk_packaging.toml | 6 ++ .../setup.cfg | 3 + .../setup.py | 86 +++++++++++++++++++ 12 files changed, 219 insertions(+) create mode 100644 azure-cognitiveservices-language-luis/HISTORY.rst create mode 100644 azure-cognitiveservices-language-luis/MANIFEST.in create mode 100644 azure-cognitiveservices-language-luis/README.rst create mode 100644 azure-cognitiveservices-language-luis/azure/__init__.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/__init__.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/__init__.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/__init__.py create mode 100644 azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/version.py create mode 100644 azure-cognitiveservices-language-luis/azure_bdist_wheel.py create mode 100644 azure-cognitiveservices-language-luis/sdk_packaging.toml create mode 100644 azure-cognitiveservices-language-luis/setup.cfg create mode 100644 azure-cognitiveservices-language-luis/setup.py diff --git a/azure-cognitiveservices-language-luis/HISTORY.rst b/azure-cognitiveservices-language-luis/HISTORY.rst new file mode 100644 index 000000000000..8924d5d6c445 --- /dev/null +++ b/azure-cognitiveservices-language-luis/HISTORY.rst @@ -0,0 +1,9 @@ +.. :changelog: + +Release History +=============== + +0.1.0 (1970-01-01) +++++++++++++++++++ + +* Initial Release diff --git a/azure-cognitiveservices-language-luis/MANIFEST.in b/azure-cognitiveservices-language-luis/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/azure-cognitiveservices-language-luis/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-cognitiveservices-language-luis/README.rst b/azure-cognitiveservices-language-luis/README.rst new file mode 100644 index 000000000000..837869e535e6 --- /dev/null +++ b/azure-cognitiveservices-language-luis/README.rst @@ -0,0 +1,43 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure Cognitive Services LUIS Client Library. + +This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `Cognitive Services LUIS +`__ +on docs.microsoft.com. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. diff --git a/azure-cognitiveservices-language-luis/azure/__init__.py b/azure-cognitiveservices-language-luis/azure/__init__.py new file mode 100644 index 000000000000..de40ea7ca058 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/__init__.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/__init__.py new file mode 100644 index 000000000000..de40ea7ca058 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/__init__.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/__init__.py new file mode 100644 index 000000000000..de40ea7ca058 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/__init__.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/__init__.py new file mode 100644 index 000000000000..de40ea7ca058 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/version.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/version.py new file mode 100644 index 000000000000..fb0159ed93d7 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/version.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/azure-cognitiveservices-language-luis/azure_bdist_wheel.py b/azure-cognitiveservices-language-luis/azure_bdist_wheel.py new file mode 100644 index 000000000000..8a81d1b61775 --- /dev/null +++ b/azure-cognitiveservices-language-luis/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/azure-cognitiveservices-language-luis/sdk_packaging.toml b/azure-cognitiveservices-language-luis/sdk_packaging.toml new file mode 100644 index 000000000000..ffd80048fed4 --- /dev/null +++ b/azure-cognitiveservices-language-luis/sdk_packaging.toml @@ -0,0 +1,6 @@ +[packaging] +package_name = "azure-cognitiveservices-language-luis" +package_pprint_name = "Cognitive Services LUIS" +package_doc_id = "cognitive-services" +is_stable = false +is_arm = false diff --git a/azure-cognitiveservices-language-luis/setup.cfg b/azure-cognitiveservices-language-luis/setup.cfg new file mode 100644 index 000000000000..2d986195ea2f --- /dev/null +++ b/azure-cognitiveservices-language-luis/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package=azure-cognitiveservices-language-nspkg \ No newline at end of file diff --git a/azure-cognitiveservices-language-luis/setup.py b/azure-cognitiveservices-language-luis/setup.py new file mode 100644 index 000000000000..cf9f2f5a5b34 --- /dev/null +++ b/azure-cognitiveservices-language-luis/setup.py @@ -0,0 +1,86 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-cognitiveservices-language-luis" +PACKAGE_PPRINT_NAME = "Cognitive Services LUIS" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='azpysdkhelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(exclude=["tests"]), + install_requires=[ + 'msrest>=0.5.0', + 'msrestazure>=0.4.32,<2.0.0', + 'azure-common~=1.1', + ], + cmdclass=cmdclass +) From c92883b8aca567a3f332304d053e012cd7734ca1 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 15 Aug 2018 13:52:36 -0700 Subject: [PATCH 5/6] Release date --- azure-cognitiveservices-language-luis/HISTORY.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-cognitiveservices-language-luis/HISTORY.rst b/azure-cognitiveservices-language-luis/HISTORY.rst index 8924d5d6c445..920ba5516a76 100644 --- a/azure-cognitiveservices-language-luis/HISTORY.rst +++ b/azure-cognitiveservices-language-luis/HISTORY.rst @@ -3,7 +3,7 @@ Release History =============== -0.1.0 (1970-01-01) +0.1.0 (2018-08-15) ++++++++++++++++++ * Initial Release From 7068dd6c6fddff7ff1eb946b42e7df1494509753 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 15 Aug 2018 14:09:25 -0700 Subject: [PATCH 6/6] LUIS doesn't need msrestazure --- azure-cognitiveservices-language-luis/setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/azure-cognitiveservices-language-luis/setup.py b/azure-cognitiveservices-language-luis/setup.py index cf9f2f5a5b34..6b7cacb95092 100644 --- a/azure-cognitiveservices-language-luis/setup.py +++ b/azure-cognitiveservices-language-luis/setup.py @@ -79,7 +79,6 @@ packages=find_packages(exclude=["tests"]), install_requires=[ 'msrest>=0.5.0', - 'msrestazure>=0.4.32,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass