Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

[AutoPR network/resource-manager] Fixed typos. Fixes issue 1770 in .NET SDK #3107

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions lib/services/networkManagement2/lib/operations/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -35389,11 +35391,13 @@ export interface VpnConnections {
*
* @reject {Error|ServiceError} - The error object.
*/
listByVpnGatewayWithHttpOperationResponse(gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.ListVpnConnectionsResult>>;
listByVpnGatewayWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.ListVpnConnectionsResult>>;

/**
* 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.
Expand Down Expand Up @@ -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<models.ListVpnConnectionsResult>;
listByVpnGateway(gatewayName: string, callback: ServiceCallback<models.ListVpnConnectionsResult>): void;
listByVpnGateway(gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ListVpnConnectionsResult>): void;
listByVpnGateway(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.ListVpnConnectionsResult>;
listByVpnGateway(resourceGroupName: string, gatewayName: string, callback: ServiceCallback<models.ListVpnConnectionsResult>): void;
listByVpnGateway(resourceGroupName: string, gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ListVpnConnectionsResult>): void;


/**
Expand Down
24 changes: 17 additions & 7 deletions lib/services/networkManagement2/lib/operations/vpnConnections.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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') {
Expand All @@ -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.');
}
Expand All @@ -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));
Expand Down Expand Up @@ -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.
Expand All @@ -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); }
Expand All @@ -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.
Expand Down Expand Up @@ -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') {
Expand All @@ -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);
}
}

Expand Down