From dd3bd4f52050434fdf83bd1210ade7acbac6de67 Mon Sep 17 00:00:00 2001 From: Jeff Fisher Date: Wed, 28 Jun 2023 11:02:02 -0500 Subject: [PATCH] Remove track1 packages for services that are being spun down (#26343) ### Packages impacted by this PR `@azure/cognitiveservices-luis-authoring` `@azure/cognitiveservices-luis-runtime` `@azure/cognitiveservices-qnamaker` `@azure/cognitiveservices-qnamaker-runtime` ### Issues associated with this PR https://github.com/Azure/azure-sdk-for-js/issues/25726 ### Describe the problem that is addressed by this PR Removing deprecated packages for services that are in the process of being decommissioned and their workloads migrated to other services. --- .../LICENSE.txt | 21 - .../README.md | 112 - .../package.json | 65 - .../rollup.config.js | 38 - .../src/lUISAuthoringClient.ts | 58 - .../src/lUISAuthoringClientContext.ts | 51 - .../src/models/appsMappers.ts | 46 - .../src/models/azureAccountsMappers.ts | 14 - .../src/models/examplesMappers.ts | 21 - .../src/models/featuresMappers.ts | 20 - .../src/models/index.ts | 6258 -------------- .../src/models/mappers.ts | 3926 --------- .../src/models/modelMappers.ts | 62 - .../src/models/parameters.ts | 354 - .../src/models/patternMappers.ts | 16 - .../src/models/permissionsMappers.ts | 16 - .../src/models/settingsMappers.ts | 14 - .../src/models/trainMappers.ts | 15 - .../src/models/versionsMappers.ts | 33 - .../src/operations/apps.ts | 1341 --- .../src/operations/azureAccounts.ts | 261 - .../src/operations/examples.ts | 317 - .../src/operations/features.ts | 531 -- .../src/operations/index.ts | 19 - .../src/operations/model.ts | 7282 ----------------- .../src/operations/pattern.ts | 586 -- .../src/operations/settings.ts | 163 - .../src/operations/train.ts | 150 - .../src/operations/versions.ts | 695 -- .../test/Luis/appVersionImport.test.ts | 94 - .../test/Luis/apps.test.ts | 297 - .../test/Luis/entityRole.test.ts | 288 - .../test/Luis/examples.test.ts | 217 - .../test/Luis/export.test.ts | 54 - .../test/Luis/features.test.ts | 43 - .../test/Luis/featuresPhraseLists.test.ts | 99 - .../test/Luis/import.test.ts | 75 - .../test/Luis/model.test.ts | 89 - .../test/Luis/modelClosedLists.test.ts | 156 - .../test/Luis/modelEntities.test.ts | 72 - .../test/Luis/modelIntents.test.ts | 68 - .../test/Luis/modelPatternAny.test.ts | 142 - .../test/Luis/modelPrebuiltDomain.test.ts | 174 - .../test/Luis/modelPrebuilts.test.ts | 66 - .../test/Luis/modelRegexEntities.test.ts | 67 - .../test/Luis/patterns.test.ts | 158 - .../test/Luis/prebuiltEntityRole.test.ts | 74 - .../test/Luis/train.test.ts | 68 - .../test/Luis/versions.test.ts | 156 - .../test/SessionRecords/ImportApp.json | 252 - .../test/SessionRecords/ImportLuApp.json | 109 - .../test/SessionRecords/ImportV2App.json | 266 - .../test/baseTest.ts | 36 - .../tsconfig.json | 19 - .../tsconfig.test.json | 26 - .../LICENSE.txt | 21 - .../cognitiveservices-luis-runtime/README.md | 166 - .../package.json | 65 - .../rollup.config.js | 39 - .../src/lUISRuntimeClient.ts | 42 - .../src/lUISRuntimeClientContext.ts | 51 - .../src/models/index.ts | 272 - .../src/models/mappers.ts | 356 - .../src/models/parameters.ts | 90 - .../src/models/predictionOperationsMappers.ts | 22 - .../src/operations/index.ts | 11 - .../src/operations/predictionOperations.ts | 164 - .../test/Luis/predictions.test.ts | 177 - .../test/baseTest.ts | 38 - .../tsconfig.json | 19 - .../tsconfig.test.json | 26 - .../LICENSE.txt | 21 - .../README.md | 165 - .../package.json | 57 - .../rollup.config.js | 37 - .../src/models/index.ts | 338 - .../src/models/mappers.ts | 553 -- .../src/models/parameters.ts | 34 - .../src/models/runtimeMappers.ts | 28 - .../src/operations/index.ts | 11 - .../src/operations/runtime.ts | 142 - .../src/qnAMakerRuntimeClient.ts | 42 - .../src/qnAMakerRuntimeClientContext.ts | 51 - .../swagger/readme.md | 27 - .../tsconfig.json | 19 - .../cognitiveservices-qnamaker/LICENSE.txt | 21 - .../cognitiveservices-qnamaker/README.md | 99 - .../cognitiveservices-qnamaker/package.json | 57 - .../rollup.config.js | 37 - .../src/models/alterationsMappers.ts | 16 - .../src/models/endpointKeysMappers.ts | 15 - .../src/models/endpointSettingsMappers.ts | 17 - .../src/models/index.ts | 1133 --- .../src/models/knowledgebaseMappers.ts | 54 - .../src/models/mappers.ts | 1551 ---- .../src/models/operationsMappers.ts | 16 - .../src/models/parameters.ts | 87 - .../src/operations/alterations.ts | 221 - .../src/operations/endpointKeys.ts | 116 - .../src/operations/endpointSettings.ts | 120 - .../src/operations/index.ts | 14 - .../src/operations/knowledgebase.ts | 540 -- .../src/operations/operations.ts | 77 - .../src/qnAMakerClient.ts | 49 - .../src/qnAMakerClientContext.ts | 50 - .../swagger/readme.md | 28 - .../cognitiveservices-qnamaker/tsconfig.json | 19 - 107 files changed, 33071 deletions(-) delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/LICENSE.txt delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/package.json delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/rollup.config.js delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClient.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClientContext.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/appsMappers.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/azureAccountsMappers.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/examplesMappers.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/featuresMappers.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/index.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/mappers.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/modelMappers.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/parameters.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/patternMappers.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/permissionsMappers.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/settingsMappers.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/trainMappers.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/versionsMappers.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/apps.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/azureAccounts.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/examples.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/features.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/index.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/model.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/pattern.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/settings.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/train.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/versions.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/appVersionImport.test.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/apps.test.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/entityRole.test.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/examples.test.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/export.test.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/features.test.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/featuresPhraseLists.test.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/import.test.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/model.test.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelClosedLists.test.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelEntities.test.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelIntents.test.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelPatternAny.test.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelPrebuiltDomain.test.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelPrebuilts.test.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelRegexEntities.test.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/patterns.test.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/prebuiltEntityRole.test.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/train.test.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/versions.test.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/SessionRecords/ImportApp.json delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/SessionRecords/ImportLuApp.json delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/SessionRecords/ImportV2App.json delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/test/baseTest.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/tsconfig.json delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-authoring/tsconfig.test.json delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-runtime/LICENSE.txt delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-runtime/README.md delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-runtime/package.json delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-runtime/rollup.config.js delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-runtime/src/lUISRuntimeClient.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-runtime/src/lUISRuntimeClientContext.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-runtime/src/models/index.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-runtime/src/models/mappers.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-runtime/src/models/parameters.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-runtime/src/models/predictionOperationsMappers.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-runtime/src/operations/index.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-runtime/src/operations/predictionOperations.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-runtime/test/Luis/predictions.test.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-runtime/test/baseTest.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-runtime/tsconfig.json delete mode 100644 sdk/cognitiveservices/cognitiveservices-luis-runtime/tsconfig.test.json delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/LICENSE.txt delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/README.md delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/package.json delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/rollup.config.js delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/models/index.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/models/mappers.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/models/parameters.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/models/runtimeMappers.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/operations/index.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/operations/runtime.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/qnAMakerRuntimeClient.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/qnAMakerRuntimeClientContext.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/swagger/readme.md delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/tsconfig.json delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/LICENSE.txt delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/README.md delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/package.json delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/rollup.config.js delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/alterationsMappers.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/endpointKeysMappers.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/endpointSettingsMappers.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/index.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/knowledgebaseMappers.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/mappers.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/operationsMappers.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/parameters.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/alterations.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/endpointKeys.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/endpointSettings.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/index.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/knowledgebase.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/operations.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/src/qnAMakerClient.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/src/qnAMakerClientContext.ts delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/swagger/readme.md delete mode 100644 sdk/cognitiveservices/cognitiveservices-qnamaker/tsconfig.json diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/LICENSE.txt b/sdk/cognitiveservices/cognitiveservices-luis-authoring/LICENSE.txt deleted file mode 100644 index b73b4a1293c3..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2019 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md b/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md deleted file mode 100644 index 8b8d7d000c95..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md +++ /dev/null @@ -1,112 +0,0 @@ -## An isomorphic javascript sdk for - LUISAuthoringClient - -This package contains an isomorphic SDK for LUISAuthoringClient. - -Package version | LUIS Authoring API version ---------------- | -------------------------- -3.0.0 | /luis/api/v2.0 -4.0.0-preview.3 | /luis/authoring/v3.0-preview - -### Currently supported environments - -- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) -- Latest versions of Safari, Chrome, Edge, and Firefox. - -### How to Install - -```bash -npm install @azure/cognitiveservices-luis-authoring -``` - -### How to use - -#### nodejs - Authentication, client creation and listPhraseLists features as an example written in TypeScript. - -##### Install @azure/ms-rest-azure-js - -```bash -npm install @azure/ms-rest-azure-js -``` - -##### Sample code - -```javascript -const { CognitiveServicesCredentials } = require("@azure/ms-rest-azure-js"); -const { LUISAuthoringClient } = require("@azure/cognitiveservices-luis-authoring"); - -let authoringKey = process.env["luis-authoring-key"]; -const creds = new CognitiveServicesCredentials(authoringKey); - -// check the following link to find your region -// https://docs.microsoft.com/azure/cognitive-services/luis/luis-reference-regions -const region = ""; -const client = new LUISAuthoringClient( - creds, - "https://" + region + ".api.cognitive.microsoft.com/" -); - -const appId = ""; // replace this with your appId. -const versionId = "0.1"; // replace with version of your luis application. Initial value will be 0.1 - -const skip = 1; -const take = 1; - -client.features - .listPhraseLists(appId, versionId, { skip, take }) - .then((result) => { - console.log("The result is:"); - console.log(result); - }) - .catch((err) => { - console.error(err); - }); -``` - -#### browser - Authentication, client creation and listPhraseLists features as an example written in JavaScript. - - -##### Sample code - -- index.html - -```html - - - - @azure/cognitiveservices-luis-authoring sample - - - - - - -``` - -## Related projects - -- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcognitiveservices%2Fcognitiveservices-luis-authoring%2FREADME.png) diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/package.json b/sdk/cognitiveservices/cognitiveservices-luis-authoring/package.json deleted file mode 100644 index 90a8146c7d0c..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "@azure/cognitiveservices-luis-authoring", - "author": "Microsoft Corporation", - "description": "LUISAuthoringClient Library with typescript type definitions for node.js and browser.", - "version": "4.0.0-preview.3", - "dependencies": { - "@azure/ms-rest-js": "^2.0.3", - "tslib": "^1.10.0" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "license": "MIT", - "main": "./dist/cognitiveservices-luis-authoring.js", - "module": "./esm/lUISAuthoringClient.js", - "types": "./esm/lUISAuthoringClient.d.ts", - "devDependencies": { - "@types/chai": "^4.2.0", - "@types/mocha": "^5.2.7", - "mocha": "^6.1.4", - "nock": "^10.0.0", - "rollup": "^0.66.2", - "@azure/ms-rest-azure-js": "^2.0.1", - "rollup-plugin-node-resolve": "^3.4.0", - "rollup-plugin-sourcemaps": "^0.4.2", - "ts-node": "^8.3.0", - "typescript": "^3.1.1", - "uglify-js": "^3.4.9", - "ts-mocha": "^6.0.0" - }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/main/sdk/cognitiveservices/cognitiveservices-luis-authoring", - "repository": { - "type": "git", - "url": "https://github.com/Azure/azure-sdk-for-js.git" - }, - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "files": [ - "dist/**/*.js", - "dist/**/*.js.map", - "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "esm/**/*.js", - "esm/**/*.js.map", - "esm/**/*.d.ts", - "esm/**/*.d.ts.map", - "src/**/*.ts", - "README.md", - "rollup.config.js", - "tsconfig.json" - ], - "scripts": { - "build": "tsc && rollup -c rollup.config.js && npm run minify", - "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/cognitiveservices-luis-authoring.js.map'\" -o ./dist/cognitiveservices-luis-authoring.min.js ./dist/cognitiveservices-luis-authoring.js", - "prepack": "npm install && npm run build", - "test": "ts-mocha -p tsconfig.test.json test/**/*.test.ts --timeout 100000" - }, - "sideEffects": false, - "autoPublish": true -} diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/rollup.config.js b/sdk/cognitiveservices/cognitiveservices-luis-authoring/rollup.config.js deleted file mode 100644 index 25387e1c881a..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/rollup.config.js +++ /dev/null @@ -1,38 +0,0 @@ -import rollup from "rollup"; -import nodeResolve from "rollup-plugin-node-resolve"; -import sourcemaps from "rollup-plugin-sourcemaps"; - -/** - * @type {rollup.RollupFileOptions} - */ -const config = { - input: "./esm/lUISAuthoringClient.js", - external: [ - "@azure/ms-rest-js", - "@azure/ms-rest-azure-js" - ], - output: { - file: "./dist/cognitiveservices-luis-authoring.js", - format: "umd", - name: "Azure.CognitiveservicesLuisAuthoring", - sourcemap: true, - globals: { - "@azure/ms-rest-js": "msRest", - "@azure/ms-rest-azure-js": "msRestAzure" - }, - banner: `/* - * 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. - */` - }, - plugins: [ - nodeResolve({ mainFields: ['module', 'main'] }), - sourcemaps() - ] -}; - -export default config; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClient.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClient.ts deleted file mode 100644 index 6f42b8b56a1e..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClient.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "./models"; -import * as Mappers from "./models/mappers"; -import * as operations from "./operations"; -import { LUISAuthoringClientContext } from "./lUISAuthoringClientContext"; - -class LUISAuthoringClient extends LUISAuthoringClientContext { - // Operation groups - features: operations.Features; - examples: operations.Examples; - model: operations.Model; - apps: operations.Apps; - versions: operations.Versions; - train: operations.Train; - pattern: operations.Pattern; - settings: operations.Settings; - azureAccounts: operations.AzureAccounts; - - /** - * Initializes a new instance of the LUISAuthoringClient class. - * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: - * https://westus.api.cognitive.microsoft.com). - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param [options] The parameter options - */ - constructor(credentials: msRest.ServiceClientCredentials, endpoint: string, options?: msRest.ServiceClientOptions) { - super(credentials, endpoint, options); - this.features = new operations.Features(this); - this.examples = new operations.Examples(this); - this.model = new operations.Model(this); - this.apps = new operations.Apps(this); - this.versions = new operations.Versions(this); - this.train = new operations.Train(this); - this.pattern = new operations.Pattern(this); - this.settings = new operations.Settings(this); - this.azureAccounts = new operations.AzureAccounts(this); - } -} - -// Operation Specifications - -export { - LUISAuthoringClient, - LUISAuthoringClientContext, - Models as LUISAuthoringModels, - Mappers as LUISAuthoringMappers -}; -export * from "./operations"; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClientContext.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClientContext.ts deleted file mode 100644 index 52484b1a316e..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClientContext.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; - -const packageName = "@azure/cognitiveservices-luis-authoring"; -const packageVersion = "4.0.0-preview.3"; - -export class LUISAuthoringClientContext extends msRest.ServiceClient { - endpoint: string; - credentials: msRest.ServiceClientCredentials; - - /** - * Initializes a new instance of the LUISAuthoringClientContext class. - * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: - * https://westus.api.cognitive.microsoft.com). - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param [options] The parameter options - */ - constructor(credentials: msRest.ServiceClientCredentials, endpoint: string, options?: msRest.ServiceClientOptions) { - if (endpoint == undefined) { - throw new Error("'endpoint' cannot be null."); - } - if (credentials == undefined) { - throw new Error("'credentials' cannot be null."); - } - - if (!options) { - options = {}; - } - - if (!options.userAgent) { - const defaultUserAgent = msRest.getDefaultUserAgentValue(); - options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; - } - - super(credentials, options); - - this.baseUri = "{Endpoint}/luis/authoring/v3.0-preview"; - this.requestContentType = "application/json; charset=utf-8"; - this.endpoint = endpoint; - this.credentials = credentials; - } -} diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/appsMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/appsMappers.ts deleted file mode 100644 index 3ae7804c810a..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/appsMappers.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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. - */ - -export { - ApplicationCreateObject, - ApplicationInfoResponse, - ApplicationPublishObject, - ApplicationSettings, - ApplicationSettingUpdateObject, - ApplicationUpdateObject, - AvailableCulture, - ClosedList, - EndpointInfo, - ErrorResponse, - HierarchicalModel, - HierarchicalModelV2, - JsonChild, - JSONEntity, - JSONModelFeature, - JsonModelFeatureInformation, - JSONRegexFeature, - JSONUtterance, - LuisApp, - LuisAppV2, - OperationStatus, - PatternAny, - PatternRule, - PersonalAssistantsResponse, - PrebuiltDomain, - PrebuiltDomainCreateObject, - PrebuiltDomainItem, - PrebuiltDomainObject, - PrebuiltEntity, - ProductionOrStagingEndpointInfo, - PublishSettings, - PublishSettingUpdateObject, - RegexEntity, - SubClosedList, - SubClosedListResponse -} from "../models/mappers"; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/azureAccountsMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/azureAccountsMappers.ts deleted file mode 100644 index 02170a2a2818..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/azureAccountsMappers.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * 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. - */ - -export { - AzureAccountInfoObject, - ErrorResponse, - OperationStatus -} from "../models/mappers"; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/examplesMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/examplesMappers.ts deleted file mode 100644 index 8bd5c1ef50f1..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/examplesMappers.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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. - */ - -export { - BatchLabelExample, - EntityLabel, - EntityLabelObject, - EntityPrediction, - ErrorResponse, - ExampleLabelObject, - IntentPrediction, - LabeledUtterance, - LabelExampleResponse, - OperationStatus -} from "../models/mappers"; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/featuresMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/featuresMappers.ts deleted file mode 100644 index d58acc7b47f7..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/featuresMappers.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ - -export { - ErrorResponse, - FeatureInfoObject, - FeaturesResponseObject, - ModelFeatureInformation, - OperationStatus, - PatternFeatureInfo, - PhraselistCreateObject, - PhraseListFeatureInfo, - PhraselistUpdateObject -} from "../models/mappers"; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/index.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/index.ts deleted file mode 100644 index 20bf040052e1..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/index.ts +++ /dev/null @@ -1,6258 +0,0 @@ -/* - * 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. - */ - - -import * as msRest from "@azure/ms-rest-js"; - -/** - * Defines the entity type and position of the extracted entity within the example. - */ -export interface EntityLabelObject { - /** - * The entity type. - */ - entityName: string; - /** - * The index within the utterance where the extracted entity starts. - */ - startCharIndex: number; - /** - * The index within the utterance where the extracted entity ends. - */ - endCharIndex: number; - /** - * The role the entity plays in the utterance. - */ - role?: string; - /** - * The identified entities within the example utterance. - */ - children?: EntityLabelObject[]; -} - -/** - * Properties for creating a new LUIS Application - */ -export interface ApplicationCreateObject { - /** - * 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. - */ - culture: string; - /** - * The domain for the new application. Optional. E.g.: Comics. - */ - domain?: string; - /** - * Description of the new application. Optional. - */ - description?: string; - /** - * The initial version ID. Optional. Default value is: "0.1" - */ - initialVersionId?: string; - /** - * Defines the scenario for the new application. Optional. E.g.: IoT. - */ - usageScenario?: string; - /** - * The name for the new application. - */ - name: string; -} - -/** - * A model object containing the name of the custom prebuilt entity and the name of the domain to - * which this model belongs. - */ -export interface PrebuiltDomainCreateBaseObject { - /** - * The domain name. - */ - domainName?: string; -} - -/** - * A prebuilt domain create object containing the name and culture of the domain. - */ -export interface PrebuiltDomainCreateObject { - /** - * The domain name. - */ - domainName?: string; - /** - * The culture of the new domain. - */ - culture?: string; -} - -/** - * A model object containing the name of the custom prebuilt intent or entity and the name of the - * domain to which this model belongs. - */ -export interface PrebuiltDomainModelCreateObject { - /** - * The domain name. - */ - domainName?: string; - /** - * The intent name or entity name. - */ - modelName?: string; -} - -/** - * A composite entity extractor. - */ -export interface CompositeEntityModel { - /** - * Child entities. - */ - children?: string[]; - /** - * Entity name. - */ - name?: string; -} - -/** - * A child entity extractor create object. - */ -export interface ChildEntityModelCreateObject { - /** - * Child entities. - */ - children?: ChildEntityModelCreateObject[]; - /** - * Entity name. - */ - name?: string; - /** - * The instance of model name - */ - instanceOf?: string; -} - -/** - * An entity extractor create object. - */ -export interface EntityModelCreateObject { - /** - * Child entities. - */ - children?: ChildEntityModelCreateObject[]; - /** - * Entity name. - */ - name?: string; -} - -/** - * An entity extractor update object. - */ -export interface EntityModelUpdateObject { - /** - * Entity name. - */ - name?: string; - /** - * The instance of model name - */ - instanceOf?: string; -} - -/** - * Exported Model - Extracted Entity from utterance. - */ -export interface JSONEntity { - /** - * The index within the utterance where the extracted entity starts. - */ - startPos: number; - /** - * The index within the utterance where the extracted entity ends. - */ - endPos: number; - /** - * The entity name. - */ - entity: string; - /** - * The role the entity plays in the utterance. - */ - role?: string; - children?: JSONEntity[]; -} - -/** - * Object model for updating an application's settings. - */ -export interface ApplicationSettingUpdateObject { - /** - * Setting your application as public allows other people to use your application's endpoint - * using their own keys. - */ - isPublic?: boolean; -} - -/** - * Object model for updating an application's publish settings. - */ -export interface PublishSettingUpdateObject { - /** - * Setting sentiment analysis as true returns the Sentiment of the input utterance along with the - * response - */ - sentimentAnalysis?: boolean; - /** - * Setting speech as public enables speech priming in your app - */ - speech?: boolean; - /** - * Setting spell checker as public enables spell checking the input utterance. - */ - spellChecker?: boolean; -} - -/** - * A labeled example utterance. - */ -export interface ExampleLabelObject { - /** - * The example utterance. - */ - text?: string; - /** - * The identified entities within the example utterance. - */ - entityLabels?: EntityLabelObject[]; - /** - * The identified intent representing the example utterance. - */ - intentName?: string; -} - -/** - * Object model for creating a phraselist model. - */ -export interface PhraselistCreateObject { - /** - * List of comma-separated phrases that represent the Phraselist. - */ - phrases?: string; - /** - * The Phraselist name. - */ - name?: string; - /** - * An interchangeable phrase list feature serves as a list of synonyms for training. A - * non-exchangeable phrase list serves as separate features for training. So, if your - * non-interchangeable phrase list contains 5 phrases, they will be mapped to 5 separate - * features. You can think of the non-interchangeable phrase list as an additional bag of words - * to add to LUIS existing vocabulary features. 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. Default value is true. - * Default value: true. - */ - isExchangeable?: boolean; - /** - * Indicates if the Phraselist is enabled for all models in the application. Default value: true. - */ - enabledForAllModels?: boolean; -} - -/** - * Sublist of items for a list entity. - */ -export interface SubClosedList { - /** - * The standard form that the list represents. - */ - canonicalForm?: string; - /** - * List of synonym words. - */ - list?: string[]; -} - -/** - * Sublist of items for a list entity. - */ -export interface SubClosedListResponse extends SubClosedList { - /** - * The sublist ID - */ - id?: number; -} - -/** - * Object model for updating the name or description of an application. - */ -export interface ApplicationUpdateObject { - /** - * The application's new name. - */ - name?: string; - /** - * The application's new description. - */ - description?: string; -} - -/** - * Exported Model - A Pattern feature. - */ -export interface JSONRegexFeature { - /** - * The Regular Expression to match. - */ - pattern?: string; - /** - * Indicates if the Pattern feature is enabled. - */ - activated?: boolean; - /** - * Name of the feature. - */ - name?: string; -} - -/** - * Exported Model - A list entity. - */ -export interface ClosedList { - /** - * Name of the list entity. - */ - name?: string; - /** - * Sublists for the list entity. - */ - subLists?: SubClosedList[]; - roles?: string[]; -} - -/** - * Sublist of items for a list entity. - */ -export interface WordListObject { - /** - * The standard form that the list represents. - */ - canonicalForm?: string; - /** - * List of synonym words. - */ - list?: string[]; -} - -/** - * Object model for adding a batch of sublists to an existing list entity. - */ -export interface ClosedListModelPatchObject { - /** - * Sublists to add. - */ - subLists?: WordListObject[]; -} - -/** - * Exported Model - Phraselist Model Feature. - */ -export interface JSONModelFeature { - /** - * Indicates if the feature is enabled. - */ - activated?: boolean; - /** - * The Phraselist name. - */ - name?: string; - /** - * List of comma-separated phrases that represent the Phraselist. - */ - words?: string; - /** - * An interchangeable phrase list feature serves as a list of synonyms for training. A - * non-exchangeable phrase list serves as separate features for training. So, if your - * non-interchangeable phrase list contains 5 phrases, they will be mapped to 5 separate - * features. You can think of the non-interchangeable phrase list as an additional bag of words - * to add to LUIS existing vocabulary features. 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. Default value is true. - */ - mode?: boolean; - /** - * Indicates if the Phraselist is enabled for all models in the application. Default value: true. - */ - enabledForAllModels?: boolean; -} - -/** - * Object model for creating a new entity extractor. - */ -export interface ModelCreateObject { - /** - * Name of the new entity extractor. - */ - name?: string; -} - -/** - * Object model for updating one of the list entity's sublists. - */ -export interface WordListBaseUpdateObject { - /** - * The standard form that the list represents. - */ - canonicalForm?: string; - /** - * List of synonym words. - */ - list?: string[]; -} - -/** - * Exported Model - Utterance that was used to train the model. - */ -export interface JSONUtterance { - /** - * The utterance. - */ - text?: string; - /** - * The matched intent. - */ - intent?: string; - /** - * The matched entities. - */ - entities?: JSONEntity[]; -} - -/** - * Object model for updating an intent classifier. - */ -export interface ModelUpdateObject { - /** - * The entity's new name. - */ - name?: string; -} - -/** - * Object model for updating a list entity. - */ -export interface ClosedListModelUpdateObject { - /** - * The new sublists for the feature. - */ - subLists?: WordListObject[]; - /** - * The new name of the list entity. - */ - name?: string; -} - -/** - * Object model for creating a list entity. - */ -export interface ClosedListModelCreateObject { - /** - * Sublists for the feature. - */ - subLists?: WordListObject[]; - /** - * Name of the list entity. - */ - name?: string; -} - -/** - * Object model of an application version. - */ -export interface VersionInfo { - /** - * The version ID. E.g.: "0.1" - */ - version: string; - /** - * The version's creation timestamp. - */ - createdDateTime?: Date; - /** - * Timestamp of the last update. - */ - lastModifiedDateTime?: Date; - /** - * Timestamp of the last time the model was trained. - */ - lastTrainedDateTime?: Date; - /** - * Timestamp when was last published. - */ - lastPublishedDateTime?: Date; - /** - * The Runtime endpoint URL for this model version. - */ - endpointUrl?: string; - /** - * The endpoint key. - */ - assignedEndpointKey?: { [propertyName: string]: string }; - /** - * External keys. - */ - externalApiKeys?: any; - /** - * Number of intents in this model. - */ - intentsCount?: number; - /** - * Number of entities in this model. - */ - entitiesCount?: number; - /** - * Number of calls made to this endpoint. - */ - endpointHitsCount?: number; - /** - * The current training status. Possible values include: 'NeedsTraining', 'InProgress', 'Trained' - */ - trainingStatus: TrainingStatus; -} - -/** - * Object model for cloning an application's version. - */ -export interface TaskUpdateObject { - /** - * The new version for the cloned model. - */ - version?: string; -} - -/** - * Object model for updating a Phraselist. - */ -export interface PhraselistUpdateObject { - /** - * List of comma-separated phrases that represent the Phraselist. - */ - phrases?: string; - /** - * The Phraselist name. - */ - name?: string; - /** - * Indicates if the Phraselist is enabled. Default value: true. - */ - isActive?: boolean; - /** - * 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. - */ - isExchangeable?: boolean; - /** - * Indicates if the Phraselist is enabled for all models in the application. Default value: true. - */ - enabledForAllModels?: boolean; -} - -/** - * An interface representing PrebuiltDomainObject. - */ -export interface PrebuiltDomainObject { - domainName?: string; - modelName?: string; -} - -/** - * An object containing the model feature information either the model name or feature name. - */ -export interface JsonModelFeatureInformation { - /** - * The name of the model used. - */ - modelName?: string; - /** - * The name of the feature used. - */ - featureName?: string; -} - -/** - * An interface representing JsonChild. - */ -export interface JsonChild { - name?: string; - instanceOf?: string; - children?: JsonChild[]; - features?: JsonModelFeatureInformation[]; -} - -/** - * An interface representing HierarchicalModel. - */ -export interface HierarchicalModel { - name?: string; - children?: JsonChild[]; - features?: JsonModelFeatureInformation[]; - roles?: string[]; - inherits?: PrebuiltDomainObject; -} - -/** - * An interface representing HierarchicalModelV2. - */ -export interface HierarchicalModelV2 { - name?: string; - children?: string[]; - inherits?: PrebuiltDomainObject; - roles?: string[]; -} - -/** - * Object model for publishing a specific application version. - */ -export interface ApplicationPublishObject { - /** - * The version ID to publish. - */ - versionId?: string; - /** - * Indicates if the staging slot should be used, instead of the Production one. Default value: - * false. - */ - isStaging?: boolean; -} - -/** - * Pattern.Any Entity Extractor. - */ -export interface PatternAny { - name?: string; - explicitList?: string[]; - roles?: string[]; -} - -/** - * Regular Expression Entity Extractor. - */ -export interface RegexEntity { - name?: string; - regexPattern?: string; - roles?: string[]; -} - -/** - * Prebuilt Entity Extractor. - */ -export interface PrebuiltEntity { - name?: string; - roles?: string[]; -} - -/** - * Pattern - */ -export interface PatternRule { - /** - * The pattern text. - */ - pattern?: string; - /** - * The intent's name where the pattern belongs to. - */ - intent?: string; -} - -/** - * Exported Model - An exported LUIS Application. - */ -export interface LuisAppV2 { - /** - * Luis schema deserialization version. - */ - luisSchemaVersion?: string; - /** - * The name of the application. - */ - name?: string; - /** - * The version ID of the application that was exported. - */ - versionId?: string; - /** - * The description of the application. - */ - desc?: string; - /** - * The culture of the application. E.g.: en-us. - */ - culture?: string; - /** - * List of intents. - */ - intents?: HierarchicalModelV2[]; - /** - * List of entities. - */ - entities?: HierarchicalModelV2[]; - /** - * List of list entities. - */ - closedLists?: ClosedList[]; - /** - * List of composite entities. - */ - composites?: HierarchicalModelV2[]; - /** - * List of Pattern.Any entities. - */ - patternAnyEntities?: PatternAny[]; - /** - * List of regular expression entities. - */ - regexEntities?: RegexEntity[]; - /** - * List of prebuilt entities. - */ - prebuiltEntities?: PrebuiltEntity[]; - /** - * List of pattern features. - */ - regexFeatures?: JSONRegexFeature[]; - /** - * List of model features. - */ - modelFeatures?: JSONModelFeature[]; - /** - * List of patterns. - */ - patterns?: PatternRule[]; - /** - * List of example utterances. - */ - utterances?: JSONUtterance[]; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * Exported Model - An exported LUIS Application. - */ -export interface LuisApp { - /** - * The name of the application. - */ - name?: string; - /** - * The version ID of the application that was exported. - */ - versionId?: string; - /** - * The description of the application. - */ - desc?: string; - /** - * The culture of the application. E.g.: en-us. - */ - culture?: string; - /** - * List of intents. - */ - intents?: HierarchicalModel[]; - /** - * List of entities. - */ - entities?: HierarchicalModel[]; - /** - * List of list entities. - */ - closedLists?: ClosedList[]; - /** - * List of composite entities. - */ - composites?: HierarchicalModel[]; - /** - * List of hierarchical entities. - */ - hierarchicals?: HierarchicalModel[]; - /** - * List of Pattern.Any entities. - */ - patternAnyEntities?: PatternAny[]; - /** - * List of regular expression entities. - */ - regexEntities?: RegexEntity[]; - /** - * List of prebuilt entities. - */ - prebuiltEntities?: PrebuiltEntity[]; - /** - * List of pattern features. - */ - regexFeatures?: JSONRegexFeature[]; - /** - * List of model features. - */ - phraselists?: JSONModelFeature[]; - /** - * List of patterns. - */ - patterns?: PatternRule[]; - /** - * List of example utterances. - */ - utterances?: JSONUtterance[]; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * Defines the entity type and position of the extracted entity within the example. - */ -export interface EntityLabel { - /** - * The entity type. - */ - entityName: string; - /** - * The index within the utterance where the extracted entity starts. - */ - startTokenIndex: number; - /** - * The index within the utterance where the extracted entity ends. - */ - endTokenIndex: number; - /** - * The role of the predicted entity. - */ - role?: string; - /** - * The role id for the predicted entity. - */ - roleId?: string; - children?: EntityLabel[]; -} - -/** - * A suggested intent. - */ -export interface IntentPrediction { - /** - * The intent's name - */ - name?: string; - /** - * The intent's score, based on the prediction model. - */ - score?: number; -} - -/** - * A suggested entity. - */ -export interface EntityPrediction { - /** - * The entity's name - */ - entityName: string; - /** - * The index within the utterance where the extracted entity starts. - */ - startTokenIndex: number; - /** - * The index within the utterance where the extracted entity ends. - */ - endTokenIndex: number; - /** - * The actual token(s) that comprise the entity. - */ - phrase: string; - children?: EntityPrediction[]; -} - -/** - * A prediction and label pair of an example. - */ -export interface LabeledUtterance { - /** - * ID of Labeled Utterance. - */ - id?: number; - /** - * The utterance. For example, "What's the weather like in seattle?" - */ - text?: string; - /** - * The utterance tokenized. - */ - tokenizedText?: string[]; - /** - * The intent matching the example. - */ - intentLabel?: string; - /** - * The entities matching the example. - */ - entityLabels?: EntityLabel[]; - /** - * List of suggested intents. - */ - intentPredictions?: IntentPrediction[]; - /** - * List of suggested entities. - */ - entityPredictions?: EntityPrediction[]; -} - -/** - * Predicted/suggested intent. - */ -export interface IntentsSuggestionExample { - /** - * The utterance. For example, "What's the weather like in seattle?" - */ - text?: string; - /** - * The tokenized utterance. - */ - tokenizedText?: string[]; - /** - * Predicted/suggested intents. - */ - intentPredictions?: IntentPrediction[]; - /** - * Predicted/suggested entities. - */ - entityPredictions?: EntityPrediction[]; -} - -/** - * Predicted/suggested entity. - */ -export interface EntitiesSuggestionExample { - /** - * The utterance. For example, "What's the weather like in seattle?" - */ - text?: string; - /** - * The utterance tokenized. - */ - tokenizedText?: string[]; - /** - * Predicted/suggested intents. - */ - intentPredictions?: IntentPrediction[]; - /** - * Predicted/suggested entities. - */ - entityPredictions?: EntityPrediction[]; -} - -/** - * Response containing user's endpoint keys and the endpoint URLs of the prebuilt Cortana - * applications. - */ -export interface PersonalAssistantsResponse { - endpointKeys?: string[]; - endpointUrls?: { [propertyName: string]: string }; -} - -/** - * Base type used in entity types. - */ -export interface ModelInfo { - /** - * The ID of the Entity Model. - */ - id: string; - /** - * Name of the Entity Model. - */ - name?: string; - /** - * The type ID of the Entity Model. - */ - typeId?: number; - /** - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - */ - readableType: ReadableType; -} - -/** - * Entity extractor role - */ -export interface EntityRole { - /** - * The entity role ID. - */ - id?: string; - /** - * The entity role name. - */ - name?: string; -} - -/** - * The base child entity type. - */ -export interface ChildEntity { - /** - * The ID (GUID) belonging to a child entity. - */ - id: string; - /** - * The name of a child entity. - */ - name?: string; - /** - * Instance of Model. - */ - instanceOf?: string; - /** - * The type ID of the Entity Model. - */ - typeId?: number; - /** - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - */ - readableType?: ReadableType1; - /** - * List of children - */ - children?: ChildEntity[]; -} - -/** - * Explicit (exception) list item - */ -export interface ExplicitListItem { - /** - * The explicit list item ID. - */ - id?: number; - /** - * The explicit list item value. - */ - explicitListItem?: string; -} - -/** - * An application model info. - */ -export interface ModelInfoResponse { - /** - * The ID of the Entity Model. - */ - id: string; - /** - * Name of the Entity Model. - */ - name?: string; - /** - * The type ID of the Entity Model. - */ - typeId?: number; - /** - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - */ - readableType: ReadableType2; - roles?: EntityRole[]; - /** - * List of child entities. - */ - children?: ChildEntity[]; - /** - * List of sublists. - */ - subLists?: SubClosedListResponse[]; - /** - * The domain name. - */ - customPrebuiltDomainName?: string; - /** - * The intent name or entity name. - */ - customPrebuiltModelName?: string; - /** - * The Regular Expression entity pattern. - */ - regexPattern?: string; - explicitList?: ExplicitListItem[]; -} - -/** - * An Entity Extractor model info. - */ -export interface EntityModelInfo extends ModelInfo { - roles?: EntityRole[]; -} - -/** - * Hierarchical Entity Extractor. - */ -export interface HierarchicalEntityExtractor { - /** - * The ID of the Entity Model. - */ - id: string; - /** - * Name of the Entity Model. - */ - name?: string; - /** - * The type ID of the Entity Model. - */ - typeId?: number; - /** - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - */ - readableType: ReadableType3; - roles?: EntityRole[]; - /** - * List of child entities. - */ - children?: ChildEntity[]; -} - -/** - * A Composite Entity Extractor. - */ -export interface CompositeEntityExtractor { - /** - * The ID of the Entity Model. - */ - id: string; - /** - * Name of the Entity Model. - */ - name?: string; - /** - * The type ID of the Entity Model. - */ - typeId?: number; - /** - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - */ - readableType: ReadableType4; - roles?: EntityRole[]; - /** - * List of child entities. - */ - children?: ChildEntity[]; -} - -/** - * List Entity Extractor. - */ -export interface ClosedListEntityExtractor { - /** - * The ID of the Entity Model. - */ - id: string; - /** - * Name of the Entity Model. - */ - name?: string; - /** - * The type ID of the Entity Model. - */ - typeId?: number; - /** - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - */ - readableType: ReadableType5; - roles?: EntityRole[]; - /** - * List of sublists. - */ - subLists?: SubClosedListResponse[]; -} - -/** - * Prebuilt Entity Extractor. - */ -export interface PrebuiltEntityExtractor { - /** - * The ID of the Entity Model. - */ - id: string; - /** - * Name of the Entity Model. - */ - name?: string; - /** - * The type ID of the Entity Model. - */ - typeId?: number; - /** - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - */ - readableType: ReadableType6; - roles?: EntityRole[]; -} - -/** - * A Hierarchical Child Entity. - */ -export interface HierarchicalChildEntity extends ChildEntity { -} - -/** - * A Custom Prebuilt model. - */ -export interface CustomPrebuiltModel { - /** - * The ID of the Entity Model. - */ - id: string; - /** - * Name of the Entity Model. - */ - name?: string; - /** - * The type ID of the Entity Model. - */ - typeId?: number; - /** - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - */ - readableType: ReadableType7; - /** - * The domain name. - */ - customPrebuiltDomainName?: string; - /** - * The intent name or entity name. - */ - customPrebuiltModelName?: string; - roles?: EntityRole[]; -} - -/** - * Intent Classifier. - */ -export interface IntentClassifier extends ModelInfo { - /** - * The domain name. - */ - customPrebuiltDomainName?: string; - /** - * The intent name or entity name. - */ - customPrebuiltModelName?: string; -} - -/** - * Entity Extractor. - */ -export interface EntityExtractor { - /** - * The ID of the Entity Model. - */ - id: string; - /** - * Name of the Entity Model. - */ - name?: string; - /** - * The type ID of the Entity Model. - */ - typeId?: number; - /** - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - */ - readableType: ReadableType8; - roles?: EntityRole[]; - /** - * The domain name. - */ - customPrebuiltDomainName?: string; - /** - * The intent name or entity name. - */ - customPrebuiltModelName?: string; -} - -/** - * N-Depth Entity Extractor. - */ -export interface NDepthEntityExtractor { - /** - * The ID of the Entity Model. - */ - id: string; - /** - * Name of the Entity Model. - */ - name?: string; - /** - * The type ID of the Entity Model. - */ - typeId?: number; - /** - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - */ - readableType: ReadableType9; - roles?: EntityRole[]; - /** - * The domain name. - */ - customPrebuiltDomainName?: string; - /** - * The intent name or entity name. - */ - customPrebuiltModelName?: string; - children?: ChildEntity[]; -} - -/** - * The base class Features-related response objects inherit from. - */ -export interface FeatureInfoObject { - /** - * A six-digit ID used for Features. - */ - id?: number; - /** - * The name of the Feature. - */ - name?: string; - /** - * Indicates if the feature is enabled. - */ - isActive?: boolean; - /** - * Indicates if the feature is enabled for all models in the application. - */ - enabledForAllModels?: boolean; -} - -/** - * Phraselist Feature. - */ -export interface PhraseListFeatureInfo extends FeatureInfoObject { - /** - * A list of comma-separated values. - */ - phrases?: string; - /** - * 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. - */ - isExchangeable?: boolean; -} - -/** - * Pattern feature. - */ -export interface PatternFeatureInfo extends FeatureInfoObject { - /** - * The Regular Expression to match. - */ - pattern?: string; -} - -/** - * Model Features, including Patterns and Phraselists. - */ -export interface FeaturesResponseObject { - phraselistFeatures?: PhraseListFeatureInfo[]; - patternFeatures?: PatternFeatureInfo[]; -} - -/** - * Response when adding a labeled example utterance. - */ -export interface LabelExampleResponse { - /** - * The example utterance. - */ - utteranceText?: string; - /** - * The newly created sample ID. - */ - exampleId?: number; -} - -/** - * Response of an Operation status. - */ -export interface OperationStatus { - /** - * Status Code. Possible values include: 'Failed', 'FAILED', 'Success' - */ - code?: OperationStatusType; - /** - * Status details. - */ - message?: string; -} - -/** - * Response when adding a batch of labeled example utterances. - */ -export interface BatchLabelExample { - value?: LabelExampleResponse; - hasError?: boolean; - error?: OperationStatus; -} - -/** - * Response containing the Application Info. - */ -export interface ApplicationInfoResponse { - /** - * The ID (GUID) of the application. - */ - id?: string; - /** - * The name of the application. - */ - name?: string; - /** - * The description of the application. - */ - description?: string; - /** - * The culture of the application. For example, "en-us". - */ - culture?: string; - /** - * Defines the scenario for the new application. Optional. For example, IoT. - */ - usageScenario?: string; - /** - * The domain for the new application. Optional. For example, Comics. - */ - domain?: string; - /** - * Amount of model versions within the application. - */ - versionsCount?: number; - /** - * The version's creation timestamp. - */ - createdDateTime?: string; - /** - * The Runtime endpoint URL for this model version. - */ - endpoints?: any; - /** - * Number of calls made to this endpoint. - */ - endpointHitsCount?: number; - /** - * The version ID currently marked as active. - */ - activeVersion?: string; -} - -/** - * The base class "ProductionOrStagingEndpointInfo" inherits from. - */ -export interface EndpointInfo { - /** - * The version ID to publish. - */ - versionId?: string; - /** - * Indicates if the staging slot should be used, instead of the Production one. - */ - isStaging?: boolean; - /** - * The Runtime endpoint URL for this model version. - */ - endpointUrl?: string; - /** - * The target region that the application is published to. - */ - region?: string; - /** - * The endpoint key. - */ - assignedEndpointKey?: string; - /** - * The endpoint's region. - */ - endpointRegion?: string; - /** - * Regions where publishing failed. - */ - failedRegions?: string; - /** - * Timestamp when was last published. - */ - publishedDateTime?: string; -} - -/** - * An interface representing ProductionOrStagingEndpointInfo. - */ -export interface ProductionOrStagingEndpointInfo extends EndpointInfo { -} - -/** - * Available culture for using in a new application. - */ -export interface AvailableCulture { - /** - * The language name. - */ - name?: string; - /** - * The ISO value for the language. - */ - code?: string; -} - -/** - * The application settings. - */ -export interface ApplicationSettings { - /** - * The application ID. - */ - id: string; - /** - * Setting your application as public allows other people to use your application's endpoint - * using their own keys for billing purposes. - */ - isPublic: boolean; -} - -/** - * The application publish settings. - */ -export interface PublishSettings { - /** - * The application ID. - */ - id: string; - /** - * Setting sentiment analysis as true returns the sentiment of the input utterance along with the - * response - */ - isSentimentAnalysisEnabled: boolean; - /** - * Enables speech priming in your app - */ - isSpeechEnabled: boolean; - /** - * Enables spell checking of the utterance. - */ - isSpellCheckerEnabled: boolean; -} - -/** - * Available Prebuilt entity model for using in an application. - */ -export interface AvailablePrebuiltEntityModel { - /** - * The entity name. - */ - name?: string; - /** - * The entity description and usage information. - */ - description?: string; - /** - * Usage examples. - */ - examples?: string; -} - -/** - * Response model when requesting to train the model. - */ -export interface EnqueueTrainingResponse { - /** - * The train request status ID. - */ - statusId?: number; - /** - * Possible values include: 'Queued', 'InProgress', 'UpToDate', 'Fail', 'Success' - */ - status?: Status; -} - -/** - * Model Training Details. - */ -export interface ModelTrainingDetails { - /** - * The train request status ID. - */ - statusId?: number; - /** - * Possible values include: 'Queued', 'InProgress', 'UpToDate', 'Fail', 'Success' - */ - status?: Status1; - /** - * The count of examples used to train the model. - */ - exampleCount?: number; - /** - * When the model was trained. - */ - trainingDateTime?: Date; - /** - * Reason for the training failure. - */ - failureReason?: string; -} - -/** - * Model Training Info. - */ -export interface ModelTrainingInfo { - /** - * The ID (GUID) of the model. - */ - modelId?: string; - details?: ModelTrainingDetails; -} - -/** - * List of user permissions. - */ -export interface UserAccessList { - /** - * The email address of owner of the application. - */ - owner?: string; - emails?: string[]; -} - -/** - * An interface representing UserCollaborator. - */ -export interface UserCollaborator { - /** - * The email address of the user. - */ - email?: string; -} - -/** - * An interface representing CollaboratorsArray. - */ -export interface CollaboratorsArray { - /** - * The email address of the users. - */ - emails?: string[]; -} - -/** - * Error response when invoking an operation on the API. - */ -export interface ErrorResponse { - errorType?: string; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * Operation error details when invoking an operation on the API. - */ -export interface OperationError { - code?: string; - message?: string; -} - -/** - * An interface representing PrebuiltDomainItem. - */ -export interface PrebuiltDomainItem { - name?: string; - description?: string; - examples?: string; -} - -/** - * Prebuilt Domain. - */ -export interface PrebuiltDomain { - name?: string; - culture?: string; - description?: string; - examples?: string; - intents?: PrebuiltDomainItem[]; - entities?: PrebuiltDomainItem[]; -} - -/** - * Object model for creating an entity role. - */ -export interface EntityRoleCreateObject { - /** - * The entity role name. - */ - name?: string; -} - -/** - * Model object for creating a regular expression entity model. - */ -export interface RegexModelCreateObject { - /** - * The regular expression entity pattern. - */ - regexPattern?: string; - /** - * The model name. - */ - name?: string; -} - -/** - * Model object for creating a Pattern.Any entity model. - */ -export interface PatternAnyModelCreateObject { - /** - * The model name. - */ - name?: string; - /** - * The Pattern.Any explicit list. - */ - explicitList?: string[]; -} - -/** - * Object model for creating an explicit (exception) list item. - */ -export interface ExplicitListItemCreateObject { - /** - * The explicit list item. - */ - explicitListItem?: string; -} - -/** - * Model object for updating a regular expression entity model. - */ -export interface RegexModelUpdateObject { - /** - * The regular expression entity pattern. - */ - regexPattern?: string; - /** - * The model name. - */ - name?: string; -} - -/** - * Model object for updating a Pattern.Any entity model. - */ -export interface PatternAnyModelUpdateObject { - /** - * The model name. - */ - name?: string; - /** - * The Pattern.Any explicit list. - */ - explicitList?: string[]; -} - -/** - * Object model for updating an entity role. - */ -export interface EntityRoleUpdateObject { - /** - * The entity role name. - */ - name?: string; -} - -/** - * Model object for updating an explicit (exception) list item. - */ -export interface ExplicitListItemUpdateObject { - /** - * The explicit list item. - */ - explicitListItem?: string; -} - -/** - * Object model for creating a pattern - */ -export interface PatternRuleCreateObject { - /** - * The pattern text. - */ - pattern?: string; - /** - * The intent's name which the pattern belongs to. - */ - intent?: string; -} - -/** - * Object model for updating a pattern. - */ -export interface PatternRuleUpdateObject { - /** - * The pattern ID. - */ - id?: string; - /** - * The pattern text. - */ - pattern?: string; - /** - * The intent's name which the pattern belongs to. - */ - intent?: string; -} - -/** - * Regular Expression Entity Extractor. - */ -export interface RegexEntityExtractor { - /** - * The ID of the Entity Model. - */ - id: string; - /** - * Name of the Entity Model. - */ - name?: string; - /** - * The type ID of the Entity Model. - */ - typeId?: number; - /** - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - */ - readableType: ReadableType10; - roles?: EntityRole[]; - /** - * The Regular Expression entity pattern. - */ - regexPattern?: string; -} - -/** - * Pattern.Any Entity Extractor. - */ -export interface PatternAnyEntityExtractor { - /** - * The ID of the Entity Model. - */ - id: string; - /** - * Name of the Entity Model. - */ - name?: string; - /** - * The type ID of the Entity Model. - */ - typeId?: number; - /** - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - */ - readableType: ReadableType11; - roles?: EntityRole[]; - explicitList?: ExplicitListItem[]; -} - -/** - * Pattern rule - */ -export interface PatternRuleInfo { - /** - * The pattern ID. - */ - id?: string; - /** - * The pattern text. - */ - pattern?: string; - /** - * The intent's name where the pattern belongs to. - */ - intent?: string; -} - -/** - * An object containing the example utterance's text. - */ -export interface LabelTextObject { - /** - * The ID of the Label. - */ - id?: number; - /** - * The text of the label. - */ - text?: string; -} - -/** - * An object containing the model feature information either the model name or feature name. - */ -export interface ModelFeatureInformation { - /** - * The name of the model used. - */ - modelName?: string; - /** - * The name of the feature used. - */ - featureName?: string; - isRequired?: boolean; -} - -/** - * Object model of an application version setting. - */ -export interface AppVersionSettingObject { - /** - * The application version setting name. - */ - name?: string; - /** - * The application version setting value. - */ - value?: string; -} - -/** - * Defines the Azure account information object. - */ -export interface AzureAccountInfoObject { - /** - * The id for the Azure subscription. - */ - azureSubscriptionId: string; - /** - * The Azure resource group name. - */ - resourceGroup: string; - /** - * The Azure account name. - */ - accountName: string; -} - -/** - * An interface representing HierarchicalChildModelUpdateObject. - */ -export interface HierarchicalChildModelUpdateObject { - name?: string; -} - -/** - * An interface representing CompositeChildModelCreateObject. - */ -export interface CompositeChildModelCreateObject { - name?: string; -} - -/** - * Optional Parameters. - */ -export interface FeaturesListPhraseListsOptionalParams extends msRest.RequestOptionsBase { - /** - * The number of entries to skip. Default value is 0. Default value: 0. - */ - skip?: number; - /** - * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. - */ - take?: number; -} - -/** - * Optional Parameters. - */ -export interface FeaturesListOptionalParams extends msRest.RequestOptionsBase { - /** - * The number of entries to skip. Default value is 0. Default value: 0. - */ - skip?: number; - /** - * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. - */ - take?: number; -} - -/** - * Optional Parameters. - */ -export interface FeaturesUpdatePhraseListOptionalParams extends msRest.RequestOptionsBase { - /** - * 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. - */ - phraselistUpdateObject?: PhraselistUpdateObject; -} - -/** - * Optional Parameters. - */ -export interface ExamplesAddOptionalParams extends msRest.RequestOptionsBase { - /** - * Toggles nested/flat format. Default value: false. - */ - enableNestedChildren?: boolean; -} - -/** - * Optional Parameters. - */ -export interface ExamplesBatchOptionalParams extends msRest.RequestOptionsBase { - /** - * Toggles nested/flat format. Default value: false. - */ - enableNestedChildren?: boolean; -} - -/** - * Optional Parameters. - */ -export interface ExamplesListOptionalParams extends msRest.RequestOptionsBase { - /** - * The number of entries to skip. Default value is 0. Default value: 0. - */ - skip?: number; - /** - * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. - */ - take?: number; - /** - * Toggles nested/flat format. Default value: false. - */ - enableNestedChildren?: boolean; -} - -/** - * Optional Parameters. - */ -export interface ModelListIntentsOptionalParams extends msRest.RequestOptionsBase { - /** - * The number of entries to skip. Default value is 0. Default value: 0. - */ - skip?: number; - /** - * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. - */ - take?: number; -} - -/** - * Optional Parameters. - */ -export interface ModelListEntitiesOptionalParams extends msRest.RequestOptionsBase { - /** - * The number of entries to skip. Default value is 0. Default value: 0. - */ - skip?: number; - /** - * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. - */ - take?: number; -} - -/** - * Optional Parameters. - */ -export interface ModelListHierarchicalEntitiesOptionalParams extends msRest.RequestOptionsBase { - /** - * The number of entries to skip. Default value is 0. Default value: 0. - */ - skip?: number; - /** - * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. - */ - take?: number; -} - -/** - * Optional Parameters. - */ -export interface ModelListCompositeEntitiesOptionalParams extends msRest.RequestOptionsBase { - /** - * The number of entries to skip. Default value is 0. Default value: 0. - */ - skip?: number; - /** - * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. - */ - take?: number; -} - -/** - * Optional Parameters. - */ -export interface ModelListClosedListsOptionalParams extends msRest.RequestOptionsBase { - /** - * The number of entries to skip. Default value is 0. Default value: 0. - */ - skip?: number; - /** - * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. - */ - take?: number; -} - -/** - * Optional Parameters. - */ -export interface ModelListPrebuiltsOptionalParams extends msRest.RequestOptionsBase { - /** - * The number of entries to skip. Default value is 0. Default value: 0. - */ - skip?: number; - /** - * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. - */ - take?: number; -} - -/** - * Optional Parameters. - */ -export interface ModelListModelsOptionalParams extends msRest.RequestOptionsBase { - /** - * The number of entries to skip. Default value is 0. Default value: 0. - */ - skip?: number; - /** - * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. - */ - take?: number; -} - -/** - * Optional Parameters. - */ -export interface ModelExamplesMethodOptionalParams extends msRest.RequestOptionsBase { - /** - * The number of entries to skip. Default value is 0. Default value: 0. - */ - skip?: number; - /** - * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. - */ - take?: number; -} - -/** - * Optional Parameters. - */ -export interface ModelDeleteIntentOptionalParams extends msRest.RequestOptionsBase { - /** - * If true, deletes the intent's example utterances. If false, moves the example utterances to - * the None intent. The default value is false. Default value: false. - */ - deleteUtterances?: boolean; -} - -/** - * Optional Parameters. - */ -export interface ModelListIntentSuggestionsOptionalParams extends msRest.RequestOptionsBase { - /** - * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. - */ - take?: number; - /** - * Toggles nested/flat format. Default value: false. - */ - enableNestedChildren?: boolean; -} - -/** - * Optional Parameters. - */ -export interface ModelListEntitySuggestionsOptionalParams extends msRest.RequestOptionsBase { - /** - * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. - */ - take?: number; - /** - * Toggles nested/flat format. Default value: false. - */ - enableNestedChildren?: boolean; -} - -/** - * Optional Parameters. - */ -export interface ModelListRegexEntityInfosOptionalParams extends msRest.RequestOptionsBase { - /** - * The number of entries to skip. Default value is 0. Default value: 0. - */ - skip?: number; - /** - * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. - */ - take?: number; -} - -/** - * Optional Parameters. - */ -export interface ModelListPatternAnyEntityInfosOptionalParams extends msRest.RequestOptionsBase { - /** - * The number of entries to skip. Default value is 0. Default value: 0. - */ - skip?: number; - /** - * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. - */ - take?: number; -} - -/** - * Optional Parameters. - */ -export interface AppsListOptionalParams extends msRest.RequestOptionsBase { - /** - * The number of entries to skip. Default value is 0. Default value: 0. - */ - skip?: number; - /** - * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. - */ - take?: number; -} - -/** - * Optional Parameters. - */ -export interface AppsImportMethodOptionalParams extends msRest.RequestOptionsBase { - /** - * The application name to create. If not specified, the application name will be read from the - * imported object. If the application name already exists, an error is returned. - */ - appName?: string; -} - -/** - * Optional Parameters. - */ -export interface AppsDeleteMethodOptionalParams extends msRest.RequestOptionsBase { - /** - * A flag to indicate whether to force an operation. Default value: false. - */ - force?: boolean; -} - -/** - * Optional Parameters. - */ -export interface AppsImportV2AppOptionalParams extends msRest.RequestOptionsBase { - /** - * The application name to create. If not specified, the application name will be read from the - * imported object. If the application name already exists, an error is returned. - */ - appName?: string; -} - -/** - * Optional Parameters. - */ -export interface AppsImportLuFormatOptionalParams extends msRest.RequestOptionsBase { - /** - * The application name to create. If not specified, the application name will be read from the - * imported object. If the application name already exists, an error is returned. - */ - appName?: string; -} - -/** - * Optional Parameters. - */ -export interface VersionsListOptionalParams extends msRest.RequestOptionsBase { - /** - * The number of entries to skip. Default value is 0. Default value: 0. - */ - skip?: number; - /** - * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. - */ - take?: number; -} - -/** - * Optional Parameters. - */ -export interface VersionsImportMethodOptionalParams extends msRest.RequestOptionsBase { - /** - * The new versionId to import. If not specified, the versionId will be read from the imported - * object. - */ - versionId?: string; -} - -/** - * Optional Parameters. - */ -export interface VersionsImportV2AppOptionalParams extends msRest.RequestOptionsBase { - /** - * The new versionId to import. If not specified, the versionId will be read from the imported - * object. - */ - versionId?: string; -} - -/** - * Optional Parameters. - */ -export interface VersionsImportLuFormatOptionalParams extends msRest.RequestOptionsBase { - /** - * The new versionId to import. If not specified, the versionId will be read from the imported - * object. - */ - versionId?: string; -} - -/** - * Optional Parameters. - */ -export interface PatternListPatternsOptionalParams extends msRest.RequestOptionsBase { - /** - * The number of entries to skip. Default value is 0. Default value: 0. - */ - skip?: number; - /** - * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. - */ - take?: number; -} - -/** - * Optional Parameters. - */ -export interface PatternListIntentPatternsOptionalParams extends msRest.RequestOptionsBase { - /** - * The number of entries to skip. Default value is 0. Default value: 0. - */ - skip?: number; - /** - * The number of entries to return. Maximum page size is 500. Default is 100. Default value: 100. - */ - take?: number; -} - -/** - * Optional Parameters. - */ -export interface AzureAccountsAssignToAppOptionalParams extends msRest.RequestOptionsBase { - /** - * The custom arm token header to use; containing the user's ARM token used to validate azure - * accounts information. - */ - armToken?: string; - /** - * The Azure account information object. - */ - azureAccountInfoObject?: AzureAccountInfoObject; -} - -/** - * Optional Parameters. - */ -export interface AzureAccountsGetAssignedOptionalParams extends msRest.RequestOptionsBase { - /** - * The custom arm token header to use; containing the user's ARM token used to validate azure - * accounts information. - */ - armToken?: string; -} - -/** - * Optional Parameters. - */ -export interface AzureAccountsRemoveFromAppOptionalParams extends msRest.RequestOptionsBase { - /** - * The custom arm token header to use; containing the user's ARM token used to validate azure - * accounts information. - */ - armToken?: string; - /** - * The Azure account information object. - */ - azureAccountInfoObject?: AzureAccountInfoObject; -} - -/** - * Optional Parameters. - */ -export interface AzureAccountsListUserLUISAccountsOptionalParams extends msRest.RequestOptionsBase { - /** - * The custom arm token header to use; containing the user's ARM token used to validate azure - * accounts information. - */ - armToken?: string; -} - -/** - * Defines values for TrainingStatus. - * Possible values include: 'NeedsTraining', 'InProgress', 'Trained' - * @readonly - * @enum {string} - */ -export type TrainingStatus = 'NeedsTraining' | 'InProgress' | 'Trained'; - -/** - * Defines values for OperationStatusType. - * Possible values include: 'Failed', 'FAILED', 'Success' - * @readonly - * @enum {string} - */ -export type OperationStatusType = 'Failed' | 'FAILED' | 'Success'; - -/** - * Defines values for ReadableType. - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - * @readonly - * @enum {string} - */ -export type ReadableType = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; - -/** - * Defines values for ReadableType1. - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - * @readonly - * @enum {string} - */ -export type ReadableType1 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; - -/** - * Defines values for ReadableType2. - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - * @readonly - * @enum {string} - */ -export type ReadableType2 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; - -/** - * Defines values for ReadableType3. - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - * @readonly - * @enum {string} - */ -export type ReadableType3 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; - -/** - * Defines values for ReadableType4. - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - * @readonly - * @enum {string} - */ -export type ReadableType4 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; - -/** - * Defines values for ReadableType5. - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - * @readonly - * @enum {string} - */ -export type ReadableType5 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; - -/** - * Defines values for ReadableType6. - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - * @readonly - * @enum {string} - */ -export type ReadableType6 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; - -/** - * Defines values for ReadableType7. - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - * @readonly - * @enum {string} - */ -export type ReadableType7 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; - -/** - * Defines values for ReadableType8. - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - * @readonly - * @enum {string} - */ -export type ReadableType8 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; - -/** - * Defines values for ReadableType9. - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - * @readonly - * @enum {string} - */ -export type ReadableType9 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; - -/** - * Defines values for Status. - * Possible values include: 'Queued', 'InProgress', 'UpToDate', 'Fail', 'Success' - * @readonly - * @enum {string} - */ -export type Status = 'Queued' | 'InProgress' | 'UpToDate' | 'Fail' | 'Success'; - -/** - * Defines values for Status1. - * Possible values include: 'Queued', 'InProgress', 'UpToDate', 'Fail', 'Success' - * @readonly - * @enum {string} - */ -export type Status1 = 'Queued' | 'InProgress' | 'UpToDate' | 'Fail' | 'Success'; - -/** - * Defines values for ReadableType10. - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - * @readonly - * @enum {string} - */ -export type ReadableType10 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; - -/** - * Defines values for ReadableType11. - * Possible values include: 'Entity Extractor', 'Child Entity Extractor', 'Hierarchical Entity - * Extractor', 'Hierarchical Child Entity Extractor', 'Composite Entity Extractor', 'List Entity - * Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', - * 'Closed List Entity Extractor', 'Regex Entity Extractor' - * @readonly - * @enum {string} - */ -export type ReadableType11 = 'Entity Extractor' | 'Child Entity Extractor' | 'Hierarchical Entity Extractor' | 'Hierarchical Child Entity Extractor' | 'Composite Entity Extractor' | 'List Entity Extractor' | 'Prebuilt Entity Extractor' | 'Intent Classifier' | 'Pattern.Any Entity Extractor' | 'Closed List Entity Extractor' | 'Regex Entity Extractor'; - -/** - * Contains response data for the addPhraseList operation. - */ -export type FeaturesAddPhraseListResponse = { - /** - * The parsed response body. - */ - body: number; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: number; - }; -}; - -/** - * Contains response data for the listPhraseLists operation. - */ -export type FeaturesListPhraseListsResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PhraseListFeatureInfo[]; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type FeaturesListResponse = FeaturesResponseObject & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: FeaturesResponseObject; - }; -}; - -/** - * Contains response data for the getPhraseList operation. - */ -export type FeaturesGetPhraseListResponse = PhraseListFeatureInfo & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PhraseListFeatureInfo; - }; -}; - -/** - * Contains response data for the updatePhraseList operation. - */ -export type FeaturesUpdatePhraseListResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deletePhraseList operation. - */ -export type FeaturesDeletePhraseListResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the addIntentFeature operation. - */ -export type FeaturesAddIntentFeatureResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the addEntityFeature operation. - */ -export type FeaturesAddEntityFeatureResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the add operation. - */ -export type ExamplesAddResponse = LabelExampleResponse & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: LabelExampleResponse; - }; -}; - -/** - * Contains response data for the batch operation. - */ -export type ExamplesBatchResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: BatchLabelExample[]; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type ExamplesListResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: LabeledUtterance[]; - }; -}; - -/** - * Contains response data for the deleteMethod operation. - */ -export type ExamplesDeleteMethodResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the addIntent operation. - */ -export type ModelAddIntentResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the listIntents operation. - */ -export type ModelListIntentsResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: IntentClassifier[]; - }; -}; - -/** - * Contains response data for the addEntity operation. - */ -export type ModelAddEntityResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the listEntities operation. - */ -export type ModelListEntitiesResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: NDepthEntityExtractor[]; - }; -}; - -/** - * Contains response data for the listHierarchicalEntities operation. - */ -export type ModelListHierarchicalEntitiesResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: HierarchicalEntityExtractor[]; - }; -}; - -/** - * Contains response data for the listCompositeEntities operation. - */ -export type ModelListCompositeEntitiesResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CompositeEntityExtractor[]; - }; -}; - -/** - * Contains response data for the listClosedLists operation. - */ -export type ModelListClosedListsResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ClosedListEntityExtractor[]; - }; -}; - -/** - * Contains response data for the addClosedList operation. - */ -export type ModelAddClosedListResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the addPrebuilt operation. - */ -export type ModelAddPrebuiltResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PrebuiltEntityExtractor[]; - }; -}; - -/** - * Contains response data for the listPrebuilts operation. - */ -export type ModelListPrebuiltsResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PrebuiltEntityExtractor[]; - }; -}; - -/** - * Contains response data for the listPrebuiltEntities operation. - */ -export type ModelListPrebuiltEntitiesResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: AvailablePrebuiltEntityModel[]; - }; -}; - -/** - * Contains response data for the listModels operation. - */ -export type ModelListModelsResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ModelInfoResponse[]; - }; -}; - -/** - * Contains response data for the examplesMethod operation. - */ -export type ModelExamplesMethodResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: LabelTextObject[]; - }; -}; - -/** - * Contains response data for the getIntent operation. - */ -export type ModelGetIntentResponse = IntentClassifier & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: IntentClassifier; - }; -}; - -/** - * Contains response data for the updateIntent operation. - */ -export type ModelUpdateIntentResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deleteIntent operation. - */ -export type ModelDeleteIntentResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the getEntity operation. - */ -export type ModelGetEntityResponse = NDepthEntityExtractor & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: NDepthEntityExtractor; - }; -}; - -/** - * Contains response data for the deleteEntity operation. - */ -export type ModelDeleteEntityResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the updateEntityChild operation. - */ -export type ModelUpdateEntityChildResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the getIntentFeatures operation. - */ -export type ModelGetIntentFeaturesResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ModelFeatureInformation[]; - }; -}; - -/** - * Contains response data for the replaceIntentFeatures operation. - */ -export type ModelReplaceIntentFeaturesResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deleteIntentFeature operation. - */ -export type ModelDeleteIntentFeatureResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the getEntityFeatures operation. - */ -export type ModelGetEntityFeaturesResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ModelFeatureInformation[]; - }; -}; - -/** - * Contains response data for the replaceEntityFeatures operation. - */ -export type ModelReplaceEntityFeaturesResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deleteEntityFeature operation. - */ -export type ModelDeleteEntityFeatureResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the getHierarchicalEntity operation. - */ -export type ModelGetHierarchicalEntityResponse = HierarchicalEntityExtractor & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: HierarchicalEntityExtractor; - }; -}; - -/** - * Contains response data for the updateHierarchicalEntity operation. - */ -export type ModelUpdateHierarchicalEntityResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deleteHierarchicalEntity operation. - */ -export type ModelDeleteHierarchicalEntityResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the getCompositeEntity operation. - */ -export type ModelGetCompositeEntityResponse = CompositeEntityExtractor & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CompositeEntityExtractor; - }; -}; - -/** - * Contains response data for the updateCompositeEntity operation. - */ -export type ModelUpdateCompositeEntityResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deleteCompositeEntity operation. - */ -export type ModelDeleteCompositeEntityResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the getClosedList operation. - */ -export type ModelGetClosedListResponse = ClosedListEntityExtractor & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ClosedListEntityExtractor; - }; -}; - -/** - * Contains response data for the updateClosedList operation. - */ -export type ModelUpdateClosedListResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the patchClosedList operation. - */ -export type ModelPatchClosedListResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deleteClosedList operation. - */ -export type ModelDeleteClosedListResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the getPrebuilt operation. - */ -export type ModelGetPrebuiltResponse = PrebuiltEntityExtractor & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PrebuiltEntityExtractor; - }; -}; - -/** - * Contains response data for the deletePrebuilt operation. - */ -export type ModelDeletePrebuiltResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deleteSubList operation. - */ -export type ModelDeleteSubListResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the updateSubList operation. - */ -export type ModelUpdateSubListResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the listIntentSuggestions operation. - */ -export type ModelListIntentSuggestionsResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: IntentsSuggestionExample[]; - }; -}; - -/** - * Contains response data for the listEntitySuggestions operation. - */ -export type ModelListEntitySuggestionsResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntitiesSuggestionExample[]; - }; -}; - -/** - * Contains response data for the addSubList operation. - */ -export type ModelAddSubListResponse = { - /** - * The parsed response body. - */ - body: number; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: number; - }; -}; - -/** - * Contains response data for the addCustomPrebuiltDomain operation. - */ -export type ModelAddCustomPrebuiltDomainResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string[]; - }; -}; - -/** - * Contains response data for the addCustomPrebuiltIntent operation. - */ -export type ModelAddCustomPrebuiltIntentResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the listCustomPrebuiltIntents operation. - */ -export type ModelListCustomPrebuiltIntentsResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: IntentClassifier[]; - }; -}; - -/** - * Contains response data for the addCustomPrebuiltEntity operation. - */ -export type ModelAddCustomPrebuiltEntityResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the listCustomPrebuiltEntities operation. - */ -export type ModelListCustomPrebuiltEntitiesResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityExtractor[]; - }; -}; - -/** - * Contains response data for the listCustomPrebuiltModels operation. - */ -export type ModelListCustomPrebuiltModelsResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CustomPrebuiltModel[]; - }; -}; - -/** - * Contains response data for the deleteCustomPrebuiltDomain operation. - */ -export type ModelDeleteCustomPrebuiltDomainResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the addEntityChild operation. - */ -export type ModelAddEntityChildResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the getHierarchicalEntityChild operation. - */ -export type ModelGetHierarchicalEntityChildResponse = HierarchicalChildEntity & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: HierarchicalChildEntity; - }; -}; - -/** - * Contains response data for the updateHierarchicalEntityChild operation. - */ -export type ModelUpdateHierarchicalEntityChildResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deleteHierarchicalEntityChild operation. - */ -export type ModelDeleteHierarchicalEntityChildResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the addCompositeEntityChild operation. - */ -export type ModelAddCompositeEntityChildResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the deleteCompositeEntityChild operation. - */ -export type ModelDeleteCompositeEntityChildResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the listRegexEntityInfos operation. - */ -export type ModelListRegexEntityInfosResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RegexEntityExtractor[]; - }; -}; - -/** - * Contains response data for the createRegexEntityModel operation. - */ -export type ModelCreateRegexEntityModelResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the listPatternAnyEntityInfos operation. - */ -export type ModelListPatternAnyEntityInfosResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PatternAnyEntityExtractor[]; - }; -}; - -/** - * Contains response data for the createPatternAnyEntityModel operation. - */ -export type ModelCreatePatternAnyEntityModelResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the listEntityRoles operation. - */ -export type ModelListEntityRolesResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole[]; - }; -}; - -/** - * Contains response data for the createEntityRole operation. - */ -export type ModelCreateEntityRoleResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the listPrebuiltEntityRoles operation. - */ -export type ModelListPrebuiltEntityRolesResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole[]; - }; -}; - -/** - * Contains response data for the createPrebuiltEntityRole operation. - */ -export type ModelCreatePrebuiltEntityRoleResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the listClosedListEntityRoles operation. - */ -export type ModelListClosedListEntityRolesResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole[]; - }; -}; - -/** - * Contains response data for the createClosedListEntityRole operation. - */ -export type ModelCreateClosedListEntityRoleResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the listRegexEntityRoles operation. - */ -export type ModelListRegexEntityRolesResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole[]; - }; -}; - -/** - * Contains response data for the createRegexEntityRole operation. - */ -export type ModelCreateRegexEntityRoleResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the listCompositeEntityRoles operation. - */ -export type ModelListCompositeEntityRolesResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole[]; - }; -}; - -/** - * Contains response data for the createCompositeEntityRole operation. - */ -export type ModelCreateCompositeEntityRoleResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the listPatternAnyEntityRoles operation. - */ -export type ModelListPatternAnyEntityRolesResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole[]; - }; -}; - -/** - * Contains response data for the createPatternAnyEntityRole operation. - */ -export type ModelCreatePatternAnyEntityRoleResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the listHierarchicalEntityRoles operation. - */ -export type ModelListHierarchicalEntityRolesResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole[]; - }; -}; - -/** - * Contains response data for the createHierarchicalEntityRole operation. - */ -export type ModelCreateHierarchicalEntityRoleResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the listCustomPrebuiltEntityRoles operation. - */ -export type ModelListCustomPrebuiltEntityRolesResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole[]; - }; -}; - -/** - * Contains response data for the createCustomPrebuiltEntityRole operation. - */ -export type ModelCreateCustomPrebuiltEntityRoleResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the getExplicitList operation. - */ -export type ModelGetExplicitListResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ExplicitListItem[]; - }; -}; - -/** - * Contains response data for the addExplicitListItem operation. - */ -export type ModelAddExplicitListItemResponse = { - /** - * The parsed response body. - */ - body: number; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: number; - }; -}; - -/** - * Contains response data for the getRegexEntityEntityInfo operation. - */ -export type ModelGetRegexEntityEntityInfoResponse = RegexEntityExtractor & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: RegexEntityExtractor; - }; -}; - -/** - * Contains response data for the updateRegexEntityModel operation. - */ -export type ModelUpdateRegexEntityModelResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deleteRegexEntityModel operation. - */ -export type ModelDeleteRegexEntityModelResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the getPatternAnyEntityInfo operation. - */ -export type ModelGetPatternAnyEntityInfoResponse = PatternAnyEntityExtractor & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PatternAnyEntityExtractor; - }; -}; - -/** - * Contains response data for the updatePatternAnyEntityModel operation. - */ -export type ModelUpdatePatternAnyEntityModelResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deletePatternAnyEntityModel operation. - */ -export type ModelDeletePatternAnyEntityModelResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the getEntityRole operation. - */ -export type ModelGetEntityRoleResponse = EntityRole & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole; - }; -}; - -/** - * Contains response data for the updateEntityRole operation. - */ -export type ModelUpdateEntityRoleResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deleteEntityRole operation. - */ -export type ModelDeleteEntityRoleResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the getPrebuiltEntityRole operation. - */ -export type ModelGetPrebuiltEntityRoleResponse = EntityRole & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole; - }; -}; - -/** - * Contains response data for the updatePrebuiltEntityRole operation. - */ -export type ModelUpdatePrebuiltEntityRoleResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deletePrebuiltEntityRole operation. - */ -export type ModelDeletePrebuiltEntityRoleResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the getClosedListEntityRole operation. - */ -export type ModelGetClosedListEntityRoleResponse = EntityRole & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole; - }; -}; - -/** - * Contains response data for the updateClosedListEntityRole operation. - */ -export type ModelUpdateClosedListEntityRoleResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deleteClosedListEntityRole operation. - */ -export type ModelDeleteClosedListEntityRoleResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the getRegexEntityRole operation. - */ -export type ModelGetRegexEntityRoleResponse = EntityRole & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole; - }; -}; - -/** - * Contains response data for the updateRegexEntityRole operation. - */ -export type ModelUpdateRegexEntityRoleResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deleteRegexEntityRole operation. - */ -export type ModelDeleteRegexEntityRoleResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the getCompositeEntityRole operation. - */ -export type ModelGetCompositeEntityRoleResponse = EntityRole & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole; - }; -}; - -/** - * Contains response data for the updateCompositeEntityRole operation. - */ -export type ModelUpdateCompositeEntityRoleResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deleteCompositeEntityRole operation. - */ -export type ModelDeleteCompositeEntityRoleResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the getPatternAnyEntityRole operation. - */ -export type ModelGetPatternAnyEntityRoleResponse = EntityRole & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole; - }; -}; - -/** - * Contains response data for the updatePatternAnyEntityRole operation. - */ -export type ModelUpdatePatternAnyEntityRoleResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deletePatternAnyEntityRole operation. - */ -export type ModelDeletePatternAnyEntityRoleResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the getHierarchicalEntityRole operation. - */ -export type ModelGetHierarchicalEntityRoleResponse = EntityRole & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole; - }; -}; - -/** - * Contains response data for the updateHierarchicalEntityRole operation. - */ -export type ModelUpdateHierarchicalEntityRoleResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deleteHierarchicalEntityRole operation. - */ -export type ModelDeleteHierarchicalEntityRoleResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the getCustomEntityRole operation. - */ -export type ModelGetCustomEntityRoleResponse = EntityRole & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EntityRole; - }; -}; - -/** - * Contains response data for the updateCustomPrebuiltEntityRole operation. - */ -export type ModelUpdateCustomPrebuiltEntityRoleResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deleteCustomEntityRole operation. - */ -export type ModelDeleteCustomEntityRoleResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the getExplicitListItem operation. - */ -export type ModelGetExplicitListItemResponse = ExplicitListItem & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ExplicitListItem; - }; -}; - -/** - * Contains response data for the updateExplicitListItem operation. - */ -export type ModelUpdateExplicitListItemResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deleteExplicitListItem operation. - */ -export type ModelDeleteExplicitListItemResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the add operation. - */ -export type AppsAddResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type AppsListResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInfoResponse[]; - }; -}; - -/** - * Contains response data for the importMethod operation. - */ -export type AppsImportMethodResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the listCortanaEndpoints operation. - */ -export type AppsListCortanaEndpointsResponse = PersonalAssistantsResponse & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PersonalAssistantsResponse; - }; -}; - -/** - * Contains response data for the listDomains operation. - */ -export type AppsListDomainsResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string[]; - }; -}; - -/** - * Contains response data for the listUsageScenarios operation. - */ -export type AppsListUsageScenariosResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string[]; - }; -}; - -/** - * Contains response data for the listSupportedCultures operation. - */ -export type AppsListSupportedCulturesResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: AvailableCulture[]; - }; -}; - -/** - * Contains response data for the downloadQueryLogs operation. - */ -export type AppsDownloadQueryLogsResponse = { - /** - * BROWSER ONLY - * - * The response body as a browser Blob. - * Always undefined in node.js. - */ - blobBody?: Promise; - - /** - * NODEJS ONLY - * - * The response body as a node.js Readable stream. - * Always undefined in the browser. - */ - readableStreamBody?: NodeJS.ReadableStream; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse; -}; - -/** - * Contains response data for the get operation. - */ -export type AppsGetResponse = ApplicationInfoResponse & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInfoResponse; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type AppsUpdateResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deleteMethod operation. - */ -export type AppsDeleteMethodResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the publish operation. - */ -export type AppsPublishResponse = ProductionOrStagingEndpointInfo & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ProductionOrStagingEndpointInfo; - }; -}; - -/** - * Contains response data for the getSettings operation. - */ -export type AppsGetSettingsResponse = ApplicationSettings & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationSettings; - }; -}; - -/** - * Contains response data for the updateSettings operation. - */ -export type AppsUpdateSettingsResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the getPublishSettings operation. - */ -export type AppsGetPublishSettingsResponse = PublishSettings & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PublishSettings; - }; -}; - -/** - * Contains response data for the updatePublishSettings operation. - */ -export type AppsUpdatePublishSettingsResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the listEndpoints operation. - */ -export type AppsListEndpointsResponse = { - /** - * The response body properties. - */ - [propertyName: string]: string; -} & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: { [propertyName: string]: string }; - }; -}; - -/** - * Contains response data for the listAvailableCustomPrebuiltDomains operation. - */ -export type AppsListAvailableCustomPrebuiltDomainsResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PrebuiltDomain[]; - }; -}; - -/** - * Contains response data for the addCustomPrebuiltDomain operation. - */ -export type AppsAddCustomPrebuiltDomainResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the listAvailableCustomPrebuiltDomainsForCulture operation. - */ -export type AppsListAvailableCustomPrebuiltDomainsForCultureResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PrebuiltDomain[]; - }; -}; - -/** - * Contains response data for the packagePublishedApplicationAsGzip operation. - */ -export type AppsPackagePublishedApplicationAsGzipResponse = { - /** - * BROWSER ONLY - * - * The response body as a browser Blob. - * Always undefined in node.js. - */ - blobBody?: Promise; - - /** - * NODEJS ONLY - * - * The response body as a node.js Readable stream. - * Always undefined in the browser. - */ - readableStreamBody?: NodeJS.ReadableStream; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse; -}; - -/** - * Contains response data for the packageTrainedApplicationAsGzip operation. - */ -export type AppsPackageTrainedApplicationAsGzipResponse = { - /** - * BROWSER ONLY - * - * The response body as a browser Blob. - * Always undefined in node.js. - */ - blobBody?: Promise; - - /** - * NODEJS ONLY - * - * The response body as a node.js Readable stream. - * Always undefined in the browser. - */ - readableStreamBody?: NodeJS.ReadableStream; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse; -}; - -/** - * Contains response data for the importV2App operation. - */ -export type AppsImportV2AppResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the importLuFormat operation. - */ -export type AppsImportLuFormatResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the clone operation. - */ -export type VersionsCloneResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type VersionsListResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: VersionInfo[]; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type VersionsGetResponse = VersionInfo & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: VersionInfo; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type VersionsUpdateResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the deleteMethod operation. - */ -export type VersionsDeleteMethodResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the exportMethod operation. - */ -export type VersionsExportMethodResponse = LuisApp & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: LuisApp; - }; -}; - -/** - * Contains response data for the importMethod operation. - */ -export type VersionsImportMethodResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the deleteUnlabelledUtterance operation. - */ -export type VersionsDeleteUnlabelledUtteranceResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the importV2App operation. - */ -export type VersionsImportV2AppResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the importLuFormat operation. - */ -export type VersionsImportLuFormatResponse = { - /** - * The parsed response body. - */ - body: string; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: string; - }; -}; - -/** - * Contains response data for the exportLuFormat operation. - */ -export type VersionsExportLuFormatResponse = { - /** - * BROWSER ONLY - * - * The response body as a browser Blob. - * Always undefined in node.js. - */ - blobBody?: Promise; - - /** - * NODEJS ONLY - * - * The response body as a node.js Readable stream. - * Always undefined in the browser. - */ - readableStreamBody?: NodeJS.ReadableStream; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse; -}; - -/** - * Contains response data for the trainVersion operation. - */ -export type TrainTrainVersionResponse = EnqueueTrainingResponse & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EnqueueTrainingResponse; - }; -}; - -/** - * Contains response data for the getStatus operation. - */ -export type TrainGetStatusResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ModelTrainingInfo[]; - }; -}; - -/** - * Contains response data for the addPattern operation. - */ -export type PatternAddPatternResponse = PatternRuleInfo & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PatternRuleInfo; - }; -}; - -/** - * Contains response data for the listPatterns operation. - */ -export type PatternListPatternsResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PatternRuleInfo[]; - }; -}; - -/** - * Contains response data for the updatePatterns operation. - */ -export type PatternUpdatePatternsResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PatternRuleInfo[]; - }; -}; - -/** - * Contains response data for the batchAddPatterns operation. - */ -export type PatternBatchAddPatternsResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PatternRuleInfo[]; - }; -}; - -/** - * Contains response data for the deletePatterns operation. - */ -export type PatternDeletePatternsResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the updatePattern operation. - */ -export type PatternUpdatePatternResponse = PatternRuleInfo & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PatternRuleInfo; - }; -}; - -/** - * Contains response data for the deletePattern operation. - */ -export type PatternDeletePatternResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the listIntentPatterns operation. - */ -export type PatternListIntentPatternsResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PatternRuleInfo[]; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type SettingsListResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: AppVersionSettingObject[]; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type SettingsUpdateResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the assignToApp operation. - */ -export type AzureAccountsAssignToAppResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the getAssigned operation. - */ -export type AzureAccountsGetAssignedResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: AzureAccountInfoObject[]; - }; -}; - -/** - * Contains response data for the removeFromApp operation. - */ -export type AzureAccountsRemoveFromAppResponse = OperationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationStatus; - }; -}; - -/** - * Contains response data for the listUserLUISAccounts operation. - */ -export type AzureAccountsListUserLUISAccountsResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: AzureAccountInfoObject[]; - }; -}; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/mappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/mappers.ts deleted file mode 100644 index eed8c3c2ea32..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/mappers.ts +++ /dev/null @@ -1,3926 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; - - -export const EntityLabelObject: msRest.CompositeMapper = { - serializedName: "EntityLabelObject", - type: { - name: "Composite", - className: "EntityLabelObject", - modelProperties: { - entityName: { - required: true, - serializedName: "entityName", - type: { - name: "String" - } - }, - startCharIndex: { - required: true, - serializedName: "startCharIndex", - type: { - name: "Number" - } - }, - endCharIndex: { - required: true, - serializedName: "endCharIndex", - type: { - name: "Number" - } - }, - role: { - serializedName: "role", - type: { - name: "String" - } - }, - children: { - serializedName: "children", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityLabelObject" - } - } - } - } - } - } -}; - -export const ApplicationCreateObject: msRest.CompositeMapper = { - serializedName: "ApplicationCreateObject", - type: { - name: "Composite", - className: "ApplicationCreateObject", - modelProperties: { - culture: { - required: true, - serializedName: "culture", - type: { - name: "String" - } - }, - domain: { - serializedName: "domain", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - type: { - name: "String" - } - }, - initialVersionId: { - serializedName: "initialVersionId", - type: { - name: "String" - } - }, - usageScenario: { - serializedName: "usageScenario", - type: { - name: "String" - } - }, - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const PrebuiltDomainCreateBaseObject: msRest.CompositeMapper = { - serializedName: "PrebuiltDomainCreateBaseObject", - type: { - name: "Composite", - className: "PrebuiltDomainCreateBaseObject", - modelProperties: { - domainName: { - serializedName: "domainName", - type: { - name: "String" - } - } - } - } -}; - -export const PrebuiltDomainCreateObject: msRest.CompositeMapper = { - serializedName: "PrebuiltDomainCreateObject", - type: { - name: "Composite", - className: "PrebuiltDomainCreateObject", - modelProperties: { - domainName: { - serializedName: "domainName", - type: { - name: "String" - } - }, - culture: { - serializedName: "culture", - type: { - name: "String" - } - } - } - } -}; - -export const PrebuiltDomainModelCreateObject: msRest.CompositeMapper = { - serializedName: "PrebuiltDomainModelCreateObject", - type: { - name: "Composite", - className: "PrebuiltDomainModelCreateObject", - modelProperties: { - domainName: { - serializedName: "domainName", - type: { - name: "String" - } - }, - modelName: { - serializedName: "modelName", - type: { - name: "String" - } - } - } - } -}; - -export const CompositeEntityModel: msRest.CompositeMapper = { - serializedName: "CompositeEntityModel", - type: { - name: "Composite", - className: "CompositeEntityModel", - modelProperties: { - children: { - serializedName: "children", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const ChildEntityModelCreateObject: msRest.CompositeMapper = { - serializedName: "ChildEntityModelCreateObject", - type: { - name: "Composite", - className: "ChildEntityModelCreateObject", - modelProperties: { - children: { - serializedName: "children", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ChildEntityModelCreateObject" - } - } - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - instanceOf: { - serializedName: "instanceOf", - type: { - name: "String" - } - } - } - } -}; - -export const EntityModelCreateObject: msRest.CompositeMapper = { - serializedName: "EntityModelCreateObject", - type: { - name: "Composite", - className: "EntityModelCreateObject", - modelProperties: { - children: { - serializedName: "children", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ChildEntityModelCreateObject" - } - } - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const EntityModelUpdateObject: msRest.CompositeMapper = { - serializedName: "EntityModelUpdateObject", - type: { - name: "Composite", - className: "EntityModelUpdateObject", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - instanceOf: { - serializedName: "instanceOf", - type: { - name: "String" - } - } - } - } -}; - -export const JSONEntity: msRest.CompositeMapper = { - serializedName: "JSONEntity", - type: { - name: "Composite", - className: "JSONEntity", - modelProperties: { - startPos: { - required: true, - serializedName: "startPos", - type: { - name: "Number" - } - }, - endPos: { - required: true, - serializedName: "endPos", - type: { - name: "Number" - } - }, - entity: { - required: true, - serializedName: "entity", - type: { - name: "String" - } - }, - role: { - serializedName: "role", - type: { - name: "String" - } - }, - children: { - serializedName: "children", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JSONEntity" - } - } - } - } - } - } -}; - -export const ApplicationSettingUpdateObject: msRest.CompositeMapper = { - serializedName: "ApplicationSettingUpdateObject", - type: { - name: "Composite", - className: "ApplicationSettingUpdateObject", - modelProperties: { - isPublic: { - nullable: false, - serializedName: "public", - type: { - name: "Boolean" - } - } - } - } -}; - -export const PublishSettingUpdateObject: msRest.CompositeMapper = { - serializedName: "PublishSettingUpdateObject", - type: { - name: "Composite", - className: "PublishSettingUpdateObject", - modelProperties: { - sentimentAnalysis: { - nullable: false, - serializedName: "sentimentAnalysis", - type: { - name: "Boolean" - } - }, - speech: { - nullable: false, - serializedName: "speech", - type: { - name: "Boolean" - } - }, - spellChecker: { - nullable: false, - serializedName: "spellChecker", - type: { - name: "Boolean" - } - } - } - } -}; - -export const ExampleLabelObject: msRest.CompositeMapper = { - serializedName: "ExampleLabelObject", - type: { - name: "Composite", - className: "ExampleLabelObject", - modelProperties: { - text: { - serializedName: "text", - type: { - name: "String" - } - }, - entityLabels: { - serializedName: "entityLabels", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityLabelObject" - } - } - } - }, - intentName: { - serializedName: "intentName", - type: { - name: "String" - } - } - } - } -}; - -export const PhraselistCreateObject: msRest.CompositeMapper = { - serializedName: "PhraselistCreateObject", - type: { - name: "Composite", - className: "PhraselistCreateObject", - modelProperties: { - phrases: { - serializedName: "phrases", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - isExchangeable: { - serializedName: "isExchangeable", - defaultValue: true, - type: { - name: "Boolean" - } - }, - enabledForAllModels: { - serializedName: "enabledForAllModels", - defaultValue: true, - type: { - name: "Boolean" - } - } - } - } -}; - -export const SubClosedList: msRest.CompositeMapper = { - serializedName: "SubClosedList", - type: { - name: "Composite", - className: "SubClosedList", - modelProperties: { - canonicalForm: { - serializedName: "canonicalForm", - type: { - name: "String" - } - }, - list: { - serializedName: "list", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const SubClosedListResponse: msRest.CompositeMapper = { - serializedName: "SubClosedListResponse", - type: { - name: "Composite", - className: "SubClosedListResponse", - modelProperties: { - ...SubClosedList.type.modelProperties, - id: { - nullable: false, - serializedName: "id", - type: { - name: "Number" - } - } - } - } -}; - -export const ApplicationUpdateObject: msRest.CompositeMapper = { - serializedName: "ApplicationUpdateObject", - type: { - name: "Composite", - className: "ApplicationUpdateObject", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - type: { - name: "String" - } - } - } - } -}; - -export const JSONRegexFeature: msRest.CompositeMapper = { - serializedName: "JSONRegexFeature", - type: { - name: "Composite", - className: "JSONRegexFeature", - modelProperties: { - pattern: { - serializedName: "pattern", - type: { - name: "String" - } - }, - activated: { - serializedName: "activated", - type: { - name: "Boolean" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const ClosedList: msRest.CompositeMapper = { - serializedName: "ClosedList", - type: { - name: "Composite", - className: "ClosedList", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - subLists: { - serializedName: "subLists", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubClosedList" - } - } - } - }, - roles: { - serializedName: "roles", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const WordListObject: msRest.CompositeMapper = { - serializedName: "WordListObject", - type: { - name: "Composite", - className: "WordListObject", - modelProperties: { - canonicalForm: { - serializedName: "canonicalForm", - type: { - name: "String" - } - }, - list: { - serializedName: "list", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const ClosedListModelPatchObject: msRest.CompositeMapper = { - serializedName: "ClosedListModelPatchObject", - type: { - name: "Composite", - className: "ClosedListModelPatchObject", - modelProperties: { - subLists: { - serializedName: "subLists", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WordListObject" - } - } - } - } - } - } -}; - -export const JSONModelFeature: msRest.CompositeMapper = { - serializedName: "JSONModelFeature", - type: { - name: "Composite", - className: "JSONModelFeature", - modelProperties: { - activated: { - serializedName: "activated", - type: { - name: "Boolean" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - words: { - serializedName: "words", - type: { - name: "String" - } - }, - mode: { - serializedName: "mode", - type: { - name: "Boolean" - } - }, - enabledForAllModels: { - serializedName: "enabledForAllModels", - defaultValue: true, - type: { - name: "Boolean" - } - } - } - } -}; - -export const ModelCreateObject: msRest.CompositeMapper = { - serializedName: "ModelCreateObject", - type: { - name: "Composite", - className: "ModelCreateObject", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const WordListBaseUpdateObject: msRest.CompositeMapper = { - serializedName: "WordListBaseUpdateObject", - type: { - name: "Composite", - className: "WordListBaseUpdateObject", - modelProperties: { - canonicalForm: { - serializedName: "canonicalForm", - type: { - name: "String" - } - }, - list: { - serializedName: "list", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const JSONUtterance: msRest.CompositeMapper = { - serializedName: "JSONUtterance", - type: { - name: "Composite", - className: "JSONUtterance", - modelProperties: { - text: { - serializedName: "text", - type: { - name: "String" - } - }, - intent: { - serializedName: "intent", - type: { - name: "String" - } - }, - entities: { - serializedName: "entities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JSONEntity" - } - } - } - } - } - } -}; - -export const ModelUpdateObject: msRest.CompositeMapper = { - serializedName: "ModelUpdateObject", - type: { - name: "Composite", - className: "ModelUpdateObject", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const ClosedListModelUpdateObject: msRest.CompositeMapper = { - serializedName: "ClosedListModelUpdateObject", - type: { - name: "Composite", - className: "ClosedListModelUpdateObject", - modelProperties: { - subLists: { - serializedName: "subLists", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WordListObject" - } - } - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const ClosedListModelCreateObject: msRest.CompositeMapper = { - serializedName: "ClosedListModelCreateObject", - type: { - name: "Composite", - className: "ClosedListModelCreateObject", - modelProperties: { - subLists: { - serializedName: "subLists", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WordListObject" - } - } - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const VersionInfo: msRest.CompositeMapper = { - serializedName: "VersionInfo", - type: { - name: "Composite", - className: "VersionInfo", - modelProperties: { - version: { - required: true, - serializedName: "version", - type: { - name: "String" - } - }, - createdDateTime: { - serializedName: "createdDateTime", - type: { - name: "DateTime" - } - }, - lastModifiedDateTime: { - serializedName: "lastModifiedDateTime", - type: { - name: "DateTime" - } - }, - lastTrainedDateTime: { - serializedName: "lastTrainedDateTime", - type: { - name: "DateTime" - } - }, - lastPublishedDateTime: { - serializedName: "lastPublishedDateTime", - type: { - name: "DateTime" - } - }, - endpointUrl: { - serializedName: "endpointUrl", - type: { - name: "String" - } - }, - assignedEndpointKey: { - serializedName: "assignedEndpointKey", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - externalApiKeys: { - serializedName: "externalApiKeys", - type: { - name: "Object" - } - }, - intentsCount: { - serializedName: "intentsCount", - type: { - name: "Number" - } - }, - entitiesCount: { - serializedName: "entitiesCount", - type: { - name: "Number" - } - }, - endpointHitsCount: { - serializedName: "endpointHitsCount", - type: { - name: "Number" - } - }, - trainingStatus: { - required: true, - serializedName: "trainingStatus", - type: { - name: "Enum", - allowedValues: [ - "NeedsTraining", - "InProgress", - "Trained" - ] - } - } - } - } -}; - -export const TaskUpdateObject: msRest.CompositeMapper = { - serializedName: "TaskUpdateObject", - type: { - name: "Composite", - className: "TaskUpdateObject", - modelProperties: { - version: { - serializedName: "version", - type: { - name: "String" - } - } - } - } -}; - -export const PhraselistUpdateObject: msRest.CompositeMapper = { - serializedName: "PhraselistUpdateObject", - type: { - name: "Composite", - className: "PhraselistUpdateObject", - modelProperties: { - phrases: { - serializedName: "phrases", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - isActive: { - serializedName: "isActive", - defaultValue: true, - type: { - name: "Boolean" - } - }, - isExchangeable: { - serializedName: "isExchangeable", - defaultValue: true, - type: { - name: "Boolean" - } - }, - enabledForAllModels: { - serializedName: "enabledForAllModels", - defaultValue: true, - type: { - name: "Boolean" - } - } - } - } -}; - -export const PrebuiltDomainObject: msRest.CompositeMapper = { - serializedName: "PrebuiltDomainObject", - type: { - name: "Composite", - className: "PrebuiltDomainObject", - modelProperties: { - domainName: { - serializedName: "domain_name", - type: { - name: "String" - } - }, - modelName: { - serializedName: "model_name", - type: { - name: "String" - } - } - } - } -}; - -export const JsonModelFeatureInformation: msRest.CompositeMapper = { - serializedName: "JsonModelFeatureInformation", - type: { - name: "Composite", - className: "JsonModelFeatureInformation", - modelProperties: { - modelName: { - serializedName: "modelName", - type: { - name: "String" - } - }, - featureName: { - serializedName: "featureName", - type: { - name: "String" - } - } - } - } -}; - -export const JsonChild: msRest.CompositeMapper = { - serializedName: "JsonChild", - type: { - name: "Composite", - className: "JsonChild", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - instanceOf: { - serializedName: "instanceOf", - type: { - name: "String" - } - }, - children: { - serializedName: "children", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JsonChild" - } - } - } - }, - features: { - serializedName: "features", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JsonModelFeatureInformation" - } - } - } - } - } - } -}; - -export const HierarchicalModel: msRest.CompositeMapper = { - serializedName: "HierarchicalModel", - type: { - name: "Composite", - className: "HierarchicalModel", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - children: { - serializedName: "children", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JsonChild" - } - } - } - }, - features: { - serializedName: "features", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JsonModelFeatureInformation" - } - } - } - }, - roles: { - serializedName: "roles", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - inherits: { - serializedName: "inherits", - type: { - name: "Composite", - className: "PrebuiltDomainObject" - } - } - } - } -}; - -export const HierarchicalModelV2: msRest.CompositeMapper = { - serializedName: "HierarchicalModelV2", - type: { - name: "Composite", - className: "HierarchicalModelV2", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - children: { - serializedName: "children", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - inherits: { - serializedName: "inherits", - type: { - name: "Composite", - className: "PrebuiltDomainObject" - } - }, - roles: { - serializedName: "roles", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const ApplicationPublishObject: msRest.CompositeMapper = { - serializedName: "ApplicationPublishObject", - type: { - name: "Composite", - className: "ApplicationPublishObject", - modelProperties: { - versionId: { - serializedName: "versionId", - type: { - name: "String" - } - }, - isStaging: { - serializedName: "isStaging", - defaultValue: false, - type: { - name: "Boolean" - } - } - } - } -}; - -export const PatternAny: msRest.CompositeMapper = { - serializedName: "PatternAny", - type: { - name: "Composite", - className: "PatternAny", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - explicitList: { - serializedName: "explicitList", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - roles: { - serializedName: "roles", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const RegexEntity: msRest.CompositeMapper = { - serializedName: "RegexEntity", - type: { - name: "Composite", - className: "RegexEntity", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - regexPattern: { - serializedName: "regexPattern", - type: { - name: "String" - } - }, - roles: { - serializedName: "roles", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const PrebuiltEntity: msRest.CompositeMapper = { - serializedName: "PrebuiltEntity", - type: { - name: "Composite", - className: "PrebuiltEntity", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - roles: { - serializedName: "roles", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const PatternRule: msRest.CompositeMapper = { - serializedName: "PatternRule", - type: { - name: "Composite", - className: "PatternRule", - modelProperties: { - pattern: { - serializedName: "pattern", - type: { - name: "String" - } - }, - intent: { - serializedName: "intent", - type: { - name: "String" - } - } - } - } -}; - -export const LuisAppV2: msRest.CompositeMapper = { - serializedName: "LuisAppV2", - type: { - name: "Composite", - className: "LuisAppV2", - modelProperties: { - luisSchemaVersion: { - serializedName: "luis_schema_version", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - versionId: { - serializedName: "versionId", - type: { - name: "String" - } - }, - desc: { - serializedName: "desc", - type: { - name: "String" - } - }, - culture: { - serializedName: "culture", - type: { - name: "String" - } - }, - intents: { - serializedName: "intents", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HierarchicalModelV2" - } - } - } - }, - entities: { - serializedName: "entities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HierarchicalModelV2" - } - } - } - }, - closedLists: { - serializedName: "closedLists", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClosedList" - } - } - } - }, - composites: { - serializedName: "composites", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HierarchicalModelV2" - } - } - } - }, - patternAnyEntities: { - serializedName: "patternAnyEntities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PatternAny" - } - } - } - }, - regexEntities: { - serializedName: "regex_entities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RegexEntity" - } - } - } - }, - prebuiltEntities: { - serializedName: "prebuiltEntities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrebuiltEntity" - } - } - } - }, - regexFeatures: { - serializedName: "regex_features", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JSONRegexFeature" - } - } - } - }, - modelFeatures: { - serializedName: "model_features", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JSONModelFeature" - } - } - } - }, - patterns: { - serializedName: "patterns", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PatternRule" - } - } - } - }, - utterances: { - serializedName: "utterances", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JSONUtterance" - } - } - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const LuisApp: msRest.CompositeMapper = { - serializedName: "LuisApp", - type: { - name: "Composite", - className: "LuisApp", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - versionId: { - serializedName: "versionId", - type: { - name: "String" - } - }, - desc: { - serializedName: "desc", - type: { - name: "String" - } - }, - culture: { - serializedName: "culture", - type: { - name: "String" - } - }, - intents: { - serializedName: "intents", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HierarchicalModel" - } - } - } - }, - entities: { - serializedName: "entities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HierarchicalModel" - } - } - } - }, - closedLists: { - serializedName: "closedLists", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClosedList" - } - } - } - }, - composites: { - serializedName: "composites", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HierarchicalModel" - } - } - } - }, - hierarchicals: { - serializedName: "hierarchicals", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HierarchicalModel" - } - } - } - }, - patternAnyEntities: { - serializedName: "patternAnyEntities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PatternAny" - } - } - } - }, - regexEntities: { - serializedName: "regex_entities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RegexEntity" - } - } - } - }, - prebuiltEntities: { - serializedName: "prebuiltEntities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrebuiltEntity" - } - } - } - }, - regexFeatures: { - serializedName: "regex_features", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JSONRegexFeature" - } - } - } - }, - phraselists: { - serializedName: "phraselists", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JSONModelFeature" - } - } - } - }, - patterns: { - serializedName: "patterns", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PatternRule" - } - } - } - }, - utterances: { - serializedName: "utterances", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JSONUtterance" - } - } - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const EntityLabel: msRest.CompositeMapper = { - serializedName: "EntityLabel", - type: { - name: "Composite", - className: "EntityLabel", - modelProperties: { - entityName: { - required: true, - serializedName: "entityName", - type: { - name: "String" - } - }, - startTokenIndex: { - required: true, - serializedName: "startTokenIndex", - type: { - name: "Number" - } - }, - endTokenIndex: { - required: true, - serializedName: "endTokenIndex", - type: { - name: "Number" - } - }, - role: { - serializedName: "role", - type: { - name: "String" - } - }, - roleId: { - serializedName: "roleId", - type: { - name: "Uuid" - } - }, - children: { - serializedName: "children", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityLabel" - } - } - } - } - } - } -}; - -export const IntentPrediction: msRest.CompositeMapper = { - serializedName: "IntentPrediction", - type: { - name: "Composite", - className: "IntentPrediction", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - score: { - serializedName: "score", - type: { - name: "Number" - } - } - } - } -}; - -export const EntityPrediction: msRest.CompositeMapper = { - serializedName: "EntityPrediction", - type: { - name: "Composite", - className: "EntityPrediction", - modelProperties: { - entityName: { - required: true, - serializedName: "entityName", - type: { - name: "String" - } - }, - startTokenIndex: { - required: true, - serializedName: "startTokenIndex", - type: { - name: "Number" - } - }, - endTokenIndex: { - required: true, - serializedName: "endTokenIndex", - type: { - name: "Number" - } - }, - phrase: { - required: true, - serializedName: "phrase", - type: { - name: "String" - } - }, - children: { - serializedName: "children", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityPrediction" - } - } - } - } - } - } -}; - -export const LabeledUtterance: msRest.CompositeMapper = { - serializedName: "LabeledUtterance", - type: { - name: "Composite", - className: "LabeledUtterance", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "Number" - } - }, - text: { - serializedName: "text", - type: { - name: "String" - } - }, - tokenizedText: { - serializedName: "tokenizedText", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - intentLabel: { - serializedName: "intentLabel", - type: { - name: "String" - } - }, - entityLabels: { - serializedName: "entityLabels", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityLabel" - } - } - } - }, - intentPredictions: { - serializedName: "intentPredictions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IntentPrediction" - } - } - } - }, - entityPredictions: { - serializedName: "entityPredictions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityPrediction" - } - } - } - } - } - } -}; - -export const IntentsSuggestionExample: msRest.CompositeMapper = { - serializedName: "IntentsSuggestionExample", - type: { - name: "Composite", - className: "IntentsSuggestionExample", - modelProperties: { - text: { - serializedName: "text", - type: { - name: "String" - } - }, - tokenizedText: { - serializedName: "tokenizedText", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - intentPredictions: { - serializedName: "intentPredictions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IntentPrediction" - } - } - } - }, - entityPredictions: { - serializedName: "entityPredictions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityPrediction" - } - } - } - } - } - } -}; - -export const EntitiesSuggestionExample: msRest.CompositeMapper = { - serializedName: "EntitiesSuggestionExample", - type: { - name: "Composite", - className: "EntitiesSuggestionExample", - modelProperties: { - text: { - serializedName: "text", - type: { - name: "String" - } - }, - tokenizedText: { - serializedName: "tokenizedText", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - intentPredictions: { - serializedName: "intentPredictions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IntentPrediction" - } - } - } - }, - entityPredictions: { - serializedName: "entityPredictions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityPrediction" - } - } - } - } - } - } -}; - -export const PersonalAssistantsResponse: msRest.CompositeMapper = { - serializedName: "PersonalAssistantsResponse", - type: { - name: "Composite", - className: "PersonalAssistantsResponse", - modelProperties: { - endpointKeys: { - serializedName: "endpointKeys", - type: { - name: "Sequence", - element: { - type: { - name: "Uuid" - } - } - } - }, - endpointUrls: { - serializedName: "endpointUrls", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const ModelInfo: msRest.CompositeMapper = { - serializedName: "ModelInfo", - type: { - name: "Composite", - className: "ModelInfo", - modelProperties: { - id: { - required: true, - serializedName: "id", - type: { - name: "Uuid" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - typeId: { - serializedName: "typeId", - type: { - name: "Number" - } - }, - readableType: { - required: true, - serializedName: "readableType", - type: { - name: "String" - } - } - } - } -}; - -export const EntityRole: msRest.CompositeMapper = { - serializedName: "EntityRole", - type: { - name: "Composite", - className: "EntityRole", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "Uuid" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const ChildEntity: msRest.CompositeMapper = { - serializedName: "ChildEntity", - type: { - name: "Composite", - className: "ChildEntity", - modelProperties: { - id: { - required: true, - serializedName: "id", - type: { - name: "Uuid" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - instanceOf: { - serializedName: "instanceOf", - type: { - name: "String" - } - }, - typeId: { - serializedName: "typeId", - type: { - name: "Number" - } - }, - readableType: { - serializedName: "readableType", - type: { - name: "String" - } - }, - children: { - serializedName: "children", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ChildEntity" - } - } - } - } - } - } -}; - -export const ExplicitListItem: msRest.CompositeMapper = { - serializedName: "ExplicitListItem", - type: { - name: "Composite", - className: "ExplicitListItem", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "Number" - } - }, - explicitListItem: { - serializedName: "explicitListItem", - type: { - name: "String" - } - } - } - } -}; - -export const ModelInfoResponse: msRest.CompositeMapper = { - serializedName: "ModelInfoResponse", - type: { - name: "Composite", - className: "ModelInfoResponse", - modelProperties: { - id: { - required: true, - serializedName: "id", - type: { - name: "Uuid" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - typeId: { - serializedName: "typeId", - type: { - name: "Number" - } - }, - readableType: { - required: true, - serializedName: "readableType", - type: { - name: "String" - } - }, - roles: { - serializedName: "roles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityRole" - } - } - } - }, - children: { - serializedName: "children", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ChildEntity" - } - } - } - }, - subLists: { - serializedName: "subLists", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubClosedListResponse" - } - } - } - }, - customPrebuiltDomainName: { - serializedName: "customPrebuiltDomainName", - type: { - name: "String" - } - }, - customPrebuiltModelName: { - serializedName: "customPrebuiltModelName", - type: { - name: "String" - } - }, - regexPattern: { - serializedName: "regexPattern", - type: { - name: "String" - } - }, - explicitList: { - serializedName: "explicitList", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExplicitListItem" - } - } - } - } - } - } -}; - -export const EntityModelInfo: msRest.CompositeMapper = { - serializedName: "EntityModelInfo", - type: { - name: "Composite", - className: "EntityModelInfo", - modelProperties: { - ...ModelInfo.type.modelProperties, - roles: { - serializedName: "roles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityRole" - } - } - } - } - } - } -}; - -export const HierarchicalEntityExtractor: msRest.CompositeMapper = { - serializedName: "Hierarchical Entity Extractor", - type: { - name: "Composite", - className: "HierarchicalEntityExtractor", - modelProperties: { - id: { - required: true, - serializedName: "id", - type: { - name: "Uuid" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - typeId: { - serializedName: "typeId", - type: { - name: "Number" - } - }, - readableType: { - required: true, - serializedName: "readableType", - type: { - name: "String" - } - }, - roles: { - serializedName: "roles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityRole" - } - } - } - }, - children: { - serializedName: "children", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ChildEntity" - } - } - } - } - } - } -}; - -export const CompositeEntityExtractor: msRest.CompositeMapper = { - serializedName: "Composite Entity Extractor", - type: { - name: "Composite", - className: "CompositeEntityExtractor", - modelProperties: { - id: { - required: true, - serializedName: "id", - type: { - name: "Uuid" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - typeId: { - serializedName: "typeId", - type: { - name: "Number" - } - }, - readableType: { - required: true, - serializedName: "readableType", - type: { - name: "String" - } - }, - roles: { - serializedName: "roles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityRole" - } - } - } - }, - children: { - serializedName: "children", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ChildEntity" - } - } - } - } - } - } -}; - -export const ClosedListEntityExtractor: msRest.CompositeMapper = { - serializedName: "List Entity Extractor", - type: { - name: "Composite", - className: "ClosedListEntityExtractor", - modelProperties: { - id: { - required: true, - serializedName: "id", - type: { - name: "Uuid" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - typeId: { - serializedName: "typeId", - type: { - name: "Number" - } - }, - readableType: { - required: true, - serializedName: "readableType", - type: { - name: "String" - } - }, - roles: { - serializedName: "roles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityRole" - } - } - } - }, - subLists: { - serializedName: "subLists", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubClosedListResponse" - } - } - } - } - } - } -}; - -export const PrebuiltEntityExtractor: msRest.CompositeMapper = { - serializedName: "Prebuilt Entity Extractor", - type: { - name: "Composite", - className: "PrebuiltEntityExtractor", - modelProperties: { - id: { - required: true, - serializedName: "id", - type: { - name: "Uuid" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - typeId: { - serializedName: "typeId", - type: { - name: "Number" - } - }, - readableType: { - required: true, - serializedName: "readableType", - type: { - name: "String" - } - }, - roles: { - serializedName: "roles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityRole" - } - } - } - } - } - } -}; - -export const HierarchicalChildEntity: msRest.CompositeMapper = { - serializedName: "HierarchicalChildEntity", - type: { - name: "Composite", - className: "HierarchicalChildEntity", - modelProperties: { - ...ChildEntity.type.modelProperties - } - } -}; - -export const CustomPrebuiltModel: msRest.CompositeMapper = { - serializedName: "CustomPrebuiltModel", - type: { - name: "Composite", - className: "CustomPrebuiltModel", - modelProperties: { - id: { - required: true, - serializedName: "id", - type: { - name: "Uuid" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - typeId: { - serializedName: "typeId", - type: { - name: "Number" - } - }, - readableType: { - required: true, - serializedName: "readableType", - type: { - name: "String" - } - }, - customPrebuiltDomainName: { - serializedName: "customPrebuiltDomainName", - type: { - name: "String" - } - }, - customPrebuiltModelName: { - serializedName: "customPrebuiltModelName", - type: { - name: "String" - } - }, - roles: { - serializedName: "roles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityRole" - } - } - } - } - } - } -}; - -export const IntentClassifier: msRest.CompositeMapper = { - serializedName: "Intent Classifier", - type: { - name: "Composite", - className: "IntentClassifier", - modelProperties: { - ...ModelInfo.type.modelProperties, - customPrebuiltDomainName: { - serializedName: "customPrebuiltDomainName", - type: { - name: "String" - } - }, - customPrebuiltModelName: { - serializedName: "customPrebuiltModelName", - type: { - name: "String" - } - } - } - } -}; - -export const EntityExtractor: msRest.CompositeMapper = { - serializedName: "Entity Extractor", - type: { - name: "Composite", - className: "EntityExtractor", - modelProperties: { - id: { - required: true, - serializedName: "id", - type: { - name: "Uuid" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - typeId: { - serializedName: "typeId", - type: { - name: "Number" - } - }, - readableType: { - required: true, - serializedName: "readableType", - type: { - name: "String" - } - }, - roles: { - serializedName: "roles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityRole" - } - } - } - }, - customPrebuiltDomainName: { - serializedName: "customPrebuiltDomainName", - type: { - name: "String" - } - }, - customPrebuiltModelName: { - serializedName: "customPrebuiltModelName", - type: { - name: "String" - } - } - } - } -}; - -export const NDepthEntityExtractor: msRest.CompositeMapper = { - serializedName: "N-Depth Entity Extractor", - type: { - name: "Composite", - className: "NDepthEntityExtractor", - modelProperties: { - id: { - required: true, - serializedName: "id", - type: { - name: "Uuid" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - typeId: { - serializedName: "typeId", - type: { - name: "Number" - } - }, - readableType: { - required: true, - serializedName: "readableType", - type: { - name: "String" - } - }, - roles: { - serializedName: "roles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityRole" - } - } - } - }, - customPrebuiltDomainName: { - serializedName: "customPrebuiltDomainName", - type: { - name: "String" - } - }, - customPrebuiltModelName: { - serializedName: "customPrebuiltModelName", - type: { - name: "String" - } - }, - children: { - serializedName: "children", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ChildEntity" - } - } - } - } - } - } -}; - -export const FeatureInfoObject: msRest.CompositeMapper = { - serializedName: "FeatureInfoObject", - type: { - name: "Composite", - className: "FeatureInfoObject", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "Number" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - isActive: { - serializedName: "isActive", - type: { - name: "Boolean" - } - }, - enabledForAllModels: { - serializedName: "enabledForAllModels", - type: { - name: "Boolean" - } - } - } - } -}; - -export const PhraseListFeatureInfo: msRest.CompositeMapper = { - serializedName: "PhraseListFeatureInfo", - type: { - name: "Composite", - className: "PhraseListFeatureInfo", - modelProperties: { - ...FeatureInfoObject.type.modelProperties, - phrases: { - serializedName: "phrases", - type: { - name: "String" - } - }, - isExchangeable: { - serializedName: "isExchangeable", - type: { - name: "Boolean" - } - } - } - } -}; - -export const PatternFeatureInfo: msRest.CompositeMapper = { - serializedName: "PatternFeatureInfo", - type: { - name: "Composite", - className: "PatternFeatureInfo", - modelProperties: { - ...FeatureInfoObject.type.modelProperties, - pattern: { - serializedName: "pattern", - type: { - name: "String" - } - } - } - } -}; - -export const FeaturesResponseObject: msRest.CompositeMapper = { - serializedName: "FeaturesResponseObject", - type: { - name: "Composite", - className: "FeaturesResponseObject", - modelProperties: { - phraselistFeatures: { - serializedName: "phraselistFeatures", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PhraseListFeatureInfo" - } - } - } - }, - patternFeatures: { - serializedName: "patternFeatures", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PatternFeatureInfo" - } - } - } - } - } - } -}; - -export const LabelExampleResponse: msRest.CompositeMapper = { - serializedName: "LabelExampleResponse", - type: { - name: "Composite", - className: "LabelExampleResponse", - modelProperties: { - utteranceText: { - serializedName: "UtteranceText", - type: { - name: "String" - } - }, - exampleId: { - serializedName: "ExampleId", - type: { - name: "Number" - } - } - } - } -}; - -export const OperationStatus: msRest.CompositeMapper = { - serializedName: "OperationStatus", - type: { - name: "Composite", - className: "OperationStatus", - modelProperties: { - code: { - serializedName: "code", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - type: { - name: "String" - } - } - } - } -}; - -export const BatchLabelExample: msRest.CompositeMapper = { - serializedName: "BatchLabelExample", - type: { - name: "Composite", - className: "BatchLabelExample", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Composite", - className: "LabelExampleResponse" - } - }, - hasError: { - serializedName: "hasError", - type: { - name: "Boolean" - } - }, - error: { - serializedName: "error", - type: { - name: "Composite", - className: "OperationStatus" - } - } - } - } -}; - -export const ApplicationInfoResponse: msRest.CompositeMapper = { - serializedName: "ApplicationInfoResponse", - type: { - name: "Composite", - className: "ApplicationInfoResponse", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "Uuid" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - type: { - name: "String" - } - }, - culture: { - serializedName: "culture", - type: { - name: "String" - } - }, - usageScenario: { - serializedName: "usageScenario", - type: { - name: "String" - } - }, - domain: { - serializedName: "domain", - type: { - name: "String" - } - }, - versionsCount: { - serializedName: "versionsCount", - type: { - name: "Number" - } - }, - createdDateTime: { - serializedName: "createdDateTime", - type: { - name: "String" - } - }, - endpoints: { - serializedName: "endpoints", - type: { - name: "Object" - } - }, - endpointHitsCount: { - serializedName: "endpointHitsCount", - type: { - name: "Number" - } - }, - activeVersion: { - serializedName: "activeVersion", - type: { - name: "String" - } - } - } - } -}; - -export const EndpointInfo: msRest.CompositeMapper = { - serializedName: "EndpointInfo", - type: { - name: "Composite", - className: "EndpointInfo", - modelProperties: { - versionId: { - serializedName: "versionId", - type: { - name: "String" - } - }, - isStaging: { - serializedName: "isStaging", - type: { - name: "Boolean" - } - }, - endpointUrl: { - serializedName: "endpointUrl", - type: { - name: "String" - } - }, - region: { - serializedName: "region", - type: { - name: "String" - } - }, - assignedEndpointKey: { - serializedName: "assignedEndpointKey", - type: { - name: "String" - } - }, - endpointRegion: { - serializedName: "endpointRegion", - type: { - name: "String" - } - }, - failedRegions: { - serializedName: "failedRegions", - type: { - name: "String" - } - }, - publishedDateTime: { - serializedName: "publishedDateTime", - type: { - name: "String" - } - } - } - } -}; - -export const ProductionOrStagingEndpointInfo: msRest.CompositeMapper = { - serializedName: "ProductionOrStagingEndpointInfo", - type: { - name: "Composite", - className: "ProductionOrStagingEndpointInfo", - modelProperties: { - ...EndpointInfo.type.modelProperties - } - } -}; - -export const AvailableCulture: msRest.CompositeMapper = { - serializedName: "AvailableCulture", - type: { - name: "Composite", - className: "AvailableCulture", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - code: { - serializedName: "code", - type: { - name: "String" - } - } - } - } -}; - -export const ApplicationSettings: msRest.CompositeMapper = { - serializedName: "ApplicationSettings", - type: { - name: "Composite", - className: "ApplicationSettings", - modelProperties: { - id: { - required: true, - serializedName: "id", - type: { - name: "Uuid" - } - }, - isPublic: { - required: true, - nullable: false, - serializedName: "public", - type: { - name: "Boolean" - } - } - } - } -}; - -export const PublishSettings: msRest.CompositeMapper = { - serializedName: "PublishSettings", - type: { - name: "Composite", - className: "PublishSettings", - modelProperties: { - id: { - required: true, - serializedName: "id", - type: { - name: "Uuid" - } - }, - isSentimentAnalysisEnabled: { - required: true, - nullable: false, - serializedName: "sentimentAnalysis", - type: { - name: "Boolean" - } - }, - isSpeechEnabled: { - required: true, - nullable: false, - serializedName: "speech", - type: { - name: "Boolean" - } - }, - isSpellCheckerEnabled: { - required: true, - nullable: false, - serializedName: "spellChecker", - type: { - name: "Boolean" - } - } - } - } -}; - -export const AvailablePrebuiltEntityModel: msRest.CompositeMapper = { - serializedName: "AvailablePrebuiltEntityModel", - type: { - name: "Composite", - className: "AvailablePrebuiltEntityModel", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - type: { - name: "String" - } - }, - examples: { - serializedName: "examples", - type: { - name: "String" - } - } - } - } -}; - -export const EnqueueTrainingResponse: msRest.CompositeMapper = { - serializedName: "EnqueueTrainingResponse", - type: { - name: "Composite", - className: "EnqueueTrainingResponse", - modelProperties: { - statusId: { - serializedName: "statusId", - type: { - name: "Number" - } - }, - status: { - serializedName: "status", - type: { - name: "String" - } - } - } - } -}; - -export const ModelTrainingDetails: msRest.CompositeMapper = { - serializedName: "ModelTrainingDetails", - type: { - name: "Composite", - className: "ModelTrainingDetails", - modelProperties: { - statusId: { - serializedName: "statusId", - type: { - name: "Number" - } - }, - status: { - serializedName: "status", - type: { - name: "String" - } - }, - exampleCount: { - serializedName: "exampleCount", - type: { - name: "Number" - } - }, - trainingDateTime: { - serializedName: "trainingDateTime", - type: { - name: "DateTime" - } - }, - failureReason: { - serializedName: "failureReason", - type: { - name: "String" - } - } - } - } -}; - -export const ModelTrainingInfo: msRest.CompositeMapper = { - serializedName: "ModelTrainingInfo", - type: { - name: "Composite", - className: "ModelTrainingInfo", - modelProperties: { - modelId: { - serializedName: "modelId", - type: { - name: "Uuid" - } - }, - details: { - serializedName: "details", - type: { - name: "Composite", - className: "ModelTrainingDetails" - } - } - } - } -}; - -export const UserAccessList: msRest.CompositeMapper = { - serializedName: "UserAccessList", - type: { - name: "Composite", - className: "UserAccessList", - modelProperties: { - owner: { - serializedName: "owner", - type: { - name: "String" - } - }, - emails: { - serializedName: "emails", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const UserCollaborator: msRest.CompositeMapper = { - serializedName: "UserCollaborator", - type: { - name: "Composite", - className: "UserCollaborator", - modelProperties: { - email: { - serializedName: "email", - type: { - name: "String" - } - } - } - } -}; - -export const CollaboratorsArray: msRest.CompositeMapper = { - serializedName: "CollaboratorsArray", - type: { - name: "Composite", - className: "CollaboratorsArray", - modelProperties: { - emails: { - serializedName: "emails", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const ErrorResponse: msRest.CompositeMapper = { - serializedName: "ErrorResponse", - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - errorType: { - serializedName: "errorType", - type: { - name: "String" - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const OperationError: msRest.CompositeMapper = { - serializedName: "OperationError", - type: { - name: "Composite", - className: "OperationError", - modelProperties: { - code: { - serializedName: "code", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - type: { - name: "String" - } - } - } - } -}; - -export const PrebuiltDomainItem: msRest.CompositeMapper = { - serializedName: "PrebuiltDomainItem", - type: { - name: "Composite", - className: "PrebuiltDomainItem", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - type: { - name: "String" - } - }, - examples: { - serializedName: "examples", - type: { - name: "String" - } - } - } - } -}; - -export const PrebuiltDomain: msRest.CompositeMapper = { - serializedName: "PrebuiltDomain", - type: { - name: "Composite", - className: "PrebuiltDomain", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - culture: { - serializedName: "culture", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - type: { - name: "String" - } - }, - examples: { - serializedName: "examples", - type: { - name: "String" - } - }, - intents: { - serializedName: "intents", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrebuiltDomainItem" - } - } - } - }, - entities: { - serializedName: "entities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrebuiltDomainItem" - } - } - } - } - } - } -}; - -export const EntityRoleCreateObject: msRest.CompositeMapper = { - serializedName: "EntityRoleCreateObject", - type: { - name: "Composite", - className: "EntityRoleCreateObject", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const RegexModelCreateObject: msRest.CompositeMapper = { - serializedName: "RegexModelCreateObject", - type: { - name: "Composite", - className: "RegexModelCreateObject", - modelProperties: { - regexPattern: { - serializedName: "regexPattern", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const PatternAnyModelCreateObject: msRest.CompositeMapper = { - serializedName: "PatternAnyModelCreateObject", - type: { - name: "Composite", - className: "PatternAnyModelCreateObject", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - explicitList: { - serializedName: "explicitList", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const ExplicitListItemCreateObject: msRest.CompositeMapper = { - serializedName: "ExplicitListItemCreateObject", - type: { - name: "Composite", - className: "ExplicitListItemCreateObject", - modelProperties: { - explicitListItem: { - serializedName: "explicitListItem", - type: { - name: "String" - } - } - } - } -}; - -export const RegexModelUpdateObject: msRest.CompositeMapper = { - serializedName: "RegexModelUpdateObject", - type: { - name: "Composite", - className: "RegexModelUpdateObject", - modelProperties: { - regexPattern: { - serializedName: "regexPattern", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const PatternAnyModelUpdateObject: msRest.CompositeMapper = { - serializedName: "PatternAnyModelUpdateObject", - type: { - name: "Composite", - className: "PatternAnyModelUpdateObject", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - explicitList: { - serializedName: "explicitList", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const EntityRoleUpdateObject: msRest.CompositeMapper = { - serializedName: "EntityRoleUpdateObject", - type: { - name: "Composite", - className: "EntityRoleUpdateObject", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const ExplicitListItemUpdateObject: msRest.CompositeMapper = { - serializedName: "ExplicitListItemUpdateObject", - type: { - name: "Composite", - className: "ExplicitListItemUpdateObject", - modelProperties: { - explicitListItem: { - serializedName: "explicitListItem", - type: { - name: "String" - } - } - } - } -}; - -export const PatternRuleCreateObject: msRest.CompositeMapper = { - serializedName: "PatternRuleCreateObject", - type: { - name: "Composite", - className: "PatternRuleCreateObject", - modelProperties: { - pattern: { - serializedName: "pattern", - type: { - name: "String" - } - }, - intent: { - serializedName: "intent", - type: { - name: "String" - } - } - } - } -}; - -export const PatternRuleUpdateObject: msRest.CompositeMapper = { - serializedName: "PatternRuleUpdateObject", - type: { - name: "Composite", - className: "PatternRuleUpdateObject", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "Uuid" - } - }, - pattern: { - serializedName: "pattern", - type: { - name: "String" - } - }, - intent: { - serializedName: "intent", - type: { - name: "String" - } - } - } - } -}; - -export const RegexEntityExtractor: msRest.CompositeMapper = { - serializedName: "Regex Entity Extractor", - type: { - name: "Composite", - className: "RegexEntityExtractor", - modelProperties: { - id: { - required: true, - serializedName: "id", - type: { - name: "Uuid" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - typeId: { - serializedName: "typeId", - type: { - name: "Number" - } - }, - readableType: { - required: true, - serializedName: "readableType", - type: { - name: "String" - } - }, - roles: { - serializedName: "roles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityRole" - } - } - } - }, - regexPattern: { - serializedName: "regexPattern", - type: { - name: "String" - } - } - } - } -}; - -export const PatternAnyEntityExtractor: msRest.CompositeMapper = { - serializedName: "Pattern.Any Entity Extractor", - type: { - name: "Composite", - className: "PatternAnyEntityExtractor", - modelProperties: { - id: { - required: true, - serializedName: "id", - type: { - name: "Uuid" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - typeId: { - serializedName: "typeId", - type: { - name: "Number" - } - }, - readableType: { - required: true, - serializedName: "readableType", - type: { - name: "String" - } - }, - roles: { - serializedName: "roles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityRole" - } - } - } - }, - explicitList: { - serializedName: "explicitList", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExplicitListItem" - } - } - } - } - } - } -}; - -export const PatternRuleInfo: msRest.CompositeMapper = { - serializedName: "PatternRuleInfo", - type: { - name: "Composite", - className: "PatternRuleInfo", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "Uuid" - } - }, - pattern: { - serializedName: "pattern", - type: { - name: "String" - } - }, - intent: { - serializedName: "intent", - type: { - name: "String" - } - } - } - } -}; - -export const LabelTextObject: msRest.CompositeMapper = { - serializedName: "LabelTextObject", - type: { - name: "Composite", - className: "LabelTextObject", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "Number" - } - }, - text: { - serializedName: "text", - type: { - name: "String" - } - } - } - } -}; - -export const ModelFeatureInformation: msRest.CompositeMapper = { - serializedName: "ModelFeatureInformation", - type: { - name: "Composite", - className: "ModelFeatureInformation", - modelProperties: { - modelName: { - serializedName: "modelName", - type: { - name: "String" - } - }, - featureName: { - serializedName: "featureName", - type: { - name: "String" - } - }, - isRequired: { - serializedName: "isRequired", - type: { - name: "Boolean" - } - } - } - } -}; - -export const AppVersionSettingObject: msRest.CompositeMapper = { - serializedName: "AppVersionSettingObject", - type: { - name: "Composite", - className: "AppVersionSettingObject", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - type: { - name: "String" - } - } - } - } -}; - -export const AzureAccountInfoObject: msRest.CompositeMapper = { - serializedName: "AzureAccountInfoObject", - type: { - name: "Composite", - className: "AzureAccountInfoObject", - modelProperties: { - azureSubscriptionId: { - required: true, - serializedName: "azureSubscriptionId", - type: { - name: "String" - } - }, - resourceGroup: { - required: true, - serializedName: "resourceGroup", - type: { - name: "String" - } - }, - accountName: { - required: true, - serializedName: "accountName", - type: { - name: "String" - } - } - } - } -}; - -export const HierarchicalChildModelUpdateObject: msRest.CompositeMapper = { - serializedName: "hierarchicalChildModelUpdateObject", - type: { - name: "Composite", - className: "HierarchicalChildModelUpdateObject", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const CompositeChildModelCreateObject: msRest.CompositeMapper = { - serializedName: "compositeChildModelCreateObject", - type: { - name: "Composite", - className: "CompositeChildModelCreateObject", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/modelMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/modelMappers.ts deleted file mode 100644 index f987ec4c95ab..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/modelMappers.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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. - */ - -export { - AvailablePrebuiltEntityModel, - ChildEntity, - ChildEntityModelCreateObject, - ClosedListEntityExtractor, - ClosedListModelCreateObject, - ClosedListModelPatchObject, - ClosedListModelUpdateObject, - CompositeChildModelCreateObject, - CompositeEntityExtractor, - CompositeEntityModel, - CustomPrebuiltModel, - EntitiesSuggestionExample, - EntityExtractor, - EntityModelCreateObject, - EntityModelInfo, - EntityModelUpdateObject, - EntityPrediction, - EntityRole, - EntityRoleCreateObject, - EntityRoleUpdateObject, - ErrorResponse, - ExplicitListItem, - ExplicitListItemCreateObject, - ExplicitListItemUpdateObject, - HierarchicalChildEntity, - HierarchicalChildModelUpdateObject, - HierarchicalEntityExtractor, - IntentClassifier, - IntentPrediction, - IntentsSuggestionExample, - LabelTextObject, - ModelCreateObject, - ModelFeatureInformation, - ModelInfo, - ModelInfoResponse, - ModelUpdateObject, - NDepthEntityExtractor, - OperationStatus, - PatternAnyEntityExtractor, - PatternAnyModelCreateObject, - PatternAnyModelUpdateObject, - PrebuiltDomainCreateBaseObject, - PrebuiltDomainModelCreateObject, - PrebuiltEntityExtractor, - RegexEntityExtractor, - RegexModelCreateObject, - RegexModelUpdateObject, - SubClosedList, - SubClosedListResponse, - WordListBaseUpdateObject, - WordListObject -} from "../models/mappers"; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/parameters.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/parameters.ts deleted file mode 100644 index 917c34b5492c..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/parameters.ts +++ /dev/null @@ -1,354 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; - -export const appId: msRest.OperationURLParameter = { - parameterPath: "appId", - mapper: { - required: true, - serializedName: "appId", - type: { - name: "Uuid" - } - } -}; -export const appName: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "appName" - ], - mapper: { - serializedName: "appName", - type: { - name: "String" - } - } -}; -export const armToken: msRest.OperationParameter = { - parameterPath: [ - "options", - "armToken" - ], - mapper: { - serializedName: "ArmToken", - type: { - name: "String" - } - } -}; -export const cChildId: msRest.OperationURLParameter = { - parameterPath: "cChildId", - mapper: { - required: true, - serializedName: "cChildId", - type: { - name: "Uuid" - } - } -}; -export const cEntityId: msRest.OperationURLParameter = { - parameterPath: "cEntityId", - mapper: { - required: true, - serializedName: "cEntityId", - type: { - name: "Uuid" - } - } -}; -export const clEntityId: msRest.OperationURLParameter = { - parameterPath: "clEntityId", - mapper: { - required: true, - serializedName: "clEntityId", - type: { - name: "Uuid" - } - } -}; -export const culture: msRest.OperationURLParameter = { - parameterPath: "culture", - mapper: { - required: true, - serializedName: "culture", - type: { - name: "String" - } - } -}; -export const deleteUtterances: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "deleteUtterances" - ], - mapper: { - serializedName: "deleteUtterances", - defaultValue: false, - type: { - name: "Boolean" - } - } -}; -export const domainName: msRest.OperationURLParameter = { - parameterPath: "domainName", - mapper: { - required: true, - serializedName: "domainName", - type: { - name: "String" - } - } -}; -export const enableNestedChildren: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "enableNestedChildren" - ], - mapper: { - serializedName: "enableNestedChildren", - defaultValue: false, - type: { - name: "Boolean" - } - } -}; -export const endpoint: msRest.OperationURLParameter = { - parameterPath: "endpoint", - mapper: { - required: true, - serializedName: "Endpoint", - defaultValue: '', - type: { - name: "String" - } - }, - skipEncoding: true -}; -export const entityId: msRest.OperationURLParameter = { - parameterPath: "entityId", - mapper: { - required: true, - serializedName: "entityId", - type: { - name: "Uuid" - } - } -}; -export const exampleId: msRest.OperationURLParameter = { - parameterPath: "exampleId", - mapper: { - required: true, - serializedName: "exampleId", - type: { - name: "Number" - } - } -}; -export const force: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "force" - ], - mapper: { - serializedName: "force", - defaultValue: false, - type: { - name: "Boolean" - } - } -}; -export const format: msRest.OperationQueryParameter = { - parameterPath: "format", - mapper: { - required: true, - isConstant: true, - serializedName: "format", - defaultValue: 'lu', - type: { - name: "String" - } - } -}; -export const hChildId: msRest.OperationURLParameter = { - parameterPath: "hChildId", - mapper: { - required: true, - serializedName: "hChildId", - type: { - name: "Uuid" - } - } -}; -export const hEntityId: msRest.OperationURLParameter = { - parameterPath: "hEntityId", - mapper: { - required: true, - serializedName: "hEntityId", - type: { - name: "Uuid" - } - } -}; -export const intentId: msRest.OperationURLParameter = { - parameterPath: "intentId", - mapper: { - required: true, - serializedName: "intentId", - type: { - name: "Uuid" - } - } -}; -export const itemId: msRest.OperationURLParameter = { - parameterPath: "itemId", - mapper: { - required: true, - serializedName: "itemId", - type: { - name: "Number" - } - } -}; -export const modelId: msRest.OperationURLParameter = { - parameterPath: "modelId", - mapper: { - required: true, - serializedName: "modelId", - type: { - name: "String" - } - } -}; -export const patternId: msRest.OperationURLParameter = { - parameterPath: "patternId", - mapper: { - required: true, - serializedName: "patternId", - type: { - name: "Uuid" - } - } -}; -export const phraselistId: msRest.OperationURLParameter = { - parameterPath: "phraselistId", - mapper: { - required: true, - serializedName: "phraselistId", - type: { - name: "Number" - } - } -}; -export const prebuiltId: msRest.OperationURLParameter = { - parameterPath: "prebuiltId", - mapper: { - required: true, - serializedName: "prebuiltId", - type: { - name: "Uuid" - } - } -}; -export const regexEntityId: msRest.OperationURLParameter = { - parameterPath: "regexEntityId", - mapper: { - required: true, - serializedName: "regexEntityId", - type: { - name: "Uuid" - } - } -}; -export const roleId: msRest.OperationURLParameter = { - parameterPath: "roleId", - mapper: { - required: true, - serializedName: "roleId", - type: { - name: "Uuid" - } - } -}; -export const skip: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "skip" - ], - mapper: { - serializedName: "skip", - defaultValue: 0, - constraints: { - InclusiveMinimum: 0 - }, - type: { - name: "Number" - } - } -}; -export const slotName: msRest.OperationURLParameter = { - parameterPath: "slotName", - mapper: { - required: true, - serializedName: "slotName", - type: { - name: "String" - } - } -}; -export const subListId: msRest.OperationURLParameter = { - parameterPath: "subListId", - mapper: { - required: true, - serializedName: "subListId", - type: { - name: "Number" - } - } -}; -export const take: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "take" - ], - mapper: { - serializedName: "take", - defaultValue: 100, - constraints: { - InclusiveMaximum: 500, - InclusiveMinimum: 0 - }, - type: { - name: "Number" - } - } -}; -export const versionId0: msRest.OperationURLParameter = { - parameterPath: "versionId", - mapper: { - required: true, - serializedName: "versionId", - type: { - name: "String" - } - } -}; -export const versionId1: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "versionId" - ], - mapper: { - serializedName: "versionId", - type: { - name: "String" - } - } -}; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/patternMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/patternMappers.ts deleted file mode 100644 index 778a7cb98895..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/patternMappers.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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. - */ - -export { - ErrorResponse, - OperationStatus, - PatternRuleCreateObject, - PatternRuleInfo, - PatternRuleUpdateObject -} from "../models/mappers"; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/permissionsMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/permissionsMappers.ts deleted file mode 100644 index 5b9d86f67b95..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/permissionsMappers.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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. - */ - -export { - CollaboratorsArray, - ErrorResponse, - OperationStatus, - UserAccessList, - UserCollaborator -} from "../models/mappers"; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/settingsMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/settingsMappers.ts deleted file mode 100644 index d74e113055f1..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/settingsMappers.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * 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. - */ - -export { - AppVersionSettingObject, - ErrorResponse, - OperationStatus -} from "../models/mappers"; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/trainMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/trainMappers.ts deleted file mode 100644 index 590e1033b18e..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/trainMappers.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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. - */ - -export { - EnqueueTrainingResponse, - ErrorResponse, - ModelTrainingDetails, - ModelTrainingInfo -} from "../models/mappers"; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/versionsMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/versionsMappers.ts deleted file mode 100644 index 2062726dc097..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/versionsMappers.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - -export { - ClosedList, - ErrorResponse, - HierarchicalModel, - HierarchicalModelV2, - JsonChild, - JSONEntity, - JSONModelFeature, - JsonModelFeatureInformation, - JSONRegexFeature, - JSONUtterance, - LuisApp, - LuisAppV2, - OperationStatus, - PatternAny, - PatternRule, - PrebuiltDomainObject, - PrebuiltEntity, - RegexEntity, - SubClosedList, - SubClosedListResponse, - TaskUpdateObject, - VersionInfo -} from "../models/mappers"; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/apps.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/apps.ts deleted file mode 100644 index 7cec0c738a67..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/apps.ts +++ /dev/null @@ -1,1341 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/appsMappers"; -import * as Parameters from "../models/parameters"; -import { LUISAuthoringClientContext } from "../lUISAuthoringClientContext"; - -/** Class representing a Apps. */ -export class Apps { - private readonly client: LUISAuthoringClientContext; - - /** - * Create a Apps. - * @param {LUISAuthoringClientContext} client Reference to the service client. - */ - constructor(client: LUISAuthoringClientContext) { - this.client = client; - } - - /** - * Creates a new LUIS app. - * @param applicationCreateObject An application 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. - * @param [options] The optional parameters - * @returns Promise - */ - add(applicationCreateObject: Models.ApplicationCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param applicationCreateObject An application 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. - * @param callback The callback - */ - add(applicationCreateObject: Models.ApplicationCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param applicationCreateObject An application 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. - * @param options The optional parameters - * @param callback The callback - */ - add(applicationCreateObject: Models.ApplicationCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - add(applicationCreateObject: Models.ApplicationCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - applicationCreateObject, - options - }, - addOperationSpec, - callback) as Promise; - } - - /** - * Lists all of the user's applications. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: Models.AppsListOptionalParams): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: Models.AppsListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.AppsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * Imports an application to LUIS, the application's structure is included in the request body. - * @param luisApp A LUIS application structure. - * @param [options] The optional parameters - * @returns Promise - */ - importMethod(luisApp: Models.LuisApp, options?: Models.AppsImportMethodOptionalParams): Promise; - /** - * @param luisApp A LUIS application structure. - * @param callback The callback - */ - importMethod(luisApp: Models.LuisApp, callback: msRest.ServiceCallback): void; - /** - * @param luisApp A LUIS application structure. - * @param options The optional parameters - * @param callback The callback - */ - importMethod(luisApp: Models.LuisApp, options: Models.AppsImportMethodOptionalParams, callback: msRest.ServiceCallback): void; - importMethod(luisApp: Models.LuisApp, options?: Models.AppsImportMethodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - luisApp, - options - }, - importMethodOperationSpec, - callback) as Promise; - } - - /** - * Gets the endpoint URLs for the prebuilt Cortana applications. - * @param [options] The optional parameters - * @returns Promise - */ - listCortanaEndpoints(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - listCortanaEndpoints(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listCortanaEndpoints(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listCortanaEndpoints(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listCortanaEndpointsOperationSpec, - callback) as Promise; - } - - /** - * Gets the available application domains. - * @param [options] The optional parameters - * @returns Promise - */ - listDomains(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - listDomains(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listDomains(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listDomains(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listDomainsOperationSpec, - callback) as Promise; - } - - /** - * Gets the application available usage scenarios. - * @param [options] The optional parameters - * @returns Promise - */ - listUsageScenarios(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - listUsageScenarios(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listUsageScenarios(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listUsageScenarios(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listUsageScenariosOperationSpec, - callback) as Promise; - } - - /** - * Gets a list of supported cultures. Cultures are equivalent to the written language and locale. - * For example,"en-us" represents the U.S. variation of English. - * @param [options] The optional parameters - * @returns Promise - */ - listSupportedCultures(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - listSupportedCultures(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listSupportedCultures(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listSupportedCultures(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listSupportedCulturesOperationSpec, - callback) as Promise; - } - - /** - * Gets the logs of the past month's endpoint queries for the application. - * @param appId The application ID. - * @param [options] The optional parameters - * @returns Promise - */ - downloadQueryLogs(appId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param callback The callback - */ - downloadQueryLogs(appId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param options The optional parameters - * @param callback The callback - */ - downloadQueryLogs(appId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - downloadQueryLogs(appId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - options - }, - downloadQueryLogsOperationSpec, - callback) as Promise; - } - - /** - * Gets the application info. - * @param appId The application ID. - * @param [options] The optional parameters - * @returns Promise - */ - get(appId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param callback The callback - */ - get(appId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param options The optional parameters - * @param callback The callback - */ - get(appId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(appId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Updates the name or description of the application. - * @param appId The application ID. - * @param applicationUpdateObject A model containing Name and Description of the application. - * @param [options] The optional parameters - * @returns Promise - */ - update(appId: string, applicationUpdateObject: Models.ApplicationUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param applicationUpdateObject A model containing Name and Description of the application. - * @param callback The callback - */ - update(appId: string, applicationUpdateObject: Models.ApplicationUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param applicationUpdateObject A model containing Name and Description of the application. - * @param options The optional parameters - * @param callback The callback - */ - update(appId: string, applicationUpdateObject: Models.ApplicationUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(appId: string, applicationUpdateObject: Models.ApplicationUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - applicationUpdateObject, - options - }, - updateOperationSpec, - callback) as Promise; - } - - /** - * Deletes an application. - * @param appId The application ID. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(appId: string, options?: Models.AppsDeleteMethodOptionalParams): Promise; - /** - * @param appId The application ID. - * @param callback The callback - */ - deleteMethod(appId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(appId: string, options: Models.AppsDeleteMethodOptionalParams, callback: msRest.ServiceCallback): void; - deleteMethod(appId: string, options?: Models.AppsDeleteMethodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - options - }, - deleteMethodOperationSpec, - callback) as Promise; - } - - /** - * Publishes a specific version of the application. - * @param appId The application ID. - * @param applicationPublishObject The application publish object. The region is the target region - * that the application is published to. - * @param [options] The optional parameters - * @returns Promise - */ - publish(appId: string, applicationPublishObject: Models.ApplicationPublishObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param applicationPublishObject The application publish object. The region is the target region - * that the application is published to. - * @param callback The callback - */ - publish(appId: string, applicationPublishObject: Models.ApplicationPublishObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param applicationPublishObject The application publish object. The region is the target region - * that the application is published to. - * @param options The optional parameters - * @param callback The callback - */ - publish(appId: string, applicationPublishObject: Models.ApplicationPublishObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - publish(appId: string, applicationPublishObject: Models.ApplicationPublishObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - applicationPublishObject, - options - }, - publishOperationSpec, - callback) as Promise; - } - - /** - * Get the application settings including 'UseAllTrainingData'. - * @param appId The application ID. - * @param [options] The optional parameters - * @returns Promise - */ - getSettings(appId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param callback The callback - */ - getSettings(appId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param options The optional parameters - * @param callback The callback - */ - getSettings(appId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getSettings(appId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - options - }, - getSettingsOperationSpec, - callback) as Promise; - } - - /** - * Updates the application settings including 'UseAllTrainingData'. - * @param appId The application ID. - * @param applicationSettingUpdateObject An object containing the new application settings. - * @param [options] The optional parameters - * @returns Promise - */ - updateSettings(appId: string, applicationSettingUpdateObject: Models.ApplicationSettingUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param applicationSettingUpdateObject An object containing the new application settings. - * @param callback The callback - */ - updateSettings(appId: string, applicationSettingUpdateObject: Models.ApplicationSettingUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param applicationSettingUpdateObject An object containing the new application settings. - * @param options The optional parameters - * @param callback The callback - */ - updateSettings(appId: string, applicationSettingUpdateObject: Models.ApplicationSettingUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateSettings(appId: string, applicationSettingUpdateObject: Models.ApplicationSettingUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - applicationSettingUpdateObject, - options - }, - updateSettingsOperationSpec, - callback) as Promise; - } - - /** - * Get the application publish settings including 'UseAllTrainingData'. - * @param appId The application ID. - * @param [options] The optional parameters - * @returns Promise - */ - getPublishSettings(appId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param callback The callback - */ - getPublishSettings(appId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param options The optional parameters - * @param callback The callback - */ - getPublishSettings(appId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getPublishSettings(appId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - options - }, - getPublishSettingsOperationSpec, - callback) as Promise; - } - - /** - * Updates the application publish settings including 'UseAllTrainingData'. - * @param appId The application ID. - * @param publishSettingUpdateObject An object containing the new publish application settings. - * @param [options] The optional parameters - * @returns Promise - */ - updatePublishSettings(appId: string, publishSettingUpdateObject: Models.PublishSettingUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param publishSettingUpdateObject An object containing the new publish application settings. - * @param callback The callback - */ - updatePublishSettings(appId: string, publishSettingUpdateObject: Models.PublishSettingUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param publishSettingUpdateObject An object containing the new publish application settings. - * @param options The optional parameters - * @param callback The callback - */ - updatePublishSettings(appId: string, publishSettingUpdateObject: Models.PublishSettingUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updatePublishSettings(appId: string, publishSettingUpdateObject: Models.PublishSettingUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - publishSettingUpdateObject, - options - }, - updatePublishSettingsOperationSpec, - callback) as Promise; - } - - /** - * Returns the available endpoint deployment regions and URLs. - * @param appId The application ID. - * @param [options] The optional parameters - * @returns Promise - */ - listEndpoints(appId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param callback The callback - */ - listEndpoints(appId: string, callback: msRest.ServiceCallback<{ [propertyName: string]: string }>): void; - /** - * @param appId The application ID. - * @param options The optional parameters - * @param callback The callback - */ - listEndpoints(appId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<{ [propertyName: string]: string }>): void; - listEndpoints(appId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<{ [propertyName: string]: string }>, callback?: msRest.ServiceCallback<{ [propertyName: string]: string }>): Promise { - return this.client.sendOperationRequest( - { - appId, - options - }, - listEndpointsOperationSpec, - callback) as Promise; - } - - /** - * Gets all the available custom prebuilt domains for all cultures. - * @param [options] The optional parameters - * @returns Promise - */ - listAvailableCustomPrebuiltDomains(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - listAvailableCustomPrebuiltDomains(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listAvailableCustomPrebuiltDomains(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAvailableCustomPrebuiltDomains(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listAvailableCustomPrebuiltDomainsOperationSpec, - callback) as Promise; - } - - /** - * Adds a prebuilt domain along with its intent and entity models as a new application. - * @param prebuiltDomainCreateObject A prebuilt domain create object containing the name and - * culture of the domain. - * @param [options] The optional parameters - * @returns Promise - */ - addCustomPrebuiltDomain(prebuiltDomainCreateObject: Models.PrebuiltDomainCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param prebuiltDomainCreateObject A prebuilt domain create object containing the name and - * culture of the domain. - * @param callback The callback - */ - addCustomPrebuiltDomain(prebuiltDomainCreateObject: Models.PrebuiltDomainCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param prebuiltDomainCreateObject A prebuilt domain create object containing the name and - * culture of the domain. - * @param options The optional parameters - * @param callback The callback - */ - addCustomPrebuiltDomain(prebuiltDomainCreateObject: Models.PrebuiltDomainCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addCustomPrebuiltDomain(prebuiltDomainCreateObject: Models.PrebuiltDomainCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - prebuiltDomainCreateObject, - options - }, - addCustomPrebuiltDomainOperationSpec, - callback) as Promise; - } - - /** - * Gets all the available prebuilt domains for a specific culture. - * @param culture Culture. - * @param [options] The optional parameters - * @returns Promise - */ - listAvailableCustomPrebuiltDomainsForCulture(culture: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param culture Culture. - * @param callback The callback - */ - listAvailableCustomPrebuiltDomainsForCulture(culture: string, callback: msRest.ServiceCallback): void; - /** - * @param culture Culture. - * @param options The optional parameters - * @param callback The callback - */ - listAvailableCustomPrebuiltDomainsForCulture(culture: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAvailableCustomPrebuiltDomainsForCulture(culture: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - culture, - options - }, - listAvailableCustomPrebuiltDomainsForCultureOperationSpec, - callback) as Promise; - } - - /** - * Packages a published LUIS application as a GZip file to be used in the LUIS container. - * @summary package - Gets published LUIS application package in binary stream GZip format - * @param appId The application ID. - * @param slotName The publishing slot name. - * @param [options] The optional parameters - * @returns Promise - */ - packagePublishedApplicationAsGzip(appId: string, slotName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param slotName The publishing slot name. - * @param callback The callback - */ - packagePublishedApplicationAsGzip(appId: string, slotName: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param slotName The publishing slot name. - * @param options The optional parameters - * @param callback The callback - */ - packagePublishedApplicationAsGzip(appId: string, slotName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - packagePublishedApplicationAsGzip(appId: string, slotName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - slotName, - options - }, - packagePublishedApplicationAsGzipOperationSpec, - callback) as Promise; - } - - /** - * Packages trained LUIS application as GZip file to be used in the LUIS container. - * @summary package - Gets trained LUIS application package in binary stream GZip format - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - packageTrainedApplicationAsGzip(appId: string, versionId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - packageTrainedApplicationAsGzip(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - packageTrainedApplicationAsGzip(appId: string, versionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - packageTrainedApplicationAsGzip(appId: string, versionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - packageTrainedApplicationAsGzipOperationSpec, - callback) as Promise; - } - - /** - * Imports an application to LUIS, the application's structure is included in the request body. - * @param luisAppV2 A LUIS application structure. - * @param [options] The optional parameters - * @returns Promise - */ - importV2App(luisAppV2: Models.LuisAppV2, options?: Models.AppsImportV2AppOptionalParams): Promise; - /** - * @param luisAppV2 A LUIS application structure. - * @param callback The callback - */ - importV2App(luisAppV2: Models.LuisAppV2, callback: msRest.ServiceCallback): void; - /** - * @param luisAppV2 A LUIS application structure. - * @param options The optional parameters - * @param callback The callback - */ - importV2App(luisAppV2: Models.LuisAppV2, options: Models.AppsImportV2AppOptionalParams, callback: msRest.ServiceCallback): void; - importV2App(luisAppV2: Models.LuisAppV2, options?: Models.AppsImportV2AppOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - luisAppV2, - options - }, - importV2AppOperationSpec, - callback) as Promise; - } - - /** - * Imports an application to LUIS, the application's structure is included in the request body. - * @param luisAppLu A LUIS application structure. - * @param [options] The optional parameters - * @returns Promise - */ - importLuFormat(luisAppLu: string, options?: Models.AppsImportLuFormatOptionalParams): Promise; - /** - * @param luisAppLu A LUIS application structure. - * @param callback The callback - */ - importLuFormat(luisAppLu: string, callback: msRest.ServiceCallback): void; - /** - * @param luisAppLu A LUIS application structure. - * @param options The optional parameters - * @param callback The callback - */ - importLuFormat(luisAppLu: string, options: Models.AppsImportLuFormatOptionalParams, callback: msRest.ServiceCallback): void; - importLuFormat(luisAppLu: string, options?: Models.AppsImportLuFormatOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - luisAppLu, - options - }, - importLuFormatOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const addOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/", - urlParameters: [ - Parameters.endpoint - ], - requestBody: { - parameterPath: "applicationCreateObject", - mapper: { - ...Mappers.ApplicationCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/", - urlParameters: [ - Parameters.endpoint - ], - queryParameters: [ - Parameters.skip, - Parameters.take - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationInfoResponse" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const importMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/import", - urlParameters: [ - Parameters.endpoint - ], - queryParameters: [ - Parameters.appName - ], - requestBody: { - parameterPath: "luisApp", - mapper: { - ...Mappers.LuisApp, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listCortanaEndpointsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/assistants", - urlParameters: [ - Parameters.endpoint - ], - responses: { - 200: { - bodyMapper: Mappers.PersonalAssistantsResponse - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listDomainsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/domains", - urlParameters: [ - Parameters.endpoint - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listUsageScenariosOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/usagescenarios", - urlParameters: [ - Parameters.endpoint - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listSupportedCulturesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/cultures", - urlParameters: [ - Parameters.endpoint - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AvailableCulture" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const downloadQueryLogsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/querylogs", - urlParameters: [ - Parameters.endpoint, - Parameters.appId - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Stream" - } - } - }, - default: {} - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId - ], - responses: { - 200: { - bodyMapper: Mappers.ApplicationInfoResponse - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId - ], - requestBody: { - parameterPath: "applicationUpdateObject", - mapper: { - ...Mappers.ApplicationUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId - ], - queryParameters: [ - Parameters.force - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const publishOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/publish", - urlParameters: [ - Parameters.endpoint, - Parameters.appId - ], - requestBody: { - parameterPath: "applicationPublishObject", - mapper: { - ...Mappers.ApplicationPublishObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: Mappers.ProductionOrStagingEndpointInfo - }, - 207: { - bodyMapper: Mappers.ProductionOrStagingEndpointInfo - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getSettingsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/settings", - urlParameters: [ - Parameters.endpoint, - Parameters.appId - ], - responses: { - 200: { - bodyMapper: Mappers.ApplicationSettings - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateSettingsOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/settings", - urlParameters: [ - Parameters.endpoint, - Parameters.appId - ], - requestBody: { - parameterPath: "applicationSettingUpdateObject", - mapper: { - ...Mappers.ApplicationSettingUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getPublishSettingsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/publishsettings", - urlParameters: [ - Parameters.endpoint, - Parameters.appId - ], - responses: { - 200: { - bodyMapper: Mappers.PublishSettings - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updatePublishSettingsOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/publishsettings", - urlParameters: [ - Parameters.endpoint, - Parameters.appId - ], - requestBody: { - parameterPath: "publishSettingUpdateObject", - mapper: { - ...Mappers.PublishSettingUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listEndpointsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/endpoints", - urlParameters: [ - Parameters.endpoint, - Parameters.appId - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listAvailableCustomPrebuiltDomainsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/customprebuiltdomains", - urlParameters: [ - Parameters.endpoint - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrebuiltDomain" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const addCustomPrebuiltDomainOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/customprebuiltdomains", - urlParameters: [ - Parameters.endpoint - ], - requestBody: { - parameterPath: "prebuiltDomainCreateObject", - mapper: { - ...Mappers.PrebuiltDomainCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listAvailableCustomPrebuiltDomainsForCultureOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/customprebuiltdomains/{culture}", - urlParameters: [ - Parameters.endpoint, - Parameters.culture - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrebuiltDomain" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const packagePublishedApplicationAsGzipOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "package/{appId}/slot/{slotName}/gzip", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.slotName - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Stream" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const packageTrainedApplicationAsGzipOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "package/{appId}/versions/{versionId}/gzip", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Stream" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const importV2AppOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/import", - urlParameters: [ - Parameters.endpoint - ], - queryParameters: [ - Parameters.appName - ], - requestBody: { - parameterPath: "luisAppV2", - mapper: { - ...Mappers.LuisAppV2, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const importLuFormatOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/import", - urlParameters: [ - Parameters.endpoint - ], - queryParameters: [ - Parameters.appName - ], - requestBody: { - parameterPath: "luisAppLu", - mapper: { - required: true, - serializedName: "luisAppLu", - type: { - name: "String" - } - } - }, - contentType: "text/plain", - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/azureAccounts.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/azureAccounts.ts deleted file mode 100644 index 2fffd278dd2f..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/azureAccounts.ts +++ /dev/null @@ -1,261 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/azureAccountsMappers"; -import * as Parameters from "../models/parameters"; -import { LUISAuthoringClientContext } from "../lUISAuthoringClientContext"; - -/** Class representing a AzureAccounts. */ -export class AzureAccounts { - private readonly client: LUISAuthoringClientContext; - - /** - * Create a AzureAccounts. - * @param {LUISAuthoringClientContext} client Reference to the service client. - */ - constructor(client: LUISAuthoringClientContext) { - this.client = client; - } - - /** - * Assigns an Azure account to the application. - * @summary apps - Assign a LUIS Azure account to an application - * @param appId The application ID. - * @param [options] The optional parameters - * @returns Promise - */ - assignToApp(appId: string, options?: Models.AzureAccountsAssignToAppOptionalParams): Promise; - /** - * @param appId The application ID. - * @param callback The callback - */ - assignToApp(appId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param options The optional parameters - * @param callback The callback - */ - assignToApp(appId: string, options: Models.AzureAccountsAssignToAppOptionalParams, callback: msRest.ServiceCallback): void; - assignToApp(appId: string, options?: Models.AzureAccountsAssignToAppOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - options - }, - assignToAppOperationSpec, - callback) as Promise; - } - - /** - * Gets the LUIS Azure accounts assigned to the application for the user using his ARM token. - * @summary apps - Get LUIS Azure accounts assigned to the application - * @param appId The application ID. - * @param [options] The optional parameters - * @returns Promise - */ - getAssigned(appId: string, options?: Models.AzureAccountsGetAssignedOptionalParams): Promise; - /** - * @param appId The application ID. - * @param callback The callback - */ - getAssigned(appId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param options The optional parameters - * @param callback The callback - */ - getAssigned(appId: string, options: Models.AzureAccountsGetAssignedOptionalParams, callback: msRest.ServiceCallback): void; - getAssigned(appId: string, options?: Models.AzureAccountsGetAssignedOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - options - }, - getAssignedOperationSpec, - callback) as Promise; - } - - /** - * Removes assigned Azure account from the application. - * @summary apps - Removes an assigned LUIS Azure account from an application - * @param appId The application ID. - * @param [options] The optional parameters - * @returns Promise - */ - removeFromApp(appId: string, options?: Models.AzureAccountsRemoveFromAppOptionalParams): Promise; - /** - * @param appId The application ID. - * @param callback The callback - */ - removeFromApp(appId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param options The optional parameters - * @param callback The callback - */ - removeFromApp(appId: string, options: Models.AzureAccountsRemoveFromAppOptionalParams, callback: msRest.ServiceCallback): void; - removeFromApp(appId: string, options?: Models.AzureAccountsRemoveFromAppOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - options - }, - removeFromAppOperationSpec, - callback) as Promise; - } - - /** - * Gets the LUIS Azure accounts for the user using his ARM token. - * @summary user - Get LUIS Azure accounts - * @param [options] The optional parameters - * @returns Promise - */ - listUserLUISAccounts(options?: Models.AzureAccountsListUserLUISAccountsOptionalParams): Promise; - /** - * @param callback The callback - */ - listUserLUISAccounts(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listUserLUISAccounts(options: Models.AzureAccountsListUserLUISAccountsOptionalParams, callback: msRest.ServiceCallback): void; - listUserLUISAccounts(options?: Models.AzureAccountsListUserLUISAccountsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listUserLUISAccountsOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const assignToAppOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/azureaccounts", - urlParameters: [ - Parameters.endpoint, - Parameters.appId - ], - headerParameters: [ - Parameters.armToken - ], - requestBody: { - parameterPath: [ - "options", - "azureAccountInfoObject" - ], - mapper: Mappers.AzureAccountInfoObject - }, - responses: { - 201: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getAssignedOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/azureaccounts", - urlParameters: [ - Parameters.endpoint, - Parameters.appId - ], - headerParameters: [ - Parameters.armToken - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureAccountInfoObject" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const removeFromAppOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/azureaccounts", - urlParameters: [ - Parameters.endpoint, - Parameters.appId - ], - headerParameters: [ - Parameters.armToken - ], - requestBody: { - parameterPath: [ - "options", - "azureAccountInfoObject" - ], - mapper: Mappers.AzureAccountInfoObject - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listUserLUISAccountsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "azureaccounts", - urlParameters: [ - Parameters.endpoint - ], - headerParameters: [ - Parameters.armToken - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureAccountInfoObject" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/examples.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/examples.ts deleted file mode 100644 index 628db60409d5..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/examples.ts +++ /dev/null @@ -1,317 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/examplesMappers"; -import * as Parameters from "../models/parameters"; -import { LUISAuthoringClientContext } from "../lUISAuthoringClientContext"; - -/** Class representing a Examples. */ -export class Examples { - private readonly client: LUISAuthoringClientContext; - - /** - * Create a Examples. - * @param {LUISAuthoringClientContext} client Reference to the service client. - */ - constructor(client: LUISAuthoringClientContext) { - this.client = client; - } - - /** - * Adds a labeled example utterance in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param exampleLabelObject A labeled example utterance with the expected intent and entities. - * @param [options] The optional parameters - * @returns Promise - */ - add(appId: string, versionId: string, exampleLabelObject: Models.ExampleLabelObject, options?: Models.ExamplesAddOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param exampleLabelObject A labeled example utterance with the expected intent and entities. - * @param callback The callback - */ - add(appId: string, versionId: string, exampleLabelObject: Models.ExampleLabelObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param exampleLabelObject A labeled example utterance with the expected intent and entities. - * @param options The optional parameters - * @param callback The callback - */ - add(appId: string, versionId: string, exampleLabelObject: Models.ExampleLabelObject, options: Models.ExamplesAddOptionalParams, callback: msRest.ServiceCallback): void; - add(appId: string, versionId: string, exampleLabelObject: Models.ExampleLabelObject, options?: Models.ExamplesAddOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - exampleLabelObject, - options - }, - addOperationSpec, - callback) as Promise; - } - - /** - * Adds a batch of labeled example utterances to a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param exampleLabelObjectArray Array of example utterances. - * @param [options] The optional parameters - * @returns Promise - */ - batch(appId: string, versionId: string, exampleLabelObjectArray: Models.ExampleLabelObject[], options?: Models.ExamplesBatchOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param exampleLabelObjectArray Array of example utterances. - * @param callback The callback - */ - batch(appId: string, versionId: string, exampleLabelObjectArray: Models.ExampleLabelObject[], callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param exampleLabelObjectArray Array of example utterances. - * @param options The optional parameters - * @param callback The callback - */ - batch(appId: string, versionId: string, exampleLabelObjectArray: Models.ExampleLabelObject[], options: Models.ExamplesBatchOptionalParams, callback: msRest.ServiceCallback): void; - batch(appId: string, versionId: string, exampleLabelObjectArray: Models.ExampleLabelObject[], options?: Models.ExamplesBatchOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - exampleLabelObjectArray, - options - }, - batchOperationSpec, - callback) as Promise; - } - - /** - * Returns example utterances to be reviewed from a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - list(appId: string, versionId: string, options?: Models.ExamplesListOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - list(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - list(appId: string, versionId: string, options: Models.ExamplesListOptionalParams, callback: msRest.ServiceCallback): void; - list(appId: string, versionId: string, options?: Models.ExamplesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * Deletes the labeled example utterances with the specified ID from a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param exampleId The example ID. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(appId: string, versionId: string, exampleId: number, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param exampleId The example ID. - * @param callback The callback - */ - deleteMethod(appId: string, versionId: string, exampleId: number, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param exampleId The example ID. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(appId: string, versionId: string, exampleId: number, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(appId: string, versionId: string, exampleId: number, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - exampleId, - options - }, - deleteMethodOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const addOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/example", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - queryParameters: [ - Parameters.enableNestedChildren - ], - requestBody: { - parameterPath: "exampleLabelObject", - mapper: { - ...Mappers.ExampleLabelObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: Mappers.LabelExampleResponse - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const batchOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/examples", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - queryParameters: [ - Parameters.enableNestedChildren - ], - requestBody: { - parameterPath: "exampleLabelObjectArray", - mapper: { - required: true, - serializedName: "exampleLabelObjectArray", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExampleLabelObject" - } - } - } - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BatchLabelExample" - } - } - } - } - }, - 207: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BatchLabelExample" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/examples", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - queryParameters: [ - Parameters.skip, - Parameters.take, - Parameters.enableNestedChildren - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LabeledUtterance" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/examples/{exampleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.exampleId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/features.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/features.ts deleted file mode 100644 index 3af65368a0fa..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/features.ts +++ /dev/null @@ -1,531 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/featuresMappers"; -import * as Parameters from "../models/parameters"; -import { LUISAuthoringClientContext } from "../lUISAuthoringClientContext"; - -/** Class representing a Features. */ -export class Features { - private readonly client: LUISAuthoringClientContext; - - /** - * Create a Features. - * @param {LUISAuthoringClientContext} client Reference to the service client. - */ - constructor(client: LUISAuthoringClientContext) { - this.client = client; - } - - /** - * Creates a new phraselist feature in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param phraselistCreateObject A Phraselist object containing Name, comma-separated Phrases and - * the isExchangeable boolean. Default value for isExchangeable is true. - * @param [options] The optional parameters - * @returns Promise - */ - addPhraseList(appId: string, versionId: string, phraselistCreateObject: Models.PhraselistCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param phraselistCreateObject A Phraselist object containing Name, comma-separated Phrases and - * the isExchangeable boolean. Default value for isExchangeable is true. - * @param callback The callback - */ - addPhraseList(appId: string, versionId: string, phraselistCreateObject: Models.PhraselistCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param phraselistCreateObject A Phraselist object containing Name, comma-separated Phrases and - * the isExchangeable boolean. Default value for isExchangeable is true. - * @param options The optional parameters - * @param callback The callback - */ - addPhraseList(appId: string, versionId: string, phraselistCreateObject: Models.PhraselistCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addPhraseList(appId: string, versionId: string, phraselistCreateObject: Models.PhraselistCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - phraselistCreateObject, - options - }, - addPhraseListOperationSpec, - callback) as Promise; - } - - /** - * Gets all the phraselist features in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - listPhraseLists(appId: string, versionId: string, options?: Models.FeaturesListPhraseListsOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - listPhraseLists(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - listPhraseLists(appId: string, versionId: string, options: Models.FeaturesListPhraseListsOptionalParams, callback: msRest.ServiceCallback): void; - listPhraseLists(appId: string, versionId: string, options?: Models.FeaturesListPhraseListsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - listPhraseListsOperationSpec, - callback) as Promise; - } - - /** - * Gets all the extraction phraselist and pattern features in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - list(appId: string, versionId: string, options?: Models.FeaturesListOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - list(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - list(appId: string, versionId: string, options: Models.FeaturesListOptionalParams, callback: msRest.ServiceCallback): void; - list(appId: string, versionId: string, options?: Models.FeaturesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * Gets phraselist feature info in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param phraselistId The ID of the feature to be retrieved. - * @param [options] The optional parameters - * @returns Promise - */ - getPhraseList(appId: string, versionId: string, phraselistId: number, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param phraselistId The ID of the feature to be retrieved. - * @param callback The callback - */ - getPhraseList(appId: string, versionId: string, phraselistId: number, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param phraselistId The ID of the feature to be retrieved. - * @param options The optional parameters - * @param callback The callback - */ - getPhraseList(appId: string, versionId: string, phraselistId: number, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getPhraseList(appId: string, versionId: string, phraselistId: number, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - phraselistId, - options - }, - getPhraseListOperationSpec, - callback) as Promise; - } - - /** - * Updates the phrases, the state and the name of the phraselist feature in a version of the - * application. - * @param appId The application ID. - * @param versionId The version ID. - * @param phraselistId The ID of the feature to be updated. - * @param [options] The optional parameters - * @returns Promise - */ - updatePhraseList(appId: string, versionId: string, phraselistId: number, options?: Models.FeaturesUpdatePhraseListOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param phraselistId The ID of the feature to be updated. - * @param callback The callback - */ - updatePhraseList(appId: string, versionId: string, phraselistId: number, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param phraselistId The ID of the feature to be updated. - * @param options The optional parameters - * @param callback The callback - */ - updatePhraseList(appId: string, versionId: string, phraselistId: number, options: Models.FeaturesUpdatePhraseListOptionalParams, callback: msRest.ServiceCallback): void; - updatePhraseList(appId: string, versionId: string, phraselistId: number, options?: Models.FeaturesUpdatePhraseListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - phraselistId, - options - }, - updatePhraseListOperationSpec, - callback) as Promise; - } - - /** - * Deletes a phraselist feature from a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param phraselistId The ID of the feature to be deleted. - * @param [options] The optional parameters - * @returns Promise - */ - deletePhraseList(appId: string, versionId: string, phraselistId: number, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param phraselistId The ID of the feature to be deleted. - * @param callback The callback - */ - deletePhraseList(appId: string, versionId: string, phraselistId: number, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param phraselistId The ID of the feature to be deleted. - * @param options The optional parameters - * @param callback The callback - */ - deletePhraseList(appId: string, versionId: string, phraselistId: number, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deletePhraseList(appId: string, versionId: string, phraselistId: number, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - phraselistId, - options - }, - deletePhraseListOperationSpec, - callback) as Promise; - } - - /** - * Adds a new feature relation to be used by the intent in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param featureRelationCreateObject A Feature relation information object. - * @param [options] The optional parameters - * @returns Promise - */ - addIntentFeature(appId: string, versionId: string, intentId: string, featureRelationCreateObject: Models.ModelFeatureInformation, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param featureRelationCreateObject A Feature relation information object. - * @param callback The callback - */ - addIntentFeature(appId: string, versionId: string, intentId: string, featureRelationCreateObject: Models.ModelFeatureInformation, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param featureRelationCreateObject A Feature relation information object. - * @param options The optional parameters - * @param callback The callback - */ - addIntentFeature(appId: string, versionId: string, intentId: string, featureRelationCreateObject: Models.ModelFeatureInformation, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addIntentFeature(appId: string, versionId: string, intentId: string, featureRelationCreateObject: Models.ModelFeatureInformation, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - intentId, - featureRelationCreateObject, - options - }, - addIntentFeatureOperationSpec, - callback) as Promise; - } - - /** - * Adds a new feature relation to be used by the entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor ID. - * @param featureRelationCreateObject A Feature relation information object. - * @param [options] The optional parameters - * @returns Promise - */ - addEntityFeature(appId: string, versionId: string, entityId: string, featureRelationCreateObject: Models.ModelFeatureInformation, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor ID. - * @param featureRelationCreateObject A Feature relation information object. - * @param callback The callback - */ - addEntityFeature(appId: string, versionId: string, entityId: string, featureRelationCreateObject: Models.ModelFeatureInformation, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor ID. - * @param featureRelationCreateObject A Feature relation information object. - * @param options The optional parameters - * @param callback The callback - */ - addEntityFeature(appId: string, versionId: string, entityId: string, featureRelationCreateObject: Models.ModelFeatureInformation, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addEntityFeature(appId: string, versionId: string, entityId: string, featureRelationCreateObject: Models.ModelFeatureInformation, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - featureRelationCreateObject, - options - }, - addEntityFeatureOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const addPhraseListOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/phraselists", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - requestBody: { - parameterPath: "phraselistCreateObject", - mapper: { - ...Mappers.PhraselistCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Number" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listPhraseListsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/phraselists", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - queryParameters: [ - Parameters.skip, - Parameters.take - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PhraseListFeatureInfo" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/features", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - queryParameters: [ - Parameters.skip, - Parameters.take - ], - responses: { - 200: { - bodyMapper: Mappers.FeaturesResponseObject - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getPhraseListOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/phraselists/{phraselistId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.phraselistId - ], - responses: { - 200: { - bodyMapper: Mappers.PhraseListFeatureInfo - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updatePhraseListOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/phraselists/{phraselistId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.phraselistId - ], - requestBody: { - parameterPath: [ - "options", - "phraselistUpdateObject" - ], - mapper: Mappers.PhraselistUpdateObject - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deletePhraseListOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/phraselists/{phraselistId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.phraselistId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const addIntentFeatureOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/intents/{intentId}/features", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.intentId - ], - requestBody: { - parameterPath: "featureRelationCreateObject", - mapper: { - ...Mappers.ModelFeatureInformation, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const addEntityFeatureOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/entities/{entityId}/features", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - requestBody: { - parameterPath: "featureRelationCreateObject", - mapper: { - ...Mappers.ModelFeatureInformation, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/index.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/index.ts deleted file mode 100644 index 5d8f0ff7239e..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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. - */ - -export * from "./features"; -export * from "./examples"; -export * from "./model"; -export * from "./apps"; -export * from "./versions"; -export * from "./train"; -export * from "./pattern"; -export * from "./settings"; -export * from "./azureAccounts"; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/model.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/model.ts deleted file mode 100644 index 22317a290eb2..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/model.ts +++ /dev/null @@ -1,7282 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/modelMappers"; -import * as Parameters from "../models/parameters"; -import { LUISAuthoringClientContext } from "../lUISAuthoringClientContext"; - -/** Class representing a Model. */ -export class Model { - private readonly client: LUISAuthoringClientContext; - - /** - * Create a Model. - * @param {LUISAuthoringClientContext} client Reference to the service client. - */ - constructor(client: LUISAuthoringClientContext) { - this.client = client; - } - - /** - * Adds an intent to a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param intentCreateObject A model object containing the name of the new intent. - * @param [options] The optional parameters - * @returns Promise - */ - addIntent(appId: string, versionId: string, intentCreateObject: Models.ModelCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param intentCreateObject A model object containing the name of the new intent. - * @param callback The callback - */ - addIntent(appId: string, versionId: string, intentCreateObject: Models.ModelCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param intentCreateObject A model object containing the name of the new intent. - * @param options The optional parameters - * @param callback The callback - */ - addIntent(appId: string, versionId: string, intentCreateObject: Models.ModelCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addIntent(appId: string, versionId: string, intentCreateObject: Models.ModelCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - intentCreateObject, - options - }, - addIntentOperationSpec, - callback) as Promise; - } - - /** - * Gets information about the intent models in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - listIntents(appId: string, versionId: string, options?: Models.ModelListIntentsOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - listIntents(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - listIntents(appId: string, versionId: string, options: Models.ModelListIntentsOptionalParams, callback: msRest.ServiceCallback): void; - listIntents(appId: string, versionId: string, options?: Models.ModelListIntentsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - listIntentsOperationSpec, - callback) as Promise; - } - - /** - * Adds an entity extractor to a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityModelCreateObject A model object containing the name of the new entity extractor - * and its children. - * @param [options] The optional parameters - * @returns Promise - */ - addEntity(appId: string, versionId: string, entityModelCreateObject: Models.EntityModelCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityModelCreateObject A model object containing the name of the new entity extractor - * and its children. - * @param callback The callback - */ - addEntity(appId: string, versionId: string, entityModelCreateObject: Models.EntityModelCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityModelCreateObject A model object containing the name of the new entity extractor - * and its children. - * @param options The optional parameters - * @param callback The callback - */ - addEntity(appId: string, versionId: string, entityModelCreateObject: Models.EntityModelCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addEntity(appId: string, versionId: string, entityModelCreateObject: Models.EntityModelCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityModelCreateObject, - options - }, - addEntityOperationSpec, - callback) as Promise; - } - - /** - * Gets information about all the simple entity models in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - listEntities(appId: string, versionId: string, options?: Models.ModelListEntitiesOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - listEntities(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - listEntities(appId: string, versionId: string, options: Models.ModelListEntitiesOptionalParams, callback: msRest.ServiceCallback): void; - listEntities(appId: string, versionId: string, options?: Models.ModelListEntitiesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - listEntitiesOperationSpec, - callback) as Promise; - } - - /** - * Gets information about all the hierarchical entity models in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - listHierarchicalEntities(appId: string, versionId: string, options?: Models.ModelListHierarchicalEntitiesOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - listHierarchicalEntities(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - listHierarchicalEntities(appId: string, versionId: string, options: Models.ModelListHierarchicalEntitiesOptionalParams, callback: msRest.ServiceCallback): void; - listHierarchicalEntities(appId: string, versionId: string, options?: Models.ModelListHierarchicalEntitiesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - listHierarchicalEntitiesOperationSpec, - callback) as Promise; - } - - /** - * Gets information about all the composite entity models in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - listCompositeEntities(appId: string, versionId: string, options?: Models.ModelListCompositeEntitiesOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - listCompositeEntities(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - listCompositeEntities(appId: string, versionId: string, options: Models.ModelListCompositeEntitiesOptionalParams, callback: msRest.ServiceCallback): void; - listCompositeEntities(appId: string, versionId: string, options?: Models.ModelListCompositeEntitiesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - listCompositeEntitiesOperationSpec, - callback) as Promise; - } - - /** - * Gets information about all the list entity models in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - listClosedLists(appId: string, versionId: string, options?: Models.ModelListClosedListsOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - listClosedLists(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - listClosedLists(appId: string, versionId: string, options: Models.ModelListClosedListsOptionalParams, callback: msRest.ServiceCallback): void; - listClosedLists(appId: string, versionId: string, options?: Models.ModelListClosedListsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - listClosedListsOperationSpec, - callback) as Promise; - } - - /** - * Adds a list entity model to a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param closedListModelCreateObject A model containing the name and words for the new list entity - * extractor. - * @param [options] The optional parameters - * @returns Promise - */ - addClosedList(appId: string, versionId: string, closedListModelCreateObject: Models.ClosedListModelCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param closedListModelCreateObject A model containing the name and words for the new list entity - * extractor. - * @param callback The callback - */ - addClosedList(appId: string, versionId: string, closedListModelCreateObject: Models.ClosedListModelCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param closedListModelCreateObject A model containing the name and words for the new list entity - * extractor. - * @param options The optional parameters - * @param callback The callback - */ - addClosedList(appId: string, versionId: string, closedListModelCreateObject: Models.ClosedListModelCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addClosedList(appId: string, versionId: string, closedListModelCreateObject: Models.ClosedListModelCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - closedListModelCreateObject, - options - }, - addClosedListOperationSpec, - callback) as Promise; - } - - /** - * Adds a list of prebuilt entities to a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param prebuiltExtractorNames An array of prebuilt entity extractor names. - * @param [options] The optional parameters - * @returns Promise - */ - addPrebuilt(appId: string, versionId: string, prebuiltExtractorNames: string[], options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param prebuiltExtractorNames An array of prebuilt entity extractor names. - * @param callback The callback - */ - addPrebuilt(appId: string, versionId: string, prebuiltExtractorNames: string[], callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param prebuiltExtractorNames An array of prebuilt entity extractor names. - * @param options The optional parameters - * @param callback The callback - */ - addPrebuilt(appId: string, versionId: string, prebuiltExtractorNames: string[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addPrebuilt(appId: string, versionId: string, prebuiltExtractorNames: string[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - prebuiltExtractorNames, - options - }, - addPrebuiltOperationSpec, - callback) as Promise; - } - - /** - * Gets information about all the prebuilt entities in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - listPrebuilts(appId: string, versionId: string, options?: Models.ModelListPrebuiltsOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - listPrebuilts(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - listPrebuilts(appId: string, versionId: string, options: Models.ModelListPrebuiltsOptionalParams, callback: msRest.ServiceCallback): void; - listPrebuilts(appId: string, versionId: string, options?: Models.ModelListPrebuiltsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - listPrebuiltsOperationSpec, - callback) as Promise; - } - - /** - * Gets all the available prebuilt entities in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - listPrebuiltEntities(appId: string, versionId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - listPrebuiltEntities(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - listPrebuiltEntities(appId: string, versionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listPrebuiltEntities(appId: string, versionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - listPrebuiltEntitiesOperationSpec, - callback) as Promise; - } - - /** - * Gets information about all the intent and entity models in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - listModels(appId: string, versionId: string, options?: Models.ModelListModelsOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - listModels(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - listModels(appId: string, versionId: string, options: Models.ModelListModelsOptionalParams, callback: msRest.ServiceCallback): void; - listModels(appId: string, versionId: string, options?: Models.ModelListModelsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - listModelsOperationSpec, - callback) as Promise; - } - - /** - * Gets the example utterances for the given intent or entity model in a version of the - * application. - * @param appId The application ID. - * @param versionId The version ID. - * @param modelId The ID (GUID) of the model. - * @param [options] The optional parameters - * @returns Promise - */ - examplesMethod(appId: string, versionId: string, modelId: string, options?: Models.ModelExamplesMethodOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param modelId The ID (GUID) of the model. - * @param callback The callback - */ - examplesMethod(appId: string, versionId: string, modelId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param modelId The ID (GUID) of the model. - * @param options The optional parameters - * @param callback The callback - */ - examplesMethod(appId: string, versionId: string, modelId: string, options: Models.ModelExamplesMethodOptionalParams, callback: msRest.ServiceCallback): void; - examplesMethod(appId: string, versionId: string, modelId: string, options?: Models.ModelExamplesMethodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - modelId, - options - }, - examplesMethodOperationSpec, - callback) as Promise; - } - - /** - * Gets information about the intent model in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param [options] The optional parameters - * @returns Promise - */ - getIntent(appId: string, versionId: string, intentId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param callback The callback - */ - getIntent(appId: string, versionId: string, intentId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param options The optional parameters - * @param callback The callback - */ - getIntent(appId: string, versionId: string, intentId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getIntent(appId: string, versionId: string, intentId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - intentId, - options - }, - getIntentOperationSpec, - callback) as Promise; - } - - /** - * Updates the name of an intent in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param modelUpdateObject A model object containing the new intent name. - * @param [options] The optional parameters - * @returns Promise - */ - updateIntent(appId: string, versionId: string, intentId: string, modelUpdateObject: Models.ModelUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param modelUpdateObject A model object containing the new intent name. - * @param callback The callback - */ - updateIntent(appId: string, versionId: string, intentId: string, modelUpdateObject: Models.ModelUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param modelUpdateObject A model object containing the new intent name. - * @param options The optional parameters - * @param callback The callback - */ - updateIntent(appId: string, versionId: string, intentId: string, modelUpdateObject: Models.ModelUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateIntent(appId: string, versionId: string, intentId: string, modelUpdateObject: Models.ModelUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - intentId, - modelUpdateObject, - options - }, - updateIntentOperationSpec, - callback) as Promise; - } - - /** - * Deletes an intent from a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param [options] The optional parameters - * @returns Promise - */ - deleteIntent(appId: string, versionId: string, intentId: string, options?: Models.ModelDeleteIntentOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param callback The callback - */ - deleteIntent(appId: string, versionId: string, intentId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param options The optional parameters - * @param callback The callback - */ - deleteIntent(appId: string, versionId: string, intentId: string, options: Models.ModelDeleteIntentOptionalParams, callback: msRest.ServiceCallback): void; - deleteIntent(appId: string, versionId: string, intentId: string, options?: Models.ModelDeleteIntentOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - intentId, - options - }, - deleteIntentOperationSpec, - callback) as Promise; - } - - /** - * Gets information about an entity model in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor ID. - * @param [options] The optional parameters - * @returns Promise - */ - getEntity(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor ID. - * @param callback The callback - */ - getEntity(appId: string, versionId: string, entityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor ID. - * @param options The optional parameters - * @param callback The callback - */ - getEntity(appId: string, versionId: string, entityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getEntity(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - options - }, - getEntityOperationSpec, - callback) as Promise; - } - - /** - * Deletes an entity or a child from a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor or the child entity extractor ID. - * @param [options] The optional parameters - * @returns Promise - */ - deleteEntity(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor or the child entity extractor ID. - * @param callback The callback - */ - deleteEntity(appId: string, versionId: string, entityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor or the child entity extractor ID. - * @param options The optional parameters - * @param callback The callback - */ - deleteEntity(appId: string, versionId: string, entityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteEntity(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - options - }, - deleteEntityOperationSpec, - callback) as Promise; - } - - /** - * Updates the name of an entity extractor or the name and instanceOf model of a child entity - * extractor. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor or the child entity extractor ID. - * @param entityModelUpdateObject A model object containing the name new entity extractor or the - * name and instance of model of a child entity extractor - * @param [options] The optional parameters - * @returns Promise - */ - updateEntityChild(appId: string, versionId: string, entityId: string, entityModelUpdateObject: Models.EntityModelUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor or the child entity extractor ID. - * @param entityModelUpdateObject A model object containing the name new entity extractor or the - * name and instance of model of a child entity extractor - * @param callback The callback - */ - updateEntityChild(appId: string, versionId: string, entityId: string, entityModelUpdateObject: Models.EntityModelUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor or the child entity extractor ID. - * @param entityModelUpdateObject A model object containing the name new entity extractor or the - * name and instance of model of a child entity extractor - * @param options The optional parameters - * @param callback The callback - */ - updateEntityChild(appId: string, versionId: string, entityId: string, entityModelUpdateObject: Models.EntityModelUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateEntityChild(appId: string, versionId: string, entityId: string, entityModelUpdateObject: Models.EntityModelUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - entityModelUpdateObject, - options - }, - updateEntityChildOperationSpec, - callback) as Promise; - } - - /** - * Gets the information of the features used by the intent in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param [options] The optional parameters - * @returns Promise - */ - getIntentFeatures(appId: string, versionId: string, intentId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param callback The callback - */ - getIntentFeatures(appId: string, versionId: string, intentId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param options The optional parameters - * @param callback The callback - */ - getIntentFeatures(appId: string, versionId: string, intentId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getIntentFeatures(appId: string, versionId: string, intentId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - intentId, - options - }, - getIntentFeaturesOperationSpec, - callback) as Promise; - } - - /** - * Updates the information of the features used by the intent in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param featureRelationsUpdateObject A list of feature information objects containing the new - * feature relations. - * @param [options] The optional parameters - * @returns Promise - */ - replaceIntentFeatures(appId: string, versionId: string, intentId: string, featureRelationsUpdateObject: Models.ModelFeatureInformation[], options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param featureRelationsUpdateObject A list of feature information objects containing the new - * feature relations. - * @param callback The callback - */ - replaceIntentFeatures(appId: string, versionId: string, intentId: string, featureRelationsUpdateObject: Models.ModelFeatureInformation[], callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param featureRelationsUpdateObject A list of feature information objects containing the new - * feature relations. - * @param options The optional parameters - * @param callback The callback - */ - replaceIntentFeatures(appId: string, versionId: string, intentId: string, featureRelationsUpdateObject: Models.ModelFeatureInformation[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - replaceIntentFeatures(appId: string, versionId: string, intentId: string, featureRelationsUpdateObject: Models.ModelFeatureInformation[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - intentId, - featureRelationsUpdateObject, - options - }, - replaceIntentFeaturesOperationSpec, - callback) as Promise; - } - - /** - * Deletes a relation from the feature relations used by the intent in a version of the - * application. - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param featureRelationDeleteObject A feature information object containing the feature relation - * to delete. - * @param [options] The optional parameters - * @returns Promise - */ - deleteIntentFeature(appId: string, versionId: string, intentId: string, featureRelationDeleteObject: Models.ModelFeatureInformation, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param featureRelationDeleteObject A feature information object containing the feature relation - * to delete. - * @param callback The callback - */ - deleteIntentFeature(appId: string, versionId: string, intentId: string, featureRelationDeleteObject: Models.ModelFeatureInformation, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param featureRelationDeleteObject A feature information object containing the feature relation - * to delete. - * @param options The optional parameters - * @param callback The callback - */ - deleteIntentFeature(appId: string, versionId: string, intentId: string, featureRelationDeleteObject: Models.ModelFeatureInformation, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteIntentFeature(appId: string, versionId: string, intentId: string, featureRelationDeleteObject: Models.ModelFeatureInformation, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - intentId, - featureRelationDeleteObject, - options - }, - deleteIntentFeatureOperationSpec, - callback) as Promise; - } - - /** - * Gets the information of the features used by the entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor ID. - * @param [options] The optional parameters - * @returns Promise - */ - getEntityFeatures(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor ID. - * @param callback The callback - */ - getEntityFeatures(appId: string, versionId: string, entityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor ID. - * @param options The optional parameters - * @param callback The callback - */ - getEntityFeatures(appId: string, versionId: string, entityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getEntityFeatures(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - options - }, - getEntityFeaturesOperationSpec, - callback) as Promise; - } - - /** - * Updates the information of the features used by the entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor ID. - * @param featureRelationsUpdateObject A list of feature information objects containing the new - * feature relations. - * @param [options] The optional parameters - * @returns Promise - */ - replaceEntityFeatures(appId: string, versionId: string, entityId: string, featureRelationsUpdateObject: Models.ModelFeatureInformation[], options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor ID. - * @param featureRelationsUpdateObject A list of feature information objects containing the new - * feature relations. - * @param callback The callback - */ - replaceEntityFeatures(appId: string, versionId: string, entityId: string, featureRelationsUpdateObject: Models.ModelFeatureInformation[], callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor ID. - * @param featureRelationsUpdateObject A list of feature information objects containing the new - * feature relations. - * @param options The optional parameters - * @param callback The callback - */ - replaceEntityFeatures(appId: string, versionId: string, entityId: string, featureRelationsUpdateObject: Models.ModelFeatureInformation[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - replaceEntityFeatures(appId: string, versionId: string, entityId: string, featureRelationsUpdateObject: Models.ModelFeatureInformation[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - featureRelationsUpdateObject, - options - }, - replaceEntityFeaturesOperationSpec, - callback) as Promise; - } - - /** - * Deletes a relation from the feature relations used by the entity in a version of the - * application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor ID. - * @param featureRelationDeleteObject A feature information object containing the feature relation - * to delete. - * @param [options] The optional parameters - * @returns Promise - */ - deleteEntityFeature(appId: string, versionId: string, entityId: string, featureRelationDeleteObject: Models.ModelFeatureInformation, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor ID. - * @param featureRelationDeleteObject A feature information object containing the feature relation - * to delete. - * @param callback The callback - */ - deleteEntityFeature(appId: string, versionId: string, entityId: string, featureRelationDeleteObject: Models.ModelFeatureInformation, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor ID. - * @param featureRelationDeleteObject A feature information object containing the feature relation - * to delete. - * @param options The optional parameters - * @param callback The callback - */ - deleteEntityFeature(appId: string, versionId: string, entityId: string, featureRelationDeleteObject: Models.ModelFeatureInformation, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteEntityFeature(appId: string, versionId: string, entityId: string, featureRelationDeleteObject: Models.ModelFeatureInformation, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - featureRelationDeleteObject, - options - }, - deleteEntityFeatureOperationSpec, - callback) as Promise; - } - - /** - * Gets information about a hierarchical entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param [options] The optional parameters - * @returns Promise - */ - getHierarchicalEntity(appId: string, versionId: string, hEntityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param callback The callback - */ - getHierarchicalEntity(appId: string, versionId: string, hEntityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param options The optional parameters - * @param callback The callback - */ - getHierarchicalEntity(appId: string, versionId: string, hEntityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getHierarchicalEntity(appId: string, versionId: string, hEntityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - hEntityId, - options - }, - getHierarchicalEntityOperationSpec, - callback) as Promise; - } - - /** - * Updates the name of a hierarchical entity model in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param modelUpdateObject Model containing names of the hierarchical entity. - * @param [options] The optional parameters - * @returns Promise - */ - updateHierarchicalEntity(appId: string, versionId: string, hEntityId: string, modelUpdateObject: Models.ModelUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param modelUpdateObject Model containing names of the hierarchical entity. - * @param callback The callback - */ - updateHierarchicalEntity(appId: string, versionId: string, hEntityId: string, modelUpdateObject: Models.ModelUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param modelUpdateObject Model containing names of the hierarchical entity. - * @param options The optional parameters - * @param callback The callback - */ - updateHierarchicalEntity(appId: string, versionId: string, hEntityId: string, modelUpdateObject: Models.ModelUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateHierarchicalEntity(appId: string, versionId: string, hEntityId: string, modelUpdateObject: Models.ModelUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - hEntityId, - modelUpdateObject, - options - }, - updateHierarchicalEntityOperationSpec, - callback) as Promise; - } - - /** - * Deletes a hierarchical entity from a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param [options] The optional parameters - * @returns Promise - */ - deleteHierarchicalEntity(appId: string, versionId: string, hEntityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param callback The callback - */ - deleteHierarchicalEntity(appId: string, versionId: string, hEntityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param options The optional parameters - * @param callback The callback - */ - deleteHierarchicalEntity(appId: string, versionId: string, hEntityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteHierarchicalEntity(appId: string, versionId: string, hEntityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - hEntityId, - options - }, - deleteHierarchicalEntityOperationSpec, - callback) as Promise; - } - - /** - * Gets information about a composite entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param [options] The optional parameters - * @returns Promise - */ - getCompositeEntity(appId: string, versionId: string, cEntityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param callback The callback - */ - getCompositeEntity(appId: string, versionId: string, cEntityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param options The optional parameters - * @param callback The callback - */ - getCompositeEntity(appId: string, versionId: string, cEntityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getCompositeEntity(appId: string, versionId: string, cEntityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - cEntityId, - options - }, - getCompositeEntityOperationSpec, - callback) as Promise; - } - - /** - * Updates a composite entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param compositeModelUpdateObject A model object containing the new entity extractor name and - * children. - * @param [options] The optional parameters - * @returns Promise - */ - updateCompositeEntity(appId: string, versionId: string, cEntityId: string, compositeModelUpdateObject: Models.CompositeEntityModel, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param compositeModelUpdateObject A model object containing the new entity extractor name and - * children. - * @param callback The callback - */ - updateCompositeEntity(appId: string, versionId: string, cEntityId: string, compositeModelUpdateObject: Models.CompositeEntityModel, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param compositeModelUpdateObject A model object containing the new entity extractor name and - * children. - * @param options The optional parameters - * @param callback The callback - */ - updateCompositeEntity(appId: string, versionId: string, cEntityId: string, compositeModelUpdateObject: Models.CompositeEntityModel, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateCompositeEntity(appId: string, versionId: string, cEntityId: string, compositeModelUpdateObject: Models.CompositeEntityModel, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - cEntityId, - compositeModelUpdateObject, - options - }, - updateCompositeEntityOperationSpec, - callback) as Promise; - } - - /** - * Deletes a composite entity from a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param [options] The optional parameters - * @returns Promise - */ - deleteCompositeEntity(appId: string, versionId: string, cEntityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param callback The callback - */ - deleteCompositeEntity(appId: string, versionId: string, cEntityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param options The optional parameters - * @param callback The callback - */ - deleteCompositeEntity(appId: string, versionId: string, cEntityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteCompositeEntity(appId: string, versionId: string, cEntityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - cEntityId, - options - }, - deleteCompositeEntityOperationSpec, - callback) as Promise; - } - - /** - * Gets information about a list entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param clEntityId The list model ID. - * @param [options] The optional parameters - * @returns Promise - */ - getClosedList(appId: string, versionId: string, clEntityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param clEntityId The list model ID. - * @param callback The callback - */ - getClosedList(appId: string, versionId: string, clEntityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param clEntityId The list model ID. - * @param options The optional parameters - * @param callback The callback - */ - getClosedList(appId: string, versionId: string, clEntityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getClosedList(appId: string, versionId: string, clEntityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - clEntityId, - options - }, - getClosedListOperationSpec, - callback) as Promise; - } - - /** - * Updates the list entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param clEntityId The list model ID. - * @param closedListModelUpdateObject The new list entity name and words list. - * @param [options] The optional parameters - * @returns Promise - */ - updateClosedList(appId: string, versionId: string, clEntityId: string, closedListModelUpdateObject: Models.ClosedListModelUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param clEntityId The list model ID. - * @param closedListModelUpdateObject The new list entity name and words list. - * @param callback The callback - */ - updateClosedList(appId: string, versionId: string, clEntityId: string, closedListModelUpdateObject: Models.ClosedListModelUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param clEntityId The list model ID. - * @param closedListModelUpdateObject The new list entity name and words list. - * @param options The optional parameters - * @param callback The callback - */ - updateClosedList(appId: string, versionId: string, clEntityId: string, closedListModelUpdateObject: Models.ClosedListModelUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateClosedList(appId: string, versionId: string, clEntityId: string, closedListModelUpdateObject: Models.ClosedListModelUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - clEntityId, - closedListModelUpdateObject, - options - }, - updateClosedListOperationSpec, - callback) as Promise; - } - - /** - * Adds a batch of sublists to an existing list entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param clEntityId The list entity model ID. - * @param closedListModelPatchObject A words list batch. - * @param [options] The optional parameters - * @returns Promise - */ - patchClosedList(appId: string, versionId: string, clEntityId: string, closedListModelPatchObject: Models.ClosedListModelPatchObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param clEntityId The list entity model ID. - * @param closedListModelPatchObject A words list batch. - * @param callback The callback - */ - patchClosedList(appId: string, versionId: string, clEntityId: string, closedListModelPatchObject: Models.ClosedListModelPatchObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param clEntityId The list entity model ID. - * @param closedListModelPatchObject A words list batch. - * @param options The optional parameters - * @param callback The callback - */ - patchClosedList(appId: string, versionId: string, clEntityId: string, closedListModelPatchObject: Models.ClosedListModelPatchObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - patchClosedList(appId: string, versionId: string, clEntityId: string, closedListModelPatchObject: Models.ClosedListModelPatchObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - clEntityId, - closedListModelPatchObject, - options - }, - patchClosedListOperationSpec, - callback) as Promise; - } - - /** - * Deletes a list entity model from a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param clEntityId The list entity model ID. - * @param [options] The optional parameters - * @returns Promise - */ - deleteClosedList(appId: string, versionId: string, clEntityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param clEntityId The list entity model ID. - * @param callback The callback - */ - deleteClosedList(appId: string, versionId: string, clEntityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param clEntityId The list entity model ID. - * @param options The optional parameters - * @param callback The callback - */ - deleteClosedList(appId: string, versionId: string, clEntityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteClosedList(appId: string, versionId: string, clEntityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - clEntityId, - options - }, - deleteClosedListOperationSpec, - callback) as Promise; - } - - /** - * Gets information about a prebuilt entity model in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param prebuiltId The prebuilt entity extractor ID. - * @param [options] The optional parameters - * @returns Promise - */ - getPrebuilt(appId: string, versionId: string, prebuiltId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param prebuiltId The prebuilt entity extractor ID. - * @param callback The callback - */ - getPrebuilt(appId: string, versionId: string, prebuiltId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param prebuiltId The prebuilt entity extractor ID. - * @param options The optional parameters - * @param callback The callback - */ - getPrebuilt(appId: string, versionId: string, prebuiltId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getPrebuilt(appId: string, versionId: string, prebuiltId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - prebuiltId, - options - }, - getPrebuiltOperationSpec, - callback) as Promise; - } - - /** - * Deletes a prebuilt entity extractor from a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param prebuiltId The prebuilt entity extractor ID. - * @param [options] The optional parameters - * @returns Promise - */ - deletePrebuilt(appId: string, versionId: string, prebuiltId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param prebuiltId The prebuilt entity extractor ID. - * @param callback The callback - */ - deletePrebuilt(appId: string, versionId: string, prebuiltId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param prebuiltId The prebuilt entity extractor ID. - * @param options The optional parameters - * @param callback The callback - */ - deletePrebuilt(appId: string, versionId: string, prebuiltId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deletePrebuilt(appId: string, versionId: string, prebuiltId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - prebuiltId, - options - }, - deletePrebuiltOperationSpec, - callback) as Promise; - } - - /** - * Deletes a sublist of a specific list entity model from a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param clEntityId The list entity extractor ID. - * @param subListId The sublist ID. - * @param [options] The optional parameters - * @returns Promise - */ - deleteSubList(appId: string, versionId: string, clEntityId: string, subListId: number, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param clEntityId The list entity extractor ID. - * @param subListId The sublist ID. - * @param callback The callback - */ - deleteSubList(appId: string, versionId: string, clEntityId: string, subListId: number, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param clEntityId The list entity extractor ID. - * @param subListId The sublist ID. - * @param options The optional parameters - * @param callback The callback - */ - deleteSubList(appId: string, versionId: string, clEntityId: string, subListId: number, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteSubList(appId: string, versionId: string, clEntityId: string, subListId: number, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - clEntityId, - subListId, - options - }, - deleteSubListOperationSpec, - callback) as Promise; - } - - /** - * Updates one of the list entity's sublists in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param clEntityId The list entity extractor ID. - * @param subListId The sublist ID. - * @param wordListBaseUpdateObject A sublist update object containing the new canonical form and - * the list of words. - * @param [options] The optional parameters - * @returns Promise - */ - updateSubList(appId: string, versionId: string, clEntityId: string, subListId: number, wordListBaseUpdateObject: Models.WordListBaseUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param clEntityId The list entity extractor ID. - * @param subListId The sublist ID. - * @param wordListBaseUpdateObject A sublist update object containing the new canonical form and - * the list of words. - * @param callback The callback - */ - updateSubList(appId: string, versionId: string, clEntityId: string, subListId: number, wordListBaseUpdateObject: Models.WordListBaseUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param clEntityId The list entity extractor ID. - * @param subListId The sublist ID. - * @param wordListBaseUpdateObject A sublist update object containing the new canonical form and - * the list of words. - * @param options The optional parameters - * @param callback The callback - */ - updateSubList(appId: string, versionId: string, clEntityId: string, subListId: number, wordListBaseUpdateObject: Models.WordListBaseUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateSubList(appId: string, versionId: string, clEntityId: string, subListId: number, wordListBaseUpdateObject: Models.WordListBaseUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - clEntityId, - subListId, - wordListBaseUpdateObject, - options - }, - updateSubListOperationSpec, - callback) as Promise; - } - - /** - * Suggests example utterances that would improve the accuracy of the intent model in a version of - * the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param [options] The optional parameters - * @returns Promise - */ - listIntentSuggestions(appId: string, versionId: string, intentId: string, options?: Models.ModelListIntentSuggestionsOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param callback The callback - */ - listIntentSuggestions(appId: string, versionId: string, intentId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param options The optional parameters - * @param callback The callback - */ - listIntentSuggestions(appId: string, versionId: string, intentId: string, options: Models.ModelListIntentSuggestionsOptionalParams, callback: msRest.ServiceCallback): void; - listIntentSuggestions(appId: string, versionId: string, intentId: string, options?: Models.ModelListIntentSuggestionsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - intentId, - options - }, - listIntentSuggestionsOperationSpec, - callback) as Promise; - } - - /** - * Get suggested example utterances that would improve the accuracy of the entity model in a - * version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The target entity extractor model to enhance. - * @param [options] The optional parameters - * @returns Promise - */ - listEntitySuggestions(appId: string, versionId: string, entityId: string, options?: Models.ModelListEntitySuggestionsOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The target entity extractor model to enhance. - * @param callback The callback - */ - listEntitySuggestions(appId: string, versionId: string, entityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The target entity extractor model to enhance. - * @param options The optional parameters - * @param callback The callback - */ - listEntitySuggestions(appId: string, versionId: string, entityId: string, options: Models.ModelListEntitySuggestionsOptionalParams, callback: msRest.ServiceCallback): void; - listEntitySuggestions(appId: string, versionId: string, entityId: string, options?: Models.ModelListEntitySuggestionsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - options - }, - listEntitySuggestionsOperationSpec, - callback) as Promise; - } - - /** - * Adds a sublist to an existing list entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param clEntityId The list entity extractor ID. - * @param wordListCreateObject Words list. - * @param [options] The optional parameters - * @returns Promise - */ - addSubList(appId: string, versionId: string, clEntityId: string, wordListCreateObject: Models.WordListObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param clEntityId The list entity extractor ID. - * @param wordListCreateObject Words list. - * @param callback The callback - */ - addSubList(appId: string, versionId: string, clEntityId: string, wordListCreateObject: Models.WordListObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param clEntityId The list entity extractor ID. - * @param wordListCreateObject Words list. - * @param options The optional parameters - * @param callback The callback - */ - addSubList(appId: string, versionId: string, clEntityId: string, wordListCreateObject: Models.WordListObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addSubList(appId: string, versionId: string, clEntityId: string, wordListCreateObject: Models.WordListObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - clEntityId, - wordListCreateObject, - options - }, - addSubListOperationSpec, - callback) as Promise; - } - - /** - * Adds a customizable prebuilt domain along with all of its intent and entity models in a version - * of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param prebuiltDomainObject A prebuilt domain create object containing the name of the domain. - * @param [options] The optional parameters - * @returns Promise - */ - addCustomPrebuiltDomain(appId: string, versionId: string, prebuiltDomainObject: Models.PrebuiltDomainCreateBaseObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param prebuiltDomainObject A prebuilt domain create object containing the name of the domain. - * @param callback The callback - */ - addCustomPrebuiltDomain(appId: string, versionId: string, prebuiltDomainObject: Models.PrebuiltDomainCreateBaseObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param prebuiltDomainObject A prebuilt domain create object containing the name of the domain. - * @param options The optional parameters - * @param callback The callback - */ - addCustomPrebuiltDomain(appId: string, versionId: string, prebuiltDomainObject: Models.PrebuiltDomainCreateBaseObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addCustomPrebuiltDomain(appId: string, versionId: string, prebuiltDomainObject: Models.PrebuiltDomainCreateBaseObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - prebuiltDomainObject, - options - }, - addCustomPrebuiltDomainOperationSpec, - callback) as Promise; - } - - /** - * Adds a customizable prebuilt intent model to a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param prebuiltDomainModelCreateObject A model object containing the name of the customizable - * prebuilt intent and the name of the domain to which this model belongs. - * @param [options] The optional parameters - * @returns Promise - */ - addCustomPrebuiltIntent(appId: string, versionId: string, prebuiltDomainModelCreateObject: Models.PrebuiltDomainModelCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param prebuiltDomainModelCreateObject A model object containing the name of the customizable - * prebuilt intent and the name of the domain to which this model belongs. - * @param callback The callback - */ - addCustomPrebuiltIntent(appId: string, versionId: string, prebuiltDomainModelCreateObject: Models.PrebuiltDomainModelCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param prebuiltDomainModelCreateObject A model object containing the name of the customizable - * prebuilt intent and the name of the domain to which this model belongs. - * @param options The optional parameters - * @param callback The callback - */ - addCustomPrebuiltIntent(appId: string, versionId: string, prebuiltDomainModelCreateObject: Models.PrebuiltDomainModelCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addCustomPrebuiltIntent(appId: string, versionId: string, prebuiltDomainModelCreateObject: Models.PrebuiltDomainModelCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - prebuiltDomainModelCreateObject, - options - }, - addCustomPrebuiltIntentOperationSpec, - callback) as Promise; - } - - /** - * Gets information about customizable prebuilt intents added to a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - listCustomPrebuiltIntents(appId: string, versionId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - listCustomPrebuiltIntents(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - listCustomPrebuiltIntents(appId: string, versionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listCustomPrebuiltIntents(appId: string, versionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - listCustomPrebuiltIntentsOperationSpec, - callback) as Promise; - } - - /** - * Adds a prebuilt entity model to a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param prebuiltDomainModelCreateObject A model object containing the name of the prebuilt entity - * and the name of the domain to which this model belongs. - * @param [options] The optional parameters - * @returns Promise - */ - addCustomPrebuiltEntity(appId: string, versionId: string, prebuiltDomainModelCreateObject: Models.PrebuiltDomainModelCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param prebuiltDomainModelCreateObject A model object containing the name of the prebuilt entity - * and the name of the domain to which this model belongs. - * @param callback The callback - */ - addCustomPrebuiltEntity(appId: string, versionId: string, prebuiltDomainModelCreateObject: Models.PrebuiltDomainModelCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param prebuiltDomainModelCreateObject A model object containing the name of the prebuilt entity - * and the name of the domain to which this model belongs. - * @param options The optional parameters - * @param callback The callback - */ - addCustomPrebuiltEntity(appId: string, versionId: string, prebuiltDomainModelCreateObject: Models.PrebuiltDomainModelCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addCustomPrebuiltEntity(appId: string, versionId: string, prebuiltDomainModelCreateObject: Models.PrebuiltDomainModelCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - prebuiltDomainModelCreateObject, - options - }, - addCustomPrebuiltEntityOperationSpec, - callback) as Promise; - } - - /** - * Gets all prebuilt entities used in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - listCustomPrebuiltEntities(appId: string, versionId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - listCustomPrebuiltEntities(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - listCustomPrebuiltEntities(appId: string, versionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listCustomPrebuiltEntities(appId: string, versionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - listCustomPrebuiltEntitiesOperationSpec, - callback) as Promise; - } - - /** - * Gets all prebuilt intent and entity model information used in a version of this application. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - listCustomPrebuiltModels(appId: string, versionId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - listCustomPrebuiltModels(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - listCustomPrebuiltModels(appId: string, versionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listCustomPrebuiltModels(appId: string, versionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - listCustomPrebuiltModelsOperationSpec, - callback) as Promise; - } - - /** - * Deletes a prebuilt domain's models in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param domainName Domain name. - * @param [options] The optional parameters - * @returns Promise - */ - deleteCustomPrebuiltDomain(appId: string, versionId: string, domainName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param domainName Domain name. - * @param callback The callback - */ - deleteCustomPrebuiltDomain(appId: string, versionId: string, domainName: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param domainName Domain name. - * @param options The optional parameters - * @param callback The callback - */ - deleteCustomPrebuiltDomain(appId: string, versionId: string, domainName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteCustomPrebuiltDomain(appId: string, versionId: string, domainName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - domainName, - options - }, - deleteCustomPrebuiltDomainOperationSpec, - callback) as Promise; - } - - /** - * Creates a single child in an existing entity model hierarchy in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor ID. - * @param childEntityModelCreateObject A model object containing the name of the new child model - * and its children. - * @param [options] The optional parameters - * @returns Promise - */ - addEntityChild(appId: string, versionId: string, entityId: string, childEntityModelCreateObject: Models.ChildEntityModelCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor ID. - * @param childEntityModelCreateObject A model object containing the name of the new child model - * and its children. - * @param callback The callback - */ - addEntityChild(appId: string, versionId: string, entityId: string, childEntityModelCreateObject: Models.ChildEntityModelCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor ID. - * @param childEntityModelCreateObject A model object containing the name of the new child model - * and its children. - * @param options The optional parameters - * @param callback The callback - */ - addEntityChild(appId: string, versionId: string, entityId: string, childEntityModelCreateObject: Models.ChildEntityModelCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addEntityChild(appId: string, versionId: string, entityId: string, childEntityModelCreateObject: Models.ChildEntityModelCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - childEntityModelCreateObject, - options - }, - addEntityChildOperationSpec, - callback) as Promise; - } - - /** - * Gets information about the child's model contained in an hierarchical entity child model in a - * version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param hChildId The hierarchical entity extractor child ID. - * @param [options] The optional parameters - * @returns Promise - */ - getHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param hChildId The hierarchical entity extractor child ID. - * @param callback The callback - */ - getHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param hChildId The hierarchical entity extractor child ID. - * @param options The optional parameters - * @param callback The callback - */ - getHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - hEntityId, - hChildId, - options - }, - getHierarchicalEntityChildOperationSpec, - callback) as Promise; - } - - /** - * Renames a single child in an existing hierarchical entity model in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param hChildId The hierarchical entity extractor child ID. - * @param hierarchicalChildModelUpdateObject Model object containing new name of the hierarchical - * entity child. - * @param [options] The optional parameters - * @returns Promise - */ - updateHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, hierarchicalChildModelUpdateObject: Models.HierarchicalChildModelUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param hChildId The hierarchical entity extractor child ID. - * @param hierarchicalChildModelUpdateObject Model object containing new name of the hierarchical - * entity child. - * @param callback The callback - */ - updateHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, hierarchicalChildModelUpdateObject: Models.HierarchicalChildModelUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param hChildId The hierarchical entity extractor child ID. - * @param hierarchicalChildModelUpdateObject Model object containing new name of the hierarchical - * entity child. - * @param options The optional parameters - * @param callback The callback - */ - updateHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, hierarchicalChildModelUpdateObject: Models.HierarchicalChildModelUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, hierarchicalChildModelUpdateObject: Models.HierarchicalChildModelUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - hEntityId, - hChildId, - hierarchicalChildModelUpdateObject, - options - }, - updateHierarchicalEntityChildOperationSpec, - callback) as Promise; - } - - /** - * Deletes a hierarchical entity extractor child in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param hChildId The hierarchical entity extractor child ID. - * @param [options] The optional parameters - * @returns Promise - */ - deleteHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param hChildId The hierarchical entity extractor child ID. - * @param callback The callback - */ - deleteHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param hChildId The hierarchical entity extractor child ID. - * @param options The optional parameters - * @param callback The callback - */ - deleteHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteHierarchicalEntityChild(appId: string, versionId: string, hEntityId: string, hChildId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - hEntityId, - hChildId, - options - }, - deleteHierarchicalEntityChildOperationSpec, - callback) as Promise; - } - - /** - * Creates a single child in an existing composite entity model in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param compositeChildModelCreateObject A model object containing the name of the new composite - * child model. - * @param [options] The optional parameters - * @returns Promise - */ - addCompositeEntityChild(appId: string, versionId: string, cEntityId: string, compositeChildModelCreateObject: Models.CompositeChildModelCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param compositeChildModelCreateObject A model object containing the name of the new composite - * child model. - * @param callback The callback - */ - addCompositeEntityChild(appId: string, versionId: string, cEntityId: string, compositeChildModelCreateObject: Models.CompositeChildModelCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param compositeChildModelCreateObject A model object containing the name of the new composite - * child model. - * @param options The optional parameters - * @param callback The callback - */ - addCompositeEntityChild(appId: string, versionId: string, cEntityId: string, compositeChildModelCreateObject: Models.CompositeChildModelCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addCompositeEntityChild(appId: string, versionId: string, cEntityId: string, compositeChildModelCreateObject: Models.CompositeChildModelCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - cEntityId, - compositeChildModelCreateObject, - options - }, - addCompositeEntityChildOperationSpec, - callback) as Promise; - } - - /** - * Deletes a composite entity extractor child from a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param cChildId The hierarchical entity extractor child ID. - * @param [options] The optional parameters - * @returns Promise - */ - deleteCompositeEntityChild(appId: string, versionId: string, cEntityId: string, cChildId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param cChildId The hierarchical entity extractor child ID. - * @param callback The callback - */ - deleteCompositeEntityChild(appId: string, versionId: string, cEntityId: string, cChildId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param cChildId The hierarchical entity extractor child ID. - * @param options The optional parameters - * @param callback The callback - */ - deleteCompositeEntityChild(appId: string, versionId: string, cEntityId: string, cChildId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteCompositeEntityChild(appId: string, versionId: string, cEntityId: string, cChildId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - cEntityId, - cChildId, - options - }, - deleteCompositeEntityChildOperationSpec, - callback) as Promise; - } - - /** - * @summary Gets information about the regular expression entity models in a version of the - * application. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - listRegexEntityInfos(appId: string, versionId: string, options?: Models.ModelListRegexEntityInfosOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - listRegexEntityInfos(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - listRegexEntityInfos(appId: string, versionId: string, options: Models.ModelListRegexEntityInfosOptionalParams, callback: msRest.ServiceCallback): void; - listRegexEntityInfos(appId: string, versionId: string, options?: Models.ModelListRegexEntityInfosOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - listRegexEntityInfosOperationSpec, - callback) as Promise; - } - - /** - * @summary Adds a regular expression entity model to a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param regexEntityExtractorCreateObj A model object containing the name and regex pattern for - * the new regular expression entity extractor. - * @param [options] The optional parameters - * @returns Promise - */ - createRegexEntityModel(appId: string, versionId: string, regexEntityExtractorCreateObj: Models.RegexModelCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param regexEntityExtractorCreateObj A model object containing the name and regex pattern for - * the new regular expression entity extractor. - * @param callback The callback - */ - createRegexEntityModel(appId: string, versionId: string, regexEntityExtractorCreateObj: Models.RegexModelCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param regexEntityExtractorCreateObj A model object containing the name and regex pattern for - * the new regular expression entity extractor. - * @param options The optional parameters - * @param callback The callback - */ - createRegexEntityModel(appId: string, versionId: string, regexEntityExtractorCreateObj: Models.RegexModelCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createRegexEntityModel(appId: string, versionId: string, regexEntityExtractorCreateObj: Models.RegexModelCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - regexEntityExtractorCreateObj, - options - }, - createRegexEntityModelOperationSpec, - callback) as Promise; - } - - /** - * @summary Get information about the Pattern.Any entity models in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - listPatternAnyEntityInfos(appId: string, versionId: string, options?: Models.ModelListPatternAnyEntityInfosOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - listPatternAnyEntityInfos(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - listPatternAnyEntityInfos(appId: string, versionId: string, options: Models.ModelListPatternAnyEntityInfosOptionalParams, callback: msRest.ServiceCallback): void; - listPatternAnyEntityInfos(appId: string, versionId: string, options?: Models.ModelListPatternAnyEntityInfosOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - listPatternAnyEntityInfosOperationSpec, - callback) as Promise; - } - - /** - * @summary Adds a pattern.any entity extractor to a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param extractorCreateObject A model object containing the name and explicit list for the new - * Pattern.Any entity extractor. - * @param [options] The optional parameters - * @returns Promise - */ - createPatternAnyEntityModel(appId: string, versionId: string, extractorCreateObject: Models.PatternAnyModelCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param extractorCreateObject A model object containing the name and explicit list for the new - * Pattern.Any entity extractor. - * @param callback The callback - */ - createPatternAnyEntityModel(appId: string, versionId: string, extractorCreateObject: Models.PatternAnyModelCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param extractorCreateObject A model object containing the name and explicit list for the new - * Pattern.Any entity extractor. - * @param options The optional parameters - * @param callback The callback - */ - createPatternAnyEntityModel(appId: string, versionId: string, extractorCreateObject: Models.PatternAnyModelCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createPatternAnyEntityModel(appId: string, versionId: string, extractorCreateObject: Models.PatternAnyModelCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - extractorCreateObject, - options - }, - createPatternAnyEntityModelOperationSpec, - callback) as Promise; - } - - /** - * @summary Get all roles for an entity in a version of the application - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity Id - * @param [options] The optional parameters - * @returns Promise - */ - listEntityRoles(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity Id - * @param callback The callback - */ - listEntityRoles(appId: string, versionId: string, entityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity Id - * @param options The optional parameters - * @param callback The callback - */ - listEntityRoles(appId: string, versionId: string, entityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listEntityRoles(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - options - }, - listEntityRolesOperationSpec, - callback) as Promise; - } - - /** - * @summary Create an entity role in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity model ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param [options] The optional parameters - * @returns Promise - */ - createEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity model ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param callback The callback - */ - createEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity model ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param options The optional parameters - * @param callback The callback - */ - createEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - entityRoleCreateObject, - options - }, - createEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Get a prebuilt entity's roles in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity Id - * @param [options] The optional parameters - * @returns Promise - */ - listPrebuiltEntityRoles(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity Id - * @param callback The callback - */ - listPrebuiltEntityRoles(appId: string, versionId: string, entityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity Id - * @param options The optional parameters - * @param callback The callback - */ - listPrebuiltEntityRoles(appId: string, versionId: string, entityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listPrebuiltEntityRoles(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - options - }, - listPrebuiltEntityRolesOperationSpec, - callback) as Promise; - } - - /** - * @summary Create a role for a prebuilt entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity model ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param [options] The optional parameters - * @returns Promise - */ - createPrebuiltEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity model ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param callback The callback - */ - createPrebuiltEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity model ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param options The optional parameters - * @param callback The callback - */ - createPrebuiltEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createPrebuiltEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - entityRoleCreateObject, - options - }, - createPrebuiltEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Get all roles for a list entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity Id - * @param [options] The optional parameters - * @returns Promise - */ - listClosedListEntityRoles(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity Id - * @param callback The callback - */ - listClosedListEntityRoles(appId: string, versionId: string, entityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity Id - * @param options The optional parameters - * @param callback The callback - */ - listClosedListEntityRoles(appId: string, versionId: string, entityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listClosedListEntityRoles(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - options - }, - listClosedListEntityRolesOperationSpec, - callback) as Promise; - } - - /** - * @summary Create a role for a list entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity model ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param [options] The optional parameters - * @returns Promise - */ - createClosedListEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity model ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param callback The callback - */ - createClosedListEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity model ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param options The optional parameters - * @param callback The callback - */ - createClosedListEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createClosedListEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - entityRoleCreateObject, - options - }, - createClosedListEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Get all roles for a regular expression entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity Id - * @param [options] The optional parameters - * @returns Promise - */ - listRegexEntityRoles(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity Id - * @param callback The callback - */ - listRegexEntityRoles(appId: string, versionId: string, entityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity Id - * @param options The optional parameters - * @param callback The callback - */ - listRegexEntityRoles(appId: string, versionId: string, entityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listRegexEntityRoles(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - options - }, - listRegexEntityRolesOperationSpec, - callback) as Promise; - } - - /** - * @summary Create a role for an regular expression entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity model ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param [options] The optional parameters - * @returns Promise - */ - createRegexEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity model ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param callback The callback - */ - createRegexEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity model ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param options The optional parameters - * @param callback The callback - */ - createRegexEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createRegexEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - entityRoleCreateObject, - options - }, - createRegexEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Get all roles for a composite entity in a version of the application - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param [options] The optional parameters - * @returns Promise - */ - listCompositeEntityRoles(appId: string, versionId: string, cEntityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param callback The callback - */ - listCompositeEntityRoles(appId: string, versionId: string, cEntityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param options The optional parameters - * @param callback The callback - */ - listCompositeEntityRoles(appId: string, versionId: string, cEntityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listCompositeEntityRoles(appId: string, versionId: string, cEntityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - cEntityId, - options - }, - listCompositeEntityRolesOperationSpec, - callback) as Promise; - } - - /** - * @summary Create a role for a composite entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param [options] The optional parameters - * @returns Promise - */ - createCompositeEntityRole(appId: string, versionId: string, cEntityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param callback The callback - */ - createCompositeEntityRole(appId: string, versionId: string, cEntityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param options The optional parameters - * @param callback The callback - */ - createCompositeEntityRole(appId: string, versionId: string, cEntityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createCompositeEntityRole(appId: string, versionId: string, cEntityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - cEntityId, - entityRoleCreateObject, - options - }, - createCompositeEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Get all roles for a Pattern.any entity in a version of the application - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity Id - * @param [options] The optional parameters - * @returns Promise - */ - listPatternAnyEntityRoles(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity Id - * @param callback The callback - */ - listPatternAnyEntityRoles(appId: string, versionId: string, entityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity Id - * @param options The optional parameters - * @param callback The callback - */ - listPatternAnyEntityRoles(appId: string, versionId: string, entityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listPatternAnyEntityRoles(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - options - }, - listPatternAnyEntityRolesOperationSpec, - callback) as Promise; - } - - /** - * @summary Create a role for an Pattern.any entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity model ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param [options] The optional parameters - * @returns Promise - */ - createPatternAnyEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity model ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param callback The callback - */ - createPatternAnyEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity model ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param options The optional parameters - * @param callback The callback - */ - createPatternAnyEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createPatternAnyEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - entityRoleCreateObject, - options - }, - createPatternAnyEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Get all roles for a hierarchical entity in a version of the application - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param [options] The optional parameters - * @returns Promise - */ - listHierarchicalEntityRoles(appId: string, versionId: string, hEntityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param callback The callback - */ - listHierarchicalEntityRoles(appId: string, versionId: string, hEntityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param options The optional parameters - * @param callback The callback - */ - listHierarchicalEntityRoles(appId: string, versionId: string, hEntityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listHierarchicalEntityRoles(appId: string, versionId: string, hEntityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - hEntityId, - options - }, - listHierarchicalEntityRolesOperationSpec, - callback) as Promise; - } - - /** - * @summary Create a role for an hierarchical entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param [options] The optional parameters - * @returns Promise - */ - createHierarchicalEntityRole(appId: string, versionId: string, hEntityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param callback The callback - */ - createHierarchicalEntityRole(appId: string, versionId: string, hEntityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param options The optional parameters - * @param callback The callback - */ - createHierarchicalEntityRole(appId: string, versionId: string, hEntityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createHierarchicalEntityRole(appId: string, versionId: string, hEntityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - hEntityId, - entityRoleCreateObject, - options - }, - createHierarchicalEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Get all roles for a prebuilt entity in a version of the application - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity Id - * @param [options] The optional parameters - * @returns Promise - */ - listCustomPrebuiltEntityRoles(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity Id - * @param callback The callback - */ - listCustomPrebuiltEntityRoles(appId: string, versionId: string, entityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity Id - * @param options The optional parameters - * @param callback The callback - */ - listCustomPrebuiltEntityRoles(appId: string, versionId: string, entityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listCustomPrebuiltEntityRoles(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - options - }, - listCustomPrebuiltEntityRolesOperationSpec, - callback) as Promise; - } - - /** - * @summary Create a role for a prebuilt entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity model ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param [options] The optional parameters - * @returns Promise - */ - createCustomPrebuiltEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity model ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param callback The callback - */ - createCustomPrebuiltEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity model ID. - * @param entityRoleCreateObject An entity role object containing the name of role. - * @param options The optional parameters - * @param callback The callback - */ - createCustomPrebuiltEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createCustomPrebuiltEntityRole(appId: string, versionId: string, entityId: string, entityRoleCreateObject: Models.EntityRoleCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - entityRoleCreateObject, - options - }, - createCustomPrebuiltEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Get the explicit (exception) list of the pattern.any entity in a version of the - * application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The Pattern.Any entity id. - * @param [options] The optional parameters - * @returns Promise - */ - getExplicitList(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The Pattern.Any entity id. - * @param callback The callback - */ - getExplicitList(appId: string, versionId: string, entityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The Pattern.Any entity id. - * @param options The optional parameters - * @param callback The callback - */ - getExplicitList(appId: string, versionId: string, entityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getExplicitList(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - options - }, - getExplicitListOperationSpec, - callback) as Promise; - } - - /** - * @summary Add a new exception to the explicit list for the Pattern.Any entity in a version of the - * application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The Pattern.Any entity extractor ID. - * @param item The new explicit list item. - * @param [options] The optional parameters - * @returns Promise - */ - addExplicitListItem(appId: string, versionId: string, entityId: string, item: Models.ExplicitListItemCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The Pattern.Any entity extractor ID. - * @param item The new explicit list item. - * @param callback The callback - */ - addExplicitListItem(appId: string, versionId: string, entityId: string, item: Models.ExplicitListItemCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The Pattern.Any entity extractor ID. - * @param item The new explicit list item. - * @param options The optional parameters - * @param callback The callback - */ - addExplicitListItem(appId: string, versionId: string, entityId: string, item: Models.ExplicitListItemCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addExplicitListItem(appId: string, versionId: string, entityId: string, item: Models.ExplicitListItemCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - item, - options - }, - addExplicitListItemOperationSpec, - callback) as Promise; - } - - /** - * @summary Gets information about a regular expression entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param regexEntityId The regular expression entity model ID. - * @param [options] The optional parameters - * @returns Promise - */ - getRegexEntityEntityInfo(appId: string, versionId: string, regexEntityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param regexEntityId The regular expression entity model ID. - * @param callback The callback - */ - getRegexEntityEntityInfo(appId: string, versionId: string, regexEntityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param regexEntityId The regular expression entity model ID. - * @param options The optional parameters - * @param callback The callback - */ - getRegexEntityEntityInfo(appId: string, versionId: string, regexEntityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getRegexEntityEntityInfo(appId: string, versionId: string, regexEntityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - regexEntityId, - options - }, - getRegexEntityEntityInfoOperationSpec, - callback) as Promise; - } - - /** - * @summary Updates the regular expression entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param regexEntityId The regular expression entity extractor ID. - * @param regexEntityUpdateObject An object containing the new entity name and regex pattern. - * @param [options] The optional parameters - * @returns Promise - */ - updateRegexEntityModel(appId: string, versionId: string, regexEntityId: string, regexEntityUpdateObject: Models.RegexModelUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param regexEntityId The regular expression entity extractor ID. - * @param regexEntityUpdateObject An object containing the new entity name and regex pattern. - * @param callback The callback - */ - updateRegexEntityModel(appId: string, versionId: string, regexEntityId: string, regexEntityUpdateObject: Models.RegexModelUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param regexEntityId The regular expression entity extractor ID. - * @param regexEntityUpdateObject An object containing the new entity name and regex pattern. - * @param options The optional parameters - * @param callback The callback - */ - updateRegexEntityModel(appId: string, versionId: string, regexEntityId: string, regexEntityUpdateObject: Models.RegexModelUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateRegexEntityModel(appId: string, versionId: string, regexEntityId: string, regexEntityUpdateObject: Models.RegexModelUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - regexEntityId, - regexEntityUpdateObject, - options - }, - updateRegexEntityModelOperationSpec, - callback) as Promise; - } - - /** - * @summary Deletes a regular expression entity from a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param regexEntityId The regular expression entity extractor ID. - * @param [options] The optional parameters - * @returns Promise - */ - deleteRegexEntityModel(appId: string, versionId: string, regexEntityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param regexEntityId The regular expression entity extractor ID. - * @param callback The callback - */ - deleteRegexEntityModel(appId: string, versionId: string, regexEntityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param regexEntityId The regular expression entity extractor ID. - * @param options The optional parameters - * @param callback The callback - */ - deleteRegexEntityModel(appId: string, versionId: string, regexEntityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteRegexEntityModel(appId: string, versionId: string, regexEntityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - regexEntityId, - options - }, - deleteRegexEntityModelOperationSpec, - callback) as Promise; - } - - /** - * @summary Gets information about the Pattern.Any model in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor ID. - * @param [options] The optional parameters - * @returns Promise - */ - getPatternAnyEntityInfo(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor ID. - * @param callback The callback - */ - getPatternAnyEntityInfo(appId: string, versionId: string, entityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity extractor ID. - * @param options The optional parameters - * @param callback The callback - */ - getPatternAnyEntityInfo(appId: string, versionId: string, entityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getPatternAnyEntityInfo(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - options - }, - getPatternAnyEntityInfoOperationSpec, - callback) as Promise; - } - - /** - * @summary Updates the name and explicit (exception) list of a Pattern.Any entity model in a - * version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The Pattern.Any entity extractor ID. - * @param patternAnyUpdateObject An object containing the explicit list of the Pattern.Any entity. - * @param [options] The optional parameters - * @returns Promise - */ - updatePatternAnyEntityModel(appId: string, versionId: string, entityId: string, patternAnyUpdateObject: Models.PatternAnyModelUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The Pattern.Any entity extractor ID. - * @param patternAnyUpdateObject An object containing the explicit list of the Pattern.Any entity. - * @param callback The callback - */ - updatePatternAnyEntityModel(appId: string, versionId: string, entityId: string, patternAnyUpdateObject: Models.PatternAnyModelUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The Pattern.Any entity extractor ID. - * @param patternAnyUpdateObject An object containing the explicit list of the Pattern.Any entity. - * @param options The optional parameters - * @param callback The callback - */ - updatePatternAnyEntityModel(appId: string, versionId: string, entityId: string, patternAnyUpdateObject: Models.PatternAnyModelUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updatePatternAnyEntityModel(appId: string, versionId: string, entityId: string, patternAnyUpdateObject: Models.PatternAnyModelUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - patternAnyUpdateObject, - options - }, - updatePatternAnyEntityModelOperationSpec, - callback) as Promise; - } - - /** - * @summary Deletes a Pattern.Any entity extractor from a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The Pattern.Any entity extractor ID. - * @param [options] The optional parameters - * @returns Promise - */ - deletePatternAnyEntityModel(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The Pattern.Any entity extractor ID. - * @param callback The callback - */ - deletePatternAnyEntityModel(appId: string, versionId: string, entityId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The Pattern.Any entity extractor ID. - * @param options The optional parameters - * @param callback The callback - */ - deletePatternAnyEntityModel(appId: string, versionId: string, entityId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deletePatternAnyEntityModel(appId: string, versionId: string, entityId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - options - }, - deletePatternAnyEntityModelOperationSpec, - callback) as Promise; - } - - /** - * @summary Get one role for a given entity in a version of the application - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity ID. - * @param roleId entity role ID. - * @param [options] The optional parameters - * @returns Promise - */ - getEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity ID. - * @param roleId entity role ID. - * @param callback The callback - */ - getEntityRole(appId: string, versionId: string, entityId: string, roleId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity ID. - * @param roleId entity role ID. - * @param options The optional parameters - * @param callback The callback - */ - getEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - roleId, - options - }, - getEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Update a role for a given entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param [options] The optional parameters - * @returns Promise - */ - updateEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param callback The callback - */ - updateEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param options The optional parameters - * @param callback The callback - */ - updateEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - roleId, - entityRoleUpdateObject, - options - }, - updateEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Delete an entity role in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role Id. - * @param [options] The optional parameters - * @returns Promise - */ - deleteEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role Id. - * @param callback The callback - */ - deleteEntityRole(appId: string, versionId: string, entityId: string, roleId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role Id. - * @param options The optional parameters - * @param callback The callback - */ - deleteEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - roleId, - options - }, - deleteEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Get one role for a given prebuilt entity in a version of the application - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity ID. - * @param roleId entity role ID. - * @param [options] The optional parameters - * @returns Promise - */ - getPrebuiltEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity ID. - * @param roleId entity role ID. - * @param callback The callback - */ - getPrebuiltEntityRole(appId: string, versionId: string, entityId: string, roleId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity ID. - * @param roleId entity role ID. - * @param options The optional parameters - * @param callback The callback - */ - getPrebuiltEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getPrebuiltEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - roleId, - options - }, - getPrebuiltEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Update a role for a given prebuilt entity in a version of the application - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param [options] The optional parameters - * @returns Promise - */ - updatePrebuiltEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param callback The callback - */ - updatePrebuiltEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param options The optional parameters - * @param callback The callback - */ - updatePrebuiltEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updatePrebuiltEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - roleId, - entityRoleUpdateObject, - options - }, - updatePrebuiltEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Delete a role in a prebuilt entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role Id. - * @param [options] The optional parameters - * @returns Promise - */ - deletePrebuiltEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role Id. - * @param callback The callback - */ - deletePrebuiltEntityRole(appId: string, versionId: string, entityId: string, roleId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role Id. - * @param options The optional parameters - * @param callback The callback - */ - deletePrebuiltEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deletePrebuiltEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - roleId, - options - }, - deletePrebuiltEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Get one role for a given list entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity ID. - * @param roleId entity role ID. - * @param [options] The optional parameters - * @returns Promise - */ - getClosedListEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity ID. - * @param roleId entity role ID. - * @param callback The callback - */ - getClosedListEntityRole(appId: string, versionId: string, entityId: string, roleId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity ID. - * @param roleId entity role ID. - * @param options The optional parameters - * @param callback The callback - */ - getClosedListEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getClosedListEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - roleId, - options - }, - getClosedListEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Update a role for a given list entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param [options] The optional parameters - * @returns Promise - */ - updateClosedListEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param callback The callback - */ - updateClosedListEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param options The optional parameters - * @param callback The callback - */ - updateClosedListEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateClosedListEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - roleId, - entityRoleUpdateObject, - options - }, - updateClosedListEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Delete a role for a given list entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role Id. - * @param [options] The optional parameters - * @returns Promise - */ - deleteClosedListEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role Id. - * @param callback The callback - */ - deleteClosedListEntityRole(appId: string, versionId: string, entityId: string, roleId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role Id. - * @param options The optional parameters - * @param callback The callback - */ - deleteClosedListEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteClosedListEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - roleId, - options - }, - deleteClosedListEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Get one role for a given regular expression entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity ID. - * @param roleId entity role ID. - * @param [options] The optional parameters - * @returns Promise - */ - getRegexEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity ID. - * @param roleId entity role ID. - * @param callback The callback - */ - getRegexEntityRole(appId: string, versionId: string, entityId: string, roleId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity ID. - * @param roleId entity role ID. - * @param options The optional parameters - * @param callback The callback - */ - getRegexEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getRegexEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - roleId, - options - }, - getRegexEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Update a role for a given regular expression entity in a version of the application - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param [options] The optional parameters - * @returns Promise - */ - updateRegexEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param callback The callback - */ - updateRegexEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param options The optional parameters - * @param callback The callback - */ - updateRegexEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateRegexEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - roleId, - entityRoleUpdateObject, - options - }, - updateRegexEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Delete a role for a given regular expression in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role Id. - * @param [options] The optional parameters - * @returns Promise - */ - deleteRegexEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role Id. - * @param callback The callback - */ - deleteRegexEntityRole(appId: string, versionId: string, entityId: string, roleId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role Id. - * @param options The optional parameters - * @param callback The callback - */ - deleteRegexEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteRegexEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - roleId, - options - }, - deleteRegexEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Get one role for a given composite entity in a version of the application - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param roleId entity role ID. - * @param [options] The optional parameters - * @returns Promise - */ - getCompositeEntityRole(appId: string, versionId: string, cEntityId: string, roleId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param roleId entity role ID. - * @param callback The callback - */ - getCompositeEntityRole(appId: string, versionId: string, cEntityId: string, roleId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param roleId entity role ID. - * @param options The optional parameters - * @param callback The callback - */ - getCompositeEntityRole(appId: string, versionId: string, cEntityId: string, roleId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getCompositeEntityRole(appId: string, versionId: string, cEntityId: string, roleId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - cEntityId, - roleId, - options - }, - getCompositeEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Update a role for a given composite entity in a version of the application - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param [options] The optional parameters - * @returns Promise - */ - updateCompositeEntityRole(appId: string, versionId: string, cEntityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param callback The callback - */ - updateCompositeEntityRole(appId: string, versionId: string, cEntityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param options The optional parameters - * @param callback The callback - */ - updateCompositeEntityRole(appId: string, versionId: string, cEntityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateCompositeEntityRole(appId: string, versionId: string, cEntityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - cEntityId, - roleId, - entityRoleUpdateObject, - options - }, - updateCompositeEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Delete a role for a given composite entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param roleId The entity role Id. - * @param [options] The optional parameters - * @returns Promise - */ - deleteCompositeEntityRole(appId: string, versionId: string, cEntityId: string, roleId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param roleId The entity role Id. - * @param callback The callback - */ - deleteCompositeEntityRole(appId: string, versionId: string, cEntityId: string, roleId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param cEntityId The composite entity extractor ID. - * @param roleId The entity role Id. - * @param options The optional parameters - * @param callback The callback - */ - deleteCompositeEntityRole(appId: string, versionId: string, cEntityId: string, roleId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteCompositeEntityRole(appId: string, versionId: string, cEntityId: string, roleId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - cEntityId, - roleId, - options - }, - deleteCompositeEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Get one role for a given Pattern.any entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity ID. - * @param roleId entity role ID. - * @param [options] The optional parameters - * @returns Promise - */ - getPatternAnyEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity ID. - * @param roleId entity role ID. - * @param callback The callback - */ - getPatternAnyEntityRole(appId: string, versionId: string, entityId: string, roleId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity ID. - * @param roleId entity role ID. - * @param options The optional parameters - * @param callback The callback - */ - getPatternAnyEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getPatternAnyEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - roleId, - options - }, - getPatternAnyEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Update a role for a given Pattern.any entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param [options] The optional parameters - * @returns Promise - */ - updatePatternAnyEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param callback The callback - */ - updatePatternAnyEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param options The optional parameters - * @param callback The callback - */ - updatePatternAnyEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updatePatternAnyEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - roleId, - entityRoleUpdateObject, - options - }, - updatePatternAnyEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Delete a role for a given Pattern.any entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role Id. - * @param [options] The optional parameters - * @returns Promise - */ - deletePatternAnyEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role Id. - * @param callback The callback - */ - deletePatternAnyEntityRole(appId: string, versionId: string, entityId: string, roleId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role Id. - * @param options The optional parameters - * @param callback The callback - */ - deletePatternAnyEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deletePatternAnyEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - roleId, - options - }, - deletePatternAnyEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Get one role for a given hierarchical entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param roleId entity role ID. - * @param [options] The optional parameters - * @returns Promise - */ - getHierarchicalEntityRole(appId: string, versionId: string, hEntityId: string, roleId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param roleId entity role ID. - * @param callback The callback - */ - getHierarchicalEntityRole(appId: string, versionId: string, hEntityId: string, roleId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param roleId entity role ID. - * @param options The optional parameters - * @param callback The callback - */ - getHierarchicalEntityRole(appId: string, versionId: string, hEntityId: string, roleId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getHierarchicalEntityRole(appId: string, versionId: string, hEntityId: string, roleId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - hEntityId, - roleId, - options - }, - getHierarchicalEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Update a role for a given hierarchical entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param [options] The optional parameters - * @returns Promise - */ - updateHierarchicalEntityRole(appId: string, versionId: string, hEntityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param callback The callback - */ - updateHierarchicalEntityRole(appId: string, versionId: string, hEntityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param options The optional parameters - * @param callback The callback - */ - updateHierarchicalEntityRole(appId: string, versionId: string, hEntityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateHierarchicalEntityRole(appId: string, versionId: string, hEntityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - hEntityId, - roleId, - entityRoleUpdateObject, - options - }, - updateHierarchicalEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Delete a role for a given hierarchical role in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param roleId The entity role Id. - * @param [options] The optional parameters - * @returns Promise - */ - deleteHierarchicalEntityRole(appId: string, versionId: string, hEntityId: string, roleId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param roleId The entity role Id. - * @param callback The callback - */ - deleteHierarchicalEntityRole(appId: string, versionId: string, hEntityId: string, roleId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param hEntityId The hierarchical entity extractor ID. - * @param roleId The entity role Id. - * @param options The optional parameters - * @param callback The callback - */ - deleteHierarchicalEntityRole(appId: string, versionId: string, hEntityId: string, roleId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteHierarchicalEntityRole(appId: string, versionId: string, hEntityId: string, roleId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - hEntityId, - roleId, - options - }, - deleteHierarchicalEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Get one role for a given prebuilt entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity ID. - * @param roleId entity role ID. - * @param [options] The optional parameters - * @returns Promise - */ - getCustomEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity ID. - * @param roleId entity role ID. - * @param callback The callback - */ - getCustomEntityRole(appId: string, versionId: string, entityId: string, roleId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId entity ID. - * @param roleId entity role ID. - * @param options The optional parameters - * @param callback The callback - */ - getCustomEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getCustomEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - roleId, - options - }, - getCustomEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Update a role for a given prebuilt entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param [options] The optional parameters - * @returns Promise - */ - updateCustomPrebuiltEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param callback The callback - */ - updateCustomPrebuiltEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role ID. - * @param entityRoleUpdateObject The new entity role. - * @param options The optional parameters - * @param callback The callback - */ - updateCustomPrebuiltEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateCustomPrebuiltEntityRole(appId: string, versionId: string, entityId: string, roleId: string, entityRoleUpdateObject: Models.EntityRoleUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - roleId, - entityRoleUpdateObject, - options - }, - updateCustomPrebuiltEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Delete a role for a given prebuilt entity in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role Id. - * @param [options] The optional parameters - * @returns Promise - */ - deleteCustomEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role Id. - * @param callback The callback - */ - deleteCustomEntityRole(appId: string, versionId: string, entityId: string, roleId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The entity ID. - * @param roleId The entity role Id. - * @param options The optional parameters - * @param callback The callback - */ - deleteCustomEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteCustomEntityRole(appId: string, versionId: string, entityId: string, roleId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - roleId, - options - }, - deleteCustomEntityRoleOperationSpec, - callback) as Promise; - } - - /** - * @summary Get the explicit (exception) list of the pattern.any entity in a version of the - * application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The Pattern.Any entity Id. - * @param itemId The explicit list item Id. - * @param [options] The optional parameters - * @returns Promise - */ - getExplicitListItem(appId: string, versionId: string, entityId: string, itemId: number, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The Pattern.Any entity Id. - * @param itemId The explicit list item Id. - * @param callback The callback - */ - getExplicitListItem(appId: string, versionId: string, entityId: string, itemId: number, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The Pattern.Any entity Id. - * @param itemId The explicit list item Id. - * @param options The optional parameters - * @param callback The callback - */ - getExplicitListItem(appId: string, versionId: string, entityId: string, itemId: number, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getExplicitListItem(appId: string, versionId: string, entityId: string, itemId: number, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - itemId, - options - }, - getExplicitListItemOperationSpec, - callback) as Promise; - } - - /** - * @summary Updates an explicit (exception) list item for a Pattern.Any entity in a version of the - * application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The Pattern.Any entity extractor ID. - * @param itemId The explicit list item ID. - * @param item The new explicit list item. - * @param [options] The optional parameters - * @returns Promise - */ - updateExplicitListItem(appId: string, versionId: string, entityId: string, itemId: number, item: Models.ExplicitListItemUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The Pattern.Any entity extractor ID. - * @param itemId The explicit list item ID. - * @param item The new explicit list item. - * @param callback The callback - */ - updateExplicitListItem(appId: string, versionId: string, entityId: string, itemId: number, item: Models.ExplicitListItemUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The Pattern.Any entity extractor ID. - * @param itemId The explicit list item ID. - * @param item The new explicit list item. - * @param options The optional parameters - * @param callback The callback - */ - updateExplicitListItem(appId: string, versionId: string, entityId: string, itemId: number, item: Models.ExplicitListItemUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateExplicitListItem(appId: string, versionId: string, entityId: string, itemId: number, item: Models.ExplicitListItemUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - itemId, - item, - options - }, - updateExplicitListItemOperationSpec, - callback) as Promise; - } - - /** - * @summary Delete an item from the explicit (exception) list for a Pattern.any entity in a version - * of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The pattern.any entity id. - * @param itemId The explicit list item which will be deleted. - * @param [options] The optional parameters - * @returns Promise - */ - deleteExplicitListItem(appId: string, versionId: string, entityId: string, itemId: number, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The pattern.any entity id. - * @param itemId The explicit list item which will be deleted. - * @param callback The callback - */ - deleteExplicitListItem(appId: string, versionId: string, entityId: string, itemId: number, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param entityId The pattern.any entity id. - * @param itemId The explicit list item which will be deleted. - * @param options The optional parameters - * @param callback The callback - */ - deleteExplicitListItem(appId: string, versionId: string, entityId: string, itemId: number, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteExplicitListItem(appId: string, versionId: string, entityId: string, itemId: number, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - entityId, - itemId, - options - }, - deleteExplicitListItemOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const addIntentOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/intents", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - requestBody: { - parameterPath: "intentCreateObject", - mapper: { - ...Mappers.ModelCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listIntentsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/intents", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - queryParameters: [ - Parameters.skip, - Parameters.take - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IntentClassifier" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const addEntityOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/entities", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - requestBody: { - parameterPath: "entityModelCreateObject", - mapper: { - ...Mappers.EntityModelCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listEntitiesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/entities", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - queryParameters: [ - Parameters.skip, - Parameters.take - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NDepthEntityExtractor" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listHierarchicalEntitiesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/hierarchicalentities", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - queryParameters: [ - Parameters.skip, - Parameters.take - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HierarchicalEntityExtractor" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listCompositeEntitiesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/compositeentities", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - queryParameters: [ - Parameters.skip, - Parameters.take - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CompositeEntityExtractor" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listClosedListsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/closedlists", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - queryParameters: [ - Parameters.skip, - Parameters.take - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClosedListEntityExtractor" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const addClosedListOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/closedlists", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - requestBody: { - parameterPath: "closedListModelCreateObject", - mapper: { - ...Mappers.ClosedListModelCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const addPrebuiltOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/prebuilts", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - requestBody: { - parameterPath: "prebuiltExtractorNames", - mapper: { - required: true, - serializedName: "prebuiltExtractorNames", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrebuiltEntityExtractor" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listPrebuiltsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/prebuilts", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - queryParameters: [ - Parameters.skip, - Parameters.take - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrebuiltEntityExtractor" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listPrebuiltEntitiesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/listprebuilts", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AvailablePrebuiltEntityModel" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listModelsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/models", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - queryParameters: [ - Parameters.skip, - Parameters.take - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ModelInfoResponse" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const examplesMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/models/{modelId}/examples", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.modelId - ], - queryParameters: [ - Parameters.skip, - Parameters.take - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LabelTextObject" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getIntentOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/intents/{intentId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.intentId - ], - responses: { - 200: { - bodyMapper: Mappers.IntentClassifier - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateIntentOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/intents/{intentId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.intentId - ], - requestBody: { - parameterPath: "modelUpdateObject", - mapper: { - ...Mappers.ModelUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteIntentOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/intents/{intentId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.intentId - ], - queryParameters: [ - Parameters.deleteUtterances - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getEntityOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/entities/{entityId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - responses: { - 200: { - bodyMapper: Mappers.NDepthEntityExtractor - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteEntityOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/entities/{entityId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateEntityChildOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "apps/{appId}/versions/{versionId}/entities/{entityId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - requestBody: { - parameterPath: "entityModelUpdateObject", - mapper: { - ...Mappers.EntityModelUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getIntentFeaturesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/intents/{intentId}/features", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.intentId - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ModelFeatureInformation" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const replaceIntentFeaturesOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/intents/{intentId}/features", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.intentId - ], - requestBody: { - parameterPath: "featureRelationsUpdateObject", - mapper: { - required: true, - serializedName: "featureRelationsUpdateObject", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ModelFeatureInformation" - } - } - } - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteIntentFeatureOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/intents/{intentId}/features", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.intentId - ], - requestBody: { - parameterPath: "featureRelationDeleteObject", - mapper: { - ...Mappers.ModelFeatureInformation, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getEntityFeaturesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/entities/{entityId}/features", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ModelFeatureInformation" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const replaceEntityFeaturesOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/entities/{entityId}/features", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - requestBody: { - parameterPath: "featureRelationsUpdateObject", - mapper: { - required: true, - serializedName: "featureRelationsUpdateObject", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ModelFeatureInformation" - } - } - } - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteEntityFeatureOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/entities/{entityId}/features", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - requestBody: { - parameterPath: "featureRelationDeleteObject", - mapper: { - ...Mappers.ModelFeatureInformation, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getHierarchicalEntityOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.hEntityId - ], - responses: { - 200: { - bodyMapper: Mappers.HierarchicalEntityExtractor - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateHierarchicalEntityOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.hEntityId - ], - requestBody: { - parameterPath: "modelUpdateObject", - mapper: { - ...Mappers.ModelUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteHierarchicalEntityOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.hEntityId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getCompositeEntityOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.cEntityId - ], - responses: { - 200: { - bodyMapper: Mappers.CompositeEntityExtractor - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateCompositeEntityOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.cEntityId - ], - requestBody: { - parameterPath: "compositeModelUpdateObject", - mapper: { - ...Mappers.CompositeEntityModel, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteCompositeEntityOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.cEntityId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getClosedListOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.clEntityId - ], - responses: { - 200: { - bodyMapper: Mappers.ClosedListEntityExtractor - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateClosedListOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.clEntityId - ], - requestBody: { - parameterPath: "closedListModelUpdateObject", - mapper: { - ...Mappers.ClosedListModelUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const patchClosedListOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.clEntityId - ], - requestBody: { - parameterPath: "closedListModelPatchObject", - mapper: { - ...Mappers.ClosedListModelPatchObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteClosedListOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.clEntityId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getPrebuiltOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/prebuilts/{prebuiltId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.prebuiltId - ], - responses: { - 200: { - bodyMapper: Mappers.PrebuiltEntityExtractor - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deletePrebuiltOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/prebuilts/{prebuiltId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.prebuiltId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteSubListOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists/{subListId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.clEntityId, - Parameters.subListId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateSubListOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists/{subListId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.clEntityId, - Parameters.subListId - ], - requestBody: { - parameterPath: "wordListBaseUpdateObject", - mapper: { - ...Mappers.WordListBaseUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listIntentSuggestionsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/intents/{intentId}/suggest", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.intentId - ], - queryParameters: [ - Parameters.take, - Parameters.enableNestedChildren - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IntentsSuggestionExample" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listEntitySuggestionsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/entities/{entityId}/suggest", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - queryParameters: [ - Parameters.take, - Parameters.enableNestedChildren - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntitiesSuggestionExample" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const addSubListOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.clEntityId - ], - requestBody: { - parameterPath: "wordListCreateObject", - mapper: { - ...Mappers.WordListObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Number" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const addCustomPrebuiltDomainOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/customprebuiltdomains", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - requestBody: { - parameterPath: "prebuiltDomainObject", - mapper: { - ...Mappers.PrebuiltDomainCreateBaseObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Uuid" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const addCustomPrebuiltIntentOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/customprebuiltintents", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - requestBody: { - parameterPath: "prebuiltDomainModelCreateObject", - mapper: { - ...Mappers.PrebuiltDomainModelCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listCustomPrebuiltIntentsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/customprebuiltintents", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IntentClassifier" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const addCustomPrebuiltEntityOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/customprebuiltentities", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - requestBody: { - parameterPath: "prebuiltDomainModelCreateObject", - mapper: { - ...Mappers.PrebuiltDomainModelCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listCustomPrebuiltEntitiesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/customprebuiltentities", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityExtractor" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listCustomPrebuiltModelsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/customprebuiltmodels", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CustomPrebuiltModel" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteCustomPrebuiltDomainOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/customprebuiltdomains/{domainName}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.domainName - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const addEntityChildOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/entities/{entityId}/children", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - requestBody: { - parameterPath: "childEntityModelCreateObject", - mapper: { - ...Mappers.ChildEntityModelCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getHierarchicalEntityChildOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.hEntityId, - Parameters.hChildId - ], - responses: { - 200: { - bodyMapper: Mappers.HierarchicalChildEntity - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateHierarchicalEntityChildOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.hEntityId, - Parameters.hChildId - ], - requestBody: { - parameterPath: "hierarchicalChildModelUpdateObject", - mapper: { - ...Mappers.HierarchicalChildModelUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteHierarchicalEntityChildOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.hEntityId, - Parameters.hChildId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const addCompositeEntityChildOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/children", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.cEntityId - ], - requestBody: { - parameterPath: "compositeChildModelCreateObject", - mapper: { - ...Mappers.CompositeChildModelCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteCompositeEntityChildOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/children/{cChildId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.cEntityId, - Parameters.cChildId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listRegexEntityInfosOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/regexentities", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - queryParameters: [ - Parameters.skip, - Parameters.take - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RegexEntityExtractor" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const createRegexEntityModelOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/regexentities", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - requestBody: { - parameterPath: "regexEntityExtractorCreateObj", - mapper: { - ...Mappers.RegexModelCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listPatternAnyEntityInfosOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/patternanyentities", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - queryParameters: [ - Parameters.skip, - Parameters.take - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PatternAnyEntityExtractor" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const createPatternAnyEntityModelOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/patternanyentities", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - requestBody: { - parameterPath: "extractorCreateObject", - mapper: { - ...Mappers.PatternAnyModelCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listEntityRolesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/entities/{entityId}/roles", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityRole" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const createEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/entities/{entityId}/roles", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - requestBody: { - parameterPath: "entityRoleCreateObject", - mapper: { - ...Mappers.EntityRoleCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listPrebuiltEntityRolesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityRole" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const createPrebuiltEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - requestBody: { - parameterPath: "entityRoleCreateObject", - mapper: { - ...Mappers.EntityRoleCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listClosedListEntityRolesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityRole" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const createClosedListEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - requestBody: { - parameterPath: "entityRoleCreateObject", - mapper: { - ...Mappers.EntityRoleCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listRegexEntityRolesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityRole" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const createRegexEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - requestBody: { - parameterPath: "entityRoleCreateObject", - mapper: { - ...Mappers.EntityRoleCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listCompositeEntityRolesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.cEntityId - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityRole" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const createCompositeEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.cEntityId - ], - requestBody: { - parameterPath: "entityRoleCreateObject", - mapper: { - ...Mappers.EntityRoleCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listPatternAnyEntityRolesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityRole" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const createPatternAnyEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - requestBody: { - parameterPath: "entityRoleCreateObject", - mapper: { - ...Mappers.EntityRoleCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listHierarchicalEntityRolesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.hEntityId - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityRole" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const createHierarchicalEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.hEntityId - ], - requestBody: { - parameterPath: "entityRoleCreateObject", - mapper: { - ...Mappers.EntityRoleCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listCustomPrebuiltEntityRolesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EntityRole" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const createCustomPrebuiltEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - requestBody: { - parameterPath: "entityRoleCreateObject", - mapper: { - ...Mappers.EntityRoleCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Uuid" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getExplicitListOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExplicitListItem" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const addExplicitListItemOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - requestBody: { - parameterPath: "item", - mapper: { - ...Mappers.ExplicitListItemCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Number" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getRegexEntityEntityInfoOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.regexEntityId - ], - responses: { - 200: { - bodyMapper: Mappers.RegexEntityExtractor - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateRegexEntityModelOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.regexEntityId - ], - requestBody: { - parameterPath: "regexEntityUpdateObject", - mapper: { - ...Mappers.RegexModelUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteRegexEntityModelOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.regexEntityId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getPatternAnyEntityInfoOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - responses: { - 200: { - bodyMapper: Mappers.PatternAnyEntityExtractor - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updatePatternAnyEntityModelOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - requestBody: { - parameterPath: "patternAnyUpdateObject", - mapper: { - ...Mappers.PatternAnyModelUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deletePatternAnyEntityModelOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId, - Parameters.roleId - ], - responses: { - 200: { - bodyMapper: Mappers.EntityRole - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId, - Parameters.roleId - ], - requestBody: { - parameterPath: "entityRoleUpdateObject", - mapper: { - ...Mappers.EntityRoleUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId, - Parameters.roleId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getPrebuiltEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId, - Parameters.roleId - ], - responses: { - 200: { - bodyMapper: Mappers.EntityRole - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updatePrebuiltEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId, - Parameters.roleId - ], - requestBody: { - parameterPath: "entityRoleUpdateObject", - mapper: { - ...Mappers.EntityRoleUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deletePrebuiltEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId, - Parameters.roleId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getClosedListEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId, - Parameters.roleId - ], - responses: { - 200: { - bodyMapper: Mappers.EntityRole - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateClosedListEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId, - Parameters.roleId - ], - requestBody: { - parameterPath: "entityRoleUpdateObject", - mapper: { - ...Mappers.EntityRoleUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteClosedListEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId, - Parameters.roleId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getRegexEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId, - Parameters.roleId - ], - responses: { - 200: { - bodyMapper: Mappers.EntityRole - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateRegexEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId, - Parameters.roleId - ], - requestBody: { - parameterPath: "entityRoleUpdateObject", - mapper: { - ...Mappers.EntityRoleUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteRegexEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId, - Parameters.roleId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getCompositeEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.cEntityId, - Parameters.roleId - ], - responses: { - 200: { - bodyMapper: Mappers.EntityRole - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateCompositeEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.cEntityId, - Parameters.roleId - ], - requestBody: { - parameterPath: "entityRoleUpdateObject", - mapper: { - ...Mappers.EntityRoleUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteCompositeEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.cEntityId, - Parameters.roleId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getPatternAnyEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId, - Parameters.roleId - ], - responses: { - 200: { - bodyMapper: Mappers.EntityRole - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updatePatternAnyEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId, - Parameters.roleId - ], - requestBody: { - parameterPath: "entityRoleUpdateObject", - mapper: { - ...Mappers.EntityRoleUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deletePatternAnyEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId, - Parameters.roleId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getHierarchicalEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.hEntityId, - Parameters.roleId - ], - responses: { - 200: { - bodyMapper: Mappers.EntityRole - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateHierarchicalEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.hEntityId, - Parameters.roleId - ], - requestBody: { - parameterPath: "entityRoleUpdateObject", - mapper: { - ...Mappers.EntityRoleUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteHierarchicalEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.hEntityId, - Parameters.roleId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getCustomEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId, - Parameters.roleId - ], - responses: { - 200: { - bodyMapper: Mappers.EntityRole - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateCustomPrebuiltEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId, - Parameters.roleId - ], - requestBody: { - parameterPath: "entityRoleUpdateObject", - mapper: { - ...Mappers.EntityRoleUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteCustomEntityRoleOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId, - Parameters.roleId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getExplicitListItemOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId, - Parameters.itemId - ], - responses: { - 200: { - bodyMapper: Mappers.ExplicitListItem - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateExplicitListItemOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId, - Parameters.itemId - ], - requestBody: { - parameterPath: "item", - mapper: { - ...Mappers.ExplicitListItemUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteExplicitListItemOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.entityId, - Parameters.itemId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/pattern.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/pattern.ts deleted file mode 100644 index 3ad7620eff42..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/pattern.ts +++ /dev/null @@ -1,586 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/patternMappers"; -import * as Parameters from "../models/parameters"; -import { LUISAuthoringClientContext } from "../lUISAuthoringClientContext"; - -/** Class representing a Pattern. */ -export class Pattern { - private readonly client: LUISAuthoringClientContext; - - /** - * Create a Pattern. - * @param {LUISAuthoringClientContext} client Reference to the service client. - */ - constructor(client: LUISAuthoringClientContext) { - this.client = client; - } - - /** - * @summary Adds a pattern to a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param pattern The input pattern. - * @param [options] The optional parameters - * @returns Promise - */ - addPattern(appId: string, versionId: string, pattern: Models.PatternRuleCreateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param pattern The input pattern. - * @param callback The callback - */ - addPattern(appId: string, versionId: string, pattern: Models.PatternRuleCreateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param pattern The input pattern. - * @param options The optional parameters - * @param callback The callback - */ - addPattern(appId: string, versionId: string, pattern: Models.PatternRuleCreateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addPattern(appId: string, versionId: string, pattern: Models.PatternRuleCreateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - pattern, - options - }, - addPatternOperationSpec, - callback) as Promise; - } - - /** - * @summary Gets patterns in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - listPatterns(appId: string, versionId: string, options?: Models.PatternListPatternsOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - listPatterns(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - listPatterns(appId: string, versionId: string, options: Models.PatternListPatternsOptionalParams, callback: msRest.ServiceCallback): void; - listPatterns(appId: string, versionId: string, options?: Models.PatternListPatternsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - listPatternsOperationSpec, - callback) as Promise; - } - - /** - * @summary Updates patterns in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param patterns An array represents the patterns. - * @param [options] The optional parameters - * @returns Promise - */ - updatePatterns(appId: string, versionId: string, patterns: Models.PatternRuleUpdateObject[], options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param patterns An array represents the patterns. - * @param callback The callback - */ - updatePatterns(appId: string, versionId: string, patterns: Models.PatternRuleUpdateObject[], callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param patterns An array represents the patterns. - * @param options The optional parameters - * @param callback The callback - */ - updatePatterns(appId: string, versionId: string, patterns: Models.PatternRuleUpdateObject[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updatePatterns(appId: string, versionId: string, patterns: Models.PatternRuleUpdateObject[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - patterns, - options - }, - updatePatternsOperationSpec, - callback) as Promise; - } - - /** - * @summary Adds a batch of patterns in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param patterns A JSON array containing patterns. - * @param [options] The optional parameters - * @returns Promise - */ - batchAddPatterns(appId: string, versionId: string, patterns: Models.PatternRuleCreateObject[], options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param patterns A JSON array containing patterns. - * @param callback The callback - */ - batchAddPatterns(appId: string, versionId: string, patterns: Models.PatternRuleCreateObject[], callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param patterns A JSON array containing patterns. - * @param options The optional parameters - * @param callback The callback - */ - batchAddPatterns(appId: string, versionId: string, patterns: Models.PatternRuleCreateObject[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - batchAddPatterns(appId: string, versionId: string, patterns: Models.PatternRuleCreateObject[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - patterns, - options - }, - batchAddPatternsOperationSpec, - callback) as Promise; - } - - /** - * @summary Deletes a list of patterns in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param patternIds The patterns IDs. - * @param [options] The optional parameters - * @returns Promise - */ - deletePatterns(appId: string, versionId: string, patternIds: string[], options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param patternIds The patterns IDs. - * @param callback The callback - */ - deletePatterns(appId: string, versionId: string, patternIds: string[], callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param patternIds The patterns IDs. - * @param options The optional parameters - * @param callback The callback - */ - deletePatterns(appId: string, versionId: string, patternIds: string[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deletePatterns(appId: string, versionId: string, patternIds: string[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - patternIds, - options - }, - deletePatternsOperationSpec, - callback) as Promise; - } - - /** - * @summary Updates a pattern in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param patternId The pattern ID. - * @param pattern An object representing a pattern. - * @param [options] The optional parameters - * @returns Promise - */ - updatePattern(appId: string, versionId: string, patternId: string, pattern: Models.PatternRuleUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param patternId The pattern ID. - * @param pattern An object representing a pattern. - * @param callback The callback - */ - updatePattern(appId: string, versionId: string, patternId: string, pattern: Models.PatternRuleUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param patternId The pattern ID. - * @param pattern An object representing a pattern. - * @param options The optional parameters - * @param callback The callback - */ - updatePattern(appId: string, versionId: string, patternId: string, pattern: Models.PatternRuleUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updatePattern(appId: string, versionId: string, patternId: string, pattern: Models.PatternRuleUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - patternId, - pattern, - options - }, - updatePatternOperationSpec, - callback) as Promise; - } - - /** - * @summary Deletes the pattern with the specified ID from a version of the application.. - * @param appId The application ID. - * @param versionId The version ID. - * @param patternId The pattern ID. - * @param [options] The optional parameters - * @returns Promise - */ - deletePattern(appId: string, versionId: string, patternId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param patternId The pattern ID. - * @param callback The callback - */ - deletePattern(appId: string, versionId: string, patternId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param patternId The pattern ID. - * @param options The optional parameters - * @param callback The callback - */ - deletePattern(appId: string, versionId: string, patternId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deletePattern(appId: string, versionId: string, patternId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - patternId, - options - }, - deletePatternOperationSpec, - callback) as Promise; - } - - /** - * @summary Returns patterns for the specific intent in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param [options] The optional parameters - * @returns Promise - */ - listIntentPatterns(appId: string, versionId: string, intentId: string, options?: Models.PatternListIntentPatternsOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param callback The callback - */ - listIntentPatterns(appId: string, versionId: string, intentId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param intentId The intent classifier ID. - * @param options The optional parameters - * @param callback The callback - */ - listIntentPatterns(appId: string, versionId: string, intentId: string, options: Models.PatternListIntentPatternsOptionalParams, callback: msRest.ServiceCallback): void; - listIntentPatterns(appId: string, versionId: string, intentId: string, options?: Models.PatternListIntentPatternsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - intentId, - options - }, - listIntentPatternsOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const addPatternOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/patternrule", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - requestBody: { - parameterPath: "pattern", - mapper: { - ...Mappers.PatternRuleCreateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: Mappers.PatternRuleInfo - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listPatternsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/patternrules", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - queryParameters: [ - Parameters.skip, - Parameters.take - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PatternRuleInfo" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updatePatternsOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/patternrules", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - requestBody: { - parameterPath: "patterns", - mapper: { - required: true, - serializedName: "patterns", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PatternRuleUpdateObject" - } - } - } - } - }, - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PatternRuleInfo" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const batchAddPatternsOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/patternrules", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - requestBody: { - parameterPath: "patterns", - mapper: { - required: true, - serializedName: "patterns", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PatternRuleCreateObject" - } - } - } - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PatternRuleInfo" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deletePatternsOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/patternrules", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - requestBody: { - parameterPath: "patternIds", - mapper: { - required: true, - serializedName: "patternIds", - type: { - name: "Sequence", - element: { - type: { - name: "Uuid" - } - } - } - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updatePatternOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/patternrules/{patternId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.patternId - ], - requestBody: { - parameterPath: "pattern", - mapper: { - ...Mappers.PatternRuleUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.PatternRuleInfo - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deletePatternOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/patternrules/{patternId}", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.patternId - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listIntentPatternsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/intents/{intentId}/patternrules", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0, - Parameters.intentId - ], - queryParameters: [ - Parameters.skip, - Parameters.take - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PatternRuleInfo" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/settings.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/settings.ts deleted file mode 100644 index d4d28d088bc1..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/settings.ts +++ /dev/null @@ -1,163 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/settingsMappers"; -import * as Parameters from "../models/parameters"; -import { LUISAuthoringClientContext } from "../lUISAuthoringClientContext"; - -/** Class representing a Settings. */ -export class Settings { - private readonly client: LUISAuthoringClientContext; - - /** - * Create a Settings. - * @param {LUISAuthoringClientContext} client Reference to the service client. - */ - constructor(client: LUISAuthoringClientContext) { - this.client = client; - } - - /** - * Gets the settings in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - list(appId: string, versionId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - list(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - list(appId: string, versionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(appId: string, versionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * Updates the settings in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param listOfAppVersionSettingObject A list of the updated application version settings. - * @param [options] The optional parameters - * @returns Promise - */ - update(appId: string, versionId: string, listOfAppVersionSettingObject: Models.AppVersionSettingObject[], options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param listOfAppVersionSettingObject A list of the updated application version settings. - * @param callback The callback - */ - update(appId: string, versionId: string, listOfAppVersionSettingObject: Models.AppVersionSettingObject[], callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param listOfAppVersionSettingObject A list of the updated application version settings. - * @param options The optional parameters - * @param callback The callback - */ - update(appId: string, versionId: string, listOfAppVersionSettingObject: Models.AppVersionSettingObject[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(appId: string, versionId: string, listOfAppVersionSettingObject: Models.AppVersionSettingObject[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - listOfAppVersionSettingObject, - options - }, - updateOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/settings", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AppVersionSettingObject" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/settings", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - requestBody: { - parameterPath: "listOfAppVersionSettingObject", - mapper: { - required: true, - serializedName: "listOfAppVersionSettingObject", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AppVersionSettingObject" - } - } - } - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/train.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/train.ts deleted file mode 100644 index 53d2c9848983..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/train.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/trainMappers"; -import * as Parameters from "../models/parameters"; -import { LUISAuthoringClientContext } from "../lUISAuthoringClientContext"; - -/** Class representing a Train. */ -export class Train { - private readonly client: LUISAuthoringClientContext; - - /** - * Create a Train. - * @param {LUISAuthoringClientContext} client Reference to the service client. - */ - constructor(client: LUISAuthoringClientContext) { - this.client = client; - } - - /** - * 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 appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - trainVersion(appId: string, versionId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - trainVersion(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - trainVersion(appId: string, versionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - trainVersion(appId: string, versionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - trainVersionOperationSpec, - callback) as Promise; - } - - /** - * 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 appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - getStatus(appId: string, versionId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - getStatus(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - getStatus(appId: string, versionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getStatus(appId: string, versionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - getStatusOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const trainVersionOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/train", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - responses: { - 202: { - bodyMapper: Mappers.EnqueueTrainingResponse - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getStatusOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/train", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ModelTrainingInfo" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/versions.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/versions.ts deleted file mode 100644 index 60b2c6ff4e9d..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/versions.ts +++ /dev/null @@ -1,695 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/versionsMappers"; -import * as Parameters from "../models/parameters"; -import { LUISAuthoringClientContext } from "../lUISAuthoringClientContext"; - -/** Class representing a Versions. */ -export class Versions { - private readonly client: LUISAuthoringClientContext; - - /** - * Create a Versions. - * @param {LUISAuthoringClientContext} client Reference to the service client. - */ - constructor(client: LUISAuthoringClientContext) { - this.client = client; - } - - /** - * Creates a new version from the selected version. - * @param appId The application ID. - * @param versionId The version ID. - * @param versionCloneObject A model containing the new version ID. - * @param [options] The optional parameters - * @returns Promise - */ - clone(appId: string, versionId: string, versionCloneObject: Models.TaskUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param versionCloneObject A model containing the new version ID. - * @param callback The callback - */ - clone(appId: string, versionId: string, versionCloneObject: Models.TaskUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param versionCloneObject A model containing the new version ID. - * @param options The optional parameters - * @param callback The callback - */ - clone(appId: string, versionId: string, versionCloneObject: Models.TaskUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - clone(appId: string, versionId: string, versionCloneObject: Models.TaskUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - versionCloneObject, - options - }, - cloneOperationSpec, - callback) as Promise; - } - - /** - * Gets a list of versions for this application ID. - * @param appId The application ID. - * @param [options] The optional parameters - * @returns Promise - */ - list(appId: string, options?: Models.VersionsListOptionalParams): Promise; - /** - * @param appId The application ID. - * @param callback The callback - */ - list(appId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param options The optional parameters - * @param callback The callback - */ - list(appId: string, options: Models.VersionsListOptionalParams, callback: msRest.ServiceCallback): void; - list(appId: string, options?: Models.VersionsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * Gets the version information such as date created, last modified date, endpoint URL, count of - * intents and entities, training and publishing status. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - get(appId: string, versionId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - get(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - get(appId: string, versionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(appId: string, versionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Updates the name or description of the application version. - * @param appId The application ID. - * @param versionId The version ID. - * @param versionUpdateObject A model containing Name and Description of the application. - * @param [options] The optional parameters - * @returns Promise - */ - update(appId: string, versionId: string, versionUpdateObject: Models.TaskUpdateObject, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param versionUpdateObject A model containing Name and Description of the application. - * @param callback The callback - */ - update(appId: string, versionId: string, versionUpdateObject: Models.TaskUpdateObject, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param versionUpdateObject A model containing Name and Description of the application. - * @param options The optional parameters - * @param callback The callback - */ - update(appId: string, versionId: string, versionUpdateObject: Models.TaskUpdateObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(appId: string, versionId: string, versionUpdateObject: Models.TaskUpdateObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - versionUpdateObject, - options - }, - updateOperationSpec, - callback) as Promise; - } - - /** - * Deletes an application version. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(appId: string, versionId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - deleteMethod(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(appId: string, versionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(appId: string, versionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - deleteMethodOperationSpec, - callback) as Promise; - } - - /** - * Exports a LUIS application to JSON format. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - exportMethod(appId: string, versionId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - exportMethod(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - exportMethod(appId: string, versionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - exportMethod(appId: string, versionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - exportMethodOperationSpec, - callback) as Promise; - } - - /** - * Imports a new version into a LUIS application. - * @param appId The application ID. - * @param luisApp A LUIS application structure. - * @param [options] The optional parameters - * @returns Promise - */ - importMethod(appId: string, luisApp: Models.LuisApp, options?: Models.VersionsImportMethodOptionalParams): Promise; - /** - * @param appId The application ID. - * @param luisApp A LUIS application structure. - * @param callback The callback - */ - importMethod(appId: string, luisApp: Models.LuisApp, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param luisApp A LUIS application structure. - * @param options The optional parameters - * @param callback The callback - */ - importMethod(appId: string, luisApp: Models.LuisApp, options: Models.VersionsImportMethodOptionalParams, callback: msRest.ServiceCallback): void; - importMethod(appId: string, luisApp: Models.LuisApp, options?: Models.VersionsImportMethodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - luisApp, - options - }, - importMethodOperationSpec, - callback) as Promise; - } - - /** - * Deleted an unlabelled utterance in a version of the application. - * @param appId The application ID. - * @param versionId The version ID. - * @param utterance The utterance text to delete. - * @param [options] The optional parameters - * @returns Promise - */ - deleteUnlabelledUtterance(appId: string, versionId: string, utterance: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param utterance The utterance text to delete. - * @param callback The callback - */ - deleteUnlabelledUtterance(appId: string, versionId: string, utterance: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param utterance The utterance text to delete. - * @param options The optional parameters - * @param callback The callback - */ - deleteUnlabelledUtterance(appId: string, versionId: string, utterance: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteUnlabelledUtterance(appId: string, versionId: string, utterance: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - utterance, - options - }, - deleteUnlabelledUtteranceOperationSpec, - callback) as Promise; - } - - /** - * Imports a new version into a LUIS application. - * @param appId The application ID. - * @param luisAppV2 A LUIS application structure. - * @param [options] The optional parameters - * @returns Promise - */ - importV2App(appId: string, luisAppV2: Models.LuisAppV2, options?: Models.VersionsImportV2AppOptionalParams): Promise; - /** - * @param appId The application ID. - * @param luisAppV2 A LUIS application structure. - * @param callback The callback - */ - importV2App(appId: string, luisAppV2: Models.LuisAppV2, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param luisAppV2 A LUIS application structure. - * @param options The optional parameters - * @param callback The callback - */ - importV2App(appId: string, luisAppV2: Models.LuisAppV2, options: Models.VersionsImportV2AppOptionalParams, callback: msRest.ServiceCallback): void; - importV2App(appId: string, luisAppV2: Models.LuisAppV2, options?: Models.VersionsImportV2AppOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - luisAppV2, - options - }, - importV2AppOperationSpec, - callback) as Promise; - } - - /** - * Imports a new version into a LUIS application. - * @param appId The application ID. - * @param luisAppLu An LU representing the LUIS application structure. - * @param [options] The optional parameters - * @returns Promise - */ - importLuFormat(appId: string, luisAppLu: string, options?: Models.VersionsImportLuFormatOptionalParams): Promise; - /** - * @param appId The application ID. - * @param luisAppLu An LU representing the LUIS application structure. - * @param callback The callback - */ - importLuFormat(appId: string, luisAppLu: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param luisAppLu An LU representing the LUIS application structure. - * @param options The optional parameters - * @param callback The callback - */ - importLuFormat(appId: string, luisAppLu: string, options: Models.VersionsImportLuFormatOptionalParams, callback: msRest.ServiceCallback): void; - importLuFormat(appId: string, luisAppLu: string, options?: Models.VersionsImportLuFormatOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - luisAppLu, - options - }, - importLuFormatOperationSpec, - callback) as Promise; - } - - /** - * Exports a LUIS application to text format. - * @param appId The application ID. - * @param versionId The version ID. - * @param [options] The optional parameters - * @returns Promise - */ - exportLuFormat(appId: string, versionId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param callback The callback - */ - exportLuFormat(appId: string, versionId: string, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The version ID. - * @param options The optional parameters - * @param callback The callback - */ - exportLuFormat(appId: string, versionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - exportLuFormat(appId: string, versionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - options - }, - exportLuFormatOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const cloneOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/clone", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - requestBody: { - parameterPath: "versionCloneObject", - mapper: { - ...Mappers.TaskUpdateObject, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "String" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions", - urlParameters: [ - Parameters.endpoint, - Parameters.appId - ], - queryParameters: [ - Parameters.skip, - Parameters.take - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VersionInfo" - } - } - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - responses: { - 200: { - bodyMapper: Mappers.VersionInfo - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "apps/{appId}/versions/{versionId}/", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - requestBody: { - parameterPath: "versionUpdateObject", - mapper: { - ...Mappers.TaskUpdateObject, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const exportMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/export", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - responses: { - 200: { - bodyMapper: Mappers.LuisApp - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const importMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/import", - urlParameters: [ - Parameters.endpoint, - Parameters.appId - ], - queryParameters: [ - Parameters.versionId1 - ], - requestBody: { - parameterPath: "luisApp", - mapper: { - ...Mappers.LuisApp, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "String" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteUnlabelledUtteranceOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "apps/{appId}/versions/{versionId}/suggest", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - requestBody: { - parameterPath: "utterance", - mapper: { - required: true, - serializedName: "utterance", - type: { - name: "String" - } - } - }, - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const importV2AppOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/import", - urlParameters: [ - Parameters.endpoint, - Parameters.appId - ], - queryParameters: [ - Parameters.versionId1 - ], - requestBody: { - parameterPath: "luisAppV2", - mapper: { - ...Mappers.LuisAppV2, - required: true - } - }, - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "String" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const importLuFormatOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/import", - urlParameters: [ - Parameters.endpoint, - Parameters.appId - ], - queryParameters: [ - Parameters.versionId1 - ], - requestBody: { - parameterPath: "luisAppLu", - mapper: { - required: true, - serializedName: "luisAppLu", - type: { - name: "String" - } - } - }, - contentType: "text/plain", - responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "String" - } - } - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const exportLuFormatOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "apps/{appId}/versions/{versionId}/export", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId0 - ], - queryParameters: [ - Parameters.format - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Stream" - } - } - }, - default: {} - }, - serializer -}; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/appVersionImport.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/appVersionImport.test.ts deleted file mode 100644 index 8b3640f23a0c..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/appVersionImport.test.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as fs from "fs"; -import * as chai from "chai"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { BaseTest } from "../baseTest"; -import { delay } from "@azure/ms-rest-js"; - -let appIds: Array = []; - -describe("Import Tests", function () { - - it("should import version", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - fs.readFile("test/SessionRecords/ImportApp.json", "utf-8", async (err, data) => { - if (err) { - throw err; - } - let app = JSON.parse(data); - let importVersion = await client.apps.add({ - name: "LUIS App to be import version", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - var newVersion = await client.versions.importMethod(importVersion.body, app, { versionId: "0.2" }); - - chai.expect(newVersion.body, "0.2"); - - await delay(1000); - var deleteRespose = await client.apps.deleteMethod(importVersion.body); - chai.expect(deleteRespose.code, "Success"); - await delay(1000); - }); - }); - }); - - it("should import version in Lu format", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - fs.readFile("test/SessionRecords/ImportLuApp.json", "utf-8", async (err, app) => { - if (err) { - throw err; - } - let importLuVersion = await client.apps.add({ - name: "LUIS App to be import lu format version", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - var newVersion = await client.versions.importLuFormat(importLuVersion.body, app, { versionId: "0.2" }); - - chai.expect(newVersion.body, "0.2"); - - await delay(1000); - var deleteRespose = await client.apps.deleteMethod(importLuVersion.body); - chai.expect(deleteRespose.code, "Success"); - await delay(1000); - }); - }); - }); - - it("should import v2 version", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - fs.readFile("test/SessionRecords/ImportV2App.json", "utf-8", async (err, data) => { - if (err) { - throw err; - } - let importV2Version = await client.apps.add({ - name: "LUIS App to import V2 version", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - let app = JSON.parse(data); - const newVersion = await client.versions.importV2App(importV2Version.body, app); - var newVersionApp = await client.apps.get(importV2Version.body); - - chai.expect(newVersionApp.versionsCount).equal(2); - - await delay(1000); - var deleteRespose = await client.apps.deleteMethod(importV2Version.body); - chai.expect(deleteRespose.code, "Success"); - await delay(1000); - }); - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/apps.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/apps.test.ts deleted file mode 100644 index 73a85449a1a4..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/apps.test.ts +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { BaseTest } from "../baseTest"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { AppsAddResponse } from "../../src/models"; - -const trainedAppID = BaseTest.GlobalAppId; -let testingApp: AppsAddResponse; - -describe("Apps Module Functionality Tests", function () { - - before('add new app to test on', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - testingApp = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - }); - }); - - after('delete testing app', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - await client.apps.deleteMethod(testingApp.body); - }); - }); - - it('should list all luis applications', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - - const list = await client.apps.list(); - - chai.expect(list).not.to.be.null; - chai.expect(list.length).not.eql(0); - chai.expect(BaseTest.doesListContain(list, 'id', testingApp.body)).to.be.true; - }); - }); - - it("should add application", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "New LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - let saved_app = await client.apps.get(appId.body); - - await client.apps.deleteMethod(appId.body); - - const list = await client.apps.list(); - const checkIdExistence = idParam => list.some( ({id}) => id == idParam) - chai.assert.isFalse(checkIdExistence(appId.body)); - - chai.expect(saved_app).not.to.be.null; - chai.expect(saved_app.name).to.eql("New LUIS App"); - chai.expect(saved_app.description).to.eql("New LUIS App"); - chai.expect(saved_app.culture).to.eql("en-us"); - chai.expect(saved_app.domain).to.eql("Comics"); - chai.expect(saved_app.usageScenario).to.eql("IoT"); - }); - - it("should get application", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - - let result = await client.apps.get(testingApp.body); - - chai.expect(result).not.to.be.null; - chai.expect(result.id).to.eql(testingApp.body); - chai.expect(result.culture).to.eql("en-us"); - chai.expect(result.domain).to.eql("Comics"); - chai.expect(result.usageScenario).to.eql("IoT"); - }); - }); - }); - - it("should update application", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - - await client.apps.update(testingApp.body, { name: "LUIS App name updated", description: "LUIS App description updated" }); - let app = await client.apps.get(testingApp.body); - - chai.expect(app).not.to.be.null; - chai.expect(app.name).to.eql("LUIS App name updated"); - chai.expect(app.description).to.eql("LUIS App description updated"); - }); - }); - - it("should delete application", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - - const appId = await client.apps.add({ - name: "LUIS App to be deleted", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - await client.apps.deleteMethod(appId.body); - - const list = await client.apps.list(); - - const checkIdExistence = idParam => list.some( ({id}) => id == idParam) - chai.assert.isFalse(checkIdExistence(appId.body)); - - chai.expect(BaseTest.doesListContain(list, "name", "LUIS App to be deleted")).to.be.false; - }); - }); - - it("should list all endpoints", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const result = await client.apps.listEndpoints(testingApp.body); - - chai.expect(result["westus"]).to.eql("https://westus.api.cognitive.microsoft.com/luis/v2.0/apps/" + testingApp.body); - chai.expect(result["eastus2"]).to.eql("https://eastus2.api.cognitive.microsoft.com/luis/v2.0/apps/" + testingApp.body); - chai.expect(result["westcentralus"]).to.eql("https://westcentralus.api.cognitive.microsoft.com/luis/v2.0/apps/" + testingApp.body); - chai.expect(result["southeastasia"]).to.eql("https://southeastasia.api.cognitive.microsoft.com/luis/v2.0/apps/" + testingApp.body); - - }); - }); - - it("should publish application", async function () { - - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const result = await client.apps.publish(trainedAppID, { - isStaging: false, - versionId: "0.1" - }); - chai.expect(result["endpointUrl"]).to.eql("https://westus.api.cognitive.microsoft.com/luis/v2.0/apps/" + trainedAppID); - chai.expect(result["endpointRegion"]).to.eql("westus"); - chai.expect(result["isStaging"]).to.be.false; - }); - }); - - it("download query logs", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - - const stream = await client.apps.downloadQueryLogs(testingApp.body); - const csv = stream.readableStreamBody.read().toString(); - chai.expect(csv).to.be.exist; - - }); - }); - - it("should get settings", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - - - const settings = await client.apps.getSettings(testingApp.body); - - chai.expect(settings.isPublic).to.be.false; - chai.expect(settings.id).to.eql(testingApp.body); - }); - }); - - it("should update settings", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - - await client.apps.updateSettings(testingApp.body, { - isPublic: true - }); - const settings = await client.apps.getSettings(testingApp.body); - - chai.expect(settings.isPublic).to.be.true; - }); - - }); - - it("should get publish settings", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - - const settings = await client.apps.getPublishSettings(testingApp.body); - - chai.expect(settings.id).to.eql(testingApp.body); - chai.expect(settings.isSentimentAnalysisEnabled).to.be.false; - chai.expect(settings.isSpeechEnabled).to.be.false; - chai.expect(settings.isSpellCheckerEnabled).to.be.false; - }); - }); - - it("should update publish settings", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - - await client.apps.updatePublishSettings(testingApp.body, { - sentimentAnalysis: true, - speech: true, - spellChecker: true - }); - const settings = await client.apps.getPublishSettings(testingApp.body); - - chai.expect(settings.isSentimentAnalysisEnabled).to.be.true; - chai.expect(settings.isSpeechEnabled).to.be.true; - chai.expect(settings.isSpellCheckerEnabled).to.be.true; - }); - }); - - - it("should list domains", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const result = await client.apps.listDomains(); - for (let domain of result) { - chai.expect(domain).to.exist; - } - }); - }); - - it("should list supported cultures", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let cultures_map = { - 'en-us': 'English', - 'zh-cn': 'Chinese', - 'fr-fr': 'French', - 'fr-ca': 'French Canadian', - 'es-es': 'Spanish', - 'es-mx': 'Spanish Mexican', - 'it-it': 'Italian', - 'de-de': 'German', - 'ja-jp': 'Japanese', - 'pt-br': 'Brazilian Portuguese', - 'ko-kr': 'Korean', - 'nl-nl': 'Dutch', - 'tr-tr': 'Turkish', - 'hi-in': 'Hindi Indian', - 'ar-ar': 'Arabic', - 'gu-in': 'Gujarati Indian', - 'te-in': 'Telugu Indian', - 'ta-in': 'Tamil Indian', - 'mr-in': 'Marathi Indian' - }; - - const result = await client.apps.listSupportedCultures(); - - for (let culture of result) { - const culture_name: string = cultures_map[culture.code]; - chai.expect(culture_name).to.eql(culture.name); - } - }); - }); - - it("should list usage scenarios", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - - const result = await client.apps.listUsageScenarios(); - for (let scenario of result) { - chai.expect(scenario).to.exist; - } - }); - }); - - it("should list available custom prebuild domains", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - - const result = await client.apps.listAvailableCustomPrebuiltDomains(); - for (let prebuilt of result) { - chai.expect(prebuilt).not.to.be.null; - chai.expect(prebuilt.description).to.exist; - chai.expect(prebuilt["intents"]).not.to.be.null; - chai.expect(prebuilt["entities"]).not.to.be.null; - } - }); - }); - - it.skip("should list available custom prebuilt domains for culture", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let resultsUS = await client.apps.listAvailableCustomPrebuiltDomainsForCulture("en-us"); - let resultsCN = await client.apps.listAvailableCustomPrebuiltDomainsForCulture("zh-cn"); - - for (let resultUS of resultsUS) { - chai.expect(BaseTest.doesListContain(resultsCN, "description", resultUS.description)).to.be.false; - } - for (let resultCN of resultsCN) { - chai.expect(BaseTest.doesListContain(resultsUS, "description", resultCN.description)).to.be.false; - } - }); - }); - - - it("should add custom prebuilt application", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.addCustomPrebuiltDomain({ - culture: "en-us", - domainName: "Communication" - }); - await client.apps.deleteMethod(appId.body); - chai.expect(appId.body).not.to.eql(BaseTest.EmptyId); - }); - }); - -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/entityRole.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/entityRole.test.ts deleted file mode 100644 index 120704f84294..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/entityRole.test.ts +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import { BaseTest } from "../baseTest"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import * as chai from "chai"; - -let closedListSample = { name: "closed list model", subLists: [{ canonicalForm: "Test", list: [] }] }; - -describe("Entity Role Tests", function () { - it("should add simple entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addEntity(BaseTest.GlobalAppId, "0.1", { name: "simple entity" }); - await client.model.createEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(BaseTest.doesListContain(roles, "name", "simple role")).to.be.true; - }); - }); - - it("should add closed list entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - await client.model.createClosedListEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listClosedListEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(BaseTest.doesListContain(roles, "name", "simple role")).to.be.true; - }); - }); - - it("should add regex entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createRegexEntityModel(BaseTest.GlobalAppId, "0.1", { name: "regex model", regexPattern: "a+" }); - await client.model.createRegexEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listRegexEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteRegexEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(BaseTest.doesListContain(roles, "name", "simple role")).to.be.true; - }); - }); - - - it("should add patternAny entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "Pattern.Any model", explicitList: [] }); - await client.model.createPatternAnyEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listPatternAnyEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(BaseTest.doesListContain(roles, "name", "simple role")).to.be.true; - }); - }); - - - it("should add custom prebuilt domain entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addCustomPrebuiltEntity(BaseTest.GlobalAppId, "0.1", { modelName: "ContactName", domainName: "Communication" }); - await client.model.createCustomPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listCustomPrebuiltEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body) - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(BaseTest.doesListContain(roles, "name", "simple role")).to.be.true; - }); - }); - - it("should get simple entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addEntity(BaseTest.GlobalAppId, "0.1", { name: "simple entity" }); - const roleId = await client.model.createEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const role = await client.model.getEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role"); - }); - }); - - it("should get closed list entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - const roleId = await client.model.createClosedListEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const role = await client.model.getClosedListEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role"); - }); - }); - - it("should get regex entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createRegexEntityModel(BaseTest.GlobalAppId, "0.1", { name: "regex model", regexPattern: "a+" }); - const roleId = await client.model.createRegexEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const role = await client.model.getRegexEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deleteRegexEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role"); - }); - }); - - it("should get patterAny entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "Pattern.Any model", explicitList: [] }); - const roleId = await client.model.createPatternAnyEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const role = await client.model.getPatternAnyEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role"); - }); - }); - - it("should get custom prebuilt domain entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addCustomPrebuiltEntity(BaseTest.GlobalAppId, "0.1", { modelName: "ContactName", domainName: "Communication" }); - const roleId = await client.model.createCustomPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const role = await client.model.getCustomEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role"); - }); - }); - - it("should get simple entity roles", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addEntity(BaseTest.GlobalAppId, "0.1", { name: "simple entity" }); - await client.model.createEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(roles.length).to.eql(1); - chai.expect(roles[0].name).to.eql("simple role"); - }); - }); - - it("should get closed list entity roles", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - const roleId = await client.model.createClosedListEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listClosedListEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(roles.length).to.eql(1); - chai.expect(roles[0].name).to.eql("simple role"); - }); - }); - - it("should get regex entity roles", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createRegexEntityModel(BaseTest.GlobalAppId, "0.1", { name: "regex model", regexPattern: "a+" }); - - const roleId = await client.model.createRegexEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - - const roles = await client.model.listRegexEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - - await client.model.deleteRegexEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - - chai.expect(roles.length).to.eql(1); - chai.expect(roles[0].name).to.eql("simple role"); - }); - }); - - it("should get patterAny entity roles", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "Pattern.Any model", explicitList: [] }); - - await client.model.createPatternAnyEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listPatternAnyEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(roles.length).to.eql(1); - chai.expect(roles[0].name).to.eql("simple role"); - }); - }); - - it("should get custom prebuilt domain entity roles", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addCustomPrebuiltEntity(BaseTest.GlobalAppId, "0.1", { modelName: "ContactName", domainName: "Communication" }); - await client.model.createCustomPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - const roles = await client.model.listCustomPrebuiltEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body) - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(roles.length).to.eql(1); - chai.expect(roles[0].name).to.eql("simple role"); - }); - }); - - it("should update simple entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addEntity(BaseTest.GlobalAppId, "0.1", { name: "simple entity" }); - const roleId = await client.model.createEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.updateEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body, { name: "simple role 2" }); - const role = await client.model.getEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role 2"); - }); - }); - - it("should update closed list entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - const roleId = await client.model.createClosedListEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.updateClosedListEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body, { name: "simple role 2" }); - const role = await client.model.getClosedListEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role 2"); - }); - }); - - it("should update regex entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createRegexEntityModel(BaseTest.GlobalAppId, "0.1", { name: "regex model", regexPattern: "a+" }); - const roleId = await client.model.createRegexEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.updateRegexEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body, { name: "simple role 2" }); - const role = await client.model.getRegexEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deleteRegexEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role 2"); - }); - }); - - it("should update patterAny entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "Pattern.Any model", explicitList: [] }); - const roleId = await client.model.createPatternAnyEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.updatePatternAnyEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body, { name: "simple role 2" }); - const role = await client.model.getPatternAnyEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role 2"); - }); - }); - - - it("should update custom prebuilt domain entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addCustomPrebuiltEntity(BaseTest.GlobalAppId, "0.1", { modelName: "ContactName", domainName: "Communication" }); - const roleId = await client.model.createCustomPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.updateCustomPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body, { name: "simple role 2" }); - const role = await client.model.getCustomEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(role.name).to.eql("simple role 2"); - }); - }); - - it("should delete simple entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addEntity(BaseTest.GlobalAppId, "0.1", { name: "simple entity" }); - const roleId = await client.model.createEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.deleteEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - const roles = await client.model.listEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(roles.length).to.eql(0); - }); - }); - - it("should delete closed list entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - const roleId = await client.model.createClosedListEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.deleteClosedListEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - - const roles = await client.model.listClosedListEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(roles.length).to.eql(0); - }); - }); - - it("should delete regex entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createRegexEntityModel(BaseTest.GlobalAppId, "0.1", { name: "regex model", regexPattern: "a+" }); - const roleId = await client.model.createRegexEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.deleteRegexEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - const roles = await client.model.listRegexEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteRegexEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(roles.length).to.eql(0); - }); - }); - - it("should delete patterAny entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "Pattern.Any model", explicitList: [] }); - const roleId = await client.model.createPatternAnyEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.deletePatternAnyEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - const roles = await client.model.listPatternAnyEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(roles.length).to.eql(0); - }); - }); - - it("should delete custom prebuilt domain entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addCustomPrebuiltEntity(BaseTest.GlobalAppId, "0.1", { modelName: "ContactName", domainName: "Communication" }); - const roleId = await client.model.createCustomPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, { name: "simple role" }); - await client.model.deleteCustomEntityRole(BaseTest.GlobalAppId, "0.1", entityId.body, roleId.body); - const roles = await client.model.listCustomPrebuiltEntityRoles(BaseTest.GlobalAppId, "0.1", entityId.body) - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(roles.length).to.eql(0); - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/examples.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/examples.test.ts deleted file mode 100644 index ad9cb811ab89..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/examples.test.ts +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import { BaseTest } from "../baseTest"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import * as chai from "chai"; - - -describe("Example Module Functionality Tests", function () { - it("should list all examples", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const examples = await client.examples.list(BaseTest.GlobalAppId, "0.1"); - chai.expect(examples.length).not.to.eql(0); - }); - }); - - it("should list all examples in empty application returning empty", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Examples Test App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - const examples = await client.examples.list(appId.body, "0.1"); - await client.apps.deleteMethod(appId.body); - chai.expect(examples.length).to.eql(0); - }); - }); - - - it("should add example", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Examples Test App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - await client.model.addIntent(appId.body, "0.1", { name: "WeatherInPlace" }); - await client.model.addEntity(appId.body, "0.1", { name: "Place" }); - let example = { - text: "whats the weather in buenos aires?", - intentName: "WeatherInPlace", - entityLabels: [{ - entityName: "Place", - startCharIndex: 21, - endCharIndex: 34 - }] - }; - const result = await client.examples.add(appId.body, "0.1", example); - await client.apps.deleteMethod(appId.body); - chai.expect(result.utteranceText).to.eql(example.text) - }); - }); - - it("should add example with nested children", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Examples Test App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - await client.model.addIntent(appId.body, "0.1", { name: "WeatherInPlace" }); - await client.model.addEntity(appId.body, "0.1", { - name: "Place", - children:[{ - name: "City" - }, - { - name: "Country" - } - ]}); - let example = { - text: "whats the weather in buenos aires, argentina?", - intentName: "WeatherInPlace", - entityLabels: [{ - entityName: "Place", - startCharIndex: 21, - endCharIndex: 43, - children: [{ - entityName: "City", - startCharIndex: 21, - endCharIndex: 32 - }, - { - entityName: "Country", - startCharIndex: 35, - endCharIndex: 43 - }] - }] - }; - const result = await client.examples.add(appId.body, "0.1", example, {enableNestedChildren: true}); - await client.apps.deleteMethod(appId.body); - chai.expect(result.utteranceText).to.eql(example.text) - }); - }); - - it("should add examples in batch", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Examples Test App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - await client.model.addIntent(appId.body, "0.1", { name: "WeatherInPlace" }); - await client.model.addEntity(appId.body, "0.1", { name: "Place" }); - let examples = [{ - text: "whats the weather in seattle?", - intentName: "WeatherInPlace", - entityLabels: [{ - entityName: "Place", - startCharIndex: 21, - endCharIndex: 34 - }] - }, { - text: "whats the weather in buenos aires?", - intentName: "WeatherInPlace", - entityLabels: [{ - entityName: "Place", - startCharIndex: 21, - endCharIndex: 29 - }] - }]; - const result = await client.examples.batch(appId.body, "0.1", examples); - await client.apps.deleteMethod(appId.body); - chai.expect(examples.length).to.eql(result.length); - let pass = true; - for (let r of result) { - if (r.hasError) - pass = false; - - let found = false; - for (let e of examples) - if (e.text.toLowerCase() == r.value.utteranceText.toLowerCase()) - found = true; - - pass = (pass && found); - } - chai.expect(pass).to.be.true; - }); - }); - - - it("should add examples in batch with some invalid examples returning some errors", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Examples Test App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - await client.model.addIntent(appId.body, "0.1", { name: "WeatherInPlace" }); - await client.model.addEntity(appId.body, "0.1", { name: "Place" }); - let examples = [{ - text: "whats the weather in seattle?", - intentName: "InvalidIntent", - entityLabels: [{ - entityName: "Place", - startCharIndex: 21, - endCharIndex: 29 - }] - }, { - text: "whats the weather in buenos aires?", - intentName: "IntentDoesNotExist", - entityLabels: [{ - entityName: "Place", - startCharIndex: 21, - endCharIndex: 34 - }] - }]; - const result = await client.examples.batch(appId.body, "0.1", examples); - await client.apps.deleteMethod(appId.body); - chai.expect(examples.length).to.eql(result.length); - let pass = true; - for (let r of result) { - if (r.hasError) - pass = false; - } - chai.expect(pass).to.be.false; - }); - }); - - - it("should delete example", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Examples Test App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - let example = { - text: "Abuamra is awesome", - intentName: "None", - entityLabels: [] - }; - const result = await client.examples.add(appId.body, "0.1", example); - let exampleId = result.exampleId; - await client.examples.deleteMethod(appId.body, "0.1", exampleId); - const examples = await client.examples.list(appId.body, "0.1"); - await client.apps.deleteMethod(appId.body); - chai.expect(BaseTest.doesListContain(examples, "id", exampleId)).to.be.false; - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/export.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/export.test.ts deleted file mode 100644 index 2425ed31cef6..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/export.test.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { BaseTest } from "../baseTest"; - -let appId : any; -const appName = "LUIS App Version Export"; -const newVersionID = "0.2"; -const defaultVersionID = "0.1"; - -describe("Export Tests", function () { - - before("add app for app version testing", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - appId = await client.apps.add({ - name: appName, - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - }); - }); - - after("delete app added for app version testing", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - await client.apps.deleteMethod(appId.body); - }); - }); - - it("should export version", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - - const luisApp = await client.versions.exportMethod(appId.body, defaultVersionID); - - chai.expect(luisApp).to.exist; - chai.expect(luisApp.name).to.eql(appName); - }); - }); - - it("should export version Lu format", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - - const luisApp = await client.versions.exportLuFormat(appId.body, defaultVersionID); - - chai.expect(luisApp).to.exist; - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/features.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/features.test.ts deleted file mode 100644 index ec733978d561..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/features.test.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import * as fs from "fs"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { BaseTest } from "../baseTest"; - - -describe("Features Module Functionality", function () { - it('should list features', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - await fs.readFile("test/SessionRecords/ImportApp.json", "utf-8", async (err, data) => { - if (err) { - throw err; - } - let app = JSON.parse(data); - let appId = await client.apps.importMethod(app, { appName: "features of LUIS App" }); - var versionId = "0.2"; - var features = await client.features.list(appId.body, versionId); - await client.apps.deleteMethod(appId.body); - chai.expect(features.phraselistFeatures.length > 0).to.be.true; - }); - }); - }); - - it('should add required feature', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - var entityId = await client.model.addEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, {name: "flat entity"}); - var featureEntityId = await client.model.addEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, {name: "feature entity"}); - client.features.addEntityFeature(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body, { - modelName: "feature entity", - isRequired: true - }) - var features = await client.features.list(BaseTest.GlobalAppId, BaseTest.GlobalVersionId); - await client.model.deleteEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, entityId.body); - await client.model.deleteEntity(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, featureEntityId.body); - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/featuresPhraseLists.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/featuresPhraseLists.test.ts deleted file mode 100644 index 802d07a0b5ba..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/featuresPhraseLists.test.ts +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import { BaseTest } from "../baseTest"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import * as chai from "chai"; - -describe("featuresPhraseLists.test.ts", function () { - - it("should add phrase list", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const id = await client.features.addPhraseList(BaseTest.GlobalAppId, "0.1", { - name: "DayOfWeekToAdd", - phrases: "monday,tuesday,wednesday,thursday,friday,saturday,sunday", - isExchangeable: true - }); - const phrases = await client.features.getPhraseList(BaseTest.GlobalAppId, "0.1", id.body); - await client.features.deletePhraseList(BaseTest.GlobalAppId, "0.1", id.body); - chai.expect(phrases).not.to.be.null; - chai.expect(phrases.name).to.eq("DayOfWeekToAdd"); - chai.expect(phrases.phrases).to.eq("monday,tuesday,wednesday,thursday,friday,saturday,sunday") - }); - }); - - - it("should list phrase lists", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const id = await client.features.addPhraseList(BaseTest.GlobalAppId, "0.1", { - name: "DayOfWeekToList", - phrases: "monday,tuesday,wednesday,thursday,friday,saturday,sunday", - isExchangeable: true - }); - let phrases = await client.features.listPhraseLists(BaseTest.GlobalAppId, "0.1"); - await client.features.deletePhraseList(BaseTest.GlobalAppId, "0.1", id.body); - chai.expect(phrases).not.to.be.null; - chai.expect(phrases.length).not.to.eq(0); - }); - }); - - it("should get phrase list", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const id = await client.features.addPhraseList(BaseTest.GlobalAppId, "0.1", { - name: "DayOfWeekToGet", - phrases: "monday,tuesday,wednesday,thursday,friday,saturday,sunday", - isExchangeable: true - }); - - const phrases = await client.features.getPhraseList(BaseTest.GlobalAppId, "0.1", id.body); - await client.features.deletePhraseList(BaseTest.GlobalAppId, "0.1", id.body); - chai.expect(phrases).not.to.be.null; - chai.expect(phrases.name).to.eq("DayOfWeekToGet"); - chai.expect(phrases.isActive).to.eq(true); - chai.expect(phrases.isExchangeable).to.eq(true); - }); - }); - - - it("should update phrase list", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const id = await client.features.addPhraseList(BaseTest.GlobalAppId, "0.1", { - name: "DayOfWeekToUpdate", - phrases: "monday,tuesday,wednesday,thursday,friday,saturday,sunday", - isExchangeable: true - }); - - await client.features.updatePhraseList(BaseTest.GlobalAppId, "0.1", id.body, { - phraselistUpdateObject: { - isActive: false, - name: "Month", - phrases: "january,february,march,april,may,june,july,august,september,october,november,december" - } - }); - - const phrases = await client.features.getPhraseList(BaseTest.GlobalAppId, "0.1", id.body); - await client.features.deletePhraseList(BaseTest.GlobalAppId, "0.1", id.body); - chai.expect(phrases).not.to.be.null; - chai.expect(phrases.name).to.eq("Month"); - chai.expect(phrases.phrases).to.eq("january,february,march,april,may,june,july,august,september,october,november,december"); - chai.expect(phrases.isActive).to.eq(false); - }); - }); - - it("should delete phrase list", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const id = await client.features.addPhraseList(BaseTest.GlobalAppId, "0.1", { - name: "DayOfWeekToDelete", - phrases: "monday,tuesday,wednesday,thursday,friday,saturday,sunday", - isExchangeable: true - }); - let phrase = await client.features.getPhraseList(BaseTest.GlobalAppId, "0.1", id.body); - await client.features.deletePhraseList(BaseTest.GlobalAppId, "0.1", id.body); - let phrases = await client.features.listPhraseLists(BaseTest.GlobalAppId, "0.1"); - chai.expect(BaseTest.doesListContain(phrases, "id", id)).to.be.false; - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/import.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/import.test.ts deleted file mode 100644 index b8f7dba0f934..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/import.test.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as fs from "fs"; -import * as chai from "chai"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { BaseTest } from "../baseTest"; -import { delay } from "@azure/ms-rest-js"; - -let appIds: Array = []; - -describe("Import Tests", function () { - it("should import application", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - fs.readFile("test/SessionRecords/ImportApp.json", "utf-8", async (err, data) => { - if (err) { - throw err; - } - let app = JSON.parse(data); - let importApplication = await client.apps.importMethod(app, { appName: "Test Import LUIS App" }); - var testApp = await client.apps.get(importApplication.body); - - chai.expect(testApp).to.exist; - - await delay(1000); - var deleteRespose = await client.apps.deleteMethod(importApplication.body); - chai.expect(deleteRespose.code, "Success"); - await delay(1000); - }); - }); - }); - - it("should import application in Lu format", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - fs.readFile("test/SessionRecords/ImportLuApp.json", "utf-8", async (err, app) => { - if (err) { - throw err; - } - let importLuApplication = await client.apps.importLuFormat(app); - var testApp = await client.apps.get(importLuApplication.body); - - chai.expect(testApp).to.exist; - - await delay(1000); - var deleteRespose = await client.apps.deleteMethod(importLuApplication.body); - chai.expect(deleteRespose.code, "Success"); - await delay(1000); - }); - }); - }); - - it("should import v2 application", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - fs.readFile("test/SessionRecords/ImportV2App.json", "utf-8", async (err, data) => { - if (err) { - throw err; - } - let app = JSON.parse(data); - let importV2Application = await client.apps.importV2App(app, { appName: "Test Import V2 LUIS App" }); - var testApp = await client.apps.get(importV2Application.body); - - chai.expect(testApp).to.exist; - - await delay(1000); - - var deleteRespose = await client.apps.deleteMethod(importV2Application.body); - chai.expect(deleteRespose.code, "Success"); - await delay(1000); - }); - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/model.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/model.test.ts deleted file mode 100644 index 6f64eb4b86b9..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/model.test.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { BaseTest } from "../baseTest"; - -describe("model Module Functionality", function () { - it('should list models', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let versionId = BaseTest.GlobalVersionId; - let models = await client.model.listModels(BaseTest.GlobalAppId, versionId); - for (let model of models) { - if(model.typeId == 1) { - let entityInfo = await client.model.getEntity(BaseTest.GlobalAppId, versionId, model.id); - chai.expect(model.name).to.eql(entityInfo.name); - - } - else{ - let intentInfo = await client.model.getIntent(BaseTest.GlobalAppId, versionId, model.id); - chai.expect(model.name).to.eql(intentInfo.name); - } - } - }); - }); - - it('should create model with no children', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let versionId = BaseTest.GlobalVersionId; - let entityId = await client.model.addEntity(BaseTest.GlobalAppId, versionId, { name: "New Entity Test with no childern" }); - await client.model.deleteEntity(BaseTest.GlobalAppId, versionId, entityId.body); - }); - }); - - it('should create model with children', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let versionId = BaseTest.GlobalVersionId; - let entityId = await client.model.addEntity(BaseTest.GlobalAppId, versionId, { name: "New Entity Test with childern", children: [ { name: "child1"}] } ); - await client.model.deleteEntity(BaseTest.GlobalAppId, versionId, entityId.body); - }); - }); - - it('should create model with children and instance of', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let versionId = BaseTest.GlobalVersionId; - let prebuiltEntitiesAdded = await client.model.addPrebuilt(BaseTest.GlobalAppId, versionId, [ "email" ]); - let entityId = await client.model.addEntity(BaseTest.GlobalAppId, versionId, { name: "New Entity Test with childern and instanceOf", children: [ { name: "child1", children: [{name: "instanceOf", instanceOf: "email"}]}] } ); - await client.model.deleteEntity(BaseTest.GlobalAppId, versionId, entityId.body); - await client.model.deletePrebuilt(BaseTest.GlobalAppId, versionId, prebuiltEntitiesAdded[0].id); - }); - }); - - it('should add model child', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let versionId = BaseTest.GlobalVersionId; - let entityId = await client.model.addEntity(BaseTest.GlobalAppId, versionId, { name: "New Entity to add"} ); - await client.model.addEntityChild(BaseTest.GlobalAppId, versionId, entityId.body, {"name": "child1"}); - await client.model.deleteEntity(BaseTest.GlobalAppId, versionId, entityId.body); - }); - }); - - it('should get model', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let versionId = BaseTest.GlobalVersionId; - let entityId = await client.model.addEntity(BaseTest.GlobalAppId, versionId, { name: "New Entity Test to get", children: [{name: "child1"}]} ); - let entity = await client.model.getEntity(BaseTest.GlobalAppId, versionId, entityId.body); - chai.expect(entity.children[0].name).to.eql("child1"); - chai.expect(entity.id, entityId.body); - await client.model.deleteEntity(BaseTest.GlobalAppId, versionId, entityId.body); - }); - }); - - it('should update model child name', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let versionId = BaseTest.GlobalVersionId; - let entityId = await client.model.addEntity(BaseTest.GlobalAppId, versionId, { name: "New Entity Test to update" } ); - let entityChild = await client.model.addEntityChild(BaseTest.GlobalAppId, versionId, entityId.body, {name: "child1"}); - await client.model.updateEntityChild(BaseTest.GlobalAppId, versionId, entityChild.body, {name: "child2"}); - - let entity = await client.model.getEntity(BaseTest.GlobalAppId, versionId, entityId.body); - chai.expect(entity.children[0].name).to.eql("child2"); - await client.model.deleteEntity(BaseTest.GlobalAppId, versionId, entityId.body); - }); - }); - -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelClosedLists.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelClosedLists.test.ts deleted file mode 100644 index c6e84ba95f3c..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelClosedLists.test.ts +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { BaseTest } from "../baseTest"; - -var closedListSample = { - name: "States", - subLists: [ - { - canonicalForm: "New York", - list: ["NY", "New York"] - }, - { - canonicalForm: "Washington", - list: ["WA", "Washington"] - }, - { - canonicalForm: "California", - list: ["CA", "California", "Calif.", "Cal."] - } - ] -}; - - -describe("Model Closed Lists Tests", function () { - it("should list closed lists", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const listId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - const result = await client.model.listClosedLists(BaseTest.GlobalAppId, "0.1"); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - chai.expect(result).to.have.length.above(0); - }); - }); - - it("should add closed list", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - - const listId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - chai.expect(listId).not.to.eql(BaseTest.EmptyId); - }); - }); - it("should get closed list", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const listId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - const result = await client.model.getClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - chai.expect(result.name).to.eql("States"); - chai.expect(result.subLists.length).to.eql(3); - }); - }); - - it("should update closed list", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const listId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - await client.model.updateClosedList(BaseTest.GlobalAppId, "0.1", listId.body, { - name: "New States", subLists: [{ - canonicalForm: "Texas", - list: ["tx", "texas"] - }] - }); - const updated = await client.model.getClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - chai.expect(updated.name).to.eql("New States"); - chai.expect(updated.subLists.length).to.eql(1); - chai.expect(updated.subLists[0].canonicalForm).to.eql("Texas"); - }); - }); - - it("should delete closed list", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const listId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - const lists = await client.model.listClosedLists(BaseTest.GlobalAppId, "0.1"); - chai.expect(BaseTest.doesListContain(lists, "id", listId)).to.be.false; - }); - }); - - it("should patch closed list", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const listId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - await client.model.patchClosedList(BaseTest.GlobalAppId, "0.1", listId.body, { - subLists: [{ - canonicalForm: "Texas", - list: ["tx", "texas"] - }, { - canonicalForm: "Florida", - list: ["fl", "florida"] - }] - }); - const list = await client.model.getClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - chai.expect(list.subLists.length).to.eql(5); - chai.expect(BaseTest.doesListContain(list.subLists, "canonicalForm", "Texas")).to.be.true; - chai.expect(BaseTest.doesListContain(list.subLists, "canonicalForm", "Florida")).to.be.true; - }); - }); - - - - it("should add sublist", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const listId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - await client.model.addSubList(BaseTest.GlobalAppId, "0.1", listId.body, { canonicalForm: "Texas", list: ["tx", "texas"] }); - const list = await client.model.getClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - chai.expect(list.subLists.length).to.eql(4); - chai.expect(BaseTest.doesListContain(list.subLists, "canonicalForm", "Texas")).to.be.true; - }); - }); - - it("should delete sublist", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const listId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - let list = await client.model.getClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - let sublistId = null; - for (var sublist of list.subLists) { - if (sublist.canonicalForm == "New York") { - sublistId = sublist.id; - } - } - await client.model.deleteSubList(BaseTest.GlobalAppId, "0.1", listId.body, sublistId); - list = await client.model.getClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - chai.expect(list.subLists.length).to.eql(2); - chai.expect(BaseTest.doesListContain(list.subLists, "canonicalForm", "New York")).to.be.false; - }); - }); - - it("should update sublist", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const listId = await client.model.addClosedList(BaseTest.GlobalAppId, "0.1", closedListSample); - const list = await client.model.getClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - let sublistId = null; - for (var sublist of list.subLists) { - if (sublist.canonicalForm == "New York") { - sublistId = sublist.id; - } - } - await client.model.updateSubList(BaseTest.GlobalAppId, "0.1", listId.body, sublistId, { - canonicalForm: "New Yorkers", - list: ["NYC", "NY", "New York"], - }); - const newlist = await client.model.getClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - await client.model.deleteClosedList(BaseTest.GlobalAppId, "0.1", listId.body); - chai.expect(newlist.subLists.length).to.eql(3); - chai.expect(BaseTest.doesListContain(newlist.subLists, "canonicalForm", "New York")).to.be.false; - chai.expect(BaseTest.doesListContain(newlist.subLists, "canonicalForm", "New Yorkers")).to.be.true; - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelEntities.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelEntities.test.ts deleted file mode 100644 index 08dc95970c26..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelEntities.test.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { BaseTest } from "../baseTest"; - - -describe("Model Entities Tests", function () { - - it("should list Entities", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addEntity(BaseTest.GlobalAppId, "0.1", { name: "Existing Entity Test" }) - const results = await client.model.listEntities(BaseTest.GlobalAppId, "0.1"); - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(results.length).not.to.eql(0); - chai.expect(BaseTest.doesListContain(results, "name", "Existing Entity Test")).to.be.true; - }); - }); - - - it("should get entity", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addEntity(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test" }) - const result = await client.model.getEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(result).not.to.be.null; - chai.expect(result.name).to.eql("New Entity Test"); - chai.expect(result.readableType).to.eql("Entity Extractor"); - }); "Suggestions Entity Test" - }); - - - it("should add entity", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addEntity(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test" }) - const result = await client.model.getEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(result).not.to.be.null; - chai.expect(result.name).to.eql("New Entity Test"); - chai.expect(result.readableType).to.eql("Entity Extractor"); - }) - }); - - it("should delete entity", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.addEntity(BaseTest.GlobalAppId, "0.1", { name: "Delete Entity Test" }) - - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - const results = await client.model.listEntities(BaseTest.GlobalAppId, "0.1"); - chai.expect(BaseTest.doesListContain(results, "id", entityId)).to.be.false; - }); - }); - - it("should get entity suggestions returning empty", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - - const entityId = await client.model.addEntity(BaseTest.GlobalAppId, "0.1", { name: "Suggestions Entity Test" }) - const results = await client.model.listEntitySuggestions(BaseTest.GlobalAppId, "0.1", entityId.body); - let cnt = 0; - for (var result of results) - for (var prediction of result.entityPredictions) - if (prediction.entityName == "Suggestions Entity Test") - cnt++; - await client.model.deleteEntity(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(cnt).to.eql(0); - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelIntents.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelIntents.test.ts deleted file mode 100644 index 804c07528d96..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelIntents.test.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { BaseTest } from "../baseTest"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; - -describe("Model Intents Tests", function () { - it("should list intents", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const intents = await client.model.listIntents(BaseTest.GlobalAppId, "0.1"); - let checker: boolean = true; - for (var intent of intents) { - if (intent.readableType != "Intent Classifier") - checker = false; - } - chai.expect(checker).to.be.true; - }); - }); - - it("should add intent", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const newIntentId = await client.model.addIntent(BaseTest.GlobalAppId, "0.1", { name: "TestIntent" }); - const intents = await client.model.listIntents(BaseTest.GlobalAppId, "0.1"); - await client.model.deleteIntent(BaseTest.GlobalAppId, "0.1", newIntentId.body); - chai.expect(newIntentId).not.to.eql(BaseTest.EmptyId); - chai.expect(BaseTest.doesListContain(intents, "id", newIntentId.body)).to.be.true; - chai.expect(BaseTest.doesListContain(intents, "name", "TestIntent")).to.be.true; - }); - }); - - it("should get intent", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const newIntentId = await client.model.addIntent(BaseTest.GlobalAppId, "0.1", { name: "TestIntent" }); - const intent = await client.model.getIntent(BaseTest.GlobalAppId, "0.1", newIntentId.body); - await client.model.deleteIntent(BaseTest.GlobalAppId, "0.1", newIntentId.body); - chai.expect(intent.id).to.eql(newIntentId.body); - chai.expect(intent.name).to.eql("TestIntent"); - }); - }) - - it("should update intent", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const intentId = await client.model.addIntent(BaseTest.GlobalAppId, "0.1", { name: "TestIntent" }); - const intent = await client.model.getIntent(BaseTest.GlobalAppId, "0.1", intentId.body); - await client.model.updateIntent(BaseTest.GlobalAppId, "0.1", intentId.body, { name: "UpdateTest" }) - const newintent = await client.model.getIntent(BaseTest.GlobalAppId, "0.1", intentId.body); - await client.model.deleteIntent(BaseTest.GlobalAppId, "0.1", intentId.body); - chai.expect(intent.id).to.eql(newintent.id); - chai.expect(newintent.name).not.to.eql(intent.name); - chai.expect(newintent.name).to.eql("UpdateTest"); - }); - }); - - it("should delete intent", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const intentId = await client.model.addIntent(BaseTest.GlobalAppId, "0.1", { name: "TestIntent" }); - const intents = await client.model.listIntents(BaseTest.GlobalAppId, "0.1"); - await client.model.deleteIntent(BaseTest.GlobalAppId, "0.1", intentId.body); - const intentsWithoutDeleted = await client.model.listIntents(BaseTest.GlobalAppId, "0.1"); - chai.expect(BaseTest.doesListContain(intents, "id", intentId.body)).to.be.true; - chai.expect(BaseTest.doesListContain(intentsWithoutDeleted, "id", intentId.body)).to.be.false; - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelPatternAny.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelPatternAny.test.ts deleted file mode 100644 index ee51318a62d9..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelPatternAny.test.ts +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { BaseTest } from "../baseTest"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { ModelGetPatternAnyEntityInfoResponse } from "../../src/models"; - - -describe("Model Patters Tests", function () { - - it("should list entities", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "Pattern.Any entity", explicitList: ["item"] }); - const results = await client.model.listPatternAnyEntityInfos(BaseTest.GlobalAppId, "0.1"); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - let model: ModelGetPatternAnyEntityInfoResponse = null; - for (var result of results) { - if (result.name == "Pattern.Any entity") - model = result as ModelGetPatternAnyEntityInfoResponse; - } - chai.expect(model).not.to.be.null; - chai.expect(model.name).to.eql("Pattern.Any entity"); - chai.expect(model.explicitList[0].explicitListItem).to.eql("item"); - }); - }); - - - it("should get entity", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test", explicitList: ["item"] }); - const result = await client.model.getPatternAnyEntityInfo(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(result).not.to.be.null; - chai.expect(result.name).to.eql("New Entity Test"); - chai.expect(result.readableType).to.eql("Pattern.Any Entity Extractor") - chai.expect(result.explicitList[0].explicitListItem).to.eql("item"); - }); - }); - - it("should add entity", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test", explicitList: ["item"] }); - - const result = await client.model.getPatternAnyEntityInfo(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(result).not.to.be.null; - chai.expect(result.name).to.eql("New Entity Test"); - chai.expect(result.readableType).to.eql("Pattern.Any Entity Extractor") - chai.expect(result.explicitList[0].explicitListItem).to.eql("item"); - }); - }); - - - it("should update entity", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test", explicitList: ["item"] }); - await client.model.updatePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body, { - name: "Entity Test Renamed", explicitList: ["item1"] - }); - const result = await client.model.getPatternAnyEntityInfo(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(result).not.to.be.null; - chai.expect(result.name).to.eql("Entity Test Renamed"); - chai.expect(result.readableType).to.eql("Pattern.Any Entity Extractor") - chai.expect(result.explicitList[0].explicitListItem).to.eql("item1"); - }); - }); - - - it("should delete entity", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test", explicitList: ["item"] }); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - const results = await client.model.listPatternAnyEntityInfos(BaseTest.GlobalAppId, "0.1"); - chai.expect(BaseTest.doesListContain(results, "id", entityId)).to.be.false; - }); - }); - - it("should get explicit list", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test", explicitList: ["item1", "item2"] }); - const result = await client.model.getExplicitList(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(result).not.to.be.null; - chai.expect(BaseTest.doesListContain(result, "explicitListItem", "item1")).to.be.true; - chai.expect(BaseTest.doesListContain(result, "explicitListItem", "item2")).to.be.true; - }); - }); - - - it("should add explicit list item", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test", explicitList: ["item1"] }); - const itemId = await client.model.addExplicitListItem(BaseTest.GlobalAppId, "0.1", entityId.body, { explicitListItem: "item2" }); - const item = await client.model.getExplicitListItem(BaseTest.GlobalAppId, "0.1", entityId.body, itemId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(item).not.to.be.null; - chai.expect(item.explicitListItem).to.eql("item2"); - }); - }); - - - it("should get explicit list item", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test", explicitList: [] }); - const itemId = await client.model.addExplicitListItem(BaseTest.GlobalAppId, "0.1", entityId.body, { explicitListItem: "item" }); - const item = await client.model.getExplicitListItem(BaseTest.GlobalAppId, "0.1", entityId.body, itemId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(item).not.to.be.null; - chai.expect(item.explicitListItem).to.eql("item"); - }); - }); - - it("should update explicit list item", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test", explicitList: [] }); - const itemId = await client.model.addExplicitListItem(BaseTest.GlobalAppId, "0.1", entityId.body, { explicitListItem: "item" }); - await client.model.updateExplicitListItem(BaseTest.GlobalAppId, "0.1", entityId.body, itemId.body, { explicitListItem: "item1" }); - const item = await client.model.getExplicitListItem(BaseTest.GlobalAppId, "0.1", entityId.body, itemId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(item).not.to.be.null; - chai.expect(item.explicitListItem).to.eql("item1"); - }); - }); - - - it("should delete explicit list item", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const entityId = await client.model.createPatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", { name: "New Entity Test", explicitList: [] }); - const itemId = await client.model.addExplicitListItem(BaseTest.GlobalAppId, "0.1", entityId.body, { explicitListItem: "item" }); - await client.model.deleteExplicitListItem(BaseTest.GlobalAppId, "0.1", entityId.body, itemId.body); - const list = await client.model.getExplicitList(BaseTest.GlobalAppId, "0.1", entityId.body); - await client.model.deletePatternAnyEntityModel(BaseTest.GlobalAppId, "0.1", entityId.body); - chai.expect(list).not.to.be.null; - chai.expect(list).to.be.empty; - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelPrebuiltDomain.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelPrebuiltDomain.test.ts deleted file mode 100644 index cadc13e70bc0..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelPrebuiltDomain.test.ts +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { BaseTest } from "../baseTest"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; - -describe("Model Prebuilt Domain Tests", function () { - it('should add custom prebuilt domain', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - let versionsApp = await client.versions.list(appId.body); - let version = '0.1'; - let results = await client.model.addCustomPrebuiltDomain(appId.body, version, { domainName: "Communication" }); - let prebuiltModels = await client.model.listCustomPrebuiltModels(appId.body, version); - await client.model.deleteCustomPrebuiltDomain(appId.body, version, "Communication"); - await client.apps.deleteMethod(appId.body); - // to check if prebuiltModels is subset of results - let fine = true; - for (let model of prebuiltModels) { - let found = false; - for (let result of results) - if (result == model.id) - found = true; - fine = (found && fine); - } - chai.expect(fine).to.be.true; - }); - }); - - it('should delete custom prebuilt domain', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - let versionsApp = await client.versions.list(appId.body); - let version = versionsApp[0].version; - let results = await client.model.addCustomPrebuiltDomain(appId.body, version, { domainName: "Communication" }); - let prebuiltModels = await client.model.listCustomPrebuiltModels(appId.body, version); - chai.expect(BaseTest.doesListContain(prebuiltModels, "customPrebuiltDomainName", "Communication")).to.be.true; - - await client.model.deleteCustomPrebuiltDomain(appId.body, version, "Communication") - - prebuiltModels = await client.model.listCustomPrebuiltModels(appId.body, version); - await client.apps.deleteMethod(appId.body); - chai.expect(BaseTest.doesListContain(prebuiltModels, "customPrebuiltDomainName", "Communication")).to.be.false; - - }); - }); - - it('should list custom prebuilt entities', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - - let versionsApp = await client.versions.list(appId.body); - let version = versionsApp[0].version; - - let results = await client.model.addCustomPrebuiltDomain(appId.body, version, { - domainName: "Communication" - }); - let prebuiltEntities = await client.model.listCustomPrebuiltEntities(appId.body, version); - await client.model.deleteCustomPrebuiltDomain(appId.body, version, "Communication") - await client.apps.deleteMethod(appId.body); - - chai.expect(BaseTest.doesListContain(prebuiltEntities, "customPrebuiltDomainName", "Communication")).to.be.true; - - - }); - }); - - it('should add custom prebuilt entity', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - let versionsApp = await client.versions.list(appId.body); - let version = versionsApp[0].version; - let guidModel = await client.model.addCustomPrebuiltEntity(appId.body, version, { - domainName: "Communication", - modelName: "Category" - }); - let prebuiltEntities = await client.model.listCustomPrebuiltEntities(appId.body, version); - await client.model.deleteEntity(appId.body, "0.1", guidModel.body); - await client.apps.deleteMethod(appId.body); - chai.expect(BaseTest.doesListContain(prebuiltEntities, "id", guidModel.body)).to.be.true; - }); - }); - - - it('should list custom prebuilt intents', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - let versionsApp = await client.versions.list(appId.body); - let version = versionsApp[0].version; - let results = await client.model.addCustomPrebuiltDomain(appId.body, version, { domainName: "Communication" }); - let prebuiltIntents = await client.model.listCustomPrebuiltIntents(appId.body, version); - await client.model.deleteCustomPrebuiltDomain(appId.body, version, "Communication") - await client.apps.deleteMethod(appId.body); - chai.expect(BaseTest.doesListContain(prebuiltIntents, "customPrebuiltDomainName", "Communication")).to.be.true; - }); - }); - - it('should add custom prebuilt intent', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - let versionsApp = await client.versions.list(appId.body); - let version = versionsApp[0].version; - let guidModel = await client.model.addCustomPrebuiltIntent(appId.body, version, { domainName: "Communication", modelName: "AddContact" }); - let prebuiltIntents = await client.model.listCustomPrebuiltIntents(appId.body, version); - await client.model.deleteIntent(appId.body, version, guidModel.body); - await client.apps.deleteMethod(appId.body); - chai.expect(BaseTest.doesListContain(prebuiltIntents, "id", guidModel.body)).to.be.true; - }); - }); - - it('should list custom prebuilt models', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const appId = await client.apps.add({ - name: "Existing LUIS App", - description: "New LUIS App", - culture: "en-us", - domain: "Comics", - usageScenario: "IoT" - }); - let versionsApp = await client.versions.list(appId.body); - let version = versionsApp[0].version; - let results = await client.model.addCustomPrebuiltDomain(appId.body, version, { domainName: "Communication" }); - let prebuiltModels = await client.model.listCustomPrebuiltModels(appId.body, version); - await client.model.deleteCustomPrebuiltDomain(appId.body, version, "Communication") - await client.apps.deleteMethod(appId.body); - let found: boolean = false; - for (let model of prebuiltModels) { - if (model.readableType == "Intent Classifier" || model.readableType == "Entity Extractor") - found = true; - } - chai.expect(found).to.be.true; - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelPrebuilts.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelPrebuilts.test.ts deleted file mode 100644 index 77f9a15e0c9e..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelPrebuilts.test.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { BaseTest } from "../baseTest"; - - -describe("Model Prebuilts Tests", function () { - - it('should list prebuilt entities', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - var version = "0.1"; - var prebuiltEntities = await client.model.listPrebuiltEntities(BaseTest.GlobalAppId, version); - chai.expect(prebuiltEntities).to.have.length.above(0); - }); - }); - - it('should list prebuilts', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - var version = "0.1"; - var addedId = (await client.model.addPrebuilt(BaseTest.GlobalAppId, version, ["ordinal"]))[0].id; - var prebuiltEntities = await client.model.listPrebuilts(BaseTest.GlobalAppId, version); - await client.model.deletePrebuilt(BaseTest.GlobalAppId, version, addedId); - chai.expect(prebuiltEntities).to.have.length.above(0); - chai.expect(BaseTest.doesListContain(prebuiltEntities, "readableType", "Prebuilt Entity Extractor")) - }); - }); - - it('should add prebuilt', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - var version = "0.1"; - var prebuiltEntitiesToAdd = ["age", "ordinal"]; - var prebuiltEntitiesAdded = await client.model.addPrebuilt(BaseTest.GlobalAppId, version, prebuiltEntitiesToAdd); - for (var added of prebuiltEntitiesAdded) { - await client.model.deletePrebuilt(BaseTest.GlobalAppId, version, added.id); - } - for (var entity of prebuiltEntitiesToAdd) { - chai.expect(BaseTest.doesListContain(prebuiltEntitiesAdded, "name", entity)).to.be.true; - } - }); - }); - - it('should get prebuilt', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - var version = "0.1"; - var addedId = (await client.model.addPrebuilt(BaseTest.GlobalAppId, version, ["ordinal"]))[0].id; - var prebuiltEntity = await client.model.getPrebuilt(BaseTest.GlobalAppId, version, addedId); - await client.model.deletePrebuilt(BaseTest.GlobalAppId, version, addedId); - chai.expect(addedId).to.eql(prebuiltEntity.id); - }); - }); - - it('should delete prebuilt', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - var version = "0.1"; - var addedId = (await client.model.addPrebuilt(BaseTest.GlobalAppId, version, ["ordinal"]))[0].id; - await client.model.deletePrebuilt(BaseTest.GlobalAppId, version, addedId); - var prebuiltEntitiesWithoutDeleted = await client.model.listPrebuilts(BaseTest.GlobalAppId, version); - chai.expect(BaseTest.doesListContain(prebuiltEntitiesWithoutDeleted, "id", addedId)); - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelRegexEntities.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelRegexEntities.test.ts deleted file mode 100644 index c60fec63d9f9..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/modelRegexEntities.test.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { BaseTest } from "../baseTest"; - -const regextEntitySample = { - name: "regex entity 1", - regexPattern: "regex pattern 1" -}; - - -describe("Model Regex Entities Tests", function () { - it('should get regex entities', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const regexEntityId = await client.model.createRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regextEntitySample); - const regexEntities = await client.model.listRegexEntityInfos(BaseTest.GlobalAppId, BaseTest.GlobalVersionId); - await client.model.deleteRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regexEntityId.body); - chai.expect(regexEntities).not.to.be.null; - }); - }); - - - it('should create regex entity', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const regexEntityId = await client.model.createRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regextEntitySample); - await client.model.deleteRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regexEntityId.body); - chai.expect(regexEntityId.body).not.to.eql(BaseTest.EmptyId); - }); - }); - - - it('should get regex entity', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const regexEntityId = await client.model.createRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regextEntitySample); - const regexEntity = await client.model.getRegexEntityEntityInfo(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regexEntityId.body); - await client.model.deleteRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regexEntityId.body); - chai.expect(regexEntity.name).to.eql("regex entity 1"); - chai.expect(regexEntity.regexPattern).to.eql("regex pattern 1"); - }); - }); - - - it('should update regex entity', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const regexEntityId = await client.model.createRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regextEntitySample); - await client.model.updateRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regexEntityId.body, { name: "regex entity 2", regexPattern: "regex pattern 2" }); - const updatedRegexEntity = await client.model.getRegexEntityEntityInfo(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regexEntityId.body); - await client.model.deleteRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regexEntityId.body); - chai.expect(updatedRegexEntity.name).to.eql("regex entity 2"); - chai.expect(updatedRegexEntity.regexPattern).to.eql("regex pattern 2"); - }); - }); - - it('should delete regex entity', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const regexEntityId = await client.model.createRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regextEntitySample); - await client.model.deleteRegexEntityModel(BaseTest.GlobalAppId, BaseTest.GlobalVersionId, regexEntityId.body); - const regexEntities = await client.model.listRegexEntityInfos(BaseTest.GlobalAppId, BaseTest.GlobalVersionId); - chai.expect(BaseTest.doesListContain(regexEntities, "id", regexEntityId.body)).to.be.false; - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/patterns.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/patterns.test.ts deleted file mode 100644 index 45093da11900..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/patterns.test.ts +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { BaseTest } from "../baseTest"; -import { ModelAddPrebuiltResponse } from "../../src/models"; - -let prebuiltEntitiesAdded : ModelAddPrebuiltResponse -let prebuiltEntitiesAddedList : ModelAddPrebuiltResponse -let prebuiltEntitiesToAdd : string[] -let prebuiltEntitiesToAddList : string[] -const defautlVersionId = "0.1"; - -describe("Patterns Module Functionality Tests", function () { - - before('add prebuiltEntities', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - prebuiltEntitiesToAdd = ["temperature"]; - prebuiltEntitiesToAddList = ["datetimeV2", "age"]; - prebuiltEntitiesAdded = await client.model.addPrebuilt(BaseTest.GlobalAppId, defautlVersionId, prebuiltEntitiesToAdd); - prebuiltEntitiesAddedList = await client.model.addPrebuilt(BaseTest.GlobalAppId, defautlVersionId, prebuiltEntitiesToAddList); - }); - }); - - after('delete prebuiltEntities', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - for (let added of prebuiltEntitiesAdded) { - await client.model.deletePrebuilt(BaseTest.GlobalAppId, defautlVersionId, added.id); - } - for (let added of prebuiltEntitiesAddedList) { - await client.model.deletePrebuilt(BaseTest.GlobalAppId, defautlVersionId, added.id); - } - }); - }); - - - it('should add pattern', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let result = await client.pattern.addPattern(BaseTest.GlobalAppId, "0.1", { intent: "None", pattern: "This is a {temperature}" }); - await client.pattern.deletePattern(BaseTest.GlobalAppId, "0.1", result.id); - chai.expect(result).not.to.be.null; - chai.expect(result.id).not.to.be.null; - chai.expect(result.intent).to.eql("None"); - chai.expect(result.pattern).to.eql("this is a {temperature}"); - chai.expect(result.id).not.to.eql(BaseTest.EmptyId); - }); - }); - - it('should add patterns', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let patterns = [{ intent: "None", pattern: "This is a {age}" }, { intent: "None", pattern: "This is a {datetimeV2}" }] - let result = await client.pattern.batchAddPatterns(BaseTest.GlobalAppId, "0.1", patterns); - await client.pattern.deletePatterns(BaseTest.GlobalAppId, "0.1", result.map(p => p.id)); - chai.expect(result).not.to.be.null; - for (let pattern of result) { - chai.expect(pattern.id).not.to.be.null; - chai.expect(pattern.intent).to.eql("None"); - chai.expect(pattern.id).not.to.eql(BaseTest.EmptyId); - } - }); - }); - - it('should update pattern', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let pattern = { intent: "None", pattern: "This is a {temperature}" }; - let updatedPattern = { intent: "None", pattern: "This [is] a {temperature}" }; - let addResult = await client.pattern.addPattern(BaseTest.GlobalAppId, "0.1", pattern); - let updateResult = await client.pattern.updatePattern(BaseTest.GlobalAppId, "0.1", addResult.id, updatedPattern); - await client.pattern.deletePattern(BaseTest.GlobalAppId, "0.1", addResult.id); - chai.expect(updateResult).not.to.be.null; - chai.expect(updateResult.id).not.to.be.null; - chai.expect(updateResult.intent).to.eql("None"); - chai.expect(updateResult.id).to.eql(addResult.id); - chai.expect(updateResult.id).not.to.eql(BaseTest.EmptyId); - chai.expect(updateResult.pattern).to.eql("this [is] a {temperature}") - }); - }); - - it('should update patterns', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let patterns = [{ intent: "None", pattern: "This is a {age}" }]; - let addResult = await client.pattern.batchAddPatterns(BaseTest.GlobalAppId, "0.1", patterns); - let updatedPatterns = [{ - intent: "None", pattern: "This [is] a {datetimeV2}", id: addResult[0].id - }] - let updateResult = await client.pattern.updatePatterns(BaseTest.GlobalAppId, "0.1", updatedPatterns); - await client.pattern.deletePatterns(BaseTest.GlobalAppId, "0.1", updateResult.map(p => p.id)); - chai.expect(updateResult).not.to.be.null; - chai.expect(updateResult[0].id).not.to.be.null; - chai.expect(updateResult[0].intent).to.eql("None"); - chai.expect(updateResult[0].id).not.to.eql(BaseTest.EmptyId); - chai.expect(updateResult[0].id).to.eql(addResult[0].id); - chai.expect(updateResult[0].intent).to.eql("None"); - chai.expect(updateResult[0].id).to.eql(addResult[0].id); - chai.expect(updateResult[0].pattern).to.eql("this [is] a {datetimeV2}"); - }); - }); - - it('should get patterns', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let patternsToAdd = [{ intent: "None", pattern: "This is a {age}" }, { intent: "None", pattern: "This is a {datetimeV2}" }] - let result = await client.pattern.batchAddPatterns(BaseTest.GlobalAppId, "0.1", patternsToAdd); - let patterns = await client.pattern.listPatterns(BaseTest.GlobalAppId, "0.1"); - await client.pattern.deletePatterns(BaseTest.GlobalAppId, "0.1", result.map(p => p.id)); - chai.expect(patterns).to.be.exist; - chai.expect(patterns).not.to.be.empty; - for (let pattern of patterns) { - chai.expect(pattern.id).not.to.be.null; - chai.expect(pattern.intent).not.to.be.null; - chai.expect(pattern.pattern).not.to.be.null; - } - }); - }); - - - it('should get intent patterns', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let patternsToAdd = [{ intent: "None", pattern: "This is a {age}" }, { intent: "None", pattern: "This is a {datetimeV2}" }] - let result = await client.pattern.batchAddPatterns(BaseTest.GlobalAppId, "0.1", patternsToAdd); - let patterns = await client.pattern.listIntentPatterns(BaseTest.GlobalAppId, "0.1", BaseTest.GlobalNoneId); - await client.pattern.deletePatterns(BaseTest.GlobalAppId, "0.1", result.map(p => p.id)); - chai.expect(patterns).to.be.exist; - chai.expect(patterns).not.to.be.empty; - for (let pattern of patterns) { - chai.expect(pattern.id).not.to.be.null; - chai.expect(pattern.intent).not.to.be.null; - chai.expect(pattern.pattern).not.to.be.null; - chai.expect(pattern.intent).to.eql("None"); - } - }); - }); - - it('should delete pattern', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let pattern = { intent: "None", pattern: "This is a {temperature}" }; - let result = await client.pattern.addPattern(BaseTest.GlobalAppId, "0.1", pattern); - await client.pattern.deletePattern(BaseTest.GlobalAppId, "0.1", result.id); - let existingPatterns = await client.pattern.listPatterns(BaseTest.GlobalAppId, "0.1"); - chai.expect(BaseTest.doesListContain(existingPatterns, "id", result.id)).not.to.be.true; - }); - }); - - it('should delete patterns', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let patterns = [{ intent: "None", pattern: "This is a {age}" }, { intent: "None", pattern: "This is a {datetimeV2}" }] - let result = await client.pattern.batchAddPatterns(BaseTest.GlobalAppId, "0.1", patterns); - await client.pattern.deletePatterns(BaseTest.GlobalAppId, "0.1", result.map(p => p.id)); - let existingPatterns = await client.pattern.listPatterns(BaseTest.GlobalAppId, "0.1"); - for (let p in result) { - chai.expect(BaseTest.doesListContain(existingPatterns, "id", p)).not.to.be.true; - } - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/prebuiltEntityRole.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/prebuiltEntityRole.test.ts deleted file mode 100644 index f1207b27df6c..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/prebuiltEntityRole.test.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import { BaseTest } from "../baseTest"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import * as chai from "chai"; -import { ModelCreatePrebuiltEntityRoleResponse } from "../../src/models"; - -let entityId :string; -let roleId: ModelCreatePrebuiltEntityRoleResponse; -describe("Prebuilt Entity Role Tests", function () { - - beforeEach("add prebuilt entitiy to test", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - entityId = (await client.model.addPrebuilt(BaseTest.GlobalAppId, "0.1", ["email"]))[0].id; - roleId = await client.model.createPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId, { name: "simple role" }); - - }); - }); - - afterEach("delete prebuilt entitiy", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - await client.model.deletePrebuilt(BaseTest.GlobalAppId, "0.1", entityId); - }); - }); - - - it("should add prebuilt entitiy role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const roles = await client.model.listPrebuiltEntityRoles(BaseTest.GlobalAppId, "0.1", entityId); - chai.expect(BaseTest.doesListContain(roles, "name", "simple role")).to.be.true; - }); - }); - - it("should add prebuilt entitiy role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const roles = await client.model.listPrebuiltEntityRoles(BaseTest.GlobalAppId, "0.1", entityId); - chai.expect(BaseTest.doesListContain(roles, "name", "simple role")).to.be.true; - }); - }); - - it("should get prebuilt entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const role = await client.model.getPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId, roleId.body); - chai.expect(role.name).to.eql("simple role"); - }); - }); - - it("should update prebuilt entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - await client.model.updatePrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId, roleId.body, { name: "simple role 2" }); - const role = await client.model.getPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId, roleId.body); - chai.expect(role.name).to.eql("simple role 2"); - }); - }); - - it("should get prebuilt entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - const role = await client.model.getPrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId, roleId.body); - chai.expect(role.name).to.eql("simple role"); - }); - }); - - it("should delete prebuilt entity role", async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - await client.model.deletePrebuiltEntityRole(BaseTest.GlobalAppId, "0.1", entityId, roleId.body); - const roles = await client.model.listPrebuiltEntityRoles(BaseTest.GlobalAppId, "0.1", entityId); - chai.expect(roles.length).to.eql(0); - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/train.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/train.test.ts deleted file mode 100644 index 605ab62ad384..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/train.test.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { BaseTest } from "../baseTest"; -import { TrainGetStatusResponse } from "../../src/models"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { delay } from "@azure/ms-rest-js"; - - - -function checkStatus(statusArr: TrainGetStatusResponse) { - for (let s of statusArr) { - if (s.details.status != "Success" && s.details.status != "UpToDate") - return true; - } - return false; -} - - -describe("Train Module Functionality", function () { - - it('should get status', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let versionId = "0.1"; - await client.train.trainVersion(BaseTest.GlobalAppId, versionId); - let result = await client.train.getStatus(BaseTest.GlobalAppId, versionId); - - while (checkStatus(result)) { - result = await client.train.getStatus(BaseTest.GlobalAppId, versionId); - await delay(1000); - } - - for (let trainResult of result) { - switch (trainResult.details.status) { - case "Success": - case "UpToDate": - chai.expect(trainResult.details.failureReason).not.to.be.exist; - break; - case "Fail": - case "InProgress": - default: - chai.expect(true).to.be.false; - break; - } - } - }); - }); - - it('should train version', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let versionId = "0.1"; - await client.train.trainVersion(BaseTest.GlobalAppId, versionId); - let result = await client.train.getStatus(BaseTest.GlobalAppId, versionId); - - while (checkStatus(result)) { - result = await client.train.getStatus(BaseTest.GlobalAppId, versionId); - await delay(1000); - } - - let secondTrainResult = await client.train.trainVersion(BaseTest.GlobalAppId, versionId); - chai.expect(secondTrainResult.status).to.eql("UpToDate"); - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/versions.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/versions.test.ts deleted file mode 100644 index adc0074245cb..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/Luis/versions.test.ts +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import * as chai from "chai"; -import { LUISAuthoringClient } from "../../src/lUISAuthoringClient"; -import { BaseTest } from "../baseTest"; - - - -describe("Versions Module Functionality Tests", function () { - - it('should list all versions', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let results = await client.versions.list(BaseTest.GlobalAppId); - chai.expect(results.length > 0).to.be.true; - for (let version of results) { - chai.expect(version.version).not.to.be.null; - } - }); - }); - - it('should get version', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let versions = await client.versions.list(BaseTest.GlobalAppId); - for (let version of versions) { - let result = await client.versions.get(BaseTest.GlobalAppId, version.version); - chai.expect(version.version).to.eql(result.version); - } - }); - }); - - it('should update version', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let versions = await client.versions.list(BaseTest.GlobalAppId); - let first = versions[0]; - await client.versions.update(BaseTest.GlobalAppId, first.version, { version: "test" }); - let versionsWithUpdate = await client.versions.list(BaseTest.GlobalAppId); - chai.expect(BaseTest.doesListContain(versionsWithUpdate, "version", "test")).to.be.true; - chai.expect(BaseTest.doesListContain(versionsWithUpdate, "version", first.version)).to.be.false; - await client.versions.update(BaseTest.GlobalAppId, "test", { version: first.version }); - }); - }); - - it('should delete version', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let versions = await client.versions.list(BaseTest.GlobalAppId); - let first = versions[0]; - let newVersion = await client.versions.clone(BaseTest.GlobalAppId, first.version, { version: "test" }); - let versionsWithTest = await client.versions.list(BaseTest.GlobalAppId); - chai.expect(BaseTest.doesListContain(versionsWithTest, "version", newVersion.body)).to.be.true; - await client.versions.deleteMethod(BaseTest.GlobalAppId, newVersion.body); - let versionsWithoutTest = await client.versions.list(BaseTest.GlobalAppId); - chai.expect(BaseTest.doesListContain(versionsWithoutTest, "version", newVersion.body)).to.be.false; - }); - }); - - it('should clone version', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let versions = await client.versions.list(BaseTest.GlobalAppId); - let first = versions[0]; - let testVersion = { version: "test" }; - chai.expect(BaseTest.doesListContain(versions, "version", testVersion.version)).to.be.false; - let newVersion = await client.versions.clone(BaseTest.GlobalAppId, first.version, testVersion); - let versionsWithTest = await client.versions.list(BaseTest.GlobalAppId); - chai.expect(BaseTest.doesListContain(versionsWithTest, "version", newVersion.body)).to.be.true; - await client.versions.deleteMethod(BaseTest.GlobalAppId, newVersion.body); - }); - }); - - - it('should list versions with error subsription key', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let errorCode = "401"; - await client.versions.list(BaseTest.GlobalAppId, { - customHeaders: { - "Ocp-Apim-Subscription-Key": "3eff76bb229942899255402725b72933" - } - }).catch(err => { - let error = err.body.error; - console.log(error); - chai.expect(error).to.exist; - chai.expect(errorCode).to.eql(error.code); - }); - }); - }); - - it('should list versions with error app id', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let errorCode = "BadArgument"; - client.versions.list(BaseTest.GlobalAppIdError).catch(err => { - let error = err.body.error; - chai.expect(error).to.exist; - chai.expect(errorCode).to.eql(error.code); - }); - }); - }); - - it('should get version with error version', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let errorCode = "BadArgument"; - let versions = await client.versions.list(BaseTest.GlobalAppId); - let errorVersion = versions[0].version + "_"; - client.versions.get(BaseTest.GlobalAppId, errorVersion).catch(err => { - let error = err.body.error; - chai.expect(error).to.exist; - chai.expect(errorCode).to.eql(error.code); - }); - }); - }); - - it('should update version with error model', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let errorCode = "BadArgument"; - let versions = await client.versions.list(BaseTest.GlobalAppId); - let first = versions[0]; - let versionToUpdate = { version: "" }; - - client.versions.update(BaseTest.GlobalAppId, first.version, versionToUpdate).catch(err => { - let error = err.body.error; - chai.expect(error).to.exist; - chai.expect(errorCode).to.eql(error.code); - }); - }); - }); - - it('should delete version with error model', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let errorCode = "BadArgument"; - let versions = await client.versions.list(BaseTest.GlobalAppId); - let first = versions[0]; - client.versions.deleteMethod(BaseTest.GlobalAppId, first.version + "0").catch(err => { - let error = err.body.error; - chai.expect(error).to.exist; - chai.expect(errorCode).to.eql(error.code); - }); - }); - }); - - it('should clone version with error model', async function () { - await BaseTest.useClientFor(async (client: LUISAuthoringClient) => { - let errorCode = "BadArgument"; - let versions = await client.versions.list(BaseTest.GlobalAppId); - let first = versions[0]; - let testVersion = { version: "" }; - chai.expect(BaseTest.doesListContain(versions, "version", testVersion.version)); - client.versions.clone(BaseTest.GlobalAppId, first.version, testVersion).catch(err => { - let error = err.body.error; - chai.expect(error).to.exist; - chai.expect(errorCode).to.eql(error.code); - }); - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/SessionRecords/ImportApp.json b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/SessionRecords/ImportApp.json deleted file mode 100644 index 52b427408a75..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/SessionRecords/ImportApp.json +++ /dev/null @@ -1,252 +0,0 @@ -{ - "luis_schema_version": "2.1.0", - "versionId": "0.2", - "name": "LuisBot", - "desc": "", - "culture": "en-us", - "intents": [ - { - "name": "dateintent" - }, - { - "name": "Help" - }, - { - "name": "None" - }, - { - "name": "SearchHotels" - }, - { - "name": "ShowHotelsReviews" - } - ], - "entities": [ - { - "name": "AirportCode" - }, - { - "name": "Hotel" - } - ], - "composites": [], - "closedLists": [], - "bing_entities": [ - "datetimeV2", - "geographyV2" - ], - "model_features": [ - { - "name": "Near", - "mode": true, - "words": "near,around,close,nearby", - "activated": true - }, - { - "name": "Show", - "mode": true, - "words": "show,find,look,search", - "activated": true - } - ], - "regex_features": [ - { - "name": "AirportCodeRegex", - "pattern": "[a-z]{3}", - "activated": true - } - ], - "utterances": [ - { - "text": "i need help", - "intent": "Help", - "entities": [] - }, - { - "text": "help me", - "intent": "Help", - "entities": [] - }, - { - "text": "tomorrow", - "intent": "dateintent", - "entities": [] - }, - { - "text": "search for hotels in seattle", - "intent": "SearchHotels", - "entities": [] - }, - { - "text": "what can i do?", - "intent": "Help", - "entities": [] - }, - { - "text": "next monday", - "intent": "dateintent", - "entities": [] - }, - { - "text": "next year", - "intent": "dateintent", - "entities": [] - }, - { - "text": "look for hotels in miami", - "intent": "SearchHotels", - "entities": [] - }, - { - "text": "show me hotels in california", - "intent": "SearchHotels", - "entities": [] - }, - { - "text": "show me the reviews of the amazing bot resort", - "intent": "ShowHotelsReviews", - "entities": [ - { - "entity": "Hotel", - "startPos": 23, - "endPos": 44 - } - ] - }, - { - "text": "can i see the reviews of extended bot hotel?", - "intent": "ShowHotelsReviews", - "entities": [ - { - "entity": "Hotel", - "startPos": 25, - "endPos": 42 - } - ] - }, - { - "text": "find reviews of hotelxya", - "intent": "ShowHotelsReviews", - "entities": [ - { - "entity": "Hotel", - "startPos": 16, - "endPos": 23 - } - ] - }, - { - "text": "show me reviews of the amazing hotel", - "intent": "ShowHotelsReviews", - "entities": [ - { - "entity": "Hotel", - "startPos": 19, - "endPos": 35 - } - ] - }, - { - "text": "what are the available options?", - "intent": "Help", - "entities": [] - }, - { - "text": "best hotels in seattle", - "intent": "SearchHotels", - "entities": [] - }, - { - "text": "hotels in los angeles", - "intent": "SearchHotels", - "entities": [] - }, - { - "text": "can you show me hotels from los angeles?", - "intent": "SearchHotels", - "entities": [] - }, - { - "text": "can you show me the reviews of the amazing resort & hotel", - "intent": "ShowHotelsReviews", - "entities": [ - { - "entity": "Hotel", - "startPos": 31, - "endPos": 56 - } - ] - }, - { - "text": "what are the reviews of the hotel bot framework?", - "intent": "ShowHotelsReviews", - "entities": [ - { - "entity": "Hotel", - "startPos": 24, - "endPos": 46 - } - ] - }, - { - "text": "find hotels near eze", - "intent": "SearchHotels", - "entities": [ - { - "entity": "AirportCode", - "startPos": 17, - "endPos": 19 - } - ] - }, - { - "text": "where can i stay near nnn?", - "intent": "SearchHotels", - "entities": [ - { - "entity": "AirportCode", - "startPos": 22, - "endPos": 24 - } - ] - }, - { - "text": "show hotels near att airport", - "intent": "SearchHotels", - "entities": [ - { - "entity": "AirportCode", - "startPos": 17, - "endPos": 19 - } - ] - }, - { - "text": "find hotels near agl", - "intent": "SearchHotels", - "entities": [ - { - "entity": "AirportCode", - "startPos": 17, - "endPos": 19 - } - ] - }, - { - "text": "find hotels around eze airport", - "intent": "SearchHotels", - "entities": [ - { - "entity": "AirportCode", - "startPos": 19, - "endPos": 21 - } - ] - }, - { - "text": "01/7", - "intent": "dateintent", - "entities": [] - } - ] -} \ No newline at end of file diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/SessionRecords/ImportLuApp.json b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/SessionRecords/ImportLuApp.json deleted file mode 100644 index 98c604ccc444..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/SessionRecords/ImportLuApp.json +++ /dev/null @@ -1,109 +0,0 @@ - -> LUIS application information -> !# @app.name = Json 600 App -> !# @app.desc = Json 600 App -> !# @app.versionId = 0.2 -> !# @app.culture = en-us -> !# @app.luis_schema_version = 6.0.0 - - -> # Intent definitions - -> !# @intent.inherits = name : Calendar.AcceptEventEntry; domain_name : Calendar; model_name : AcceptEventEntry - -## Calendar.AcceptEventEntry -- save the date may 17 {@Calendar.Subject=pictures party} -- schedule {@Calendar.Subject=appointment} for tomorrow please -- {@Calendar.Subject=Meeting My Manager} -- The meeting will last for one hour -- Add an event to visit 209 Nashville Gym -- Add {@Calendar.Subject=imax theater} to my upcoming events -- dunmore pa sonic sounds Friday morning please -- Add a new task {@Calendar.Subject=finish assignment} -- Add a new event on 27 - Apr -- calendar i ' ll be at the garage from 8 till 3 this saturday -- Add an event to {@Calendar.Subject=read about adam lambert news} - - -> !# @intent.inherits = name : Communication.AddContact; domain_name : Communication; model_name : AddContact - -## Communication.AddContact - - -@ intent Communication.AddContact usesFeatures simpleentity1,phraselist1 - -> !# @intent.inherits = name : Communication.AddMore; domain_name : Communication; model_name : AddMore - -## Communication.AddMore - - -> !# @intent.inherits = name : Communication.Confirm; domain_name : Communication; model_name : Confirm - -## Communication.Confirm - - -## intent1 - - -## None -- a -- hi {@simpleentity1=guys} -- Please just delete {@Calendar.Subject=my meeting} -- Extend {@Calendar.Subject=lunch meeting} 30 minutes extra -- {@Calendar.Subject=Marketing meetings} on Tuesdays will now be every Wednesday please change on my calendar -- {@Calendar.Subject=Appointment with Johnson} needs to be next week -- Search for {@Calendar.Subject=meetings with Chris} -- I want to reschedule the {@Calendar.Subject=meeting at the air force club} -- Move the {@Calendar.Subject=BBQ party} to Friday -- Am i free to {@Calendar.Subject=be with friends} saturday ? -- Delete {@Calendar.Subject=Helen Fred ' s birthday} -- {@Calendar.Subject=Call dad Mike} -- {@Calendar.Subject=The workshop} will last for 10 hours -- {@Calendar.Subject=email cloney John} -- Change {@Calendar.Subject=the meeting with Chris} to 9 : 00 am - - -> # Entity definitions - -> !# @entity.inherits = name : Calendar.Subject; domain_name : Calendar; model_name : Subject - -@ ml Calendar.Subject usesFeatures simpleentity1 - -@ ml simpleentity1 - -@ ml a1 hasRole role_a1 - - @ datetimeV2 b1 - - @ ml c1 - - @ ml d1 usesFeatures phraselist1 - - @ datetimeV2 e1 usesFeatures phraselist1 - - - -> # PREBUILT Entity definitions - -@ prebuilt age - -@ prebuilt datetimeV2 - - -> # Phrase list definitions - -@ phraselist phraselist1(interchangeable) = - - why,where,when,what,how,who - - -> # List entities - -@ list closedlist = - - a : - - b - - c - - d - - -> # RegEx entities - - -> # Composite entities - -@ composite compositeentity1 usesFeatures simpleentity1,Calendar.Subject = [simpleentity1, datetimeV2] diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/SessionRecords/ImportV2App.json b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/SessionRecords/ImportV2App.json deleted file mode 100644 index 0faeee92bee1..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/SessionRecords/ImportV2App.json +++ /dev/null @@ -1,266 +0,0 @@ -{ - "luis_schema_version": "2.1.0", - "versionId": "0.2", - "name": "LuisBot", - "desc": "", - "culture": "en-us", - "intents": [ - { - "name": "dateintent" - }, - { - "name": "Help" - }, - { - "name": "None" - }, - { - "name": "SearchHotels" - }, - { - "name": "ShowHotelsReviews" - } - ], - "entities": [ - { - "name": "AirportCode" - }, - { - "name": "Hotel" - } - ], - "composites": [], - "closedLists": [ - { - "name": "closedlist", - "subLists": [ - { - "canonicalForm": "a", - "list": [ - "b", - "c", - "d" - ] - } - ] - } - ], - "bing_entities": [ - "datetimeV2", - "geographyV2" - ], - "model_features": [ - { - "name": "Near", - "mode": true, - "words": "near,around,close,nearby", - "activated": true - }, - { - "name": "Show", - "mode": true, - "words": "show,find,look,search", - "activated": true - } - ], - "regex_features": [ - { - "name": "AirportCodeRegex", - "pattern": "[a-z]{3}", - "activated": true - } - ], - "utterances": [ - { - "text": "i need help", - "intent": "Help", - "entities": [] - }, - { - "text": "help me", - "intent": "Help", - "entities": [] - }, - { - "text": "tomorrow", - "intent": "dateintent", - "entities": [] - }, - { - "text": "search for hotels in seattle", - "intent": "SearchHotels", - "entities": [] - }, - { - "text": "what can i do?", - "intent": "Help", - "entities": [] - }, - { - "text": "next monday", - "intent": "dateintent", - "entities": [] - }, - { - "text": "next year", - "intent": "dateintent", - "entities": [] - }, - { - "text": "look for hotels in miami", - "intent": "SearchHotels", - "entities": [] - }, - { - "text": "show me hotels in california", - "intent": "SearchHotels", - "entities": [] - }, - { - "text": "show me the reviews of the amazing bot resort", - "intent": "ShowHotelsReviews", - "entities": [ - { - "entity": "Hotel", - "startPos": 23, - "endPos": 44 - } - ] - }, - { - "text": "can i see the reviews of extended bot hotel?", - "intent": "ShowHotelsReviews", - "entities": [ - { - "entity": "Hotel", - "startPos": 25, - "endPos": 42 - } - ] - }, - { - "text": "find reviews of hotelxya", - "intent": "ShowHotelsReviews", - "entities": [ - { - "entity": "Hotel", - "startPos": 16, - "endPos": 23 - } - ] - }, - { - "text": "show me reviews of the amazing hotel", - "intent": "ShowHotelsReviews", - "entities": [ - { - "entity": "Hotel", - "startPos": 19, - "endPos": 35 - } - ] - }, - { - "text": "what are the available options?", - "intent": "Help", - "entities": [] - }, - { - "text": "best hotels in seattle", - "intent": "SearchHotels", - "entities": [] - }, - { - "text": "hotels in los angeles", - "intent": "SearchHotels", - "entities": [] - }, - { - "text": "can you show me hotels from los angeles?", - "intent": "SearchHotels", - "entities": [] - }, - { - "text": "can you show me the reviews of the amazing resort & hotel", - "intent": "ShowHotelsReviews", - "entities": [ - { - "entity": "Hotel", - "startPos": 31, - "endPos": 56 - } - ] - }, - { - "text": "what are the reviews of the hotel bot framework?", - "intent": "ShowHotelsReviews", - "entities": [ - { - "entity": "Hotel", - "startPos": 24, - "endPos": 46 - } - ] - }, - { - "text": "find hotels near eze", - "intent": "SearchHotels", - "entities": [ - { - "entity": "AirportCode", - "startPos": 17, - "endPos": 19 - } - ] - }, - { - "text": "where can i stay near nnn?", - "intent": "SearchHotels", - "entities": [ - { - "entity": "AirportCode", - "startPos": 22, - "endPos": 24 - } - ] - }, - { - "text": "show hotels near att airport", - "intent": "SearchHotels", - "entities": [ - { - "entity": "AirportCode", - "startPos": 17, - "endPos": 19 - } - ] - }, - { - "text": "find hotels near agl", - "intent": "SearchHotels", - "entities": [ - { - "entity": "AirportCode", - "startPos": 17, - "endPos": 19 - } - ] - }, - { - "text": "find hotels around eze airport", - "intent": "SearchHotels", - "entities": [ - { - "entity": "AirportCode", - "startPos": 19, - "endPos": 21 - } - ] - }, - { - "text": "01/7", - "intent": "dateintent", - "entities": [] - } - ] -} \ No newline at end of file diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/baseTest.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/baseTest.ts deleted file mode 100644 index fe3f9dddd3a7..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/test/baseTest.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import { CognitiveServicesCredentials } from "@azure/ms-rest-azure-js"; -import { LUISAuthoringClient } from "../src/lUISAuthoringClient"; - -export class BaseTest { - static GlobalAppId = process.env['global_app_id']; - static GlobalVersionId = "0.1"; - static GlobalAppIdError = process.env['global_app_id_error']; - static GlobalNoneId = process.env['global_none_id']; - static AuthoringKey = process.env['authoring_key']; - static EmptyId = "00000000-0000-0000-0000-000000000000"; - static OwnerEmail = process.env['owner_email']; - - static async useClientFor(test) { - let client = new LUISAuthoringClient( - new CognitiveServicesCredentials(this.AuthoringKey), - "https://westus.api.cognitive.microsoft.com" - ); - await test(client); - } - - static doesListContain(list: any[], key: string, value: any) { - let found = false; - for (var item of list) { - if (item[key] == value) { - found = true; - } - } - return found; - } -} diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/tsconfig.json b/sdk/cognitiveservices/cognitiveservices-luis-authoring/tsconfig.json deleted file mode 100644 index 422b584abd5e..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "module": "es6", - "moduleResolution": "node", - "strict": true, - "target": "es5", - "sourceMap": true, - "declarationMap": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], - "declaration": true, - "outDir": "./esm", - "importHelpers": true - }, - "include": ["./src/**/*.ts"], - "exclude": ["node_modules"] -} diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/tsconfig.test.json b/sdk/cognitiveservices/cognitiveservices-luis-authoring/tsconfig.test.json deleted file mode 100644 index 9b7a87806063..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/tsconfig.test.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "moduleResolution": "node", - "strict": true, - "target": "es5", - "sourceMap": true, - "declarationMap": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "lib": [ - "es6", - "dom" - ], - "declaration": true, - "outDir": "./esm", - "importHelpers": true - }, - "include": [ - "./test/**/*.ts" - ], - "exclude": [ - "node_modules" - ] -} \ No newline at end of file diff --git a/sdk/cognitiveservices/cognitiveservices-luis-runtime/LICENSE.txt b/sdk/cognitiveservices/cognitiveservices-luis-runtime/LICENSE.txt deleted file mode 100644 index b73b4a1293c3..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-runtime/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2019 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/sdk/cognitiveservices/cognitiveservices-luis-runtime/README.md b/sdk/cognitiveservices/cognitiveservices-luis-runtime/README.md deleted file mode 100644 index 24a3d675f0a6..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-runtime/README.md +++ /dev/null @@ -1,166 +0,0 @@ -## An isomorphic javascript sdk for - LUISRuntimeClient - -This package contains an isomorphic SDK for LUISRuntimeClient. - -### Currently supported environments - -- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) -- Latest versions of Safari, Chrome, Edge, and Firefox. - -### How to Install - -```bash -npm install @azure/cognitiveservices-luis-runtime -``` - -### How to use - -#### nodejs - Authentication, client creation and getVersionPrediction prediction as an example written in TypeScript. - -##### Install @azure/ms-rest-azure-js - -```bash -npm install @azure/ms-rest-azure-js -``` - -##### Sample code - -```javascript -const { CognitiveServicesCredentials } = require("@azure/ms-rest-azure-js"); -const { LUISRuntimeClient } = require("@azure/cognitiveservices-luis-runtime"); - -let authoringKey = process.env["luis-authoring-key"]; -const creds = new CognitiveServicesCredentials(authoringKey); - -// check the following link to find your region -// https://docs.microsoft.com/azure/cognitive-services/luis/luis-reference-regions -const region = ""; -const client = new LUISRuntimeClient(creds, "https://" + region + ".api.cognitive.microsoft.com/"); - -const appId = ""; // replace this with your appId. -const versionId = "0.1"; // replace with version of your luis application. Initial value will be 0.1 - -const predictionRequest = { - query: "testquery", - options: { - datetimeReference: new Date(), - preferExternalEntities: true - }, - externalEntities: [ - { - entityName: "testentityName", - startIndex: 1, - entityLength: 1, - score: 0.86, - resolution: {} - } - ], - dynamicLists: [ - { - listEntityName: "testlistEntityName", - requestLists: [ - { - name: "testname", - canonicalForm: "testcanonicalForm", - synonyms: ["testsynonyms"] - } - ] - } - ] -}; -const verbose = true; -const showAllIntents = true; - -client.prediction - .getVersionPrediction(appId, versionId, predictionRequest, { verbose, showAllIntents }) - .then((result) => { - console.log("The result is:"); - console.log(result); - }) - .catch((err) => { - console.error(err); - }); -``` - -#### browser - Authentication, client creation and getVersionPrediction prediction as an example written in JavaScript. - - - -##### Sample code - -- index.html - -```html - - - - @azure/cognitiveservices-luis-runtime sample - - - - - - -``` - -## Related projects - -- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcognitiveservices%2Fcognitiveservices-luis-runtime%2FREADME.png) diff --git a/sdk/cognitiveservices/cognitiveservices-luis-runtime/package.json b/sdk/cognitiveservices/cognitiveservices-luis-runtime/package.json deleted file mode 100644 index e4eb77017855..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-runtime/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "@azure/cognitiveservices-luis-runtime", - "author": "Microsoft Corporation", - "description": "LUISRuntimeClient Library with typescript type definitions for node.js and browser.", - "version": "5.0.0", - "dependencies": { - "@azure/ms-rest-js": "^2.0.3", - "tslib": "^1.10.0" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "license": "MIT", - "main": "./dist/cognitiveservices-luis-runtime.js", - "module": "./esm/lUISRuntimeClient.js", - "types": "./esm/lUISRuntimeClient.d.ts", - "devDependencies": { - "@types/chai": "^4.2.0", - "@types/mocha": "^5.2.7", - "mocha": "^6.1.4", - "nock": "^10.0.0", - "rollup": "^0.66.2", - "@azure/ms-rest-azure-js": "^2.0.1", - "rollup-plugin-node-resolve": "^3.4.0", - "rollup-plugin-sourcemaps": "^0.4.2", - "ts-node": "^8.3.0", - "typescript": "^3.1.1", - "uglify-js": "^3.4.9", - "ts-mocha": "^6.0.0" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cognitiveservices/cognitiveservices-luis-runtime", - "repository": { - "type": "git", - "url": "https://github.com/Azure/azure-sdk-for-js.git" - }, - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "files": [ - "dist/**/*.js", - "dist/**/*.js.map", - "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "esm/**/*.js", - "esm/**/*.js.map", - "esm/**/*.d.ts", - "esm/**/*.d.ts.map", - "src/**/*.ts", - "README.md", - "rollup.config.js", - "tsconfig.json" - ], - "scripts": { - "build": "tsc && rollup -c rollup.config.js && npm run minify", - "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/cognitiveservices-luis-runtime.js.map'\" -o ./dist/cognitiveservices-luis-runtime.min.js ./dist/cognitiveservices-luis-runtime.js", - "prepack": "npm install && npm run build", - "test": "ts-mocha -p tsconfig.test.json test/**/*.test.ts --timeout 100000" - }, - "sideEffects": false, - "autoPublish": true -} diff --git a/sdk/cognitiveservices/cognitiveservices-luis-runtime/rollup.config.js b/sdk/cognitiveservices/cognitiveservices-luis-runtime/rollup.config.js deleted file mode 100644 index 66d9b68a2d59..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-runtime/rollup.config.js +++ /dev/null @@ -1,39 +0,0 @@ -import rollup from "rollup"; -import nodeResolve from "rollup-plugin-node-resolve"; -import sourcemaps from "rollup-plugin-sourcemaps"; - -/** - * @type {rollup.RollupFileOptions} - */ -const config = { - input: "./esm/lUISRuntimeClient.js", - external: [ - "@azure/ms-rest-js", - "@azure/ms-rest-azure-js" - ], - output: { - file: "./dist/cognitiveservices-luis-runtime.js", - format: "umd", - name: "Azure.CognitiveservicesLuisRuntime", - sourcemap: true, - globals: { - "@azure/ms-rest-js": "msRest", - "@azure/ms-rest-azure-js": "msRestAzure" - }, - banner: `/* - * 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. - */` - }, - plugins: [ - nodeResolve({ mainFields: ['module', 'main'] }), - sourcemaps() - ] -}; - -export default config; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/lUISRuntimeClient.ts b/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/lUISRuntimeClient.ts deleted file mode 100644 index b7c934c52d50..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/lUISRuntimeClient.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "./models"; -import * as Mappers from "./models/mappers"; -import * as operations from "./operations"; -import { LUISRuntimeClientContext } from "./lUISRuntimeClientContext"; - -class LUISRuntimeClient extends LUISRuntimeClientContext { - // Operation groups - prediction: operations.PredictionOperations; - - /** - * Initializes a new instance of the LUISRuntimeClient class. - * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: - * https://westus.api.cognitive.microsoft.com). - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param [options] The parameter options - */ - constructor(credentials: msRest.ServiceClientCredentials, endpoint: string, options?: msRest.ServiceClientOptions) { - super(credentials, endpoint, options); - this.prediction = new operations.PredictionOperations(this); - } -} - -// Operation Specifications - -export { - LUISRuntimeClient, - LUISRuntimeClientContext, - Models as LUISRuntimeModels, - Mappers as LUISRuntimeMappers -}; -export * from "./operations"; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/lUISRuntimeClientContext.ts b/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/lUISRuntimeClientContext.ts deleted file mode 100644 index 131f36a8d88c..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/lUISRuntimeClientContext.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; - -const packageName = "@azure/cognitiveservices-luis-runtime"; -const packageVersion = "5.0.0"; - -export class LUISRuntimeClientContext extends msRest.ServiceClient { - endpoint: string; - credentials: msRest.ServiceClientCredentials; - - /** - * Initializes a new instance of the LUISRuntimeClientContext class. - * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: - * https://westus.api.cognitive.microsoft.com). - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param [options] The parameter options - */ - constructor(credentials: msRest.ServiceClientCredentials, endpoint: string, options?: msRest.ServiceClientOptions) { - if (endpoint == undefined) { - throw new Error("'endpoint' cannot be null."); - } - if (credentials == undefined) { - throw new Error("'credentials' cannot be null."); - } - - if (!options) { - options = {}; - } - - if (!options.userAgent) { - const defaultUserAgent = msRest.getDefaultUserAgentValue(); - options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; - } - - super(credentials, options); - - this.baseUri = "{Endpoint}/luis/prediction/v3.0"; - this.requestContentType = "application/json; charset=utf-8"; - this.endpoint = endpoint; - this.credentials = credentials; - } -} diff --git a/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/models/index.ts b/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/models/index.ts deleted file mode 100644 index 8b33aea6ee5c..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/models/index.ts +++ /dev/null @@ -1,272 +0,0 @@ -/* - * 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. - */ - - -import * as msRest from "@azure/ms-rest-js"; - -/** - * Represents an intent prediction. - */ -export interface Intent { - /** - * The score of the fired intent. - */ - score?: number; - /** - * The prediction of the dispatched application. - */ - childApp?: Prediction; -} - -/** - * The result of the sentiment analysis. - */ -export interface Sentiment { - /** - * The label of the sentiment analysis result. - */ - label?: string; - /** - * The sentiment score of the query. - */ - score: number; -} - -/** - * Represents the prediction of a query. - */ -export interface Prediction { - /** - * The query after spell checking. Only set if spell check was enabled and a spelling mistake was - * found. - */ - alteredQuery?: string; - /** - * The name of the top scoring intent. - */ - topIntent: string; - /** - * A dictionary representing the intents that fired. - */ - intents: { [propertyName: string]: Intent }; - /** - * A dictionary representing the entities that fired. - */ - entities: { [propertyName: string]: any }; - /** - * The result of the sentiment analysis. - */ - sentiment?: Sentiment; -} - -/** - * Represents the prediction response. - */ -export interface PredictionResponse { - /** - * The query used in the prediction. - */ - query: string; - /** - * The prediction of the requested query. - */ - prediction: Prediction; -} - -/** - * Represents the definition of the error that occurred. - */ -export interface ErrorBody { - /** - * The error code. - */ - code: string; - /** - * The error message. - */ - message: string; -} - -/** - * Represents the error that occurred. - */ -export interface ErrorModel { - error: ErrorBody; -} - -/** - * The custom options for the prediction request. - */ -export interface PredictionRequestOptions { - /** - * The reference DateTime used for predicting datetime entities. - */ - datetimeReference?: Date; - /** - * Whether to make the external entities resolution override the predictions if an overlap - * occurs. - */ - preferExternalEntities?: boolean; -} - -/** - * Defines a user predicted entity that extends an already existing one. - */ -export interface ExternalEntity { - /** - * The name of the entity to extend. - */ - entityName: string; - /** - * The start character index of the predicted entity. - */ - startIndex: number; - /** - * The length of the predicted entity. - */ - entityLength: number; - /** - * A user supplied custom resolution to return as the entity's prediction. - */ - resolution?: any; - /** - * A user supplied score to return as the entity's prediction score. - */ - score?: number; -} - -/** - * Defines a sub-list to append to an existing list entity. - */ -export interface RequestList { - /** - * The name of the sub-list. - */ - name?: string; - /** - * The canonical form of the sub-list. - */ - canonicalForm: string; - /** - * The synonyms of the canonical form. - */ - synonyms?: string[]; -} - -/** - * Defines an extension for a list entity. - */ -export interface DynamicList { - /** - * The name of the list entity to extend. - */ - listEntityName: string; - /** - * The lists to append on the extended list entity. - */ - requestLists: RequestList[]; -} - -/** - * Represents the prediction request parameters. - */ -export interface PredictionRequest { - /** - * The query to predict. - */ - query: string; - /** - * The custom options defined for this request. - */ - options?: PredictionRequestOptions; - /** - * The externally predicted entities for this request. - */ - externalEntities?: ExternalEntity[]; - /** - * The dynamically created list entities for this request. - */ - dynamicLists?: DynamicList[]; -} - -/** - * Optional Parameters. - */ -export interface PredictionGetVersionPredictionOptionalParams extends msRest.RequestOptionsBase { - /** - * Indicates whether to get extra metadata for the entities predictions or not. - */ - verbose?: boolean; - /** - * Indicates whether to return all the intents in the response or just the top intent. - */ - showAllIntents?: boolean; - /** - * Indicates whether to log the endpoint query or not. - */ - log?: boolean; -} - -/** - * Optional Parameters. - */ -export interface PredictionGetSlotPredictionOptionalParams extends msRest.RequestOptionsBase { - /** - * Indicates whether to get extra metadata for the entities predictions or not. - */ - verbose?: boolean; - /** - * Indicates whether to return all the intents in the response or just the top intent. - */ - showAllIntents?: boolean; - /** - * Indicates whether to log the endpoint query or not. - */ - log?: boolean; -} - -/** - * Contains response data for the getVersionPrediction operation. - */ -export type PredictionGetVersionPredictionResponse = PredictionResponse & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PredictionResponse; - }; -}; - -/** - * Contains response data for the getSlotPrediction operation. - */ -export type PredictionGetSlotPredictionResponse = PredictionResponse & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PredictionResponse; - }; -}; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/models/mappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/models/mappers.ts deleted file mode 100644 index ed731654516f..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/models/mappers.ts +++ /dev/null @@ -1,356 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; - - -export const Intent: msRest.CompositeMapper = { - serializedName: "Intent", - type: { - name: "Composite", - className: "Intent", - modelProperties: { - score: { - serializedName: "score", - type: { - name: "Number" - } - }, - childApp: { - serializedName: "childApp", - type: { - name: "Composite", - className: "Prediction" - } - } - } - } -}; - -export const Sentiment: msRest.CompositeMapper = { - serializedName: "Sentiment", - type: { - name: "Composite", - className: "Sentiment", - modelProperties: { - label: { - serializedName: "label", - type: { - name: "String" - } - }, - score: { - required: true, - serializedName: "score", - type: { - name: "Number" - } - } - } - } -}; - -export const Prediction: msRest.CompositeMapper = { - serializedName: "Prediction", - type: { - name: "Composite", - className: "Prediction", - modelProperties: { - alteredQuery: { - serializedName: "alteredQuery", - type: { - name: "String" - } - }, - topIntent: { - required: true, - serializedName: "topIntent", - type: { - name: "String" - } - }, - intents: { - required: true, - serializedName: "intents", - type: { - name: "Dictionary", - value: { - type: { - name: "Composite", - className: "Intent" - } - } - } - }, - entities: { - required: true, - serializedName: "entities", - type: { - name: "Dictionary", - value: { - type: { - name: "Object" - } - } - } - }, - sentiment: { - serializedName: "sentiment", - type: { - name: "Composite", - className: "Sentiment" - } - } - } - } -}; - -export const PredictionResponse: msRest.CompositeMapper = { - serializedName: "PredictionResponse", - type: { - name: "Composite", - className: "PredictionResponse", - modelProperties: { - query: { - required: true, - serializedName: "query", - type: { - name: "String" - } - }, - prediction: { - required: true, - serializedName: "prediction", - type: { - name: "Composite", - className: "Prediction" - } - } - } - } -}; - -export const ErrorBody: msRest.CompositeMapper = { - serializedName: "ErrorBody", - type: { - name: "Composite", - className: "ErrorBody", - modelProperties: { - code: { - required: true, - serializedName: "code", - type: { - name: "String" - } - }, - message: { - required: true, - serializedName: "message", - type: { - name: "String" - } - } - } - } -}; - -export const ErrorModel: msRest.CompositeMapper = { - serializedName: "Error", - type: { - name: "Composite", - className: "ErrorModel", - modelProperties: { - error: { - required: true, - serializedName: "error", - type: { - name: "Composite", - className: "ErrorBody" - } - } - } - } -}; - -export const PredictionRequestOptions: msRest.CompositeMapper = { - serializedName: "PredictionRequestOptions", - type: { - name: "Composite", - className: "PredictionRequestOptions", - modelProperties: { - datetimeReference: { - serializedName: "datetimeReference", - type: { - name: "DateTime" - } - }, - preferExternalEntities: { - serializedName: "preferExternalEntities", - type: { - name: "Boolean" - } - } - } - } -}; - -export const ExternalEntity: msRest.CompositeMapper = { - serializedName: "ExternalEntity", - type: { - name: "Composite", - className: "ExternalEntity", - modelProperties: { - entityName: { - required: true, - serializedName: "entityName", - type: { - name: "String" - } - }, - startIndex: { - required: true, - serializedName: "startIndex", - type: { - name: "Number" - } - }, - entityLength: { - required: true, - serializedName: "entityLength", - type: { - name: "Number" - } - }, - resolution: { - serializedName: "resolution", - type: { - name: "Object" - } - }, - score: { - serializedName: "score", - type: { - name: "Number" - } - } - } - } -}; - -export const RequestList: msRest.CompositeMapper = { - serializedName: "RequestList", - type: { - name: "Composite", - className: "RequestList", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - canonicalForm: { - required: true, - serializedName: "canonicalForm", - type: { - name: "String" - } - }, - synonyms: { - serializedName: "synonyms", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const DynamicList: msRest.CompositeMapper = { - serializedName: "DynamicList", - type: { - name: "Composite", - className: "DynamicList", - modelProperties: { - listEntityName: { - required: true, - serializedName: "listEntityName", - type: { - name: "String" - } - }, - requestLists: { - required: true, - serializedName: "requestLists", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RequestList" - } - } - } - } - } - } -}; - -export const PredictionRequest: msRest.CompositeMapper = { - serializedName: "PredictionRequest", - type: { - name: "Composite", - className: "PredictionRequest", - modelProperties: { - query: { - required: true, - serializedName: "query", - type: { - name: "String" - } - }, - options: { - serializedName: "options", - type: { - name: "Composite", - className: "PredictionRequestOptions" - } - }, - externalEntities: { - serializedName: "externalEntities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExternalEntity" - } - } - } - }, - dynamicLists: { - serializedName: "dynamicLists", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DynamicList" - } - } - } - } - } - } -}; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/models/parameters.ts b/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/models/parameters.ts deleted file mode 100644 index 09e658cfa885..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/models/parameters.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; - -export const appId: msRest.OperationURLParameter = { - parameterPath: "appId", - mapper: { - required: true, - serializedName: "appId", - type: { - name: "Uuid" - } - } -}; -export const endpoint: msRest.OperationURLParameter = { - parameterPath: "endpoint", - mapper: { - required: true, - serializedName: "Endpoint", - defaultValue: '', - type: { - name: "String" - } - }, - skipEncoding: true -}; -export const log: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "log" - ], - mapper: { - serializedName: "log", - type: { - name: "Boolean" - } - } -}; -export const showAllIntents: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "showAllIntents" - ], - mapper: { - serializedName: "show-all-intents", - type: { - name: "Boolean" - } - } -}; -export const slotName: msRest.OperationURLParameter = { - parameterPath: "slotName", - mapper: { - required: true, - serializedName: "slotName", - type: { - name: "String" - } - } -}; -export const verbose: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "verbose" - ], - mapper: { - serializedName: "verbose", - type: { - name: "Boolean" - } - } -}; -export const versionId: msRest.OperationURLParameter = { - parameterPath: "versionId", - mapper: { - required: true, - serializedName: "versionId", - type: { - name: "String" - } - } -}; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/models/predictionOperationsMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/models/predictionOperationsMappers.ts deleted file mode 100644 index d88b51a88652..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/models/predictionOperationsMappers.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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. - */ - -export { - DynamicList, - ErrorBody, - ErrorModel, - ExternalEntity, - Intent, - Prediction, - PredictionRequest, - PredictionRequestOptions, - PredictionResponse, - RequestList, - Sentiment -} from "../models/mappers"; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/operations/index.ts b/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/operations/index.ts deleted file mode 100644 index 8bb2f0a3a839..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/operations/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* - * 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. - */ - -export * from "./predictionOperations"; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/operations/predictionOperations.ts b/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/operations/predictionOperations.ts deleted file mode 100644 index 1cd95d3ce7a9..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-runtime/src/operations/predictionOperations.ts +++ /dev/null @@ -1,164 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/predictionOperationsMappers"; -import * as Parameters from "../models/parameters"; -import { LUISRuntimeClientContext } from "../lUISRuntimeClientContext"; - -/** Class representing a PredictionOperations. */ -export class PredictionOperations { - private readonly client: LUISRuntimeClientContext; - - /** - * Create a PredictionOperations. - * @param {LUISRuntimeClientContext} client Reference to the service client. - */ - constructor(client: LUISRuntimeClientContext) { - this.client = client; - } - - /** - * Gets the predictions for an application version. - * @param appId The application ID. - * @param versionId The application version ID. - * @param predictionRequest The prediction request parameters. - * @param [options] The optional parameters - * @returns Promise - */ - getVersionPrediction(appId: string, versionId: string, predictionRequest: Models.PredictionRequest, options?: Models.PredictionGetVersionPredictionOptionalParams): Promise; - /** - * @param appId The application ID. - * @param versionId The application version ID. - * @param predictionRequest The prediction request parameters. - * @param callback The callback - */ - getVersionPrediction(appId: string, versionId: string, predictionRequest: Models.PredictionRequest, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param versionId The application version ID. - * @param predictionRequest The prediction request parameters. - * @param options The optional parameters - * @param callback The callback - */ - getVersionPrediction(appId: string, versionId: string, predictionRequest: Models.PredictionRequest, options: Models.PredictionGetVersionPredictionOptionalParams, callback: msRest.ServiceCallback): void; - getVersionPrediction(appId: string, versionId: string, predictionRequest: Models.PredictionRequest, options?: Models.PredictionGetVersionPredictionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - versionId, - predictionRequest, - options - }, - getVersionPredictionOperationSpec, - callback) as Promise; - } - - /** - * Gets the predictions for an application slot. - * @param appId The application ID. - * @param slotName The application slot name. - * @param predictionRequest The prediction request parameters. - * @param [options] The optional parameters - * @returns Promise - */ - getSlotPrediction(appId: string, slotName: string, predictionRequest: Models.PredictionRequest, options?: Models.PredictionGetSlotPredictionOptionalParams): Promise; - /** - * @param appId The application ID. - * @param slotName The application slot name. - * @param predictionRequest The prediction request parameters. - * @param callback The callback - */ - getSlotPrediction(appId: string, slotName: string, predictionRequest: Models.PredictionRequest, callback: msRest.ServiceCallback): void; - /** - * @param appId The application ID. - * @param slotName The application slot name. - * @param predictionRequest The prediction request parameters. - * @param options The optional parameters - * @param callback The callback - */ - getSlotPrediction(appId: string, slotName: string, predictionRequest: Models.PredictionRequest, options: Models.PredictionGetSlotPredictionOptionalParams, callback: msRest.ServiceCallback): void; - getSlotPrediction(appId: string, slotName: string, predictionRequest: Models.PredictionRequest, options?: Models.PredictionGetSlotPredictionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - appId, - slotName, - predictionRequest, - options - }, - getSlotPredictionOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getVersionPredictionOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/versions/{versionId}/predict", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.versionId - ], - queryParameters: [ - Parameters.verbose, - Parameters.showAllIntents, - Parameters.log - ], - requestBody: { - parameterPath: "predictionRequest", - mapper: { - ...Mappers.PredictionRequest, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.PredictionResponse - }, - default: { - bodyMapper: Mappers.ErrorModel - } - }, - serializer -}; - -const getSlotPredictionOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "apps/{appId}/slots/{slotName}/predict", - urlParameters: [ - Parameters.endpoint, - Parameters.appId, - Parameters.slotName - ], - queryParameters: [ - Parameters.verbose, - Parameters.showAllIntents, - Parameters.log - ], - requestBody: { - parameterPath: "predictionRequest", - mapper: { - ...Mappers.PredictionRequest, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.PredictionResponse - }, - default: { - bodyMapper: Mappers.ErrorModel - } - }, - serializer -}; diff --git a/sdk/cognitiveservices/cognitiveservices-luis-runtime/test/Luis/predictions.test.ts b/sdk/cognitiveservices/cognitiveservices-luis-runtime/test/Luis/predictions.test.ts deleted file mode 100644 index 68654cf26717..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-runtime/test/Luis/predictions.test.ts +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -import { LUISRuntimeClient } from "../../src/lUISRuntimeClient"; -import { BaseTest } from "../baseTest"; -import * as chai from "chai"; - -describe("Predections Tests", function () { - var versionId = "0.1"; - var utterance = "today this is a test with post"; - var slotName = "production"; - let externalResolution = { text: "post", external: true }; - - it("should test prediction slot", async function () { - await BaseTest.useClientFor(async (client: LUISRuntimeClient) => { - let result = await client.prediction.getSlotPrediction( - BaseTest.GlobalAppId, - slotName, - { - query: utterance, - options: { - datetimeReference: new Date("2019-01-01"), - preferExternalEntities: true, - }, - externalEntities: [ - { - entityName: "simple", - startIndex: 26, - entityLength: 4, - score: 0.86, - resolution: externalResolution, - }, - ], - dynamicLists: [ - { - listEntityName: "list", - requestLists: [ - { - name: "test", - canonicalForm: "testing", - synonyms: ["this"], - }, - ], - }, - ], - }, - { - verbose: true, - showAllIntents: true, - } - ); - var prediction = result.prediction; - chai.expect(utterance).to.eql(result.query); - chai.expect(prediction.topIntent).to.eql("intent"); - chai.expect(Object.keys(prediction.intents).length).to.eql(2); - chai.expect(Object.keys(prediction.entities).length).to.eql(4); - chai.expect(prediction.entities["datetimeV2"]).to.be.exist; - chai.expect(prediction.entities["simple"]).to.be.exist; - chai.expect(prediction.entities["list"]).to.be.exist; - chai.expect(prediction.entities["$instance"]).to.be.exist; - - var actualResolution = prediction.entities["simple"][0]; - chai.expect(externalResolution).to.eql(actualResolution); - - var topIntent = prediction.intents[prediction.topIntent]; - chai.expect(topIntent.score).to.be.above(0.5); - chai.expect(prediction.sentiment.label).to.eql("positive"); - chai.expect(prediction.sentiment.score).to.be.above(0.5); - - var child = topIntent.childApp; - chai.expect(child.topIntent).to.eql("None"); - chai.expect(Object.keys(child.intents).length).to.eql(1); - chai.expect(Object.keys(child.entities).length).to.eql(2); - chai.expect(child.entities["datetimeV2"]).to.be.exist; - chai.expect(child.entities["$instance"]).to.be.exist; - - var dispatchTopIntent = child.intents[child.topIntent]; - chai.expect(dispatchTopIntent.score).to.be.above(0.5); - chai.expect(child.sentiment.label).to.eql("positive"); - chai.expect(child.sentiment.score).to.be.above(0.5); - }); - }); - - it("should test prediction with version", async function () { - await BaseTest.useClientFor(async (client: LUISRuntimeClient) => { - let result = await client.prediction.getVersionPrediction( - BaseTest.GlobalAppId, - versionId, - { - query: utterance, - options: { - datetimeReference: new Date("2019-01-01"), - preferExternalEntities: true, - }, - externalEntities: [ - { - entityName: "simple", - startIndex: 26, - entityLength: 4, - resolution: externalResolution, - }, - ], - dynamicLists: [ - { - listEntityName: "list", - requestLists: [ - { - name: "test", - canonicalForm: "testing", - synonyms: ["this"], - }, - ], - }, - ], - }, - { - verbose: true, - showAllIntents: true, - } - ); - let prediction = result.prediction; - chai.expect(utterance).to.eql(result.query); - chai.expect(prediction.topIntent).to.eql("intent"); - chai.expect(Object.keys(prediction.intents).length).to.eql(2); - chai.expect(Object.keys(prediction.entities).length).to.eql(4); - chai.expect(prediction.entities["datetimeV2"]).to.be.exist; - chai.expect(prediction.entities["simple"]).to.be.exist; - chai.expect(prediction.entities["list"]).to.be.exist; - chai.expect(prediction.entities["$instance"]).to.be.exist; - - var actualResolution = prediction.entities["simple"][0]; - chai.expect(externalResolution).to.eql(actualResolution); - - var topIntent = prediction.intents[prediction.topIntent]; - chai.expect(topIntent.score).to.be.above(0.5); - chai.expect(prediction.sentiment.label).to.eql("positive"); - chai.expect(prediction.sentiment.score).to.be.above(0.5); - - var child = topIntent.childApp; - chai.expect(child.topIntent).to.eql("None"); - chai.expect(Object.keys(child.intents).length).to.eql(1); - chai.expect(Object.keys(child.entities).length).to.eql(2); - chai.expect(child.entities["datetimeV2"]).to.be.exist; - chai.expect(child.entities["$instance"]).to.be.exist; - - var dispatchTopIntent = child.intents[child.topIntent]; - chai.expect(dispatchTopIntent.score).to.be.above(0.5); - chai.expect(child.sentiment.label).to.eql("positive"); - chai.expect(child.sentiment.score).to.be.above(0.5); - }); - }); - - it("should test app not found - throws api error exception", async function () { - await BaseTest.useClientFor(async (client: LUISRuntimeClient) => { - return client.prediction - .getSlotPrediction("7555b7c1-e69c-4580-9d95-1abd6dfa8291", "production", { - query: "this is a test with post", - }) - .catch((err) => { - chai.expect(err.body.error.code).to.eql("NotFound"); - }); - }); - }); - - it("should test empty query throws validation excpetion", async function () { - await BaseTest.useClientFor(async (client: LUISRuntimeClient) => { - return client.prediction - .getSlotPrediction(BaseTest.GlobalAppId, "production", { query: "" }) - .catch((err) => { - chai.expect(err.body.error.code).to.eql("BadArgument"); - }); - }); - }); -}); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-runtime/test/baseTest.ts b/sdk/cognitiveservices/cognitiveservices-luis-runtime/test/baseTest.ts deleted file mode 100644 index 7fe7ffe22c08..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-runtime/test/baseTest.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - */ - - -import { LUISRuntimeClient } from "../src/lUISRuntimeClient"; -import { CognitiveServicesCredentials } from "@azure/ms-rest-azure-js"; - -export class BaseTest { - static GlobalAppId = process.env['global_app_id']; - static GlobalVersionId = "0.1"; - static GlobalAppIdError = process.env['global_app_id_error']; - static GlobalNoneId = process.env['global_none_id']; - static AuthoringKey = process.env['authoring_key']; - static EmptyId = "00000000-0000-0000-0000-000000000000"; - static OwnerEmail = process.env['owner_email']; - - static async useClientFor(test) { - let client = new LUISRuntimeClient( - new CognitiveServicesCredentials(this.AuthoringKey), - "https://westus.api.cognitive.microsoft.com" - ); - await test(client); - } - - static doesListContain(list: any[], key: string, value: any) { - let found = false; - for (var item of list) { - if (item[key] == value) { - found = true; - } - } - return found; - } -} diff --git a/sdk/cognitiveservices/cognitiveservices-luis-runtime/tsconfig.json b/sdk/cognitiveservices/cognitiveservices-luis-runtime/tsconfig.json deleted file mode 100644 index 422b584abd5e..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-runtime/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "module": "es6", - "moduleResolution": "node", - "strict": true, - "target": "es5", - "sourceMap": true, - "declarationMap": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], - "declaration": true, - "outDir": "./esm", - "importHelpers": true - }, - "include": ["./src/**/*.ts"], - "exclude": ["node_modules"] -} diff --git a/sdk/cognitiveservices/cognitiveservices-luis-runtime/tsconfig.test.json b/sdk/cognitiveservices/cognitiveservices-luis-runtime/tsconfig.test.json deleted file mode 100644 index 9b7a87806063..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-luis-runtime/tsconfig.test.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "moduleResolution": "node", - "strict": true, - "target": "es5", - "sourceMap": true, - "declarationMap": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "lib": [ - "es6", - "dom" - ], - "declaration": true, - "outDir": "./esm", - "importHelpers": true - }, - "include": [ - "./test/**/*.ts" - ], - "exclude": [ - "node_modules" - ] -} \ No newline at end of file diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/LICENSE.txt b/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/LICENSE.txt deleted file mode 100644 index ea8fb1516028..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/README.md b/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/README.md deleted file mode 100644 index 315dd0ada30e..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/README.md +++ /dev/null @@ -1,165 +0,0 @@ -## An isomorphic javascript sdk for - QnAMakerRuntimeClient - -This package contains an isomorphic SDK for interacting with the QnA Maker service such as training and asking questions. -For editing and creating Knowledge Bases see @azure/cognitiveservices-qnamaker. - -### Currently supported environments - -- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) -- Latest versions of Safari, Chrome, Edge, and Firefox. - -### How to Install - -```bash -npm install @azure/cognitiveservices-qnamaker-runtime -``` - -### How to use - -#### nodejs - Authentication, client creation and generateAnswer runtime as an example written in TypeScript. - -##### Install @azure/ms-rest-azure-js - -```bash -npm install @azure/ms-rest-azure-js -``` - -##### Sample code - -```javascript -const { QnAMakerRuntimeClient } = require("@azure/cognitiveservices-qnamaker-runtime"); -const { CognitiveServicesCredentials } = require("@azure/ms-rest-azure-js"); - -async function main() { - const QNAMAKER_KEY = process.env["QNAMAKER_KEY"] || ""; - const QNAMAKER_ENDPOINT = process.env["QNAMAKER_ENDPOINT"] || ""; - const kbid = process.env["QNAMAKER_KNOWLEDGE_BASE_ID"] || ""; - - const cognitiveServicesCredentials = new CognitiveServicesCredentials(QNAMAKER_KEY); - const client = new QnAMakerRuntimeClient(cognitiveServicesCredentials, QNAMAKER_ENDPOINT); - const customHeaders = { Authorization: `EndpointKey ${QNAMAKER_KEY}` }; - - // A question you'd like to get a response for, from the knowledge base. For example - const question = "How are you?"; - - // Maximum number of answer to retreive - const top = 1; - - // Find only answers that contain these metadata - const strictFilters = [{ name: "editorial", value: "chitchat" }]; - - const result = await client.runtime.generateAnswer( - kbid, - { question, top, strictFilters }, - { customHeaders } - ); - console.log(JSON.stringify(result)); - // Sample Result - // { - // answers: [ - // { - // questions: [ - // "How are you?", - // "How is your tuesday?" - // ], - // answer: - // ""I'm doing great, thanks for asking!", - // score: 100, - // id: 90, - // source: - // "qna_chitchat_Friendly.tsv", - // metadata: [{ name: "editorial", value: "chitchat" }], - // context: { isContextOnly: false, prompts: [] } - // } - // ], - // debugInfo: null, - // activeLearningEnabled: false - // } -} - -main(); -``` - -#### browser - Authentication, client creation and generateAnswer runtime as an example written in JavaScript. - -##### Sample code - -- index.html - -```html - - - - @azure/cognitiveservices-qnamaker-runtime sample - - - - - - -``` - -## Related projects - -- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/README.png) diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/package.json b/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/package.json deleted file mode 100644 index 927bf66fb616..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "@azure/cognitiveservices-qnamaker-runtime", - "author": "Microsoft Corporation", - "description": "QnAMakerRuntimeClient Library with typescript type definitions for node.js and browser.", - "version": "1.0.1", - "dependencies": { - "@azure/ms-rest-js": "^2.0.4", - "tslib": "^1.10.0" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "license": "MIT", - "main": "./dist/cognitiveservices-qnamaker-runtime.js", - "module": "./esm/qnAMakerRuntimeClient.js", - "types": "./esm/qnAMakerRuntimeClient.d.ts", - "devDependencies": { - "typescript": "^3.5.3", - "rollup": "^1.18.0", - "rollup-plugin-node-resolve": "^5.2.0", - "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.6.0" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime", - "repository": { - "type": "git", - "url": "https://github.com/Azure/azure-sdk-for-js.git" - }, - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "files": [ - "dist/**/*.js", - "dist/**/*.js.map", - "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "esm/**/*.js", - "esm/**/*.js.map", - "esm/**/*.d.ts", - "esm/**/*.d.ts.map", - "src/**/*.ts", - "README.md", - "rollup.config.js", - "tsconfig.json" - ], - "scripts": { - "build": "tsc && rollup -c rollup.config.js && npm run minify", - "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/cognitiveservices-qnamaker-runtime.js.map'\" -o ./dist/cognitiveservices-qnamaker-runtime.min.js ./dist/cognitiveservices-qnamaker-runtime.js", - "prepack": "npm install && npm run build" - }, - "sideEffects": false, - "autoPublish": true -} diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/rollup.config.js b/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/rollup.config.js deleted file mode 100644 index 2433fb2a5f61..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/rollup.config.js +++ /dev/null @@ -1,37 +0,0 @@ -import rollup from "rollup"; -import nodeResolve from "rollup-plugin-node-resolve"; -import sourcemaps from "rollup-plugin-sourcemaps"; - -/** - * @type {rollup.RollupFileOptions} - */ -const config = { - input: "./esm/qnAMakerRuntimeClient.js", - external: [ - "@azure/ms-rest-js", - "@azure/ms-rest-azure-js" - ], - output: { - file: "./dist/cognitiveservices-qnamaker-runtime.js", - format: "umd", - name: "Azure.CognitiveservicesQnamakerRuntime", - sourcemap: true, - globals: { - "@azure/ms-rest-js": "msRest", - "@azure/ms-rest-azure-js": "msRestAzure" - }, - banner: `/* - * 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. - */` - }, - plugins: [ - nodeResolve({ mainFields: ['module', 'main'] }), - sourcemaps() - ] -}; - -export default config; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/models/index.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/models/index.ts deleted file mode 100644 index f76840a2b675..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/models/index.ts +++ /dev/null @@ -1,338 +0,0 @@ -/* - * 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. - */ - - -import * as msRest from "@azure/ms-rest-js"; - -/** - * Name - value pair of metadata. - */ -export interface MetadataDTO { - /** - * Metadata name. - */ - name: string; - /** - * Metadata value. - */ - value: string; -} - -/** - * Context associated with Qna. - */ -export interface ContextDTO { - /** - * To mark if a prompt is relevant only with a previous question or not. - * true - Do not include this QnA as search result for queries without context - * false - ignores context and includes this QnA in search result - */ - isContextOnly?: boolean; - /** - * List of prompts associated with the answer. - */ - prompts?: PromptDTO[]; -} - -/** - * Context of a QnA - */ -export interface QnADTOContext extends ContextDTO { -} - -/** - * Q-A object. - */ -export interface QnADTO { - /** - * Unique id for the Q-A. - */ - id?: number; - /** - * Answer text - */ - answer: string; - /** - * Source from which Q-A was indexed. eg. - * https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs - */ - source?: string; - /** - * List of questions associated with the answer. - */ - questions: string[]; - /** - * List of metadata associated with the answer. - */ - metadata?: MetadataDTO[]; - /** - * Context of a QnA - */ - context?: QnADTOContext; -} - -/** - * QnADTO - Either QnaId or QnADTO needs to be present in a PromptDTO object - */ -export interface PromptDTOQna extends QnADTO { -} - -/** - * Prompt for an answer. - */ -export interface PromptDTO { - /** - * Index of the prompt - used in ordering of the prompts - */ - displayOrder?: number; - /** - * Qna id corresponding to the prompt - if QnaId is present, QnADTO object is ignored. - */ - qnaId?: number; - /** - * QnADTO - Either QnaId or QnADTO needs to be present in a PromptDTO object - */ - qna?: PromptDTOQna; - /** - * Text displayed to represent a follow up question prompt - */ - displayText?: string; -} - -/** - * The error object. As per Microsoft One API guidelines - - * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. - */ -export interface ErrorModel { - /** - * One of a server-defined set of error codes. Possible values include: 'BadArgument', - * 'Forbidden', 'NotFound', 'KbNotFound', 'Unauthorized', 'Unspecified', 'EndpointKeysError', - * 'QuotaExceeded', 'QnaRuntimeError', 'SKULimitExceeded', 'OperationNotFound', 'ServiceError', - * 'ValidationFailure', 'ExtractionFailure' - */ - code: ErrorCodeType; - /** - * A human-readable representation of the error. - */ - message?: string; - /** - * The target of the error. - */ - target?: string; - /** - * An array of details about specific errors that led to this reported error. - */ - details?: ErrorModel[]; - /** - * An object containing more specific information than the current object about the error. - */ - innerError?: InnerErrorModel; -} - -/** - * The error object. - */ -export interface ErrorResponseError extends ErrorModel { -} - -/** - * Error response. As per Microsoft One API guidelines - - * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. - */ -export interface ErrorResponse { - /** - * The error object. - */ - error?: ErrorResponseError; -} - -/** - * An object containing more specific information about the error. As per Microsoft One API - * guidelines - - * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. - */ -export interface InnerErrorModel { - /** - * A more specific error code than was provided by the containing error. - */ - code?: string; - /** - * An object containing more specific information than the current object about the error. - */ - innerError?: InnerErrorModel; -} - -/** - * Context object with previous QnA's information. - */ -export interface QueryContextDTO { - /** - * Previous QnA Id - qnaId of the top result. - */ - previousQnaId?: string; - /** - * Previous user query. - */ - previousUserQuery?: string; -} - -/** - * Context object with previous QnA's information. - */ -export interface QueryDTOContext extends QueryContextDTO { -} - -/** - * POST body schema to query the knowledgebase. - */ -export interface QueryDTO { - /** - * Exact qnaId to fetch from the knowledgebase, this field takes priority over question. - */ - qnaId?: string; - /** - * User question to query against the knowledge base. - */ - question?: string; - /** - * Max number of answers to be returned for the question. - */ - top?: number; - /** - * Unique identifier for the user. - */ - userId?: string; - /** - * Query against the test index. - */ - isTest?: boolean; - /** - * Threshold for answers returned based on score. - */ - scoreThreshold?: number; - /** - * Context object with previous QnA's information. - */ - context?: QueryDTOContext; - /** - * Optional field. Set to 'QuestionOnly' for using a question only Ranker. - */ - rankerType?: string; - /** - * Find only answers that contain these metadata. - */ - strictFilters?: MetadataDTO[]; -} - -/** - * Context object of the QnA - */ -export interface QnASearchResultContext extends ContextDTO { -} - -/** - * Represents Search Result. - */ -export interface QnASearchResult { - /** - * List of questions. - */ - questions?: string[]; - /** - * Answer. - */ - answer?: string; - /** - * Search result score. - */ - score?: number; - /** - * Id of the QnA result. - */ - id?: number; - /** - * Source of QnA result. - */ - source?: string; - /** - * List of metadata. - */ - metadata?: MetadataDTO[]; - /** - * Context object of the QnA - */ - context?: QnASearchResultContext; -} - -/** - * Represents List of Question Answers. - */ -export interface QnASearchResultList { - /** - * Represents Search Result list. - */ - answers?: QnASearchResult[]; -} - -/** - * Active learning feedback record. - */ -export interface FeedbackRecordDTO { - /** - * Unique identifier for the user. - */ - userId?: string; - /** - * The suggested question being provided as feedback. - */ - userQuestion?: string; - /** - * The qnaId for which the suggested question is provided as feedback. - */ - qnaId?: number; -} - -/** - * Active learning feedback records. - */ -export interface FeedbackRecordsDTO { - /** - * List of feedback records. - */ - feedbackRecords?: FeedbackRecordDTO[]; -} - -/** - * Defines values for ErrorCodeType. - * Possible values include: 'BadArgument', 'Forbidden', 'NotFound', 'KbNotFound', 'Unauthorized', - * 'Unspecified', 'EndpointKeysError', 'QuotaExceeded', 'QnaRuntimeError', 'SKULimitExceeded', - * 'OperationNotFound', 'ServiceError', 'ValidationFailure', 'ExtractionFailure' - * @readonly - * @enum {string} - */ -export type ErrorCodeType = 'BadArgument' | 'Forbidden' | 'NotFound' | 'KbNotFound' | 'Unauthorized' | 'Unspecified' | 'EndpointKeysError' | 'QuotaExceeded' | 'QnaRuntimeError' | 'SKULimitExceeded' | 'OperationNotFound' | 'ServiceError' | 'ValidationFailure' | 'ExtractionFailure'; - -/** - * Contains response data for the generateAnswer operation. - */ -export type RuntimeGenerateAnswerResponse = QnASearchResultList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: QnASearchResultList; - }; -}; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/models/mappers.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/models/mappers.ts deleted file mode 100644 index fa90543d3f62..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/models/mappers.ts +++ /dev/null @@ -1,553 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; - - -export const MetadataDTO: msRest.CompositeMapper = { - serializedName: "MetadataDTO", - type: { - name: "Composite", - className: "MetadataDTO", - modelProperties: { - name: { - required: true, - serializedName: "name", - constraints: { - MaxLength: 100, - MinLength: 1 - }, - type: { - name: "String" - } - }, - value: { - required: true, - serializedName: "value", - constraints: { - MaxLength: 500, - MinLength: 1 - }, - type: { - name: "String" - } - } - } - } -}; - -export const ContextDTO: msRest.CompositeMapper = { - serializedName: "ContextDTO", - type: { - name: "Composite", - className: "ContextDTO", - modelProperties: { - isContextOnly: { - serializedName: "isContextOnly", - type: { - name: "Boolean" - } - }, - prompts: { - serializedName: "prompts", - constraints: { - MaxItems: 20 - }, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PromptDTO" - } - } - } - } - } - } -}; - -export const QnADTOContext: msRest.CompositeMapper = { - serializedName: "QnADTO_context", - type: { - name: "Composite", - className: "QnADTOContext", - modelProperties: { - ...ContextDTO.type.modelProperties - } - } -}; - -export const QnADTO: msRest.CompositeMapper = { - serializedName: "QnADTO", - type: { - name: "Composite", - className: "QnADTO", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "Number" - } - }, - answer: { - required: true, - serializedName: "answer", - constraints: { - MaxLength: 25000, - MinLength: 1 - }, - type: { - name: "String" - } - }, - source: { - serializedName: "source", - constraints: { - MaxLength: 300 - }, - type: { - name: "String" - } - }, - questions: { - required: true, - serializedName: "questions", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - metadata: { - serializedName: "metadata", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetadataDTO" - } - } - } - }, - context: { - serializedName: "context", - type: { - name: "Composite", - className: "QnADTOContext" - } - } - } - } -}; - -export const PromptDTOQna: msRest.CompositeMapper = { - serializedName: "PromptDTO_qna", - type: { - name: "Composite", - className: "PromptDTOQna", - modelProperties: { - ...QnADTO.type.modelProperties - } - } -}; - -export const PromptDTO: msRest.CompositeMapper = { - serializedName: "PromptDTO", - type: { - name: "Composite", - className: "PromptDTO", - modelProperties: { - displayOrder: { - serializedName: "displayOrder", - type: { - name: "Number" - } - }, - qnaId: { - serializedName: "qnaId", - type: { - name: "Number" - } - }, - qna: { - serializedName: "qna", - type: { - name: "Composite", - className: "PromptDTOQna" - } - }, - displayText: { - serializedName: "displayText", - constraints: { - MaxLength: 200 - }, - type: { - name: "String" - } - } - } - } -}; - -export const ErrorModel: msRest.CompositeMapper = { - serializedName: "Error", - type: { - name: "Composite", - className: "ErrorModel", - modelProperties: { - code: { - required: true, - serializedName: "code", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - type: { - name: "String" - } - }, - target: { - serializedName: "target", - type: { - name: "String" - } - }, - details: { - serializedName: "details", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorModel" - } - } - } - }, - innerError: { - serializedName: "innerError", - type: { - name: "Composite", - className: "InnerErrorModel" - } - } - } - } -}; - -export const ErrorResponseError: msRest.CompositeMapper = { - serializedName: "ErrorResponse_error", - type: { - name: "Composite", - className: "ErrorResponseError", - modelProperties: { - ...ErrorModel.type.modelProperties - } - } -}; - -export const ErrorResponse: msRest.CompositeMapper = { - serializedName: "ErrorResponse", - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorResponseError" - } - } - } - } -}; - -export const InnerErrorModel: msRest.CompositeMapper = { - serializedName: "InnerErrorModel", - type: { - name: "Composite", - className: "InnerErrorModel", - modelProperties: { - code: { - serializedName: "code", - type: { - name: "String" - } - }, - innerError: { - serializedName: "innerError", - type: { - name: "Composite", - className: "InnerErrorModel" - } - } - } - } -}; - -export const QueryContextDTO: msRest.CompositeMapper = { - serializedName: "QueryContextDTO", - type: { - name: "Composite", - className: "QueryContextDTO", - modelProperties: { - previousQnaId: { - serializedName: "previousQnaId", - type: { - name: "String" - } - }, - previousUserQuery: { - serializedName: "previousUserQuery", - type: { - name: "String" - } - } - } - } -}; - -export const QueryDTOContext: msRest.CompositeMapper = { - serializedName: "QueryDTO_context", - type: { - name: "Composite", - className: "QueryDTOContext", - modelProperties: { - ...QueryContextDTO.type.modelProperties - } - } -}; - -export const QueryDTO: msRest.CompositeMapper = { - serializedName: "QueryDTO", - type: { - name: "Composite", - className: "QueryDTO", - modelProperties: { - qnaId: { - serializedName: "qnaId", - type: { - name: "String" - } - }, - question: { - serializedName: "question", - type: { - name: "String" - } - }, - top: { - serializedName: "top", - type: { - name: "Number" - } - }, - userId: { - serializedName: "userId", - type: { - name: "String" - } - }, - isTest: { - serializedName: "isTest", - type: { - name: "Boolean" - } - }, - scoreThreshold: { - serializedName: "scoreThreshold", - type: { - name: "Number" - } - }, - context: { - serializedName: "context", - type: { - name: "Composite", - className: "QueryDTOContext" - } - }, - rankerType: { - serializedName: "rankerType", - type: { - name: "String" - } - }, - strictFilters: { - serializedName: "strictFilters", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetadataDTO" - } - } - } - } - } - } -}; - -export const QnASearchResultContext: msRest.CompositeMapper = { - serializedName: "QnASearchResult_context", - type: { - name: "Composite", - className: "QnASearchResultContext", - modelProperties: { - ...ContextDTO.type.modelProperties - } - } -}; - -export const QnASearchResult: msRest.CompositeMapper = { - serializedName: "QnASearchResult", - type: { - name: "Composite", - className: "QnASearchResult", - modelProperties: { - questions: { - serializedName: "questions", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - answer: { - serializedName: "answer", - type: { - name: "String" - } - }, - score: { - serializedName: "score", - type: { - name: "Number" - } - }, - id: { - serializedName: "id", - type: { - name: "Number" - } - }, - source: { - serializedName: "source", - type: { - name: "String" - } - }, - metadata: { - serializedName: "metadata", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetadataDTO" - } - } - } - }, - context: { - serializedName: "context", - type: { - name: "Composite", - className: "QnASearchResultContext" - } - } - } - } -}; - -export const QnASearchResultList: msRest.CompositeMapper = { - serializedName: "QnASearchResultList", - type: { - name: "Composite", - className: "QnASearchResultList", - modelProperties: { - answers: { - serializedName: "answers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QnASearchResult" - } - } - } - } - } - } -}; - -export const FeedbackRecordDTO: msRest.CompositeMapper = { - serializedName: "FeedbackRecordDTO", - type: { - name: "Composite", - className: "FeedbackRecordDTO", - modelProperties: { - userId: { - serializedName: "userId", - type: { - name: "String" - } - }, - userQuestion: { - serializedName: "userQuestion", - constraints: { - MaxLength: 1000 - }, - type: { - name: "String" - } - }, - qnaId: { - serializedName: "qnaId", - type: { - name: "Number" - } - } - } - } -}; - -export const FeedbackRecordsDTO: msRest.CompositeMapper = { - serializedName: "FeedbackRecordsDTO", - type: { - name: "Composite", - className: "FeedbackRecordsDTO", - modelProperties: { - feedbackRecords: { - serializedName: "feedbackRecords", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FeedbackRecordDTO" - } - } - } - } - } - } -}; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/models/parameters.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/models/parameters.ts deleted file mode 100644 index 0f494ad8e07c..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/models/parameters.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; - -export const kbId: msRest.OperationURLParameter = { - parameterPath: "kbId", - mapper: { - required: true, - serializedName: "kbId", - type: { - name: "String" - } - } -}; -export const runtimeEndpoint: msRest.OperationURLParameter = { - parameterPath: "runtimeEndpoint", - mapper: { - required: true, - serializedName: "RuntimeEndpoint", - defaultValue: '', - type: { - name: "String" - } - }, - skipEncoding: true -}; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/models/runtimeMappers.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/models/runtimeMappers.ts deleted file mode 100644 index 77bd13158d3b..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/models/runtimeMappers.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ - -export { - ContextDTO, - ErrorModel, - ErrorResponse, - ErrorResponseError, - FeedbackRecordDTO, - FeedbackRecordsDTO, - InnerErrorModel, - MetadataDTO, - PromptDTO, - PromptDTOQna, - QnADTO, - QnADTOContext, - QnASearchResult, - QnASearchResultContext, - QnASearchResultList, - QueryContextDTO, - QueryDTO, - QueryDTOContext -} from "../models/mappers"; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/operations/index.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/operations/index.ts deleted file mode 100644 index 943e2f1af5f1..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/operations/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* - * 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. - */ - -export * from "./runtime"; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/operations/runtime.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/operations/runtime.ts deleted file mode 100644 index 7d6fcbff9c49..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/operations/runtime.ts +++ /dev/null @@ -1,142 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/runtimeMappers"; -import * as Parameters from "../models/parameters"; -import { QnAMakerRuntimeClientContext } from "../qnAMakerRuntimeClientContext"; - -/** Class representing a Runtime. */ -export class Runtime { - private readonly client: QnAMakerRuntimeClientContext; - - /** - * Create a Runtime. - * @param {QnAMakerRuntimeClientContext} client Reference to the service client. - */ - constructor(client: QnAMakerRuntimeClientContext) { - this.client = client; - } - - /** - * @summary GenerateAnswer call to query the knowledgebase. - * @param kbId Knowledgebase id. - * @param generateAnswerPayload Post body of the request. - * @param [options] The optional parameters - * @returns Promise - */ - generateAnswer(kbId: string, generateAnswerPayload: Models.QueryDTO, options?: msRest.RequestOptionsBase): Promise; - /** - * @param kbId Knowledgebase id. - * @param generateAnswerPayload Post body of the request. - * @param callback The callback - */ - generateAnswer(kbId: string, generateAnswerPayload: Models.QueryDTO, callback: msRest.ServiceCallback): void; - /** - * @param kbId Knowledgebase id. - * @param generateAnswerPayload Post body of the request. - * @param options The optional parameters - * @param callback The callback - */ - generateAnswer(kbId: string, generateAnswerPayload: Models.QueryDTO, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - generateAnswer(kbId: string, generateAnswerPayload: Models.QueryDTO, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - kbId, - generateAnswerPayload, - options - }, - generateAnswerOperationSpec, - callback) as Promise; - } - - /** - * @summary Train call to add suggestions to the knowledgebase. - * @param kbId Knowledgebase id. - * @param trainPayload Post body of the request. - * @param [options] The optional parameters - * @returns Promise - */ - train(kbId: string, trainPayload: Models.FeedbackRecordsDTO, options?: msRest.RequestOptionsBase): Promise; - /** - * @param kbId Knowledgebase id. - * @param trainPayload Post body of the request. - * @param callback The callback - */ - train(kbId: string, trainPayload: Models.FeedbackRecordsDTO, callback: msRest.ServiceCallback): void; - /** - * @param kbId Knowledgebase id. - * @param trainPayload Post body of the request. - * @param options The optional parameters - * @param callback The callback - */ - train(kbId: string, trainPayload: Models.FeedbackRecordsDTO, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - train(kbId: string, trainPayload: Models.FeedbackRecordsDTO, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - kbId, - trainPayload, - options - }, - trainOperationSpec, - callback); - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const generateAnswerOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "knowledgebases/{kbId}/generateAnswer", - urlParameters: [ - Parameters.runtimeEndpoint, - Parameters.kbId - ], - requestBody: { - parameterPath: "generateAnswerPayload", - mapper: { - ...Mappers.QueryDTO, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.QnASearchResultList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const trainOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "knowledgebases/{kbId}/train", - urlParameters: [ - Parameters.runtimeEndpoint, - Parameters.kbId - ], - requestBody: { - parameterPath: "trainPayload", - mapper: { - ...Mappers.FeedbackRecordsDTO, - required: true - } - }, - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/qnAMakerRuntimeClient.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/qnAMakerRuntimeClient.ts deleted file mode 100644 index 693d97cd848e..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/qnAMakerRuntimeClient.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "./models"; -import * as Mappers from "./models/mappers"; -import * as operations from "./operations"; -import { QnAMakerRuntimeClientContext } from "./qnAMakerRuntimeClientContext"; - -class QnAMakerRuntimeClient extends QnAMakerRuntimeClientContext { - // Operation groups - runtime: operations.Runtime; - - /** - * Initializes a new instance of the QnAMakerRuntimeClient class. - * @param runtimeEndpoint QnA Maker App Service endpoint (for example: - * https://{qnaservice-hostname}.azurewebsites.net). - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param [options] The parameter options - */ - constructor(credentials: msRest.ServiceClientCredentials, runtimeEndpoint: string, options?: msRest.ServiceClientOptions) { - super(credentials, runtimeEndpoint, options); - this.runtime = new operations.Runtime(this); - } -} - -// Operation Specifications - -export { - QnAMakerRuntimeClient, - QnAMakerRuntimeClientContext, - Models as QnAMakerRuntimeModels, - Mappers as QnAMakerRuntimeMappers -}; -export * from "./operations"; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/qnAMakerRuntimeClientContext.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/qnAMakerRuntimeClientContext.ts deleted file mode 100644 index 9c1acc6db439..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/src/qnAMakerRuntimeClientContext.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; - -const packageName = "@azure/cognitiveservices-qnamaker-runtime"; -const packageVersion = "1.0.1"; - -export class QnAMakerRuntimeClientContext extends msRest.ServiceClient { - runtimeEndpoint: string; - credentials: msRest.ServiceClientCredentials; - - /** - * Initializes a new instance of the QnAMakerRuntimeClientContext class. - * @param runtimeEndpoint QnA Maker App Service endpoint (for example: - * https://{qnaservice-hostname}.azurewebsites.net). - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param [options] The parameter options - */ - constructor(credentials: msRest.ServiceClientCredentials, runtimeEndpoint: string, options?: msRest.ServiceClientOptions) { - if (runtimeEndpoint == undefined) { - throw new Error("'runtimeEndpoint' cannot be null."); - } - if (credentials == undefined) { - throw new Error("'credentials' cannot be null."); - } - - if (!options) { - options = {}; - } - - if (!options.userAgent) { - const defaultUserAgent = msRest.getDefaultUserAgentValue(); - options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; - } - - super(credentials, options); - - this.baseUri = "{RuntimeEndpoint}/qnamaker"; - this.requestContentType = "application/json; charset=utf-8"; - this.runtimeEndpoint = runtimeEndpoint; - this.credentials = credentials; - } -} diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/swagger/readme.md b/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/swagger/readme.md deleted file mode 100644 index f41a1f21910e..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/swagger/readme.md +++ /dev/null @@ -1,27 +0,0 @@ -# Cognitive Services QnAMaker Runtime SDK - -> see https://aka.ms/autorest - -Configuration for generating QnAMaker Runtime SDK. - -```yaml -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json -add-credentials: true -openapi-type: data-plane -license-header: MICROSOFT_MIT_NO_VERSION -title: QnAMakerRuntimeClient -``` - -## TypeScript - -These settings apply only when `--typescript` is specified on the command line. - -```yaml $(typescript) -typescript: - package-version: 1.0.0 - package-name: "@azure/cognitiveservices-qnamaker-runtime" - output-folder: ".." - azure-arm: false - generate-metadata: true - auto-publish: true -``` diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/tsconfig.json b/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/tsconfig.json deleted file mode 100644 index 422b584abd5e..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker-runtime/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "module": "es6", - "moduleResolution": "node", - "strict": true, - "target": "es5", - "sourceMap": true, - "declarationMap": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], - "declaration": true, - "outDir": "./esm", - "importHelpers": true - }, - "include": ["./src/**/*.ts"], - "exclude": ["node_modules"] -} diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/LICENSE.txt b/sdk/cognitiveservices/cognitiveservices-qnamaker/LICENSE.txt deleted file mode 100644 index ea8fb1516028..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/README.md b/sdk/cognitiveservices/cognitiveservices-qnamaker/README.md deleted file mode 100644 index 3a19591fba28..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/README.md +++ /dev/null @@ -1,99 +0,0 @@ -## An isomorphic javascript sdk for - QnAMakerClient - -This package contains an isomorphic SDK for editing and creating Knowledge Bases, its endpoints and keys. -For interacting with QnAMaker such as training and asking questions please see @azure/cognitiveservices-qnamaker-runtime. - -### Currently supported environments - -- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) -- Latest versions of Safari, Chrome, Edge, and Firefox. - -### How to Install - -```bash -npm install @azure/cognitiveservices-qnamaker -``` - -### How to use - -#### nodejs - Authentication, client creation and getSettings endpointSettings as an example written in TypeScript. - -##### Install @azure/ms-rest-azure-js - -```bash -npm install @azure/ms-rest-azure-js -``` - -##### Sample code - -```javascript -const { CognitiveServicesCredentials } = require("@azure/ms-rest-azure-js"); -const { QnAMakerClient } = require("@azure/cognitiveservices-qnamaker"); - -async function main() { - const QNAMAKER_KEY = process.env["QNAMAKER_KEY"] || ""; - const QNAMAKER_ENDPOINT = process.env["QNAMAKER_ENDPOINT"] || ""; - - const cognitiveServicesCredentials = new CognitiveServicesCredentials(QNAMAKER_KEY); - const client = new QnAMakerClient(cognitiveServicesCredentials, QNAMAKER_ENDPOINT); - - const settings = await client.endpointSettings.getSettings(); - - console.log(`The result is: ${JSON.stringify(settings)}`); -} - -main(); -``` - -#### browser - Authentication, client creation and getSettings endpointSettings as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` - -##### Sample code - -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - -- index.html - -```html - - - - @azure/cognitiveservices-qnamaker sample - - - - - - -``` - -## Related projects - -- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/README.png) diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/package.json b/sdk/cognitiveservices/cognitiveservices-qnamaker/package.json deleted file mode 100644 index ed8b2d9aef5b..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "@azure/cognitiveservices-qnamaker", - "author": "Microsoft Corporation", - "description": "QnAMakerClient Library with typescript type definitions for node.js and browser.", - "version": "3.2.0", - "dependencies": { - "@azure/ms-rest-js": "^2.0.4", - "tslib": "^1.10.0" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "license": "MIT", - "main": "./dist/cognitiveservices-qnamaker.js", - "module": "./esm/qnAMakerClient.js", - "types": "./esm/qnAMakerClient.d.ts", - "devDependencies": { - "typescript": "^3.5.3", - "rollup": "^1.18.0", - "rollup-plugin-node-resolve": "^5.2.0", - "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.6.0" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cognitiveservices/cognitiveservices-qnamaker", - "repository": { - "type": "git", - "url": "https://github.com/Azure/azure-sdk-for-js.git" - }, - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "files": [ - "dist/**/*.js", - "dist/**/*.js.map", - "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "esm/**/*.js", - "esm/**/*.js.map", - "esm/**/*.d.ts", - "esm/**/*.d.ts.map", - "src/**/*.ts", - "README.md", - "rollup.config.js", - "tsconfig.json" - ], - "scripts": { - "build": "tsc && rollup -c rollup.config.js && npm run minify", - "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/cognitiveservices-qnamaker.js.map'\" -o ./dist/cognitiveservices-qnamaker.min.js ./dist/cognitiveservices-qnamaker.js", - "prepack": "npm install && npm run build" - }, - "sideEffects": false, - "autoPublish": true -} diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/rollup.config.js b/sdk/cognitiveservices/cognitiveservices-qnamaker/rollup.config.js deleted file mode 100644 index 72c998843834..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/rollup.config.js +++ /dev/null @@ -1,37 +0,0 @@ -import rollup from "rollup"; -import nodeResolve from "rollup-plugin-node-resolve"; -import sourcemaps from "rollup-plugin-sourcemaps"; - -/** - * @type {rollup.RollupFileOptions} - */ -const config = { - input: "./esm/qnAMakerClient.js", - external: [ - "@azure/ms-rest-js", - "@azure/ms-rest-azure-js" - ], - output: { - file: "./dist/cognitiveservices-qnamaker.js", - format: "umd", - name: "Azure.CognitiveservicesQnamaker", - sourcemap: true, - globals: { - "@azure/ms-rest-js": "msRest", - "@azure/ms-rest-azure-js": "msRestAzure" - }, - banner: `/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */` - }, - plugins: [ - nodeResolve({ mainFields: ['module', 'main'] }), - sourcemaps() - ] -}; - -export default config; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/alterationsMappers.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/alterationsMappers.ts deleted file mode 100644 index 5222a6daad5a..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/alterationsMappers.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - AlterationsDTO, - ErrorModel, - ErrorResponse, - ErrorResponseError, - InnerErrorModel, - WordAlterationsDTO -} from "../models/mappers"; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/endpointKeysMappers.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/endpointKeysMappers.ts deleted file mode 100644 index 40cfa78ae4bc..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/endpointKeysMappers.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - EndpointKeysDTO, - ErrorModel, - ErrorResponse, - ErrorResponseError, - InnerErrorModel -} from "../models/mappers"; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/endpointSettingsMappers.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/endpointSettingsMappers.ts deleted file mode 100644 index 094d973ef5ef..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/endpointSettingsMappers.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - ActiveLearningSettingsDTO, - EndpointSettingsDTO, - EndpointSettingsDTOActiveLearning, - ErrorModel, - ErrorResponse, - ErrorResponseError, - InnerErrorModel -} from "../models/mappers"; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/index.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/index.ts deleted file mode 100644 index 4812cbc54ea3..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/index.ts +++ /dev/null @@ -1,1133 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - - -import * as msRest from "@azure/ms-rest-js"; - -/** - * Input to create KB. - */ -export interface CreateKbInputDTO { - /** - * List of QNA to be added to the index. Ids are generated by the service and should be omitted. - */ - qnaList?: QnADTO[]; - /** - * List of URLs to be added to knowledgebase. - */ - urls?: string[]; - /** - * List of files to be added to knowledgebase. - */ - files?: FileDTO[]; -} - -/** - * An instance of CreateKbInputDTO for add operation - */ -export interface UpdateKbOperationDTOAdd extends CreateKbInputDTO { -} - -/** - * PATCH body schema of Delete Operation in UpdateKb - */ -export interface DeleteKbContentsDTO { - /** - * List of Qna Ids to be deleted - */ - ids?: number[]; - /** - * List of sources to be deleted from knowledgebase. - */ - sources?: string[]; -} - -/** - * An instance of DeleteKbContentsDTO for delete Operation - */ -export interface UpdateKbOperationDTODelete extends DeleteKbContentsDTO { -} - -/** - * PATCH body schema for Update operation in Update Kb - */ -export interface UpdateKbContentsDTO { - /** - * Friendly name for the knowledgebase. - */ - name?: string; - /** - * List of Q-A (UpdateQnaDTO) to be added to the knowledgebase. - */ - qnaList?: UpdateQnaDTO[]; - /** - * List of existing URLs to be refreshed. The content will be extracted again and re-indexed. - */ - urls?: string[]; - /** - * Default answer sent to user if no good match is found in the KB. - */ - defaultAnswer?: string; -} - -/** - * An instance of UpdateKbContentsDTO for Update Operation - */ -export interface UpdateKbOperationDTOUpdate extends UpdateKbContentsDTO { -} - -/** - * Contains list of QnAs to be updated - */ -export interface UpdateKbOperationDTO { - /** - * An instance of CreateKbInputDTO for add operation - */ - add?: UpdateKbOperationDTOAdd; - /** - * An instance of DeleteKbContentsDTO for delete Operation - */ - deleteProperty?: UpdateKbOperationDTODelete; - /** - * An instance of UpdateKbContentsDTO for Update Operation - */ - update?: UpdateKbOperationDTOUpdate; - /** - * Enable hierarchical extraction of Q-A from files and urls. The value set during KB creation - * will be used if this field is not present. - */ - enableHierarchicalExtraction?: boolean; - /** - * Text string to be used as the answer in any Q-A which has no extracted answer from the - * document but has a hierarchy. Required when EnableHierarchicalExtraction field is set to True. - */ - defaultAnswerUsedForExtraction?: string; -} - -/** - * PATCH Body schema for Update Kb which contains list of questions to be added and deleted - */ -export interface UpdateQuestionsDTO { - /** - * List of questions to be added - */ - add?: string[]; - /** - * List of questions to be deleted. - */ - deleteProperty?: string[]; -} - -/** - * List of questions associated with the answer. - */ -export interface UpdateQnaDTOQuestions extends UpdateQuestionsDTO { -} - -/** - * PATCH Body schema to represent list of Metadata to be updated - */ -export interface UpdateMetadataDTO { - /** - * List of Metadata associated with answer to be deleted - */ - deleteProperty?: MetadataDTO[]; - /** - * List of metadata associated with answer to be added - */ - add?: MetadataDTO[]; -} - -/** - * List of metadata associated with the answer to be updated - */ -export interface UpdateQnaDTOMetadata extends UpdateMetadataDTO { -} - -/** - * Update Body schema to represent context to be updated - */ -export interface UpdateContextDTO { - /** - * List of prompts associated with qna to be deleted - */ - promptsToDelete?: number[]; - /** - * List of prompts to be added to the qna. - */ - promptsToAdd?: PromptDTO[]; - /** - * To mark if a prompt is relevant only with a previous question or not. - * true - Do not include this QnA as search result for queries without context - * false - ignores context and includes this QnA in search result - */ - isContextOnly?: boolean; -} - -/** - * Context associated with Qna to be updated. - */ -export interface UpdateQnaDTOContext extends UpdateContextDTO { -} - -/** - * PATCH Body schema for Update Qna List - */ -export interface UpdateQnaDTO { - /** - * Unique id for the Q-A - */ - id?: number; - /** - * Answer text - */ - answer?: string; - /** - * Source from which Q-A was indexed. eg. - * https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs - */ - source?: string; - /** - * List of questions associated with the answer. - */ - questions?: UpdateQnaDTOQuestions; - /** - * List of metadata associated with the answer to be updated - */ - metadata?: UpdateQnaDTOMetadata; - /** - * Context associated with Qna to be updated. - */ - context?: UpdateQnaDTOContext; -} - -/** - * Name - value pair of metadata. - */ -export interface MetadataDTO { - /** - * Metadata name. - */ - name: string; - /** - * Metadata value. - */ - value: string; -} - -/** - * Q-A object. - */ -export interface QnADTO { - /** - * Unique id for the Q-A. - */ - id?: number; - /** - * Answer text - */ - answer: string; - /** - * Source from which Q-A was indexed. eg. - * https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs - */ - source?: string; - /** - * List of questions associated with the answer. - */ - questions: string[]; - /** - * List of metadata associated with the answer. - */ - metadata?: MetadataDTO[]; - /** - * Context of a QnA - */ - context?: QnADTOContext; - /** - * Timestamp when the QnA was last updated. - */ - lastUpdatedTimestamp?: string; -} - -/** - * QnADTO - Either QnaId or QnADTO needs to be present in a PromptDTO object - */ -export interface PromptDTOQna extends QnADTO { -} - -/** - * Prompt for an answer. - */ -export interface PromptDTO { - /** - * Index of the prompt - used in ordering of the prompts - */ - displayOrder?: number; - /** - * Qna id corresponding to the prompt - if QnaId is present, QnADTO object is ignored. - */ - qnaId?: number; - /** - * QnADTO - Either QnaId or QnADTO needs to be present in a PromptDTO object - */ - qna?: PromptDTOQna; - /** - * Text displayed to represent a follow up question prompt - */ - displayText?: string; -} - -/** - * Context associated with Qna. - */ -export interface ContextDTO { - /** - * To mark if a prompt is relevant only with a previous question or not. - * true - Do not include this QnA as search result for queries without context - * false - ignores context and includes this QnA in search result - */ - isContextOnly?: boolean; - /** - * List of prompts associated with the answer. - */ - prompts?: PromptDTO[]; -} - -/** - * Context of a QnA - */ -export interface QnADTOContext extends ContextDTO { -} - -/** - * DTO to hold details of uploaded files. - */ -export interface FileDTO { - /** - * File name. Supported file types are ".tsv", ".pdf", ".txt", ".docx", ".xlsx". - */ - fileName: string; - /** - * Public URI of the file. - */ - fileUri: string; -} - -/** - * List of QnADTO - */ -export interface QnADocumentsDTO { - /** - * List of answers. - */ - qnaDocuments?: QnADTO[]; -} - -/** - * Post body schema for CreateKb operation. - */ -export interface CreateKbDTO { - /** - * Friendly name for the knowledgebase. - */ - name: string; - /** - * List of Q-A (QnADTO) to be added to the knowledgebase. Q-A Ids are assigned by the service and - * should be omitted. - */ - qnaList?: QnADTO[]; - /** - * List of URLs to be used for extracting Q-A. - */ - urls?: string[]; - /** - * List of files from which to Extract Q-A. - */ - files?: FileDTO[]; - /** - * Enable hierarchical extraction of Q-A from files and urls. Value to be considered False if - * this field is not present. - */ - enableHierarchicalExtraction?: boolean; - /** - * Text string to be used as the answer in any Q-A which has no extracted answer from the - * document but has a hierarchy. Required when EnableHierarchicalExtraction field is set to True. - */ - defaultAnswerUsedForExtraction?: string; - /** - * Language of the knowledgebase. Please find the list of supported languages here. - */ - language?: string; - /** - * Set to true to enable creating KBs in different languages for the same resource. - */ - enableMultipleLanguages?: boolean; - /** - * Default answer sent to user if no good match is found in the KB. - */ - defaultAnswer?: string; -} - -/** - * Post body schema for Replace KB operation. - */ -export interface ReplaceKbDTO { - /** - * List of Q-A (QnADTO) to be added to the knowledgebase. Q-A Ids are assigned by the service and - * should be omitted. - */ - qnAList: QnADTO[]; -} - -/** - * The error object. As per Microsoft One API guidelines - - * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. - */ -export interface ErrorModel { - /** - * One of a server-defined set of error codes. Possible values include: 'BadArgument', - * 'Forbidden', 'NotFound', 'KbNotFound', 'Unauthorized', 'Unspecified', 'EndpointKeysError', - * 'QuotaExceeded', 'QnaRuntimeError', 'SKULimitExceeded', 'OperationNotFound', 'ServiceError', - * 'ValidationFailure', 'ExtractionFailure' - */ - code: ErrorCodeType; - /** - * A human-readable representation of the error. - */ - message?: string; - /** - * The target of the error. - */ - target?: string; - /** - * An array of details about specific errors that led to this reported error. - */ - details?: ErrorModel[]; - /** - * An object containing more specific information than the current object about the error. - */ - innerError?: InnerErrorModel; -} - -/** - * The error object. - */ -export interface ErrorResponseError extends ErrorModel { -} - -/** - * Error response. As per Microsoft One API guidelines - - * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. - */ -export interface ErrorResponse { - /** - * The error object. - */ - error?: ErrorResponseError; -} - -/** - * An object containing more specific information about the error. As per Microsoft One API - * guidelines - - * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. - */ -export interface InnerErrorModel { - /** - * A more specific error code than was provided by the containing error. - */ - code?: string; - /** - * An object containing more specific information than the current object about the error. - */ - innerError?: InnerErrorModel; -} - -/** - * Record to track long running operation. - */ -export interface Operation { - /** - * Operation state. Possible values include: 'Failed', 'NotStarted', 'Running', 'Succeeded' - */ - operationState?: OperationStateType; - /** - * Timestamp when the operation was created. - */ - createdTimestamp?: string; - /** - * Timestamp when the current state was entered. - */ - lastActionTimestamp?: string; - /** - * Relative URI to the target resource location for completed resources. - */ - resourceLocation?: string; - /** - * User Id - */ - userId?: string; - /** - * Operation Id. - */ - operationId?: string; - /** - * Error details in case of failures. - */ - errorResponse?: ErrorResponse; -} - -/** - * Response schema for CreateKb operation. - */ -export interface KnowledgebaseDTO { - /** - * Unique id that identifies a knowledgebase. - */ - id?: string; - /** - * URL host name at which the knowledgebase is hosted. - */ - hostName?: string; - /** - * Time stamp at which the knowledgebase was last accessed (UTC). - */ - lastAccessedTimestamp?: string; - /** - * Time stamp at which the knowledgebase was last modified (UTC). - */ - lastChangedTimestamp?: string; - /** - * Time stamp at which the knowledgebase was last published (UTC). - */ - lastPublishedTimestamp?: string; - /** - * Friendly name of the knowledgebase. - */ - name?: string; - /** - * User who created / owns the knowledgebase. - */ - userId?: string; - /** - * URL sources from which Q-A were extracted and added to the knowledgebase. - */ - urls?: string[]; - /** - * Custom sources from which Q-A were extracted or explicitly added to the knowledgebase. - */ - sources?: string[]; -} - -/** - * Collection of knowledgebases owned by a user. - */ -export interface KnowledgebasesDTO { - /** - * Collection of knowledgebase records. - */ - knowledgebases?: KnowledgebaseDTO[]; -} - -/** - * Active Learning settings of the endpoint. - */ -export interface ActiveLearningSettingsDTO { - /** - * True/False string providing Active Learning - */ - enable?: string; -} - -/** - * Active Learning settings of the endpoint. - */ -export interface EndpointSettingsDTOActiveLearning extends ActiveLearningSettingsDTO { -} - -/** - * Endpoint settings. - */ -export interface EndpointSettingsDTO { - /** - * Active Learning settings of the endpoint. - */ - activeLearning?: EndpointSettingsDTOActiveLearning; -} - -/** - * Collection of words that are synonyms. - */ -export interface AlterationsDTO { - /** - * Words that are synonymous with each other. - */ - alterations: string[]; -} - -/** - * Collection of word alterations. - */ -export interface WordAlterationsDTO { - /** - * Collection of word alterations. - */ - wordAlterations: AlterationsDTO[]; -} - -/** - * Schema for EndpointKeys generate/refresh operations. - */ -export interface EndpointKeysDTO { - /** - * Primary Access Key. - */ - primaryEndpointKey?: string; - /** - * Secondary Access Key. - */ - secondaryEndpointKey?: string; - /** - * Current version of runtime. - */ - installedVersion?: string; - /** - * Latest version of runtime. - */ - lastStableVersion?: string; - /** - * Language setting of runtime. - */ - language?: string; -} - -/** - * Context object with previous QnA's information. - */ -export interface QueryContextDTO { - /** - * Previous QnA Id - qnaId of the top result. - */ - previousQnaId?: number; - /** - * Previous user query. - */ - previousUserQuery?: string; -} - -/** - * Context object with previous QnA's information. - */ -export interface QueryDTOContext extends QueryContextDTO { -} - -/** - * To configure Answer span prediction feature. - */ -export interface AnswerSpanRequestDTO { - /** - * Enable or Disable Answer Span prediction. - */ - enable?: boolean; - /** - * Minimum threshold score required to include an answer span. - */ - scoreThreshold?: number; - /** - * Number of Top answers to be considered for span prediction. - */ - topAnswersWithSpan?: number; -} - -/** - * To configure Answer span prediction feature. - */ -export interface QueryDTOAnswerSpanRequest extends AnswerSpanRequestDTO { -} - -/** - * POST body schema to query the knowledgebase. - */ -export interface QueryDTO { - /** - * Exact qnaId to fetch from the knowledgebase, this field takes priority over question. - */ - qnaId?: string; - /** - * User question to query against the knowledge base. - */ - question?: string; - /** - * Max number of answers to be returned for the question. - */ - top?: number; - /** - * Unique identifier for the user. - */ - userId?: string; - /** - * Query against the test index. - */ - isTest?: boolean; - /** - * Minimum threshold score for answers. - */ - scoreThreshold?: number; - /** - * Context object with previous QnA's information. - */ - context?: QueryDTOContext; - /** - * Optional field. Set to 'QuestionOnly' for using a question only Ranker. - */ - rankerType?: string; - /** - * Find QnAs that are associated with the given list of metadata. - */ - strictFilters?: MetadataDTO[]; - /** - * Optional field. Set to 'OR' for using OR operation for strict filters. Possible values - * include: 'AND', 'OR' - */ - strictFiltersCompoundOperationType?: StrictFiltersCompoundOperationType; - /** - * To configure Answer span prediction feature. - */ - answerSpanRequest?: QueryDTOAnswerSpanRequest; -} - -/** - * Context object of the QnA - */ -export interface QnASearchResultContext extends ContextDTO { -} - -/** - * Answer span object of QnA. - */ -export interface AnswerSpanResponseDTO { - /** - * Predicted text of answer span. - */ - text?: string; - /** - * Predicted score of answer span. - */ - score?: number; - /** - * Start index of answer span in answer. - */ - startIndex?: number; - /** - * End index of answer span in answer. - */ - endIndex?: number; -} - -/** - * Answer span object of QnA with respect to user's question. - */ -export interface QnASearchResultAnswerSpan extends AnswerSpanResponseDTO { -} - -/** - * Represents Search Result. - */ -export interface QnASearchResult { - /** - * List of questions. - */ - questions?: string[]; - /** - * Answer. - */ - answer?: string; - /** - * Search result score. - */ - score?: number; - /** - * Id of the QnA result. - */ - id?: number; - /** - * Source of QnA result. - */ - source?: string; - /** - * List of metadata. - */ - metadata?: MetadataDTO[]; - /** - * Context object of the QnA - */ - context?: QnASearchResultContext; - /** - * Answer span object of QnA with respect to user's question. - */ - answerSpan?: QnASearchResultAnswerSpan; -} - -/** - * Represents List of Question Answers. - */ -export interface QnASearchResultList { - /** - * Represents Search Result list. - */ - answers?: QnASearchResult[]; -} - -/** - * Active learning feedback record. - */ -export interface FeedbackRecordDTO { - /** - * Unique identifier for the user. - */ - userId?: string; - /** - * The suggested question being provided as feedback. - */ - userQuestion?: string; - /** - * The qnaId for which the suggested question is provided as feedback. - */ - qnaId?: number; -} - -/** - * Active learning feedback records. - */ -export interface FeedbackRecordsDTO { - /** - * List of feedback records. - */ - feedbackRecords?: FeedbackRecordDTO[]; -} - -/** - * Optional Parameters. - */ -export interface KnowledgebaseDownloadOptionalParams extends msRest.RequestOptionsBase { - /** - * The source property filter to apply. - */ - source?: string; - /** - * The last changed status property filter to apply. - */ - changedSince?: string; -} - -/** - * Defines headers for GetDetails operation. - */ -export interface OperationsGetDetailsHeaders { - /** - * Indicates how long the client should wait before sending a follow up request. The header will - * be present only if the operation is running or has not started yet. - */ - retryAfter: number; -} - -/** - * Defines headers for Update operation. - */ -export interface KnowledgebaseUpdateHeaders { - /** - * Relative URI to the target location of the asynchronous operation. Client should poll this - * resource to get status of the operation. - */ - location: string; -} - -/** - * Defines values for ErrorCodeType. - * Possible values include: 'BadArgument', 'Forbidden', 'NotFound', 'KbNotFound', 'Unauthorized', - * 'Unspecified', 'EndpointKeysError', 'QuotaExceeded', 'QnaRuntimeError', 'SKULimitExceeded', - * 'OperationNotFound', 'ServiceError', 'ValidationFailure', 'ExtractionFailure' - * @readonly - * @enum {string} - */ -export type ErrorCodeType = 'BadArgument' | 'Forbidden' | 'NotFound' | 'KbNotFound' | 'Unauthorized' | 'Unspecified' | 'EndpointKeysError' | 'QuotaExceeded' | 'QnaRuntimeError' | 'SKULimitExceeded' | 'OperationNotFound' | 'ServiceError' | 'ValidationFailure' | 'ExtractionFailure'; - -/** - * Defines values for OperationStateType. - * Possible values include: 'Failed', 'NotStarted', 'Running', 'Succeeded' - * @readonly - * @enum {string} - */ -export type OperationStateType = 'Failed' | 'NotStarted' | 'Running' | 'Succeeded'; - -/** - * Defines values for StrictFiltersCompoundOperationType. - * Possible values include: 'AND', 'OR' - * @readonly - * @enum {string} - */ -export type StrictFiltersCompoundOperationType = 'AND' | 'OR'; - -/** - * Defines values for EnvironmentType. - * Possible values include: 'Prod', 'Test' - * @readonly - * @enum {string} - */ -export type EnvironmentType = 'Prod' | 'Test'; - -/** - * Contains response data for the getSettings operation. - */ -export type EndpointSettingsGetSettingsResponse = EndpointSettingsDTO & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EndpointSettingsDTO; - }; -}; - -/** - * Contains response data for the getKeys operation. - */ -export type EndpointKeysGetKeysResponse = EndpointKeysDTO & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EndpointKeysDTO; - }; -}; - -/** - * Contains response data for the refreshKeys operation. - */ -export type EndpointKeysRefreshKeysResponse = EndpointKeysDTO & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EndpointKeysDTO; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type AlterationsGetResponse = WordAlterationsDTO & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: WordAlterationsDTO; - }; -}; - -/** - * Contains response data for the getAlterationsForKb operation. - */ -export type AlterationsGetAlterationsForKbResponse = WordAlterationsDTO & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: WordAlterationsDTO; - }; -}; - -/** - * Contains response data for the listAll operation. - */ -export type KnowledgebaseListAllResponse = KnowledgebasesDTO & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KnowledgebasesDTO; - }; -}; - -/** - * Contains response data for the getDetails operation. - */ -export type KnowledgebaseGetDetailsResponse = KnowledgebaseDTO & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KnowledgebaseDTO; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type KnowledgebaseUpdateResponse = Operation & KnowledgebaseUpdateHeaders & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: KnowledgebaseUpdateHeaders; - - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Operation; - }; -}; - -/** - * Contains response data for the create operation. - */ -export type KnowledgebaseCreateResponse = Operation & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Operation; - }; -}; - -/** - * Contains response data for the download operation. - */ -export type KnowledgebaseDownloadResponse = QnADocumentsDTO & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: QnADocumentsDTO; - }; -}; - -/** - * Contains response data for the generateAnswer operation. - */ -export type KnowledgebaseGenerateAnswerResponse = QnASearchResultList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: QnASearchResultList; - }; -}; - -/** - * Contains response data for the getDetails operation. - */ -export type OperationsGetDetailsResponse = Operation & OperationsGetDetailsHeaders & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: OperationsGetDetailsHeaders; - - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Operation; - }; -}; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/knowledgebaseMappers.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/knowledgebaseMappers.ts deleted file mode 100644 index a034bb7cce6a..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/knowledgebaseMappers.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - AnswerSpanRequestDTO, - AnswerSpanResponseDTO, - ContextDTO, - CreateKbDTO, - CreateKbInputDTO, - DeleteKbContentsDTO, - ErrorModel, - ErrorResponse, - ErrorResponseError, - FeedbackRecordDTO, - FeedbackRecordsDTO, - FileDTO, - InnerErrorModel, - KnowledgebaseDTO, - KnowledgebasesDTO, - KnowledgebaseUpdateHeaders, - MetadataDTO, - Operation, - PromptDTO, - PromptDTOQna, - QnADocumentsDTO, - QnADTO, - QnADTOContext, - QnASearchResult, - QnASearchResultAnswerSpan, - QnASearchResultContext, - QnASearchResultList, - QueryContextDTO, - QueryDTO, - QueryDTOAnswerSpanRequest, - QueryDTOContext, - ReplaceKbDTO, - UpdateContextDTO, - UpdateKbContentsDTO, - UpdateKbOperationDTO, - UpdateKbOperationDTOAdd, - UpdateKbOperationDTODelete, - UpdateKbOperationDTOUpdate, - UpdateMetadataDTO, - UpdateQnaDTO, - UpdateQnaDTOContext, - UpdateQnaDTOMetadata, - UpdateQnaDTOQuestions, - UpdateQuestionsDTO -} from "../models/mappers"; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/mappers.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/mappers.ts deleted file mode 100644 index 9924b290f994..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/mappers.ts +++ /dev/null @@ -1,1551 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; - - -export const CreateKbInputDTO: msRest.CompositeMapper = { - serializedName: "CreateKbInputDTO", - type: { - name: "Composite", - className: "CreateKbInputDTO", - modelProperties: { - qnaList: { - serializedName: "qnaList", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QnADTO" - } - } - } - }, - urls: { - serializedName: "urls", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - files: { - serializedName: "files", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FileDTO" - } - } - } - } - } - } -}; - -export const UpdateKbOperationDTOAdd: msRest.CompositeMapper = { - serializedName: "UpdateKbOperationDTO_add", - type: { - name: "Composite", - className: "UpdateKbOperationDTOAdd", - modelProperties: { - ...CreateKbInputDTO.type.modelProperties - } - } -}; - -export const DeleteKbContentsDTO: msRest.CompositeMapper = { - serializedName: "DeleteKbContentsDTO", - type: { - name: "Composite", - className: "DeleteKbContentsDTO", - modelProperties: { - ids: { - serializedName: "ids", - type: { - name: "Sequence", - element: { - type: { - name: "Number" - } - } - } - }, - sources: { - serializedName: "sources", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const UpdateKbOperationDTODelete: msRest.CompositeMapper = { - serializedName: "UpdateKbOperationDTO_delete", - type: { - name: "Composite", - className: "UpdateKbOperationDTODelete", - modelProperties: { - ...DeleteKbContentsDTO.type.modelProperties - } - } -}; - -export const UpdateKbContentsDTO: msRest.CompositeMapper = { - serializedName: "UpdateKbContentsDTO", - type: { - name: "Composite", - className: "UpdateKbContentsDTO", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - qnaList: { - serializedName: "qnaList", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UpdateQnaDTO" - } - } - } - }, - urls: { - serializedName: "urls", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - defaultAnswer: { - serializedName: "defaultAnswer", - constraints: { - MaxLength: 300, - MinLength: 1 - }, - type: { - name: "String" - } - } - } - } -}; - -export const UpdateKbOperationDTOUpdate: msRest.CompositeMapper = { - serializedName: "UpdateKbOperationDTO_update", - type: { - name: "Composite", - className: "UpdateKbOperationDTOUpdate", - modelProperties: { - ...UpdateKbContentsDTO.type.modelProperties - } - } -}; - -export const UpdateKbOperationDTO: msRest.CompositeMapper = { - serializedName: "UpdateKbOperationDTO", - type: { - name: "Composite", - className: "UpdateKbOperationDTO", - modelProperties: { - add: { - serializedName: "add", - type: { - name: "Composite", - className: "UpdateKbOperationDTOAdd" - } - }, - deleteProperty: { - serializedName: "delete", - type: { - name: "Composite", - className: "UpdateKbOperationDTODelete" - } - }, - update: { - serializedName: "update", - type: { - name: "Composite", - className: "UpdateKbOperationDTOUpdate" - } - }, - enableHierarchicalExtraction: { - serializedName: "enableHierarchicalExtraction", - type: { - name: "Boolean" - } - }, - defaultAnswerUsedForExtraction: { - serializedName: "defaultAnswerUsedForExtraction", - constraints: { - MaxLength: 300, - MinLength: 1 - }, - type: { - name: "String" - } - } - } - } -}; - -export const UpdateQuestionsDTO: msRest.CompositeMapper = { - serializedName: "UpdateQuestionsDTO", - type: { - name: "Composite", - className: "UpdateQuestionsDTO", - modelProperties: { - add: { - serializedName: "add", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - deleteProperty: { - serializedName: "delete", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const UpdateQnaDTOQuestions: msRest.CompositeMapper = { - serializedName: "UpdateQnaDTO_questions", - type: { - name: "Composite", - className: "UpdateQnaDTOQuestions", - modelProperties: { - ...UpdateQuestionsDTO.type.modelProperties - } - } -}; - -export const UpdateMetadataDTO: msRest.CompositeMapper = { - serializedName: "UpdateMetadataDTO", - type: { - name: "Composite", - className: "UpdateMetadataDTO", - modelProperties: { - deleteProperty: { - serializedName: "delete", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetadataDTO" - } - } - } - }, - add: { - serializedName: "add", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetadataDTO" - } - } - } - } - } - } -}; - -export const UpdateQnaDTOMetadata: msRest.CompositeMapper = { - serializedName: "UpdateQnaDTO_metadata", - type: { - name: "Composite", - className: "UpdateQnaDTOMetadata", - modelProperties: { - ...UpdateMetadataDTO.type.modelProperties - } - } -}; - -export const UpdateContextDTO: msRest.CompositeMapper = { - serializedName: "UpdateContextDTO", - type: { - name: "Composite", - className: "UpdateContextDTO", - modelProperties: { - promptsToDelete: { - serializedName: "promptsToDelete", - type: { - name: "Sequence", - element: { - type: { - name: "Number" - } - } - } - }, - promptsToAdd: { - serializedName: "promptsToAdd", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PromptDTO" - } - } - } - }, - isContextOnly: { - serializedName: "isContextOnly", - type: { - name: "Boolean" - } - } - } - } -}; - -export const UpdateQnaDTOContext: msRest.CompositeMapper = { - serializedName: "UpdateQnaDTO_context", - type: { - name: "Composite", - className: "UpdateQnaDTOContext", - modelProperties: { - ...UpdateContextDTO.type.modelProperties - } - } -}; - -export const UpdateQnaDTO: msRest.CompositeMapper = { - serializedName: "UpdateQnaDTO", - type: { - name: "Composite", - className: "UpdateQnaDTO", - modelProperties: { - id: { - serializedName: "id", - constraints: { - InclusiveMaximum: 2147483647, - InclusiveMinimum: 0 - }, - type: { - name: "Number" - } - }, - answer: { - serializedName: "answer", - type: { - name: "String" - } - }, - source: { - serializedName: "source", - constraints: { - MaxLength: 300 - }, - type: { - name: "String" - } - }, - questions: { - serializedName: "questions", - type: { - name: "Composite", - className: "UpdateQnaDTOQuestions" - } - }, - metadata: { - serializedName: "metadata", - type: { - name: "Composite", - className: "UpdateQnaDTOMetadata" - } - }, - context: { - serializedName: "context", - type: { - name: "Composite", - className: "UpdateQnaDTOContext" - } - } - } - } -}; - -export const MetadataDTO: msRest.CompositeMapper = { - serializedName: "MetadataDTO", - type: { - name: "Composite", - className: "MetadataDTO", - modelProperties: { - name: { - required: true, - serializedName: "name", - constraints: { - MaxLength: 100, - MinLength: 1 - }, - type: { - name: "String" - } - }, - value: { - required: true, - serializedName: "value", - constraints: { - MaxLength: 500, - MinLength: 1 - }, - type: { - name: "String" - } - } - } - } -}; - -export const QnADTO: msRest.CompositeMapper = { - serializedName: "QnADTO", - type: { - name: "Composite", - className: "QnADTO", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "Number" - } - }, - answer: { - required: true, - serializedName: "answer", - constraints: { - MaxLength: 25000, - MinLength: 1 - }, - type: { - name: "String" - } - }, - source: { - serializedName: "source", - constraints: { - MaxLength: 300 - }, - type: { - name: "String" - } - }, - questions: { - required: true, - serializedName: "questions", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - metadata: { - serializedName: "metadata", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetadataDTO" - } - } - } - }, - context: { - serializedName: "context", - type: { - name: "Composite", - className: "QnADTOContext" - } - }, - lastUpdatedTimestamp: { - serializedName: "lastUpdatedTimestamp", - constraints: { - MaxLength: 300 - }, - type: { - name: "String" - } - } - } - } -}; - -export const PromptDTOQna: msRest.CompositeMapper = { - serializedName: "PromptDTO_qna", - type: { - name: "Composite", - className: "PromptDTOQna", - modelProperties: { - ...QnADTO.type.modelProperties - } - } -}; - -export const PromptDTO: msRest.CompositeMapper = { - serializedName: "PromptDTO", - type: { - name: "Composite", - className: "PromptDTO", - modelProperties: { - displayOrder: { - serializedName: "displayOrder", - type: { - name: "Number" - } - }, - qnaId: { - serializedName: "qnaId", - type: { - name: "Number" - } - }, - qna: { - serializedName: "qna", - type: { - name: "Composite", - className: "PromptDTOQna" - } - }, - displayText: { - serializedName: "displayText", - constraints: { - MaxLength: 200 - }, - type: { - name: "String" - } - } - } - } -}; - -export const ContextDTO: msRest.CompositeMapper = { - serializedName: "ContextDTO", - type: { - name: "Composite", - className: "ContextDTO", - modelProperties: { - isContextOnly: { - serializedName: "isContextOnly", - type: { - name: "Boolean" - } - }, - prompts: { - serializedName: "prompts", - constraints: { - MaxItems: 20 - }, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PromptDTO" - } - } - } - } - } - } -}; - -export const QnADTOContext: msRest.CompositeMapper = { - serializedName: "QnADTO_context", - type: { - name: "Composite", - className: "QnADTOContext", - modelProperties: { - ...ContextDTO.type.modelProperties - } - } -}; - -export const FileDTO: msRest.CompositeMapper = { - serializedName: "FileDTO", - type: { - name: "Composite", - className: "FileDTO", - modelProperties: { - fileName: { - required: true, - serializedName: "fileName", - constraints: { - MaxLength: 200, - MinLength: 1 - }, - type: { - name: "String" - } - }, - fileUri: { - required: true, - serializedName: "fileUri", - type: { - name: "String" - } - } - } - } -}; - -export const QnADocumentsDTO: msRest.CompositeMapper = { - serializedName: "QnADocumentsDTO", - type: { - name: "Composite", - className: "QnADocumentsDTO", - modelProperties: { - qnaDocuments: { - serializedName: "qnaDocuments", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QnADTO" - } - } - } - } - } - } -}; - -export const CreateKbDTO: msRest.CompositeMapper = { - serializedName: "CreateKbDTO", - type: { - name: "Composite", - className: "CreateKbDTO", - modelProperties: { - name: { - required: true, - serializedName: "name", - constraints: { - MaxLength: 100, - MinLength: 1 - }, - type: { - name: "String" - } - }, - qnaList: { - serializedName: "qnaList", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QnADTO" - } - } - } - }, - urls: { - serializedName: "urls", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - files: { - serializedName: "files", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FileDTO" - } - } - } - }, - enableHierarchicalExtraction: { - serializedName: "enableHierarchicalExtraction", - type: { - name: "Boolean" - } - }, - defaultAnswerUsedForExtraction: { - serializedName: "defaultAnswerUsedForExtraction", - constraints: { - MaxLength: 300, - MinLength: 1 - }, - type: { - name: "String" - } - }, - language: { - serializedName: "language", - constraints: { - MaxLength: 100, - MinLength: 1 - }, - type: { - name: "String" - } - }, - enableMultipleLanguages: { - serializedName: "enableMultipleLanguages", - type: { - name: "Boolean" - } - }, - defaultAnswer: { - serializedName: "defaultAnswer", - constraints: { - MaxLength: 300, - MinLength: 1 - }, - type: { - name: "String" - } - } - } - } -}; - -export const ReplaceKbDTO: msRest.CompositeMapper = { - serializedName: "ReplaceKbDTO", - type: { - name: "Composite", - className: "ReplaceKbDTO", - modelProperties: { - qnAList: { - required: true, - serializedName: "qnAList", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QnADTO" - } - } - } - } - } - } -}; - -export const ErrorModel: msRest.CompositeMapper = { - serializedName: "Error", - type: { - name: "Composite", - className: "ErrorModel", - modelProperties: { - code: { - required: true, - serializedName: "code", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - type: { - name: "String" - } - }, - target: { - serializedName: "target", - type: { - name: "String" - } - }, - details: { - serializedName: "details", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorModel" - } - } - } - }, - innerError: { - serializedName: "innerError", - type: { - name: "Composite", - className: "InnerErrorModel" - } - } - } - } -}; - -export const ErrorResponseError: msRest.CompositeMapper = { - serializedName: "ErrorResponse_error", - type: { - name: "Composite", - className: "ErrorResponseError", - modelProperties: { - ...ErrorModel.type.modelProperties - } - } -}; - -export const ErrorResponse: msRest.CompositeMapper = { - serializedName: "ErrorResponse", - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorResponseError" - } - } - } - } -}; - -export const InnerErrorModel: msRest.CompositeMapper = { - serializedName: "InnerErrorModel", - type: { - name: "Composite", - className: "InnerErrorModel", - modelProperties: { - code: { - serializedName: "code", - type: { - name: "String" - } - }, - innerError: { - serializedName: "innerError", - type: { - name: "Composite", - className: "InnerErrorModel" - } - } - } - } -}; - -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", - type: { - name: "Composite", - className: "Operation", - modelProperties: { - operationState: { - serializedName: "operationState", - type: { - name: "String" - } - }, - createdTimestamp: { - serializedName: "createdTimestamp", - type: { - name: "String" - } - }, - lastActionTimestamp: { - serializedName: "lastActionTimestamp", - type: { - name: "String" - } - }, - resourceLocation: { - serializedName: "resourceLocation", - type: { - name: "String" - } - }, - userId: { - serializedName: "userId", - type: { - name: "String" - } - }, - operationId: { - serializedName: "operationId", - type: { - name: "String" - } - }, - errorResponse: { - serializedName: "errorResponse", - type: { - name: "Composite", - className: "ErrorResponse" - } - } - } - } -}; - -export const KnowledgebaseDTO: msRest.CompositeMapper = { - serializedName: "KnowledgebaseDTO", - type: { - name: "Composite", - className: "KnowledgebaseDTO", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String" - } - }, - hostName: { - serializedName: "hostName", - type: { - name: "String" - } - }, - lastAccessedTimestamp: { - serializedName: "lastAccessedTimestamp", - type: { - name: "String" - } - }, - lastChangedTimestamp: { - serializedName: "lastChangedTimestamp", - type: { - name: "String" - } - }, - lastPublishedTimestamp: { - serializedName: "lastPublishedTimestamp", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - userId: { - serializedName: "userId", - type: { - name: "String" - } - }, - urls: { - serializedName: "urls", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - sources: { - serializedName: "sources", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const KnowledgebasesDTO: msRest.CompositeMapper = { - serializedName: "KnowledgebasesDTO", - type: { - name: "Composite", - className: "KnowledgebasesDTO", - modelProperties: { - knowledgebases: { - serializedName: "knowledgebases", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KnowledgebaseDTO" - } - } - } - } - } - } -}; - -export const ActiveLearningSettingsDTO: msRest.CompositeMapper = { - serializedName: "ActiveLearningSettingsDTO", - type: { - name: "Composite", - className: "ActiveLearningSettingsDTO", - modelProperties: { - enable: { - serializedName: "enable", - type: { - name: "String" - } - } - } - } -}; - -export const EndpointSettingsDTOActiveLearning: msRest.CompositeMapper = { - serializedName: "EndpointSettingsDTO_activeLearning", - type: { - name: "Composite", - className: "EndpointSettingsDTOActiveLearning", - modelProperties: { - ...ActiveLearningSettingsDTO.type.modelProperties - } - } -}; - -export const EndpointSettingsDTO: msRest.CompositeMapper = { - serializedName: "EndpointSettingsDTO", - type: { - name: "Composite", - className: "EndpointSettingsDTO", - modelProperties: { - activeLearning: { - serializedName: "activeLearning", - type: { - name: "Composite", - className: "EndpointSettingsDTOActiveLearning" - } - } - } - } -}; - -export const AlterationsDTO: msRest.CompositeMapper = { - serializedName: "AlterationsDTO", - type: { - name: "Composite", - className: "AlterationsDTO", - modelProperties: { - alterations: { - required: true, - serializedName: "alterations", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const WordAlterationsDTO: msRest.CompositeMapper = { - serializedName: "WordAlterationsDTO", - type: { - name: "Composite", - className: "WordAlterationsDTO", - modelProperties: { - wordAlterations: { - required: true, - serializedName: "wordAlterations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AlterationsDTO" - } - } - } - } - } - } -}; - -export const EndpointKeysDTO: msRest.CompositeMapper = { - serializedName: "EndpointKeysDTO", - type: { - name: "Composite", - className: "EndpointKeysDTO", - modelProperties: { - primaryEndpointKey: { - serializedName: "primaryEndpointKey", - type: { - name: "String" - } - }, - secondaryEndpointKey: { - serializedName: "secondaryEndpointKey", - type: { - name: "String" - } - }, - installedVersion: { - serializedName: "installedVersion", - type: { - name: "String" - } - }, - lastStableVersion: { - serializedName: "lastStableVersion", - type: { - name: "String" - } - }, - language: { - serializedName: "language", - type: { - name: "String" - } - } - } - } -}; - -export const QueryContextDTO: msRest.CompositeMapper = { - serializedName: "QueryContextDTO", - type: { - name: "Composite", - className: "QueryContextDTO", - modelProperties: { - previousQnaId: { - serializedName: "previousQnaId", - type: { - name: "Number" - } - }, - previousUserQuery: { - serializedName: "previousUserQuery", - type: { - name: "String" - } - } - } - } -}; - -export const QueryDTOContext: msRest.CompositeMapper = { - serializedName: "QueryDTO_context", - type: { - name: "Composite", - className: "QueryDTOContext", - modelProperties: { - ...QueryContextDTO.type.modelProperties - } - } -}; - -export const AnswerSpanRequestDTO: msRest.CompositeMapper = { - serializedName: "AnswerSpanRequestDTO", - type: { - name: "Composite", - className: "AnswerSpanRequestDTO", - modelProperties: { - enable: { - serializedName: "enable", - type: { - name: "Boolean" - } - }, - scoreThreshold: { - serializedName: "scoreThreshold", - type: { - name: "Number" - } - }, - topAnswersWithSpan: { - serializedName: "topAnswersWithSpan", - constraints: { - InclusiveMaximum: 10, - InclusiveMinimum: 1 - }, - type: { - name: "Number" - } - } - } - } -}; - -export const QueryDTOAnswerSpanRequest: msRest.CompositeMapper = { - serializedName: "QueryDTO_answerSpanRequest", - type: { - name: "Composite", - className: "QueryDTOAnswerSpanRequest", - modelProperties: { - ...AnswerSpanRequestDTO.type.modelProperties - } - } -}; - -export const QueryDTO: msRest.CompositeMapper = { - serializedName: "QueryDTO", - type: { - name: "Composite", - className: "QueryDTO", - modelProperties: { - qnaId: { - serializedName: "qnaId", - type: { - name: "String" - } - }, - question: { - serializedName: "question", - type: { - name: "String" - } - }, - top: { - serializedName: "top", - type: { - name: "Number" - } - }, - userId: { - serializedName: "userId", - type: { - name: "String" - } - }, - isTest: { - serializedName: "isTest", - type: { - name: "Boolean" - } - }, - scoreThreshold: { - serializedName: "scoreThreshold", - type: { - name: "Number" - } - }, - context: { - serializedName: "context", - type: { - name: "Composite", - className: "QueryDTOContext" - } - }, - rankerType: { - serializedName: "rankerType", - type: { - name: "String" - } - }, - strictFilters: { - serializedName: "strictFilters", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetadataDTO" - } - } - } - }, - strictFiltersCompoundOperationType: { - serializedName: "strictFiltersCompoundOperationType", - type: { - name: "String" - } - }, - answerSpanRequest: { - serializedName: "answerSpanRequest", - type: { - name: "Composite", - className: "QueryDTOAnswerSpanRequest" - } - } - } - } -}; - -export const QnASearchResultContext: msRest.CompositeMapper = { - serializedName: "QnASearchResult_context", - type: { - name: "Composite", - className: "QnASearchResultContext", - modelProperties: { - ...ContextDTO.type.modelProperties - } - } -}; - -export const AnswerSpanResponseDTO: msRest.CompositeMapper = { - serializedName: "AnswerSpanResponseDTO", - type: { - name: "Composite", - className: "AnswerSpanResponseDTO", - modelProperties: { - text: { - serializedName: "text", - type: { - name: "String" - } - }, - score: { - serializedName: "score", - type: { - name: "Number" - } - }, - startIndex: { - serializedName: "startIndex", - type: { - name: "Number" - } - }, - endIndex: { - serializedName: "endIndex", - type: { - name: "Number" - } - } - } - } -}; - -export const QnASearchResultAnswerSpan: msRest.CompositeMapper = { - serializedName: "QnASearchResult_answerSpan", - type: { - name: "Composite", - className: "QnASearchResultAnswerSpan", - modelProperties: { - ...AnswerSpanResponseDTO.type.modelProperties - } - } -}; - -export const QnASearchResult: msRest.CompositeMapper = { - serializedName: "QnASearchResult", - type: { - name: "Composite", - className: "QnASearchResult", - modelProperties: { - questions: { - serializedName: "questions", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - answer: { - serializedName: "answer", - type: { - name: "String" - } - }, - score: { - serializedName: "score", - type: { - name: "Number" - } - }, - id: { - serializedName: "id", - type: { - name: "Number" - } - }, - source: { - serializedName: "source", - type: { - name: "String" - } - }, - metadata: { - serializedName: "metadata", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetadataDTO" - } - } - } - }, - context: { - serializedName: "context", - type: { - name: "Composite", - className: "QnASearchResultContext" - } - }, - answerSpan: { - serializedName: "answerSpan", - type: { - name: "Composite", - className: "QnASearchResultAnswerSpan" - } - } - } - } -}; - -export const QnASearchResultList: msRest.CompositeMapper = { - serializedName: "QnASearchResultList", - type: { - name: "Composite", - className: "QnASearchResultList", - modelProperties: { - answers: { - serializedName: "answers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QnASearchResult" - } - } - } - } - } - } -}; - -export const FeedbackRecordDTO: msRest.CompositeMapper = { - serializedName: "FeedbackRecordDTO", - type: { - name: "Composite", - className: "FeedbackRecordDTO", - modelProperties: { - userId: { - serializedName: "userId", - type: { - name: "String" - } - }, - userQuestion: { - serializedName: "userQuestion", - constraints: { - MaxLength: 1000 - }, - type: { - name: "String" - } - }, - qnaId: { - serializedName: "qnaId", - type: { - name: "Number" - } - } - } - } -}; - -export const FeedbackRecordsDTO: msRest.CompositeMapper = { - serializedName: "FeedbackRecordsDTO", - type: { - name: "Composite", - className: "FeedbackRecordsDTO", - modelProperties: { - feedbackRecords: { - serializedName: "feedbackRecords", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FeedbackRecordDTO" - } - } - } - } - } - } -}; - -export const OperationsGetDetailsHeaders: msRest.CompositeMapper = { - serializedName: "operations-getdetails-headers", - type: { - name: "Composite", - className: "OperationsGetDetailsHeaders", - modelProperties: { - retryAfter: { - serializedName: "retryafter", - type: { - name: "Number" - } - } - } - } -}; - -export const KnowledgebaseUpdateHeaders: msRest.CompositeMapper = { - serializedName: "knowledgebase-update-headers", - type: { - name: "Composite", - className: "KnowledgebaseUpdateHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String" - } - } - } - } -}; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/operationsMappers.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/operationsMappers.ts deleted file mode 100644 index 5034f2601aee..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/operationsMappers.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - ErrorModel, - ErrorResponse, - ErrorResponseError, - InnerErrorModel, - Operation, - OperationsGetDetailsHeaders -} from "../models/mappers"; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/parameters.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/parameters.ts deleted file mode 100644 index 9702306b51f2..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/parameters.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; - -export const changedSince: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "changedSince" - ], - mapper: { - serializedName: "changedSince", - type: { - name: "String" - } - } -}; -export const endpoint: msRest.OperationURLParameter = { - parameterPath: "endpoint", - mapper: { - required: true, - serializedName: "Endpoint", - defaultValue: '', - type: { - name: "String" - } - }, - skipEncoding: true -}; -export const environment: msRest.OperationURLParameter = { - parameterPath: "environment", - mapper: { - required: true, - serializedName: "environment", - type: { - name: "String" - } - } -}; -export const kbId: msRest.OperationURLParameter = { - parameterPath: "kbId", - mapper: { - required: true, - serializedName: "kbId", - type: { - name: "String" - } - } -}; -export const keyType: msRest.OperationURLParameter = { - parameterPath: "keyType", - mapper: { - required: true, - serializedName: "keyType", - type: { - name: "String" - } - } -}; -export const operationId: msRest.OperationURLParameter = { - parameterPath: "operationId", - mapper: { - required: true, - serializedName: "operationId", - type: { - name: "String" - } - } -}; -export const source: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "source" - ], - mapper: { - serializedName: "source", - type: { - name: "String" - } - } -}; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/alterations.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/alterations.ts deleted file mode 100644 index 2460696a7eea..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/alterations.ts +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/alterationsMappers"; -import * as Parameters from "../models/parameters"; -import { QnAMakerClientContext } from "../qnAMakerClientContext"; - -/** Class representing a Alterations. */ -export class Alterations { - private readonly client: QnAMakerClientContext; - - /** - * Create a Alterations. - * @param {QnAMakerClientContext} client Reference to the service client. - */ - constructor(client: QnAMakerClientContext) { - this.client = client; - } - - /** - * @summary Download alterations from runtime. - * @param [options] The optional parameters - * @returns Promise - */ - get(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - get(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - get(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * @summary Replace alterations data. - * @param wordAlterations New alterations data. - * @param [options] The optional parameters - * @returns Promise - */ - replace(wordAlterations: Models.WordAlterationsDTO, options?: msRest.RequestOptionsBase): Promise; - /** - * @param wordAlterations New alterations data. - * @param callback The callback - */ - replace(wordAlterations: Models.WordAlterationsDTO, callback: msRest.ServiceCallback): void; - /** - * @param wordAlterations New alterations data. - * @param options The optional parameters - * @param callback The callback - */ - replace(wordAlterations: Models.WordAlterationsDTO, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - replace(wordAlterations: Models.WordAlterationsDTO, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - wordAlterations, - options - }, - replaceOperationSpec, - callback); - } - - /** - * @summary Download alterations per Knowledgebase (QnAMaker Managed). - * @param kbId Knowledgebase id. - * @param [options] The optional parameters - * @returns Promise - */ - getAlterationsForKb(kbId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param kbId Knowledgebase id. - * @param callback The callback - */ - getAlterationsForKb(kbId: string, callback: msRest.ServiceCallback): void; - /** - * @param kbId Knowledgebase id. - * @param options The optional parameters - * @param callback The callback - */ - getAlterationsForKb(kbId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getAlterationsForKb(kbId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - kbId, - options - }, - getAlterationsForKbOperationSpec, - callback) as Promise; - } - - /** - * @summary Replace alterations data per Knowledgebase (QnAMaker Managed). - * @param kbId Knowledgebase id. - * @param wordAlterations New alterations data. - * @param [options] The optional parameters - * @returns Promise - */ - replaceAlterationsForKb(kbId: string, wordAlterations: Models.WordAlterationsDTO, options?: msRest.RequestOptionsBase): Promise; - /** - * @param kbId Knowledgebase id. - * @param wordAlterations New alterations data. - * @param callback The callback - */ - replaceAlterationsForKb(kbId: string, wordAlterations: Models.WordAlterationsDTO, callback: msRest.ServiceCallback): void; - /** - * @param kbId Knowledgebase id. - * @param wordAlterations New alterations data. - * @param options The optional parameters - * @param callback The callback - */ - replaceAlterationsForKb(kbId: string, wordAlterations: Models.WordAlterationsDTO, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - replaceAlterationsForKb(kbId: string, wordAlterations: Models.WordAlterationsDTO, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - kbId, - wordAlterations, - options - }, - replaceAlterationsForKbOperationSpec, - callback); - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "alterations", - urlParameters: [ - Parameters.endpoint - ], - responses: { - 200: { - bodyMapper: Mappers.WordAlterationsDTO - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const replaceOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "alterations", - urlParameters: [ - Parameters.endpoint - ], - requestBody: { - parameterPath: "wordAlterations", - mapper: { - ...Mappers.WordAlterationsDTO, - required: true - } - }, - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getAlterationsForKbOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "alterations/{kbId}", - urlParameters: [ - Parameters.endpoint, - Parameters.kbId - ], - responses: { - 200: { - bodyMapper: Mappers.WordAlterationsDTO - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const replaceAlterationsForKbOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "alterations/{kbId}", - urlParameters: [ - Parameters.endpoint, - Parameters.kbId - ], - requestBody: { - parameterPath: "wordAlterations", - mapper: { - ...Mappers.WordAlterationsDTO, - required: true - } - }, - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/endpointKeys.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/endpointKeys.ts deleted file mode 100644 index b64d18803ddc..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/endpointKeys.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/endpointKeysMappers"; -import * as Parameters from "../models/parameters"; -import { QnAMakerClientContext } from "../qnAMakerClientContext"; - -/** Class representing a EndpointKeys. */ -export class EndpointKeys { - private readonly client: QnAMakerClientContext; - - /** - * Create a EndpointKeys. - * @param {QnAMakerClientContext} client Reference to the service client. - */ - constructor(client: QnAMakerClientContext) { - this.client = client; - } - - /** - * @summary Gets endpoint keys for an endpoint - * @param [options] The optional parameters - * @returns Promise - */ - getKeys(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - getKeys(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - getKeys(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getKeys(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - getKeysOperationSpec, - callback) as Promise; - } - - /** - * @summary Re-generates an endpoint key. - * @param keyType Type of Key - * @param [options] The optional parameters - * @returns Promise - */ - refreshKeys(keyType: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param keyType Type of Key - * @param callback The callback - */ - refreshKeys(keyType: string, callback: msRest.ServiceCallback): void; - /** - * @param keyType Type of Key - * @param options The optional parameters - * @param callback The callback - */ - refreshKeys(keyType: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - refreshKeys(keyType: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - keyType, - options - }, - refreshKeysOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getKeysOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "endpointkeys", - urlParameters: [ - Parameters.endpoint - ], - responses: { - 200: { - bodyMapper: Mappers.EndpointKeysDTO - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const refreshKeysOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "endpointkeys/{keyType}", - urlParameters: [ - Parameters.endpoint, - Parameters.keyType - ], - responses: { - 200: { - bodyMapper: Mappers.EndpointKeysDTO - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/endpointSettings.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/endpointSettings.ts deleted file mode 100644 index dc3a35dda12f..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/endpointSettings.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/endpointSettingsMappers"; -import * as Parameters from "../models/parameters"; -import { QnAMakerClientContext } from "../qnAMakerClientContext"; - -/** Class representing a EndpointSettings. */ -export class EndpointSettings { - private readonly client: QnAMakerClientContext; - - /** - * Create a EndpointSettings. - * @param {QnAMakerClientContext} client Reference to the service client. - */ - constructor(client: QnAMakerClientContext) { - this.client = client; - } - - /** - * @summary Gets endpoint settings for an endpoint. - * @param [options] The optional parameters - * @returns Promise - */ - getSettings(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - getSettings(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - getSettings(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getSettings(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - getSettingsOperationSpec, - callback) as Promise; - } - - /** - * @summary Updates endpoint settings for an endpoint. - * @param endpointSettingsPayload Post body of the request. - * @param [options] The optional parameters - * @returns Promise - */ - updateSettings(endpointSettingsPayload: Models.EndpointSettingsDTO, options?: msRest.RequestOptionsBase): Promise; - /** - * @param endpointSettingsPayload Post body of the request. - * @param callback The callback - */ - updateSettings(endpointSettingsPayload: Models.EndpointSettingsDTO, callback: msRest.ServiceCallback): void; - /** - * @param endpointSettingsPayload Post body of the request. - * @param options The optional parameters - * @param callback The callback - */ - updateSettings(endpointSettingsPayload: Models.EndpointSettingsDTO, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateSettings(endpointSettingsPayload: Models.EndpointSettingsDTO, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - endpointSettingsPayload, - options - }, - updateSettingsOperationSpec, - callback); - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getSettingsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "endpointSettings", - urlParameters: [ - Parameters.endpoint - ], - responses: { - 200: { - bodyMapper: Mappers.EndpointSettingsDTO - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateSettingsOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "endpointSettings", - urlParameters: [ - Parameters.endpoint - ], - requestBody: { - parameterPath: "endpointSettingsPayload", - mapper: { - ...Mappers.EndpointSettingsDTO, - required: true - } - }, - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/index.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/index.ts deleted file mode 100644 index aaa6bf49d884..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -export * from "./endpointSettings"; -export * from "./endpointKeys"; -export * from "./alterations"; -export * from "./knowledgebase"; -export * from "./operations"; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/knowledgebase.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/knowledgebase.ts deleted file mode 100644 index 28416e55e0c1..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/knowledgebase.ts +++ /dev/null @@ -1,540 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/knowledgebaseMappers"; -import * as Parameters from "../models/parameters"; -import { QnAMakerClientContext } from "../qnAMakerClientContext"; - -/** Class representing a Knowledgebase. */ -export class Knowledgebase { - private readonly client: QnAMakerClientContext; - - /** - * Create a Knowledgebase. - * @param {QnAMakerClientContext} client Reference to the service client. - */ - constructor(client: QnAMakerClientContext) { - this.client = client; - } - - /** - * @summary Gets all knowledgebases for a user. - * @param [options] The optional parameters - * @returns Promise - */ - listAll(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - listAll(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listAll(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAll(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listAllOperationSpec, - callback) as Promise; - } - - /** - * @summary Gets details of a specific knowledgebase. - * @param kbId Knowledgebase id. - * @param [options] The optional parameters - * @returns Promise - */ - getDetails(kbId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param kbId Knowledgebase id. - * @param callback The callback - */ - getDetails(kbId: string, callback: msRest.ServiceCallback): void; - /** - * @param kbId Knowledgebase id. - * @param options The optional parameters - * @param callback The callback - */ - getDetails(kbId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getDetails(kbId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - kbId, - options - }, - getDetailsOperationSpec, - callback) as Promise; - } - - /** - * @summary Deletes the knowledgebase and all its data. - * @param kbId Knowledgebase id. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(kbId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param kbId Knowledgebase id. - * @param callback The callback - */ - deleteMethod(kbId: string, callback: msRest.ServiceCallback): void; - /** - * @param kbId Knowledgebase id. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(kbId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(kbId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - kbId, - options - }, - deleteMethodOperationSpec, - callback); - } - - /** - * @summary Publishes all changes in test index of a knowledgebase to its prod index. - * @param kbId Knowledgebase id. - * @param [options] The optional parameters - * @returns Promise - */ - publish(kbId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param kbId Knowledgebase id. - * @param callback The callback - */ - publish(kbId: string, callback: msRest.ServiceCallback): void; - /** - * @param kbId Knowledgebase id. - * @param options The optional parameters - * @param callback The callback - */ - publish(kbId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - publish(kbId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - kbId, - options - }, - publishOperationSpec, - callback); - } - - /** - * @summary Replace knowledgebase contents. - * @param kbId Knowledgebase id. - * @param replaceKb An instance of ReplaceKbDTO which contains list of qnas to be uploaded - * @param [options] The optional parameters - * @returns Promise - */ - replace(kbId: string, replaceKb: Models.ReplaceKbDTO, options?: msRest.RequestOptionsBase): Promise; - /** - * @param kbId Knowledgebase id. - * @param replaceKb An instance of ReplaceKbDTO which contains list of qnas to be uploaded - * @param callback The callback - */ - replace(kbId: string, replaceKb: Models.ReplaceKbDTO, callback: msRest.ServiceCallback): void; - /** - * @param kbId Knowledgebase id. - * @param replaceKb An instance of ReplaceKbDTO which contains list of qnas to be uploaded - * @param options The optional parameters - * @param callback The callback - */ - replace(kbId: string, replaceKb: Models.ReplaceKbDTO, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - replace(kbId: string, replaceKb: Models.ReplaceKbDTO, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - kbId, - replaceKb, - options - }, - replaceOperationSpec, - callback); - } - - /** - * @summary Asynchronous operation to modify a knowledgebase. - * @param kbId Knowledgebase id. - * @param updateKb Post body of the request. - * @param [options] The optional parameters - * @returns Promise - */ - update(kbId: string, updateKb: Models.UpdateKbOperationDTO, options?: msRest.RequestOptionsBase): Promise; - /** - * @param kbId Knowledgebase id. - * @param updateKb Post body of the request. - * @param callback The callback - */ - update(kbId: string, updateKb: Models.UpdateKbOperationDTO, callback: msRest.ServiceCallback): void; - /** - * @param kbId Knowledgebase id. - * @param updateKb Post body of the request. - * @param options The optional parameters - * @param callback The callback - */ - update(kbId: string, updateKb: Models.UpdateKbOperationDTO, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(kbId: string, updateKb: Models.UpdateKbOperationDTO, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - kbId, - updateKb, - options - }, - updateOperationSpec, - callback) as Promise; - } - - /** - * @summary Asynchronous operation to create a new knowledgebase. - * @param createKbPayload Post body of the request. - * @param [options] The optional parameters - * @returns Promise - */ - create(createKbPayload: Models.CreateKbDTO, options?: msRest.RequestOptionsBase): Promise; - /** - * @param createKbPayload Post body of the request. - * @param callback The callback - */ - create(createKbPayload: Models.CreateKbDTO, callback: msRest.ServiceCallback): void; - /** - * @param createKbPayload Post body of the request. - * @param options The optional parameters - * @param callback The callback - */ - create(createKbPayload: Models.CreateKbDTO, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - create(createKbPayload: Models.CreateKbDTO, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - createKbPayload, - options - }, - createOperationSpec, - callback) as Promise; - } - - /** - * @summary Download the knowledgebase. - * @param kbId Knowledgebase id. - * @param environment Specifies whether environment is Test or Prod. Possible values include: - * 'Prod', 'Test' - * @param [options] The optional parameters - * @returns Promise - */ - download(kbId: string, environment: Models.EnvironmentType, options?: Models.KnowledgebaseDownloadOptionalParams): Promise; - /** - * @param kbId Knowledgebase id. - * @param environment Specifies whether environment is Test or Prod. Possible values include: - * 'Prod', 'Test' - * @param callback The callback - */ - download(kbId: string, environment: Models.EnvironmentType, callback: msRest.ServiceCallback): void; - /** - * @param kbId Knowledgebase id. - * @param environment Specifies whether environment is Test or Prod. Possible values include: - * 'Prod', 'Test' - * @param options The optional parameters - * @param callback The callback - */ - download(kbId: string, environment: Models.EnvironmentType, options: Models.KnowledgebaseDownloadOptionalParams, callback: msRest.ServiceCallback): void; - download(kbId: string, environment: Models.EnvironmentType, options?: Models.KnowledgebaseDownloadOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - kbId, - environment, - options - }, - downloadOperationSpec, - callback) as Promise; - } - - /** - * @summary GenerateAnswer call to query knowledgebase (QnA Maker Managed). - * @param kbId Knowledgebase id. - * @param generateAnswerPayload Post body of the request. - * @param [options] The optional parameters - * @returns Promise - */ - generateAnswer(kbId: string, generateAnswerPayload: Models.QueryDTO, options?: msRest.RequestOptionsBase): Promise; - /** - * @param kbId Knowledgebase id. - * @param generateAnswerPayload Post body of the request. - * @param callback The callback - */ - generateAnswer(kbId: string, generateAnswerPayload: Models.QueryDTO, callback: msRest.ServiceCallback): void; - /** - * @param kbId Knowledgebase id. - * @param generateAnswerPayload Post body of the request. - * @param options The optional parameters - * @param callback The callback - */ - generateAnswer(kbId: string, generateAnswerPayload: Models.QueryDTO, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - generateAnswer(kbId: string, generateAnswerPayload: Models.QueryDTO, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - kbId, - generateAnswerPayload, - options - }, - generateAnswerOperationSpec, - callback) as Promise; - } - - /** - * @summary Train call to add suggestions to knowledgebase (QnAMaker Managed). - * @param kbId Knowledgebase id. - * @param trainPayload Post body of the request. - * @param [options] The optional parameters - * @returns Promise - */ - train(kbId: string, trainPayload: Models.FeedbackRecordsDTO, options?: msRest.RequestOptionsBase): Promise; - /** - * @param kbId Knowledgebase id. - * @param trainPayload Post body of the request. - * @param callback The callback - */ - train(kbId: string, trainPayload: Models.FeedbackRecordsDTO, callback: msRest.ServiceCallback): void; - /** - * @param kbId Knowledgebase id. - * @param trainPayload Post body of the request. - * @param options The optional parameters - * @param callback The callback - */ - train(kbId: string, trainPayload: Models.FeedbackRecordsDTO, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - train(kbId: string, trainPayload: Models.FeedbackRecordsDTO, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - kbId, - trainPayload, - options - }, - trainOperationSpec, - callback); - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listAllOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "knowledgebases", - urlParameters: [ - Parameters.endpoint - ], - responses: { - 200: { - bodyMapper: Mappers.KnowledgebasesDTO - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getDetailsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "knowledgebases/{kbId}", - urlParameters: [ - Parameters.endpoint, - Parameters.kbId - ], - responses: { - 200: { - bodyMapper: Mappers.KnowledgebaseDTO - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "knowledgebases/{kbId}", - urlParameters: [ - Parameters.endpoint, - Parameters.kbId - ], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const publishOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "knowledgebases/{kbId}", - urlParameters: [ - Parameters.endpoint, - Parameters.kbId - ], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const replaceOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "knowledgebases/{kbId}", - urlParameters: [ - Parameters.endpoint, - Parameters.kbId - ], - requestBody: { - parameterPath: "replaceKb", - mapper: { - ...Mappers.ReplaceKbDTO, - required: true - } - }, - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "knowledgebases/{kbId}", - urlParameters: [ - Parameters.endpoint, - Parameters.kbId - ], - requestBody: { - parameterPath: "updateKb", - mapper: { - ...Mappers.UpdateKbOperationDTO, - required: true - } - }, - responses: { - 202: { - bodyMapper: Mappers.Operation, - headersMapper: Mappers.KnowledgebaseUpdateHeaders - }, - default: { - bodyMapper: Mappers.ErrorResponse, - headersMapper: Mappers.KnowledgebaseUpdateHeaders - } - }, - serializer -}; - -const createOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "knowledgebases/create", - urlParameters: [ - Parameters.endpoint - ], - requestBody: { - parameterPath: "createKbPayload", - mapper: { - ...Mappers.CreateKbDTO, - required: true - } - }, - responses: { - 202: { - bodyMapper: Mappers.Operation - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const downloadOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "knowledgebases/{kbId}/{environment}/qna", - urlParameters: [ - Parameters.endpoint, - Parameters.kbId, - Parameters.environment - ], - queryParameters: [ - Parameters.source, - Parameters.changedSince - ], - responses: { - 200: { - bodyMapper: Mappers.QnADocumentsDTO - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const generateAnswerOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "knowledgebases/{kbId}/generateAnswer", - urlParameters: [ - Parameters.endpoint, - Parameters.kbId - ], - requestBody: { - parameterPath: "generateAnswerPayload", - mapper: { - ...Mappers.QueryDTO, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.QnASearchResultList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const trainOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "knowledgebases/{kbId}/train", - urlParameters: [ - Parameters.endpoint, - Parameters.kbId - ], - requestBody: { - parameterPath: "trainPayload", - mapper: { - ...Mappers.FeedbackRecordsDTO, - required: true - } - }, - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/operations.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/operations.ts deleted file mode 100644 index 0623c1cd6650..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/operations.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/operationsMappers"; -import * as Parameters from "../models/parameters"; -import { QnAMakerClientContext } from "../qnAMakerClientContext"; - -/** Class representing a Operations. */ -export class Operations { - private readonly client: QnAMakerClientContext; - - /** - * Create a Operations. - * @param {QnAMakerClientContext} client Reference to the service client. - */ - constructor(client: QnAMakerClientContext) { - this.client = client; - } - - /** - * @summary Gets details of a specific long running operation. - * @param operationId Operation id. - * @param [options] The optional parameters - * @returns Promise - */ - getDetails(operationId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param operationId Operation id. - * @param callback The callback - */ - getDetails(operationId: string, callback: msRest.ServiceCallback): void; - /** - * @param operationId Operation id. - * @param options The optional parameters - * @param callback The callback - */ - getDetails(operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getDetails(operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - operationId, - options - }, - getDetailsOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getDetailsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "operations/{operationId}", - urlParameters: [ - Parameters.endpoint, - Parameters.operationId - ], - responses: { - 200: { - bodyMapper: Mappers.Operation, - headersMapper: Mappers.OperationsGetDetailsHeaders - }, - default: { - bodyMapper: Mappers.ErrorResponse, - headersMapper: Mappers.OperationsGetDetailsHeaders - } - }, - serializer -}; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/qnAMakerClient.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/qnAMakerClient.ts deleted file mode 100644 index 5690ed0a3612..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/qnAMakerClient.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "./models"; -import * as Mappers from "./models/mappers"; -import * as operations from "./operations"; -import { QnAMakerClientContext } from "./qnAMakerClientContext"; - -class QnAMakerClient extends QnAMakerClientContext { - // Operation groups - endpointSettings: operations.EndpointSettings; - endpointKeys: operations.EndpointKeys; - alterations: operations.Alterations; - knowledgebase: operations.Knowledgebase; - operations: operations.Operations; - - /** - * Initializes a new instance of the QnAMakerClient class. - * @param endpoint Supported Cognitive Services endpoint (e.g., https://< qnamaker-resource-name - * >.api.cognitiveservices.azure.com). - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param [options] The parameter options - */ - constructor(credentials: msRest.ServiceClientCredentials, endpoint: string, options?: msRest.ServiceClientOptions) { - super(credentials, endpoint, options); - this.endpointSettings = new operations.EndpointSettings(this); - this.endpointKeys = new operations.EndpointKeys(this); - this.alterations = new operations.Alterations(this); - this.knowledgebase = new operations.Knowledgebase(this); - this.operations = new operations.Operations(this); - } -} - -// Operation Specifications - -export { - QnAMakerClient, - QnAMakerClientContext, - Models as QnAMakerModels, - Mappers as QnAMakerMappers -}; -export * from "./operations"; diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/qnAMakerClientContext.ts b/sdk/cognitiveservices/cognitiveservices-qnamaker/src/qnAMakerClientContext.ts deleted file mode 100644 index 00597b9a5f08..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/src/qnAMakerClientContext.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; - -const packageName = "@azure/cognitiveservices-qnamaker"; -const packageVersion = "3.2.0"; - -export class QnAMakerClientContext extends msRest.ServiceClient { - endpoint: string; - credentials: msRest.ServiceClientCredentials; - - /** - * Initializes a new instance of the QnAMakerClientContext class. - * @param endpoint Supported Cognitive Services endpoint (e.g., https://< qnamaker-resource-name - * >.api.cognitiveservices.azure.com). - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param [options] The parameter options - */ - constructor(credentials: msRest.ServiceClientCredentials, endpoint: string, options?: msRest.ServiceClientOptions) { - if (endpoint == undefined) { - throw new Error("'endpoint' cannot be null."); - } - if (credentials == undefined) { - throw new Error("'credentials' cannot be null."); - } - - if (!options) { - options = {}; - } - - if (!options.userAgent) { - const defaultUserAgent = msRest.getDefaultUserAgentValue(); - options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; - } - - super(credentials, options); - - this.baseUri = "{Endpoint}/qnamaker/v5.0-preview.1"; - this.requestContentType = "application/json; charset=utf-8"; - this.endpoint = endpoint; - this.credentials = credentials; - } -} diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/swagger/readme.md b/sdk/cognitiveservices/cognitiveservices-qnamaker/swagger/readme.md deleted file mode 100644 index 362708b6d1d0..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/swagger/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# Cognitive Services QnAMaker SDK - -> see https://aka.ms/autorest - -Configuration for generating QnAMaker SDK. - -```yaml -add-credentials: true -openapi-type: data-plane -license-header: MICROSOFT_MIT_NO_VERSION -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/QnAMaker/preview/v5.0-preview.1/QnAMaker.json -use-extension: - "@microsoft.azure/autorest.typescript": "4.4.4" -``` - -## TypeScript - -These settings apply only when `--typescript` is specified on the command line. - -```yaml $(typescript) -typescript: - package-version: 3.2.0 - package-name: "@azure/cognitiveservices-qnamaker" - output-folder: .. - azure-arm: false - generate-metadata: true - auto-publish: true -``` diff --git a/sdk/cognitiveservices/cognitiveservices-qnamaker/tsconfig.json b/sdk/cognitiveservices/cognitiveservices-qnamaker/tsconfig.json deleted file mode 100644 index 422b584abd5e..000000000000 --- a/sdk/cognitiveservices/cognitiveservices-qnamaker/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "module": "es6", - "moduleResolution": "node", - "strict": true, - "target": "es5", - "sourceMap": true, - "declarationMap": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], - "declaration": true, - "outDir": "./esm", - "importHelpers": true - }, - "include": ["./src/**/*.ts"], - "exclude": ["node_modules"] -}