From f290b8b49367fd2e8e18ae187a085158f6df69ad Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 25 Oct 2018 09:34:51 +0000 Subject: [PATCH] Generated from 06ea7d7c17040512df811d1137c2402e9e01fa96 add new api-version for Azure SignalR service --- lib/services/signalrManagement/LICENSE.txt | 42 +++++----- lib/services/signalrManagement/README.md | 80 +++++++++---------- .../lib/operations/operations.js | 3 + .../lib/operations/signalR.js | 27 +++++++ .../lib/operations/usages.js | 3 + .../lib/signalRManagementClient.js | 2 +- 6 files changed, 95 insertions(+), 62 deletions(-) diff --git a/lib/services/signalrManagement/LICENSE.txt b/lib/services/signalrManagement/LICENSE.txt index a70e8cf660..5431ba98b9 100644 --- a/lib/services/signalrManagement/LICENSE.txt +++ b/lib/services/signalrManagement/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) 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. diff --git a/lib/services/signalrManagement/README.md b/lib/services/signalrManagement/README.md index cdd814bd2b..cfdc9b4084 100644 --- a/lib/services/signalrManagement/README.md +++ b/lib/services/signalrManagement/README.md @@ -1,40 +1,40 @@ ---- -uid: azure-arm-signalr -summary: *content - ---- -# Microsoft Azure SDK for Node.js - SignalRManagementClient -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-arm-signalr -``` - -## How to use - -### Authentication, client creation and list operations as an example. - -```javascript -const msRestAzure = require("ms-rest-azure"); -const SignalRManagementClient = require("azure-arm-signalr"); -msRestAzure.interactiveLogin().then((creds) => { - const subscriptionId = ""; - const client = new SignalRManagementClient(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 - -- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) +--- +uid: azure-arm-signalr +summary: *content + +--- +# Microsoft Azure SDK for Node.js - SignalRManagementClient +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-arm-signalr +``` + +## How to use + +### Authentication, client creation and list operations as an example. + +```javascript +const msRestAzure = require("ms-rest-azure"); +const SignalRManagementClient = require("azure-arm-signalr"); +msRestAzure.interactiveLogin().then((creds) => { + const subscriptionId = ""; + const client = new SignalRManagementClient(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 + +- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/signalrManagement/lib/operations/operations.js b/lib/services/signalrManagement/lib/operations/operations.js index 3bf2ad1d64..be9a0c98a2 100644 --- a/lib/services/signalrManagement/lib/operations/operations.js +++ b/lib/services/signalrManagement/lib/operations/operations.js @@ -48,6 +48,9 @@ function _list(options, callback) { } // Validate try { + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } diff --git a/lib/services/signalrManagement/lib/operations/signalR.js b/lib/services/signalrManagement/lib/operations/signalR.js index a6bfe10b50..f5dd1c7c0f 100644 --- a/lib/services/signalrManagement/lib/operations/signalR.js +++ b/lib/services/signalrManagement/lib/operations/signalR.js @@ -61,6 +61,9 @@ function _checkNameAvailability(location, options, callback) { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { throw new Error('location cannot be null or undefined and it must be of type string.'); } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -206,6 +209,9 @@ function _listBySubscription(options, callback) { } // Validate try { + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -340,6 +346,9 @@ function _listByResourceGroup(resourceGroupName, options, callback) { } // Validate try { + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -480,6 +489,9 @@ function _listKeys(resourceGroupName, resourceName, options, callback) { } // Validate try { + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -712,6 +724,9 @@ function _get(resourceGroupName, resourceName, options, callback) { } // Validate try { + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -1168,6 +1183,9 @@ function _beginRegenerateKey(resourceGroupName, resourceName, options, callback) let parameters = (options && options.parameters !== undefined) ? options.parameters : undefined; // Validate try { + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -1369,6 +1387,9 @@ function _beginCreateOrUpdate(resourceGroupName, resourceName, options, callback let parameters = (options && options.parameters !== undefined) ? options.parameters : undefined; // Validate try { + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -1526,6 +1547,9 @@ function _beginDeleteMethod(resourceGroupName, resourceName, options, callback) } // Validate try { + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -1690,6 +1714,9 @@ function _beginUpdate(resourceGroupName, resourceName, options, callback) { let parameters = (options && options.parameters !== undefined) ? options.parameters : undefined; // Validate try { + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } diff --git a/lib/services/signalrManagement/lib/operations/usages.js b/lib/services/signalrManagement/lib/operations/usages.js index e321b81419..039600695a 100644 --- a/lib/services/signalrManagement/lib/operations/usages.js +++ b/lib/services/signalrManagement/lib/operations/usages.js @@ -52,6 +52,9 @@ function _list(location, options, callback) { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { throw new Error('location cannot be null or undefined and it must be of type string.'); } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } diff --git a/lib/services/signalrManagement/lib/signalRManagementClient.js b/lib/services/signalrManagement/lib/signalRManagementClient.js index 148dd67322..3c13abb38c 100644 --- a/lib/services/signalrManagement/lib/signalRManagementClient.js +++ b/lib/services/signalrManagement/lib/signalRManagementClient.js @@ -50,7 +50,7 @@ class SignalRManagementClient extends ServiceClient { super(credentials, options); - this.apiVersion = '2018-03-01-preview'; + this.apiVersion = '2018-10-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true;