From 55e1e6910d4ac5c3c270d55e5f48a9459f01b06e Mon Sep 17 00:00:00 2001 From: Kamil Pajdzik <41709775+kpajdzik@users.noreply.github.com> Date: Fri, 15 Feb 2019 15:34:36 -0800 Subject: [PATCH 1/6] Regenerate azure-cognitiveservices-luis-authoring package (#4693) --- .../luis/authoring/.scripts/postinstall.js | 41 + lib/services/luis/authoring/LICENSE.txt | 42 +- lib/services/luis/authoring/README.md | 97 +- .../authoring/lib/lUISAuthoringClient.d.ts | 1 + .../luis/authoring/lib/lUISAuthoringClient.js | 1 + .../lib/models/azureAccountInfoObject.js | 68 ++ .../luis/authoring/lib/models/endpointInfo.js | 8 + .../lib/models/exampleLabelObject.js | 4 +- .../luis/authoring/lib/models/index.d.ts | 30 +- .../luis/authoring/lib/models/index.js | 1 + .../models/productionOrStagingEndpointInfo.js | 7 + .../lib/models/publishSettingUpdateObject.js | 2 +- .../authoring/lib/models/publishSettings.js | 2 +- .../luis/authoring/lib/operations/apps.js | 465 +++++++- .../authoring/lib/operations/azureAccounts.js | 995 ++++++++++++++++++ .../luis/authoring/lib/operations/examples.js | 12 +- .../luis/authoring/lib/operations/index.d.ts | 445 +++++++- .../luis/authoring/lib/operations/index.js | 1 + lib/services/luis/authoring/package.json | 7 +- 19 files changed, 2126 insertions(+), 103 deletions(-) create mode 100644 lib/services/luis/authoring/.scripts/postinstall.js create mode 100644 lib/services/luis/authoring/lib/models/azureAccountInfoObject.js create mode 100644 lib/services/luis/authoring/lib/operations/azureAccounts.js diff --git a/lib/services/luis/authoring/.scripts/postinstall.js b/lib/services/luis/authoring/.scripts/postinstall.js new file mode 100644 index 0000000000..539f39a79d --- /dev/null +++ b/lib/services/luis/authoring/.scripts/postinstall.js @@ -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 +} diff --git a/lib/services/luis/authoring/LICENSE.txt b/lib/services/luis/authoring/LICENSE.txt index a70e8cf660..8f3d856145 100644 --- a/lib/services/luis/authoring/LICENSE.txt +++ b/lib/services/luis/authoring/LICENSE.txt @@ -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. diff --git a/lib/services/luis/authoring/README.md b/lib/services/luis/authoring/README.md index 94432e30af..97f3f639bb 100644 --- a/lib/services/luis/authoring/README.md +++ b/lib/services/luis/authoring/README.md @@ -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 = ""; -const creds = new msRest.TokenCredentials(token); -const subscriptionId = ""; -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 = ""; +const creds = new msRest.TokenCredentials(token); +const subscriptionId = ""; +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) diff --git a/lib/services/luis/authoring/lib/lUISAuthoringClient.d.ts b/lib/services/luis/authoring/lib/lUISAuthoringClient.d.ts index 016adef630..0cd61d5b41 100644 --- a/lib/services/luis/authoring/lib/lUISAuthoringClient.d.ts +++ b/lib/services/luis/authoring/lib/lUISAuthoringClient.d.ts @@ -48,6 +48,7 @@ export default class LUISAuthoringClient extends ServiceClient { permissions: operations.Permissions; pattern: operations.Pattern; settings: operations.Settings; + azureAccounts: operations.AzureAccounts; } export { LUISAuthoringClient, models as LUISAuthoringModels }; diff --git a/lib/services/luis/authoring/lib/lUISAuthoringClient.js b/lib/services/luis/authoring/lib/lUISAuthoringClient.js index ada27b1c25..f2a5adc93a 100644 --- a/lib/services/luis/authoring/lib/lUISAuthoringClient.js +++ b/lib/services/luis/authoring/lib/lUISAuthoringClient.js @@ -60,6 +60,7 @@ class LUISAuthoringClient extends ServiceClient { this.permissions = new operations.Permissions(this); this.pattern = new operations.Pattern(this); this.settings = new operations.Settings(this); + this.azureAccounts = new operations.AzureAccounts(this); this.models = models; msRest.addSerializationMixin(this); } diff --git a/lib/services/luis/authoring/lib/models/azureAccountInfoObject.js b/lib/services/luis/authoring/lib/models/azureAccountInfoObject.js new file mode 100644 index 0000000000..423feb78a3 --- /dev/null +++ b/lib/services/luis/authoring/lib/models/azureAccountInfoObject.js @@ -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; diff --git a/lib/services/luis/authoring/lib/models/endpointInfo.js b/lib/services/luis/authoring/lib/models/endpointInfo.js index 1adc49815f..b297b86e6d 100644 --- a/lib/services/luis/authoring/lib/models/endpointInfo.js +++ b/lib/services/luis/authoring/lib/models/endpointInfo.js @@ -26,6 +26,7 @@ class EndpointInfo { * published to. * @property {string} [assignedEndpointKey] The endpoint key. * @property {string} [endpointRegion] The endpoint's region. + * @property {string} [failedRegions] Regions where publishing failed. * @property {string} [publishedDateTime] Timestamp when was last published. */ constructor() { @@ -87,6 +88,13 @@ class EndpointInfo { name: 'String' } }, + failedRegions: { + required: false, + serializedName: 'failedRegions', + type: { + name: 'String' + } + }, publishedDateTime: { required: false, serializedName: 'publishedDateTime', diff --git a/lib/services/luis/authoring/lib/models/exampleLabelObject.js b/lib/services/luis/authoring/lib/models/exampleLabelObject.js index f7027e948c..5794f1c8d5 100644 --- a/lib/services/luis/authoring/lib/models/exampleLabelObject.js +++ b/lib/services/luis/authoring/lib/models/exampleLabelObject.js @@ -18,9 +18,9 @@ class ExampleLabelObject { /** * Create a ExampleLabelObject. * @property {string} [text] The sample's utterance. - * @property {array} [entityLabels] The idenfied entities within the + * @property {array} [entityLabels] The identified entities within the * utterance. - * @property {string} [intentName] The idenfitied intent representing the + * @property {string} [intentName] The identified intent representing the * utterance. */ constructor() { diff --git a/lib/services/luis/authoring/lib/models/index.d.ts b/lib/services/luis/authoring/lib/models/index.d.ts index 6e54d47206..3bad6fe75e 100644 --- a/lib/services/luis/authoring/lib/models/index.d.ts +++ b/lib/services/luis/authoring/lib/models/index.d.ts @@ -160,7 +160,7 @@ export interface ApplicationSettingUpdateObject { export interface PublishSettingUpdateObject { /** * Setting sentiment analysis as true returns the Sentiment of the input utterance along with the - * resopnse + * response */ sentimentAnalysis?: boolean; /** @@ -182,11 +182,11 @@ export interface ExampleLabelObject { */ text?: string; /** - * The idenfied entities within the utterance. + * The identified entities within the utterance. */ entityLabels?: EntityLabelObject[]; /** - * The idenfitied intent representing the utterance. + * The identified intent representing the utterance. */ intentName?: string; } @@ -1334,6 +1334,10 @@ export interface EndpointInfo { * The endpoint's region. */ endpointRegion?: string; + /** + * Regions where publishing failed. + */ + failedRegions?: string; /** * Timestamp when was last published. */ @@ -1382,7 +1386,7 @@ export interface PublishSettings { id: string; /** * Setting sentiment analysis as true returns the Sentiment of the input utterance along with the - * resopnse + * response */ isSentimentAnalysisEnabled: boolean; /** @@ -1757,6 +1761,24 @@ export interface AppVersionSettingObject { 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; +} + export interface HierarchicalChildModelUpdateObject { name?: string; } diff --git a/lib/services/luis/authoring/lib/models/index.js b/lib/services/luis/authoring/lib/models/index.js index 2063beae51..0054ec81d6 100644 --- a/lib/services/luis/authoring/lib/models/index.js +++ b/lib/services/luis/authoring/lib/models/index.js @@ -113,6 +113,7 @@ exports.PatternAnyEntityExtractor = require('./patternAnyEntityExtractor'); exports.PatternRuleInfo = require('./patternRuleInfo'); exports.LabelTextObject = require('./labelTextObject'); exports.AppVersionSettingObject = require('./appVersionSettingObject'); +exports.AzureAccountInfoObject = require('./azureAccountInfoObject'); exports.HierarchicalChildModelUpdateObject = require('./hierarchicalChildModelUpdateObject'); exports.HierarchicalChildModelCreateObject = require('./hierarchicalChildModelCreateObject'); exports.CompositeChildModelCreateObject = require('./compositeChildModelCreateObject'); diff --git a/lib/services/luis/authoring/lib/models/productionOrStagingEndpointInfo.js b/lib/services/luis/authoring/lib/models/productionOrStagingEndpointInfo.js index dbabb69efc..ec3740b9a0 100644 --- a/lib/services/luis/authoring/lib/models/productionOrStagingEndpointInfo.js +++ b/lib/services/luis/authoring/lib/models/productionOrStagingEndpointInfo.js @@ -80,6 +80,13 @@ class ProductionOrStagingEndpointInfo extends models['EndpointInfo'] { name: 'String' } }, + failedRegions: { + required: false, + serializedName: 'failedRegions', + type: { + name: 'String' + } + }, publishedDateTime: { required: false, serializedName: 'publishedDateTime', diff --git a/lib/services/luis/authoring/lib/models/publishSettingUpdateObject.js b/lib/services/luis/authoring/lib/models/publishSettingUpdateObject.js index 6deca9104c..6afaa8f01e 100644 --- a/lib/services/luis/authoring/lib/models/publishSettingUpdateObject.js +++ b/lib/services/luis/authoring/lib/models/publishSettingUpdateObject.js @@ -18,7 +18,7 @@ class PublishSettingUpdateObject { /** * Create a PublishSettingUpdateObject. * @property {boolean} [sentimentAnalysis] Setting sentiment analysis as true - * returns the Sentiment of the input utterance along with the resopnse + * returns the Sentiment of the input utterance along with the response * @property {boolean} [speech] Setting speech as public enables speech * priming in your app * @property {boolean} [spellChecker] Setting spell checker as public enables diff --git a/lib/services/luis/authoring/lib/models/publishSettings.js b/lib/services/luis/authoring/lib/models/publishSettings.js index 45f0fa30e0..2af4911173 100644 --- a/lib/services/luis/authoring/lib/models/publishSettings.js +++ b/lib/services/luis/authoring/lib/models/publishSettings.js @@ -20,7 +20,7 @@ class PublishSettings { * @property {uuid} id The application ID. * @property {boolean} isSentimentAnalysisEnabled Setting sentiment analysis * as true returns the Sentiment of the input utterance along with the - * resopnse + * response * @property {boolean} isSpeechEnabled Setting speech as public enables * speech priming in your app * @property {boolean} isSpellCheckerEnabled Setting spell checker as public diff --git a/lib/services/luis/authoring/lib/operations/apps.js b/lib/services/luis/authoring/lib/operations/apps.js index 4c43862aeb..94bf56443a 100644 --- a/lib/services/luis/authoring/lib/operations/apps.js +++ b/lib/services/luis/authoring/lib/operations/apps.js @@ -349,7 +349,7 @@ function _list(options, callback) { /** * Imports an application to LUIS, the application's structure should be - * included in in the request body. + * included in the request body. * * @param {object} luisApp A LUIS application structure. * @@ -1422,6 +1422,9 @@ function _update(appId, applicationUpdateObject, options, callback) { * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.force] A flag to indicate whether to force an + * operation. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1448,6 +1451,7 @@ function _deleteMethod(appId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let force = (options && options.force !== undefined) ? options.force : false; // Validate try { if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { @@ -1456,6 +1460,9 @@ function _deleteMethod(appId, options, callback) { if (appId === null || appId === undefined || typeof appId.valueOf() !== 'string' || !msRest.isValidUuid(appId)) { throw new Error('appId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } + if (force !== null && force !== undefined && typeof force !== 'boolean') { + throw new Error('force must be of type boolean.'); + } } catch (error) { return callback(error); } @@ -1465,6 +1472,13 @@ function _deleteMethod(appId, options, callback) { let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'apps/{appId}'; requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); requestUrl = requestUrl.replace('{appId}', encodeURIComponent(appId.toString())); + let queryParameters = []; + if (force !== null && force !== undefined) { + queryParameters.push('force=' + encodeURIComponent(force.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); @@ -1637,7 +1651,7 @@ function _publish(appId, applicationPublishObject, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201) { + if (statusCode !== 201 && statusCode !== 207) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1683,6 +1697,23 @@ function _publish(appId, applicationPublishObject, options, callback) { return callback(deserializationError); } } + // Deserialize Response + if (statusCode === 207) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ProductionOrStagingEndpointInfo']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } return callback(null, result, httpRequest, response); }); @@ -2091,7 +2122,7 @@ function _getPublishSettings(appId, options, callback) { * * @param {boolean} [publishSettingUpdateObject.sentimentAnalysis] Setting * sentiment analysis as true returns the Sentiment of the input utterance - * along with the resopnse + * along with the response * * @param {boolean} [publishSettingUpdateObject.speech] Setting speech as * public enables speech priming in your app @@ -2782,6 +2813,236 @@ function _listAvailableCustomPrebuiltDomainsForCulture(culture, options, callbac }); } +/** + * @summary package - Gets published LUIS application package in binary stream + * GZip format + * + * Packages published LUIS application as GZip. + * + * @param {uuid} appId The application ID. + * + * @param {uuid} slotName The publishing slot name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _packagePublishedApplicationAsGzip(appId, slotName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } + if (appId === null || appId === undefined || typeof appId.valueOf() !== 'string' || !msRest.isValidUuid(appId)) { + throw new Error('appId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (slotName === null || slotName === undefined || typeof slotName.valueOf() !== 'string' || !msRest.isValidUuid(slotName)) { + throw new Error('slotName cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'package/{appId}/slot/{slotName}/gzip'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); + requestUrl = requestUrl.replace('{appId}', encodeURIComponent(appId.toString())); + requestUrl = requestUrl.replace('{slotName}', encodeURIComponent(slotName.toString())); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + httpRequest.streamedResponse = true; + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(`Unexpected status code: ${statusCode}`); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + if (responseBody !== undefined) parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + + // Create Result + let result = response; + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary package - Gets trained LUIS application package in binary stream + * GZip format + * + * Packages trained LUIS application as GZip. + * + * @param {uuid} appId The application ID. + * + * @param {string} versionId The version ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _packageTrainedApplicationAsGzip(appId, versionId, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } + if (appId === null || appId === undefined || typeof appId.valueOf() !== 'string' || !msRest.isValidUuid(appId)) { + throw new Error('appId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (versionId === null || versionId === undefined || typeof versionId.valueOf() !== 'string') { + throw new Error('versionId cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'package/{appId}/versions/{versionId}/gzip'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); + requestUrl = requestUrl.replace('{appId}', encodeURIComponent(appId.toString())); + requestUrl = requestUrl.replace('{versionId}', encodeURIComponent(versionId)); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + httpRequest.streamedResponse = true; + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(`Unexpected status code: ${statusCode}`); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + if (responseBody !== undefined) parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + + // Create Result + let result = response; + return callback(null, result, httpRequest, response); + }); +} + /** Class representing a Apps. */ class Apps { /** @@ -2810,6 +3071,8 @@ class Apps { this._listAvailableCustomPrebuiltDomains = _listAvailableCustomPrebuiltDomains; this._addCustomPrebuiltDomain = _addCustomPrebuiltDomain; this._listAvailableCustomPrebuiltDomainsForCulture = _listAvailableCustomPrebuiltDomainsForCulture; + this._packagePublishedApplicationAsGzip = _packagePublishedApplicationAsGzip; + this._packageTrainedApplicationAsGzip = _packageTrainedApplicationAsGzip; } /** @@ -3030,7 +3293,7 @@ class Apps { /** * Imports an application to LUIS, the application's structure should be - * included in in the request body. + * included in the request body. * * @param {object} luisApp A LUIS application structure. * @@ -3096,7 +3359,7 @@ class Apps { /** * Imports an application to LUIS, the application's structure should be - * included in in the request body. + * included in the request body. * * @param {object} luisApp A LUIS application structure. * @@ -3760,6 +4023,9 @@ class Apps { * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.force] A flag to indicate whether to force an + * operation. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -3790,6 +4056,9 @@ class Apps { * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.force] A flag to indicate whether to force an + * operation. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -4206,7 +4475,7 @@ class Apps { * * @param {boolean} [publishSettingUpdateObject.sentimentAnalysis] Setting * sentiment analysis as true returns the Sentiment of the input utterance - * along with the resopnse + * along with the response * * @param {boolean} [publishSettingUpdateObject.speech] Setting speech as * public enables speech priming in your app @@ -4249,7 +4518,7 @@ class Apps { * * @param {boolean} [publishSettingUpdateObject.sentimentAnalysis] Setting * sentiment analysis as true returns the Sentiment of the input utterance - * along with the resopnse + * along with the response * * @param {boolean} [publishSettingUpdateObject.speech] Setting speech as * public enables speech priming in your app @@ -4636,6 +4905,188 @@ class Apps { } } + /** + * @summary package - Gets published LUIS application package in binary stream + * GZip format + * + * Packages published LUIS application as GZip. + * + * @param {uuid} appId The application ID. + * + * @param {uuid} slotName The publishing slot name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + packagePublishedApplicationAsGzipWithHttpOperationResponse(appId, slotName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._packagePublishedApplicationAsGzip(appId, slotName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary package - Gets published LUIS application package in binary stream + * GZip format + * + * Packages published LUIS application as GZip. + * + * @param {uuid} appId The application ID. + * + * @param {uuid} slotName The publishing slot name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Object} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + packagePublishedApplicationAsGzip(appId, slotName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._packagePublishedApplicationAsGzip(appId, slotName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._packagePublishedApplicationAsGzip(appId, slotName, options, optionalCallback); + } + } + + /** + * @summary package - Gets trained LUIS application package in binary stream + * GZip format + * + * Packages trained LUIS application as GZip. + * + * @param {uuid} appId The application ID. + * + * @param {string} versionId The version ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + packageTrainedApplicationAsGzipWithHttpOperationResponse(appId, versionId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._packageTrainedApplicationAsGzip(appId, versionId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary package - Gets trained LUIS application package in binary stream + * GZip format + * + * Packages trained LUIS application as GZip. + * + * @param {uuid} appId The application ID. + * + * @param {string} versionId The version ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Object} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + packageTrainedApplicationAsGzip(appId, versionId, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._packageTrainedApplicationAsGzip(appId, versionId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._packageTrainedApplicationAsGzip(appId, versionId, options, optionalCallback); + } + } + } module.exports = Apps; diff --git a/lib/services/luis/authoring/lib/operations/azureAccounts.js b/lib/services/luis/authoring/lib/operations/azureAccounts.js new file mode 100644 index 0000000000..c4c85f6166 --- /dev/null +++ b/lib/services/luis/authoring/lib/operations/azureAccounts.js @@ -0,0 +1,995 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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'; + +const msRest = require('ms-rest'); +const WebResource = msRest.WebResource; + +/** + * @summary apps - Assign a LUIS azure account to an application + * + * Assigns an azure account to the application. + * + * @param {uuid} appId The application ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.azureAccountInfoObject] The azure account + * information object. + * + * @param {string} options.azureAccountInfoObject.azureSubscriptionId The id + * for the azure subscription. + * + * @param {string} options.azureAccountInfoObject.resourceGroup The azure + * resource group name. + * + * @param {string} options.azureAccountInfoObject.accountName The azure account + * name. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatus} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _assignToApp(appId, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let azureAccountInfoObject = (options && options.azureAccountInfoObject !== undefined) ? options.azureAccountInfoObject : undefined; + // Validate + try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } + if (appId === null || appId === undefined || typeof appId.valueOf() !== 'string' || !msRest.isValidUuid(appId)) { + throw new Error('appId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'apps/{appId}/azureaccounts'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); + requestUrl = requestUrl.replace('{appId}', encodeURIComponent(appId.toString())); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (azureAccountInfoObject !== null && azureAccountInfoObject !== undefined) { + let requestModelMapper = new client.models['AzureAccountInfoObject']().mapper(); + requestModel = client.serialize(requestModelMapper, azureAccountInfoObject, 'azureAccountInfoObject'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(azureAccountInfoObject, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 201) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['OperationStatus']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary apps - Get LUIS azure accounts assigned to the application + * + * Gets the LUIS azure accounts assigned to the application for the user using + * his ARM token. + * + * @param {uuid} appId The application ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getAssigned(appId, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } + if (appId === null || appId === undefined || typeof appId.valueOf() !== 'string' || !msRest.isValidUuid(appId)) { + throw new Error('appId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'apps/{appId}/azureaccounts'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); + requestUrl = requestUrl.replace('{appId}', encodeURIComponent(appId.toString())); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AzureAccountInfoObjectElementType', + type: { + name: 'Composite', + className: 'AzureAccountInfoObject' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary apps - Removes an assigned LUIS azure account from an application + * + * Removes assigned azure account from the application. + * + * @param {uuid} appId The application ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.azureAccountInfoObject] The azure account + * information object. + * + * @param {string} options.azureAccountInfoObject.azureSubscriptionId The id + * for the azure subscription. + * + * @param {string} options.azureAccountInfoObject.resourceGroup The azure + * resource group name. + * + * @param {string} options.azureAccountInfoObject.accountName The azure account + * name. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatus} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _removeFromApp(appId, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let azureAccountInfoObject = (options && options.azureAccountInfoObject !== undefined) ? options.azureAccountInfoObject : undefined; + // Validate + try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } + if (appId === null || appId === undefined || typeof appId.valueOf() !== 'string' || !msRest.isValidUuid(appId)) { + throw new Error('appId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'apps/{appId}/azureaccounts'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); + requestUrl = requestUrl.replace('{appId}', encodeURIComponent(appId.toString())); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (azureAccountInfoObject !== null && azureAccountInfoObject !== undefined) { + let requestModelMapper = new client.models['AzureAccountInfoObject']().mapper(); + requestModel = client.serialize(requestModelMapper, azureAccountInfoObject, 'azureAccountInfoObject'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(azureAccountInfoObject, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['OperationStatus']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary user - Get LUIS azure accounts + * + * Gets the LUIS azure accounts for the user using his ARM token. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getUserLUISAccounts(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'azureaccounts'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AzureAccountInfoObjectElementType', + type: { + name: 'Composite', + className: 'AzureAccountInfoObject' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a AzureAccounts. */ +class AzureAccounts { + /** + * Create a AzureAccounts. + * @param {LUISAuthoringClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._assignToApp = _assignToApp; + this._getAssigned = _getAssigned; + this._removeFromApp = _removeFromApp; + this._getUserLUISAccounts = _getUserLUISAccounts; + } + + /** + * @summary apps - Assign a LUIS azure account to an application + * + * Assigns an azure account to the application. + * + * @param {uuid} appId The application ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.azureAccountInfoObject] The azure account + * information object. + * + * @param {string} options.azureAccountInfoObject.azureSubscriptionId The id + * for the azure subscription. + * + * @param {string} options.azureAccountInfoObject.resourceGroup The azure + * resource group name. + * + * @param {string} options.azureAccountInfoObject.accountName The azure account + * name. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + assignToAppWithHttpOperationResponse(appId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._assignToApp(appId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary apps - Assign a LUIS azure account to an application + * + * Assigns an azure account to the application. + * + * @param {uuid} appId The application ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.azureAccountInfoObject] The azure account + * information object. + * + * @param {string} options.azureAccountInfoObject.azureSubscriptionId The id + * for the azure subscription. + * + * @param {string} options.azureAccountInfoObject.resourceGroup The azure + * resource group name. + * + * @param {string} options.azureAccountInfoObject.accountName The azure account + * name. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {OperationStatus} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatus} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + assignToApp(appId, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._assignToApp(appId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._assignToApp(appId, options, optionalCallback); + } + } + + /** + * @summary apps - Get LUIS azure accounts assigned to the application + * + * Gets the LUIS azure accounts assigned to the application for the user using + * his ARM token. + * + * @param {uuid} appId The application ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getAssignedWithHttpOperationResponse(appId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getAssigned(appId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary apps - Get LUIS azure accounts assigned to the application + * + * Gets the LUIS azure accounts assigned to the application for the user using + * his ARM token. + * + * @param {uuid} appId The application ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Array} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getAssigned(appId, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getAssigned(appId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getAssigned(appId, options, optionalCallback); + } + } + + /** + * @summary apps - Removes an assigned LUIS azure account from an application + * + * Removes assigned azure account from the application. + * + * @param {uuid} appId The application ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.azureAccountInfoObject] The azure account + * information object. + * + * @param {string} options.azureAccountInfoObject.azureSubscriptionId The id + * for the azure subscription. + * + * @param {string} options.azureAccountInfoObject.resourceGroup The azure + * resource group name. + * + * @param {string} options.azureAccountInfoObject.accountName The azure account + * name. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + removeFromAppWithHttpOperationResponse(appId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._removeFromApp(appId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary apps - Removes an assigned LUIS azure account from an application + * + * Removes assigned azure account from the application. + * + * @param {uuid} appId The application ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.azureAccountInfoObject] The azure account + * information object. + * + * @param {string} options.azureAccountInfoObject.azureSubscriptionId The id + * for the azure subscription. + * + * @param {string} options.azureAccountInfoObject.resourceGroup The azure + * resource group name. + * + * @param {string} options.azureAccountInfoObject.accountName The azure account + * name. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {OperationStatus} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatus} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + removeFromApp(appId, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._removeFromApp(appId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._removeFromApp(appId, options, optionalCallback); + } + } + + /** + * @summary user - Get LUIS azure accounts + * + * Gets the LUIS azure accounts for the user using his ARM token. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getUserLUISAccountsWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getUserLUISAccounts(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary user - Get LUIS azure accounts + * + * Gets the LUIS azure accounts for the user using his ARM token. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Array} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getUserLUISAccounts(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getUserLUISAccounts(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getUserLUISAccounts(options, optionalCallback); + } + } + +} + +module.exports = AzureAccounts; diff --git a/lib/services/luis/authoring/lib/operations/examples.js b/lib/services/luis/authoring/lib/operations/examples.js index a2775d143d..43e6ed39c1 100644 --- a/lib/services/luis/authoring/lib/operations/examples.js +++ b/lib/services/luis/authoring/lib/operations/examples.js @@ -25,10 +25,10 @@ const WebResource = msRest.WebResource; * * @param {string} [exampleLabelObject.text] The sample's utterance. * - * @param {array} [exampleLabelObject.entityLabels] The idenfied entities + * @param {array} [exampleLabelObject.entityLabels] The identified entities * within the utterance. * - * @param {string} [exampleLabelObject.intentName] The idenfitied intent + * @param {string} [exampleLabelObject.intentName] The identified intent * representing the utterance. * * @param {object} [options] Optional Parameters. @@ -716,10 +716,10 @@ class Examples { * * @param {string} [exampleLabelObject.text] The sample's utterance. * - * @param {array} [exampleLabelObject.entityLabels] The idenfied entities + * @param {array} [exampleLabelObject.entityLabels] The identified entities * within the utterance. * - * @param {string} [exampleLabelObject.intentName] The idenfitied intent + * @param {string} [exampleLabelObject.intentName] The identified intent * representing the utterance. * * @param {object} [options] Optional Parameters. @@ -759,10 +759,10 @@ class Examples { * * @param {string} [exampleLabelObject.text] The sample's utterance. * - * @param {array} [exampleLabelObject.entityLabels] The idenfied entities + * @param {array} [exampleLabelObject.entityLabels] The identified entities * within the utterance. * - * @param {string} [exampleLabelObject.intentName] The idenfitied intent + * @param {string} [exampleLabelObject.intentName] The identified intent * representing the utterance. * * @param {object} [options] Optional Parameters. diff --git a/lib/services/luis/authoring/lib/operations/index.d.ts b/lib/services/luis/authoring/lib/operations/index.d.ts index 5318661967..73414afd2f 100644 --- a/lib/services/luis/authoring/lib/operations/index.d.ts +++ b/lib/services/luis/authoring/lib/operations/index.d.ts @@ -524,10 +524,10 @@ export interface Examples { * * @param {string} [exampleLabelObject.text] The sample's utterance. * - * @param {array} [exampleLabelObject.entityLabels] The idenfied entities + * @param {array} [exampleLabelObject.entityLabels] The identified entities * within the utterance. * - * @param {string} [exampleLabelObject.intentName] The idenfitied intent + * @param {string} [exampleLabelObject.intentName] The identified intent * representing the utterance. * * @param {object} [options] Optional Parameters. @@ -555,10 +555,10 @@ export interface Examples { * * @param {string} [exampleLabelObject.text] The sample's utterance. * - * @param {array} [exampleLabelObject.entityLabels] The idenfied entities + * @param {array} [exampleLabelObject.entityLabels] The identified entities * within the utterance. * - * @param {string} [exampleLabelObject.intentName] The idenfitied intent + * @param {string} [exampleLabelObject.intentName] The identified intent * representing the utterance. * * @param {object} [options] Optional Parameters. @@ -8264,7 +8264,7 @@ export interface Apps { /** * Imports an application to LUIS, the application's structure should be - * included in in the request body. + * included in the request body. * * @param {object} luisApp A LUIS application structure. * @@ -8318,7 +8318,7 @@ export interface Apps { /** * Imports an application to LUIS, the application's structure should be - * included in in the request body. + * included in the request body. * * @param {object} luisApp A LUIS application structure. * @@ -8778,6 +8778,9 @@ export interface Apps { * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.force] A flag to indicate whether to force an + * operation. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -8787,7 +8790,7 @@ export interface Apps { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(appId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(appId: string, options?: { force? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes an application. @@ -8796,6 +8799,9 @@ export interface Apps { * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.force] A flag to indicate whether to force an + * operation. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -8821,9 +8827,9 @@ export interface Apps { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(appId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(appId: string, options?: { force? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; deleteMethod(appId: string, callback: ServiceCallback): void; - deleteMethod(appId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(appId: string, options: { force? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -9089,7 +9095,7 @@ export interface Apps { * * @param {boolean} [publishSettingUpdateObject.sentimentAnalysis] Setting * sentiment analysis as true returns the Sentiment of the input utterance - * along with the resopnse + * along with the response * * @param {boolean} [publishSettingUpdateObject.speech] Setting speech as * public enables speech priming in your app @@ -9120,7 +9126,7 @@ export interface Apps { * * @param {boolean} [publishSettingUpdateObject.sentimentAnalysis] Setting * sentiment analysis as true returns the Sentiment of the input utterance - * along with the resopnse + * along with the response * * @param {boolean} [publishSettingUpdateObject.speech] Setting speech as * public enables speech priming in your app @@ -9382,6 +9388,134 @@ export interface Apps { listAvailableCustomPrebuiltDomainsForCulture(culture: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; listAvailableCustomPrebuiltDomainsForCulture(culture: string, callback: ServiceCallback): void; listAvailableCustomPrebuiltDomainsForCulture(culture: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary package - Gets published LUIS application package in binary stream + * GZip format + * + * Packages published LUIS application as GZip. + * + * @param {uuid} appId The application ID. + * + * @param {uuid} slotName The publishing slot name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + packagePublishedApplicationAsGzipWithHttpOperationResponse(appId: string, slotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary package - Gets published LUIS application package in binary stream + * GZip format + * + * Packages published LUIS application as GZip. + * + * @param {uuid} appId The application ID. + * + * @param {uuid} slotName The publishing slot name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Object} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Object} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + packagePublishedApplicationAsGzip(appId: string, slotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + packagePublishedApplicationAsGzip(appId: string, slotName: string, callback: ServiceCallback): void; + packagePublishedApplicationAsGzip(appId: string, slotName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary package - Gets trained LUIS application package in binary stream + * GZip format + * + * Packages trained LUIS application as GZip. + * + * @param {uuid} appId The application ID. + * + * @param {string} versionId The version ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + packageTrainedApplicationAsGzipWithHttpOperationResponse(appId: string, versionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary package - Gets trained LUIS application package in binary stream + * GZip format + * + * Packages trained LUIS application as GZip. + * + * @param {uuid} appId The application ID. + * + * @param {string} versionId The version ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Object} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Object} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + packageTrainedApplicationAsGzip(appId: string, versionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + packageTrainedApplicationAsGzip(appId: string, versionId: string, callback: ServiceCallback): void; + packageTrainedApplicationAsGzip(appId: string, versionId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -11080,3 +11214,292 @@ export interface Settings { update(appId: string, versionId: string, listOfAppVersionSettingObject: models.AppVersionSettingObject, callback: ServiceCallback): void; update(appId: string, versionId: string, listOfAppVersionSettingObject: models.AppVersionSettingObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } + +/** + * @class + * AzureAccounts + * __NOTE__: An instance of this class is automatically created for an + * instance of the LUISAuthoringClient. + */ +export interface AzureAccounts { + + + /** + * @summary apps - Assign a LUIS azure account to an application + * + * Assigns an azure account to the application. + * + * @param {uuid} appId The application ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.azureAccountInfoObject] The azure account + * information object. + * + * @param {string} options.azureAccountInfoObject.azureSubscriptionId The id + * for the azure subscription. + * + * @param {string} options.azureAccountInfoObject.resourceGroup The azure + * resource group name. + * + * @param {string} options.azureAccountInfoObject.accountName The azure account + * name. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + assignToAppWithHttpOperationResponse(appId: string, options?: { azureAccountInfoObject? : models.AzureAccountInfoObject, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary apps - Assign a LUIS azure account to an application + * + * Assigns an azure account to the application. + * + * @param {uuid} appId The application ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.azureAccountInfoObject] The azure account + * information object. + * + * @param {string} options.azureAccountInfoObject.azureSubscriptionId The id + * for the azure subscription. + * + * @param {string} options.azureAccountInfoObject.resourceGroup The azure + * resource group name. + * + * @param {string} options.azureAccountInfoObject.accountName The azure account + * name. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {OperationStatus} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {OperationStatus} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatus} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + assignToApp(appId: string, options?: { azureAccountInfoObject? : models.AzureAccountInfoObject, customHeaders? : { [headerName: string]: string; } }): Promise; + assignToApp(appId: string, callback: ServiceCallback): void; + assignToApp(appId: string, options: { azureAccountInfoObject? : models.AzureAccountInfoObject, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary apps - Get LUIS azure accounts assigned to the application + * + * Gets the LUIS azure accounts assigned to the application for the user using + * his ARM token. + * + * @param {uuid} appId The application ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getAssignedWithHttpOperationResponse(appId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary apps - Get LUIS azure accounts assigned to the application + * + * Gets the LUIS azure accounts assigned to the application for the user using + * his ARM token. + * + * @param {uuid} appId The application ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Array} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Array} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getAssigned(appId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getAssigned(appId: string, callback: ServiceCallback): void; + getAssigned(appId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary apps - Removes an assigned LUIS azure account from an application + * + * Removes assigned azure account from the application. + * + * @param {uuid} appId The application ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.azureAccountInfoObject] The azure account + * information object. + * + * @param {string} options.azureAccountInfoObject.azureSubscriptionId The id + * for the azure subscription. + * + * @param {string} options.azureAccountInfoObject.resourceGroup The azure + * resource group name. + * + * @param {string} options.azureAccountInfoObject.accountName The azure account + * name. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + removeFromAppWithHttpOperationResponse(appId: string, options?: { azureAccountInfoObject? : models.AzureAccountInfoObject, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary apps - Removes an assigned LUIS azure account from an application + * + * Removes assigned azure account from the application. + * + * @param {uuid} appId The application ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.azureAccountInfoObject] The azure account + * information object. + * + * @param {string} options.azureAccountInfoObject.azureSubscriptionId The id + * for the azure subscription. + * + * @param {string} options.azureAccountInfoObject.resourceGroup The azure + * resource group name. + * + * @param {string} options.azureAccountInfoObject.accountName The azure account + * name. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {OperationStatus} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {OperationStatus} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatus} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + removeFromApp(appId: string, options?: { azureAccountInfoObject? : models.AzureAccountInfoObject, customHeaders? : { [headerName: string]: string; } }): Promise; + removeFromApp(appId: string, callback: ServiceCallback): void; + removeFromApp(appId: string, options: { azureAccountInfoObject? : models.AzureAccountInfoObject, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary user - Get LUIS azure accounts + * + * Gets the LUIS azure accounts for the user using his ARM token. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getUserLUISAccountsWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary user - Get LUIS azure accounts + * + * Gets the LUIS azure accounts for the user using his ARM token. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Array} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Array} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getUserLUISAccounts(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getUserLUISAccounts(callback: ServiceCallback): void; + getUserLUISAccounts(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} diff --git a/lib/services/luis/authoring/lib/operations/index.js b/lib/services/luis/authoring/lib/operations/index.js index 3cefaa62cb..f19b125d25 100644 --- a/lib/services/luis/authoring/lib/operations/index.js +++ b/lib/services/luis/authoring/lib/operations/index.js @@ -23,3 +23,4 @@ exports.Train = require('./train'); exports.Permissions = require('./permissions'); exports.Pattern = require('./pattern'); exports.Settings = require('./settings'); +exports.AzureAccounts = require('./azureAccounts'); diff --git a/lib/services/luis/authoring/package.json b/lib/services/luis/authoring/package.json index 42f2b42fbc..6b790e1478 100644 --- a/lib/services/luis/authoring/package.json +++ b/lib/services/luis/authoring/package.json @@ -2,9 +2,9 @@ "name": "azure-cognitiveservices-luis-authoring", "author": "Microsoft Corporation", "description": "LUISAuthoringClient Library with typescript type definitions for node", - "version": "2.0.0", + "version": "2.1.0", "dependencies": { - "ms-rest": "^2.3.3" + "ms-rest": "^2.5.0" }, "keywords": [ "node", @@ -20,5 +20,8 @@ }, "bugs": { "url": "https://github.com/azure/azure-sdk-for-node/issues" + }, + "scripts": { + "postinstall": "node .scripts/postinstall.js" } } From f4cec8e86cd2d33080ce78b628434110f7955022 Mon Sep 17 00:00:00 2001 From: scbedd <45376673+scbedd@users.noreply.github.com> Date: Tue, 12 Feb 2019 18:22:42 -0800 Subject: [PATCH 2/6] Adding .docsettings file. Adding readme analysis step to CI. Renaming to analyze. Updating some variable names. adding trailing newline --- .azure-pipelines/client.yml | 99 ++++++++++++++++++++----------------- .docsettings.yml | 8 +++ 2 files changed, 61 insertions(+), 46 deletions(-) create mode 100644 .docsettings.yml diff --git a/.azure-pipelines/client.yml b/.azure-pipelines/client.yml index 603ad356fe..e970a529cc 100644 --- a/.azure-pipelines/client.yml +++ b/.azure-pipelines/client.yml @@ -2,7 +2,7 @@ trigger: - master variables: - node.version: '10.x' + NodeVersion: '10.x' jobs: - job: 'Publish' @@ -13,8 +13,8 @@ jobs: steps: - task: NodeTool@0 inputs: - versionSpec: '$(node.version)' - displayName: 'Install Node.js $(node.version)' + versionSpec: '$(NodeVersion)' + displayName: 'Install Node.js $(NodeVersion)' # Reduce build time by only installing the "npm-run-all" package, which is the minimum required to run the # composite script commands. @@ -46,16 +46,23 @@ jobs: - task: PublishBuildArtifacts@1 displayName: 'Publish Package' - - job: 'Audit' + - job: 'Analyze' pool: vmImage: 'ubuntu-16.04' steps: + # sudo is required for pip install, as a console_entrypoint shim needs to be placed in bin + - script: | + pip install setuptools wheel + sudo pip install doc-warden + ward scan -d $(Build.SourcesDirectory) + displayName: 'Verify Readmes' + - task: NodeTool@0 inputs: - versionSpec: '$(node.version)' - displayName: 'Install Node.js $(node.version)' + versionSpec: '$(NodeVersion)' + displayName: 'Install Node.js $(NodeVersion)' # Rather than running "npm install" in the repo root, reduce build time by only installing the "npm-run-all" package, # which is the minimum required to run the composite script commands. @@ -85,62 +92,62 @@ jobs: strategy: matrix: Linux_Node6: - os.name: 'Linux' - os.vmImage: 'ubuntu-16.04' - node.version: '6.x' + OSName: 'Linux' + OSVmImage: 'ubuntu-16.04' + NodeVersion: '6.x' Linux_Node8: - os.name: 'Linux' - os.vmImage: 'ubuntu-16.04' - node.version: '8.x' + OSName: 'Linux' + OSVmImage: 'ubuntu-16.04' + NodeVersion: '8.x' Linux_Node10: - os.name: 'Linux' - os.vmImage: 'ubuntu-16.04' - node.version: '10.x' + OSName: 'Linux' + OSVmImage: 'ubuntu-16.04' + NodeVersion: '10.x' Linux_Node11: - os.name: 'Linux' - os.vmImage: 'ubuntu-16.04' - node.version: '11.x' + OSName: 'Linux' + OSVmImage: 'ubuntu-16.04' + NodeVersion: '11.x' macOS_Node6: - os.name: 'macOS' - os.vmImage: 'macOS-10.13' - node.version: '6.x' + OSName: 'macOS' + OSVmImage: 'macOS-10.13' + NodeVersion: '6.x' macOS_Node8: - os.name: 'macOS' - os.vmImage: 'macOS-10.13' - node.version: '8.x' + OSName: 'macOS' + OSVmImage: 'macOS-10.13' + NodeVersion: '8.x' macOS_Node10: - os.name: 'macOS' - os.vmImage: 'macOS-10.13' - node.version: '10.x' + OSName: 'macOS' + OSVmImage: 'macOS-10.13' + NodeVersion: '10.x' macOS_Node11: - os.name: 'macOS' - os.vmImage: 'macOS-10.13' - node.version: '11.x' + OSName: 'macOS' + OSVmImage: 'macOS-10.13' + NodeVersion: '11.x' Windows_Node6: - os.name: 'Windows' - os.vmImage: 'vs2017-win2016' - node.version: '6.x' + OSName: 'Windows' + OSVmImage: 'vs2017-win2016' + NodeVersion: '6.x' Windows_Node8: - os.name: 'Windows' - os.vmImage: 'vs2017-win2016' - node.version: '8.x' + OSName: 'Windows' + OSVmImage: 'vs2017-win2016' + NodeVersion: '8.x' Windows_Node10: - os.name: 'Windows' - os.vmImage: 'vs2017-win2016' - node.version: '10.x' + OSName: 'Windows' + OSVmImage: 'vs2017-win2016' + NodeVersion: '10.x' Windows_Node11: - os.name: 'Windows' - os.vmImage: 'vs2017-win2016' - node.version: '11.x' + OSName: 'Windows' + OSVmImage: 'vs2017-win2016' + NodeVersion: '11.x' pool: - vmImage: '$(os.vmImage)' + vmImage: '$(OSVmImage)' steps: - task: NodeTool@0 inputs: - versionSpec: '$(node.version)' - displayName: 'Install Node.js $(node.version)' + versionSpec: '$(NodeVersion)' + displayName: 'Install Node.js $(NodeVersion)' # Tests depend on running "npm install" in repo root - task: Npm@1 @@ -157,6 +164,6 @@ jobs: - task: PublishTestResults@2 inputs: testResultsFiles: '**/test-results.xml' - testRunTitle: '{os.name} Node $(node.version)' + testRunTitle: '{OSName} Node $(NodeVersion)' condition: succeededOrFailed() displayName: 'Publish test results' diff --git a/.docsettings.yml b/.docsettings.yml new file mode 100644 index 0000000000..98e737ff4b --- /dev/null +++ b/.docsettings.yml @@ -0,0 +1,8 @@ +omitted_paths: + - Documentation/* + - examples/* + - runtime/ms-rest/test/* + - runtime/ms-rest-azure/test/* + - lib/services/visualSearch/* # exception. swagger changes to generate readme.md is checked in. +language: js +root_check_enabled: True From 94c6263735287a73c85c69bd6efa5b8421c0b360 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 19 Feb 2019 23:31:52 +0000 Subject: [PATCH 3/6] Generated from 0afd9049139e4fff0b0ea012c5943d03b76877bb Fix a typo in storagesync.json --- .../storagesyncManagement/LICENSE.txt | 2 +- lib/services/storagesyncManagement/README.md | 29 +- .../lib/models/azureEntityResource.js | 2 +- .../lib/models/backupRequest.js | 2 +- .../models/checkNameAvailabilityParameters.js | 2 +- .../lib/models/checkNameAvailabilityResult.js | 11 +- .../lib/models/cloudEndpoint.js | 20 +- .../models/cloudEndpointCreateParameters.js | 6 +- .../lib/models/filesNotSyncingError.js | 81 ++ .../lib/models/index.d.ts | 1040 ++++++++++------- .../storagesyncManagement/lib/models/index.js | 4 + .../lib/models/operationDisplayInfo.js | 9 +- .../lib/models/operationDisplayResource.js | 8 +- .../lib/models/operationEntity.js | 15 +- .../lib/models/operationEntityListResult.js | 2 +- .../lib/models/postBackupResponse.js | 2 +- .../lib/models/postRestoreRequest.js | 18 +- .../lib/models/preRestoreRequest.js | 20 +- .../lib/models/recallActionParameters.js | 4 +- .../lib/models/registeredServer.js | 45 +- .../registeredServerCreateParameters.js | 18 +- .../lib/models/resource.js | 6 +- .../lib/models/resourcesMoveInfo.js | 4 +- .../lib/models/restoreFileSpec.js | 4 +- .../lib/models/serverEndpoint.js | 140 ++- .../models/serverEndpointCreateParameters.js | 30 +- .../lib/models/serverEndpointSyncStatus.js | 204 ++++ .../models/serverEndpointUpdateParameters.js | 24 +- .../lib/models/storageSyncApiError.js | 14 +- .../lib/models/storageSyncError.js | 34 +- .../lib/models/storageSyncErrorDetails.js | 6 +- .../lib/models/storageSyncService.js | 4 +- .../storageSyncServiceCreateParameters.js | 6 +- .../storageSyncServiceUpdateParameters.js | 5 +- .../lib/models/subscriptionState.js | 6 +- .../lib/models/syncActivityStatus.js | 118 ++ .../lib/models/syncGroup.js | 4 +- .../lib/models/syncGroupCreateParameters.js | 3 +- .../lib/models/syncSessionStatus.js | 130 +++ .../lib/models/trackedResource.js | 4 +- .../lib/models/triggerRolloverRequest.js | 2 +- .../lib/models/workflow.js | 12 +- .../lib/operations/index.d.ts | 56 +- .../lib/operations/serverEndpoints.js | 84 +- .../lib/storageSyncManagementClient.js | 2 +- .../storagesyncManagement/package.json | 2 +- 46 files changed, 1643 insertions(+), 601 deletions(-) create mode 100644 lib/services/storagesyncManagement/lib/models/filesNotSyncingError.js create mode 100644 lib/services/storagesyncManagement/lib/models/serverEndpointSyncStatus.js create mode 100644 lib/services/storagesyncManagement/lib/models/syncActivityStatus.js create mode 100644 lib/services/storagesyncManagement/lib/models/syncSessionStatus.js diff --git a/lib/services/storagesyncManagement/LICENSE.txt b/lib/services/storagesyncManagement/LICENSE.txt index 5431ba98b9..8f3d856145 100644 --- a/lib/services/storagesyncManagement/LICENSE.txt +++ b/lib/services/storagesyncManagement/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +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 diff --git a/lib/services/storagesyncManagement/README.md b/lib/services/storagesyncManagement/README.md index 266b0589d5..b14e3b24f6 100644 --- a/lib/services/storagesyncManagement/README.md +++ b/lib/services/storagesyncManagement/README.md @@ -3,38 +3,41 @@ uid: azure-arm-storagesync summary: *content --- -# Microsoft Azure SDK for Node.js - StorageSyncManagementClient +**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 - StorageSyncManagementClient + This project provides a Node.js package for accessing Azure. Right now it supports: - **Node.js version 6.x.x or higher** -## Features +### Features -## How to Install +### How to Install ```bash npm install azure-arm-storagesync ``` -## How to use +### How to use -### Authentication, client creation and list operations as an example. +#### Authentication, client creation, and list operations as an example. ```javascript const msRestAzure = require("ms-rest-azure"); const StorageSyncManagementClient = require("azure-arm-storagesync"); msRestAzure.interactiveLogin().then((creds) => { - const subscriptionId = ""; - const client = new StorageSyncManagementClient(creds, subscriptionId); - return client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); + const subscriptionId = ""; + const client = new StorageSyncManagementClient(creds, subscriptionId); + + return client.operations.list().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 +``` +### Related projects - [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/storagesyncManagement/lib/models/azureEntityResource.js b/lib/services/storagesyncManagement/lib/models/azureEntityResource.js index a87a9fe033..83674c0ce4 100644 --- a/lib/services/storagesyncManagement/lib/models/azureEntityResource.js +++ b/lib/services/storagesyncManagement/lib/models/azureEntityResource.js @@ -21,7 +21,7 @@ const models = require('./index'); class AzureEntityResource extends models['Resource'] { /** * Create a AzureEntityResource. - * @member {string} [etag] Resource Etag. + * @property {string} [etag] Resource Etag. */ constructor() { super(); diff --git a/lib/services/storagesyncManagement/lib/models/backupRequest.js b/lib/services/storagesyncManagement/lib/models/backupRequest.js index a87ef97efb..deb6ef62eb 100644 --- a/lib/services/storagesyncManagement/lib/models/backupRequest.js +++ b/lib/services/storagesyncManagement/lib/models/backupRequest.js @@ -17,7 +17,7 @@ class BackupRequest { /** * Create a BackupRequest. - * @member {string} [azureFileShare] Azure File Share. + * @property {string} [azureFileShare] Azure File Share. */ constructor() { } diff --git a/lib/services/storagesyncManagement/lib/models/checkNameAvailabilityParameters.js b/lib/services/storagesyncManagement/lib/models/checkNameAvailabilityParameters.js index cad69bf476..4bb70222d0 100644 --- a/lib/services/storagesyncManagement/lib/models/checkNameAvailabilityParameters.js +++ b/lib/services/storagesyncManagement/lib/models/checkNameAvailabilityParameters.js @@ -17,7 +17,7 @@ class CheckNameAvailabilityParameters { /** * Create a CheckNameAvailabilityParameters. - * @member {string} name The name to check for availability + * @property {string} name The name to check for availability */ constructor() { } diff --git a/lib/services/storagesyncManagement/lib/models/checkNameAvailabilityResult.js b/lib/services/storagesyncManagement/lib/models/checkNameAvailabilityResult.js index d060e0e65d..c8235267bc 100644 --- a/lib/services/storagesyncManagement/lib/models/checkNameAvailabilityResult.js +++ b/lib/services/storagesyncManagement/lib/models/checkNameAvailabilityResult.js @@ -17,14 +17,15 @@ class CheckNameAvailabilityResult { /** * Create a CheckNameAvailabilityResult. - * @member {boolean} [nameAvailable] Gets a boolean value that indicates + * @property {boolean} [nameAvailable] Gets a boolean value that indicates * whether the name is available for you to use. If true, the name is * available. If false, the name has already been taken or invalid and cannot * be used. - * @member {string} [reason] Gets the reason that a Storage Sync Service name - * could not be used. The Reason element is only returned if NameAvailable is - * false. Possible values include: 'Invalid', 'AlreadyExists' - * @member {string} [message] Gets an error message explaining the Reason + * @property {string} [reason] Gets the reason that a Storage Sync Service + * name could not be used. The Reason element is only returned if + * NameAvailable is false. Possible values include: 'Invalid', + * 'AlreadyExists' + * @property {string} [message] Gets an error message explaining the Reason * value in more detail. */ constructor() { diff --git a/lib/services/storagesyncManagement/lib/models/cloudEndpoint.js b/lib/services/storagesyncManagement/lib/models/cloudEndpoint.js index fcd8ff7b3d..6065752869 100644 --- a/lib/services/storagesyncManagement/lib/models/cloudEndpoint.js +++ b/lib/services/storagesyncManagement/lib/models/cloudEndpoint.js @@ -20,15 +20,15 @@ const models = require('./index'); class CloudEndpoint extends models['ProxyResource'] { /** * Create a CloudEndpoint. - * @member {string} [storageAccountResourceId] Storage Account Resource Id - * @member {string} [storageAccountShareName] Storage Account Share name - * @member {string} [storageAccountTenantId] Storage Account Tenant Id - * @member {string} [partnershipId] Partnership Id - * @member {string} [friendlyName] Friendly Name - * @member {boolean} [backupEnabled] Backup Enabled - * @member {string} [provisioningState] CloudEndpoint Provisioning State - * @member {string} [lastWorkflowId] CloudEndpoint lastWorkflowId - * @member {string} [lastOperationName] Resource Last Operation Name + * @property {string} [storageAccountResourceId] Storage Account Resource Id + * @property {string} [storageAccountShareName] Storage Account Share name + * @property {string} [storageAccountTenantId] Storage Account Tenant Id + * @property {string} [partnershipId] Partnership Id + * @property {string} [friendlyName] Friendly Name + * @property {string} [backupEnabled] Backup Enabled + * @property {string} [provisioningState] CloudEndpoint Provisioning State + * @property {string} [lastWorkflowId] CloudEndpoint lastWorkflowId + * @property {string} [lastOperationName] Resource Last Operation Name */ constructor() { super(); @@ -112,7 +112,7 @@ class CloudEndpoint extends models['ProxyResource'] { readOnly: true, serializedName: 'properties.backupEnabled', type: { - name: 'Boolean' + name: 'String' } }, provisioningState: { diff --git a/lib/services/storagesyncManagement/lib/models/cloudEndpointCreateParameters.js b/lib/services/storagesyncManagement/lib/models/cloudEndpointCreateParameters.js index f97c739114..738f6fb8c5 100644 --- a/lib/services/storagesyncManagement/lib/models/cloudEndpointCreateParameters.js +++ b/lib/services/storagesyncManagement/lib/models/cloudEndpointCreateParameters.js @@ -20,9 +20,9 @@ const models = require('./index'); class CloudEndpointCreateParameters extends models['ProxyResource'] { /** * Create a CloudEndpointCreateParameters. - * @member {string} [storageAccountResourceId] Storage Account Resource Id - * @member {string} [storageAccountShareName] Storage Account Share name - * @member {string} [storageAccountTenantId] Storage Account Tenant Id + * @property {string} [storageAccountResourceId] Storage Account Resource Id + * @property {string} [storageAccountShareName] Storage Account Share name + * @property {string} [storageAccountTenantId] Storage Account Tenant Id */ constructor() { super(); diff --git a/lib/services/storagesyncManagement/lib/models/filesNotSyncingError.js b/lib/services/storagesyncManagement/lib/models/filesNotSyncingError.js new file mode 100644 index 0000000000..d9cad93dc7 --- /dev/null +++ b/lib/services/storagesyncManagement/lib/models/filesNotSyncingError.js @@ -0,0 +1,81 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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'; + +/** + * Files not syncing error object + * + */ +class FilesNotSyncingError { + /** + * Create a FilesNotSyncingError. + * @property {number} [errorCode] Error code + * @property {number} [persistentCount] Count of persistent files not syncing + * with the specified error code + * @property {number} [transientCount] Count of transient files not syncing + * with the specified error code + */ + constructor() { + } + + /** + * Defines the metadata of FilesNotSyncingError + * + * @returns {object} metadata of FilesNotSyncingError + * + */ + mapper() { + return { + required: false, + serializedName: 'FilesNotSyncingError', + type: { + name: 'Composite', + className: 'FilesNotSyncingError', + modelProperties: { + errorCode: { + required: false, + readOnly: true, + serializedName: 'ErrorCode', + type: { + name: 'Number' + } + }, + persistentCount: { + required: false, + readOnly: true, + serializedName: 'persistentCount', + constraints: { + InclusiveMaximum: 2147483647, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + transientCount: { + required: false, + readOnly: true, + serializedName: 'transientCount', + constraints: { + InclusiveMaximum: 2147483647, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = FilesNotSyncingError; diff --git a/lib/services/storagesyncManagement/lib/models/index.d.ts b/lib/services/storagesyncManagement/lib/models/index.d.ts index 7a3f5fc09c..0d41d42e08 100644 --- a/lib/services/storagesyncManagement/lib/models/index.d.ts +++ b/lib/services/storagesyncManagement/lib/models/index.d.ts @@ -1,754 +1,974 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { BaseResource } from 'ms-rest-azure'; -import { CloudError } from 'ms-rest-azure'; -import * as moment from 'moment'; +import { BaseResource, CloudError } from "ms-rest-azure"; +import * as moment from "moment"; -export { BaseResource } from 'ms-rest-azure'; -export { CloudError } from 'ms-rest-azure'; +export { + BaseResource, + CloudError +}; /** - * @class - * Initializes a new instance of the StorageSyncErrorDetails class. - * @constructor * Error Details object. - * - * @member {string} [code] Error code of the given entry. - * @member {string} [message] Error message of the given entry. - * @member {string} [target] Target of the given entry. */ export interface StorageSyncErrorDetails { + /** + * Error code of the given entry. + */ code?: string; + /** + * Error message of the given entry. + */ message?: string; + /** + * Target of the given entry. + */ target?: string; } /** - * @class - * Initializes a new instance of the StorageSyncApiError class. - * @constructor * Error type - * - * @member {string} [code] Error code of the given entry. - * @member {string} [message] Error message of the given entry. - * @member {string} [target] Target of the given error entry. - * @member {object} [details] Error details of the given entry. - * @member {string} [details.code] Error code of the given entry. - * @member {string} [details.message] Error message of the given entry. - * @member {string} [details.target] Target of the given entry. */ export interface StorageSyncApiError { + /** + * Error code of the given entry. + */ code?: string; + /** + * Error message of the given entry. + */ message?: string; + /** + * Target of the given error entry. + */ target?: string; + /** + * Error details of the given entry. + */ details?: StorageSyncErrorDetails; } /** - * @class - * Initializes a new instance of the StorageSyncError class. - * @constructor * Error type - * - * @member {object} [error] Error details of the given entry. - * @member {string} [error.code] Error code of the given entry. - * @member {string} [error.message] Error message of the given entry. - * @member {string} [error.target] Target of the given error entry. - * @member {object} [error.details] Error details of the given entry. - * @member {string} [error.details.code] Error code of the given entry. - * @member {string} [error.details.message] Error message of the given entry. - * @member {string} [error.details.target] Target of the given entry. - * @member {object} [innererror] Error details of the given entry. - * @member {string} [innererror.code] Error code of the given entry. - * @member {string} [innererror.message] Error message of the given entry. - * @member {string} [innererror.target] Target of the given error entry. - * @member {object} [innererror.details] Error details of the given entry. - * @member {string} [innererror.details.code] Error code of the given entry. - * @member {string} [innererror.details.message] Error message of the given - * entry. - * @member {string} [innererror.details.target] Target of the given entry. */ export interface StorageSyncError { + /** + * Error details of the given entry. + */ error?: StorageSyncApiError; + /** + * Error details of the given entry. + */ innererror?: StorageSyncApiError; } /** - * @class - * Initializes a new instance of the SubscriptionState class. - * @constructor * Subscription State object. - * - * @member {string} [state] State of Azure Subscription. Possible values - * include: 'Registered', 'Unregistered', 'Warned', 'Suspended', 'Deleted' - * @member {boolean} [istransitioning] Is Transitioning - * @member {object} [properties] Subscription state properties. */ export interface SubscriptionState { + /** + * State of Azure Subscription. Possible values include: 'Registered', 'Unregistered', 'Warned', + * 'Suspended', 'Deleted' + */ state?: string; + /** + * Is Transitioning + */ readonly istransitioning?: boolean; + /** + * Subscription state properties. + */ properties?: any; } -/** - * @class - * Initializes a new instance of the Resource class. - * @constructor - * @member {string} [id] Fully qualified resource Id for the resource. Ex - - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * @member {string} [name] The name of the resource - * @member {string} [type] The type of the resource. Ex- - * Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - */ export interface Resource extends BaseResource { + /** + * Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + */ readonly id?: string; + /** + * The name of the resource + */ readonly name?: string; + /** + * The type of the resource. Ex- Microsoft.Compute/virtualMachines or + * Microsoft.Storage/storageAccounts. + */ readonly type?: string; } /** - * @class - * Initializes a new instance of the TrackedResource class. - * @constructor * The resource model definition for a ARM tracked top level resource - * - * @member {object} [tags] Resource tags. - * @member {string} location The geo-location where the resource lives - */ +*/ export interface TrackedResource extends Resource { + /** + * Resource tags. + */ tags?: { [propertyName: string]: string }; + /** + * The geo-location where the resource lives + */ location: string; } /** - * @class - * Initializes a new instance of the StorageSyncService class. - * @constructor * Storage Sync Service object. - * - * @member {number} [storageSyncServiceStatus] Storage Sync service status. - * @member {string} [storageSyncServiceUid] Storage Sync service Uid - */ +*/ export interface StorageSyncService extends TrackedResource { + /** + * Storage Sync service status. + */ readonly storageSyncServiceStatus?: number; + /** + * Storage Sync service Uid + */ readonly storageSyncServiceUid?: string; } /** - * @class - * Initializes a new instance of the ProxyResource class. - * @constructor - * The resource model definition for a ARM proxy resource. It will have - * everything other than required location and tags - * - */ + * The resource model definition for a ARM proxy resource. It will have everything other than + * required location and tags +*/ export interface ProxyResource extends Resource { } /** - * @class - * Initializes a new instance of the SyncGroup class. - * @constructor * Sync Group object. - * - * @member {string} [uniqueId] Unique Id - * @member {string} [syncGroupStatus] Sync group status - */ +*/ export interface SyncGroup extends ProxyResource { + /** + * Unique Id + */ uniqueId?: string; + /** + * Sync group status + */ readonly syncGroupStatus?: string; } /** - * @class - * Initializes a new instance of the CloudEndpoint class. - * @constructor * Cloud Endpoint object. - * - * @member {string} [storageAccountResourceId] Storage Account Resource Id - * @member {string} [storageAccountShareName] Storage Account Share name - * @member {string} [storageAccountTenantId] Storage Account Tenant Id - * @member {string} [partnershipId] Partnership Id - * @member {string} [friendlyName] Friendly Name - * @member {boolean} [backupEnabled] Backup Enabled - * @member {string} [provisioningState] CloudEndpoint Provisioning State - * @member {string} [lastWorkflowId] CloudEndpoint lastWorkflowId - * @member {string} [lastOperationName] Resource Last Operation Name - */ +*/ export interface CloudEndpoint extends ProxyResource { + /** + * Storage Account Resource Id + */ storageAccountResourceId?: string; + /** + * Storage Account Share name + */ storageAccountShareName?: string; + /** + * Storage Account Tenant Id + */ storageAccountTenantId?: string; + /** + * Partnership Id + */ partnershipId?: string; + /** + * Friendly Name + */ friendlyName?: string; - readonly backupEnabled?: boolean; + /** + * Backup Enabled + */ + readonly backupEnabled?: string; + /** + * CloudEndpoint Provisioning State + */ provisioningState?: string; + /** + * CloudEndpoint lastWorkflowId + */ lastWorkflowId?: string; + /** + * Resource Last Operation Name + */ lastOperationName?: string; } /** - * @class - * Initializes a new instance of the RecallActionParameters class. - * @constructor * The parameters used when calling recall action on server endpoint. - * - * @member {string} [pattern] Pattern of the files. - * @member {string} [recallPath] Recall path. - */ +*/ export interface RecallActionParameters { + /** + * Pattern of the files. + */ pattern?: string; + /** + * Recall path. + */ recallPath?: string; } /** - * @class - * Initializes a new instance of the StorageSyncServiceCreateParameters class. - * @constructor * The parameters used when creating a storage sync service. - * - * @member {string} location Required. Gets or sets the location of the - * resource. This will be one of the supported and registered Azure Geo Regions - * (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource - * cannot be changed once it is created, but if an identical geo region is - * specified on update, the request will succeed. - * @member {object} [tags] Gets or sets a list of key value pairs that describe - * the resource. These tags can be used for viewing and grouping this resource - * (across resource groups). A maximum of 15 tags can be provided for a - * resource. Each tag must have a key with a length no greater than 128 - * characters and a value with a length no greater than 256 characters. - * @member {object} [properties] - */ +*/ export interface StorageSyncServiceCreateParameters { + /** + * Required. Gets or sets the location of the resource. This will be one of the supported and + * registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of + * a resource cannot be changed once it is created, but if an identical geo region is specified + * on update, the request will succeed. + */ location: string; + /** + * Gets or sets a list of key value pairs that describe the resource. These tags can be used for + * viewing and grouping this resource (across resource groups). A maximum of 15 tags can be + * provided for a resource. Each tag must have a key with a length no greater than 128 characters + * and a value with a length no greater than 256 characters. + */ tags?: { [propertyName: string]: string }; properties?: any; } /** - * @class - * Initializes a new instance of the SyncGroupCreateParameters class. - * @constructor * The parameters used when creating a sync group. - * - * @member {object} [properties] The parameters used to create the sync group - */ +*/ export interface SyncGroupCreateParameters extends ProxyResource { + /** + * The parameters used to create the sync group + */ properties?: any; } /** - * @class - * Initializes a new instance of the CloudEndpointCreateParameters class. - * @constructor * The parameters used when creating a cloud endpoint. - * - * @member {string} [storageAccountResourceId] Storage Account Resource Id - * @member {string} [storageAccountShareName] Storage Account Share name - * @member {string} [storageAccountTenantId] Storage Account Tenant Id - */ +*/ export interface CloudEndpointCreateParameters extends ProxyResource { + /** + * Storage Account Resource Id + */ storageAccountResourceId?: string; + /** + * Storage Account Share name + */ storageAccountShareName?: string; + /** + * Storage Account Tenant Id + */ storageAccountTenantId?: string; } /** - * @class - * Initializes a new instance of the ServerEndpointCreateParameters class. - * @constructor * The parameters used when creating a server endpoint. - * - * @member {string} [serverLocalPath] Server Local path. - * @member {string} [cloudTiering] Cloud Tiering. Possible values include: - * 'on', 'off' - * @member {number} [volumeFreeSpacePercent] Level of free space to be - * maintained by Cloud Tiering if it is enabled. - * @member {number} [tierFilesOlderThanDays] Tier files older than days. - * @member {string} [friendlyName] Friendly Name - * @member {string} [serverResourceId] Server Resource Id. - */ +*/ export interface ServerEndpointCreateParameters extends ProxyResource { + /** + * Server Local path. + */ serverLocalPath?: string; + /** + * Cloud Tiering. Possible values include: 'on', 'off' + */ cloudTiering?: string; + /** + * Level of free space to be maintained by Cloud Tiering if it is enabled. + */ volumeFreeSpacePercent?: number; + /** + * Tier files older than days. + */ tierFilesOlderThanDays?: number; + /** + * Friendly Name + */ friendlyName?: string; + /** + * Server Resource Id. + */ serverResourceId?: string; + /** + * Offline data transfer. Possible values include: 'on', 'off' + */ + offlineDataTransfer?: string; + /** + * Offline data transfer share name + */ + offlineDataTransferShareName?: string; } /** - * @class - * Initializes a new instance of the TriggerRolloverRequest class. - * @constructor * Trigger Rollover Request. - * - * @member {string} [serverCertificate] Certificate Data - */ +*/ export interface TriggerRolloverRequest { + /** + * Certificate Data + */ serverCertificate?: string; } /** - * @class - * Initializes a new instance of the RegisteredServerCreateParameters class. - * @constructor * The parameters used when creating a registered server. - * - * @member {string} [serverCertificate] Registered Server Certificate - * @member {string} [agentVersion] Registered Server Agent Version - * @member {string} [serverOSVersion] Registered Server OS Version - * @member {string} [lastHeartBeat] Registered Server last heart beat - * @member {string} [serverRole] Registered Server serverRole - * @member {string} [clusterId] Registered Server clusterId - * @member {string} [clusterName] Registered Server clusterName - * @member {string} [serverId] Registered Server serverId - * @member {string} [friendlyName] Friendly Name - */ +*/ export interface RegisteredServerCreateParameters extends ProxyResource { + /** + * Registered Server Certificate + */ serverCertificate?: string; + /** + * Registered Server Agent Version + */ agentVersion?: string; + /** + * Registered Server OS Version + */ serverOSVersion?: string; + /** + * Registered Server last heart beat + */ lastHeartBeat?: string; + /** + * Registered Server serverRole + */ serverRole?: string; + /** + * Registered Server clusterId + */ clusterId?: string; + /** + * Registered Server clusterName + */ clusterName?: string; + /** + * Registered Server serverId + */ serverId?: string; + /** + * Friendly Name + */ friendlyName?: string; } /** - * @class - * Initializes a new instance of the ServerEndpointUpdateParameters class. - * @constructor * Parameters for updating an Server Endpoint. - * - * @member {string} [cloudTiering] Cloud Tiering. Possible values include: - * 'on', 'off' - * @member {number} [volumeFreeSpacePercent] Level of free space to be - * maintained by Cloud Tiering if it is enabled. - * @member {number} [tierFilesOlderThanDays] Tier files older than days. - */ +*/ export interface ServerEndpointUpdateParameters { + /** + * Cloud Tiering. Possible values include: 'on', 'off' + */ cloudTiering?: string; + /** + * Level of free space to be maintained by Cloud Tiering if it is enabled. + */ volumeFreeSpacePercent?: number; + /** + * Tier files older than days. + */ tierFilesOlderThanDays?: number; + /** + * Offline data transfer. Possible values include: 'on', 'off' + */ + offlineDataTransfer?: string; + /** + * Offline data transfer share name + */ + offlineDataTransferShareName?: string; +} + +/** + * Files not syncing error object +*/ +export interface FilesNotSyncingError { + /** + * Error code + */ + readonly errorCode?: number; + /** + * Count of persistent files not syncing with the specified error code + */ + readonly persistentCount?: number; + /** + * Count of transient files not syncing with the specified error code + */ + readonly transientCount?: number; +} + +/** + * Sync Session status object. +*/ +export interface SyncSessionStatus { + /** + * Last sync status + */ + readonly lastSyncResult?: number; + /** + * Last sync timestamp + */ + readonly lastSyncTimestamp?: Date; + /** + * Last sync success timestamp + */ + readonly lastSyncSuccessTimestamp?: Date; + /** + * Last sync per item error count. + */ + lastSyncPerItemErrorCount?: number; + /** + * Count of persistent files not syncing. Reserved for future use. + */ + readonly persistentFilesNotSyncingCount?: number; + /** + * Count of transient files not syncing. Reserved for future use. + */ + readonly transientFilesNotSyncingCount?: number; + /** + * Array of per-item errors coming from the last sync session. Reserved for future use. + */ + readonly filesNotSyncingErrors?: FilesNotSyncingError[]; +} + +/** + * Sync Session status object. +*/ +export interface SyncActivityStatus { + /** + * Timestamp when properties were updated + */ + readonly timestamp?: Date; + /** + * Per item error count + */ + readonly perItemErrorCount?: number; + /** + * Applied item count. + */ + readonly appliedItemCount?: number; + /** + * Total item count (if available) + */ + readonly totalItemCount?: number; + /** + * Applied bytes + */ + readonly appliedBytes?: number; + /** + * Total bytes (if available) + */ + readonly totalBytes?: number; +} + +/** + * Server Endpoint sync status +*/ +export interface ServerEndpointSyncStatus { + /** + * Download Health Status. Possible values include: 'Healthy', 'Error', 'SyncBlockedForRestore', + * 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' + */ + readonly downloadHealth?: string; + /** + * Upload Health Status. Possible values include: 'Healthy', 'Error', 'SyncBlockedForRestore', + * 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' + */ + readonly uploadHealth?: string; + /** + * Combined Health Status. Possible values include: 'Healthy', 'Error', 'SyncBlockedForRestore', + * 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' + */ + readonly combinedHealth?: string; + /** + * Sync activity. Possible values include: 'Upload', 'Download', 'UploadAndDownload' + */ + readonly syncActivity?: string; + /** + * Total count of persistent files not syncing (combined upload + download). Reserved for future + * use. + */ + readonly totalPersistentFilesNotSyncingCount?: number; + /** + * Last Updated Timestamp + */ + readonly lastUpdatedTimestamp?: Date; + /** + * Upload Status + */ + readonly uploadStatus?: SyncSessionStatus; + /** + * Download Status + */ + readonly downloadStatus?: SyncSessionStatus; + /** + * Upload sync activity + */ + readonly uploadActivity?: SyncActivityStatus; + /** + * Download sync activity + */ + readonly downloadActivity?: SyncActivityStatus; + /** + * Offline Data Transfer State. Possible values include: 'InProgress', 'Stopping', 'NotRunning', + * 'Complete' + */ + readonly offlineDataTransferStatus?: string; } /** - * @class - * Initializes a new instance of the ServerEndpoint class. - * @constructor * Server Endpoint object. - * - * @member {string} [serverLocalPath] Server Local path. - * @member {string} [cloudTiering] Cloud Tiering. Possible values include: - * 'on', 'off' - * @member {number} [volumeFreeSpacePercent] Level of free space to be - * maintained by Cloud Tiering if it is enabled. - * @member {number} [tierFilesOlderThanDays] Tier files older than days. - * @member {string} [friendlyName] Friendly Name - * @member {string} [serverResourceId] Server Resource Id. - * @member {string} [provisioningState] ServerEndpoint Provisioning State - * @member {string} [lastWorkflowId] ServerEndpoint lastWorkflowId - * @member {string} [lastOperationName] Resource Last Operation Name - * @member {object} [syncStatus] Sync Health Status - */ +*/ export interface ServerEndpoint extends ProxyResource { + /** + * Server Local path. + */ serverLocalPath?: string; + /** + * Cloud Tiering. Possible values include: 'on', 'off' + */ cloudTiering?: string; + /** + * Level of free space to be maintained by Cloud Tiering if it is enabled. + */ volumeFreeSpacePercent?: number; + /** + * Tier files older than days. + */ tierFilesOlderThanDays?: number; + /** + * Friendly Name + */ friendlyName?: string; + /** + * Server Resource Id. + */ serverResourceId?: string; + /** + * ServerEndpoint Provisioning State + */ provisioningState?: string; + /** + * ServerEndpoint lastWorkflowId + */ lastWorkflowId?: string; + /** + * Resource Last Operation Name + */ lastOperationName?: string; - syncStatus?: any; + /** + * Server Endpoint sync status + */ + readonly syncStatus?: ServerEndpointSyncStatus; + /** + * Offline data transfer. Possible values include: 'on', 'off' + */ + offlineDataTransfer?: string; + /** + * Offline data transfer storage account resource ID + */ + readonly offlineDataTransferStorageAccountResourceId?: string; + /** + * Offline data transfer storage account tenant ID + */ + readonly offlineDataTransferStorageAccountTenantId?: string; + /** + * Offline data transfer share name + */ + offlineDataTransferShareName?: string; } /** - * @class - * Initializes a new instance of the RegisteredServer class. - * @constructor * Registered Server resource. - * - * @member {string} [serverCertificate] Registered Server Certificate - * @member {string} [agentVersion] Registered Server Agent Version - * @member {string} [serverOSVersion] Registered Server OS Version - * @member {number} [serverManagementtErrorCode] Registered Server Management - * Error Code - * @member {string} [lastHeartBeat] Registered Server last heart beat - * @member {string} [provisioningState] Registered Server Provisioning State - * @member {string} [serverRole] Registered Server serverRole - * @member {string} [clusterId] Registered Server clusterId - * @member {string} [clusterName] Registered Server clusterName - * @member {string} [serverId] Registered Server serverId - * @member {string} [storageSyncServiceUid] Registered Server - * storageSyncServiceUid - * @member {string} [lastWorkflowId] Registered Server lastWorkflowId - * @member {string} [lastOperationName] Resource Last Operation Name - * @member {string} [discoveryEndpointUri] Resource discoveryEndpointUri - * @member {string} [resourceLocation] Resource Location - * @member {string} [serviceLocation] Service Location - * @member {string} [friendlyName] Friendly Name - * @member {string} [managementEndpointUri] Management Endpoint Uri - * @member {string} [monitoringConfiguration] Monitoring Configuration - */ +*/ export interface RegisteredServer extends ProxyResource { + /** + * Registered Server Certificate + */ serverCertificate?: string; + /** + * Registered Server Agent Version + */ agentVersion?: string; + /** + * Registered Server OS Version + */ serverOSVersion?: string; - serverManagementtErrorCode?: number; + /** + * Registered Server Management Error Code + */ + serverManagementErrorCode?: number; + /** + * Registered Server last heart beat + */ lastHeartBeat?: string; + /** + * Registered Server Provisioning State + */ provisioningState?: string; + /** + * Registered Server serverRole + */ serverRole?: string; + /** + * Registered Server clusterId + */ clusterId?: string; + /** + * Registered Server clusterName + */ clusterName?: string; + /** + * Registered Server serverId + */ serverId?: string; + /** + * Registered Server storageSyncServiceUid + */ storageSyncServiceUid?: string; + /** + * Registered Server lastWorkflowId + */ lastWorkflowId?: string; + /** + * Resource Last Operation Name + */ lastOperationName?: string; + /** + * Resource discoveryEndpointUri + */ discoveryEndpointUri?: string; + /** + * Resource Location + */ resourceLocation?: string; + /** + * Service Location + */ serviceLocation?: string; + /** + * Friendly Name + */ friendlyName?: string; + /** + * Management Endpoint Uri + */ managementEndpointUri?: string; + /** + * Monitoring Configuration + */ monitoringConfiguration?: string; } /** - * @class - * Initializes a new instance of the ResourcesMoveInfo class. - * @constructor * Resource Move Info. - * - * @member {string} [targetResourceGroup] Target resource group. - * @member {array} [resources] Collection of Resources. - */ +*/ export interface ResourcesMoveInfo { + /** + * Target resource group. + */ targetResourceGroup?: string; + /** + * Collection of Resources. + */ resources?: string[]; } /** - * @class - * Initializes a new instance of the Workflow class. - * @constructor * Workflow resource. - * - * @member {string} [lastStepName] last step name - * @member {string} [status] workflow status. Possible values include: - * 'active', 'expired', 'succeeded', 'aborted', 'failed' - * @member {string} [operation] operation direction. Possible values include: - * 'do', 'undo', 'cancel' - * @member {string} [steps] workflow steps - * @member {string} [lastOperationId] workflow last operation identifier. - */ +*/ export interface Workflow extends ProxyResource { + /** + * last step name + */ lastStepName?: string; + /** + * workflow status. Possible values include: 'active', 'expired', 'succeeded', 'aborted', + * 'failed' + */ status?: string; + /** + * operation direction. Possible values include: 'do', 'undo', 'cancel' + */ operation?: string; + /** + * workflow steps + */ steps?: string; + /** + * workflow last operation identifier. + */ lastOperationId?: string; } /** - * @class - * Initializes a new instance of the OperationDisplayInfo class. - * @constructor * The operation supported by storage sync. - * - * @member {string} [description] The description of the operation. - * @member {string} [operation] The action that users can perform, based on - * their permission level. - * @member {string} [provider] Service provider: Microsoft StorageSync. - * @member {string} [resource] Resource on which the operation is performed. - */ +*/ export interface OperationDisplayInfo { + /** + * The description of the operation. + */ description?: string; + /** + * The action that users can perform, based on their permission level. + */ operation?: string; + /** + * Service provider: Microsoft StorageSync. + */ provider?: string; + /** + * Resource on which the operation is performed. + */ resource?: string; } /** - * @class - * Initializes a new instance of the OperationEntity class. - * @constructor * The operation supported by storage sync. - * - * @member {string} [name] Operation name: {provider}/{resource}/{operation}. - * @member {object} [display] The operation supported by storage sync. - * @member {string} [display.description] The description of the operation. - * @member {string} [display.operation] The action that users can perform, - * based on their permission level. - * @member {string} [display.provider] Service provider: Microsoft StorageSync. - * @member {string} [display.resource] Resource on which the operation is - * performed. - * @member {string} [origin] The origin. - */ +*/ export interface OperationEntity { + /** + * Operation name: {provider}/{resource}/{operation}. + */ name?: string; + /** + * The operation supported by storage sync. + */ display?: OperationDisplayInfo; + /** + * The origin. + */ origin?: string; } /** - * @class - * Initializes a new instance of the OperationDisplayResource class. - * @constructor * Operation Display Resource object. - * - * @member {string} [provider] Operation Display Resource Provider. - * @member {string} [resource] Operation Display Resource. - * @member {string} [operation] Operation Display Resource Operation. - * @member {string} [description] Operation Display Resource Description. - */ +*/ export interface OperationDisplayResource { + /** + * Operation Display Resource Provider. + */ provider?: string; + /** + * Operation Display Resource. + */ resource?: string; + /** + * Operation Display Resource Operation. + */ operation?: string; + /** + * Operation Display Resource Description. + */ description?: string; } /** - * @class - * Initializes a new instance of the CheckNameAvailabilityParameters class. - * @constructor * Parameters for a check name availability request. - * - * @member {string} name The name to check for availability - */ +*/ export interface CheckNameAvailabilityParameters { + /** + * The name to check for availability + */ name: string; } /** - * @class - * Initializes a new instance of the CheckNameAvailabilityResult class. - * @constructor * The CheckNameAvailability operation response. - * - * @member {boolean} [nameAvailable] Gets a boolean value that indicates - * whether the name is available for you to use. If true, the name is - * available. If false, the name has already been taken or invalid and cannot - * be used. - * @member {string} [reason] Gets the reason that a Storage Sync Service name - * could not be used. The Reason element is only returned if NameAvailable is - * false. Possible values include: 'Invalid', 'AlreadyExists' - * @member {string} [message] Gets an error message explaining the Reason value - * in more detail. - */ +*/ export interface CheckNameAvailabilityResult { + /** + * Gets a boolean value that indicates whether the name is available for you to use. If true, the + * name is available. If false, the name has already been taken or invalid and cannot be used. + */ readonly nameAvailable?: boolean; + /** + * Gets the reason that a Storage Sync Service name could not be used. The Reason element is only + * returned if NameAvailable is false. Possible values include: 'Invalid', 'AlreadyExists' + */ readonly reason?: string; + /** + * Gets an error message explaining the Reason value in more detail. + */ readonly message?: string; } /** - * @class - * Initializes a new instance of the RestoreFileSpec class. - * @constructor * Restore file spec. - * - * @member {string} [path] Restore file spec path - * @member {boolean} [isdir] Restore file spec isdir - */ +*/ export interface RestoreFileSpec { + /** + * Restore file spec path + */ path?: string; + /** + * Restore file spec isdir + */ readonly isdir?: boolean; } /** - * @class - * Initializes a new instance of the PostRestoreRequest class. - * @constructor * Post Restore Request - * - * @member {string} [partition] Post Restore partition. - * @member {string} [replicaGroup] Post Restore replica group. - * @member {string} [requestId] Post Restore request id. - * @member {string} [azureFileShareUri] Post Restore Azure file share uri. - * @member {string} [status] Post Restore Azure status. - * @member {string} [sourceAzureFileShareUri] Post Restore Azure source azure - * file share uri. - * @member {string} [failedFileList] Post Restore Azure failed file list. - * @member {array} [restoreFileSpec] Post Restore restore file spec array. - */ +*/ export interface PostRestoreRequest { + /** + * Post Restore partition. + */ partition?: string; + /** + * Post Restore replica group. + */ replicaGroup?: string; + /** + * Post Restore request id. + */ requestId?: string; + /** + * Post Restore Azure file share uri. + */ azureFileShareUri?: string; + /** + * Post Restore Azure status. + */ status?: string; + /** + * Post Restore Azure source azure file share uri. + */ sourceAzureFileShareUri?: string; + /** + * Post Restore Azure failed file list. + */ failedFileList?: string; + /** + * Post Restore restore file spec array. + */ restoreFileSpec?: RestoreFileSpec[]; } /** - * @class - * Initializes a new instance of the PreRestoreRequest class. - * @constructor * Pre Restore request object. - * - * @member {string} [partition] Pre Restore partition. - * @member {string} [replicaGroup] Pre Restore replica group. - * @member {string} [requestId] Pre Restore request id. - * @member {string} [azureFileShareUri] Pre Restore Azure file share uri. - * @member {string} [status] Pre Restore Azure status. - * @member {string} [sourceAzureFileShareUri] Pre Restore Azure source azure - * file share uri. - * @member {string} [backupMetadataPropertyBag] Pre Restore backup metadata - * property bag. - * @member {array} [restoreFileSpec] Pre Restore restore file spec array. - * @member {number} [pauseWaitForSyncDrainTimePeriodInSeconds] Pre Restore - * pause wait for sync drain time period in seconds. - */ +*/ export interface PreRestoreRequest { + /** + * Pre Restore partition. + */ partition?: string; + /** + * Pre Restore replica group. + */ replicaGroup?: string; + /** + * Pre Restore request id. + */ requestId?: string; + /** + * Pre Restore Azure file share uri. + */ azureFileShareUri?: string; + /** + * Pre Restore Azure status. + */ status?: string; + /** + * Pre Restore Azure source azure file share uri. + */ sourceAzureFileShareUri?: string; + /** + * Pre Restore backup metadata property bag. + */ backupMetadataPropertyBag?: string; + /** + * Pre Restore restore file spec array. + */ restoreFileSpec?: RestoreFileSpec[]; + /** + * Pre Restore pause wait for sync drain time period in seconds. + */ pauseWaitForSyncDrainTimePeriodInSeconds?: number; } /** - * @class - * Initializes a new instance of the BackupRequest class. - * @constructor * Backup request - * - * @member {string} [azureFileShare] Azure File Share. - */ +*/ export interface BackupRequest { + /** + * Azure File Share. + */ azureFileShare?: string; } /** - * @class - * Initializes a new instance of the PostBackupResponse class. - * @constructor * Post Backup Response - * - * @member {string} [cloudEndpointName] cloud endpoint Name. - */ +*/ export interface PostBackupResponse { + /** + * cloud endpoint Name. + */ readonly cloudEndpointName?: string; } /** - * @class - * Initializes a new instance of the StorageSyncServiceUpdateParameters class. - * @constructor * Parameters for updating an Storage sync service. - * - * @member {object} [tags] The user-specified tags associated with the storage - * sync service. - * @member {object} [properties] The properties of the storage sync service. - */ +*/ export interface StorageSyncServiceUpdateParameters { + /** + * The user-specified tags associated with the storage sync service. + */ tags?: { [propertyName: string]: string }; + /** + * The properties of the storage sync service. + */ properties?: any; } /** - * @class - * Initializes a new instance of the AzureEntityResource class. - * @constructor - * The resource model definition for a Azure Resource Manager resource with an - * etag. - * - * @member {string} [etag] Resource Etag. - */ + * The resource model definition for a Azure Resource Manager resource with an etag. +*/ export interface AzureEntityResource extends Resource { + /** + * Resource Etag. + */ readonly etag?: string; } - /** - * @class - * Initializes a new instance of the OperationEntityListResult class. - * @constructor * The list of storage sync operations. - * - * @member {string} [nextLink] The link used to get the next page of - * operations. - */ +*/ export interface OperationEntityListResult extends Array { + /** + * The link used to get the next page of operations. + */ nextLink?: string; } /** - * @class - * Initializes a new instance of the StorageSyncServiceArray class. - * @constructor * Array of StorageSyncServices - * - */ +*/ export interface StorageSyncServiceArray extends Array { } /** - * @class - * Initializes a new instance of the SyncGroupArray class. - * @constructor * Array of SyncGroup - * - */ +*/ export interface SyncGroupArray extends Array { } /** - * @class - * Initializes a new instance of the CloudEndpointArray class. - * @constructor * Array of CloudEndpoint - * - */ +*/ export interface CloudEndpointArray extends Array { } /** - * @class - * Initializes a new instance of the ServerEndpointArray class. - * @constructor * Array of ServerEndpoint - * - */ +*/ export interface ServerEndpointArray extends Array { } /** - * @class - * Initializes a new instance of the RegisteredServerArray class. - * @constructor * Array of RegisteredServer - * - */ +*/ export interface RegisteredServerArray extends Array { } /** - * @class - * Initializes a new instance of the WorkflowArray class. - * @constructor * Array of Workflow - * - */ +*/ export interface WorkflowArray extends Array { } diff --git a/lib/services/storagesyncManagement/lib/models/index.js b/lib/services/storagesyncManagement/lib/models/index.js index 0f5b9cbd94..2a619e3104 100644 --- a/lib/services/storagesyncManagement/lib/models/index.js +++ b/lib/services/storagesyncManagement/lib/models/index.js @@ -36,6 +36,10 @@ exports.ServerEndpointCreateParameters = require('./serverEndpointCreateParamete exports.TriggerRolloverRequest = require('./triggerRolloverRequest'); exports.RegisteredServerCreateParameters = require('./registeredServerCreateParameters'); exports.ServerEndpointUpdateParameters = require('./serverEndpointUpdateParameters'); +exports.FilesNotSyncingError = require('./filesNotSyncingError'); +exports.SyncSessionStatus = require('./syncSessionStatus'); +exports.SyncActivityStatus = require('./syncActivityStatus'); +exports.ServerEndpointSyncStatus = require('./serverEndpointSyncStatus'); exports.ServerEndpoint = require('./serverEndpoint'); exports.RegisteredServer = require('./registeredServer'); exports.ResourcesMoveInfo = require('./resourcesMoveInfo'); diff --git a/lib/services/storagesyncManagement/lib/models/operationDisplayInfo.js b/lib/services/storagesyncManagement/lib/models/operationDisplayInfo.js index cf5183c004..753a75abc0 100644 --- a/lib/services/storagesyncManagement/lib/models/operationDisplayInfo.js +++ b/lib/services/storagesyncManagement/lib/models/operationDisplayInfo.js @@ -17,11 +17,12 @@ class OperationDisplayInfo { /** * Create a OperationDisplayInfo. - * @member {string} [description] The description of the operation. - * @member {string} [operation] The action that users can perform, based on + * @property {string} [description] The description of the operation. + * @property {string} [operation] The action that users can perform, based on * their permission level. - * @member {string} [provider] Service provider: Microsoft StorageSync. - * @member {string} [resource] Resource on which the operation is performed. + * @property {string} [provider] Service provider: Microsoft StorageSync. + * @property {string} [resource] Resource on which the operation is + * performed. */ constructor() { } diff --git a/lib/services/storagesyncManagement/lib/models/operationDisplayResource.js b/lib/services/storagesyncManagement/lib/models/operationDisplayResource.js index 5e67311540..64a20ef330 100644 --- a/lib/services/storagesyncManagement/lib/models/operationDisplayResource.js +++ b/lib/services/storagesyncManagement/lib/models/operationDisplayResource.js @@ -17,10 +17,10 @@ class OperationDisplayResource { /** * Create a OperationDisplayResource. - * @member {string} [provider] Operation Display Resource Provider. - * @member {string} [resource] Operation Display Resource. - * @member {string} [operation] Operation Display Resource Operation. - * @member {string} [description] Operation Display Resource Description. + * @property {string} [provider] Operation Display Resource Provider. + * @property {string} [resource] Operation Display Resource. + * @property {string} [operation] Operation Display Resource Operation. + * @property {string} [description] Operation Display Resource Description. */ constructor() { } diff --git a/lib/services/storagesyncManagement/lib/models/operationEntity.js b/lib/services/storagesyncManagement/lib/models/operationEntity.js index e7a1b503f7..4ba806f0a8 100644 --- a/lib/services/storagesyncManagement/lib/models/operationEntity.js +++ b/lib/services/storagesyncManagement/lib/models/operationEntity.js @@ -17,16 +17,17 @@ class OperationEntity { /** * Create a OperationEntity. - * @member {string} [name] Operation name: {provider}/{resource}/{operation}. - * @member {object} [display] The operation supported by storage sync. - * @member {string} [display.description] The description of the operation. - * @member {string} [display.operation] The action that users can perform, + * @property {string} [name] Operation name: + * {provider}/{resource}/{operation}. + * @property {object} [display] The operation supported by storage sync. + * @property {string} [display.description] The description of the operation. + * @property {string} [display.operation] The action that users can perform, * based on their permission level. - * @member {string} [display.provider] Service provider: Microsoft + * @property {string} [display.provider] Service provider: Microsoft * StorageSync. - * @member {string} [display.resource] Resource on which the operation is + * @property {string} [display.resource] Resource on which the operation is * performed. - * @member {string} [origin] The origin. + * @property {string} [origin] The origin. */ constructor() { } diff --git a/lib/services/storagesyncManagement/lib/models/operationEntityListResult.js b/lib/services/storagesyncManagement/lib/models/operationEntityListResult.js index f2fd520020..f8107dc5a9 100644 --- a/lib/services/storagesyncManagement/lib/models/operationEntityListResult.js +++ b/lib/services/storagesyncManagement/lib/models/operationEntityListResult.js @@ -16,7 +16,7 @@ class OperationEntityListResult extends Array { /** * Create a OperationEntityListResult. - * @member {string} [nextLink] The link used to get the next page of + * @property {string} [nextLink] The link used to get the next page of * operations. */ constructor() { diff --git a/lib/services/storagesyncManagement/lib/models/postBackupResponse.js b/lib/services/storagesyncManagement/lib/models/postBackupResponse.js index dfb4c14bf1..4c0a1961c1 100644 --- a/lib/services/storagesyncManagement/lib/models/postBackupResponse.js +++ b/lib/services/storagesyncManagement/lib/models/postBackupResponse.js @@ -17,7 +17,7 @@ class PostBackupResponse { /** * Create a PostBackupResponse. - * @member {string} [cloudEndpointName] cloud endpoint Name. + * @property {string} [cloudEndpointName] cloud endpoint Name. */ constructor() { } diff --git a/lib/services/storagesyncManagement/lib/models/postRestoreRequest.js b/lib/services/storagesyncManagement/lib/models/postRestoreRequest.js index 32be654193..4c92fc2ad4 100644 --- a/lib/services/storagesyncManagement/lib/models/postRestoreRequest.js +++ b/lib/services/storagesyncManagement/lib/models/postRestoreRequest.js @@ -17,15 +17,15 @@ class PostRestoreRequest { /** * Create a PostRestoreRequest. - * @member {string} [partition] Post Restore partition. - * @member {string} [replicaGroup] Post Restore replica group. - * @member {string} [requestId] Post Restore request id. - * @member {string} [azureFileShareUri] Post Restore Azure file share uri. - * @member {string} [status] Post Restore Azure status. - * @member {string} [sourceAzureFileShareUri] Post Restore Azure source azure - * file share uri. - * @member {string} [failedFileList] Post Restore Azure failed file list. - * @member {array} [restoreFileSpec] Post Restore restore file spec array. + * @property {string} [partition] Post Restore partition. + * @property {string} [replicaGroup] Post Restore replica group. + * @property {string} [requestId] Post Restore request id. + * @property {string} [azureFileShareUri] Post Restore Azure file share uri. + * @property {string} [status] Post Restore Azure status. + * @property {string} [sourceAzureFileShareUri] Post Restore Azure source + * azure file share uri. + * @property {string} [failedFileList] Post Restore Azure failed file list. + * @property {array} [restoreFileSpec] Post Restore restore file spec array. */ constructor() { } diff --git a/lib/services/storagesyncManagement/lib/models/preRestoreRequest.js b/lib/services/storagesyncManagement/lib/models/preRestoreRequest.js index 47c2c0e206..a27c3cb8ec 100644 --- a/lib/services/storagesyncManagement/lib/models/preRestoreRequest.js +++ b/lib/services/storagesyncManagement/lib/models/preRestoreRequest.js @@ -17,17 +17,17 @@ class PreRestoreRequest { /** * Create a PreRestoreRequest. - * @member {string} [partition] Pre Restore partition. - * @member {string} [replicaGroup] Pre Restore replica group. - * @member {string} [requestId] Pre Restore request id. - * @member {string} [azureFileShareUri] Pre Restore Azure file share uri. - * @member {string} [status] Pre Restore Azure status. - * @member {string} [sourceAzureFileShareUri] Pre Restore Azure source azure - * file share uri. - * @member {string} [backupMetadataPropertyBag] Pre Restore backup metadata + * @property {string} [partition] Pre Restore partition. + * @property {string} [replicaGroup] Pre Restore replica group. + * @property {string} [requestId] Pre Restore request id. + * @property {string} [azureFileShareUri] Pre Restore Azure file share uri. + * @property {string} [status] Pre Restore Azure status. + * @property {string} [sourceAzureFileShareUri] Pre Restore Azure source + * azure file share uri. + * @property {string} [backupMetadataPropertyBag] Pre Restore backup metadata * property bag. - * @member {array} [restoreFileSpec] Pre Restore restore file spec array. - * @member {number} [pauseWaitForSyncDrainTimePeriodInSeconds] Pre Restore + * @property {array} [restoreFileSpec] Pre Restore restore file spec array. + * @property {number} [pauseWaitForSyncDrainTimePeriodInSeconds] Pre Restore * pause wait for sync drain time period in seconds. */ constructor() { diff --git a/lib/services/storagesyncManagement/lib/models/recallActionParameters.js b/lib/services/storagesyncManagement/lib/models/recallActionParameters.js index 96d1da2872..ed8f8a22ee 100644 --- a/lib/services/storagesyncManagement/lib/models/recallActionParameters.js +++ b/lib/services/storagesyncManagement/lib/models/recallActionParameters.js @@ -17,8 +17,8 @@ class RecallActionParameters { /** * Create a RecallActionParameters. - * @member {string} [pattern] Pattern of the files. - * @member {string} [recallPath] Recall path. + * @property {string} [pattern] Pattern of the files. + * @property {string} [recallPath] Recall path. */ constructor() { } diff --git a/lib/services/storagesyncManagement/lib/models/registeredServer.js b/lib/services/storagesyncManagement/lib/models/registeredServer.js index eb1b371513..1d1c0f1ded 100644 --- a/lib/services/storagesyncManagement/lib/models/registeredServer.js +++ b/lib/services/storagesyncManagement/lib/models/registeredServer.js @@ -20,27 +20,28 @@ const models = require('./index'); class RegisteredServer extends models['ProxyResource'] { /** * Create a RegisteredServer. - * @member {string} [serverCertificate] Registered Server Certificate - * @member {string} [agentVersion] Registered Server Agent Version - * @member {string} [serverOSVersion] Registered Server OS Version - * @member {number} [serverManagementtErrorCode] Registered Server Management - * Error Code - * @member {string} [lastHeartBeat] Registered Server last heart beat - * @member {string} [provisioningState] Registered Server Provisioning State - * @member {string} [serverRole] Registered Server serverRole - * @member {string} [clusterId] Registered Server clusterId - * @member {string} [clusterName] Registered Server clusterName - * @member {string} [serverId] Registered Server serverId - * @member {string} [storageSyncServiceUid] Registered Server + * @property {string} [serverCertificate] Registered Server Certificate + * @property {string} [agentVersion] Registered Server Agent Version + * @property {string} [serverOSVersion] Registered Server OS Version + * @property {number} [serverManagementErrorCode] Registered Server + * Management Error Code + * @property {string} [lastHeartBeat] Registered Server last heart beat + * @property {string} [provisioningState] Registered Server Provisioning + * State + * @property {string} [serverRole] Registered Server serverRole + * @property {string} [clusterId] Registered Server clusterId + * @property {string} [clusterName] Registered Server clusterName + * @property {string} [serverId] Registered Server serverId + * @property {string} [storageSyncServiceUid] Registered Server * storageSyncServiceUid - * @member {string} [lastWorkflowId] Registered Server lastWorkflowId - * @member {string} [lastOperationName] Resource Last Operation Name - * @member {string} [discoveryEndpointUri] Resource discoveryEndpointUri - * @member {string} [resourceLocation] Resource Location - * @member {string} [serviceLocation] Service Location - * @member {string} [friendlyName] Friendly Name - * @member {string} [managementEndpointUri] Management Endpoint Uri - * @member {string} [monitoringConfiguration] Monitoring Configuration + * @property {string} [lastWorkflowId] Registered Server lastWorkflowId + * @property {string} [lastOperationName] Resource Last Operation Name + * @property {string} [discoveryEndpointUri] Resource discoveryEndpointUri + * @property {string} [resourceLocation] Resource Location + * @property {string} [serviceLocation] Service Location + * @property {string} [friendlyName] Friendly Name + * @property {string} [managementEndpointUri] Management Endpoint Uri + * @property {string} [monitoringConfiguration] Monitoring Configuration */ constructor() { super(); @@ -105,9 +106,9 @@ class RegisteredServer extends models['ProxyResource'] { name: 'String' } }, - serverManagementtErrorCode: { + serverManagementErrorCode: { required: false, - serializedName: 'properties.serverManagementtErrorCode', + serializedName: 'properties.serverManagementErrorCode', type: { name: 'Number' } diff --git a/lib/services/storagesyncManagement/lib/models/registeredServerCreateParameters.js b/lib/services/storagesyncManagement/lib/models/registeredServerCreateParameters.js index 0aaa1045fc..6869966ee3 100644 --- a/lib/services/storagesyncManagement/lib/models/registeredServerCreateParameters.js +++ b/lib/services/storagesyncManagement/lib/models/registeredServerCreateParameters.js @@ -20,15 +20,15 @@ const models = require('./index'); class RegisteredServerCreateParameters extends models['ProxyResource'] { /** * Create a RegisteredServerCreateParameters. - * @member {string} [serverCertificate] Registered Server Certificate - * @member {string} [agentVersion] Registered Server Agent Version - * @member {string} [serverOSVersion] Registered Server OS Version - * @member {string} [lastHeartBeat] Registered Server last heart beat - * @member {string} [serverRole] Registered Server serverRole - * @member {string} [clusterId] Registered Server clusterId - * @member {string} [clusterName] Registered Server clusterName - * @member {string} [serverId] Registered Server serverId - * @member {string} [friendlyName] Friendly Name + * @property {string} [serverCertificate] Registered Server Certificate + * @property {string} [agentVersion] Registered Server Agent Version + * @property {string} [serverOSVersion] Registered Server OS Version + * @property {string} [lastHeartBeat] Registered Server last heart beat + * @property {string} [serverRole] Registered Server serverRole + * @property {string} [clusterId] Registered Server clusterId + * @property {string} [clusterName] Registered Server clusterName + * @property {string} [serverId] Registered Server serverId + * @property {string} [friendlyName] Friendly Name */ constructor() { super(); diff --git a/lib/services/storagesyncManagement/lib/models/resource.js b/lib/services/storagesyncManagement/lib/models/resource.js index b9797bc86d..8dc0265e3c 100644 --- a/lib/services/storagesyncManagement/lib/models/resource.js +++ b/lib/services/storagesyncManagement/lib/models/resource.js @@ -19,10 +19,10 @@ const models = require('./index'); class Resource extends models['BaseResource'] { /** * Create a Resource. - * @member {string} [id] Fully qualified resource Id for the resource. Ex - + * @property {string} [id] Fully qualified resource Id for the resource. Ex - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * @member {string} [name] The name of the resource - * @member {string} [type] The type of the resource. Ex- + * @property {string} [name] The name of the resource + * @property {string} [type] The type of the resource. Ex- * Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. */ constructor() { diff --git a/lib/services/storagesyncManagement/lib/models/resourcesMoveInfo.js b/lib/services/storagesyncManagement/lib/models/resourcesMoveInfo.js index a7b26c132f..ea70e628dc 100644 --- a/lib/services/storagesyncManagement/lib/models/resourcesMoveInfo.js +++ b/lib/services/storagesyncManagement/lib/models/resourcesMoveInfo.js @@ -17,8 +17,8 @@ class ResourcesMoveInfo { /** * Create a ResourcesMoveInfo. - * @member {string} [targetResourceGroup] Target resource group. - * @member {array} [resources] Collection of Resources. + * @property {string} [targetResourceGroup] Target resource group. + * @property {array} [resources] Collection of Resources. */ constructor() { } diff --git a/lib/services/storagesyncManagement/lib/models/restoreFileSpec.js b/lib/services/storagesyncManagement/lib/models/restoreFileSpec.js index 1f6eb235f7..419bb0c857 100644 --- a/lib/services/storagesyncManagement/lib/models/restoreFileSpec.js +++ b/lib/services/storagesyncManagement/lib/models/restoreFileSpec.js @@ -17,8 +17,8 @@ class RestoreFileSpec { /** * Create a RestoreFileSpec. - * @member {string} [path] Restore file spec path - * @member {boolean} [isdir] Restore file spec isdir + * @property {string} [path] Restore file spec path + * @property {boolean} [isdir] Restore file spec isdir */ constructor() { } diff --git a/lib/services/storagesyncManagement/lib/models/serverEndpoint.js b/lib/services/storagesyncManagement/lib/models/serverEndpoint.js index 6a7308141f..47cd1540f7 100644 --- a/lib/services/storagesyncManagement/lib/models/serverEndpoint.js +++ b/lib/services/storagesyncManagement/lib/models/serverEndpoint.js @@ -20,18 +20,104 @@ const models = require('./index'); class ServerEndpoint extends models['ProxyResource'] { /** * Create a ServerEndpoint. - * @member {string} [serverLocalPath] Server Local path. - * @member {string} [cloudTiering] Cloud Tiering. Possible values include: + * @property {string} [serverLocalPath] Server Local path. + * @property {string} [cloudTiering] Cloud Tiering. Possible values include: * 'on', 'off' - * @member {number} [volumeFreeSpacePercent] Level of free space to be + * @property {number} [volumeFreeSpacePercent] Level of free space to be * maintained by Cloud Tiering if it is enabled. - * @member {number} [tierFilesOlderThanDays] Tier files older than days. - * @member {string} [friendlyName] Friendly Name - * @member {string} [serverResourceId] Server Resource Id. - * @member {string} [provisioningState] ServerEndpoint Provisioning State - * @member {string} [lastWorkflowId] ServerEndpoint lastWorkflowId - * @member {string} [lastOperationName] Resource Last Operation Name - * @member {object} [syncStatus] Sync Health Status + * @property {number} [tierFilesOlderThanDays] Tier files older than days. + * @property {string} [friendlyName] Friendly Name + * @property {string} [serverResourceId] Server Resource Id. + * @property {string} [provisioningState] ServerEndpoint Provisioning State + * @property {string} [lastWorkflowId] ServerEndpoint lastWorkflowId + * @property {string} [lastOperationName] Resource Last Operation Name + * @property {object} [syncStatus] Server Endpoint sync status + * @property {string} [syncStatus.downloadHealth] Download Health Status. + * Possible values include: 'Healthy', 'Error', 'SyncBlockedForRestore', + * 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' + * @property {string} [syncStatus.uploadHealth] Upload Health Status. + * Possible values include: 'Healthy', 'Error', 'SyncBlockedForRestore', + * 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' + * @property {string} [syncStatus.combinedHealth] Combined Health Status. + * Possible values include: 'Healthy', 'Error', 'SyncBlockedForRestore', + * 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' + * @property {string} [syncStatus.syncActivity] Sync activity. Possible + * values include: 'Upload', 'Download', 'UploadAndDownload' + * @property {number} [syncStatus.totalPersistentFilesNotSyncingCount] Total + * count of persistent files not syncing (combined upload + download). + * Reserved for future use. + * @property {date} [syncStatus.lastUpdatedTimestamp] Last Updated Timestamp + * @property {object} [syncStatus.uploadStatus] Upload Status + * @property {number} [syncStatus.uploadStatus.lastSyncResult] Last sync + * status + * @property {date} [syncStatus.uploadStatus.lastSyncTimestamp] Last sync + * timestamp + * @property {date} [syncStatus.uploadStatus.lastSyncSuccessTimestamp] Last + * sync success timestamp + * @property {number} [syncStatus.uploadStatus.lastSyncPerItemErrorCount] + * Last sync per item error count. + * @property {number} + * [syncStatus.uploadStatus.persistentFilesNotSyncingCount] Count of + * persistent files not syncing. Reserved for future use. + * @property {number} [syncStatus.uploadStatus.transientFilesNotSyncingCount] + * Count of transient files not syncing. Reserved for future use. + * @property {array} [syncStatus.uploadStatus.filesNotSyncingErrors] Array of + * per-item errors coming from the last sync session. Reserved for future + * use. + * @property {object} [syncStatus.downloadStatus] Download Status + * @property {number} [syncStatus.downloadStatus.lastSyncResult] Last sync + * status + * @property {date} [syncStatus.downloadStatus.lastSyncTimestamp] Last sync + * timestamp + * @property {date} [syncStatus.downloadStatus.lastSyncSuccessTimestamp] Last + * sync success timestamp + * @property {number} [syncStatus.downloadStatus.lastSyncPerItemErrorCount] + * Last sync per item error count. + * @property {number} + * [syncStatus.downloadStatus.persistentFilesNotSyncingCount] Count of + * persistent files not syncing. Reserved for future use. + * @property {number} + * [syncStatus.downloadStatus.transientFilesNotSyncingCount] Count of + * transient files not syncing. Reserved for future use. + * @property {array} [syncStatus.downloadStatus.filesNotSyncingErrors] Array + * of per-item errors coming from the last sync session. Reserved for future + * use. + * @property {object} [syncStatus.uploadActivity] Upload sync activity + * @property {date} [syncStatus.uploadActivity.timestamp] Timestamp when + * properties were updated + * @property {number} [syncStatus.uploadActivity.perItemErrorCount] Per item + * error count + * @property {number} [syncStatus.uploadActivity.appliedItemCount] Applied + * item count. + * @property {number} [syncStatus.uploadActivity.totalItemCount] Total item + * count (if available) + * @property {number} [syncStatus.uploadActivity.appliedBytes] Applied bytes + * @property {number} [syncStatus.uploadActivity.totalBytes] Total bytes (if + * available) + * @property {object} [syncStatus.downloadActivity] Download sync activity + * @property {date} [syncStatus.downloadActivity.timestamp] Timestamp when + * properties were updated + * @property {number} [syncStatus.downloadActivity.perItemErrorCount] Per + * item error count + * @property {number} [syncStatus.downloadActivity.appliedItemCount] Applied + * item count. + * @property {number} [syncStatus.downloadActivity.totalItemCount] Total item + * count (if available) + * @property {number} [syncStatus.downloadActivity.appliedBytes] Applied + * bytes + * @property {number} [syncStatus.downloadActivity.totalBytes] Total bytes + * (if available) + * @property {string} [syncStatus.offlineDataTransferStatus] Offline Data + * Transfer State. Possible values include: 'InProgress', 'Stopping', + * 'NotRunning', 'Complete' + * @property {string} [offlineDataTransfer] Offline data transfer. Possible + * values include: 'on', 'off' + * @property {string} [offlineDataTransferStorageAccountResourceId] Offline + * data transfer storage account resource ID + * @property {string} [offlineDataTransferStorageAccountTenantId] Offline + * data transfer storage account tenant ID + * @property {string} [offlineDataTransferShareName] Offline data transfer + * share name */ constructor() { super(); @@ -148,9 +234,41 @@ class ServerEndpoint extends models['ProxyResource'] { }, syncStatus: { required: false, + readOnly: true, serializedName: 'properties.syncStatus', type: { - name: 'Object' + name: 'Composite', + className: 'ServerEndpointSyncStatus' + } + }, + offlineDataTransfer: { + required: false, + serializedName: 'properties.offlineDataTransfer', + type: { + name: 'String' + } + }, + offlineDataTransferStorageAccountResourceId: { + required: false, + readOnly: true, + serializedName: 'properties.offlineDataTransferStorageAccountResourceId', + type: { + name: 'String' + } + }, + offlineDataTransferStorageAccountTenantId: { + required: false, + readOnly: true, + serializedName: 'properties.offlineDataTransferStorageAccountTenantId', + type: { + name: 'String' + } + }, + offlineDataTransferShareName: { + required: false, + serializedName: 'properties.offlineDataTransferShareName', + type: { + name: 'String' } } } diff --git a/lib/services/storagesyncManagement/lib/models/serverEndpointCreateParameters.js b/lib/services/storagesyncManagement/lib/models/serverEndpointCreateParameters.js index fe0c1bcd95..609c5f2131 100644 --- a/lib/services/storagesyncManagement/lib/models/serverEndpointCreateParameters.js +++ b/lib/services/storagesyncManagement/lib/models/serverEndpointCreateParameters.js @@ -20,14 +20,18 @@ const models = require('./index'); class ServerEndpointCreateParameters extends models['ProxyResource'] { /** * Create a ServerEndpointCreateParameters. - * @member {string} [serverLocalPath] Server Local path. - * @member {string} [cloudTiering] Cloud Tiering. Possible values include: + * @property {string} [serverLocalPath] Server Local path. + * @property {string} [cloudTiering] Cloud Tiering. Possible values include: * 'on', 'off' - * @member {number} [volumeFreeSpacePercent] Level of free space to be + * @property {number} [volumeFreeSpacePercent] Level of free space to be * maintained by Cloud Tiering if it is enabled. - * @member {number} [tierFilesOlderThanDays] Tier files older than days. - * @member {string} [friendlyName] Friendly Name - * @member {string} [serverResourceId] Server Resource Id. + * @property {number} [tierFilesOlderThanDays] Tier files older than days. + * @property {string} [friendlyName] Friendly Name + * @property {string} [serverResourceId] Server Resource Id. + * @property {string} [offlineDataTransfer] Offline data transfer. Possible + * values include: 'on', 'off' + * @property {string} [offlineDataTransferShareName] Offline data transfer + * share name */ constructor() { super(); @@ -120,6 +124,20 @@ class ServerEndpointCreateParameters extends models['ProxyResource'] { type: { name: 'String' } + }, + offlineDataTransfer: { + required: false, + serializedName: 'properties.offlineDataTransfer', + type: { + name: 'String' + } + }, + offlineDataTransferShareName: { + required: false, + serializedName: 'properties.offlineDataTransferShareName', + type: { + name: 'String' + } } } } diff --git a/lib/services/storagesyncManagement/lib/models/serverEndpointSyncStatus.js b/lib/services/storagesyncManagement/lib/models/serverEndpointSyncStatus.js new file mode 100644 index 0000000000..c66396cf28 --- /dev/null +++ b/lib/services/storagesyncManagement/lib/models/serverEndpointSyncStatus.js @@ -0,0 +1,204 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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'; + +/** + * Server Endpoint sync status + * + */ +class ServerEndpointSyncStatus { + /** + * Create a ServerEndpointSyncStatus. + * @property {string} [downloadHealth] Download Health Status. Possible + * values include: 'Healthy', 'Error', 'SyncBlockedForRestore', + * 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' + * @property {string} [uploadHealth] Upload Health Status. Possible values + * include: 'Healthy', 'Error', 'SyncBlockedForRestore', + * 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' + * @property {string} [combinedHealth] Combined Health Status. Possible + * values include: 'Healthy', 'Error', 'SyncBlockedForRestore', + * 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' + * @property {string} [syncActivity] Sync activity. Possible values include: + * 'Upload', 'Download', 'UploadAndDownload' + * @property {number} [totalPersistentFilesNotSyncingCount] Total count of + * persistent files not syncing (combined upload + download). Reserved for + * future use. + * @property {date} [lastUpdatedTimestamp] Last Updated Timestamp + * @property {object} [uploadStatus] Upload Status + * @property {number} [uploadStatus.lastSyncResult] Last sync status + * @property {date} [uploadStatus.lastSyncTimestamp] Last sync timestamp + * @property {date} [uploadStatus.lastSyncSuccessTimestamp] Last sync success + * timestamp + * @property {number} [uploadStatus.lastSyncPerItemErrorCount] Last sync per + * item error count. + * @property {number} [uploadStatus.persistentFilesNotSyncingCount] Count of + * persistent files not syncing. Reserved for future use. + * @property {number} [uploadStatus.transientFilesNotSyncingCount] Count of + * transient files not syncing. Reserved for future use. + * @property {array} [uploadStatus.filesNotSyncingErrors] Array of per-item + * errors coming from the last sync session. Reserved for future use. + * @property {object} [downloadStatus] Download Status + * @property {number} [downloadStatus.lastSyncResult] Last sync status + * @property {date} [downloadStatus.lastSyncTimestamp] Last sync timestamp + * @property {date} [downloadStatus.lastSyncSuccessTimestamp] Last sync + * success timestamp + * @property {number} [downloadStatus.lastSyncPerItemErrorCount] Last sync + * per item error count. + * @property {number} [downloadStatus.persistentFilesNotSyncingCount] Count + * of persistent files not syncing. Reserved for future use. + * @property {number} [downloadStatus.transientFilesNotSyncingCount] Count of + * transient files not syncing. Reserved for future use. + * @property {array} [downloadStatus.filesNotSyncingErrors] Array of per-item + * errors coming from the last sync session. Reserved for future use. + * @property {object} [uploadActivity] Upload sync activity + * @property {date} [uploadActivity.timestamp] Timestamp when properties were + * updated + * @property {number} [uploadActivity.perItemErrorCount] Per item error count + * @property {number} [uploadActivity.appliedItemCount] Applied item count. + * @property {number} [uploadActivity.totalItemCount] Total item count (if + * available) + * @property {number} [uploadActivity.appliedBytes] Applied bytes + * @property {number} [uploadActivity.totalBytes] Total bytes (if available) + * @property {object} [downloadActivity] Download sync activity + * @property {date} [downloadActivity.timestamp] Timestamp when properties + * were updated + * @property {number} [downloadActivity.perItemErrorCount] Per item error + * count + * @property {number} [downloadActivity.appliedItemCount] Applied item count. + * @property {number} [downloadActivity.totalItemCount] Total item count (if + * available) + * @property {number} [downloadActivity.appliedBytes] Applied bytes + * @property {number} [downloadActivity.totalBytes] Total bytes (if + * available) + * @property {string} [offlineDataTransferStatus] Offline Data Transfer + * State. Possible values include: 'InProgress', 'Stopping', 'NotRunning', + * 'Complete' + */ + constructor() { + } + + /** + * Defines the metadata of ServerEndpointSyncStatus + * + * @returns {object} metadata of ServerEndpointSyncStatus + * + */ + mapper() { + return { + required: false, + serializedName: 'ServerEndpointSyncStatus', + type: { + name: 'Composite', + className: 'ServerEndpointSyncStatus', + modelProperties: { + downloadHealth: { + required: false, + readOnly: true, + serializedName: 'downloadHealth', + type: { + name: 'String' + } + }, + uploadHealth: { + required: false, + readOnly: true, + serializedName: 'uploadHealth', + type: { + name: 'String' + } + }, + combinedHealth: { + required: false, + readOnly: true, + serializedName: 'combinedHealth', + type: { + name: 'String' + } + }, + syncActivity: { + required: false, + readOnly: true, + serializedName: 'syncActivity', + type: { + name: 'String' + } + }, + totalPersistentFilesNotSyncingCount: { + required: false, + readOnly: true, + serializedName: 'totalPersistentFilesNotSyncingCount', + constraints: { + InclusiveMaximum: 2147483647, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + lastUpdatedTimestamp: { + required: false, + readOnly: true, + serializedName: 'lastUpdatedTimestamp', + type: { + name: 'DateTime' + } + }, + uploadStatus: { + required: false, + readOnly: true, + serializedName: 'uploadStatus', + type: { + name: 'Composite', + className: 'SyncSessionStatus' + } + }, + downloadStatus: { + required: false, + readOnly: true, + serializedName: 'downloadStatus', + type: { + name: 'Composite', + className: 'SyncSessionStatus' + } + }, + uploadActivity: { + required: false, + readOnly: true, + serializedName: 'uploadActivity', + type: { + name: 'Composite', + className: 'SyncActivityStatus' + } + }, + downloadActivity: { + required: false, + readOnly: true, + serializedName: 'downloadActivity', + type: { + name: 'Composite', + className: 'SyncActivityStatus' + } + }, + offlineDataTransferStatus: { + required: false, + readOnly: true, + serializedName: 'offlineDataTransferStatus', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ServerEndpointSyncStatus; diff --git a/lib/services/storagesyncManagement/lib/models/serverEndpointUpdateParameters.js b/lib/services/storagesyncManagement/lib/models/serverEndpointUpdateParameters.js index dc2722d596..b53680fa4d 100644 --- a/lib/services/storagesyncManagement/lib/models/serverEndpointUpdateParameters.js +++ b/lib/services/storagesyncManagement/lib/models/serverEndpointUpdateParameters.js @@ -17,11 +17,15 @@ class ServerEndpointUpdateParameters { /** * Create a ServerEndpointUpdateParameters. - * @member {string} [cloudTiering] Cloud Tiering. Possible values include: + * @property {string} [cloudTiering] Cloud Tiering. Possible values include: * 'on', 'off' - * @member {number} [volumeFreeSpacePercent] Level of free space to be + * @property {number} [volumeFreeSpacePercent] Level of free space to be * maintained by Cloud Tiering if it is enabled. - * @member {number} [tierFilesOlderThanDays] Tier files older than days. + * @property {number} [tierFilesOlderThanDays] Tier files older than days. + * @property {string} [offlineDataTransfer] Offline data transfer. Possible + * values include: 'on', 'off' + * @property {string} [offlineDataTransferShareName] Offline data transfer + * share name */ constructor() { } @@ -68,6 +72,20 @@ class ServerEndpointUpdateParameters { type: { name: 'Number' } + }, + offlineDataTransfer: { + required: false, + serializedName: 'properties.offlineDataTransfer', + type: { + name: 'String' + } + }, + offlineDataTransferShareName: { + required: false, + serializedName: 'properties.offlineDataTransferShareName', + type: { + name: 'String' + } } } } diff --git a/lib/services/storagesyncManagement/lib/models/storageSyncApiError.js b/lib/services/storagesyncManagement/lib/models/storageSyncApiError.js index 553ef6142a..edff1960c7 100644 --- a/lib/services/storagesyncManagement/lib/models/storageSyncApiError.js +++ b/lib/services/storagesyncManagement/lib/models/storageSyncApiError.js @@ -17,13 +17,13 @@ class StorageSyncApiError { /** * Create a StorageSyncApiError. - * @member {string} [code] Error code of the given entry. - * @member {string} [message] Error message of the given entry. - * @member {string} [target] Target of the given error entry. - * @member {object} [details] Error details of the given entry. - * @member {string} [details.code] Error code of the given entry. - * @member {string} [details.message] Error message of the given entry. - * @member {string} [details.target] Target of the given entry. + * @property {string} [code] Error code of the given entry. + * @property {string} [message] Error message of the given entry. + * @property {string} [target] Target of the given error entry. + * @property {object} [details] Error details of the given entry. + * @property {string} [details.code] Error code of the given entry. + * @property {string} [details.message] Error message of the given entry. + * @property {string} [details.target] Target of the given entry. */ constructor() { } diff --git a/lib/services/storagesyncManagement/lib/models/storageSyncError.js b/lib/services/storagesyncManagement/lib/models/storageSyncError.js index 69cb149ebd..c4732f5250 100644 --- a/lib/services/storagesyncManagement/lib/models/storageSyncError.js +++ b/lib/services/storagesyncManagement/lib/models/storageSyncError.js @@ -17,23 +17,25 @@ class StorageSyncError { /** * Create a StorageSyncError. - * @member {object} [error] Error details of the given entry. - * @member {string} [error.code] Error code of the given entry. - * @member {string} [error.message] Error message of the given entry. - * @member {string} [error.target] Target of the given error entry. - * @member {object} [error.details] Error details of the given entry. - * @member {string} [error.details.code] Error code of the given entry. - * @member {string} [error.details.message] Error message of the given entry. - * @member {string} [error.details.target] Target of the given entry. - * @member {object} [innererror] Error details of the given entry. - * @member {string} [innererror.code] Error code of the given entry. - * @member {string} [innererror.message] Error message of the given entry. - * @member {string} [innererror.target] Target of the given error entry. - * @member {object} [innererror.details] Error details of the given entry. - * @member {string} [innererror.details.code] Error code of the given entry. - * @member {string} [innererror.details.message] Error message of the given + * @property {object} [error] Error details of the given entry. + * @property {string} [error.code] Error code of the given entry. + * @property {string} [error.message] Error message of the given entry. + * @property {string} [error.target] Target of the given error entry. + * @property {object} [error.details] Error details of the given entry. + * @property {string} [error.details.code] Error code of the given entry. + * @property {string} [error.details.message] Error message of the given * entry. - * @member {string} [innererror.details.target] Target of the given entry. + * @property {string} [error.details.target] Target of the given entry. + * @property {object} [innererror] Error details of the given entry. + * @property {string} [innererror.code] Error code of the given entry. + * @property {string} [innererror.message] Error message of the given entry. + * @property {string} [innererror.target] Target of the given error entry. + * @property {object} [innererror.details] Error details of the given entry. + * @property {string} [innererror.details.code] Error code of the given + * entry. + * @property {string} [innererror.details.message] Error message of the given + * entry. + * @property {string} [innererror.details.target] Target of the given entry. */ constructor() { } diff --git a/lib/services/storagesyncManagement/lib/models/storageSyncErrorDetails.js b/lib/services/storagesyncManagement/lib/models/storageSyncErrorDetails.js index d8fe07560a..19547b0627 100644 --- a/lib/services/storagesyncManagement/lib/models/storageSyncErrorDetails.js +++ b/lib/services/storagesyncManagement/lib/models/storageSyncErrorDetails.js @@ -17,9 +17,9 @@ class StorageSyncErrorDetails { /** * Create a StorageSyncErrorDetails. - * @member {string} [code] Error code of the given entry. - * @member {string} [message] Error message of the given entry. - * @member {string} [target] Target of the given entry. + * @property {string} [code] Error code of the given entry. + * @property {string} [message] Error message of the given entry. + * @property {string} [target] Target of the given entry. */ constructor() { } diff --git a/lib/services/storagesyncManagement/lib/models/storageSyncService.js b/lib/services/storagesyncManagement/lib/models/storageSyncService.js index 3ec28e3fab..1897f08897 100644 --- a/lib/services/storagesyncManagement/lib/models/storageSyncService.js +++ b/lib/services/storagesyncManagement/lib/models/storageSyncService.js @@ -20,8 +20,8 @@ const models = require('./index'); class StorageSyncService extends models['TrackedResource'] { /** * Create a StorageSyncService. - * @member {number} [storageSyncServiceStatus] Storage Sync service status. - * @member {string} [storageSyncServiceUid] Storage Sync service Uid + * @property {number} [storageSyncServiceStatus] Storage Sync service status. + * @property {string} [storageSyncServiceUid] Storage Sync service Uid */ constructor() { super(); diff --git a/lib/services/storagesyncManagement/lib/models/storageSyncServiceCreateParameters.js b/lib/services/storagesyncManagement/lib/models/storageSyncServiceCreateParameters.js index 776dcaf1fc..ed112c727f 100644 --- a/lib/services/storagesyncManagement/lib/models/storageSyncServiceCreateParameters.js +++ b/lib/services/storagesyncManagement/lib/models/storageSyncServiceCreateParameters.js @@ -17,18 +17,18 @@ class StorageSyncServiceCreateParameters { /** * Create a StorageSyncServiceCreateParameters. - * @member {string} location Required. Gets or sets the location of the + * @property {string} location Required. Gets or sets the location of the * resource. This will be one of the supported and registered Azure Geo * Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a * resource cannot be changed once it is created, but if an identical geo * region is specified on update, the request will succeed. - * @member {object} [tags] Gets or sets a list of key value pairs that + * @property {object} [tags] Gets or sets a list of key value pairs that * describe the resource. These tags can be used for viewing and grouping * this resource (across resource groups). A maximum of 15 tags can be * provided for a resource. Each tag must have a key with a length no greater * than 128 characters and a value with a length no greater than 256 * characters. - * @member {object} [properties] + * @property {object} [properties] */ constructor() { } diff --git a/lib/services/storagesyncManagement/lib/models/storageSyncServiceUpdateParameters.js b/lib/services/storagesyncManagement/lib/models/storageSyncServiceUpdateParameters.js index 68506e6955..923e939146 100644 --- a/lib/services/storagesyncManagement/lib/models/storageSyncServiceUpdateParameters.js +++ b/lib/services/storagesyncManagement/lib/models/storageSyncServiceUpdateParameters.js @@ -17,9 +17,10 @@ class StorageSyncServiceUpdateParameters { /** * Create a StorageSyncServiceUpdateParameters. - * @member {object} [tags] The user-specified tags associated with the + * @property {object} [tags] The user-specified tags associated with the * storage sync service. - * @member {object} [properties] The properties of the storage sync service. + * @property {object} [properties] The properties of the storage sync + * service. */ constructor() { } diff --git a/lib/services/storagesyncManagement/lib/models/subscriptionState.js b/lib/services/storagesyncManagement/lib/models/subscriptionState.js index cf77bf1f05..8980ed4e02 100644 --- a/lib/services/storagesyncManagement/lib/models/subscriptionState.js +++ b/lib/services/storagesyncManagement/lib/models/subscriptionState.js @@ -17,10 +17,10 @@ class SubscriptionState { /** * Create a SubscriptionState. - * @member {string} [state] State of Azure Subscription. Possible values + * @property {string} [state] State of Azure Subscription. Possible values * include: 'Registered', 'Unregistered', 'Warned', 'Suspended', 'Deleted' - * @member {boolean} [istransitioning] Is Transitioning - * @member {object} [properties] Subscription state properties. + * @property {boolean} [istransitioning] Is Transitioning + * @property {object} [properties] Subscription state properties. */ constructor() { } diff --git a/lib/services/storagesyncManagement/lib/models/syncActivityStatus.js b/lib/services/storagesyncManagement/lib/models/syncActivityStatus.js new file mode 100644 index 0000000000..bc8453ed02 --- /dev/null +++ b/lib/services/storagesyncManagement/lib/models/syncActivityStatus.js @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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'; + +/** + * Sync Session status object. + * + */ +class SyncActivityStatus { + /** + * Create a SyncActivityStatus. + * @property {date} [timestamp] Timestamp when properties were updated + * @property {number} [perItemErrorCount] Per item error count + * @property {number} [appliedItemCount] Applied item count. + * @property {number} [totalItemCount] Total item count (if available) + * @property {number} [appliedBytes] Applied bytes + * @property {number} [totalBytes] Total bytes (if available) + */ + constructor() { + } + + /** + * Defines the metadata of SyncActivityStatus + * + * @returns {object} metadata of SyncActivityStatus + * + */ + mapper() { + return { + required: false, + serializedName: 'SyncActivityStatus', + type: { + name: 'Composite', + className: 'SyncActivityStatus', + modelProperties: { + timestamp: { + required: false, + readOnly: true, + serializedName: 'timestamp', + type: { + name: 'DateTime' + } + }, + perItemErrorCount: { + required: false, + readOnly: true, + serializedName: 'perItemErrorCount', + constraints: { + InclusiveMaximum: 2147483647, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + appliedItemCount: { + required: false, + readOnly: true, + serializedName: 'appliedItemCount', + constraints: { + InclusiveMaximum: 2147483647, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + totalItemCount: { + required: false, + readOnly: true, + serializedName: 'totalItemCount', + constraints: { + InclusiveMaximum: 2147483647, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + appliedBytes: { + required: false, + readOnly: true, + serializedName: 'appliedBytes', + constraints: { + InclusiveMaximum: 2147483647, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + totalBytes: { + required: false, + readOnly: true, + serializedName: 'totalBytes', + constraints: { + InclusiveMaximum: 2147483647, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = SyncActivityStatus; diff --git a/lib/services/storagesyncManagement/lib/models/syncGroup.js b/lib/services/storagesyncManagement/lib/models/syncGroup.js index d66fe945b0..17452beebe 100644 --- a/lib/services/storagesyncManagement/lib/models/syncGroup.js +++ b/lib/services/storagesyncManagement/lib/models/syncGroup.js @@ -20,8 +20,8 @@ const models = require('./index'); class SyncGroup extends models['ProxyResource'] { /** * Create a SyncGroup. - * @member {string} [uniqueId] Unique Id - * @member {string} [syncGroupStatus] Sync group status + * @property {string} [uniqueId] Unique Id + * @property {string} [syncGroupStatus] Sync group status */ constructor() { super(); diff --git a/lib/services/storagesyncManagement/lib/models/syncGroupCreateParameters.js b/lib/services/storagesyncManagement/lib/models/syncGroupCreateParameters.js index 1dd6690814..312ebb7e13 100644 --- a/lib/services/storagesyncManagement/lib/models/syncGroupCreateParameters.js +++ b/lib/services/storagesyncManagement/lib/models/syncGroupCreateParameters.js @@ -20,7 +20,8 @@ const models = require('./index'); class SyncGroupCreateParameters extends models['ProxyResource'] { /** * Create a SyncGroupCreateParameters. - * @member {object} [properties] The parameters used to create the sync group + * @property {object} [properties] The parameters used to create the sync + * group */ constructor() { super(); diff --git a/lib/services/storagesyncManagement/lib/models/syncSessionStatus.js b/lib/services/storagesyncManagement/lib/models/syncSessionStatus.js new file mode 100644 index 0000000000..ebbe9f041f --- /dev/null +++ b/lib/services/storagesyncManagement/lib/models/syncSessionStatus.js @@ -0,0 +1,130 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * 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'; + +/** + * Sync Session status object. + * + */ +class SyncSessionStatus { + /** + * Create a SyncSessionStatus. + * @property {number} [lastSyncResult] Last sync status + * @property {date} [lastSyncTimestamp] Last sync timestamp + * @property {date} [lastSyncSuccessTimestamp] Last sync success timestamp + * @property {number} [lastSyncPerItemErrorCount] Last sync per item error + * count. + * @property {number} [persistentFilesNotSyncingCount] Count of persistent + * files not syncing. Reserved for future use. + * @property {number} [transientFilesNotSyncingCount] Count of transient + * files not syncing. Reserved for future use. + * @property {array} [filesNotSyncingErrors] Array of per-item errors coming + * from the last sync session. Reserved for future use. + */ + constructor() { + } + + /** + * Defines the metadata of SyncSessionStatus + * + * @returns {object} metadata of SyncSessionStatus + * + */ + mapper() { + return { + required: false, + serializedName: 'SyncSessionStatus', + type: { + name: 'Composite', + className: 'SyncSessionStatus', + modelProperties: { + lastSyncResult: { + required: false, + readOnly: true, + serializedName: 'lastSyncResult', + type: { + name: 'Number' + } + }, + lastSyncTimestamp: { + required: false, + readOnly: true, + serializedName: 'lastSyncTimestamp', + type: { + name: 'DateTime' + } + }, + lastSyncSuccessTimestamp: { + required: false, + readOnly: true, + serializedName: 'lastSyncSuccessTimestamp', + type: { + name: 'DateTime' + } + }, + lastSyncPerItemErrorCount: { + required: false, + serializedName: 'lastSyncPerItemErrorCount', + constraints: { + InclusiveMaximum: 2147483647, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + persistentFilesNotSyncingCount: { + required: false, + readOnly: true, + serializedName: 'persistentFilesNotSyncingCount', + constraints: { + InclusiveMaximum: 2147483647, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + transientFilesNotSyncingCount: { + required: false, + readOnly: true, + serializedName: 'transientFilesNotSyncingCount', + constraints: { + InclusiveMaximum: 2147483647, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + filesNotSyncingErrors: { + required: false, + readOnly: true, + serializedName: 'filesNotSyncingErrors', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'FilesNotSyncingErrorElementType', + type: { + name: 'Composite', + className: 'FilesNotSyncingError' + } + } + } + } + } + } + }; + } +} + +module.exports = SyncSessionStatus; diff --git a/lib/services/storagesyncManagement/lib/models/trackedResource.js b/lib/services/storagesyncManagement/lib/models/trackedResource.js index 5c6804d7c8..d74a5106d9 100644 --- a/lib/services/storagesyncManagement/lib/models/trackedResource.js +++ b/lib/services/storagesyncManagement/lib/models/trackedResource.js @@ -20,8 +20,8 @@ const models = require('./index'); class TrackedResource extends models['Resource'] { /** * Create a TrackedResource. - * @member {object} [tags] Resource tags. - * @member {string} location The geo-location where the resource lives + * @property {object} [tags] Resource tags. + * @property {string} location The geo-location where the resource lives */ constructor() { super(); diff --git a/lib/services/storagesyncManagement/lib/models/triggerRolloverRequest.js b/lib/services/storagesyncManagement/lib/models/triggerRolloverRequest.js index 550c7094eb..cc20f0d36d 100644 --- a/lib/services/storagesyncManagement/lib/models/triggerRolloverRequest.js +++ b/lib/services/storagesyncManagement/lib/models/triggerRolloverRequest.js @@ -17,7 +17,7 @@ class TriggerRolloverRequest { /** * Create a TriggerRolloverRequest. - * @member {string} [serverCertificate] Certificate Data + * @property {string} [serverCertificate] Certificate Data */ constructor() { } diff --git a/lib/services/storagesyncManagement/lib/models/workflow.js b/lib/services/storagesyncManagement/lib/models/workflow.js index b6fcb81fed..81dd87ebde 100644 --- a/lib/services/storagesyncManagement/lib/models/workflow.js +++ b/lib/services/storagesyncManagement/lib/models/workflow.js @@ -20,13 +20,13 @@ const models = require('./index'); class Workflow extends models['ProxyResource'] { /** * Create a Workflow. - * @member {string} [lastStepName] last step name - * @member {string} [status] workflow status. Possible values include: + * @property {string} [lastStepName] last step name + * @property {string} [status] workflow status. Possible values include: * 'active', 'expired', 'succeeded', 'aborted', 'failed' - * @member {string} [operation] operation direction. Possible values include: - * 'do', 'undo', 'cancel' - * @member {string} [steps] workflow steps - * @member {string} [lastOperationId] workflow last operation identifier. + * @property {string} [operation] operation direction. Possible values + * include: 'do', 'undo', 'cancel' + * @property {string} [steps] workflow steps + * @property {string} [lastOperationId] workflow last operation identifier. */ constructor() { super(); diff --git a/lib/services/storagesyncManagement/lib/operations/index.d.ts b/lib/services/storagesyncManagement/lib/operations/index.d.ts index 5f7784e7ed..d7f49448d4 100644 --- a/lib/services/storagesyncManagement/lib/operations/index.d.ts +++ b/lib/services/storagesyncManagement/lib/operations/index.d.ts @@ -2261,6 +2261,12 @@ export interface ServerEndpoints { * * @param {string} [parameters.serverResourceId] Server Resource Id. * + * @param {string} [parameters.offlineDataTransfer] Offline data transfer. + * Possible values include: 'on', 'off' + * + * @param {string} [parameters.offlineDataTransferShareName] Offline data + * transfer share name + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2304,6 +2310,12 @@ export interface ServerEndpoints { * * @param {string} [parameters.serverResourceId] Server Resource Id. * + * @param {string} [parameters.offlineDataTransfer] Offline data transfer. + * Possible values include: 'on', 'off' + * + * @param {string} [parameters.offlineDataTransferShareName] Offline data + * transfer share name + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2363,6 +2375,12 @@ export interface ServerEndpoints { * @param {number} [options.parameters.tierFilesOlderThanDays] Tier files older * than days. * + * @param {string} [options.parameters.offlineDataTransfer] Offline data + * transfer. Possible values include: 'on', 'off' + * + * @param {string} [options.parameters.offlineDataTransferShareName] Offline + * data transfer share name + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2401,6 +2419,12 @@ export interface ServerEndpoints { * @param {number} [options.parameters.tierFilesOlderThanDays] Tier files older * than days. * + * @param {string} [options.parameters.offlineDataTransfer] Offline data + * transfer. Possible values include: 'on', 'off' + * + * @param {string} [options.parameters.offlineDataTransferShareName] Offline + * data transfer share name + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2640,7 +2664,7 @@ export interface ServerEndpoints { /** - * Recall a serverendpoint. + * Recall a server endpoint. * * @param {string} resourceGroupName The name of the resource group. The name * is case insensitive. @@ -2672,7 +2696,7 @@ export interface ServerEndpoints { recallActionWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.RecallActionParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Recall a serverendpoint. + * Recall a server endpoint. * * @param {string} resourceGroupName The name of the resource group. The name * is case insensitive. @@ -2751,6 +2775,12 @@ export interface ServerEndpoints { * * @param {string} [parameters.serverResourceId] Server Resource Id. * + * @param {string} [parameters.offlineDataTransfer] Offline data transfer. + * Possible values include: 'on', 'off' + * + * @param {string} [parameters.offlineDataTransferShareName] Offline data + * transfer share name + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2794,6 +2824,12 @@ export interface ServerEndpoints { * * @param {string} [parameters.serverResourceId] Server Resource Id. * + * @param {string} [parameters.offlineDataTransfer] Offline data transfer. + * Possible values include: 'on', 'off' + * + * @param {string} [parameters.offlineDataTransferShareName] Offline data + * transfer share name + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2853,6 +2889,12 @@ export interface ServerEndpoints { * @param {number} [options.parameters.tierFilesOlderThanDays] Tier files older * than days. * + * @param {string} [options.parameters.offlineDataTransfer] Offline data + * transfer. Possible values include: 'on', 'off' + * + * @param {string} [options.parameters.offlineDataTransferShareName] Offline + * data transfer share name + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2891,6 +2933,12 @@ export interface ServerEndpoints { * @param {number} [options.parameters.tierFilesOlderThanDays] Tier files older * than days. * + * @param {string} [options.parameters.offlineDataTransfer] Offline data + * transfer. Possible values include: 'on', 'off' + * + * @param {string} [options.parameters.offlineDataTransferShareName] Offline + * data transfer share name + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2992,7 +3040,7 @@ export interface ServerEndpoints { /** - * Recall a serverendpoint. + * Recall a server endpoint. * * @param {string} resourceGroupName The name of the resource group. The name * is case insensitive. @@ -3024,7 +3072,7 @@ export interface ServerEndpoints { beginRecallActionWithHttpOperationResponse(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: models.RecallActionParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Recall a serverendpoint. + * Recall a server endpoint. * * @param {string} resourceGroupName The name of the resource group. The name * is case insensitive. diff --git a/lib/services/storagesyncManagement/lib/operations/serverEndpoints.js b/lib/services/storagesyncManagement/lib/operations/serverEndpoints.js index fd0a566b95..8c1eb2be71 100644 --- a/lib/services/storagesyncManagement/lib/operations/serverEndpoints.js +++ b/lib/services/storagesyncManagement/lib/operations/serverEndpoints.js @@ -45,6 +45,12 @@ const WebResource = msRest.WebResource; * * @param {string} [parameters.serverResourceId] Server Resource Id. * + * @param {string} [parameters.offlineDataTransfer] Offline data transfer. + * Possible values include: 'on', 'off' + * + * @param {string} [parameters.offlineDataTransferShareName] Offline data + * transfer share name + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -143,6 +149,12 @@ function _create(resourceGroupName, storageSyncServiceName, syncGroupName, serve * @param {number} [options.parameters.tierFilesOlderThanDays] Tier files older * than days. * + * @param {string} [options.parameters.offlineDataTransfer] Offline data + * transfer. Possible values include: 'on', 'off' + * + * @param {string} [options.parameters.offlineDataTransferShareName] Offline + * data transfer share name + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -648,7 +660,7 @@ function _listBySyncGroup(resourceGroupName, storageSyncServiceName, syncGroupNa /** - * Recall a serverendpoint. + * Recall a server endpoint. * * @param {string} resourceGroupName The name of the resource group. The name * is case insensitive. @@ -751,6 +763,12 @@ function _recallAction(resourceGroupName, storageSyncServiceName, syncGroupName, * * @param {string} [parameters.serverResourceId] Server Resource Id. * + * @param {string} [parameters.offlineDataTransfer] Offline data transfer. + * Possible values include: 'on', 'off' + * + * @param {string} [parameters.offlineDataTransferShareName] Offline data + * transfer share name + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -968,6 +986,12 @@ function _beginCreate(resourceGroupName, storageSyncServiceName, syncGroupName, * @param {number} [options.parameters.tierFilesOlderThanDays] Tier files older * than days. * + * @param {string} [options.parameters.offlineDataTransfer] Offline data + * transfer. Possible values include: 'on', 'off' + * + * @param {string} [options.parameters.offlineDataTransferShareName] Offline + * data transfer share name + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1323,7 +1347,7 @@ function _beginDeleteMethod(resourceGroupName, storageSyncServiceName, syncGroup } /** - * Recall a serverendpoint. + * Recall a server endpoint. * * @param {string} resourceGroupName The name of the resource group. The name * is case insensitive. @@ -1563,6 +1587,12 @@ class ServerEndpoints { * * @param {string} [parameters.serverResourceId] Server Resource Id. * + * @param {string} [parameters.offlineDataTransfer] Offline data transfer. + * Possible values include: 'on', 'off' + * + * @param {string} [parameters.offlineDataTransferShareName] Offline data + * transfer share name + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1618,6 +1648,12 @@ class ServerEndpoints { * * @param {string} [parameters.serverResourceId] Server Resource Id. * + * @param {string} [parameters.offlineDataTransfer] Offline data transfer. + * Possible values include: 'on', 'off' + * + * @param {string} [parameters.offlineDataTransferShareName] Offline data + * transfer share name + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1692,6 +1728,12 @@ class ServerEndpoints { * @param {number} [options.parameters.tierFilesOlderThanDays] Tier files older * than days. * + * @param {string} [options.parameters.offlineDataTransfer] Offline data + * transfer. Possible values include: 'on', 'off' + * + * @param {string} [options.parameters.offlineDataTransferShareName] Offline + * data transfer share name + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1742,6 +1784,12 @@ class ServerEndpoints { * @param {number} [options.parameters.tierFilesOlderThanDays] Tier files older * than days. * + * @param {string} [options.parameters.offlineDataTransfer] Offline data + * transfer. Possible values include: 'on', 'off' + * + * @param {string} [options.parameters.offlineDataTransferShareName] Offline + * data transfer share name + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2077,7 +2125,7 @@ class ServerEndpoints { } /** - * Recall a serverendpoint. + * Recall a server endpoint. * * @param {string} resourceGroupName The name of the resource group. The name * is case insensitive. @@ -2121,7 +2169,7 @@ class ServerEndpoints { } /** - * Recall a serverendpoint. + * Recall a server endpoint. * * @param {string} resourceGroupName The name of the resource group. The name * is case insensitive. @@ -2215,6 +2263,12 @@ class ServerEndpoints { * * @param {string} [parameters.serverResourceId] Server Resource Id. * + * @param {string} [parameters.offlineDataTransfer] Offline data transfer. + * Possible values include: 'on', 'off' + * + * @param {string} [parameters.offlineDataTransferShareName] Offline data + * transfer share name + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2270,6 +2324,12 @@ class ServerEndpoints { * * @param {string} [parameters.serverResourceId] Server Resource Id. * + * @param {string} [parameters.offlineDataTransfer] Offline data transfer. + * Possible values include: 'on', 'off' + * + * @param {string} [parameters.offlineDataTransferShareName] Offline data + * transfer share name + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2344,6 +2404,12 @@ class ServerEndpoints { * @param {number} [options.parameters.tierFilesOlderThanDays] Tier files older * than days. * + * @param {string} [options.parameters.offlineDataTransfer] Offline data + * transfer. Possible values include: 'on', 'off' + * + * @param {string} [options.parameters.offlineDataTransferShareName] Offline + * data transfer share name + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2394,6 +2460,12 @@ class ServerEndpoints { * @param {number} [options.parameters.tierFilesOlderThanDays] Tier files older * than days. * + * @param {string} [options.parameters.offlineDataTransfer] Offline data + * transfer. Possible values include: 'on', 'off' + * + * @param {string} [options.parameters.offlineDataTransferShareName] Offline + * data transfer share name + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2537,7 +2609,7 @@ class ServerEndpoints { } /** - * Recall a serverendpoint. + * Recall a server endpoint. * * @param {string} resourceGroupName The name of the resource group. The name * is case insensitive. @@ -2581,7 +2653,7 @@ class ServerEndpoints { } /** - * Recall a serverendpoint. + * Recall a server endpoint. * * @param {string} resourceGroupName The name of the resource group. The name * is case insensitive. diff --git a/lib/services/storagesyncManagement/lib/storageSyncManagementClient.js b/lib/services/storagesyncManagement/lib/storageSyncManagementClient.js index 092c1b3228..55e9d633ed 100644 --- a/lib/services/storagesyncManagement/lib/storageSyncManagementClient.js +++ b/lib/services/storagesyncManagement/lib/storageSyncManagementClient.js @@ -50,7 +50,7 @@ class StorageSyncManagementClient extends ServiceClient { super(credentials, options); - this.apiVersion = '2018-07-01'; + this.apiVersion = '2019-02-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; diff --git a/lib/services/storagesyncManagement/package.json b/lib/services/storagesyncManagement/package.json index 02c30991cb..2ef2d8c577 100644 --- a/lib/services/storagesyncManagement/package.json +++ b/lib/services/storagesyncManagement/package.json @@ -22,4 +22,4 @@ "bugs": { "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +} From bbc2a6167a5778ac4d7e7e705fe12fc79cbe7a8a Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 19 Feb 2019 23:34:52 +0000 Subject: [PATCH 4/6] Generated from 3d3634985ded755ac9219900e9d0c38b52502202 Fix a linter issue with ErrorCode property in FilesNotSyncingError --- .../storagesyncManagement/lib/models/filesNotSyncingError.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/services/storagesyncManagement/lib/models/filesNotSyncingError.js b/lib/services/storagesyncManagement/lib/models/filesNotSyncingError.js index d9cad93dc7..6f1f9c6a40 100644 --- a/lib/services/storagesyncManagement/lib/models/filesNotSyncingError.js +++ b/lib/services/storagesyncManagement/lib/models/filesNotSyncingError.js @@ -43,7 +43,7 @@ class FilesNotSyncingError { errorCode: { required: false, readOnly: true, - serializedName: 'ErrorCode', + serializedName: 'errorCode', type: { name: 'Number' } From bf44d3c7dae3d66c3f7aa9fa7a4fa8bd62848a56 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 20 Feb 2019 00:28:12 +0000 Subject: [PATCH 5/6] Generated from 1bede5592516bdae8c3312ac894bf6a20fd68fd2 Fix "integer" types in ServerEndpointSyncStatus to specify format --- .../lib/models/filesNotSyncingError.js | 10 +--------- .../lib/models/index.d.ts | 4 ++-- .../lib/models/serverEndpoint.js | 4 ++-- .../lib/models/serverEndpointSyncStatus.js | 10 ++++------ .../lib/models/syncActivityStatus.js | 20 ------------------- .../lib/models/syncSessionStatus.js | 14 +------------ 6 files changed, 10 insertions(+), 52 deletions(-) diff --git a/lib/services/storagesyncManagement/lib/models/filesNotSyncingError.js b/lib/services/storagesyncManagement/lib/models/filesNotSyncingError.js index 6f1f9c6a40..4654ab9622 100644 --- a/lib/services/storagesyncManagement/lib/models/filesNotSyncingError.js +++ b/lib/services/storagesyncManagement/lib/models/filesNotSyncingError.js @@ -17,7 +17,7 @@ class FilesNotSyncingError { /** * Create a FilesNotSyncingError. - * @property {number} [errorCode] Error code + * @property {number} [errorCode] Error code (HResult) * @property {number} [persistentCount] Count of persistent files not syncing * with the specified error code * @property {number} [transientCount] Count of transient files not syncing @@ -52,10 +52,6 @@ class FilesNotSyncingError { required: false, readOnly: true, serializedName: 'persistentCount', - constraints: { - InclusiveMaximum: 2147483647, - InclusiveMinimum: 0 - }, type: { name: 'Number' } @@ -64,10 +60,6 @@ class FilesNotSyncingError { required: false, readOnly: true, serializedName: 'transientCount', - constraints: { - InclusiveMaximum: 2147483647, - InclusiveMinimum: 0 - }, type: { name: 'Number' } diff --git a/lib/services/storagesyncManagement/lib/models/index.d.ts b/lib/services/storagesyncManagement/lib/models/index.d.ts index 0d41d42e08..0cc922ab4f 100644 --- a/lib/services/storagesyncManagement/lib/models/index.d.ts +++ b/lib/services/storagesyncManagement/lib/models/index.d.ts @@ -380,7 +380,7 @@ export interface ServerEndpointUpdateParameters { */ export interface FilesNotSyncingError { /** - * Error code + * Error code (HResult) */ readonly errorCode?: number; /** @@ -398,7 +398,7 @@ export interface FilesNotSyncingError { */ export interface SyncSessionStatus { /** - * Last sync status + * Last sync result (HResult) */ readonly lastSyncResult?: number; /** diff --git a/lib/services/storagesyncManagement/lib/models/serverEndpoint.js b/lib/services/storagesyncManagement/lib/models/serverEndpoint.js index 47cd1540f7..30cd9af956 100644 --- a/lib/services/storagesyncManagement/lib/models/serverEndpoint.js +++ b/lib/services/storagesyncManagement/lib/models/serverEndpoint.js @@ -49,7 +49,7 @@ class ServerEndpoint extends models['ProxyResource'] { * @property {date} [syncStatus.lastUpdatedTimestamp] Last Updated Timestamp * @property {object} [syncStatus.uploadStatus] Upload Status * @property {number} [syncStatus.uploadStatus.lastSyncResult] Last sync - * status + * result (HResult) * @property {date} [syncStatus.uploadStatus.lastSyncTimestamp] Last sync * timestamp * @property {date} [syncStatus.uploadStatus.lastSyncSuccessTimestamp] Last @@ -66,7 +66,7 @@ class ServerEndpoint extends models['ProxyResource'] { * use. * @property {object} [syncStatus.downloadStatus] Download Status * @property {number} [syncStatus.downloadStatus.lastSyncResult] Last sync - * status + * result (HResult) * @property {date} [syncStatus.downloadStatus.lastSyncTimestamp] Last sync * timestamp * @property {date} [syncStatus.downloadStatus.lastSyncSuccessTimestamp] Last diff --git a/lib/services/storagesyncManagement/lib/models/serverEndpointSyncStatus.js b/lib/services/storagesyncManagement/lib/models/serverEndpointSyncStatus.js index c66396cf28..18ca216dbd 100644 --- a/lib/services/storagesyncManagement/lib/models/serverEndpointSyncStatus.js +++ b/lib/services/storagesyncManagement/lib/models/serverEndpointSyncStatus.js @@ -33,7 +33,8 @@ class ServerEndpointSyncStatus { * future use. * @property {date} [lastUpdatedTimestamp] Last Updated Timestamp * @property {object} [uploadStatus] Upload Status - * @property {number} [uploadStatus.lastSyncResult] Last sync status + * @property {number} [uploadStatus.lastSyncResult] Last sync result + * (HResult) * @property {date} [uploadStatus.lastSyncTimestamp] Last sync timestamp * @property {date} [uploadStatus.lastSyncSuccessTimestamp] Last sync success * timestamp @@ -46,7 +47,8 @@ class ServerEndpointSyncStatus { * @property {array} [uploadStatus.filesNotSyncingErrors] Array of per-item * errors coming from the last sync session. Reserved for future use. * @property {object} [downloadStatus] Download Status - * @property {number} [downloadStatus.lastSyncResult] Last sync status + * @property {number} [downloadStatus.lastSyncResult] Last sync result + * (HResult) * @property {date} [downloadStatus.lastSyncTimestamp] Last sync timestamp * @property {date} [downloadStatus.lastSyncSuccessTimestamp] Last sync * success timestamp @@ -135,10 +137,6 @@ class ServerEndpointSyncStatus { required: false, readOnly: true, serializedName: 'totalPersistentFilesNotSyncingCount', - constraints: { - InclusiveMaximum: 2147483647, - InclusiveMinimum: 0 - }, type: { name: 'Number' } diff --git a/lib/services/storagesyncManagement/lib/models/syncActivityStatus.js b/lib/services/storagesyncManagement/lib/models/syncActivityStatus.js index bc8453ed02..6c2b836761 100644 --- a/lib/services/storagesyncManagement/lib/models/syncActivityStatus.js +++ b/lib/services/storagesyncManagement/lib/models/syncActivityStatus.js @@ -53,10 +53,6 @@ class SyncActivityStatus { required: false, readOnly: true, serializedName: 'perItemErrorCount', - constraints: { - InclusiveMaximum: 2147483647, - InclusiveMinimum: 0 - }, type: { name: 'Number' } @@ -65,10 +61,6 @@ class SyncActivityStatus { required: false, readOnly: true, serializedName: 'appliedItemCount', - constraints: { - InclusiveMaximum: 2147483647, - InclusiveMinimum: 0 - }, type: { name: 'Number' } @@ -77,10 +69,6 @@ class SyncActivityStatus { required: false, readOnly: true, serializedName: 'totalItemCount', - constraints: { - InclusiveMaximum: 2147483647, - InclusiveMinimum: 0 - }, type: { name: 'Number' } @@ -89,10 +77,6 @@ class SyncActivityStatus { required: false, readOnly: true, serializedName: 'appliedBytes', - constraints: { - InclusiveMaximum: 2147483647, - InclusiveMinimum: 0 - }, type: { name: 'Number' } @@ -101,10 +85,6 @@ class SyncActivityStatus { required: false, readOnly: true, serializedName: 'totalBytes', - constraints: { - InclusiveMaximum: 2147483647, - InclusiveMinimum: 0 - }, type: { name: 'Number' } diff --git a/lib/services/storagesyncManagement/lib/models/syncSessionStatus.js b/lib/services/storagesyncManagement/lib/models/syncSessionStatus.js index ebbe9f041f..18e9a9073a 100644 --- a/lib/services/storagesyncManagement/lib/models/syncSessionStatus.js +++ b/lib/services/storagesyncManagement/lib/models/syncSessionStatus.js @@ -17,7 +17,7 @@ class SyncSessionStatus { /** * Create a SyncSessionStatus. - * @property {number} [lastSyncResult] Last sync status + * @property {number} [lastSyncResult] Last sync result (HResult) * @property {date} [lastSyncTimestamp] Last sync timestamp * @property {date} [lastSyncSuccessTimestamp] Last sync success timestamp * @property {number} [lastSyncPerItemErrorCount] Last sync per item error @@ -73,10 +73,6 @@ class SyncSessionStatus { lastSyncPerItemErrorCount: { required: false, serializedName: 'lastSyncPerItemErrorCount', - constraints: { - InclusiveMaximum: 2147483647, - InclusiveMinimum: 0 - }, type: { name: 'Number' } @@ -85,10 +81,6 @@ class SyncSessionStatus { required: false, readOnly: true, serializedName: 'persistentFilesNotSyncingCount', - constraints: { - InclusiveMaximum: 2147483647, - InclusiveMinimum: 0 - }, type: { name: 'Number' } @@ -97,10 +89,6 @@ class SyncSessionStatus { required: false, readOnly: true, serializedName: 'transientFilesNotSyncingCount', - constraints: { - InclusiveMaximum: 2147483647, - InclusiveMinimum: 0 - }, type: { name: 'Number' } From e4541d4946182813b4aabcc39f0c58ecd90ffc31 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 21 Feb 2019 00:35:02 +0000 Subject: [PATCH 6/6] Generated from 9e008310b0716e87a0fb554cf42a92c2ff8e8404 rename cloud endpoint property storageAccountShareName to azureFileShareName --- .../lib/models/cloudEndpoint.js | 6 +++--- .../models/cloudEndpointCreateParameters.js | 6 +++--- .../lib/models/index.d.ts | 4 ++-- .../lib/operations/cloudEndpoints.js | 18 ++++++------------ .../lib/operations/index.d.ts | 12 ++++-------- 5 files changed, 18 insertions(+), 28 deletions(-) diff --git a/lib/services/storagesyncManagement/lib/models/cloudEndpoint.js b/lib/services/storagesyncManagement/lib/models/cloudEndpoint.js index 6065752869..002fb71df2 100644 --- a/lib/services/storagesyncManagement/lib/models/cloudEndpoint.js +++ b/lib/services/storagesyncManagement/lib/models/cloudEndpoint.js @@ -21,7 +21,7 @@ class CloudEndpoint extends models['ProxyResource'] { /** * Create a CloudEndpoint. * @property {string} [storageAccountResourceId] Storage Account Resource Id - * @property {string} [storageAccountShareName] Storage Account Share name + * @property {string} [azureFileShareName] Storage Account Share name * @property {string} [storageAccountTenantId] Storage Account Tenant Id * @property {string} [partnershipId] Partnership Id * @property {string} [friendlyName] Friendly Name @@ -79,9 +79,9 @@ class CloudEndpoint extends models['ProxyResource'] { name: 'String' } }, - storageAccountShareName: { + azureFileShareName: { required: false, - serializedName: 'properties.storageAccountShareName', + serializedName: 'properties.azureFileShareName', type: { name: 'String' } diff --git a/lib/services/storagesyncManagement/lib/models/cloudEndpointCreateParameters.js b/lib/services/storagesyncManagement/lib/models/cloudEndpointCreateParameters.js index 738f6fb8c5..540f969ff4 100644 --- a/lib/services/storagesyncManagement/lib/models/cloudEndpointCreateParameters.js +++ b/lib/services/storagesyncManagement/lib/models/cloudEndpointCreateParameters.js @@ -21,7 +21,7 @@ class CloudEndpointCreateParameters extends models['ProxyResource'] { /** * Create a CloudEndpointCreateParameters. * @property {string} [storageAccountResourceId] Storage Account Resource Id - * @property {string} [storageAccountShareName] Storage Account Share name + * @property {string} [azureFileShareName] Storage Account Share name * @property {string} [storageAccountTenantId] Storage Account Tenant Id */ constructor() { @@ -73,9 +73,9 @@ class CloudEndpointCreateParameters extends models['ProxyResource'] { name: 'String' } }, - storageAccountShareName: { + azureFileShareName: { required: false, - serializedName: 'properties.storageAccountShareName', + serializedName: 'properties.azureFileShareName', type: { name: 'String' } diff --git a/lib/services/storagesyncManagement/lib/models/index.d.ts b/lib/services/storagesyncManagement/lib/models/index.d.ts index 0cc922ab4f..c251d65e19 100644 --- a/lib/services/storagesyncManagement/lib/models/index.d.ts +++ b/lib/services/storagesyncManagement/lib/models/index.d.ts @@ -165,7 +165,7 @@ export interface CloudEndpoint extends ProxyResource { /** * Storage Account Share name */ - storageAccountShareName?: string; + azureFileShareName?: string; /** * Storage Account Tenant Id */ @@ -252,7 +252,7 @@ export interface CloudEndpointCreateParameters extends ProxyResource { /** * Storage Account Share name */ - storageAccountShareName?: string; + azureFileShareName?: string; /** * Storage Account Tenant Id */ diff --git a/lib/services/storagesyncManagement/lib/operations/cloudEndpoints.js b/lib/services/storagesyncManagement/lib/operations/cloudEndpoints.js index d4ea73b12f..52c5bb85dd 100644 --- a/lib/services/storagesyncManagement/lib/operations/cloudEndpoints.js +++ b/lib/services/storagesyncManagement/lib/operations/cloudEndpoints.js @@ -33,8 +33,7 @@ const WebResource = msRest.WebResource; * @param {string} [parameters.storageAccountResourceId] Storage Account * Resource Id * - * @param {string} [parameters.storageAccountShareName] Storage Account Share - * name + * @param {string} [parameters.azureFileShareName] Storage Account Share name * * @param {string} [parameters.storageAccountTenantId] Storage Account Tenant * Id @@ -1076,8 +1075,7 @@ function _postRestore(resourceGroupName, storageSyncServiceName, syncGroupName, * @param {string} [parameters.storageAccountResourceId] Storage Account * Resource Id * - * @param {string} [parameters.storageAccountShareName] Storage Account Share - * name + * @param {string} [parameters.azureFileShareName] Storage Account Share name * * @param {string} [parameters.storageAccountTenantId] Storage Account Tenant * Id @@ -2296,8 +2294,7 @@ class CloudEndpoints { * @param {string} [parameters.storageAccountResourceId] Storage Account * Resource Id * - * @param {string} [parameters.storageAccountShareName] Storage Account Share - * name + * @param {string} [parameters.azureFileShareName] Storage Account Share name * * @param {string} [parameters.storageAccountTenantId] Storage Account Tenant * Id @@ -2345,8 +2342,7 @@ class CloudEndpoints { * @param {string} [parameters.storageAccountResourceId] Storage Account * Resource Id * - * @param {string} [parameters.storageAccountShareName] Storage Account Share - * name + * @param {string} [parameters.azureFileShareName] Storage Account Share name * * @param {string} [parameters.storageAccountTenantId] Storage Account Tenant * Id @@ -3301,8 +3297,7 @@ class CloudEndpoints { * @param {string} [parameters.storageAccountResourceId] Storage Account * Resource Id * - * @param {string} [parameters.storageAccountShareName] Storage Account Share - * name + * @param {string} [parameters.azureFileShareName] Storage Account Share name * * @param {string} [parameters.storageAccountTenantId] Storage Account Tenant * Id @@ -3350,8 +3345,7 @@ class CloudEndpoints { * @param {string} [parameters.storageAccountResourceId] Storage Account * Resource Id * - * @param {string} [parameters.storageAccountShareName] Storage Account Share - * name + * @param {string} [parameters.azureFileShareName] Storage Account Share name * * @param {string} [parameters.storageAccountTenantId] Storage Account Tenant * Id diff --git a/lib/services/storagesyncManagement/lib/operations/index.d.ts b/lib/services/storagesyncManagement/lib/operations/index.d.ts index d7f49448d4..0bb67eecd3 100644 --- a/lib/services/storagesyncManagement/lib/operations/index.d.ts +++ b/lib/services/storagesyncManagement/lib/operations/index.d.ts @@ -924,8 +924,7 @@ export interface CloudEndpoints { * @param {string} [parameters.storageAccountResourceId] Storage Account * Resource Id * - * @param {string} [parameters.storageAccountShareName] Storage Account Share - * name + * @param {string} [parameters.azureFileShareName] Storage Account Share name * * @param {string} [parameters.storageAccountTenantId] Storage Account Tenant * Id @@ -961,8 +960,7 @@ export interface CloudEndpoints { * @param {string} [parameters.storageAccountResourceId] Storage Account * Resource Id * - * @param {string} [parameters.storageAccountShareName] Storage Account Share - * name + * @param {string} [parameters.azureFileShareName] Storage Account Share name * * @param {string} [parameters.storageAccountTenantId] Storage Account Tenant * Id @@ -1686,8 +1684,7 @@ export interface CloudEndpoints { * @param {string} [parameters.storageAccountResourceId] Storage Account * Resource Id * - * @param {string} [parameters.storageAccountShareName] Storage Account Share - * name + * @param {string} [parameters.azureFileShareName] Storage Account Share name * * @param {string} [parameters.storageAccountTenantId] Storage Account Tenant * Id @@ -1723,8 +1720,7 @@ export interface CloudEndpoints { * @param {string} [parameters.storageAccountResourceId] Storage Account * Resource Id * - * @param {string} [parameters.storageAccountShareName] Storage Account Share - * name + * @param {string} [parameters.azureFileShareName] Storage Account Share name * * @param {string} [parameters.storageAccountTenantId] Storage Account Tenant * Id