From 98a3004a4603753b73611fe963c3aa57b7df03dd Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 3 Jul 2018 07:29:49 +0000 Subject: [PATCH] Generated from 142f57f91e02d24015ddc0acb7a77a90633c9996 Fixed typos. Fixes issue 1770 in SDK --- .../lib/operations/index.d.ts | 12 ++++++---- .../lib/operations/vpnConnections.js | 24 +++++++++++++------ 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/lib/services/networkManagement2/lib/operations/index.d.ts b/lib/services/networkManagement2/lib/operations/index.d.ts index 39055974c6..1b50dafa65 100644 --- a/lib/services/networkManagement2/lib/operations/index.d.ts +++ b/lib/services/networkManagement2/lib/operations/index.d.ts @@ -35376,6 +35376,8 @@ export interface VpnConnections { /** * Retrieves all vpn connections for a particular virtual wan vpn gateway. * + * @param {string} resourceGroupName The resource group name of the VpnGateway. + * * @param {string} gatewayName The name of the gateway. * * @param {object} [options] Optional Parameters. @@ -35389,11 +35391,13 @@ export interface VpnConnections { * * @reject {Error|ServiceError} - The error object. */ - listByVpnGatewayWithHttpOperationResponse(gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByVpnGatewayWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieves all vpn connections for a particular virtual wan vpn gateway. * + * @param {string} resourceGroupName The resource group name of the VpnGateway. + * * @param {string} gatewayName The name of the gateway. * * @param {object} [options] Optional Parameters. @@ -35424,9 +35428,9 @@ export interface VpnConnections { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByVpnGateway(gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByVpnGateway(gatewayName: string, callback: ServiceCallback): void; - listByVpnGateway(gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByVpnGateway(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByVpnGateway(resourceGroupName: string, gatewayName: string, callback: ServiceCallback): void; + listByVpnGateway(resourceGroupName: string, gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** diff --git a/lib/services/networkManagement2/lib/operations/vpnConnections.js b/lib/services/networkManagement2/lib/operations/vpnConnections.js index 4f414488b9..b3cfaf832f 100644 --- a/lib/services/networkManagement2/lib/operations/vpnConnections.js +++ b/lib/services/networkManagement2/lib/operations/vpnConnections.js @@ -346,6 +346,8 @@ function _deleteMethod(resourceGroupName, gatewayName, connectionName, options, /** * Retrieves all vpn connections for a particular virtual wan vpn gateway. * + * @param {string} resourceGroupName The resource group name of the VpnGateway. + * * @param {string} gatewayName The name of the gateway. * * @param {object} [options] Optional Parameters. @@ -367,7 +369,7 @@ function _deleteMethod(resourceGroupName, gatewayName, connectionName, options, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByVpnGateway(gatewayName, options, callback) { +function _listByVpnGateway(resourceGroupName, gatewayName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -383,6 +385,9 @@ function _listByVpnGateway(gatewayName, options, callback) { 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.'); } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } if (gatewayName === null || gatewayName === undefined || typeof gatewayName.valueOf() !== 'string') { throw new Error('gatewayName cannot be null or undefined and it must be of type string.'); } @@ -395,8 +400,9 @@ function _listByVpnGateway(gatewayName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{gatewayName}', encodeURIComponent(gatewayName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -1318,6 +1324,8 @@ class VpnConnections { /** * Retrieves all vpn connections for a particular virtual wan vpn gateway. * + * @param {string} resourceGroupName The resource group name of the VpnGateway. + * * @param {string} gatewayName The name of the gateway. * * @param {object} [options] Optional Parameters. @@ -1331,11 +1339,11 @@ class VpnConnections { * * @reject {Error} - The error object. */ - listByVpnGatewayWithHttpOperationResponse(gatewayName, options) { + listByVpnGatewayWithHttpOperationResponse(resourceGroupName, gatewayName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByVpnGateway(gatewayName, options, (err, result, request, response) => { + self._listByVpnGateway(resourceGroupName, gatewayName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1348,6 +1356,8 @@ class VpnConnections { /** * Retrieves all vpn connections for a particular virtual wan vpn gateway. * + * @param {string} resourceGroupName The resource group name of the VpnGateway. + * * @param {string} gatewayName The name of the gateway. * * @param {object} [options] Optional Parameters. @@ -1378,7 +1388,7 @@ class VpnConnections { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByVpnGateway(gatewayName, options, optionalCallback) { + listByVpnGateway(resourceGroupName, gatewayName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1387,14 +1397,14 @@ class VpnConnections { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByVpnGateway(gatewayName, options, (err, result, request, response) => { + self._listByVpnGateway(resourceGroupName, gatewayName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByVpnGateway(gatewayName, options, optionalCallback); + return self._listByVpnGateway(resourceGroupName, gatewayName, options, optionalCallback); } }