This repository has been archived by the owner on May 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 566
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerate azure-cognitiveservices-luis-authoring package (#4693)
- Loading branch information
Showing
19 changed files
with
2,126 additions
and
103 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for | ||
// license information. | ||
// | ||
// Code generated by Microsoft (R) AutoRest Code Generator. | ||
// Changes may cause incorrect behavior and will be lost if the code is | ||
// regenerated. | ||
|
||
const resetColor = "\x1b[0m"; | ||
const brightColor = "\x1b[1m"; | ||
const highlightColor = "\x1b[31m"; | ||
|
||
try { | ||
const invisibleCharactersLength = resetColor.length + brightColor.length + highlightColor.length; | ||
|
||
const firstLine = `Active development of this SDK has been moved to ${highlightColor}@azure/cognitiveservices-luis-authoring${resetColor}${brightColor} package.`; | ||
const secondLine = "This package is in maintenance mode and will be deprecated in July 2018."; | ||
const thirdLine = "Visit https://aka.ms/azure-sdk-for-js-migration for more information."; | ||
|
||
const framePadding = 4; | ||
const adjustedFirstLineLength = firstLine.length - invisibleCharactersLength; | ||
const width = Math.max(adjustedFirstLineLength, secondLine.length, thirdLine.length) + framePadding; | ||
const getPaddingLength = (strLength) => width - strLength - framePadding; | ||
|
||
const firstLinePaddingLength = getPaddingLength(adjustedFirstLineLength); | ||
const secondLinePaddingLength = getPaddingLength(secondLine.length); | ||
const thirdLinePaddingLength = getPaddingLength(thirdLine.length); | ||
const line = "#".repeat(width); | ||
|
||
const formatTextLine = (text, padding) => `#${" ".repeat(Math.floor(padding / 2))} ${text} ${" ".repeat(Math.ceil(padding / 2))}#`; | ||
|
||
console.log(brightColor); | ||
console.log("\n" + line); | ||
console.log(formatTextLine(firstLine, firstLinePaddingLength)); | ||
console.log(formatTextLine(secondLine, secondLinePaddingLength)); | ||
console.log(formatTextLine(thirdLine, thirdLinePaddingLength)); | ||
console.log(line + "\n"); | ||
console.log(resetColor); | ||
} catch (err) { | ||
// ignore | ||
} |
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 |
---|---|---|
@@ -1,21 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2018 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. | ||
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. |
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 |
---|---|---|
@@ -1,48 +1,49 @@ | ||
--- | ||
uid: azure-cognitiveservices-luis-authoring | ||
summary: *content | ||
|
||
--- | ||
**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.** | ||
## Microsoft Azure SDK for Node.js - LUISAuthoringClient | ||
|
||
This project provides a Node.js package for accessing Azure. Right now it supports: | ||
- **Node.js version 6.x.x or higher** | ||
|
||
### Features | ||
|
||
|
||
### How to Install | ||
|
||
```bash | ||
npm install azure-cognitiveservices-luis-authoring | ||
``` | ||
|
||
### How to use | ||
|
||
#### Authentication, client creation, and listPhraseLists features as an example. | ||
|
||
```javascript | ||
const msRest = require("ms-rest"); | ||
const LUISAuthoringClient = require("azure-cognitiveservices-luis-authoring"); | ||
const token = "<access_token>"; | ||
const creds = new msRest.TokenCredentials(token); | ||
const subscriptionId = "<Subscription_Id>"; | ||
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.log('An error occurred:'); | ||
console.dir(err, {depth: null, colors: true}); | ||
}); | ||
``` | ||
|
||
### Related projects | ||
|
||
- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) | ||
--- | ||
uid: azure-cognitiveservices-luis-authoring | ||
summary: *content | ||
|
||
--- | ||
**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://www.npmjs.com/package/@azure/cognitiveservices-luis-authoring) which works on Node.js and browsers.** | ||
**See https://aka.ms/azure-sdk-for-js-migration to learn more.** | ||
## Microsoft Azure SDK for Node.js - LUISAuthoringClient | ||
|
||
This project provides a Node.js package for accessing Azure. Right now it supports: | ||
- **Node.js version 6.x.x or higher** | ||
|
||
### Features | ||
|
||
|
||
### How to Install | ||
|
||
```bash | ||
npm install azure-cognitiveservices-luis-authoring | ||
``` | ||
|
||
### How to use | ||
|
||
#### Authentication, client creation, and listPhraseLists features as an example. | ||
|
||
```javascript | ||
const msRest = require("ms-rest"); | ||
const LUISAuthoringClient = require("azure-cognitiveservices-luis-authoring"); | ||
const token = "<access_token>"; | ||
const creds = new msRest.TokenCredentials(token); | ||
const subscriptionId = "<Subscription_Id>"; | ||
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.log('An error occurred:'); | ||
console.dir(err, {depth: null, colors: true}); | ||
}); | ||
``` | ||
|
||
### Related projects | ||
|
||
- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) |
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
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
68 changes: 68 additions & 0 deletions
68
lib/services/luis/authoring/lib/models/azureAccountInfoObject.js
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,68 @@ | ||
/* | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for | ||
* license information. | ||
* | ||
* Code generated by Microsoft (R) AutoRest Code Generator. | ||
* Changes may cause incorrect behavior and will be lost if the code is | ||
* regenerated. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
/** | ||
* Defines the azure account information object. | ||
* | ||
*/ | ||
class AzureAccountInfoObject { | ||
/** | ||
* Create a AzureAccountInfoObject. | ||
* @property {string} azureSubscriptionId The id for the azure subscription. | ||
* @property {string} resourceGroup The azure resource group name. | ||
* @property {string} accountName The azure account name. | ||
*/ | ||
constructor() { | ||
} | ||
|
||
/** | ||
* Defines the metadata of AzureAccountInfoObject | ||
* | ||
* @returns {object} metadata of AzureAccountInfoObject | ||
* | ||
*/ | ||
mapper() { | ||
return { | ||
required: false, | ||
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' | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
} | ||
} | ||
|
||
module.exports = AzureAccountInfoObject; |
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
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
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
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
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
Oops, something went wrong.