diff --git a/lib/services/networkManagement2/lib/networkManagementClient.d.ts b/lib/services/networkManagement2/lib/networkManagementClient.d.ts index 6a549fc30e..6bd48ff710 100644 --- a/lib/services/networkManagement2/lib/networkManagementClient.d.ts +++ b/lib/services/networkManagement2/lib/networkManagementClient.d.ts @@ -23,6 +23,12 @@ export default class NetworkManagementClient extends AzureServiceClient { * * @param {string} subscriptionId - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. * + * @param {string} resourceGroupName - The resource group name of the Microsoft Azure resource. + * + * @param {string} virtualHubName - The name of the Virtual Hub resource. + * + * @param {string} connectionName - The name of the connection resource. + * * @param {string} [baseUri] - The base URI of the service. * * @param {object} [options] - The parameter options @@ -41,12 +47,18 @@ export default class NetworkManagementClient extends AzureServiceClient { * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * */ - constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions); + constructor(credentials: ServiceClientCredentials, subscriptionId: string, resourceGroupName: string, virtualHubName: string, connectionName: string, baseUri?: string, options?: AzureServiceClientOptions); credentials: ServiceClientCredentials; subscriptionId: string; + resourceGroupName: string; + + virtualHubName: string; + + connectionName: string; + acceptLanguage: string; longRunningOperationRetryTimeout: number; @@ -191,8 +203,6 @@ export default class NetworkManagementClient extends AzureServiceClient { /** * Gives the supported security providers for the virtual wan. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} virtualWANName The name of the VirtualWAN for which * supported security providers are needed. * @@ -207,13 +217,11 @@ export default class NetworkManagementClient extends AzureServiceClient { * * @reject {Error|ServiceError} - The error object. */ - supportedSecurityProvidersWithHttpOperationResponse(resourceGroupName: string, virtualWANName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + supportedSecurityProvidersWithHttpOperationResponse(virtualWANName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gives the supported security providers for the virtual wan. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} virtualWANName The name of the VirtualWAN for which * supported security providers are needed. * @@ -245,9 +253,9 @@ export default class NetworkManagementClient extends AzureServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - supportedSecurityProviders(resourceGroupName: string, virtualWANName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - supportedSecurityProviders(resourceGroupName: string, virtualWANName: string, callback: ServiceCallback): void; - supportedSecurityProviders(resourceGroupName: string, virtualWANName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + supportedSecurityProviders(virtualWANName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + supportedSecurityProviders(virtualWANName: string, callback: ServiceCallback): void; + supportedSecurityProviders(virtualWANName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } export { NetworkManagementClient, models as NetworkManagementModels }; diff --git a/lib/services/networkManagement2/lib/networkManagementClient.js b/lib/services/networkManagement2/lib/networkManagementClient.js index ad0b9330d3..fea5272b6c 100644 --- a/lib/services/networkManagement2/lib/networkManagementClient.js +++ b/lib/services/networkManagement2/lib/networkManagementClient.js @@ -172,8 +172,6 @@ function _checkDnsNameAvailability(location, domainNameLabel, options, callback) /** * Gives the supported security providers for the virtual wan. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} virtualWANName The name of the VirtualWAN for which * supported security providers are needed. * @@ -196,7 +194,7 @@ function _checkDnsNameAvailability(location, domainNameLabel, options, callback) * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _supportedSecurityProviders(resourceGroupName, virtualWANName, options, callback) { +function _supportedSecurityProviders(virtualWANName, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -212,8 +210,8 @@ function _supportedSecurityProviders(resourceGroupName, virtualWANName, options, if (this.subscriptionId === null || this.subscriptionId === undefined || typeof this.subscriptionId.valueOf() !== 'string') { throw new Error('this.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 (this.resourceGroupName === null || this.resourceGroupName === undefined || typeof this.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.resourceGroupName cannot be null or undefined and it must be of type string.'); } if (virtualWANName === null || virtualWANName === undefined || typeof virtualWANName.valueOf() !== 'string') { throw new Error('virtualWANName cannot be null or undefined and it must be of type string.'); @@ -229,7 +227,7 @@ function _supportedSecurityProviders(resourceGroupName, virtualWANName, options, let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/supportedSecurityProviders'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.resourceGroupName)); requestUrl = requestUrl.replace('{virtualWANName}', encodeURIComponent(virtualWANName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -321,6 +319,9 @@ class NetworkManagementClient extends ServiceClient { * Create a NetworkManagementClient. * @param {credentials} credentials - Credentials needed for the client to connect to Azure. * @param {string} subscriptionId - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * @param {string} resourceGroupName - The resource group name of the Microsoft Azure resource. + * @param {string} virtualHubName - The name of the Virtual Hub resource. + * @param {string} connectionName - The name of the connection resource. * @param {string} [baseUri] - The base URI of the service. * @param {object} [options] - The parameter options * @param {Array} [options.filters] - Filters to be added to the request pipeline @@ -331,13 +332,22 @@ class NetworkManagementClient extends ServiceClient { * @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30. * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - constructor(credentials, subscriptionId, baseUri, options) { + constructor(credentials, subscriptionId, resourceGroupName, virtualHubName, connectionName, baseUri, options) { if (credentials === null || credentials === undefined) { throw new Error('\'credentials\' cannot be null.'); } if (subscriptionId === null || subscriptionId === undefined) { throw new Error('\'subscriptionId\' cannot be null.'); } + if (resourceGroupName === null || resourceGroupName === undefined) { + throw new Error('\'resourceGroupName\' cannot be null.'); + } + if (virtualHubName === null || virtualHubName === undefined) { + throw new Error('\'virtualHubName\' cannot be null.'); + } + if (connectionName === null || connectionName === undefined) { + throw new Error('\'connectionName\' cannot be null.'); + } if (!options) options = {}; @@ -352,6 +362,9 @@ class NetworkManagementClient extends ServiceClient { } this.credentials = credentials; this.subscriptionId = subscriptionId; + this.resourceGroupName = resourceGroupName; + this.virtualHubName = virtualHubName; + this.connectionName = connectionName; let packageInfo = this.getPackageJsonInfo(__dirname); this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); @@ -532,8 +545,6 @@ class NetworkManagementClient extends ServiceClient { /** * Gives the supported security providers for the virtual wan. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} virtualWANName The name of the VirtualWAN for which * supported security providers are needed. * @@ -548,11 +559,11 @@ class NetworkManagementClient extends ServiceClient { * * @reject {Error} - The error object. */ - supportedSecurityProvidersWithHttpOperationResponse(resourceGroupName, virtualWANName, options) { + supportedSecurityProvidersWithHttpOperationResponse(virtualWANName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._supportedSecurityProviders(resourceGroupName, virtualWANName, options, (err, result, request, response) => { + self._supportedSecurityProviders(virtualWANName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -565,8 +576,6 @@ class NetworkManagementClient extends ServiceClient { /** * Gives the supported security providers for the virtual wan. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} virtualWANName The name of the VirtualWAN for which * supported security providers are needed. * @@ -598,7 +607,7 @@ class NetworkManagementClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - supportedSecurityProviders(resourceGroupName, virtualWANName, options, optionalCallback) { + supportedSecurityProviders(virtualWANName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -607,14 +616,14 @@ class NetworkManagementClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._supportedSecurityProviders(resourceGroupName, virtualWANName, options, (err, result, request, response) => { + self._supportedSecurityProviders(virtualWANName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._supportedSecurityProviders(resourceGroupName, virtualWANName, options, optionalCallback); + return self._supportedSecurityProviders(virtualWANName, options, optionalCallback); } } diff --git a/lib/services/networkManagement2/lib/operations/hubVirtualNetworkConnections.js b/lib/services/networkManagement2/lib/operations/hubVirtualNetworkConnections.js index d076191333..9794b0b1de 100644 --- a/lib/services/networkManagement2/lib/operations/hubVirtualNetworkConnections.js +++ b/lib/services/networkManagement2/lib/operations/hubVirtualNetworkConnections.js @@ -17,12 +17,6 @@ const WebResource = msRest.WebResource; /** * Retrieves the details of a HubVirtualNetworkConnection. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * - * @param {string} connectionName The name of the vpn connection. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -42,7 +36,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, virtualHubName, connectionName, options, callback) { +function _get(options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -58,14 +52,14 @@ function _get(resourceGroupName, virtualHubName, connectionName, options, callba 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (virtualHubName === null || virtualHubName === undefined || typeof virtualHubName.valueOf() !== 'string') { - throw new Error('virtualHubName cannot be null or undefined and it must be of type string.'); + if (this.client.virtualHubName === null || this.client.virtualHubName === undefined || typeof this.client.virtualHubName.valueOf() !== 'string') { + throw new Error('this.client.virtualHubName cannot be null or undefined and it must be of type string.'); } - if (connectionName === null || connectionName === undefined || typeof connectionName.valueOf() !== 'string') { - throw new Error('connectionName cannot be null or undefined and it must be of type string.'); + if (this.client.connectionName === null || this.client.connectionName === undefined || typeof this.client.connectionName.valueOf() !== 'string') { + throw new Error('this.client.connectionName 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.'); @@ -78,9 +72,9 @@ function _get(resourceGroupName, virtualHubName, connectionName, options, callba let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{virtualHubName}', encodeURIComponent(virtualHubName)); - requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{virtualHubName}', encodeURIComponent(this.client.virtualHubName)); + requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(this.client.connectionName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { @@ -165,12 +159,195 @@ function _get(resourceGroupName, virtualHubName, connectionName, options, callba }); } + /** - * Retrieves the details of all HubVirtualNetworkConnections. + * Creates a HubVirtualNetworkConnection resource if it doesn't exist. Updates + * the HubVirtualNetworkConnection if one exists. + * + * @param {object} hubVirtualNetworkConnectionParameters Parameters supplied to + * create or update HubVirtualNetworkConnection. + * + * @param {object} [hubVirtualNetworkConnectionParameters.remoteVirtualNetwork] + * Reference to the remote virtual network. + * + * @param {string} + * [hubVirtualNetworkConnectionParameters.remoteVirtualNetwork.id] Resource ID. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.allowHubToRemoteVnetTransit] + * VirtualHub to RemoteVnet transit to enabled or not. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.allowRemoteVnetToUseHubVnetGateways] + * Allow RemoteVnet to use Virtual Hub's gateways. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.enableInternetSecurity] Enable + * internet security + * + * @param {string} [hubVirtualNetworkConnectionParameters.provisioningState] + * The provisioning state of the resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed' + * + * @param {string} [hubVirtualNetworkConnectionParameters.name] The name of the + * resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @param {string} [hubVirtualNetworkConnectionParameters.id] Resource 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. + * See {@link HubVirtualNetworkConnection} 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 _createOrUpdate(hubVirtualNetworkConnectionParameters, 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.'); + } + + // Send request + this.beginCreateOrUpdate(hubVirtualNetworkConnectionParameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['HubVirtualNetworkConnection']().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); + }); + }); +} + + +/** + * Updates HubVirtualNetworkConnection tags. + * + * @param {object} hubVirtualNetworkConnectionParameters Parameters supplied to + * update HubVirtualNetworkConnection tags. + * + * @param {object} [hubVirtualNetworkConnectionParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. + * @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 HubVirtualNetworkConnection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {string} virtualHubName The name of the VirtualHub. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _updateTags(hubVirtualNetworkConnectionParameters, 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.'); + } + + // Send request + this.beginUpdateTags(hubVirtualNetworkConnectionParameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['HubVirtualNetworkConnection']().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); + }); + }); +} + +/** + * Retrieves the details of all HubVirtualNetworkConnections. * * @param {object} [options] Optional Parameters. * @@ -191,7 +368,7 @@ function _get(resourceGroupName, virtualHubName, connectionName, options, callba * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _list(resourceGroupName, virtualHubName, options, callback) { +function _list(options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -207,11 +384,11 @@ function _list(resourceGroupName, virtualHubName, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (virtualHubName === null || virtualHubName === undefined || typeof virtualHubName.valueOf() !== 'string') { - throw new Error('virtualHubName cannot be null or undefined and it must be of type string.'); + if (this.client.virtualHubName === null || this.client.virtualHubName === undefined || typeof this.client.virtualHubName.valueOf() !== 'string') { + throw new Error('this.client.virtualHubName 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.'); @@ -224,8 +401,8 @@ function _list(resourceGroupName, virtualHubName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{virtualHubName}', encodeURIComponent(virtualHubName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{virtualHubName}', encodeURIComponent(this.client.virtualHubName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { @@ -311,10 +488,39 @@ function _list(resourceGroupName, virtualHubName, options, callback) { } /** - * Retrieves the details of all HubVirtualNetworkConnections. + * Creates a HubVirtualNetworkConnection resource if it doesn't exist. Updates + * the HubVirtualNetworkConnection if one exists. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {object} hubVirtualNetworkConnectionParameters Parameters supplied to + * create or update HubVirtualNetworkConnection. + * + * @param {object} [hubVirtualNetworkConnectionParameters.remoteVirtualNetwork] + * Reference to the remote virtual network. + * + * @param {string} + * [hubVirtualNetworkConnectionParameters.remoteVirtualNetwork.id] Resource ID. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.allowHubToRemoteVnetTransit] + * VirtualHub to RemoteVnet transit to enabled or not. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.allowRemoteVnetToUseHubVnetGateways] + * Allow RemoteVnet to use Virtual Hub's gateways. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.enableInternetSecurity] Enable + * internet security + * + * @param {string} [hubVirtualNetworkConnectionParameters.provisioningState] + * The provisioning state of the resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed' + * + * @param {string} [hubVirtualNetworkConnectionParameters.name] The name of the + * resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @param {string} [hubVirtualNetworkConnectionParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -328,14 +534,14 @@ function _list(resourceGroupName, virtualHubName, options, callback) { * {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 ListHubVirtualNetworkConnectionsResult} for - * more information. + * See {@link HubVirtualNetworkConnection} 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 _listNext(nextPageLink, options, callback) { +function _beginCreateOrUpdate(hubVirtualNetworkConnectionParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -345,10 +551,23 @@ function _listNext(nextPageLink, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let apiVersion = '2018-12-01'; // Validate try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink 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.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.virtualHubName === null || this.client.virtualHubName === undefined || typeof this.client.virtualHubName.valueOf() !== 'string') { + throw new Error('this.client.virtualHubName cannot be null or undefined and it must be of type string.'); + } + if (this.client.connectionName === null || this.client.connectionName === undefined || typeof this.client.connectionName.valueOf() !== 'string') { + throw new Error('this.client.connectionName cannot be null or undefined and it must be of type string.'); + } + if (hubVirtualNetworkConnectionParameters === null || hubVirtualNetworkConnectionParameters === undefined) { + throw new Error('hubVirtualNetworkConnectionParameters cannot be null or undefined.'); } 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.'); @@ -358,12 +577,21 @@ function _listNext(nextPageLink, options, callback) { } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{virtualHubName}', encodeURIComponent(this.client.virtualHubName)); + requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(this.client.connectionName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -381,14 +609,28 @@ function _listNext(nextPageLink, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (hubVirtualNetworkConnectionParameters !== null && hubVirtualNetworkConnectionParameters !== undefined) { + let requestModelMapper = new client.models['HubVirtualNetworkConnection']().mapper(); + requestModel = client.serialize(requestModelMapper, hubVirtualNetworkConnectionParameters, 'hubVirtualNetworkConnectionParameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(hubVirtualNetworkConnectionParameters, 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) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -424,7 +666,7 @@ function _listNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ListHubVirtualNetworkConnectionsResult']().mapper(); + let resultMapper = new client.models['HubVirtualNetworkConnection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -434,66 +676,531 @@ function _listNext(nextPageLink, options, callback) { return callback(deserializationError); } } + // 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['HubVirtualNetworkConnection']().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); }); } -/** Class representing a HubVirtualNetworkConnections. */ -class HubVirtualNetworkConnections { - /** - * Create a HubVirtualNetworkConnections. - * @param {NetworkManagementClient} client Reference to the service client. - */ - constructor(client) { - this.client = client; - this._get = _get; - this._list = _list; - this._listNext = _listNext; +/** + * Updates HubVirtualNetworkConnection tags. + * + * @param {object} hubVirtualNetworkConnectionParameters Parameters supplied to + * update HubVirtualNetworkConnection tags. + * + * @param {object} [hubVirtualNetworkConnectionParameters.tags] Resource tags. + * + * @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. + * See {@link HubVirtualNetworkConnection} 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 _beginUpdateTags(hubVirtualNetworkConnectionParameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; } - - /** - * Retrieves the details of a HubVirtualNetworkConnection. - * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * - * @param {string} connectionName The name of the vpn connection. - * - * @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. - */ - getWithHttpOperationResponse(resourceGroupName, virtualHubName, connectionName, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._get(resourceGroupName, virtualHubName, connectionName, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); + if (!callback) { + throw new Error('callback cannot be null.'); } - - /** - * Retrieves the details of a HubVirtualNetworkConnection. + let apiVersion = '2018-12-01'; + // Validate + try { + 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.virtualHubName === null || this.client.virtualHubName === undefined || typeof this.client.virtualHubName.valueOf() !== 'string') { + throw new Error('this.client.virtualHubName cannot be null or undefined and it must be of type string.'); + } + if (this.client.connectionName === null || this.client.connectionName === undefined || typeof this.client.connectionName.valueOf() !== 'string') { + throw new Error('this.client.connectionName cannot be null or undefined and it must be of type string.'); + } + if (hubVirtualNetworkConnectionParameters === null || hubVirtualNetworkConnectionParameters === undefined) { + throw new Error('hubVirtualNetworkConnectionParameters cannot be null or undefined.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{virtualHubName}', encodeURIComponent(this.client.virtualHubName)); + requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(this.client.connectionName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PATCH'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + 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 (hubVirtualNetworkConnectionParameters !== null && hubVirtualNetworkConnectionParameters !== undefined) { + let requestModelMapper = new client.models['TagsObject']().mapper(); + requestModel = client.serialize(requestModelMapper, hubVirtualNetworkConnectionParameters, 'hubVirtualNetworkConnectionParameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(hubVirtualNetworkConnectionParameters, 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 && 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['ErrorModel']().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['HubVirtualNetworkConnection']().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); + } + } + // 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['HubVirtualNetworkConnection']().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); + }); +} + +/** + * Retrieves the details of all HubVirtualNetworkConnections. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @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. + * See {@link ListHubVirtualNetworkConnectionsResult} 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 _listNext(nextPageLink, 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 (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // 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 (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + 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['ErrorModel']().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['ListHubVirtualNetworkConnectionsResult']().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); + }); +} + +/** Class representing a HubVirtualNetworkConnections. */ +class HubVirtualNetworkConnections { + /** + * Create a HubVirtualNetworkConnections. + * @param {NetworkManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._updateTags = _updateTags; + this._list = _list; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginUpdateTags = _beginUpdateTags; + this._listNext = _listNext; + } + + /** + * Retrieves the details of a HubVirtualNetworkConnection. + * + * @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. + */ + getWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves the details of a HubVirtualNetworkConnection. + * + * @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 {HubVirtualNetworkConnection} - 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 HubVirtualNetworkConnection} 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. + */ + get(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._get(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(options, optionalCallback); + } + } + + /** + * Creates a HubVirtualNetworkConnection resource if it doesn't exist. Updates + * the HubVirtualNetworkConnection if one exists. + * + * @param {object} hubVirtualNetworkConnectionParameters Parameters supplied to + * create or update HubVirtualNetworkConnection. + * + * @param {object} [hubVirtualNetworkConnectionParameters.remoteVirtualNetwork] + * Reference to the remote virtual network. + * + * @param {string} + * [hubVirtualNetworkConnectionParameters.remoteVirtualNetwork.id] Resource ID. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.allowHubToRemoteVnetTransit] + * VirtualHub to RemoteVnet transit to enabled or not. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.allowRemoteVnetToUseHubVnetGateways] + * Allow RemoteVnet to use Virtual Hub's gateways. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.enableInternetSecurity] Enable + * internet security + * + * @param {string} [hubVirtualNetworkConnectionParameters.provisioningState] + * The provisioning state of the resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed' + * + * @param {string} [hubVirtualNetworkConnectionParameters.name] The name of the + * resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @param {string} [hubVirtualNetworkConnectionParameters.id] Resource 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. + */ + createOrUpdateWithHttpOperationResponse(hubVirtualNetworkConnectionParameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(hubVirtualNetworkConnectionParameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates a HubVirtualNetworkConnection resource if it doesn't exist. Updates + * the HubVirtualNetworkConnection if one exists. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. + * @param {object} hubVirtualNetworkConnectionParameters Parameters supplied to + * create or update HubVirtualNetworkConnection. * - * @param {string} virtualHubName The name of the VirtualHub. + * @param {object} [hubVirtualNetworkConnectionParameters.remoteVirtualNetwork] + * Reference to the remote virtual network. * - * @param {string} connectionName The name of the vpn connection. + * @param {string} + * [hubVirtualNetworkConnectionParameters.remoteVirtualNetwork.id] Resource ID. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.allowHubToRemoteVnetTransit] + * VirtualHub to RemoteVnet transit to enabled or not. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.allowRemoteVnetToUseHubVnetGateways] + * Allow RemoteVnet to use Virtual Hub's gateways. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.enableInternetSecurity] Enable + * internet security + * + * @param {string} [hubVirtualNetworkConnectionParameters.provisioningState] + * The provisioning state of the resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed' + * + * @param {string} [hubVirtualNetworkConnectionParameters.name] The name of the + * resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @param {string} [hubVirtualNetworkConnectionParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -523,7 +1230,7 @@ class HubVirtualNetworkConnections { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, virtualHubName, connectionName, options, optionalCallback) { + createOrUpdate(hubVirtualNetworkConnectionParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -532,23 +1239,24 @@ class HubVirtualNetworkConnections { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, virtualHubName, connectionName, options, (err, result, request, response) => { + self._createOrUpdate(hubVirtualNetworkConnectionParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, virtualHubName, connectionName, options, optionalCallback); + return self._createOrUpdate(hubVirtualNetworkConnectionParameters, options, optionalCallback); } } /** - * Retrieves the details of all HubVirtualNetworkConnections. + * Updates HubVirtualNetworkConnection tags. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. + * @param {object} hubVirtualNetworkConnectionParameters Parameters supplied to + * update HubVirtualNetworkConnection tags. * - * @param {string} virtualHubName The name of the VirtualHub. + * @param {object} [hubVirtualNetworkConnectionParameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -557,15 +1265,15 @@ class HubVirtualNetworkConnections { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - listWithHttpOperationResponse(resourceGroupName, virtualHubName, options) { + updateTagsWithHttpOperationResponse(hubVirtualNetworkConnectionParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._list(resourceGroupName, virtualHubName, options, (err, result, request, response) => { + self._updateTags(hubVirtualNetworkConnectionParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -575,12 +1283,92 @@ class HubVirtualNetworkConnections { }); } + /** + * Updates HubVirtualNetworkConnection tags. + * + * @param {object} hubVirtualNetworkConnectionParameters Parameters supplied to + * update HubVirtualNetworkConnection tags. + * + * @param {object} [hubVirtualNetworkConnectionParameters.tags] Resource tags. + * + * @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 {HubVirtualNetworkConnection} - 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 HubVirtualNetworkConnection} 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. + */ + updateTags(hubVirtualNetworkConnectionParameters, 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._updateTags(hubVirtualNetworkConnectionParameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._updateTags(hubVirtualNetworkConnectionParameters, options, optionalCallback); + } + } + /** * Retrieves the details of all HubVirtualNetworkConnections. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. + * @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. * - * @param {string} virtualHubName The name of the VirtualHub. + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves the details of all HubVirtualNetworkConnections. * * @param {object} [options] Optional Parameters. * @@ -610,7 +1398,239 @@ class HubVirtualNetworkConnections { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName, virtualHubName, options, optionalCallback) { + list(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._list(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(options, optionalCallback); + } + } + + /** + * Creates a HubVirtualNetworkConnection resource if it doesn't exist. Updates + * the HubVirtualNetworkConnection if one exists. + * + * @param {object} hubVirtualNetworkConnectionParameters Parameters supplied to + * create or update HubVirtualNetworkConnection. + * + * @param {object} [hubVirtualNetworkConnectionParameters.remoteVirtualNetwork] + * Reference to the remote virtual network. + * + * @param {string} + * [hubVirtualNetworkConnectionParameters.remoteVirtualNetwork.id] Resource ID. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.allowHubToRemoteVnetTransit] + * VirtualHub to RemoteVnet transit to enabled or not. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.allowRemoteVnetToUseHubVnetGateways] + * Allow RemoteVnet to use Virtual Hub's gateways. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.enableInternetSecurity] Enable + * internet security + * + * @param {string} [hubVirtualNetworkConnectionParameters.provisioningState] + * The provisioning state of the resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed' + * + * @param {string} [hubVirtualNetworkConnectionParameters.name] The name of the + * resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @param {string} [hubVirtualNetworkConnectionParameters.id] Resource 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. + */ + beginCreateOrUpdateWithHttpOperationResponse(hubVirtualNetworkConnectionParameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(hubVirtualNetworkConnectionParameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates a HubVirtualNetworkConnection resource if it doesn't exist. Updates + * the HubVirtualNetworkConnection if one exists. + * + * @param {object} hubVirtualNetworkConnectionParameters Parameters supplied to + * create or update HubVirtualNetworkConnection. + * + * @param {object} [hubVirtualNetworkConnectionParameters.remoteVirtualNetwork] + * Reference to the remote virtual network. + * + * @param {string} + * [hubVirtualNetworkConnectionParameters.remoteVirtualNetwork.id] Resource ID. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.allowHubToRemoteVnetTransit] + * VirtualHub to RemoteVnet transit to enabled or not. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.allowRemoteVnetToUseHubVnetGateways] + * Allow RemoteVnet to use Virtual Hub's gateways. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.enableInternetSecurity] Enable + * internet security + * + * @param {string} [hubVirtualNetworkConnectionParameters.provisioningState] + * The provisioning state of the resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed' + * + * @param {string} [hubVirtualNetworkConnectionParameters.name] The name of the + * resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @param {string} [hubVirtualNetworkConnectionParameters.id] Resource 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 {HubVirtualNetworkConnection} - 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 HubVirtualNetworkConnection} 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. + */ + beginCreateOrUpdate(hubVirtualNetworkConnectionParameters, 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._beginCreateOrUpdate(hubVirtualNetworkConnectionParameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(hubVirtualNetworkConnectionParameters, options, optionalCallback); + } + } + + /** + * Updates HubVirtualNetworkConnection tags. + * + * @param {object} hubVirtualNetworkConnectionParameters Parameters supplied to + * update HubVirtualNetworkConnection tags. + * + * @param {object} [hubVirtualNetworkConnectionParameters.tags] Resource tags. + * + * @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. + */ + beginUpdateTagsWithHttpOperationResponse(hubVirtualNetworkConnectionParameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginUpdateTags(hubVirtualNetworkConnectionParameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Updates HubVirtualNetworkConnection tags. + * + * @param {object} hubVirtualNetworkConnectionParameters Parameters supplied to + * update HubVirtualNetworkConnection tags. + * + * @param {object} [hubVirtualNetworkConnectionParameters.tags] Resource tags. + * + * @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 {HubVirtualNetworkConnection} - 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 HubVirtualNetworkConnection} 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. + */ + beginUpdateTags(hubVirtualNetworkConnectionParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -619,14 +1639,14 @@ class HubVirtualNetworkConnections { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._list(resourceGroupName, virtualHubName, options, (err, result, request, response) => { + self._beginUpdateTags(hubVirtualNetworkConnectionParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._list(resourceGroupName, virtualHubName, options, optionalCallback); + return self._beginUpdateTags(hubVirtualNetworkConnectionParameters, options, optionalCallback); } } diff --git a/lib/services/networkManagement2/lib/operations/index.d.ts b/lib/services/networkManagement2/lib/operations/index.d.ts index 61ae5217ca..30d7a55975 100644 --- a/lib/services/networkManagement2/lib/operations/index.d.ts +++ b/lib/services/networkManagement2/lib/operations/index.d.ts @@ -43777,8 +43777,6 @@ export interface VirtualWans { /** * Retrieves the details of a VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being retrieved. * * @param {object} [options] Optional Parameters. @@ -43792,13 +43790,11 @@ export interface VirtualWans { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, virtualWANName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(virtualWANName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieves the details of a VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being retrieved. * * @param {object} [options] Optional Parameters. @@ -43828,17 +43824,15 @@ export interface VirtualWans { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, virtualWANName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, virtualWANName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, virtualWANName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(virtualWANName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(virtualWANName: string, callback: ServiceCallback): void; + get(virtualWANName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Creates a VirtualWAN resource if it doesn't exist else updates the existing * VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being created or * updated. * @@ -43885,14 +43879,12 @@ export interface VirtualWans { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, virtualWANName: string, wANParameters: models.VirtualWAN, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(virtualWANName: string, wANParameters: models.VirtualWAN, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates a VirtualWAN resource if it doesn't exist else updates the existing * VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being created or * updated. * @@ -43955,16 +43947,14 @@ export interface VirtualWans { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, virtualWANName: string, wANParameters: models.VirtualWAN, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, virtualWANName: string, wANParameters: models.VirtualWAN, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, virtualWANName: string, wANParameters: models.VirtualWAN, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(virtualWANName: string, wANParameters: models.VirtualWAN, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(virtualWANName: string, wANParameters: models.VirtualWAN, callback: ServiceCallback): void; + createOrUpdate(virtualWANName: string, wANParameters: models.VirtualWAN, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Updates a VirtualWAN tags. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being updated. * * @param {object} wANParameters Parameters supplied to Update VirtualWAN tags. @@ -43982,13 +43972,11 @@ export interface VirtualWans { * * @reject {Error|ServiceError} - The error object. */ - updateTagsWithHttpOperationResponse(resourceGroupName: string, virtualWANName: string, wANParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateTagsWithHttpOperationResponse(virtualWANName: string, wANParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Updates a VirtualWAN tags. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being updated. * * @param {object} wANParameters Parameters supplied to Update VirtualWAN tags. @@ -44022,16 +44010,14 @@ export interface VirtualWans { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - updateTags(resourceGroupName: string, virtualWANName: string, wANParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - updateTags(resourceGroupName: string, virtualWANName: string, wANParameters: models.TagsObject, callback: ServiceCallback): void; - updateTags(resourceGroupName: string, virtualWANName: string, wANParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + updateTags(virtualWANName: string, wANParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + updateTags(virtualWANName: string, wANParameters: models.TagsObject, callback: ServiceCallback): void; + updateTags(virtualWANName: string, wANParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Deletes a VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being deleted. * * @param {object} [options] Optional Parameters. @@ -44045,13 +44031,11 @@ export interface VirtualWans { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, virtualWANName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(virtualWANName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being deleted. * * @param {object} [options] Optional Parameters. @@ -44080,16 +44064,14 @@ export interface VirtualWans { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, virtualWANName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, virtualWANName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, virtualWANName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(virtualWANName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(virtualWANName: string, callback: ServiceCallback): void; + deleteMethod(virtualWANName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Lists all the VirtualWANs in a resource group. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -44101,13 +44083,11 @@ export interface VirtualWans { * * @reject {Error|ServiceError} - The error object. */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Lists all the VirtualWANs in a resource group. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -44135,9 +44115,9 @@ export interface VirtualWans { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroup(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(callback: ServiceCallback): void; + listByResourceGroup(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -44195,8 +44175,6 @@ export interface VirtualWans { * Creates a VirtualWAN resource if it doesn't exist else updates the existing * VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being created or * updated. * @@ -44243,14 +44221,12 @@ export interface VirtualWans { * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, virtualWANName: string, wANParameters: models.VirtualWAN, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(virtualWANName: string, wANParameters: models.VirtualWAN, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates a VirtualWAN resource if it doesn't exist else updates the existing * VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being created or * updated. * @@ -44313,16 +44289,14 @@ export interface VirtualWans { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, virtualWANName: string, wANParameters: models.VirtualWAN, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, virtualWANName: string, wANParameters: models.VirtualWAN, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, virtualWANName: string, wANParameters: models.VirtualWAN, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(virtualWANName: string, wANParameters: models.VirtualWAN, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(virtualWANName: string, wANParameters: models.VirtualWAN, callback: ServiceCallback): void; + beginCreateOrUpdate(virtualWANName: string, wANParameters: models.VirtualWAN, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Updates a VirtualWAN tags. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being updated. * * @param {object} wANParameters Parameters supplied to Update VirtualWAN tags. @@ -44340,13 +44314,11 @@ export interface VirtualWans { * * @reject {Error|ServiceError} - The error object. */ - beginUpdateTagsWithHttpOperationResponse(resourceGroupName: string, virtualWANName: string, wANParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginUpdateTagsWithHttpOperationResponse(virtualWANName: string, wANParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Updates a VirtualWAN tags. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being updated. * * @param {object} wANParameters Parameters supplied to Update VirtualWAN tags. @@ -44380,16 +44352,14 @@ export interface VirtualWans { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdateTags(resourceGroupName: string, virtualWANName: string, wANParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdateTags(resourceGroupName: string, virtualWANName: string, wANParameters: models.TagsObject, callback: ServiceCallback): void; - beginUpdateTags(resourceGroupName: string, virtualWANName: string, wANParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginUpdateTags(virtualWANName: string, wANParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdateTags(virtualWANName: string, wANParameters: models.TagsObject, callback: ServiceCallback): void; + beginUpdateTags(virtualWANName: string, wANParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Deletes a VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being deleted. * * @param {object} [options] Optional Parameters. @@ -44403,13 +44373,11 @@ export interface VirtualWans { * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, virtualWANName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(virtualWANName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being deleted. * * @param {object} [options] Optional Parameters. @@ -44438,9 +44406,9 @@ export interface VirtualWans { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, virtualWANName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, virtualWANName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, virtualWANName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(virtualWANName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(virtualWANName: string, callback: ServiceCallback): void; + beginDeleteMethod(virtualWANName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -44569,8 +44537,6 @@ export interface VpnSites { /** * Retrieves the details of a VPN site. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being retrieved. * * @param {object} [options] Optional Parameters. @@ -44584,13 +44550,11 @@ export interface VpnSites { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, vpnSiteName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(vpnSiteName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieves the details of a VPN site. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being retrieved. * * @param {object} [options] Optional Parameters. @@ -44620,17 +44584,15 @@ export interface VpnSites { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, vpnSiteName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, vpnSiteName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, vpnSiteName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(vpnSiteName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(vpnSiteName: string, callback: ServiceCallback): void; + get(vpnSiteName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Creates a VpnSite resource if it doesn't exist else updates the existing * VpnSite. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being created or * updated. * @@ -44698,14 +44660,12 @@ export interface VpnSites { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, vpnSiteName: string, vpnSiteParameters: models.VpnSite, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(vpnSiteName: string, vpnSiteParameters: models.VpnSite, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates a VpnSite resource if it doesn't exist else updates the existing * VpnSite. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being created or * updated. * @@ -44789,16 +44749,14 @@ export interface VpnSites { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, vpnSiteName: string, vpnSiteParameters: models.VpnSite, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, vpnSiteName: string, vpnSiteParameters: models.VpnSite, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, vpnSiteName: string, vpnSiteParameters: models.VpnSite, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(vpnSiteName: string, vpnSiteParameters: models.VpnSite, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(vpnSiteName: string, vpnSiteParameters: models.VpnSite, callback: ServiceCallback): void; + createOrUpdate(vpnSiteName: string, vpnSiteParameters: models.VpnSite, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Updates VpnSite tags. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being updated. * * @param {object} vpnSiteParameters Parameters supplied to update VpnSite @@ -44817,13 +44775,11 @@ export interface VpnSites { * * @reject {Error|ServiceError} - The error object. */ - updateTagsWithHttpOperationResponse(resourceGroupName: string, vpnSiteName: string, vpnSiteParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateTagsWithHttpOperationResponse(vpnSiteName: string, vpnSiteParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Updates VpnSite tags. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being updated. * * @param {object} vpnSiteParameters Parameters supplied to update VpnSite @@ -44858,16 +44814,14 @@ export interface VpnSites { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - updateTags(resourceGroupName: string, vpnSiteName: string, vpnSiteParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - updateTags(resourceGroupName: string, vpnSiteName: string, vpnSiteParameters: models.TagsObject, callback: ServiceCallback): void; - updateTags(resourceGroupName: string, vpnSiteName: string, vpnSiteParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + updateTags(vpnSiteName: string, vpnSiteParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + updateTags(vpnSiteName: string, vpnSiteParameters: models.TagsObject, callback: ServiceCallback): void; + updateTags(vpnSiteName: string, vpnSiteParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Deletes a VpnSite. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being deleted. * * @param {object} [options] Optional Parameters. @@ -44881,13 +44835,11 @@ export interface VpnSites { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, vpnSiteName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(vpnSiteName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a VpnSite. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being deleted. * * @param {object} [options] Optional Parameters. @@ -44916,16 +44868,14 @@ export interface VpnSites { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, vpnSiteName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, vpnSiteName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, vpnSiteName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(vpnSiteName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(vpnSiteName: string, callback: ServiceCallback): void; + deleteMethod(vpnSiteName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Lists all the vpnSites in a resource group. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -44937,13 +44887,11 @@ export interface VpnSites { * * @reject {Error|ServiceError} - The error object. */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Lists all the vpnSites in a resource group. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -44971,9 +44919,9 @@ export interface VpnSites { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroup(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(callback: ServiceCallback): void; + listByResourceGroup(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -45031,8 +44979,6 @@ export interface VpnSites { * Creates a VpnSite resource if it doesn't exist else updates the existing * VpnSite. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being created or * updated. * @@ -45100,14 +45046,12 @@ export interface VpnSites { * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, vpnSiteName: string, vpnSiteParameters: models.VpnSite, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(vpnSiteName: string, vpnSiteParameters: models.VpnSite, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates a VpnSite resource if it doesn't exist else updates the existing * VpnSite. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being created or * updated. * @@ -45191,16 +45135,14 @@ export interface VpnSites { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, vpnSiteName: string, vpnSiteParameters: models.VpnSite, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, vpnSiteName: string, vpnSiteParameters: models.VpnSite, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, vpnSiteName: string, vpnSiteParameters: models.VpnSite, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(vpnSiteName: string, vpnSiteParameters: models.VpnSite, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(vpnSiteName: string, vpnSiteParameters: models.VpnSite, callback: ServiceCallback): void; + beginCreateOrUpdate(vpnSiteName: string, vpnSiteParameters: models.VpnSite, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Updates VpnSite tags. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being updated. * * @param {object} vpnSiteParameters Parameters supplied to update VpnSite @@ -45219,13 +45161,11 @@ export interface VpnSites { * * @reject {Error|ServiceError} - The error object. */ - beginUpdateTagsWithHttpOperationResponse(resourceGroupName: string, vpnSiteName: string, vpnSiteParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginUpdateTagsWithHttpOperationResponse(vpnSiteName: string, vpnSiteParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Updates VpnSite tags. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being updated. * * @param {object} vpnSiteParameters Parameters supplied to update VpnSite @@ -45260,16 +45200,14 @@ export interface VpnSites { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdateTags(resourceGroupName: string, vpnSiteName: string, vpnSiteParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdateTags(resourceGroupName: string, vpnSiteName: string, vpnSiteParameters: models.TagsObject, callback: ServiceCallback): void; - beginUpdateTags(resourceGroupName: string, vpnSiteName: string, vpnSiteParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginUpdateTags(vpnSiteName: string, vpnSiteParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdateTags(vpnSiteName: string, vpnSiteParameters: models.TagsObject, callback: ServiceCallback): void; + beginUpdateTags(vpnSiteName: string, vpnSiteParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Deletes a VpnSite. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being deleted. * * @param {object} [options] Optional Parameters. @@ -45283,13 +45221,11 @@ export interface VpnSites { * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vpnSiteName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(vpnSiteName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a VpnSite. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being deleted. * * @param {object} [options] Optional Parameters. @@ -45318,9 +45254,9 @@ export interface VpnSites { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, vpnSiteName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, vpnSiteName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, vpnSiteName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(vpnSiteName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(vpnSiteName: string, callback: ServiceCallback): void; + beginDeleteMethod(vpnSiteName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -45450,8 +45386,6 @@ export interface VpnSitesConfiguration { * Gives the sas-url to download the configurations for vpn-sites in a resource * group. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} virtualWANName The name of the VirtualWAN for which * configuration of all vpn-sites is needed. * @@ -45475,14 +45409,12 @@ export interface VpnSitesConfiguration { * * @reject {Error|ServiceError} - The error object. */ - downloadWithHttpOperationResponse(resourceGroupName: string, virtualWANName: string, request: models.GetVpnSitesConfigurationRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + downloadWithHttpOperationResponse(virtualWANName: string, request: models.GetVpnSitesConfigurationRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gives the sas-url to download the configurations for vpn-sites in a resource * group. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} virtualWANName The name of the VirtualWAN for which * configuration of all vpn-sites is needed. * @@ -45521,17 +45453,15 @@ export interface VpnSitesConfiguration { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - download(resourceGroupName: string, virtualWANName: string, request: models.GetVpnSitesConfigurationRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - download(resourceGroupName: string, virtualWANName: string, request: models.GetVpnSitesConfigurationRequest, callback: ServiceCallback): void; - download(resourceGroupName: string, virtualWANName: string, request: models.GetVpnSitesConfigurationRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + download(virtualWANName: string, request: models.GetVpnSitesConfigurationRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + download(virtualWANName: string, request: models.GetVpnSitesConfigurationRequest, callback: ServiceCallback): void; + download(virtualWANName: string, request: models.GetVpnSitesConfigurationRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Gives the sas-url to download the configurations for vpn-sites in a resource * group. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} virtualWANName The name of the VirtualWAN for which * configuration of all vpn-sites is needed. * @@ -45555,14 +45485,12 @@ export interface VpnSitesConfiguration { * * @reject {Error|ServiceError} - The error object. */ - beginDownloadWithHttpOperationResponse(resourceGroupName: string, virtualWANName: string, request: models.GetVpnSitesConfigurationRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDownloadWithHttpOperationResponse(virtualWANName: string, request: models.GetVpnSitesConfigurationRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gives the sas-url to download the configurations for vpn-sites in a resource * group. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} virtualWANName The name of the VirtualWAN for which * configuration of all vpn-sites is needed. * @@ -45601,9 +45529,9 @@ export interface VpnSitesConfiguration { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDownload(resourceGroupName: string, virtualWANName: string, request: models.GetVpnSitesConfigurationRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDownload(resourceGroupName: string, virtualWANName: string, request: models.GetVpnSitesConfigurationRequest, callback: ServiceCallback): void; - beginDownload(resourceGroupName: string, virtualWANName: string, request: models.GetVpnSitesConfigurationRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDownload(virtualWANName: string, request: models.GetVpnSitesConfigurationRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDownload(virtualWANName: string, request: models.GetVpnSitesConfigurationRequest, callback: ServiceCallback): void; + beginDownload(virtualWANName: string, request: models.GetVpnSitesConfigurationRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -45618,10 +45546,6 @@ export interface VirtualHubs { /** * Retrieves the details of a VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -45633,15 +45557,11 @@ export interface VirtualHubs { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, virtualHubName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieves the details of a VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -45669,19 +45589,15 @@ export interface VirtualHubs { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, virtualHubName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, virtualHubName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, virtualHubName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(callback: ServiceCallback): void; + get(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Creates a VirtualHub resource if it doesn't exist else updates the existing * VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} virtualHubParameters Parameters supplied to create or update * VirtualHub. * @@ -45731,16 +45647,12 @@ export interface VirtualHubs { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, virtualHubName: string, virtualHubParameters: models.VirtualHub, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(virtualHubParameters: models.VirtualHub, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates a VirtualHub resource if it doesn't exist else updates the existing * VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} virtualHubParameters Parameters supplied to create or update * VirtualHub. * @@ -45806,18 +45718,14 @@ export interface VirtualHubs { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, virtualHubName: string, virtualHubParameters: models.VirtualHub, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, virtualHubName: string, virtualHubParameters: models.VirtualHub, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, virtualHubName: string, virtualHubParameters: models.VirtualHub, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(virtualHubParameters: models.VirtualHub, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(virtualHubParameters: models.VirtualHub, callback: ServiceCallback): void; + createOrUpdate(virtualHubParameters: models.VirtualHub, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Updates VirtualHub tags. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} virtualHubParameters Parameters supplied to update * VirtualHub tags. * @@ -45834,15 +45742,11 @@ export interface VirtualHubs { * * @reject {Error|ServiceError} - The error object. */ - updateTagsWithHttpOperationResponse(resourceGroupName: string, virtualHubName: string, virtualHubParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateTagsWithHttpOperationResponse(virtualHubParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Updates VirtualHub tags. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} virtualHubParameters Parameters supplied to update * VirtualHub tags. * @@ -45875,18 +45779,14 @@ export interface VirtualHubs { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - updateTags(resourceGroupName: string, virtualHubName: string, virtualHubParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - updateTags(resourceGroupName: string, virtualHubName: string, virtualHubParameters: models.TagsObject, callback: ServiceCallback): void; - updateTags(resourceGroupName: string, virtualHubName: string, virtualHubParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + updateTags(virtualHubParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + updateTags(virtualHubParameters: models.TagsObject, callback: ServiceCallback): void; + updateTags(virtualHubParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Deletes a VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -45898,15 +45798,11 @@ export interface VirtualHubs { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, virtualHubName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -45933,16 +45829,14 @@ export interface VirtualHubs { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, virtualHubName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, virtualHubName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, virtualHubName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(callback: ServiceCallback): void; + deleteMethod(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Lists all the VirtualHubs in a resource group. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -45954,13 +45848,11 @@ export interface VirtualHubs { * * @reject {Error|ServiceError} - The error object. */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Lists all the VirtualHubs in a resource group. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -45988,9 +45880,9 @@ export interface VirtualHubs { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroup(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(callback: ServiceCallback): void; + listByResourceGroup(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -46048,10 +45940,6 @@ export interface VirtualHubs { * Creates a VirtualHub resource if it doesn't exist else updates the existing * VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} virtualHubParameters Parameters supplied to create or update * VirtualHub. * @@ -46101,16 +45989,12 @@ export interface VirtualHubs { * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, virtualHubName: string, virtualHubParameters: models.VirtualHub, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(virtualHubParameters: models.VirtualHub, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates a VirtualHub resource if it doesn't exist else updates the existing * VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} virtualHubParameters Parameters supplied to create or update * VirtualHub. * @@ -46176,18 +46060,14 @@ export interface VirtualHubs { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, virtualHubName: string, virtualHubParameters: models.VirtualHub, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, virtualHubName: string, virtualHubParameters: models.VirtualHub, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, virtualHubName: string, virtualHubParameters: models.VirtualHub, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(virtualHubParameters: models.VirtualHub, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(virtualHubParameters: models.VirtualHub, callback: ServiceCallback): void; + beginCreateOrUpdate(virtualHubParameters: models.VirtualHub, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Updates VirtualHub tags. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} virtualHubParameters Parameters supplied to update * VirtualHub tags. * @@ -46204,15 +46084,11 @@ export interface VirtualHubs { * * @reject {Error|ServiceError} - The error object. */ - beginUpdateTagsWithHttpOperationResponse(resourceGroupName: string, virtualHubName: string, virtualHubParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginUpdateTagsWithHttpOperationResponse(virtualHubParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Updates VirtualHub tags. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} virtualHubParameters Parameters supplied to update * VirtualHub tags. * @@ -46245,18 +46121,14 @@ export interface VirtualHubs { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdateTags(resourceGroupName: string, virtualHubName: string, virtualHubParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdateTags(resourceGroupName: string, virtualHubName: string, virtualHubParameters: models.TagsObject, callback: ServiceCallback): void; - beginUpdateTags(resourceGroupName: string, virtualHubName: string, virtualHubParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginUpdateTags(virtualHubParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdateTags(virtualHubParameters: models.TagsObject, callback: ServiceCallback): void; + beginUpdateTags(virtualHubParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Deletes a VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -46268,15 +46140,11 @@ export interface VirtualHubs { * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, virtualHubName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -46303,9 +46171,9 @@ export interface VirtualHubs { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, virtualHubName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, virtualHubName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, virtualHubName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(callback: ServiceCallback): void; + beginDeleteMethod(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -46434,11 +46302,89 @@ export interface HubVirtualNetworkConnections { /** * Retrieves the details of a HubVirtualNetworkConnection. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned * - * @param {string} virtualHubName The name of the VirtualHub. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} connectionName The name of the vpn connection. + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieves the details of a HubVirtualNetworkConnection. + * + * @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 {HubVirtualNetworkConnection} - 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. + * + * {HubVirtualNetworkConnection} [result] - The deserialized result object if an error did not occur. + * See {@link HubVirtualNetworkConnection} 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. + */ + get(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(callback: ServiceCallback): void; + get(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates a HubVirtualNetworkConnection resource if it doesn't exist. Updates + * the HubVirtualNetworkConnection if one exists. + * + * @param {object} hubVirtualNetworkConnectionParameters Parameters supplied to + * create or update HubVirtualNetworkConnection. + * + * @param {object} [hubVirtualNetworkConnectionParameters.remoteVirtualNetwork] + * Reference to the remote virtual network. + * + * @param {string} + * [hubVirtualNetworkConnectionParameters.remoteVirtualNetwork.id] Resource ID. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.allowHubToRemoteVnetTransit] + * VirtualHub to RemoteVnet transit to enabled or not. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.allowRemoteVnetToUseHubVnetGateways] + * Allow RemoteVnet to use Virtual Hub's gateways. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.enableInternetSecurity] Enable + * internet security + * + * @param {string} [hubVirtualNetworkConnectionParameters.provisioningState] + * The provisioning state of the resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed' + * + * @param {string} [hubVirtualNetworkConnectionParameters.name] The name of the + * resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @param {string} [hubVirtualNetworkConnectionParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -46451,16 +46397,42 @@ export interface HubVirtualNetworkConnections { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, virtualHubName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(hubVirtualNetworkConnectionParameters: models.HubVirtualNetworkConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieves the details of a HubVirtualNetworkConnection. + * Creates a HubVirtualNetworkConnection resource if it doesn't exist. Updates + * the HubVirtualNetworkConnection if one exists. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. + * @param {object} hubVirtualNetworkConnectionParameters Parameters supplied to + * create or update HubVirtualNetworkConnection. * - * @param {string} virtualHubName The name of the VirtualHub. + * @param {object} [hubVirtualNetworkConnectionParameters.remoteVirtualNetwork] + * Reference to the remote virtual network. + * + * @param {string} + * [hubVirtualNetworkConnectionParameters.remoteVirtualNetwork.id] Resource ID. * - * @param {string} connectionName The name of the vpn connection. + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.allowHubToRemoteVnetTransit] + * VirtualHub to RemoteVnet transit to enabled or not. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.allowRemoteVnetToUseHubVnetGateways] + * Allow RemoteVnet to use Virtual Hub's gateways. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.enableInternetSecurity] Enable + * internet security + * + * @param {string} [hubVirtualNetworkConnectionParameters.provisioningState] + * The provisioning state of the resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed' + * + * @param {string} [hubVirtualNetworkConnectionParameters.name] The name of the + * resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @param {string} [hubVirtualNetworkConnectionParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -46490,17 +46462,18 @@ export interface HubVirtualNetworkConnections { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, virtualHubName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, virtualHubName: string, connectionName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, virtualHubName: string, connectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(hubVirtualNetworkConnectionParameters: models.HubVirtualNetworkConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(hubVirtualNetworkConnectionParameters: models.HubVirtualNetworkConnection, callback: ServiceCallback): void; + createOrUpdate(hubVirtualNetworkConnectionParameters: models.HubVirtualNetworkConnection, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Retrieves the details of all HubVirtualNetworkConnections. + * Updates HubVirtualNetworkConnection tags. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. + * @param {object} hubVirtualNetworkConnectionParameters Parameters supplied to + * update HubVirtualNetworkConnection tags. * - * @param {string} virtualHubName The name of the VirtualHub. + * @param {object} [hubVirtualNetworkConnectionParameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -46509,18 +46482,71 @@ export interface HubVirtualNetworkConnections { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, virtualHubName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateTagsWithHttpOperationResponse(hubVirtualNetworkConnectionParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates HubVirtualNetworkConnection tags. + * + * @param {object} hubVirtualNetworkConnectionParameters Parameters supplied to + * update HubVirtualNetworkConnection tags. + * + * @param {object} [hubVirtualNetworkConnectionParameters.tags] Resource tags. + * + * @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 {HubVirtualNetworkConnection} - 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. + * + * {HubVirtualNetworkConnection} [result] - The deserialized result object if an error did not occur. + * See {@link HubVirtualNetworkConnection} 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. + */ + updateTags(hubVirtualNetworkConnectionParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + updateTags(hubVirtualNetworkConnectionParameters: models.TagsObject, callback: ServiceCallback): void; + updateTags(hubVirtualNetworkConnectionParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** * Retrieves the details of all HubVirtualNetworkConnections. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. + * @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. * - * @param {string} virtualHubName The name of the VirtualHub. + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieves the details of all HubVirtualNetworkConnections. * * @param {object} [options] Optional Parameters. * @@ -46550,9 +46576,187 @@ export interface HubVirtualNetworkConnections { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, virtualHubName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, virtualHubName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, virtualHubName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates a HubVirtualNetworkConnection resource if it doesn't exist. Updates + * the HubVirtualNetworkConnection if one exists. + * + * @param {object} hubVirtualNetworkConnectionParameters Parameters supplied to + * create or update HubVirtualNetworkConnection. + * + * @param {object} [hubVirtualNetworkConnectionParameters.remoteVirtualNetwork] + * Reference to the remote virtual network. + * + * @param {string} + * [hubVirtualNetworkConnectionParameters.remoteVirtualNetwork.id] Resource ID. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.allowHubToRemoteVnetTransit] + * VirtualHub to RemoteVnet transit to enabled or not. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.allowRemoteVnetToUseHubVnetGateways] + * Allow RemoteVnet to use Virtual Hub's gateways. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.enableInternetSecurity] Enable + * internet security + * + * @param {string} [hubVirtualNetworkConnectionParameters.provisioningState] + * The provisioning state of the resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed' + * + * @param {string} [hubVirtualNetworkConnectionParameters.name] The name of the + * resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @param {string} [hubVirtualNetworkConnectionParameters.id] Resource 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. + */ + beginCreateOrUpdateWithHttpOperationResponse(hubVirtualNetworkConnectionParameters: models.HubVirtualNetworkConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates a HubVirtualNetworkConnection resource if it doesn't exist. Updates + * the HubVirtualNetworkConnection if one exists. + * + * @param {object} hubVirtualNetworkConnectionParameters Parameters supplied to + * create or update HubVirtualNetworkConnection. + * + * @param {object} [hubVirtualNetworkConnectionParameters.remoteVirtualNetwork] + * Reference to the remote virtual network. + * + * @param {string} + * [hubVirtualNetworkConnectionParameters.remoteVirtualNetwork.id] Resource ID. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.allowHubToRemoteVnetTransit] + * VirtualHub to RemoteVnet transit to enabled or not. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.allowRemoteVnetToUseHubVnetGateways] + * Allow RemoteVnet to use Virtual Hub's gateways. + * + * @param {boolean} + * [hubVirtualNetworkConnectionParameters.enableInternetSecurity] Enable + * internet security + * + * @param {string} [hubVirtualNetworkConnectionParameters.provisioningState] + * The provisioning state of the resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed' + * + * @param {string} [hubVirtualNetworkConnectionParameters.name] The name of the + * resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @param {string} [hubVirtualNetworkConnectionParameters.id] Resource 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 {HubVirtualNetworkConnection} - 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. + * + * {HubVirtualNetworkConnection} [result] - The deserialized result object if an error did not occur. + * See {@link HubVirtualNetworkConnection} 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. + */ + beginCreateOrUpdate(hubVirtualNetworkConnectionParameters: models.HubVirtualNetworkConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(hubVirtualNetworkConnectionParameters: models.HubVirtualNetworkConnection, callback: ServiceCallback): void; + beginCreateOrUpdate(hubVirtualNetworkConnectionParameters: models.HubVirtualNetworkConnection, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates HubVirtualNetworkConnection tags. + * + * @param {object} hubVirtualNetworkConnectionParameters Parameters supplied to + * update HubVirtualNetworkConnection tags. + * + * @param {object} [hubVirtualNetworkConnectionParameters.tags] Resource tags. + * + * @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. + */ + beginUpdateTagsWithHttpOperationResponse(hubVirtualNetworkConnectionParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates HubVirtualNetworkConnection tags. + * + * @param {object} hubVirtualNetworkConnectionParameters Parameters supplied to + * update HubVirtualNetworkConnection tags. + * + * @param {object} [hubVirtualNetworkConnectionParameters.tags] Resource tags. + * + * @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 {HubVirtualNetworkConnection} - 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. + * + * {HubVirtualNetworkConnection} [result] - The deserialized result object if an error did not occur. + * See {@link HubVirtualNetworkConnection} 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. + */ + beginUpdateTags(hubVirtualNetworkConnectionParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdateTags(hubVirtualNetworkConnectionParameters: models.TagsObject, callback: ServiceCallback): void; + beginUpdateTags(hubVirtualNetworkConnectionParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -46625,8 +46829,6 @@ export interface VpnGateways { /** * Retrieves the details of a 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. @@ -46640,13 +46842,11 @@ export interface VpnGateways { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieves the details of a 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. @@ -46676,17 +46876,15 @@ export interface VpnGateways { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, gatewayName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(gatewayName: string, callback: ServiceCallback): void; + get(gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Creates a virtual wan vpn gateway if it doesn't exist else updates the * existing gateway. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} vpnGatewayParameters Parameters supplied to create or Update @@ -46736,14 +46934,12 @@ export interface VpnGateways { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, vpnGatewayParameters: models.VpnGateway, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(gatewayName: string, vpnGatewayParameters: models.VpnGateway, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates a virtual wan vpn gateway if it doesn't exist else updates the * existing gateway. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} vpnGatewayParameters Parameters supplied to create or Update @@ -46809,16 +47005,14 @@ export interface VpnGateways { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, gatewayName: string, vpnGatewayParameters: models.VpnGateway, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, gatewayName: string, vpnGatewayParameters: models.VpnGateway, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, gatewayName: string, vpnGatewayParameters: models.VpnGateway, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(gatewayName: string, vpnGatewayParameters: models.VpnGateway, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(gatewayName: string, vpnGatewayParameters: models.VpnGateway, callback: ServiceCallback): void; + createOrUpdate(gatewayName: string, vpnGatewayParameters: models.VpnGateway, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Updates virtual wan vpn gateway tags. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} vpnGatewayParameters Parameters supplied to update a virtual @@ -46837,13 +47031,11 @@ export interface VpnGateways { * * @reject {Error|ServiceError} - The error object. */ - updateTagsWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, vpnGatewayParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateTagsWithHttpOperationResponse(gatewayName: string, vpnGatewayParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Updates virtual wan vpn gateway tags. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} vpnGatewayParameters Parameters supplied to update a virtual @@ -46878,16 +47070,14 @@ export interface VpnGateways { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - updateTags(resourceGroupName: string, gatewayName: string, vpnGatewayParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - updateTags(resourceGroupName: string, gatewayName: string, vpnGatewayParameters: models.TagsObject, callback: ServiceCallback): void; - updateTags(resourceGroupName: string, gatewayName: string, vpnGatewayParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + updateTags(gatewayName: string, vpnGatewayParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + updateTags(gatewayName: string, vpnGatewayParameters: models.TagsObject, callback: ServiceCallback): void; + updateTags(gatewayName: string, vpnGatewayParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Deletes a 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. @@ -46901,13 +47091,11 @@ export interface VpnGateways { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a 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. @@ -46936,16 +47124,14 @@ export interface VpnGateways { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, gatewayName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(gatewayName: string, callback: ServiceCallback): void; + deleteMethod(gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Lists all the VpnGateways in a resource group. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -46957,13 +47143,11 @@ export interface VpnGateways { * * @reject {Error|ServiceError} - The error object. */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Lists all the VpnGateways in a resource group. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -46991,9 +47175,9 @@ export interface VpnGateways { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroup(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(callback: ServiceCallback): void; + listByResourceGroup(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -47051,8 +47235,6 @@ export interface VpnGateways { * Creates a virtual wan vpn gateway if it doesn't exist else updates the * existing gateway. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} vpnGatewayParameters Parameters supplied to create or Update @@ -47102,14 +47284,12 @@ export interface VpnGateways { * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, vpnGatewayParameters: models.VpnGateway, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(gatewayName: string, vpnGatewayParameters: models.VpnGateway, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates a virtual wan vpn gateway if it doesn't exist else updates the * existing gateway. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} vpnGatewayParameters Parameters supplied to create or Update @@ -47175,16 +47355,14 @@ export interface VpnGateways { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, gatewayName: string, vpnGatewayParameters: models.VpnGateway, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, gatewayName: string, vpnGatewayParameters: models.VpnGateway, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, gatewayName: string, vpnGatewayParameters: models.VpnGateway, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(gatewayName: string, vpnGatewayParameters: models.VpnGateway, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(gatewayName: string, vpnGatewayParameters: models.VpnGateway, callback: ServiceCallback): void; + beginCreateOrUpdate(gatewayName: string, vpnGatewayParameters: models.VpnGateway, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Updates virtual wan vpn gateway tags. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} vpnGatewayParameters Parameters supplied to update a virtual @@ -47203,13 +47381,11 @@ export interface VpnGateways { * * @reject {Error|ServiceError} - The error object. */ - beginUpdateTagsWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, vpnGatewayParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginUpdateTagsWithHttpOperationResponse(gatewayName: string, vpnGatewayParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Updates virtual wan vpn gateway tags. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} vpnGatewayParameters Parameters supplied to update a virtual @@ -47244,16 +47420,14 @@ export interface VpnGateways { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdateTags(resourceGroupName: string, gatewayName: string, vpnGatewayParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdateTags(resourceGroupName: string, gatewayName: string, vpnGatewayParameters: models.TagsObject, callback: ServiceCallback): void; - beginUpdateTags(resourceGroupName: string, gatewayName: string, vpnGatewayParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginUpdateTags(gatewayName: string, vpnGatewayParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdateTags(gatewayName: string, vpnGatewayParameters: models.TagsObject, callback: ServiceCallback): void; + beginUpdateTags(gatewayName: string, vpnGatewayParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Deletes a 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. @@ -47267,13 +47441,11 @@ export interface VpnGateways { * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a 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. @@ -47302,9 +47474,9 @@ export interface VpnGateways { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, gatewayName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(gatewayName: string, callback: ServiceCallback): void; + beginDeleteMethod(gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -47433,12 +47605,8 @@ export interface VpnConnections { /** * Retrieves the details of a vpn connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the vpn connection. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -47450,17 +47618,13 @@ export interface VpnConnections { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieves the details of a vpn connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the vpn connection. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -47488,21 +47652,17 @@ export interface VpnConnections { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, gatewayName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, gatewayName: string, connectionName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, gatewayName: string, connectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(gatewayName: string, callback: ServiceCallback): void; + get(gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else * updates the existing connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the connection. - * * @param {object} vpnConnectionParameters Parameters supplied to create or * Update a VPN Connection. * @@ -47559,18 +47719,14 @@ export interface VpnConnections { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, connectionName: string, vpnConnectionParameters: models.VpnConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(gatewayName: string, vpnConnectionParameters: models.VpnConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else * updates the existing connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the connection. - * * @param {object} vpnConnectionParameters Parameters supplied to create or * Update a VPN Connection. * @@ -47643,20 +47799,16 @@ export interface VpnConnections { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, gatewayName: string, connectionName: string, vpnConnectionParameters: models.VpnConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, gatewayName: string, connectionName: string, vpnConnectionParameters: models.VpnConnection, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, gatewayName: string, connectionName: string, vpnConnectionParameters: models.VpnConnection, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(gatewayName: string, vpnConnectionParameters: models.VpnConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(gatewayName: string, vpnConnectionParameters: models.VpnConnection, callback: ServiceCallback): void; + createOrUpdate(gatewayName: string, vpnConnectionParameters: models.VpnConnection, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Deletes a vpn connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the connection. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -47668,17 +47820,13 @@ export interface VpnConnections { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a vpn connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the connection. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -47705,16 +47853,14 @@ export interface VpnConnections { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, gatewayName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, gatewayName: string, connectionName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, gatewayName: string, connectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(gatewayName: string, callback: ServiceCallback): void; + deleteMethod(gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * 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. @@ -47728,13 +47874,11 @@ export interface VpnConnections { * * @reject {Error|ServiceError} - The error object. */ - listByVpnGatewayWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByVpnGatewayWithHttpOperationResponse(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. @@ -47765,21 +47909,17 @@ export interface VpnConnections { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else * updates the existing connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the connection. - * * @param {object} vpnConnectionParameters Parameters supplied to create or * Update a VPN Connection. * @@ -47836,18 +47976,14 @@ export interface VpnConnections { * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, connectionName: string, vpnConnectionParameters: models.VpnConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(gatewayName: string, vpnConnectionParameters: models.VpnConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else * updates the existing connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the connection. - * * @param {object} vpnConnectionParameters Parameters supplied to create or * Update a VPN Connection. * @@ -47920,20 +48056,16 @@ export interface VpnConnections { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, gatewayName: string, connectionName: string, vpnConnectionParameters: models.VpnConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, gatewayName: string, connectionName: string, vpnConnectionParameters: models.VpnConnection, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, gatewayName: string, connectionName: string, vpnConnectionParameters: models.VpnConnection, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(gatewayName: string, vpnConnectionParameters: models.VpnConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(gatewayName: string, vpnConnectionParameters: models.VpnConnection, callback: ServiceCallback): void; + beginCreateOrUpdate(gatewayName: string, vpnConnectionParameters: models.VpnConnection, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Deletes a vpn connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the connection. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -47945,17 +48077,13 @@ export interface VpnConnections { * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a vpn connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the connection. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -47982,9 +48110,9 @@ export interface VpnConnections { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, gatewayName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, gatewayName: string, connectionName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, gatewayName: string, connectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(gatewayName: string, callback: ServiceCallback): void; + beginDeleteMethod(gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -48057,9 +48185,6 @@ export interface P2sVpnServerConfigurations { /** * Retrieves the details of a P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnServerConfiguration. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -48076,14 +48201,11 @@ export interface P2sVpnServerConfigurations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(virtualWanName: string, p2SVpnServerConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieves the details of a P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnServerConfiguration. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -48117,17 +48239,15 @@ export interface P2sVpnServerConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(virtualWanName: string, p2SVpnServerConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(virtualWanName: string, p2SVpnServerConfigurationName: string, callback: ServiceCallback): void; + get(virtualWanName: string, p2SVpnServerConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it * doesn't exist else updates the existing P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -48193,14 +48313,12 @@ export interface P2sVpnServerConfigurations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it * doesn't exist else updates the existing P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -48283,17 +48401,14 @@ export interface P2sVpnServerConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, callback: ServiceCallback): void; + createOrUpdate(virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Deletes a P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnServerConfiguration. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -48310,14 +48425,11 @@ export interface P2sVpnServerConfigurations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(virtualWanName: string, p2SVpnServerConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnServerConfiguration. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -48349,16 +48461,14 @@ export interface P2sVpnServerConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(virtualWanName: string, p2SVpnServerConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(virtualWanName: string, p2SVpnServerConfigurationName: string, callback: ServiceCallback): void; + deleteMethod(virtualWanName: string, p2SVpnServerConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieves all P2SVpnServerConfigurations for a particular VirtualWan. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {object} [options] Optional Parameters. @@ -48372,13 +48482,11 @@ export interface P2sVpnServerConfigurations { * * @reject {Error|ServiceError} - The error object. */ - listByVirtualWanWithHttpOperationResponse(resourceGroupName: string, virtualWanName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByVirtualWanWithHttpOperationResponse(virtualWanName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieves all P2SVpnServerConfigurations for a particular VirtualWan. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {object} [options] Optional Parameters. @@ -48409,17 +48517,15 @@ export interface P2sVpnServerConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByVirtualWan(resourceGroupName: string, virtualWanName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByVirtualWan(resourceGroupName: string, virtualWanName: string, callback: ServiceCallback): void; - listByVirtualWan(resourceGroupName: string, virtualWanName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByVirtualWan(virtualWanName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByVirtualWan(virtualWanName: string, callback: ServiceCallback): void; + listByVirtualWan(virtualWanName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it * doesn't exist else updates the existing P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -48485,14 +48591,12 @@ export interface P2sVpnServerConfigurations { * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it * doesn't exist else updates the existing P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -48575,17 +48679,14 @@ export interface P2sVpnServerConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, callback: ServiceCallback): void; + beginCreateOrUpdate(virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Deletes a P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnServerConfiguration. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -48602,14 +48703,11 @@ export interface P2sVpnServerConfigurations { * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(virtualWanName: string, p2SVpnServerConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnServerConfiguration. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -48641,9 +48739,9 @@ export interface P2sVpnServerConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(virtualWanName: string, p2SVpnServerConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(virtualWanName: string, p2SVpnServerConfigurationName: string, callback: ServiceCallback): void; + beginDeleteMethod(virtualWanName: string, p2SVpnServerConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -48716,9 +48814,6 @@ export interface P2sVpnGateways { /** * Retrieves the details of a virtual wan p2s vpn gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} [options] Optional Parameters. @@ -48732,14 +48827,11 @@ export interface P2sVpnGateways { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieves the details of a virtual wan p2s vpn gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} [options] Optional Parameters. @@ -48769,18 +48861,15 @@ export interface P2sVpnGateways { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, gatewayName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(gatewayName: string, callback: ServiceCallback): void; + get(gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the * existing gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} p2SVpnGatewayParameters Parameters supplied to create or @@ -48827,15 +48916,12 @@ export interface P2sVpnGateways { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the * existing gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} p2SVpnGatewayParameters Parameters supplied to create or @@ -48898,17 +48984,14 @@ export interface P2sVpnGateways { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, callback: ServiceCallback): void; + createOrUpdate(gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Updates virtual wan p2s vpn gateway tags. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} p2SVpnGatewayParameters Parameters supplied to update a @@ -48927,14 +49010,11 @@ export interface P2sVpnGateways { * * @reject {Error|ServiceError} - The error object. */ - updateTagsWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateTagsWithHttpOperationResponse(gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Updates virtual wan p2s vpn gateway tags. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} p2SVpnGatewayParameters Parameters supplied to update a @@ -48969,17 +49049,14 @@ export interface P2sVpnGateways { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - updateTags(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - updateTags(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, callback: ServiceCallback): void; - updateTags(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + updateTags(gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + updateTags(gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, callback: ServiceCallback): void; + updateTags(gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Deletes a virtual wan p2s vpn gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} [options] Optional Parameters. @@ -48993,14 +49070,11 @@ export interface P2sVpnGateways { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a virtual wan p2s vpn gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} [options] Optional Parameters. @@ -49029,17 +49103,14 @@ export interface P2sVpnGateways { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, gatewayName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(gatewayName: string, callback: ServiceCallback): void; + deleteMethod(gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Lists all the P2SVpnGateways in a resource group. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -49051,14 +49122,11 @@ export interface P2sVpnGateways { * * @reject {Error|ServiceError} - The error object. */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Lists all the P2SVpnGateways in a resource group. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -49087,9 +49155,9 @@ export interface P2sVpnGateways { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroup(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(callback: ServiceCallback): void; + listByResourceGroup(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -49148,8 +49216,6 @@ export interface P2sVpnGateways { * Generates VPN profile for P2S client of the P2SVpnGateway in the specified * resource group. * - * @param {string} resourceGroupName The name of the resource group. - * * @param {string} gatewayName The name of the P2SVpnGateway. * * @param {object} parameters Parameters supplied to the generate P2SVpnGateway @@ -49170,14 +49236,12 @@ export interface P2sVpnGateways { * * @reject {Error|ServiceError} - The error object. */ - generateVpnProfileWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, parameters: models.P2SVpnProfileParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + generateVpnProfileWithHttpOperationResponse(gatewayName: string, parameters: models.P2SVpnProfileParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Generates VPN profile for P2S client of the P2SVpnGateway in the specified * resource group. * - * @param {string} resourceGroupName The name of the resource group. - * * @param {string} gatewayName The name of the P2SVpnGateway. * * @param {object} parameters Parameters supplied to the generate P2SVpnGateway @@ -49214,18 +49278,15 @@ export interface P2sVpnGateways { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - generateVpnProfile(resourceGroupName: string, gatewayName: string, parameters: models.P2SVpnProfileParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - generateVpnProfile(resourceGroupName: string, gatewayName: string, parameters: models.P2SVpnProfileParameters, callback: ServiceCallback): void; - generateVpnProfile(resourceGroupName: string, gatewayName: string, parameters: models.P2SVpnProfileParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + generateVpnProfile(gatewayName: string, parameters: models.P2SVpnProfileParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + generateVpnProfile(gatewayName: string, parameters: models.P2SVpnProfileParameters, callback: ServiceCallback): void; + generateVpnProfile(gatewayName: string, parameters: models.P2SVpnProfileParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the * existing gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} p2SVpnGatewayParameters Parameters supplied to create or @@ -49272,15 +49333,12 @@ export interface P2sVpnGateways { * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the * existing gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} p2SVpnGatewayParameters Parameters supplied to create or @@ -49343,17 +49401,14 @@ export interface P2sVpnGateways { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, callback: ServiceCallback): void; + beginCreateOrUpdate(gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Updates virtual wan p2s vpn gateway tags. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} p2SVpnGatewayParameters Parameters supplied to update a @@ -49372,14 +49427,11 @@ export interface P2sVpnGateways { * * @reject {Error|ServiceError} - The error object. */ - beginUpdateTagsWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginUpdateTagsWithHttpOperationResponse(gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Updates virtual wan p2s vpn gateway tags. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} p2SVpnGatewayParameters Parameters supplied to update a @@ -49414,17 +49466,14 @@ export interface P2sVpnGateways { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdateTags(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdateTags(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, callback: ServiceCallback): void; - beginUpdateTags(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginUpdateTags(gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdateTags(gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, callback: ServiceCallback): void; + beginUpdateTags(gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Deletes a virtual wan p2s vpn gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} [options] Optional Parameters. @@ -49438,14 +49487,11 @@ export interface P2sVpnGateways { * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a virtual wan p2s vpn gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} [options] Optional Parameters. @@ -49474,17 +49520,15 @@ export interface P2sVpnGateways { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, gatewayName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(gatewayName: string, callback: ServiceCallback): void; + beginDeleteMethod(gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Generates VPN profile for P2S client of the P2SVpnGateway in the specified * resource group. * - * @param {string} resourceGroupName The name of the resource group. - * * @param {string} gatewayName The name of the P2SVpnGateway. * * @param {object} parameters Parameters supplied to the generate P2SVpnGateway @@ -49505,14 +49549,12 @@ export interface P2sVpnGateways { * * @reject {Error|ServiceError} - The error object. */ - beginGenerateVpnProfileWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, parameters: models.P2SVpnProfileParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginGenerateVpnProfileWithHttpOperationResponse(gatewayName: string, parameters: models.P2SVpnProfileParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Generates VPN profile for P2S client of the P2SVpnGateway in the specified * resource group. * - * @param {string} resourceGroupName The name of the resource group. - * * @param {string} gatewayName The name of the P2SVpnGateway. * * @param {object} parameters Parameters supplied to the generate P2SVpnGateway @@ -49549,9 +49591,9 @@ export interface P2sVpnGateways { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginGenerateVpnProfile(resourceGroupName: string, gatewayName: string, parameters: models.P2SVpnProfileParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginGenerateVpnProfile(resourceGroupName: string, gatewayName: string, parameters: models.P2SVpnProfileParameters, callback: ServiceCallback): void; - beginGenerateVpnProfile(resourceGroupName: string, gatewayName: string, parameters: models.P2SVpnProfileParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginGenerateVpnProfile(gatewayName: string, parameters: models.P2SVpnProfileParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginGenerateVpnProfile(gatewayName: string, parameters: models.P2SVpnProfileParameters, callback: ServiceCallback): void; + beginGenerateVpnProfile(gatewayName: string, parameters: models.P2SVpnProfileParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** diff --git a/lib/services/networkManagement2/lib/operations/p2sVpnGateways.js b/lib/services/networkManagement2/lib/operations/p2sVpnGateways.js index d8d676d6e6..edea6cb9ff 100644 --- a/lib/services/networkManagement2/lib/operations/p2sVpnGateways.js +++ b/lib/services/networkManagement2/lib/operations/p2sVpnGateways.js @@ -17,9 +17,6 @@ const WebResource = msRest.WebResource; /** * Retrieves the details of a virtual wan p2s vpn gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} [options] Optional Parameters. @@ -40,7 +37,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, gatewayName, options, callback) { +function _get(gatewayName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -56,8 +53,8 @@ function _get(resourceGroupName, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.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.'); @@ -73,7 +70,7 @@ function _get(resourceGroupName, gatewayName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{gatewayName}', encodeURIComponent(gatewayName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -164,9 +161,6 @@ function _get(resourceGroupName, gatewayName, options, callback) { * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the * existing gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} p2SVpnGatewayParameters Parameters supplied to create or @@ -220,7 +214,7 @@ function _get(resourceGroupName, gatewayName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, callback) { +function _createOrUpdate(gatewayName, p2SVpnGatewayParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -233,7 +227,7 @@ function _createOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters } // Send request - this.beginCreateOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, (err, parsedResult, httpRequest, response) => { + this.beginCreateOrUpdate(gatewayName, p2SVpnGatewayParameters, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -276,9 +270,6 @@ function _createOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters /** * Updates virtual wan p2s vpn gateway tags. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} p2SVpnGatewayParameters Parameters supplied to update a @@ -304,7 +295,7 @@ function _createOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _updateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, callback) { +function _updateTags(gatewayName, p2SVpnGatewayParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -317,7 +308,7 @@ function _updateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, op } // Send request - this.beginUpdateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, (err, parsedResult, httpRequest, response) => { + this.beginUpdateTags(gatewayName, p2SVpnGatewayParameters, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -360,9 +351,6 @@ function _updateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, op /** * Deletes a virtual wan p2s vpn gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} [options] Optional Parameters. @@ -382,7 +370,7 @@ function _updateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, op * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, gatewayName, options, callback) { +function _deleteMethod(gatewayName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -395,7 +383,7 @@ function _deleteMethod(resourceGroupName, gatewayName, options, callback) { } // Send request - this.beginDeleteMethod(resourceGroupName, gatewayName, options, (err, parsedResult, httpRequest, response) => { + this.beginDeleteMethod(gatewayName, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -423,9 +411,6 @@ function _deleteMethod(resourceGroupName, gatewayName, options, callback) { /** * Lists all the P2SVpnGateways in a resource group. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -445,7 +430,7 @@ function _deleteMethod(resourceGroupName, gatewayName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByResourceGroup(resourceGroupName, options, callback) { +function _listByResourceGroup(options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -461,8 +446,8 @@ function _listByResourceGroup(resourceGroupName, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName 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.'); @@ -475,7 +460,7 @@ function _listByResourceGroup(resourceGroupName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { @@ -698,8 +683,6 @@ function _list(options, callback) { * Generates VPN profile for P2S client of the P2SVpnGateway in the specified * resource group. * - * @param {string} resourceGroupName The name of the resource group. - * * @param {string} gatewayName The name of the P2SVpnGateway. * * @param {object} parameters Parameters supplied to the generate P2SVpnGateway @@ -727,7 +710,7 @@ function _list(options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _generateVpnProfile(resourceGroupName, gatewayName, parameters, options, callback) { +function _generateVpnProfile(gatewayName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -740,7 +723,7 @@ function _generateVpnProfile(resourceGroupName, gatewayName, parameters, options } // Send request - this.beginGenerateVpnProfile(resourceGroupName, gatewayName, parameters, options, (err, parsedResult, httpRequest, response) => { + this.beginGenerateVpnProfile(gatewayName, parameters, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -783,9 +766,6 @@ function _generateVpnProfile(resourceGroupName, gatewayName, parameters, options * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the * existing gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} p2SVpnGatewayParameters Parameters supplied to create or @@ -839,7 +819,7 @@ function _generateVpnProfile(resourceGroupName, gatewayName, parameters, options * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginCreateOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, callback) { +function _beginCreateOrUpdate(gatewayName, p2SVpnGatewayParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -855,8 +835,8 @@ function _beginCreateOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParam 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.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.'); @@ -875,7 +855,7 @@ function _beginCreateOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParam let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{gatewayName}', encodeURIComponent(gatewayName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -995,9 +975,6 @@ function _beginCreateOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParam /** * Updates virtual wan p2s vpn gateway tags. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} p2SVpnGatewayParameters Parameters supplied to update a @@ -1023,7 +1000,7 @@ function _beginCreateOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParam * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginUpdateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, callback) { +function _beginUpdateTags(gatewayName, p2SVpnGatewayParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1039,8 +1016,8 @@ function _beginUpdateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameter 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.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.'); @@ -1059,7 +1036,7 @@ function _beginUpdateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameter let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{gatewayName}', encodeURIComponent(gatewayName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -1179,9 +1156,6 @@ function _beginUpdateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameter /** * Deletes a virtual wan p2s vpn gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} [options] Optional Parameters. @@ -1201,7 +1175,7 @@ function _beginUpdateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameter * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginDeleteMethod(resourceGroupName, gatewayName, options, callback) { +function _beginDeleteMethod(gatewayName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1217,8 +1191,8 @@ function _beginDeleteMethod(resourceGroupName, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.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.'); @@ -1234,7 +1208,7 @@ function _beginDeleteMethod(resourceGroupName, gatewayName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{gatewayName}', encodeURIComponent(gatewayName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -1307,8 +1281,6 @@ function _beginDeleteMethod(resourceGroupName, gatewayName, options, callback) { * Generates VPN profile for P2S client of the P2SVpnGateway in the specified * resource group. * - * @param {string} resourceGroupName The name of the resource group. - * * @param {string} gatewayName The name of the P2SVpnGateway. * * @param {object} parameters Parameters supplied to the generate P2SVpnGateway @@ -1336,7 +1308,7 @@ function _beginDeleteMethod(resourceGroupName, gatewayName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginGenerateVpnProfile(resourceGroupName, gatewayName, parameters, options, callback) { +function _beginGenerateVpnProfile(gatewayName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1349,8 +1321,8 @@ function _beginGenerateVpnProfile(resourceGroupName, gatewayName, parameters, op let apiVersion = '2018-12-01'; // Validate try { - 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.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.'); @@ -1371,7 +1343,7 @@ function _beginGenerateVpnProfile(resourceGroupName, gatewayName, parameters, op // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/generatevpnprofile'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{gatewayName}', encodeURIComponent(gatewayName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1755,9 +1727,6 @@ class P2sVpnGateways { /** * Retrieves the details of a virtual wan p2s vpn gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} [options] Optional Parameters. @@ -1771,11 +1740,11 @@ class P2sVpnGateways { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, gatewayName, options) { + getWithHttpOperationResponse(gatewayName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, gatewayName, options, (err, result, request, response) => { + self._get(gatewayName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1788,9 +1757,6 @@ class P2sVpnGateways { /** * Retrieves the details of a virtual wan p2s vpn gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} [options] Optional Parameters. @@ -1820,7 +1786,7 @@ class P2sVpnGateways { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, gatewayName, options, optionalCallback) { + get(gatewayName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1829,14 +1795,14 @@ class P2sVpnGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, gatewayName, options, (err, result, request, response) => { + self._get(gatewayName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, gatewayName, options, optionalCallback); + return self._get(gatewayName, options, optionalCallback); } } @@ -1844,9 +1810,6 @@ class P2sVpnGateways { * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the * existing gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} p2SVpnGatewayParameters Parameters supplied to create or @@ -1893,11 +1856,11 @@ class P2sVpnGateways { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options) { + createOrUpdateWithHttpOperationResponse(gatewayName, p2SVpnGatewayParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { + self._createOrUpdate(gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1911,9 +1874,6 @@ class P2sVpnGateways { * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the * existing gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} p2SVpnGatewayParameters Parameters supplied to create or @@ -1976,7 +1936,7 @@ class P2sVpnGateways { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, optionalCallback) { + createOrUpdate(gatewayName, p2SVpnGatewayParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1985,23 +1945,20 @@ class P2sVpnGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { + self._createOrUpdate(gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, optionalCallback); + return self._createOrUpdate(gatewayName, p2SVpnGatewayParameters, options, optionalCallback); } } /** * Updates virtual wan p2s vpn gateway tags. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} p2SVpnGatewayParameters Parameters supplied to update a @@ -2020,11 +1977,11 @@ class P2sVpnGateways { * * @reject {Error} - The error object. */ - updateTagsWithHttpOperationResponse(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options) { + updateTagsWithHttpOperationResponse(gatewayName, p2SVpnGatewayParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._updateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { + self._updateTags(gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2037,9 +1994,6 @@ class P2sVpnGateways { /** * Updates virtual wan p2s vpn gateway tags. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} p2SVpnGatewayParameters Parameters supplied to update a @@ -2074,7 +2028,7 @@ class P2sVpnGateways { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, optionalCallback) { + updateTags(gatewayName, p2SVpnGatewayParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2083,23 +2037,20 @@ class P2sVpnGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { + self._updateTags(gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, optionalCallback); + return self._updateTags(gatewayName, p2SVpnGatewayParameters, options, optionalCallback); } } /** * Deletes a virtual wan p2s vpn gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} [options] Optional Parameters. @@ -2113,11 +2064,11 @@ class P2sVpnGateways { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, gatewayName, options) { + deleteMethodWithHttpOperationResponse(gatewayName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, gatewayName, options, (err, result, request, response) => { + self._deleteMethod(gatewayName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2130,9 +2081,6 @@ class P2sVpnGateways { /** * Deletes a virtual wan p2s vpn gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} [options] Optional Parameters. @@ -2161,7 +2109,7 @@ class P2sVpnGateways { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, gatewayName, options, optionalCallback) { + deleteMethod(gatewayName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2170,23 +2118,20 @@ class P2sVpnGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, gatewayName, options, (err, result, request, response) => { + self._deleteMethod(gatewayName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, gatewayName, options, optionalCallback); + return self._deleteMethod(gatewayName, options, optionalCallback); } } /** * Lists all the P2SVpnGateways in a resource group. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2198,11 +2143,11 @@ class P2sVpnGateways { * * @reject {Error} - The error object. */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + listByResourceGroupWithHttpOperationResponse(options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + self._listByResourceGroup(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2215,9 +2160,6 @@ class P2sVpnGateways { /** * Lists all the P2SVpnGateways in a resource group. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2246,7 +2188,7 @@ class P2sVpnGateways { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroup(resourceGroupName, options, optionalCallback) { + listByResourceGroup(options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2255,14 +2197,14 @@ class P2sVpnGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + self._listByResourceGroup(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByResourceGroup(resourceGroupName, options, optionalCallback); + return self._listByResourceGroup(options, optionalCallback); } } @@ -2349,8 +2291,6 @@ class P2sVpnGateways { * Generates VPN profile for P2S client of the P2SVpnGateway in the specified * resource group. * - * @param {string} resourceGroupName The name of the resource group. - * * @param {string} gatewayName The name of the P2SVpnGateway. * * @param {object} parameters Parameters supplied to the generate P2SVpnGateway @@ -2371,11 +2311,11 @@ class P2sVpnGateways { * * @reject {Error} - The error object. */ - generateVpnProfileWithHttpOperationResponse(resourceGroupName, gatewayName, parameters, options) { + generateVpnProfileWithHttpOperationResponse(gatewayName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._generateVpnProfile(resourceGroupName, gatewayName, parameters, options, (err, result, request, response) => { + self._generateVpnProfile(gatewayName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2389,8 +2329,6 @@ class P2sVpnGateways { * Generates VPN profile for P2S client of the P2SVpnGateway in the specified * resource group. * - * @param {string} resourceGroupName The name of the resource group. - * * @param {string} gatewayName The name of the P2SVpnGateway. * * @param {object} parameters Parameters supplied to the generate P2SVpnGateway @@ -2427,7 +2365,7 @@ class P2sVpnGateways { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - generateVpnProfile(resourceGroupName, gatewayName, parameters, options, optionalCallback) { + generateVpnProfile(gatewayName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2436,14 +2374,14 @@ class P2sVpnGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._generateVpnProfile(resourceGroupName, gatewayName, parameters, options, (err, result, request, response) => { + self._generateVpnProfile(gatewayName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._generateVpnProfile(resourceGroupName, gatewayName, parameters, options, optionalCallback); + return self._generateVpnProfile(gatewayName, parameters, options, optionalCallback); } } @@ -2451,9 +2389,6 @@ class P2sVpnGateways { * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the * existing gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} p2SVpnGatewayParameters Parameters supplied to create or @@ -2500,11 +2435,11 @@ class P2sVpnGateways { * * @reject {Error} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options) { + beginCreateOrUpdateWithHttpOperationResponse(gatewayName, p2SVpnGatewayParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { + self._beginCreateOrUpdate(gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2518,9 +2453,6 @@ class P2sVpnGateways { * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the * existing gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} p2SVpnGatewayParameters Parameters supplied to create or @@ -2583,7 +2515,7 @@ class P2sVpnGateways { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, optionalCallback) { + beginCreateOrUpdate(gatewayName, p2SVpnGatewayParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2592,23 +2524,20 @@ class P2sVpnGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { + self._beginCreateOrUpdate(gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginCreateOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, optionalCallback); + return self._beginCreateOrUpdate(gatewayName, p2SVpnGatewayParameters, options, optionalCallback); } } /** * Updates virtual wan p2s vpn gateway tags. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} p2SVpnGatewayParameters Parameters supplied to update a @@ -2627,11 +2556,11 @@ class P2sVpnGateways { * * @reject {Error} - The error object. */ - beginUpdateTagsWithHttpOperationResponse(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options) { + beginUpdateTagsWithHttpOperationResponse(gatewayName, p2SVpnGatewayParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginUpdateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { + self._beginUpdateTags(gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2644,9 +2573,6 @@ class P2sVpnGateways { /** * Updates virtual wan p2s vpn gateway tags. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} p2SVpnGatewayParameters Parameters supplied to update a @@ -2681,7 +2607,7 @@ class P2sVpnGateways { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, optionalCallback) { + beginUpdateTags(gatewayName, p2SVpnGatewayParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2690,23 +2616,20 @@ class P2sVpnGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginUpdateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { + self._beginUpdateTags(gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginUpdateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, optionalCallback); + return self._beginUpdateTags(gatewayName, p2SVpnGatewayParameters, options, optionalCallback); } } /** * Deletes a virtual wan p2s vpn gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} [options] Optional Parameters. @@ -2720,11 +2643,11 @@ class P2sVpnGateways { * * @reject {Error} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName, gatewayName, options) { + beginDeleteMethodWithHttpOperationResponse(gatewayName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginDeleteMethod(resourceGroupName, gatewayName, options, (err, result, request, response) => { + self._beginDeleteMethod(gatewayName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2737,9 +2660,6 @@ class P2sVpnGateways { /** * Deletes a virtual wan p2s vpn gateway. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} [options] Optional Parameters. @@ -2768,7 +2688,7 @@ class P2sVpnGateways { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName, gatewayName, options, optionalCallback) { + beginDeleteMethod(gatewayName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2777,14 +2697,14 @@ class P2sVpnGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginDeleteMethod(resourceGroupName, gatewayName, options, (err, result, request, response) => { + self._beginDeleteMethod(gatewayName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginDeleteMethod(resourceGroupName, gatewayName, options, optionalCallback); + return self._beginDeleteMethod(gatewayName, options, optionalCallback); } } @@ -2792,8 +2712,6 @@ class P2sVpnGateways { * Generates VPN profile for P2S client of the P2SVpnGateway in the specified * resource group. * - * @param {string} resourceGroupName The name of the resource group. - * * @param {string} gatewayName The name of the P2SVpnGateway. * * @param {object} parameters Parameters supplied to the generate P2SVpnGateway @@ -2814,11 +2732,11 @@ class P2sVpnGateways { * * @reject {Error} - The error object. */ - beginGenerateVpnProfileWithHttpOperationResponse(resourceGroupName, gatewayName, parameters, options) { + beginGenerateVpnProfileWithHttpOperationResponse(gatewayName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginGenerateVpnProfile(resourceGroupName, gatewayName, parameters, options, (err, result, request, response) => { + self._beginGenerateVpnProfile(gatewayName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2832,8 +2750,6 @@ class P2sVpnGateways { * Generates VPN profile for P2S client of the P2SVpnGateway in the specified * resource group. * - * @param {string} resourceGroupName The name of the resource group. - * * @param {string} gatewayName The name of the P2SVpnGateway. * * @param {object} parameters Parameters supplied to the generate P2SVpnGateway @@ -2870,7 +2786,7 @@ class P2sVpnGateways { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginGenerateVpnProfile(resourceGroupName, gatewayName, parameters, options, optionalCallback) { + beginGenerateVpnProfile(gatewayName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2879,14 +2795,14 @@ class P2sVpnGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginGenerateVpnProfile(resourceGroupName, gatewayName, parameters, options, (err, result, request, response) => { + self._beginGenerateVpnProfile(gatewayName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginGenerateVpnProfile(resourceGroupName, gatewayName, parameters, options, optionalCallback); + return self._beginGenerateVpnProfile(gatewayName, parameters, options, optionalCallback); } } diff --git a/lib/services/networkManagement2/lib/operations/p2sVpnServerConfigurations.js b/lib/services/networkManagement2/lib/operations/p2sVpnServerConfigurations.js index 0b89fa30f2..d4470da62e 100644 --- a/lib/services/networkManagement2/lib/operations/p2sVpnServerConfigurations.js +++ b/lib/services/networkManagement2/lib/operations/p2sVpnServerConfigurations.js @@ -17,9 +17,6 @@ const WebResource = msRest.WebResource; /** * Retrieves the details of a P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnServerConfiguration. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -44,7 +41,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, callback) { +function _get(virtualWanName, p2SVpnServerConfigurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -60,8 +57,8 @@ function _get(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } if (virtualWanName === null || virtualWanName === undefined || typeof virtualWanName.valueOf() !== 'string') { throw new Error('virtualWanName cannot be null or undefined and it must be of type string.'); @@ -80,7 +77,7 @@ function _get(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWanName}/p2sVpnServerConfigurations/{p2SVpnServerConfigurationName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{virtualWanName}', encodeURIComponent(virtualWanName)); requestUrl = requestUrl.replace('{p2SVpnServerConfigurationName}', encodeURIComponent(p2SVpnServerConfigurationName)); let queryParameters = []; @@ -172,8 +169,6 @@ function _get(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, * Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it * doesn't exist else updates the existing P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -247,7 +242,7 @@ function _get(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, callback) { +function _createOrUpdate(virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -260,7 +255,7 @@ function _createOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigur } // Send request - this.beginCreateOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, (err, parsedResult, httpRequest, response) => { + this.beginCreateOrUpdate(virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -303,9 +298,6 @@ function _createOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigur /** * Deletes a P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnServerConfiguration. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -328,7 +320,7 @@ function _createOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigur * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, callback) { +function _deleteMethod(virtualWanName, p2SVpnServerConfigurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -341,7 +333,7 @@ function _deleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurat } // Send request - this.beginDeleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, (err, parsedResult, httpRequest, response) => { + this.beginDeleteMethod(virtualWanName, p2SVpnServerConfigurationName, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -369,8 +361,6 @@ function _deleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurat /** * Retrieves all P2SVpnServerConfigurations for a particular VirtualWan. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {object} [options] Optional Parameters. @@ -392,7 +382,7 @@ function _deleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurat * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByVirtualWan(resourceGroupName, virtualWanName, options, callback) { +function _listByVirtualWan(virtualWanName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -408,8 +398,8 @@ function _listByVirtualWan(resourceGroupName, virtualWanName, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } if (virtualWanName === null || virtualWanName === undefined || typeof virtualWanName.valueOf() !== 'string') { throw new Error('virtualWanName cannot be null or undefined and it must be of type string.'); @@ -425,7 +415,7 @@ function _listByVirtualWan(resourceGroupName, virtualWanName, options, callback) let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWanName}/p2sVpnServerConfigurations'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{virtualWanName}', encodeURIComponent(virtualWanName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -515,8 +505,6 @@ function _listByVirtualWan(resourceGroupName, virtualWanName, options, callback) * Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it * doesn't exist else updates the existing P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -590,7 +578,7 @@ function _listByVirtualWan(resourceGroupName, virtualWanName, options, callback) * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginCreateOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, callback) { +function _beginCreateOrUpdate(virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -606,8 +594,8 @@ function _beginCreateOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerCon 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } if (virtualWanName === null || virtualWanName === undefined || typeof virtualWanName.valueOf() !== 'string') { throw new Error('virtualWanName cannot be null or undefined and it must be of type string.'); @@ -629,7 +617,7 @@ function _beginCreateOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerCon let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWanName}/p2sVpnServerConfigurations/{p2SVpnServerConfigurationName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{virtualWanName}', encodeURIComponent(virtualWanName)); requestUrl = requestUrl.replace('{p2SVpnServerConfigurationName}', encodeURIComponent(p2SVpnServerConfigurationName)); let queryParameters = []; @@ -750,9 +738,6 @@ function _beginCreateOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerCon /** * Deletes a P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnServerConfiguration. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -775,7 +760,7 @@ function _beginCreateOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerCon * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginDeleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, callback) { +function _beginDeleteMethod(virtualWanName, p2SVpnServerConfigurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -791,8 +776,8 @@ function _beginDeleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfi 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } if (virtualWanName === null || virtualWanName === undefined || typeof virtualWanName.valueOf() !== 'string') { throw new Error('virtualWanName cannot be null or undefined and it must be of type string.'); @@ -811,7 +796,7 @@ function _beginDeleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfi let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWanName}/p2sVpnServerConfigurations/{p2SVpnServerConfigurationName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{virtualWanName}', encodeURIComponent(virtualWanName)); requestUrl = requestUrl.replace('{p2SVpnServerConfigurationName}', encodeURIComponent(p2SVpnServerConfigurationName)); let queryParameters = []; @@ -1030,9 +1015,6 @@ class P2sVpnServerConfigurations { /** * Retrieves the details of a P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnServerConfiguration. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -1049,11 +1031,11 @@ class P2sVpnServerConfigurations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options) { + getWithHttpOperationResponse(virtualWanName, p2SVpnServerConfigurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, (err, result, request, response) => { + self._get(virtualWanName, p2SVpnServerConfigurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1066,9 +1048,6 @@ class P2sVpnServerConfigurations { /** * Retrieves the details of a P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnServerConfiguration. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -1102,7 +1081,7 @@ class P2sVpnServerConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, optionalCallback) { + get(virtualWanName, p2SVpnServerConfigurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1111,14 +1090,14 @@ class P2sVpnServerConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, (err, result, request, response) => { + self._get(virtualWanName, p2SVpnServerConfigurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, optionalCallback); + return self._get(virtualWanName, p2SVpnServerConfigurationName, options, optionalCallback); } } @@ -1126,8 +1105,6 @@ class P2sVpnServerConfigurations { * Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it * doesn't exist else updates the existing P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -1193,11 +1170,11 @@ class P2sVpnServerConfigurations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options) { + createOrUpdateWithHttpOperationResponse(virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, (err, result, request, response) => { + self._createOrUpdate(virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1211,8 +1188,6 @@ class P2sVpnServerConfigurations { * Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it * doesn't exist else updates the existing P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -1295,7 +1270,7 @@ class P2sVpnServerConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, optionalCallback) { + createOrUpdate(virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1304,23 +1279,20 @@ class P2sVpnServerConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, (err, result, request, response) => { + self._createOrUpdate(virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, optionalCallback); + return self._createOrUpdate(virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, optionalCallback); } } /** * Deletes a P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnServerConfiguration. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -1337,11 +1309,11 @@ class P2sVpnServerConfigurations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options) { + deleteMethodWithHttpOperationResponse(virtualWanName, p2SVpnServerConfigurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, (err, result, request, response) => { + self._deleteMethod(virtualWanName, p2SVpnServerConfigurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1354,9 +1326,6 @@ class P2sVpnServerConfigurations { /** * Deletes a P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnServerConfiguration. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -1388,7 +1357,7 @@ class P2sVpnServerConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, optionalCallback) { + deleteMethod(virtualWanName, p2SVpnServerConfigurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1397,22 +1366,20 @@ class P2sVpnServerConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, (err, result, request, response) => { + self._deleteMethod(virtualWanName, p2SVpnServerConfigurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, optionalCallback); + return self._deleteMethod(virtualWanName, p2SVpnServerConfigurationName, options, optionalCallback); } } /** * Retrieves all P2SVpnServerConfigurations for a particular VirtualWan. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {object} [options] Optional Parameters. @@ -1426,11 +1393,11 @@ class P2sVpnServerConfigurations { * * @reject {Error} - The error object. */ - listByVirtualWanWithHttpOperationResponse(resourceGroupName, virtualWanName, options) { + listByVirtualWanWithHttpOperationResponse(virtualWanName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByVirtualWan(resourceGroupName, virtualWanName, options, (err, result, request, response) => { + self._listByVirtualWan(virtualWanName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1443,8 +1410,6 @@ class P2sVpnServerConfigurations { /** * Retrieves all P2SVpnServerConfigurations for a particular VirtualWan. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {object} [options] Optional Parameters. @@ -1475,7 +1440,7 @@ class P2sVpnServerConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByVirtualWan(resourceGroupName, virtualWanName, options, optionalCallback) { + listByVirtualWan(virtualWanName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1484,14 +1449,14 @@ class P2sVpnServerConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByVirtualWan(resourceGroupName, virtualWanName, options, (err, result, request, response) => { + self._listByVirtualWan(virtualWanName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByVirtualWan(resourceGroupName, virtualWanName, options, optionalCallback); + return self._listByVirtualWan(virtualWanName, options, optionalCallback); } } @@ -1499,8 +1464,6 @@ class P2sVpnServerConfigurations { * Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it * doesn't exist else updates the existing P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -1566,11 +1529,11 @@ class P2sVpnServerConfigurations { * * @reject {Error} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options) { + beginCreateOrUpdateWithHttpOperationResponse(virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, (err, result, request, response) => { + self._beginCreateOrUpdate(virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1584,8 +1547,6 @@ class P2sVpnServerConfigurations { * Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it * doesn't exist else updates the existing P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -1668,7 +1629,7 @@ class P2sVpnServerConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, optionalCallback) { + beginCreateOrUpdate(virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1677,23 +1638,20 @@ class P2sVpnServerConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, (err, result, request, response) => { + self._beginCreateOrUpdate(virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginCreateOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, optionalCallback); + return self._beginCreateOrUpdate(virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, optionalCallback); } } /** * Deletes a P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnServerConfiguration. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -1710,11 +1668,11 @@ class P2sVpnServerConfigurations { * * @reject {Error} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options) { + beginDeleteMethodWithHttpOperationResponse(virtualWanName, p2SVpnServerConfigurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginDeleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, (err, result, request, response) => { + self._beginDeleteMethod(virtualWanName, p2SVpnServerConfigurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1727,9 +1685,6 @@ class P2sVpnServerConfigurations { /** * Deletes a P2SVpnServerConfiguration. * - * @param {string} resourceGroupName The resource group name of the - * P2SVpnServerConfiguration. - * * @param {string} virtualWanName The name of the VirtualWan. * * @param {string} p2SVpnServerConfigurationName The name of the @@ -1761,7 +1716,7 @@ class P2sVpnServerConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, optionalCallback) { + beginDeleteMethod(virtualWanName, p2SVpnServerConfigurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1770,14 +1725,14 @@ class P2sVpnServerConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginDeleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, (err, result, request, response) => { + self._beginDeleteMethod(virtualWanName, p2SVpnServerConfigurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginDeleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, optionalCallback); + return self._beginDeleteMethod(virtualWanName, p2SVpnServerConfigurationName, options, optionalCallback); } } diff --git a/lib/services/networkManagement2/lib/operations/virtualHubs.js b/lib/services/networkManagement2/lib/operations/virtualHubs.js index 851e3c2652..792da821e2 100644 --- a/lib/services/networkManagement2/lib/operations/virtualHubs.js +++ b/lib/services/networkManagement2/lib/operations/virtualHubs.js @@ -17,10 +17,6 @@ const WebResource = msRest.WebResource; /** * Retrieves the details of a VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -39,7 +35,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, virtualHubName, options, callback) { +function _get(options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -55,11 +51,11 @@ function _get(resourceGroupName, virtualHubName, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (virtualHubName === null || virtualHubName === undefined || typeof virtualHubName.valueOf() !== 'string') { - throw new Error('virtualHubName cannot be null or undefined and it must be of type string.'); + if (this.client.virtualHubName === null || this.client.virtualHubName === undefined || typeof this.client.virtualHubName.valueOf() !== 'string') { + throw new Error('this.client.virtualHubName 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.'); @@ -72,8 +68,8 @@ function _get(resourceGroupName, virtualHubName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{virtualHubName}', encodeURIComponent(virtualHubName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{virtualHubName}', encodeURIComponent(this.client.virtualHubName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { @@ -163,10 +159,6 @@ function _get(resourceGroupName, virtualHubName, options, callback) { * Creates a VirtualHub resource if it doesn't exist else updates the existing * VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} virtualHubParameters Parameters supplied to create or update * VirtualHub. * @@ -223,7 +215,7 @@ function _get(resourceGroupName, virtualHubName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, virtualHubName, virtualHubParameters, options, callback) { +function _createOrUpdate(virtualHubParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -236,7 +228,7 @@ function _createOrUpdate(resourceGroupName, virtualHubName, virtualHubParameters } // Send request - this.beginCreateOrUpdate(resourceGroupName, virtualHubName, virtualHubParameters, options, (err, parsedResult, httpRequest, response) => { + this.beginCreateOrUpdate(virtualHubParameters, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -279,10 +271,6 @@ function _createOrUpdate(resourceGroupName, virtualHubName, virtualHubParameters /** * Updates VirtualHub tags. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} virtualHubParameters Parameters supplied to update * VirtualHub tags. * @@ -306,7 +294,7 @@ function _createOrUpdate(resourceGroupName, virtualHubName, virtualHubParameters * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _updateTags(resourceGroupName, virtualHubName, virtualHubParameters, options, callback) { +function _updateTags(virtualHubParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -319,7 +307,7 @@ function _updateTags(resourceGroupName, virtualHubName, virtualHubParameters, op } // Send request - this.beginUpdateTags(resourceGroupName, virtualHubName, virtualHubParameters, options, (err, parsedResult, httpRequest, response) => { + this.beginUpdateTags(virtualHubParameters, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -362,10 +350,6 @@ function _updateTags(resourceGroupName, virtualHubName, virtualHubParameters, op /** * Deletes a VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -383,7 +367,7 @@ function _updateTags(resourceGroupName, virtualHubName, virtualHubParameters, op * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, virtualHubName, options, callback) { +function _deleteMethod(options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -396,7 +380,7 @@ function _deleteMethod(resourceGroupName, virtualHubName, options, callback) { } // Send request - this.beginDeleteMethod(resourceGroupName, virtualHubName, options, (err, parsedResult, httpRequest, response) => { + this.beginDeleteMethod(options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -424,8 +408,6 @@ function _deleteMethod(resourceGroupName, virtualHubName, options, callback) { /** * Lists all the VirtualHubs in a resource group. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -444,7 +426,7 @@ function _deleteMethod(resourceGroupName, virtualHubName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByResourceGroup(resourceGroupName, options, callback) { +function _listByResourceGroup(options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -460,8 +442,8 @@ function _listByResourceGroup(resourceGroupName, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName 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.'); @@ -474,7 +456,7 @@ function _listByResourceGroup(resourceGroupName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { @@ -695,10 +677,6 @@ function _list(options, callback) { * Creates a VirtualHub resource if it doesn't exist else updates the existing * VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} virtualHubParameters Parameters supplied to create or update * VirtualHub. * @@ -755,7 +733,7 @@ function _list(options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginCreateOrUpdate(resourceGroupName, virtualHubName, virtualHubParameters, options, callback) { +function _beginCreateOrUpdate(virtualHubParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -771,11 +749,11 @@ function _beginCreateOrUpdate(resourceGroupName, virtualHubName, virtualHubParam 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (virtualHubName === null || virtualHubName === undefined || typeof virtualHubName.valueOf() !== 'string') { - throw new Error('virtualHubName cannot be null or undefined and it must be of type string.'); + if (this.client.virtualHubName === null || this.client.virtualHubName === undefined || typeof this.client.virtualHubName.valueOf() !== 'string') { + throw new Error('this.client.virtualHubName cannot be null or undefined and it must be of type string.'); } if (virtualHubParameters === null || virtualHubParameters === undefined) { throw new Error('virtualHubParameters cannot be null or undefined.'); @@ -791,8 +769,8 @@ function _beginCreateOrUpdate(resourceGroupName, virtualHubName, virtualHubParam let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{virtualHubName}', encodeURIComponent(virtualHubName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{virtualHubName}', encodeURIComponent(this.client.virtualHubName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { @@ -911,10 +889,6 @@ function _beginCreateOrUpdate(resourceGroupName, virtualHubName, virtualHubParam /** * Updates VirtualHub tags. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} virtualHubParameters Parameters supplied to update * VirtualHub tags. * @@ -938,7 +912,7 @@ function _beginCreateOrUpdate(resourceGroupName, virtualHubName, virtualHubParam * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginUpdateTags(resourceGroupName, virtualHubName, virtualHubParameters, options, callback) { +function _beginUpdateTags(virtualHubParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -954,11 +928,11 @@ function _beginUpdateTags(resourceGroupName, virtualHubName, virtualHubParameter 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (virtualHubName === null || virtualHubName === undefined || typeof virtualHubName.valueOf() !== 'string') { - throw new Error('virtualHubName cannot be null or undefined and it must be of type string.'); + if (this.client.virtualHubName === null || this.client.virtualHubName === undefined || typeof this.client.virtualHubName.valueOf() !== 'string') { + throw new Error('this.client.virtualHubName cannot be null or undefined and it must be of type string.'); } if (virtualHubParameters === null || virtualHubParameters === undefined) { throw new Error('virtualHubParameters cannot be null or undefined.'); @@ -974,8 +948,8 @@ function _beginUpdateTags(resourceGroupName, virtualHubName, virtualHubParameter let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{virtualHubName}', encodeURIComponent(virtualHubName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{virtualHubName}', encodeURIComponent(this.client.virtualHubName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { @@ -1094,10 +1068,6 @@ function _beginUpdateTags(resourceGroupName, virtualHubName, virtualHubParameter /** * Deletes a VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1115,7 +1085,7 @@ function _beginUpdateTags(resourceGroupName, virtualHubName, virtualHubParameter * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginDeleteMethod(resourceGroupName, virtualHubName, options, callback) { +function _beginDeleteMethod(options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1131,11 +1101,11 @@ function _beginDeleteMethod(resourceGroupName, virtualHubName, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (virtualHubName === null || virtualHubName === undefined || typeof virtualHubName.valueOf() !== 'string') { - throw new Error('virtualHubName cannot be null or undefined and it must be of type string.'); + if (this.client.virtualHubName === null || this.client.virtualHubName === undefined || typeof this.client.virtualHubName.valueOf() !== 'string') { + throw new Error('this.client.virtualHubName 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.'); @@ -1148,8 +1118,8 @@ function _beginDeleteMethod(resourceGroupName, virtualHubName, options, callback let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{virtualHubName}', encodeURIComponent(virtualHubName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{virtualHubName}', encodeURIComponent(this.client.virtualHubName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { @@ -1497,10 +1467,6 @@ class VirtualHubs { /** * Retrieves the details of a VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1512,11 +1478,11 @@ class VirtualHubs { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, virtualHubName, options) { + getWithHttpOperationResponse(options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, virtualHubName, options, (err, result, request, response) => { + self._get(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1529,10 +1495,6 @@ class VirtualHubs { /** * Retrieves the details of a VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1560,7 +1522,7 @@ class VirtualHubs { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, virtualHubName, options, optionalCallback) { + get(options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1569,14 +1531,14 @@ class VirtualHubs { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, virtualHubName, options, (err, result, request, response) => { + self._get(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, virtualHubName, options, optionalCallback); + return self._get(options, optionalCallback); } } @@ -1584,10 +1546,6 @@ class VirtualHubs { * Creates a VirtualHub resource if it doesn't exist else updates the existing * VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} virtualHubParameters Parameters supplied to create or update * VirtualHub. * @@ -1637,11 +1595,11 @@ class VirtualHubs { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, virtualHubName, virtualHubParameters, options) { + createOrUpdateWithHttpOperationResponse(virtualHubParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, virtualHubName, virtualHubParameters, options, (err, result, request, response) => { + self._createOrUpdate(virtualHubParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1655,10 +1613,6 @@ class VirtualHubs { * Creates a VirtualHub resource if it doesn't exist else updates the existing * VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} virtualHubParameters Parameters supplied to create or update * VirtualHub. * @@ -1724,7 +1678,7 @@ class VirtualHubs { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, virtualHubName, virtualHubParameters, options, optionalCallback) { + createOrUpdate(virtualHubParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1733,24 +1687,20 @@ class VirtualHubs { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, virtualHubName, virtualHubParameters, options, (err, result, request, response) => { + self._createOrUpdate(virtualHubParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, virtualHubName, virtualHubParameters, options, optionalCallback); + return self._createOrUpdate(virtualHubParameters, options, optionalCallback); } } /** * Updates VirtualHub tags. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} virtualHubParameters Parameters supplied to update * VirtualHub tags. * @@ -1767,11 +1717,11 @@ class VirtualHubs { * * @reject {Error} - The error object. */ - updateTagsWithHttpOperationResponse(resourceGroupName, virtualHubName, virtualHubParameters, options) { + updateTagsWithHttpOperationResponse(virtualHubParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._updateTags(resourceGroupName, virtualHubName, virtualHubParameters, options, (err, result, request, response) => { + self._updateTags(virtualHubParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1784,10 +1734,6 @@ class VirtualHubs { /** * Updates VirtualHub tags. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} virtualHubParameters Parameters supplied to update * VirtualHub tags. * @@ -1820,7 +1766,7 @@ class VirtualHubs { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateTags(resourceGroupName, virtualHubName, virtualHubParameters, options, optionalCallback) { + updateTags(virtualHubParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1829,24 +1775,20 @@ class VirtualHubs { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateTags(resourceGroupName, virtualHubName, virtualHubParameters, options, (err, result, request, response) => { + self._updateTags(virtualHubParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateTags(resourceGroupName, virtualHubName, virtualHubParameters, options, optionalCallback); + return self._updateTags(virtualHubParameters, options, optionalCallback); } } /** * Deletes a VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1858,11 +1800,11 @@ class VirtualHubs { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, virtualHubName, options) { + deleteMethodWithHttpOperationResponse(options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, virtualHubName, options, (err, result, request, response) => { + self._deleteMethod(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1875,10 +1817,6 @@ class VirtualHubs { /** * Deletes a VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1905,7 +1843,7 @@ class VirtualHubs { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, virtualHubName, options, optionalCallback) { + deleteMethod(options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1914,22 +1852,20 @@ class VirtualHubs { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, virtualHubName, options, (err, result, request, response) => { + self._deleteMethod(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, virtualHubName, options, optionalCallback); + return self._deleteMethod(options, optionalCallback); } } /** * Lists all the VirtualHubs in a resource group. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1941,11 +1877,11 @@ class VirtualHubs { * * @reject {Error} - The error object. */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + listByResourceGroupWithHttpOperationResponse(options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + self._listByResourceGroup(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1958,8 +1894,6 @@ class VirtualHubs { /** * Lists all the VirtualHubs in a resource group. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1987,7 +1921,7 @@ class VirtualHubs { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroup(resourceGroupName, options, optionalCallback) { + listByResourceGroup(options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1996,14 +1930,14 @@ class VirtualHubs { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + self._listByResourceGroup(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByResourceGroup(resourceGroupName, options, optionalCallback); + return self._listByResourceGroup(options, optionalCallback); } } @@ -2089,10 +2023,6 @@ class VirtualHubs { * Creates a VirtualHub resource if it doesn't exist else updates the existing * VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} virtualHubParameters Parameters supplied to create or update * VirtualHub. * @@ -2142,11 +2072,11 @@ class VirtualHubs { * * @reject {Error} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, virtualHubName, virtualHubParameters, options) { + beginCreateOrUpdateWithHttpOperationResponse(virtualHubParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, virtualHubName, virtualHubParameters, options, (err, result, request, response) => { + self._beginCreateOrUpdate(virtualHubParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2160,10 +2090,6 @@ class VirtualHubs { * Creates a VirtualHub resource if it doesn't exist else updates the existing * VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} virtualHubParameters Parameters supplied to create or update * VirtualHub. * @@ -2229,7 +2155,7 @@ class VirtualHubs { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName, virtualHubName, virtualHubParameters, options, optionalCallback) { + beginCreateOrUpdate(virtualHubParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2238,24 +2164,20 @@ class VirtualHubs { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, virtualHubName, virtualHubParameters, options, (err, result, request, response) => { + self._beginCreateOrUpdate(virtualHubParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginCreateOrUpdate(resourceGroupName, virtualHubName, virtualHubParameters, options, optionalCallback); + return self._beginCreateOrUpdate(virtualHubParameters, options, optionalCallback); } } /** * Updates VirtualHub tags. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} virtualHubParameters Parameters supplied to update * VirtualHub tags. * @@ -2272,11 +2194,11 @@ class VirtualHubs { * * @reject {Error} - The error object. */ - beginUpdateTagsWithHttpOperationResponse(resourceGroupName, virtualHubName, virtualHubParameters, options) { + beginUpdateTagsWithHttpOperationResponse(virtualHubParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginUpdateTags(resourceGroupName, virtualHubName, virtualHubParameters, options, (err, result, request, response) => { + self._beginUpdateTags(virtualHubParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2289,10 +2211,6 @@ class VirtualHubs { /** * Updates VirtualHub tags. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} virtualHubParameters Parameters supplied to update * VirtualHub tags. * @@ -2325,7 +2243,7 @@ class VirtualHubs { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdateTags(resourceGroupName, virtualHubName, virtualHubParameters, options, optionalCallback) { + beginUpdateTags(virtualHubParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2334,24 +2252,20 @@ class VirtualHubs { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginUpdateTags(resourceGroupName, virtualHubName, virtualHubParameters, options, (err, result, request, response) => { + self._beginUpdateTags(virtualHubParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginUpdateTags(resourceGroupName, virtualHubName, virtualHubParameters, options, optionalCallback); + return self._beginUpdateTags(virtualHubParameters, options, optionalCallback); } } /** * Deletes a VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2363,11 +2277,11 @@ class VirtualHubs { * * @reject {Error} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName, virtualHubName, options) { + beginDeleteMethodWithHttpOperationResponse(options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginDeleteMethod(resourceGroupName, virtualHubName, options, (err, result, request, response) => { + self._beginDeleteMethod(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2380,10 +2294,6 @@ class VirtualHubs { /** * Deletes a VirtualHub. * - * @param {string} resourceGroupName The resource group name of the VirtualHub. - * - * @param {string} virtualHubName The name of the VirtualHub. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2410,7 +2320,7 @@ class VirtualHubs { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName, virtualHubName, options, optionalCallback) { + beginDeleteMethod(options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2419,14 +2329,14 @@ class VirtualHubs { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginDeleteMethod(resourceGroupName, virtualHubName, options, (err, result, request, response) => { + self._beginDeleteMethod(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginDeleteMethod(resourceGroupName, virtualHubName, options, optionalCallback); + return self._beginDeleteMethod(options, optionalCallback); } } diff --git a/lib/services/networkManagement2/lib/operations/virtualWans.js b/lib/services/networkManagement2/lib/operations/virtualWans.js index 3a26f16464..e85b47a82b 100644 --- a/lib/services/networkManagement2/lib/operations/virtualWans.js +++ b/lib/services/networkManagement2/lib/operations/virtualWans.js @@ -17,8 +17,6 @@ const WebResource = msRest.WebResource; /** * Retrieves the details of a VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being retrieved. * * @param {object} [options] Optional Parameters. @@ -39,7 +37,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, virtualWANName, options, callback) { +function _get(virtualWANName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -52,15 +50,15 @@ function _get(resourceGroupName, virtualWANName, options, callback) { let apiVersion = '2018-12-01'; // Validate try { - 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 (virtualWANName === null || virtualWANName === undefined || typeof virtualWANName.valueOf() !== 'string') { throw new Error('virtualWANName 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.'); } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName 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.'); } @@ -71,9 +69,9 @@ function _get(resourceGroupName, virtualWANName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{VirtualWANName}', encodeURIComponent(virtualWANName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { @@ -163,8 +161,6 @@ function _get(resourceGroupName, virtualWANName, options, callback) { * Creates a VirtualWAN resource if it doesn't exist else updates the existing * VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being created or * updated. * @@ -218,7 +214,7 @@ function _get(resourceGroupName, virtualWANName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, virtualWANName, wANParameters, options, callback) { +function _createOrUpdate(virtualWANName, wANParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -231,7 +227,7 @@ function _createOrUpdate(resourceGroupName, virtualWANName, wANParameters, optio } // Send request - this.beginCreateOrUpdate(resourceGroupName, virtualWANName, wANParameters, options, (err, parsedResult, httpRequest, response) => { + this.beginCreateOrUpdate(virtualWANName, wANParameters, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -274,8 +270,6 @@ function _createOrUpdate(resourceGroupName, virtualWANName, wANParameters, optio /** * Updates a VirtualWAN tags. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being updated. * * @param {object} wANParameters Parameters supplied to Update VirtualWAN tags. @@ -300,7 +294,7 @@ function _createOrUpdate(resourceGroupName, virtualWANName, wANParameters, optio * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _updateTags(resourceGroupName, virtualWANName, wANParameters, options, callback) { +function _updateTags(virtualWANName, wANParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -313,7 +307,7 @@ function _updateTags(resourceGroupName, virtualWANName, wANParameters, options, } // Send request - this.beginUpdateTags(resourceGroupName, virtualWANName, wANParameters, options, (err, parsedResult, httpRequest, response) => { + this.beginUpdateTags(virtualWANName, wANParameters, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -356,8 +350,6 @@ function _updateTags(resourceGroupName, virtualWANName, wANParameters, options, /** * Deletes a VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being deleted. * * @param {object} [options] Optional Parameters. @@ -377,7 +369,7 @@ function _updateTags(resourceGroupName, virtualWANName, wANParameters, options, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, virtualWANName, options, callback) { +function _deleteMethod(virtualWANName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -390,7 +382,7 @@ function _deleteMethod(resourceGroupName, virtualWANName, options, callback) { } // Send request - this.beginDeleteMethod(resourceGroupName, virtualWANName, options, (err, parsedResult, httpRequest, response) => { + this.beginDeleteMethod(virtualWANName, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -418,8 +410,6 @@ function _deleteMethod(resourceGroupName, virtualWANName, options, callback) { /** * Lists all the VirtualWANs in a resource group. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -438,7 +428,7 @@ function _deleteMethod(resourceGroupName, virtualWANName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByResourceGroup(resourceGroupName, options, callback) { +function _listByResourceGroup(options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -454,8 +444,8 @@ function _listByResourceGroup(resourceGroupName, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName 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.'); @@ -468,7 +458,7 @@ function _listByResourceGroup(resourceGroupName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { @@ -689,8 +679,6 @@ function _list(options, callback) { * Creates a VirtualWAN resource if it doesn't exist else updates the existing * VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being created or * updated. * @@ -744,7 +732,7 @@ function _list(options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginCreateOrUpdate(resourceGroupName, virtualWANName, wANParameters, options, callback) { +function _beginCreateOrUpdate(virtualWANName, wANParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -760,8 +748,8 @@ function _beginCreateOrUpdate(resourceGroupName, virtualWANName, wANParameters, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } if (virtualWANName === null || virtualWANName === undefined || typeof virtualWANName.valueOf() !== 'string') { throw new Error('virtualWANName cannot be null or undefined and it must be of type string.'); @@ -780,7 +768,7 @@ function _beginCreateOrUpdate(resourceGroupName, virtualWANName, wANParameters, let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{VirtualWANName}', encodeURIComponent(virtualWANName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -900,8 +888,6 @@ function _beginCreateOrUpdate(resourceGroupName, virtualWANName, wANParameters, /** * Updates a VirtualWAN tags. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being updated. * * @param {object} wANParameters Parameters supplied to Update VirtualWAN tags. @@ -926,7 +912,7 @@ function _beginCreateOrUpdate(resourceGroupName, virtualWANName, wANParameters, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginUpdateTags(resourceGroupName, virtualWANName, wANParameters, options, callback) { +function _beginUpdateTags(virtualWANName, wANParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -942,8 +928,8 @@ function _beginUpdateTags(resourceGroupName, virtualWANName, wANParameters, opti 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } if (virtualWANName === null || virtualWANName === undefined || typeof virtualWANName.valueOf() !== 'string') { throw new Error('virtualWANName cannot be null or undefined and it must be of type string.'); @@ -962,7 +948,7 @@ function _beginUpdateTags(resourceGroupName, virtualWANName, wANParameters, opti let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{VirtualWANName}', encodeURIComponent(virtualWANName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -1082,8 +1068,6 @@ function _beginUpdateTags(resourceGroupName, virtualWANName, wANParameters, opti /** * Deletes a VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being deleted. * * @param {object} [options] Optional Parameters. @@ -1103,7 +1087,7 @@ function _beginUpdateTags(resourceGroupName, virtualWANName, wANParameters, opti * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginDeleteMethod(resourceGroupName, virtualWANName, options, callback) { +function _beginDeleteMethod(virtualWANName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1119,8 +1103,8 @@ function _beginDeleteMethod(resourceGroupName, virtualWANName, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } if (virtualWANName === null || virtualWANName === undefined || typeof virtualWANName.valueOf() !== 'string') { throw new Error('virtualWANName cannot be null or undefined and it must be of type string.'); @@ -1136,7 +1120,7 @@ function _beginDeleteMethod(resourceGroupName, virtualWANName, options, callback let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{VirtualWANName}', encodeURIComponent(virtualWANName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -1485,8 +1469,6 @@ class VirtualWans { /** * Retrieves the details of a VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being retrieved. * * @param {object} [options] Optional Parameters. @@ -1500,11 +1482,11 @@ class VirtualWans { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, virtualWANName, options) { + getWithHttpOperationResponse(virtualWANName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, virtualWANName, options, (err, result, request, response) => { + self._get(virtualWANName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1517,8 +1499,6 @@ class VirtualWans { /** * Retrieves the details of a VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being retrieved. * * @param {object} [options] Optional Parameters. @@ -1548,7 +1528,7 @@ class VirtualWans { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, virtualWANName, options, optionalCallback) { + get(virtualWANName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1557,14 +1537,14 @@ class VirtualWans { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, virtualWANName, options, (err, result, request, response) => { + self._get(virtualWANName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, virtualWANName, options, optionalCallback); + return self._get(virtualWANName, options, optionalCallback); } } @@ -1572,8 +1552,6 @@ class VirtualWans { * Creates a VirtualWAN resource if it doesn't exist else updates the existing * VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being created or * updated. * @@ -1620,11 +1598,11 @@ class VirtualWans { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, virtualWANName, wANParameters, options) { + createOrUpdateWithHttpOperationResponse(virtualWANName, wANParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, virtualWANName, wANParameters, options, (err, result, request, response) => { + self._createOrUpdate(virtualWANName, wANParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1638,8 +1616,6 @@ class VirtualWans { * Creates a VirtualWAN resource if it doesn't exist else updates the existing * VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being created or * updated. * @@ -1702,7 +1678,7 @@ class VirtualWans { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, virtualWANName, wANParameters, options, optionalCallback) { + createOrUpdate(virtualWANName, wANParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1711,22 +1687,20 @@ class VirtualWans { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, virtualWANName, wANParameters, options, (err, result, request, response) => { + self._createOrUpdate(virtualWANName, wANParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, virtualWANName, wANParameters, options, optionalCallback); + return self._createOrUpdate(virtualWANName, wANParameters, options, optionalCallback); } } /** * Updates a VirtualWAN tags. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being updated. * * @param {object} wANParameters Parameters supplied to Update VirtualWAN tags. @@ -1744,11 +1718,11 @@ class VirtualWans { * * @reject {Error} - The error object. */ - updateTagsWithHttpOperationResponse(resourceGroupName, virtualWANName, wANParameters, options) { + updateTagsWithHttpOperationResponse(virtualWANName, wANParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._updateTags(resourceGroupName, virtualWANName, wANParameters, options, (err, result, request, response) => { + self._updateTags(virtualWANName, wANParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1761,8 +1735,6 @@ class VirtualWans { /** * Updates a VirtualWAN tags. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being updated. * * @param {object} wANParameters Parameters supplied to Update VirtualWAN tags. @@ -1796,7 +1768,7 @@ class VirtualWans { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateTags(resourceGroupName, virtualWANName, wANParameters, options, optionalCallback) { + updateTags(virtualWANName, wANParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1805,22 +1777,20 @@ class VirtualWans { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateTags(resourceGroupName, virtualWANName, wANParameters, options, (err, result, request, response) => { + self._updateTags(virtualWANName, wANParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateTags(resourceGroupName, virtualWANName, wANParameters, options, optionalCallback); + return self._updateTags(virtualWANName, wANParameters, options, optionalCallback); } } /** * Deletes a VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being deleted. * * @param {object} [options] Optional Parameters. @@ -1834,11 +1804,11 @@ class VirtualWans { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, virtualWANName, options) { + deleteMethodWithHttpOperationResponse(virtualWANName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, virtualWANName, options, (err, result, request, response) => { + self._deleteMethod(virtualWANName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1851,8 +1821,6 @@ class VirtualWans { /** * Deletes a VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being deleted. * * @param {object} [options] Optional Parameters. @@ -1881,7 +1849,7 @@ class VirtualWans { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, virtualWANName, options, optionalCallback) { + deleteMethod(virtualWANName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1890,22 +1858,20 @@ class VirtualWans { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, virtualWANName, options, (err, result, request, response) => { + self._deleteMethod(virtualWANName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, virtualWANName, options, optionalCallback); + return self._deleteMethod(virtualWANName, options, optionalCallback); } } /** * Lists all the VirtualWANs in a resource group. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1917,11 +1883,11 @@ class VirtualWans { * * @reject {Error} - The error object. */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + listByResourceGroupWithHttpOperationResponse(options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + self._listByResourceGroup(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1934,8 +1900,6 @@ class VirtualWans { /** * Lists all the VirtualWANs in a resource group. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1963,7 +1927,7 @@ class VirtualWans { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroup(resourceGroupName, options, optionalCallback) { + listByResourceGroup(options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1972,14 +1936,14 @@ class VirtualWans { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + self._listByResourceGroup(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByResourceGroup(resourceGroupName, options, optionalCallback); + return self._listByResourceGroup(options, optionalCallback); } } @@ -2065,8 +2029,6 @@ class VirtualWans { * Creates a VirtualWAN resource if it doesn't exist else updates the existing * VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being created or * updated. * @@ -2113,11 +2075,11 @@ class VirtualWans { * * @reject {Error} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, virtualWANName, wANParameters, options) { + beginCreateOrUpdateWithHttpOperationResponse(virtualWANName, wANParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, virtualWANName, wANParameters, options, (err, result, request, response) => { + self._beginCreateOrUpdate(virtualWANName, wANParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2131,8 +2093,6 @@ class VirtualWans { * Creates a VirtualWAN resource if it doesn't exist else updates the existing * VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being created or * updated. * @@ -2195,7 +2155,7 @@ class VirtualWans { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName, virtualWANName, wANParameters, options, optionalCallback) { + beginCreateOrUpdate(virtualWANName, wANParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2204,22 +2164,20 @@ class VirtualWans { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, virtualWANName, wANParameters, options, (err, result, request, response) => { + self._beginCreateOrUpdate(virtualWANName, wANParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginCreateOrUpdate(resourceGroupName, virtualWANName, wANParameters, options, optionalCallback); + return self._beginCreateOrUpdate(virtualWANName, wANParameters, options, optionalCallback); } } /** * Updates a VirtualWAN tags. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being updated. * * @param {object} wANParameters Parameters supplied to Update VirtualWAN tags. @@ -2237,11 +2195,11 @@ class VirtualWans { * * @reject {Error} - The error object. */ - beginUpdateTagsWithHttpOperationResponse(resourceGroupName, virtualWANName, wANParameters, options) { + beginUpdateTagsWithHttpOperationResponse(virtualWANName, wANParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginUpdateTags(resourceGroupName, virtualWANName, wANParameters, options, (err, result, request, response) => { + self._beginUpdateTags(virtualWANName, wANParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2254,8 +2212,6 @@ class VirtualWans { /** * Updates a VirtualWAN tags. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being updated. * * @param {object} wANParameters Parameters supplied to Update VirtualWAN tags. @@ -2289,7 +2245,7 @@ class VirtualWans { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdateTags(resourceGroupName, virtualWANName, wANParameters, options, optionalCallback) { + beginUpdateTags(virtualWANName, wANParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2298,22 +2254,20 @@ class VirtualWans { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginUpdateTags(resourceGroupName, virtualWANName, wANParameters, options, (err, result, request, response) => { + self._beginUpdateTags(virtualWANName, wANParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginUpdateTags(resourceGroupName, virtualWANName, wANParameters, options, optionalCallback); + return self._beginUpdateTags(virtualWANName, wANParameters, options, optionalCallback); } } /** * Deletes a VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being deleted. * * @param {object} [options] Optional Parameters. @@ -2327,11 +2281,11 @@ class VirtualWans { * * @reject {Error} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName, virtualWANName, options) { + beginDeleteMethodWithHttpOperationResponse(virtualWANName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginDeleteMethod(resourceGroupName, virtualWANName, options, (err, result, request, response) => { + self._beginDeleteMethod(virtualWANName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2344,8 +2298,6 @@ class VirtualWans { /** * Deletes a VirtualWAN. * - * @param {string} resourceGroupName The resource group name of the VirtualWan. - * * @param {string} virtualWANName The name of the VirtualWAN being deleted. * * @param {object} [options] Optional Parameters. @@ -2374,7 +2326,7 @@ class VirtualWans { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName, virtualWANName, options, optionalCallback) { + beginDeleteMethod(virtualWANName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2383,14 +2335,14 @@ class VirtualWans { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginDeleteMethod(resourceGroupName, virtualWANName, options, (err, result, request, response) => { + self._beginDeleteMethod(virtualWANName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginDeleteMethod(resourceGroupName, virtualWANName, options, optionalCallback); + return self._beginDeleteMethod(virtualWANName, options, optionalCallback); } } diff --git a/lib/services/networkManagement2/lib/operations/vpnConnections.js b/lib/services/networkManagement2/lib/operations/vpnConnections.js index 3cadd3bb06..e67f7dd913 100644 --- a/lib/services/networkManagement2/lib/operations/vpnConnections.js +++ b/lib/services/networkManagement2/lib/operations/vpnConnections.js @@ -17,12 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieves the details of a vpn connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the vpn connection. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -41,7 +37,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, gatewayName, connectionName, options, callback) { +function _get(gatewayName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -57,14 +53,14 @@ function _get(resourceGroupName, gatewayName, connectionName, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.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.'); } - if (connectionName === null || connectionName === undefined || typeof connectionName.valueOf() !== 'string') { - throw new Error('connectionName cannot be null or undefined and it must be of type string.'); + if (this.client.connectionName === null || this.client.connectionName === undefined || typeof this.client.connectionName.valueOf() !== 'string') { + throw new Error('this.client.connectionName 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.'); @@ -77,9 +73,9 @@ function _get(resourceGroupName, gatewayName, connectionName, options, callback) let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{gatewayName}', encodeURIComponent(gatewayName)); - requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); + requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(this.client.connectionName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { @@ -169,12 +165,8 @@ function _get(resourceGroupName, gatewayName, connectionName, options, callback) * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else * updates the existing connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the connection. - * * @param {object} vpnConnectionParameters Parameters supplied to create or * Update a VPN Connection. * @@ -238,7 +230,7 @@ function _get(resourceGroupName, gatewayName, connectionName, options, callback) * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, options, callback) { +function _createOrUpdate(gatewayName, vpnConnectionParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -251,7 +243,7 @@ function _createOrUpdate(resourceGroupName, gatewayName, connectionName, vpnConn } // Send request - this.beginCreateOrUpdate(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, options, (err, parsedResult, httpRequest, response) => { + this.beginCreateOrUpdate(gatewayName, vpnConnectionParameters, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -294,12 +286,8 @@ function _createOrUpdate(resourceGroupName, gatewayName, connectionName, vpnConn /** * Deletes a vpn connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the connection. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -317,7 +305,7 @@ function _createOrUpdate(resourceGroupName, gatewayName, connectionName, vpnConn * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, gatewayName, connectionName, options, callback) { +function _deleteMethod(gatewayName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -330,7 +318,7 @@ function _deleteMethod(resourceGroupName, gatewayName, connectionName, options, } // Send request - this.beginDeleteMethod(resourceGroupName, gatewayName, connectionName, options, (err, parsedResult, httpRequest, response) => { + this.beginDeleteMethod(gatewayName, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -358,8 +346,6 @@ 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. @@ -381,7 +367,7 @@ function _deleteMethod(resourceGroupName, gatewayName, connectionName, options, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByVpnGateway(resourceGroupName, gatewayName, options, callback) { +function _listByVpnGateway(gatewayName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -397,8 +383,8 @@ function _listByVpnGateway(resourceGroupName, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.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.'); @@ -414,7 +400,7 @@ function _listByVpnGateway(resourceGroupName, gatewayName, options, callback) { let baseUrl = this.client.baseUri; 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('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{gatewayName}', encodeURIComponent(gatewayName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -504,12 +490,8 @@ function _listByVpnGateway(resourceGroupName, gatewayName, options, callback) { * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else * updates the existing connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the connection. - * * @param {object} vpnConnectionParameters Parameters supplied to create or * Update a VPN Connection. * @@ -573,7 +555,7 @@ function _listByVpnGateway(resourceGroupName, gatewayName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginCreateOrUpdate(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, options, callback) { +function _beginCreateOrUpdate(gatewayName, vpnConnectionParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -589,14 +571,14 @@ function _beginCreateOrUpdate(resourceGroupName, gatewayName, connectionName, vp 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.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.'); } - if (connectionName === null || connectionName === undefined || typeof connectionName.valueOf() !== 'string') { - throw new Error('connectionName cannot be null or undefined and it must be of type string.'); + if (this.client.connectionName === null || this.client.connectionName === undefined || typeof this.client.connectionName.valueOf() !== 'string') { + throw new Error('this.client.connectionName cannot be null or undefined and it must be of type string.'); } if (vpnConnectionParameters === null || vpnConnectionParameters === undefined) { throw new Error('vpnConnectionParameters cannot be null or undefined.'); @@ -612,9 +594,9 @@ function _beginCreateOrUpdate(resourceGroupName, gatewayName, connectionName, vp let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{gatewayName}', encodeURIComponent(gatewayName)); - requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); + requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(this.client.connectionName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { @@ -733,12 +715,8 @@ function _beginCreateOrUpdate(resourceGroupName, gatewayName, connectionName, vp /** * Deletes a vpn connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the connection. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -756,7 +734,7 @@ function _beginCreateOrUpdate(resourceGroupName, gatewayName, connectionName, vp * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginDeleteMethod(resourceGroupName, gatewayName, connectionName, options, callback) { +function _beginDeleteMethod(gatewayName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -772,14 +750,14 @@ function _beginDeleteMethod(resourceGroupName, gatewayName, connectionName, opti 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.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.'); } - if (connectionName === null || connectionName === undefined || typeof connectionName.valueOf() !== 'string') { - throw new Error('connectionName cannot be null or undefined and it must be of type string.'); + if (this.client.connectionName === null || this.client.connectionName === undefined || typeof this.client.connectionName.valueOf() !== 'string') { + throw new Error('this.client.connectionName 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.'); @@ -792,9 +770,9 @@ function _beginDeleteMethod(resourceGroupName, gatewayName, connectionName, opti let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{gatewayName}', encodeURIComponent(gatewayName)); - requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); + requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(this.client.connectionName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { @@ -1011,12 +989,8 @@ class VpnConnections { /** * Retrieves the details of a vpn connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the vpn connection. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1028,11 +1002,11 @@ class VpnConnections { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, gatewayName, connectionName, options) { + getWithHttpOperationResponse(gatewayName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, gatewayName, connectionName, options, (err, result, request, response) => { + self._get(gatewayName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1045,12 +1019,8 @@ class VpnConnections { /** * Retrieves the details of a vpn connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the vpn connection. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1078,7 +1048,7 @@ class VpnConnections { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, gatewayName, connectionName, options, optionalCallback) { + get(gatewayName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1087,14 +1057,14 @@ class VpnConnections { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, gatewayName, connectionName, options, (err, result, request, response) => { + self._get(gatewayName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, gatewayName, connectionName, options, optionalCallback); + return self._get(gatewayName, options, optionalCallback); } } @@ -1102,12 +1072,8 @@ class VpnConnections { * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else * updates the existing connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the connection. - * * @param {object} vpnConnectionParameters Parameters supplied to create or * Update a VPN Connection. * @@ -1164,11 +1130,11 @@ class VpnConnections { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, options) { + createOrUpdateWithHttpOperationResponse(gatewayName, vpnConnectionParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, options, (err, result, request, response) => { + self._createOrUpdate(gatewayName, vpnConnectionParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1182,12 +1148,8 @@ class VpnConnections { * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else * updates the existing connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the connection. - * * @param {object} vpnConnectionParameters Parameters supplied to create or * Update a VPN Connection. * @@ -1260,7 +1222,7 @@ class VpnConnections { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, options, optionalCallback) { + createOrUpdate(gatewayName, vpnConnectionParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1269,26 +1231,22 @@ class VpnConnections { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, options, (err, result, request, response) => { + self._createOrUpdate(gatewayName, vpnConnectionParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, options, optionalCallback); + return self._createOrUpdate(gatewayName, vpnConnectionParameters, options, optionalCallback); } } /** * Deletes a vpn connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the connection. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1300,11 +1258,11 @@ class VpnConnections { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, gatewayName, connectionName, options) { + deleteMethodWithHttpOperationResponse(gatewayName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, gatewayName, connectionName, options, (err, result, request, response) => { + self._deleteMethod(gatewayName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1317,12 +1275,8 @@ class VpnConnections { /** * Deletes a vpn connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the connection. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1349,7 +1303,7 @@ class VpnConnections { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, gatewayName, connectionName, options, optionalCallback) { + deleteMethod(gatewayName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1358,22 +1312,20 @@ class VpnConnections { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, gatewayName, connectionName, options, (err, result, request, response) => { + self._deleteMethod(gatewayName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, gatewayName, connectionName, options, optionalCallback); + return self._deleteMethod(gatewayName, options, optionalCallback); } } /** * 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. @@ -1387,11 +1339,11 @@ class VpnConnections { * * @reject {Error} - The error object. */ - listByVpnGatewayWithHttpOperationResponse(resourceGroupName, gatewayName, options) { + listByVpnGatewayWithHttpOperationResponse(gatewayName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByVpnGateway(resourceGroupName, gatewayName, options, (err, result, request, response) => { + self._listByVpnGateway(gatewayName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1404,8 +1356,6 @@ 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. @@ -1436,7 +1386,7 @@ class VpnConnections { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByVpnGateway(resourceGroupName, gatewayName, options, optionalCallback) { + listByVpnGateway(gatewayName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1445,14 +1395,14 @@ class VpnConnections { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByVpnGateway(resourceGroupName, gatewayName, options, (err, result, request, response) => { + self._listByVpnGateway(gatewayName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByVpnGateway(resourceGroupName, gatewayName, options, optionalCallback); + return self._listByVpnGateway(gatewayName, options, optionalCallback); } } @@ -1460,12 +1410,8 @@ class VpnConnections { * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else * updates the existing connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the connection. - * * @param {object} vpnConnectionParameters Parameters supplied to create or * Update a VPN Connection. * @@ -1522,11 +1468,11 @@ class VpnConnections { * * @reject {Error} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, options) { + beginCreateOrUpdateWithHttpOperationResponse(gatewayName, vpnConnectionParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, options, (err, result, request, response) => { + self._beginCreateOrUpdate(gatewayName, vpnConnectionParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1540,12 +1486,8 @@ class VpnConnections { * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else * updates the existing connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the connection. - * * @param {object} vpnConnectionParameters Parameters supplied to create or * Update a VPN Connection. * @@ -1618,7 +1560,7 @@ class VpnConnections { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, options, optionalCallback) { + beginCreateOrUpdate(gatewayName, vpnConnectionParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1627,26 +1569,22 @@ class VpnConnections { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, options, (err, result, request, response) => { + self._beginCreateOrUpdate(gatewayName, vpnConnectionParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginCreateOrUpdate(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, options, optionalCallback); + return self._beginCreateOrUpdate(gatewayName, vpnConnectionParameters, options, optionalCallback); } } /** * Deletes a vpn connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the connection. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1658,11 +1596,11 @@ class VpnConnections { * * @reject {Error} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName, gatewayName, connectionName, options) { + beginDeleteMethodWithHttpOperationResponse(gatewayName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginDeleteMethod(resourceGroupName, gatewayName, connectionName, options, (err, result, request, response) => { + self._beginDeleteMethod(gatewayName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1675,12 +1613,8 @@ class VpnConnections { /** * Deletes a vpn connection. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * - * @param {string} connectionName The name of the connection. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1707,7 +1641,7 @@ class VpnConnections { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName, gatewayName, connectionName, options, optionalCallback) { + beginDeleteMethod(gatewayName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1716,14 +1650,14 @@ class VpnConnections { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginDeleteMethod(resourceGroupName, gatewayName, connectionName, options, (err, result, request, response) => { + self._beginDeleteMethod(gatewayName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginDeleteMethod(resourceGroupName, gatewayName, connectionName, options, optionalCallback); + return self._beginDeleteMethod(gatewayName, options, optionalCallback); } } diff --git a/lib/services/networkManagement2/lib/operations/vpnGateways.js b/lib/services/networkManagement2/lib/operations/vpnGateways.js index 7f25c8c69c..9f7b63eaa0 100644 --- a/lib/services/networkManagement2/lib/operations/vpnGateways.js +++ b/lib/services/networkManagement2/lib/operations/vpnGateways.js @@ -17,8 +17,6 @@ const WebResource = msRest.WebResource; /** * Retrieves the details of a 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. @@ -39,7 +37,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, gatewayName, options, callback) { +function _get(gatewayName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -55,8 +53,8 @@ function _get(resourceGroupName, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.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.'); @@ -72,7 +70,7 @@ function _get(resourceGroupName, gatewayName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{gatewayName}', encodeURIComponent(gatewayName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -163,8 +161,6 @@ function _get(resourceGroupName, gatewayName, options, callback) { * Creates a virtual wan vpn gateway if it doesn't exist else updates the * existing gateway. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} vpnGatewayParameters Parameters supplied to create or Update @@ -221,7 +217,7 @@ function _get(resourceGroupName, gatewayName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, gatewayName, vpnGatewayParameters, options, callback) { +function _createOrUpdate(gatewayName, vpnGatewayParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -234,7 +230,7 @@ function _createOrUpdate(resourceGroupName, gatewayName, vpnGatewayParameters, o } // Send request - this.beginCreateOrUpdate(resourceGroupName, gatewayName, vpnGatewayParameters, options, (err, parsedResult, httpRequest, response) => { + this.beginCreateOrUpdate(gatewayName, vpnGatewayParameters, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -277,8 +273,6 @@ function _createOrUpdate(resourceGroupName, gatewayName, vpnGatewayParameters, o /** * Updates virtual wan vpn gateway tags. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} vpnGatewayParameters Parameters supplied to update a virtual @@ -304,7 +298,7 @@ function _createOrUpdate(resourceGroupName, gatewayName, vpnGatewayParameters, o * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _updateTags(resourceGroupName, gatewayName, vpnGatewayParameters, options, callback) { +function _updateTags(gatewayName, vpnGatewayParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -317,7 +311,7 @@ function _updateTags(resourceGroupName, gatewayName, vpnGatewayParameters, optio } // Send request - this.beginUpdateTags(resourceGroupName, gatewayName, vpnGatewayParameters, options, (err, parsedResult, httpRequest, response) => { + this.beginUpdateTags(gatewayName, vpnGatewayParameters, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -360,8 +354,6 @@ function _updateTags(resourceGroupName, gatewayName, vpnGatewayParameters, optio /** * Deletes a 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. @@ -381,7 +373,7 @@ function _updateTags(resourceGroupName, gatewayName, vpnGatewayParameters, optio * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, gatewayName, options, callback) { +function _deleteMethod(gatewayName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -394,7 +386,7 @@ function _deleteMethod(resourceGroupName, gatewayName, options, callback) { } // Send request - this.beginDeleteMethod(resourceGroupName, gatewayName, options, (err, parsedResult, httpRequest, response) => { + this.beginDeleteMethod(gatewayName, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -422,8 +414,6 @@ function _deleteMethod(resourceGroupName, gatewayName, options, callback) { /** * Lists all the VpnGateways in a resource group. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -442,7 +432,7 @@ function _deleteMethod(resourceGroupName, gatewayName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByResourceGroup(resourceGroupName, options, callback) { +function _listByResourceGroup(options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -458,8 +448,8 @@ function _listByResourceGroup(resourceGroupName, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName 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.'); @@ -472,7 +462,7 @@ function _listByResourceGroup(resourceGroupName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { @@ -693,8 +683,6 @@ function _list(options, callback) { * Creates a virtual wan vpn gateway if it doesn't exist else updates the * existing gateway. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} vpnGatewayParameters Parameters supplied to create or Update @@ -751,7 +739,7 @@ function _list(options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginCreateOrUpdate(resourceGroupName, gatewayName, vpnGatewayParameters, options, callback) { +function _beginCreateOrUpdate(gatewayName, vpnGatewayParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -767,8 +755,8 @@ function _beginCreateOrUpdate(resourceGroupName, gatewayName, vpnGatewayParamete 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.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.'); @@ -787,7 +775,7 @@ function _beginCreateOrUpdate(resourceGroupName, gatewayName, vpnGatewayParamete let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{gatewayName}', encodeURIComponent(gatewayName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -907,8 +895,6 @@ function _beginCreateOrUpdate(resourceGroupName, gatewayName, vpnGatewayParamete /** * Updates virtual wan vpn gateway tags. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} vpnGatewayParameters Parameters supplied to update a virtual @@ -934,7 +920,7 @@ function _beginCreateOrUpdate(resourceGroupName, gatewayName, vpnGatewayParamete * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginUpdateTags(resourceGroupName, gatewayName, vpnGatewayParameters, options, callback) { +function _beginUpdateTags(gatewayName, vpnGatewayParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -950,8 +936,8 @@ function _beginUpdateTags(resourceGroupName, gatewayName, vpnGatewayParameters, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.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.'); @@ -970,7 +956,7 @@ function _beginUpdateTags(resourceGroupName, gatewayName, vpnGatewayParameters, let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{gatewayName}', encodeURIComponent(gatewayName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -1090,8 +1076,6 @@ function _beginUpdateTags(resourceGroupName, gatewayName, vpnGatewayParameters, /** * Deletes a 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. @@ -1111,7 +1095,7 @@ function _beginUpdateTags(resourceGroupName, gatewayName, vpnGatewayParameters, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginDeleteMethod(resourceGroupName, gatewayName, options, callback) { +function _beginDeleteMethod(gatewayName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1127,8 +1111,8 @@ function _beginDeleteMethod(resourceGroupName, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.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.'); @@ -1144,7 +1128,7 @@ function _beginDeleteMethod(resourceGroupName, gatewayName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{gatewayName}', encodeURIComponent(gatewayName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -1493,8 +1477,6 @@ class VpnGateways { /** * Retrieves the details of a 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. @@ -1508,11 +1490,11 @@ class VpnGateways { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, gatewayName, options) { + getWithHttpOperationResponse(gatewayName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, gatewayName, options, (err, result, request, response) => { + self._get(gatewayName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1525,8 +1507,6 @@ class VpnGateways { /** * Retrieves the details of a 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. @@ -1556,7 +1536,7 @@ class VpnGateways { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, gatewayName, options, optionalCallback) { + get(gatewayName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1565,14 +1545,14 @@ class VpnGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, gatewayName, options, (err, result, request, response) => { + self._get(gatewayName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, gatewayName, options, optionalCallback); + return self._get(gatewayName, options, optionalCallback); } } @@ -1580,8 +1560,6 @@ class VpnGateways { * Creates a virtual wan vpn gateway if it doesn't exist else updates the * existing gateway. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} vpnGatewayParameters Parameters supplied to create or Update @@ -1631,11 +1609,11 @@ class VpnGateways { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, gatewayName, vpnGatewayParameters, options) { + createOrUpdateWithHttpOperationResponse(gatewayName, vpnGatewayParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, gatewayName, vpnGatewayParameters, options, (err, result, request, response) => { + self._createOrUpdate(gatewayName, vpnGatewayParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1649,8 +1627,6 @@ class VpnGateways { * Creates a virtual wan vpn gateway if it doesn't exist else updates the * existing gateway. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} vpnGatewayParameters Parameters supplied to create or Update @@ -1716,7 +1692,7 @@ class VpnGateways { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, gatewayName, vpnGatewayParameters, options, optionalCallback) { + createOrUpdate(gatewayName, vpnGatewayParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1725,22 +1701,20 @@ class VpnGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, gatewayName, vpnGatewayParameters, options, (err, result, request, response) => { + self._createOrUpdate(gatewayName, vpnGatewayParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, gatewayName, vpnGatewayParameters, options, optionalCallback); + return self._createOrUpdate(gatewayName, vpnGatewayParameters, options, optionalCallback); } } /** * Updates virtual wan vpn gateway tags. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} vpnGatewayParameters Parameters supplied to update a virtual @@ -1759,11 +1733,11 @@ class VpnGateways { * * @reject {Error} - The error object. */ - updateTagsWithHttpOperationResponse(resourceGroupName, gatewayName, vpnGatewayParameters, options) { + updateTagsWithHttpOperationResponse(gatewayName, vpnGatewayParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._updateTags(resourceGroupName, gatewayName, vpnGatewayParameters, options, (err, result, request, response) => { + self._updateTags(gatewayName, vpnGatewayParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1776,8 +1750,6 @@ class VpnGateways { /** * Updates virtual wan vpn gateway tags. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} vpnGatewayParameters Parameters supplied to update a virtual @@ -1812,7 +1784,7 @@ class VpnGateways { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateTags(resourceGroupName, gatewayName, vpnGatewayParameters, options, optionalCallback) { + updateTags(gatewayName, vpnGatewayParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1821,22 +1793,20 @@ class VpnGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateTags(resourceGroupName, gatewayName, vpnGatewayParameters, options, (err, result, request, response) => { + self._updateTags(gatewayName, vpnGatewayParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateTags(resourceGroupName, gatewayName, vpnGatewayParameters, options, optionalCallback); + return self._updateTags(gatewayName, vpnGatewayParameters, options, optionalCallback); } } /** * Deletes a 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. @@ -1850,11 +1820,11 @@ class VpnGateways { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, gatewayName, options) { + deleteMethodWithHttpOperationResponse(gatewayName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, gatewayName, options, (err, result, request, response) => { + self._deleteMethod(gatewayName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1867,8 +1837,6 @@ class VpnGateways { /** * Deletes a 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. @@ -1897,7 +1865,7 @@ class VpnGateways { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, gatewayName, options, optionalCallback) { + deleteMethod(gatewayName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1906,22 +1874,20 @@ class VpnGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, gatewayName, options, (err, result, request, response) => { + self._deleteMethod(gatewayName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, gatewayName, options, optionalCallback); + return self._deleteMethod(gatewayName, options, optionalCallback); } } /** * Lists all the VpnGateways in a resource group. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1933,11 +1899,11 @@ class VpnGateways { * * @reject {Error} - The error object. */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + listByResourceGroupWithHttpOperationResponse(options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + self._listByResourceGroup(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1950,8 +1916,6 @@ class VpnGateways { /** * Lists all the VpnGateways in a resource group. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1979,7 +1943,7 @@ class VpnGateways { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroup(resourceGroupName, options, optionalCallback) { + listByResourceGroup(options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1988,14 +1952,14 @@ class VpnGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + self._listByResourceGroup(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByResourceGroup(resourceGroupName, options, optionalCallback); + return self._listByResourceGroup(options, optionalCallback); } } @@ -2081,8 +2045,6 @@ class VpnGateways { * Creates a virtual wan vpn gateway if it doesn't exist else updates the * existing gateway. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} vpnGatewayParameters Parameters supplied to create or Update @@ -2132,11 +2094,11 @@ class VpnGateways { * * @reject {Error} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, gatewayName, vpnGatewayParameters, options) { + beginCreateOrUpdateWithHttpOperationResponse(gatewayName, vpnGatewayParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, gatewayName, vpnGatewayParameters, options, (err, result, request, response) => { + self._beginCreateOrUpdate(gatewayName, vpnGatewayParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2150,8 +2112,6 @@ class VpnGateways { * Creates a virtual wan vpn gateway if it doesn't exist else updates the * existing gateway. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} vpnGatewayParameters Parameters supplied to create or Update @@ -2217,7 +2177,7 @@ class VpnGateways { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName, gatewayName, vpnGatewayParameters, options, optionalCallback) { + beginCreateOrUpdate(gatewayName, vpnGatewayParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2226,22 +2186,20 @@ class VpnGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, gatewayName, vpnGatewayParameters, options, (err, result, request, response) => { + self._beginCreateOrUpdate(gatewayName, vpnGatewayParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginCreateOrUpdate(resourceGroupName, gatewayName, vpnGatewayParameters, options, optionalCallback); + return self._beginCreateOrUpdate(gatewayName, vpnGatewayParameters, options, optionalCallback); } } /** * Updates virtual wan vpn gateway tags. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} vpnGatewayParameters Parameters supplied to update a virtual @@ -2260,11 +2218,11 @@ class VpnGateways { * * @reject {Error} - The error object. */ - beginUpdateTagsWithHttpOperationResponse(resourceGroupName, gatewayName, vpnGatewayParameters, options) { + beginUpdateTagsWithHttpOperationResponse(gatewayName, vpnGatewayParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginUpdateTags(resourceGroupName, gatewayName, vpnGatewayParameters, options, (err, result, request, response) => { + self._beginUpdateTags(gatewayName, vpnGatewayParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2277,8 +2235,6 @@ class VpnGateways { /** * Updates virtual wan vpn gateway tags. * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * * @param {string} gatewayName The name of the gateway. * * @param {object} vpnGatewayParameters Parameters supplied to update a virtual @@ -2313,7 +2269,7 @@ class VpnGateways { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdateTags(resourceGroupName, gatewayName, vpnGatewayParameters, options, optionalCallback) { + beginUpdateTags(gatewayName, vpnGatewayParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2322,22 +2278,20 @@ class VpnGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginUpdateTags(resourceGroupName, gatewayName, vpnGatewayParameters, options, (err, result, request, response) => { + self._beginUpdateTags(gatewayName, vpnGatewayParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginUpdateTags(resourceGroupName, gatewayName, vpnGatewayParameters, options, optionalCallback); + return self._beginUpdateTags(gatewayName, vpnGatewayParameters, options, optionalCallback); } } /** * Deletes a 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. @@ -2351,11 +2305,11 @@ class VpnGateways { * * @reject {Error} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName, gatewayName, options) { + beginDeleteMethodWithHttpOperationResponse(gatewayName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginDeleteMethod(resourceGroupName, gatewayName, options, (err, result, request, response) => { + self._beginDeleteMethod(gatewayName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2368,8 +2322,6 @@ class VpnGateways { /** * Deletes a 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. @@ -2398,7 +2350,7 @@ class VpnGateways { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName, gatewayName, options, optionalCallback) { + beginDeleteMethod(gatewayName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2407,14 +2359,14 @@ class VpnGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginDeleteMethod(resourceGroupName, gatewayName, options, (err, result, request, response) => { + self._beginDeleteMethod(gatewayName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginDeleteMethod(resourceGroupName, gatewayName, options, optionalCallback); + return self._beginDeleteMethod(gatewayName, options, optionalCallback); } } diff --git a/lib/services/networkManagement2/lib/operations/vpnSites.js b/lib/services/networkManagement2/lib/operations/vpnSites.js index 9ae8215f68..677f4786c8 100644 --- a/lib/services/networkManagement2/lib/operations/vpnSites.js +++ b/lib/services/networkManagement2/lib/operations/vpnSites.js @@ -17,8 +17,6 @@ const WebResource = msRest.WebResource; /** * Retrieves the details of a VPN site. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being retrieved. * * @param {object} [options] Optional Parameters. @@ -39,7 +37,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, vpnSiteName, options, callback) { +function _get(vpnSiteName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -55,8 +53,8 @@ function _get(resourceGroupName, vpnSiteName, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } if (vpnSiteName === null || vpnSiteName === undefined || typeof vpnSiteName.valueOf() !== 'string') { throw new Error('vpnSiteName cannot be null or undefined and it must be of type string.'); @@ -72,7 +70,7 @@ function _get(resourceGroupName, vpnSiteName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{vpnSiteName}', encodeURIComponent(vpnSiteName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -163,8 +161,6 @@ function _get(resourceGroupName, vpnSiteName, options, callback) { * Creates a VpnSite resource if it doesn't exist else updates the existing * VpnSite. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being created or * updated. * @@ -239,7 +235,7 @@ function _get(resourceGroupName, vpnSiteName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, vpnSiteName, vpnSiteParameters, options, callback) { +function _createOrUpdate(vpnSiteName, vpnSiteParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -252,7 +248,7 @@ function _createOrUpdate(resourceGroupName, vpnSiteName, vpnSiteParameters, opti } // Send request - this.beginCreateOrUpdate(resourceGroupName, vpnSiteName, vpnSiteParameters, options, (err, parsedResult, httpRequest, response) => { + this.beginCreateOrUpdate(vpnSiteName, vpnSiteParameters, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -295,8 +291,6 @@ function _createOrUpdate(resourceGroupName, vpnSiteName, vpnSiteParameters, opti /** * Updates VpnSite tags. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being updated. * * @param {object} vpnSiteParameters Parameters supplied to update VpnSite @@ -322,7 +316,7 @@ function _createOrUpdate(resourceGroupName, vpnSiteName, vpnSiteParameters, opti * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _updateTags(resourceGroupName, vpnSiteName, vpnSiteParameters, options, callback) { +function _updateTags(vpnSiteName, vpnSiteParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -335,7 +329,7 @@ function _updateTags(resourceGroupName, vpnSiteName, vpnSiteParameters, options, } // Send request - this.beginUpdateTags(resourceGroupName, vpnSiteName, vpnSiteParameters, options, (err, parsedResult, httpRequest, response) => { + this.beginUpdateTags(vpnSiteName, vpnSiteParameters, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -378,8 +372,6 @@ function _updateTags(resourceGroupName, vpnSiteName, vpnSiteParameters, options, /** * Deletes a VpnSite. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being deleted. * * @param {object} [options] Optional Parameters. @@ -399,7 +391,7 @@ function _updateTags(resourceGroupName, vpnSiteName, vpnSiteParameters, options, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, vpnSiteName, options, callback) { +function _deleteMethod(vpnSiteName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -412,7 +404,7 @@ function _deleteMethod(resourceGroupName, vpnSiteName, options, callback) { } // Send request - this.beginDeleteMethod(resourceGroupName, vpnSiteName, options, (err, parsedResult, httpRequest, response) => { + this.beginDeleteMethod(vpnSiteName, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -440,8 +432,6 @@ function _deleteMethod(resourceGroupName, vpnSiteName, options, callback) { /** * Lists all the vpnSites in a resource group. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -460,7 +450,7 @@ function _deleteMethod(resourceGroupName, vpnSiteName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByResourceGroup(resourceGroupName, options, callback) { +function _listByResourceGroup(options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -476,8 +466,8 @@ function _listByResourceGroup(resourceGroupName, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName 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.'); @@ -490,7 +480,7 @@ function _listByResourceGroup(resourceGroupName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { @@ -711,8 +701,6 @@ function _list(options, callback) { * Creates a VpnSite resource if it doesn't exist else updates the existing * VpnSite. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being created or * updated. * @@ -787,7 +775,7 @@ function _list(options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginCreateOrUpdate(resourceGroupName, vpnSiteName, vpnSiteParameters, options, callback) { +function _beginCreateOrUpdate(vpnSiteName, vpnSiteParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -803,8 +791,8 @@ function _beginCreateOrUpdate(resourceGroupName, vpnSiteName, vpnSiteParameters, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } if (vpnSiteName === null || vpnSiteName === undefined || typeof vpnSiteName.valueOf() !== 'string') { throw new Error('vpnSiteName cannot be null or undefined and it must be of type string.'); @@ -823,7 +811,7 @@ function _beginCreateOrUpdate(resourceGroupName, vpnSiteName, vpnSiteParameters, let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{vpnSiteName}', encodeURIComponent(vpnSiteName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -943,8 +931,6 @@ function _beginCreateOrUpdate(resourceGroupName, vpnSiteName, vpnSiteParameters, /** * Updates VpnSite tags. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being updated. * * @param {object} vpnSiteParameters Parameters supplied to update VpnSite @@ -970,7 +956,7 @@ function _beginCreateOrUpdate(resourceGroupName, vpnSiteName, vpnSiteParameters, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginUpdateTags(resourceGroupName, vpnSiteName, vpnSiteParameters, options, callback) { +function _beginUpdateTags(vpnSiteName, vpnSiteParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -986,8 +972,8 @@ function _beginUpdateTags(resourceGroupName, vpnSiteName, vpnSiteParameters, opt 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } if (vpnSiteName === null || vpnSiteName === undefined || typeof vpnSiteName.valueOf() !== 'string') { throw new Error('vpnSiteName cannot be null or undefined and it must be of type string.'); @@ -1006,7 +992,7 @@ function _beginUpdateTags(resourceGroupName, vpnSiteName, vpnSiteParameters, opt let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{vpnSiteName}', encodeURIComponent(vpnSiteName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -1126,8 +1112,6 @@ function _beginUpdateTags(resourceGroupName, vpnSiteName, vpnSiteParameters, opt /** * Deletes a VpnSite. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being deleted. * * @param {object} [options] Optional Parameters. @@ -1147,7 +1131,7 @@ function _beginUpdateTags(resourceGroupName, vpnSiteName, vpnSiteParameters, opt * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginDeleteMethod(resourceGroupName, vpnSiteName, options, callback) { +function _beginDeleteMethod(vpnSiteName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1163,8 +1147,8 @@ function _beginDeleteMethod(resourceGroupName, vpnSiteName, 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } if (vpnSiteName === null || vpnSiteName === undefined || typeof vpnSiteName.valueOf() !== 'string') { throw new Error('vpnSiteName cannot be null or undefined and it must be of type string.'); @@ -1180,7 +1164,7 @@ function _beginDeleteMethod(resourceGroupName, vpnSiteName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{vpnSiteName}', encodeURIComponent(vpnSiteName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -1529,8 +1513,6 @@ class VpnSites { /** * Retrieves the details of a VPN site. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being retrieved. * * @param {object} [options] Optional Parameters. @@ -1544,11 +1526,11 @@ class VpnSites { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, vpnSiteName, options) { + getWithHttpOperationResponse(vpnSiteName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, vpnSiteName, options, (err, result, request, response) => { + self._get(vpnSiteName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1561,8 +1543,6 @@ class VpnSites { /** * Retrieves the details of a VPN site. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being retrieved. * * @param {object} [options] Optional Parameters. @@ -1592,7 +1572,7 @@ class VpnSites { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, vpnSiteName, options, optionalCallback) { + get(vpnSiteName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1601,14 +1581,14 @@ class VpnSites { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, vpnSiteName, options, (err, result, request, response) => { + self._get(vpnSiteName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, vpnSiteName, options, optionalCallback); + return self._get(vpnSiteName, options, optionalCallback); } } @@ -1616,8 +1596,6 @@ class VpnSites { * Creates a VpnSite resource if it doesn't exist else updates the existing * VpnSite. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being created or * updated. * @@ -1685,11 +1663,11 @@ class VpnSites { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, vpnSiteName, vpnSiteParameters, options) { + createOrUpdateWithHttpOperationResponse(vpnSiteName, vpnSiteParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, vpnSiteName, vpnSiteParameters, options, (err, result, request, response) => { + self._createOrUpdate(vpnSiteName, vpnSiteParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1703,8 +1681,6 @@ class VpnSites { * Creates a VpnSite resource if it doesn't exist else updates the existing * VpnSite. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being created or * updated. * @@ -1788,7 +1764,7 @@ class VpnSites { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, vpnSiteName, vpnSiteParameters, options, optionalCallback) { + createOrUpdate(vpnSiteName, vpnSiteParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1797,22 +1773,20 @@ class VpnSites { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, vpnSiteName, vpnSiteParameters, options, (err, result, request, response) => { + self._createOrUpdate(vpnSiteName, vpnSiteParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, vpnSiteName, vpnSiteParameters, options, optionalCallback); + return self._createOrUpdate(vpnSiteName, vpnSiteParameters, options, optionalCallback); } } /** * Updates VpnSite tags. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being updated. * * @param {object} vpnSiteParameters Parameters supplied to update VpnSite @@ -1831,11 +1805,11 @@ class VpnSites { * * @reject {Error} - The error object. */ - updateTagsWithHttpOperationResponse(resourceGroupName, vpnSiteName, vpnSiteParameters, options) { + updateTagsWithHttpOperationResponse(vpnSiteName, vpnSiteParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._updateTags(resourceGroupName, vpnSiteName, vpnSiteParameters, options, (err, result, request, response) => { + self._updateTags(vpnSiteName, vpnSiteParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1848,8 +1822,6 @@ class VpnSites { /** * Updates VpnSite tags. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being updated. * * @param {object} vpnSiteParameters Parameters supplied to update VpnSite @@ -1884,7 +1856,7 @@ class VpnSites { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateTags(resourceGroupName, vpnSiteName, vpnSiteParameters, options, optionalCallback) { + updateTags(vpnSiteName, vpnSiteParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1893,22 +1865,20 @@ class VpnSites { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateTags(resourceGroupName, vpnSiteName, vpnSiteParameters, options, (err, result, request, response) => { + self._updateTags(vpnSiteName, vpnSiteParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateTags(resourceGroupName, vpnSiteName, vpnSiteParameters, options, optionalCallback); + return self._updateTags(vpnSiteName, vpnSiteParameters, options, optionalCallback); } } /** * Deletes a VpnSite. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being deleted. * * @param {object} [options] Optional Parameters. @@ -1922,11 +1892,11 @@ class VpnSites { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, vpnSiteName, options) { + deleteMethodWithHttpOperationResponse(vpnSiteName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, vpnSiteName, options, (err, result, request, response) => { + self._deleteMethod(vpnSiteName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1939,8 +1909,6 @@ class VpnSites { /** * Deletes a VpnSite. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being deleted. * * @param {object} [options] Optional Parameters. @@ -1969,7 +1937,7 @@ class VpnSites { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, vpnSiteName, options, optionalCallback) { + deleteMethod(vpnSiteName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1978,22 +1946,20 @@ class VpnSites { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, vpnSiteName, options, (err, result, request, response) => { + self._deleteMethod(vpnSiteName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, vpnSiteName, options, optionalCallback); + return self._deleteMethod(vpnSiteName, options, optionalCallback); } } /** * Lists all the vpnSites in a resource group. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2005,11 +1971,11 @@ class VpnSites { * * @reject {Error} - The error object. */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + listByResourceGroupWithHttpOperationResponse(options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + self._listByResourceGroup(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2022,8 +1988,6 @@ class VpnSites { /** * Lists all the vpnSites in a resource group. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2051,7 +2015,7 @@ class VpnSites { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroup(resourceGroupName, options, optionalCallback) { + listByResourceGroup(options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2060,14 +2024,14 @@ class VpnSites { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + self._listByResourceGroup(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByResourceGroup(resourceGroupName, options, optionalCallback); + return self._listByResourceGroup(options, optionalCallback); } } @@ -2153,8 +2117,6 @@ class VpnSites { * Creates a VpnSite resource if it doesn't exist else updates the existing * VpnSite. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being created or * updated. * @@ -2222,11 +2184,11 @@ class VpnSites { * * @reject {Error} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, vpnSiteName, vpnSiteParameters, options) { + beginCreateOrUpdateWithHttpOperationResponse(vpnSiteName, vpnSiteParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, vpnSiteName, vpnSiteParameters, options, (err, result, request, response) => { + self._beginCreateOrUpdate(vpnSiteName, vpnSiteParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2240,8 +2202,6 @@ class VpnSites { * Creates a VpnSite resource if it doesn't exist else updates the existing * VpnSite. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being created or * updated. * @@ -2325,7 +2285,7 @@ class VpnSites { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName, vpnSiteName, vpnSiteParameters, options, optionalCallback) { + beginCreateOrUpdate(vpnSiteName, vpnSiteParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2334,22 +2294,20 @@ class VpnSites { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(resourceGroupName, vpnSiteName, vpnSiteParameters, options, (err, result, request, response) => { + self._beginCreateOrUpdate(vpnSiteName, vpnSiteParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginCreateOrUpdate(resourceGroupName, vpnSiteName, vpnSiteParameters, options, optionalCallback); + return self._beginCreateOrUpdate(vpnSiteName, vpnSiteParameters, options, optionalCallback); } } /** * Updates VpnSite tags. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being updated. * * @param {object} vpnSiteParameters Parameters supplied to update VpnSite @@ -2368,11 +2326,11 @@ class VpnSites { * * @reject {Error} - The error object. */ - beginUpdateTagsWithHttpOperationResponse(resourceGroupName, vpnSiteName, vpnSiteParameters, options) { + beginUpdateTagsWithHttpOperationResponse(vpnSiteName, vpnSiteParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginUpdateTags(resourceGroupName, vpnSiteName, vpnSiteParameters, options, (err, result, request, response) => { + self._beginUpdateTags(vpnSiteName, vpnSiteParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2385,8 +2343,6 @@ class VpnSites { /** * Updates VpnSite tags. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being updated. * * @param {object} vpnSiteParameters Parameters supplied to update VpnSite @@ -2421,7 +2377,7 @@ class VpnSites { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdateTags(resourceGroupName, vpnSiteName, vpnSiteParameters, options, optionalCallback) { + beginUpdateTags(vpnSiteName, vpnSiteParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2430,22 +2386,20 @@ class VpnSites { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginUpdateTags(resourceGroupName, vpnSiteName, vpnSiteParameters, options, (err, result, request, response) => { + self._beginUpdateTags(vpnSiteName, vpnSiteParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginUpdateTags(resourceGroupName, vpnSiteName, vpnSiteParameters, options, optionalCallback); + return self._beginUpdateTags(vpnSiteName, vpnSiteParameters, options, optionalCallback); } } /** * Deletes a VpnSite. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being deleted. * * @param {object} [options] Optional Parameters. @@ -2459,11 +2413,11 @@ class VpnSites { * * @reject {Error} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName, vpnSiteName, options) { + beginDeleteMethodWithHttpOperationResponse(vpnSiteName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginDeleteMethod(resourceGroupName, vpnSiteName, options, (err, result, request, response) => { + self._beginDeleteMethod(vpnSiteName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2476,8 +2430,6 @@ class VpnSites { /** * Deletes a VpnSite. * - * @param {string} resourceGroupName The resource group name of the VpnSite. - * * @param {string} vpnSiteName The name of the VpnSite being deleted. * * @param {object} [options] Optional Parameters. @@ -2506,7 +2458,7 @@ class VpnSites { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName, vpnSiteName, options, optionalCallback) { + beginDeleteMethod(vpnSiteName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2515,14 +2467,14 @@ class VpnSites { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginDeleteMethod(resourceGroupName, vpnSiteName, options, (err, result, request, response) => { + self._beginDeleteMethod(vpnSiteName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginDeleteMethod(resourceGroupName, vpnSiteName, options, optionalCallback); + return self._beginDeleteMethod(vpnSiteName, options, optionalCallback); } } diff --git a/lib/services/networkManagement2/lib/operations/vpnSitesConfiguration.js b/lib/services/networkManagement2/lib/operations/vpnSitesConfiguration.js index 3cc77537fb..d52a7616c5 100644 --- a/lib/services/networkManagement2/lib/operations/vpnSitesConfiguration.js +++ b/lib/services/networkManagement2/lib/operations/vpnSitesConfiguration.js @@ -19,8 +19,6 @@ const WebResource = msRest.WebResource; * Gives the sas-url to download the configurations for vpn-sites in a resource * group. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} virtualWANName The name of the VirtualWAN for which * configuration of all vpn-sites is needed. * @@ -50,7 +48,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _download(resourceGroupName, virtualWANName, request, options, callback) { +function _download(virtualWANName, request, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -63,7 +61,7 @@ function _download(resourceGroupName, virtualWANName, request, options, callback } // Send request - this.beginDownload(resourceGroupName, virtualWANName, request, options, (err, parsedResult, httpRequest, response) => { + this.beginDownload(virtualWANName, request, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -92,8 +90,6 @@ function _download(resourceGroupName, virtualWANName, request, options, callback * Gives the sas-url to download the configurations for vpn-sites in a resource * group. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} virtualWANName The name of the VirtualWAN for which * configuration of all vpn-sites is needed. * @@ -123,7 +119,7 @@ function _download(resourceGroupName, virtualWANName, request, options, callback * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginDownload(resourceGroupName, virtualWANName, request, options, callback) { +function _beginDownload(virtualWANName, request, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -139,8 +135,8 @@ function _beginDownload(resourceGroupName, virtualWANName, request, options, cal 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 (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } if (virtualWANName === null || virtualWANName === undefined || typeof virtualWANName.valueOf() !== 'string') { throw new Error('virtualWANName cannot be null or undefined and it must be of type string.'); @@ -159,7 +155,7 @@ function _beginDownload(resourceGroupName, virtualWANName, request, options, cal let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnConfiguration'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{virtualWANName}', encodeURIComponent(virtualWANName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -258,8 +254,6 @@ class VpnSitesConfiguration { * Gives the sas-url to download the configurations for vpn-sites in a resource * group. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} virtualWANName The name of the VirtualWAN for which * configuration of all vpn-sites is needed. * @@ -283,11 +277,11 @@ class VpnSitesConfiguration { * * @reject {Error} - The error object. */ - downloadWithHttpOperationResponse(resourceGroupName, virtualWANName, request, options) { + downloadWithHttpOperationResponse(virtualWANName, request, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._download(resourceGroupName, virtualWANName, request, options, (err, result, request, response) => { + self._download(virtualWANName, request, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -301,8 +295,6 @@ class VpnSitesConfiguration { * Gives the sas-url to download the configurations for vpn-sites in a resource * group. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} virtualWANName The name of the VirtualWAN for which * configuration of all vpn-sites is needed. * @@ -341,7 +333,7 @@ class VpnSitesConfiguration { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - download(resourceGroupName, virtualWANName, request, options, optionalCallback) { + download(virtualWANName, request, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -350,14 +342,14 @@ class VpnSitesConfiguration { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._download(resourceGroupName, virtualWANName, request, options, (err, result, request, response) => { + self._download(virtualWANName, request, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._download(resourceGroupName, virtualWANName, request, options, optionalCallback); + return self._download(virtualWANName, request, options, optionalCallback); } } @@ -365,8 +357,6 @@ class VpnSitesConfiguration { * Gives the sas-url to download the configurations for vpn-sites in a resource * group. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} virtualWANName The name of the VirtualWAN for which * configuration of all vpn-sites is needed. * @@ -390,11 +380,11 @@ class VpnSitesConfiguration { * * @reject {Error} - The error object. */ - beginDownloadWithHttpOperationResponse(resourceGroupName, virtualWANName, request, options) { + beginDownloadWithHttpOperationResponse(virtualWANName, request, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginDownload(resourceGroupName, virtualWANName, request, options, (err, result, request, response) => { + self._beginDownload(virtualWANName, request, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -408,8 +398,6 @@ class VpnSitesConfiguration { * Gives the sas-url to download the configurations for vpn-sites in a resource * group. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} virtualWANName The name of the VirtualWAN for which * configuration of all vpn-sites is needed. * @@ -448,7 +436,7 @@ class VpnSitesConfiguration { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginDownload(resourceGroupName, virtualWANName, request, options, optionalCallback) { + beginDownload(virtualWANName, request, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -457,14 +445,14 @@ class VpnSitesConfiguration { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginDownload(resourceGroupName, virtualWANName, request, options, (err, result, request, response) => { + self._beginDownload(virtualWANName, request, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginDownload(resourceGroupName, virtualWANName, request, options, optionalCallback); + return self._beginDownload(virtualWANName, request, options, optionalCallback); } }