-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated from 45eacf818eeb994fb2f61265c0c1a23bfce98782 (#2566)
Update the default tag for LUIS Runtime
- Loading branch information
1 parent
450db21
commit dbc81ed
Showing
11 changed files
with
1,129 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
sdk/cognitiveservices/cognitiveservices-luis-runtime/lib/lUISRuntimeClient.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for | ||
* 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(endpoint: string, credentials: msRest.ServiceClientCredentials, options?: msRest.ServiceClientOptions) { | ||
super(endpoint, credentials, options); | ||
this.prediction = new operations.PredictionOperations(this); | ||
} | ||
} | ||
|
||
// Operation Specifications | ||
|
||
export { | ||
LUISRuntimeClient, | ||
LUISRuntimeClientContext, | ||
Models as LUISRuntimeModels, | ||
Mappers as LUISRuntimeMappers | ||
}; | ||
export * from "./operations"; |
51 changes: 51 additions & 0 deletions
51
sdk/cognitiveservices/cognitiveservices-luis-runtime/lib/lUISRuntimeClientContext.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for | ||
* 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 = "2.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(endpoint: string, credentials: msRest.ServiceClientCredentials, options?: msRest.ServiceClientOptions) { | ||
if (endpoint === null || endpoint === undefined) { | ||
throw new Error('\'endpoint\' cannot be null.'); | ||
} | ||
if (credentials === null || 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}"; | ||
this.requestContentType = "application/json; charset=utf-8"; | ||
this.endpoint = endpoint; | ||
this.credentials = credentials; | ||
|
||
} | ||
} |
Oops, something went wrong.