From 5880f0eb93b7658de0b1048dc340eeb383d5fc63 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 28 Jul 2021 11:12:03 +0000 Subject: [PATCH] CodeGen from PR 15364 in Azure/azure-rest-api-specs Merge c15d80d2aaaca55dc1ad31cf23a7511510f76c0a into eaae6d973b6d3bf57fc3228ad8f8a59ddebaec08 --- .../LICENSE.txt | 2 +- .../README.md | 130 +++++++++--------- .../package.json | 23 ++-- .../rollup.config.js | 7 +- .../src/lUISAuthoringClient.ts | 12 +- .../src/lUISAuthoringClientContext.ts | 16 ++- .../src/models/appsMappers.ts | 7 +- .../src/models/azureAccountsMappers.ts | 5 +- .../src/models/examplesMappers.ts | 5 +- .../src/models/featuresMappers.ts | 5 +- .../src/models/index.ts | 15 +- .../src/models/mappers.ts | 5 +- .../src/models/modelMappers.ts | 5 +- .../src/models/parameters.ts | 17 ++- .../src/models/patternMappers.ts | 5 +- .../src/models/settingsMappers.ts | 5 +- .../src/models/trainMappers.ts | 5 +- .../src/models/versionsMappers.ts | 5 +- .../src/operations/apps.ts | 5 +- .../src/operations/azureAccounts.ts | 5 +- .../src/operations/examples.ts | 5 +- .../src/operations/features.ts | 5 +- .../src/operations/index.ts | 5 +- .../src/operations/model.ts | 5 +- .../src/operations/pattern.ts | 5 +- .../src/operations/settings.ts | 5 +- .../src/operations/train.ts | 14 +- .../src/operations/versions.ts | 5 +- 28 files changed, 168 insertions(+), 165 deletions(-) diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/LICENSE.txt b/sdk/cognitiveservices/cognitiveservices-luis-authoring/LICENSE.txt index b73b4a1293c3..2d3163745319 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/LICENSE.txt +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2021 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 diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md b/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md index 7c5bfb93e503..81a5cb0f3502 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.md @@ -1,69 +1,72 @@ ## 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 +This package contains an isomorphic SDK (runs both in node.js and in browsers) for LUISAuthoringClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge and Firefox. + +### Prerequisites + +You must have an [Azure subscription](https://azure.microsoft.com/free/). -### How to Install +### How to install +To use this SDK in your project, you will need to install two packages. +- `@azure/cognitiveservices-luis-authoring` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/cognitiveservices-luis-authoring +npm install --save @azure/cognitiveservices-luis-authoring @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. ### How to use -#### nodejs - Authentication, client creation and listPhraseLists features as an example written in TypeScript. - -##### Install @azure/ms-rest-azure-js +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -```bash -npm install @azure/ms-rest-azure-js -``` +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. +#### nodejs - Authentication, client creation, and listPhraseLists features as an example written in JavaScript. ##### Sample code ```javascript -const { CognitiveServicesCredentials } = require("@azure/ms-rest-azure-js"); +const { DefaultAzureCredential } = require("@azure/identity"); 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 subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new LUISAuthoringClient(creds, subscriptionId); +const appId = ec7b1657-199d-4d8a-bbb2-89a11a42e02a; +const versionId = "testversionId"; 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); - }); +client.features.listPhraseLists(appId, versionId, skip, take).then((result) => { + console.log("The result is:"); + console.log(result); +}).catch((err) => { + console.log("An error occurred:"); + console.error(err); +}); ``` -#### browser - Authentication, client creation and listPhraseLists features as an example written in JavaScript. +#### browser - Authentication, client creation, and listPhraseLists features as an example written in JavaScript. +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code @@ -74,31 +77,28 @@ client.features @azure/cognitiveservices-luis-authoring sample - @@ -109,4 +109,4 @@ client.features - [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) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/cognitiveservices/cognitiveservices-luis-authoring/README.png) diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/package.json b/sdk/cognitiveservices/cognitiveservices-luis-authoring/package.json index 90a8146c7d0c..052a2d69ae92 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/package.json +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/package.json @@ -4,7 +4,8 @@ "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", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -19,20 +20,13 @@ "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", + "typescript": "^3.6.0", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.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" + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/main/sdk/cognitiveservices/cognitiveservices-luis-authoring", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/cognitiveservices/cognitiveservices-luis-authoring", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" @@ -57,8 +51,7 @@ "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" + "prepack": "npm install && npm run build" }, "sideEffects": false, "autoPublish": true diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/rollup.config.js b/sdk/cognitiveservices/cognitiveservices-luis-authoring/rollup.config.js index 25387e1c881a..b69df658f298 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/rollup.config.js +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/rollup.config.js @@ -21,10 +21,9 @@ const config = { "@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. - * + * 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. */` diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClient.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClient.ts index 6f42b8b56a1e..1906506a5dc0 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClient.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -31,9 +30,14 @@ class LUISAuthoringClient extends LUISAuthoringClientContext { * @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. + * Credentials implementing the TokenCredential interface from the @azure/identity package are + * recommended. For more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, endpoint: string, options?: msRest.ServiceClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, endpoint: string, options?: msRest.ServiceClientOptions) { super(credentials, endpoint, options); this.features = new operations.Features(this); this.examples = new operations.Examples(this); diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClientContext.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClientContext.ts index 52484b1a316e..227095787f82 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClientContext.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/lUISAuthoringClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -15,16 +14,21 @@ const packageVersion = "4.0.0-preview.3"; export class LUISAuthoringClientContext extends msRest.ServiceClient { endpoint: string; - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; /** * 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. + * Credentials implementing the TokenCredential interface from the @azure/identity package are + * recommended. For more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, endpoint: string, options?: msRest.ServiceClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, endpoint: string, options?: msRest.ServiceClientOptions) { if (endpoint == undefined) { throw new Error("'endpoint' cannot be null."); } @@ -43,7 +47,7 @@ export class LUISAuthoringClientContext extends msRest.ServiceClient { super(credentials, options); - this.baseUri = "{Endpoint}/luis/authoring/v3.0-preview"; + this.baseUri = "{Endpoint}/luis/authoring/v3.0"; 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 index 3ae7804c810a..f0243eeb6a7d 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/appsMappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/appsMappers.ts @@ -1,8 +1,7 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * + * 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. */ diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/azureAccountsMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/azureAccountsMappers.ts index 02170a2a2818..1b06e0513556 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/azureAccountsMappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/azureAccountsMappers.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/examplesMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/examplesMappers.ts index 8bd5c1ef50f1..bdae3b0ea13e 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/examplesMappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/examplesMappers.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/featuresMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/featuresMappers.ts index d58acc7b47f7..24fa9c555e9b 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/featuresMappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/featuresMappers.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/index.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/index.ts index 20bf040052e1..fdd71f960e53 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/index.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. @@ -2379,6 +2378,16 @@ export interface VersionsImportLuFormatOptionalParams extends msRest.RequestOpti versionId?: string; } +/** + * Optional Parameters. + */ +export interface TrainTrainVersionOptionalParams extends msRest.RequestOptionsBase { + /** + * An enum value specifying mode of training. + */ + mode?: string; +} + /** * Optional Parameters. */ diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/mappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/mappers.ts index eed8c3c2ea32..468aa3bf377f 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/mappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/mappers.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/modelMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/modelMappers.ts index f987ec4c95ab..38b46d722205 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/modelMappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/modelMappers.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/parameters.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/parameters.ts index 917c34b5492c..0b203d28e087 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/parameters.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -217,6 +216,18 @@ export const itemId: msRest.OperationURLParameter = { } } }; +export const mode: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "mode" + ], + mapper: { + serializedName: "mode", + type: { + name: "String" + } + } +}; export const modelId: msRest.OperationURLParameter = { parameterPath: "modelId", mapper: { diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/patternMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/patternMappers.ts index 778a7cb98895..3003a62cad84 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/patternMappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/patternMappers.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/settingsMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/settingsMappers.ts index d74e113055f1..b6edae782d27 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/settingsMappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/settingsMappers.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/trainMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/trainMappers.ts index 590e1033b18e..7d0be1b60941 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/trainMappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/trainMappers.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/versionsMappers.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/versionsMappers.ts index 2062726dc097..d21309f46b1a 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/versionsMappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/models/versionsMappers.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/apps.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/apps.ts index 7cec0c738a67..8cf8a9c08d3f 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/apps.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/apps.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/azureAccounts.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/azureAccounts.ts index 2fffd278dd2f..9b64c049df99 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/azureAccounts.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/azureAccounts.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/examples.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/examples.ts index 628db60409d5..811596774c03 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/examples.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/examples.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/features.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/features.ts index 3af65368a0fa..23093f748fbd 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/features.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/features.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/index.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/index.ts index 5d8f0ff7239e..fb742889c422 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/index.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/model.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/model.ts index 22317a290eb2..f8abf15edcdf 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/model.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/model.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/pattern.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/pattern.ts index 3ad7620eff42..f3503c88af6a 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/pattern.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/pattern.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/settings.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/settings.ts index d4d28d088bc1..1a6f0ce1f494 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/settings.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/settings.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/train.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/train.ts index 53d2c9848983..e47a370fefa1 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/train.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/train.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -37,7 +36,7 @@ export class Train { * @param [options] The optional parameters * @returns Promise */ - trainVersion(appId: string, versionId: string, options?: msRest.RequestOptionsBase): Promise; + trainVersion(appId: string, versionId: string, options?: Models.TrainTrainVersionOptionalParams): Promise; /** * @param appId The application ID. * @param versionId The version ID. @@ -50,8 +49,8 @@ export class Train { * @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 { + trainVersion(appId: string, versionId: string, options: Models.TrainTrainVersionOptionalParams, callback: msRest.ServiceCallback): void; + trainVersion(appId: string, versionId: string, options?: Models.TrainTrainVersionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { appId, @@ -108,6 +107,9 @@ const trainVersionOperationSpec: msRest.OperationSpec = { Parameters.appId, Parameters.versionId0 ], + queryParameters: [ + Parameters.mode + ], responses: { 202: { bodyMapper: Mappers.EnqueueTrainingResponse diff --git a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/versions.ts b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/versions.ts index 60b2c6ff4e9d..0cb55baecf9a 100644 --- a/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/versions.ts +++ b/sdk/cognitiveservices/cognitiveservices-luis-authoring/src/operations/versions.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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