import { PagedAsyncIterableIterator } from "@azure/core-paging" ; import { VirtualNetworkGateways } from "../operationsInterfaces" ; import * as coreClient from "@azure/core-client" ; import * as Mappers from "../models/mappers" ; import * as Parameters from "../models/parameters" ; import { NetworkManagementClient } from "../networkManagementClient" ; import { PollerLike , PollOperationState , LroEngine } from "@azure/core-lro" ; import { LroImpl } from "../lroImpl" ; import { VirtualNetworkGateway , VirtualNetworkGatewaysListNextOptionalParams , VirtualNetworkGatewaysListOptionalParams , VirtualNetworkGatewayConnectionListEntity , VirtualNetworkGatewaysListConnectionsNextOptionalParams , VirtualNetworkGatewaysListConnectionsOptionalParams , VirtualNetworkGatewaysCreateOrUpdateOptionalParams , VirtualNetworkGatewaysCreateOrUpdateResponse , VirtualNetworkGatewaysGetOptionalParams , VirtualNetworkGatewaysGetResponse , VirtualNetworkGatewaysDeleteOptionalParams , TagsObject , VirtualNetworkGatewaysUpdateTagsOptionalParams , VirtualNetworkGatewaysUpdateTagsResponse , VirtualNetworkGatewaysListResponse , VirtualNetworkGatewaysListConnectionsResponse , VirtualNetworkGatewaysResetOptionalParams , VirtualNetworkGatewaysResetResponse , VirtualNetworkGatewaysResetVpnClientSharedKeyOptionalParams , VpnClientParameters , VirtualNetworkGatewaysGeneratevpnclientpackageOptionalParams , VirtualNetworkGatewaysGeneratevpnclientpackageResponse , VirtualNetworkGatewaysGenerateVpnProfileOptionalParams , VirtualNetworkGatewaysGenerateVpnProfileResponse , VirtualNetworkGatewaysGetVpnProfilePackageUrlOptionalParams , VirtualNetworkGatewaysGetVpnProfilePackageUrlResponse , VirtualNetworkGatewaysGetBgpPeerStatusOptionalParams , VirtualNetworkGatewaysGetBgpPeerStatusResponse , VirtualNetworkGatewaysSupportedVpnDevicesOptionalParams , VirtualNetworkGatewaysSupportedVpnDevicesResponse , VirtualNetworkGatewaysGetLearnedRoutesOptionalParams , VirtualNetworkGatewaysGetLearnedRoutesResponse , VirtualNetworkGatewaysGetAdvertisedRoutesOptionalParams , VirtualNetworkGatewaysGetAdvertisedRoutesResponse , VpnClientIPsecParameters , VirtualNetworkGatewaysSetVpnclientIpsecParametersOptionalParams , VirtualNetworkGatewaysSetVpnclientIpsecParametersResponse , VirtualNetworkGatewaysGetVpnclientIpsecParametersOptionalParams , VirtualNetworkGatewaysGetVpnclientIpsecParametersResponse , VpnDeviceScriptParameters , VirtualNetworkGatewaysVpnDeviceConfigurationScriptOptionalParams , VirtualNetworkGatewaysVpnDeviceConfigurationScriptResponse , VirtualNetworkGatewaysStartPacketCaptureOptionalParams , VirtualNetworkGatewaysStartPacketCaptureResponse , VpnPacketCaptureStopParameters , VirtualNetworkGatewaysStopPacketCaptureOptionalParams , VirtualNetworkGatewaysStopPacketCaptureResponse , VirtualNetworkGatewaysGetVpnclientConnectionHealthOptionalParams , VirtualNetworkGatewaysGetVpnclientConnectionHealthResponse , P2SVpnConnectionRequest , VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsOptionalParams , VirtualNetworkGatewaysListNextResponse , VirtualNetworkGatewaysListConnectionsNextResponse } from "../models" ; /** Class containing VirtualNetworkGateways operations. */ export class VirtualNetworkGatewaysImpl implements VirtualNetworkGateways { private readonly client : NetworkManagementClient ; param client constructor ( client ) { this . client = client ; } param resourceGroupName param options public list ( resourceGroupName , options ? ) { const iter = this . listPagingAll ( resourceGroupName , options ) ; return { next ( ) { return iter . next ( ) ; } , [ Symbol . asyncIterator ] ( ) { return this ; } , byPage : ( ) => { return this . listPagingPage ( resourceGroupName , options ) ; } } ; } private async * listPagingPage ( resourceGroupName , options ? ) { let result = await this . _list ( resourceGroupName , options ) ; yield result . value || [ ] ; let continuationToken = result . nextLink ; while ( continuationToken ) { result = await this . _listNext ( resourceGroupName , continuationToken , options ) ; continuationToken = result . nextLink ; yield result . value || [ ] ; } } private async * listPagingAll ( resourceGroupName , options ? ) { for await ( const page of this . listPagingPage ( resourceGroupName , options ) ) { yield * page ; } } param resourceGroupName param virtualNetworkGatewayName param options public listConnections ( resourceGroupName , virtualNetworkGatewayName , options ? ) { const iter = this . listConnectionsPagingAll ( resourceGroupName , virtualNetworkGatewayName , options ) ; return { next ( ) { return iter . next ( ) ; } , [ Symbol . asyncIterator ] ( ) { return this ; } , byPage : ( ) => { return this . listConnectionsPagingPage ( resourceGroupName , virtualNetworkGatewayName , options ) ; } } ; } private async * listConnectionsPagingPage ( resourceGroupName , virtualNetworkGatewayName , options ? ) { let result = await this . _listConnections ( resourceGroupName , virtualNetworkGatewayName , options ) ; yield result . value || [ ] ; let continuationToken = result . nextLink ; while ( continuationToken ) { result = await this . _listConnectionsNext ( resourceGroupName , virtualNetworkGatewayName , continuationToken , options ) ; continuationToken = result . nextLink ; yield result . value || [ ] ; } } private async * listConnectionsPagingAll ( resourceGroupName , virtualNetworkGatewayName , options ? ) { for await ( const page of this . listConnectionsPagingPage ( resourceGroupName , virtualNetworkGatewayName , options ) ) { yield * page ; } } param resourceGroupName param virtualNetworkGatewayName param parameters param options async beginCreateOrUpdate ( resourceGroupName , virtualNetworkGatewayName , parameters , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualNetworkGatewaysCreateOrUpdateResponse > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , virtualNetworkGatewayName , parameters , options } , createOrUpdateOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "azure-async-operation" } ) ; } param resourceGroupName param virtualNetworkGatewayName param parameters param options async beginCreateOrUpdateAndWait ( resourceGroupName , virtualNetworkGatewayName , parameters , options ? ) { const poller = await this . beginCreateOrUpdate ( resourceGroupName , virtualNetworkGatewayName , parameters , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayName param options get ( resourceGroupName , virtualNetworkGatewayName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , virtualNetworkGatewayName , options } , getOperationSpec ) ; } param resourceGroupName param virtualNetworkGatewayName param options async beginDelete ( resourceGroupName , virtualNetworkGatewayName , options ? ) { const directSendOperation = async ( args , spec ) : Promise < void > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , virtualNetworkGatewayName , options } , deleteOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param virtualNetworkGatewayName param options async beginDeleteAndWait ( resourceGroupName , virtualNetworkGatewayName , options ? ) { const poller = await this . beginDelete ( resourceGroupName , virtualNetworkGatewayName , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayName param parameters param options async beginUpdateTags ( resourceGroupName , virtualNetworkGatewayName , parameters , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualNetworkGatewaysUpdateTagsResponse > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , virtualNetworkGatewayName , parameters , options } , updateTagsOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "azure-async-operation" } ) ; } param resourceGroupName param virtualNetworkGatewayName param parameters param options async beginUpdateTagsAndWait ( resourceGroupName , virtualNetworkGatewayName , parameters , options ? ) { const poller = await this . beginUpdateTags ( resourceGroupName , virtualNetworkGatewayName , parameters , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param options private _list ( resourceGroupName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , options } , listOperationSpec ) ; } param resourceGroupName param virtualNetworkGatewayName param options private _listConnections ( resourceGroupName , virtualNetworkGatewayName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , virtualNetworkGatewayName , options } , listConnectionsOperationSpec ) ; } param resourceGroupName param virtualNetworkGatewayName param options async beginReset ( resourceGroupName , virtualNetworkGatewayName , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualNetworkGatewaysResetResponse > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , virtualNetworkGatewayName , options } , resetOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param virtualNetworkGatewayName param options async beginResetAndWait ( resourceGroupName , virtualNetworkGatewayName , options ? ) { const poller = await this . beginReset ( resourceGroupName , virtualNetworkGatewayName , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayName param options async beginResetVpnClientSharedKey ( resourceGroupName , virtualNetworkGatewayName , options ? ) { const directSendOperation = async ( args , spec ) : Promise < void > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , virtualNetworkGatewayName , options } , resetVpnClientSharedKeyOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param virtualNetworkGatewayName param options async beginResetVpnClientSharedKeyAndWait ( resourceGroupName , virtualNetworkGatewayName , options ? ) { const poller = await this . beginResetVpnClientSharedKey ( resourceGroupName , virtualNetworkGatewayName , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayName param parameters param options async beginGeneratevpnclientpackage ( resourceGroupName , virtualNetworkGatewayName , parameters , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualNetworkGatewaysGeneratevpnclientpackageResponse > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , virtualNetworkGatewayName , parameters , options } , generatevpnclientpackageOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param virtualNetworkGatewayName param parameters param options async beginGeneratevpnclientpackageAndWait ( resourceGroupName , virtualNetworkGatewayName , parameters , options ? ) { const poller = await this . beginGeneratevpnclientpackage ( resourceGroupName , virtualNetworkGatewayName , parameters , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayName param parameters param options async beginGenerateVpnProfile ( resourceGroupName , virtualNetworkGatewayName , parameters , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualNetworkGatewaysGenerateVpnProfileResponse > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , virtualNetworkGatewayName , parameters , options } , generateVpnProfileOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param virtualNetworkGatewayName param parameters param options async beginGenerateVpnProfileAndWait ( resourceGroupName , virtualNetworkGatewayName , parameters , options ? ) { const poller = await this . beginGenerateVpnProfile ( resourceGroupName , virtualNetworkGatewayName , parameters , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayName param options async beginGetVpnProfilePackageUrl ( resourceGroupName , virtualNetworkGatewayName , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualNetworkGatewaysGetVpnProfilePackageUrlResponse > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , virtualNetworkGatewayName , options } , getVpnProfilePackageUrlOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param virtualNetworkGatewayName param options async beginGetVpnProfilePackageUrlAndWait ( resourceGroupName , virtualNetworkGatewayName , options ? ) { const poller = await this . beginGetVpnProfilePackageUrl ( resourceGroupName , virtualNetworkGatewayName , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayName param options async beginGetBgpPeerStatus ( resourceGroupName , virtualNetworkGatewayName , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualNetworkGatewaysGetBgpPeerStatusResponse > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , virtualNetworkGatewayName , options } , getBgpPeerStatusOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param virtualNetworkGatewayName param options async beginGetBgpPeerStatusAndWait ( resourceGroupName , virtualNetworkGatewayName , options ? ) { const poller = await this . beginGetBgpPeerStatus ( resourceGroupName , virtualNetworkGatewayName , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayName param options supportedVpnDevices ( resourceGroupName , virtualNetworkGatewayName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , virtualNetworkGatewayName , options } , supportedVpnDevicesOperationSpec ) ; } param resourceGroupName param virtualNetworkGatewayName param options async beginGetLearnedRoutes ( resourceGroupName , virtualNetworkGatewayName , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualNetworkGatewaysGetLearnedRoutesResponse > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , virtualNetworkGatewayName , options } , getLearnedRoutesOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param virtualNetworkGatewayName param options async beginGetLearnedRoutesAndWait ( resourceGroupName , virtualNetworkGatewayName , options ? ) { const poller = await this . beginGetLearnedRoutes ( resourceGroupName , virtualNetworkGatewayName , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayName param peer param options async beginGetAdvertisedRoutes ( resourceGroupName , virtualNetworkGatewayName , peer , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualNetworkGatewaysGetAdvertisedRoutesResponse > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , virtualNetworkGatewayName , peer , options } , getAdvertisedRoutesOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param virtualNetworkGatewayName param peer param options async beginGetAdvertisedRoutesAndWait ( resourceGroupName , virtualNetworkGatewayName , peer , options ? ) { const poller = await this . beginGetAdvertisedRoutes ( resourceGroupName , virtualNetworkGatewayName , peer , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayName param vpnclientIpsecParams param options async beginSetVpnclientIpsecParameters ( resourceGroupName , virtualNetworkGatewayName , vpnclientIpsecParams , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualNetworkGatewaysSetVpnclientIpsecParametersResponse > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , virtualNetworkGatewayName , vpnclientIpsecParams , options } , setVpnclientIpsecParametersOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param virtualNetworkGatewayName param vpnclientIpsecParams param options async beginSetVpnclientIpsecParametersAndWait ( resourceGroupName , virtualNetworkGatewayName , vpnclientIpsecParams , options ? ) { const poller = await this . beginSetVpnclientIpsecParameters ( resourceGroupName , virtualNetworkGatewayName , vpnclientIpsecParams , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayName param options async beginGetVpnclientIpsecParameters ( resourceGroupName , virtualNetworkGatewayName , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualNetworkGatewaysGetVpnclientIpsecParametersResponse > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , virtualNetworkGatewayName , options } , getVpnclientIpsecParametersOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param virtualNetworkGatewayName param options async beginGetVpnclientIpsecParametersAndWait ( resourceGroupName , virtualNetworkGatewayName , options ? ) { const poller = await this . beginGetVpnclientIpsecParameters ( resourceGroupName , virtualNetworkGatewayName , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayConnectionName param parameters param options vpnDeviceConfigurationScript ( resourceGroupName , virtualNetworkGatewayConnectionName , parameters , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , virtualNetworkGatewayConnectionName , parameters , options } , vpnDeviceConfigurationScriptOperationSpec ) ; } param resourceGroupName param virtualNetworkGatewayName param options async beginStartPacketCapture ( resourceGroupName , virtualNetworkGatewayName , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualNetworkGatewaysStartPacketCaptureResponse > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , virtualNetworkGatewayName , options } , startPacketCaptureOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param virtualNetworkGatewayName param options async beginStartPacketCaptureAndWait ( resourceGroupName , virtualNetworkGatewayName , options ? ) { const poller = await this . beginStartPacketCapture ( resourceGroupName , virtualNetworkGatewayName , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayName param parameters param options async beginStopPacketCapture ( resourceGroupName , virtualNetworkGatewayName , parameters , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualNetworkGatewaysStopPacketCaptureResponse > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , virtualNetworkGatewayName , parameters , options } , stopPacketCaptureOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param virtualNetworkGatewayName param parameters param options async beginStopPacketCaptureAndWait ( resourceGroupName , virtualNetworkGatewayName , parameters , options ? ) { const poller = await this . beginStopPacketCapture ( resourceGroupName , virtualNetworkGatewayName , parameters , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayName param options async beginGetVpnclientConnectionHealth ( resourceGroupName , virtualNetworkGatewayName , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualNetworkGatewaysGetVpnclientConnectionHealthResponse > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , virtualNetworkGatewayName , options } , getVpnclientConnectionHealthOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param virtualNetworkGatewayName param options async beginGetVpnclientConnectionHealthAndWait ( resourceGroupName , virtualNetworkGatewayName , options ? ) { const poller = await this . beginGetVpnclientConnectionHealth ( resourceGroupName , virtualNetworkGatewayName , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayName param request param options async beginDisconnectVirtualNetworkGatewayVpnConnections ( resourceGroupName , virtualNetworkGatewayName , request , options ? ) { const directSendOperation = async ( args , spec ) : Promise < void > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , virtualNetworkGatewayName , request , options } , disconnectVirtualNetworkGatewayVpnConnectionsOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param virtualNetworkGatewayName param request param options async beginDisconnectVirtualNetworkGatewayVpnConnectionsAndWait ( resourceGroupName , virtualNetworkGatewayName , request , options ? ) { const poller = await this . beginDisconnectVirtualNetworkGatewayVpnConnections ( resourceGroupName , virtualNetworkGatewayName , request , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param nextLink param options private _listNext ( resourceGroupName , nextLink , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , nextLink , options } , listNextOperationSpec ) ; } param resourceGroupName param virtualNetworkGatewayName param nextLink param options private _listConnectionsNext ( resourceGroupName , virtualNetworkGatewayName , nextLink , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , virtualNetworkGatewayName , nextLink , options } , listConnectionsNextOperationSpec ) ; } } const serializer = coreClient . createSerializer ( Mappers , false ) ; const createOrUpdateOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}" , httpMethod : "PUT" , responses : { 200 : { bodyMapper : Mappers . VirtualNetworkGateway } , 201 : { bodyMapper : Mappers . VirtualNetworkGateway } , 202 : { bodyMapper : Mappers . VirtualNetworkGateway } , 204 : { bodyMapper : Mappers . VirtualNetworkGateway } , default : { bodyMapper : Mappers . CloudError } } , requestBody : Parameters . parameters58 , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayName ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const getOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . VirtualNetworkGateway } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayName ] , headerParameters : [ Parameters . accept ] , serializer } ; const deleteOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}" , httpMethod : "DELETE" , responses : { 200 : { } , 201 : { } , 202 : { } , 204 : { } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayName ] , headerParameters : [ Parameters . accept ] , serializer } ; const updateTagsOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}" , httpMethod : "PATCH" , responses : { 200 : { bodyMapper : Mappers . VirtualNetworkGateway } , 201 : { bodyMapper : Mappers . VirtualNetworkGateway } , 202 : { bodyMapper : Mappers . VirtualNetworkGateway } , 204 : { bodyMapper : Mappers . VirtualNetworkGateway } , default : { bodyMapper : Mappers . CloudError } } , requestBody : Parameters . parameters1 , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayName ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const listOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . VirtualNetworkGatewayListResult } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId ] , headerParameters : [ Parameters . accept ] , serializer } ; const listConnectionsOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/connections" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . VirtualNetworkGatewayListConnectionsResult } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayName ] , headerParameters : [ Parameters . accept ] , serializer } ; const resetOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset" , httpMethod : "POST" , responses : { 200 : { bodyMapper : Mappers . VirtualNetworkGateway } , 201 : { bodyMapper : Mappers . VirtualNetworkGateway } , 202 : { bodyMapper : Mappers . VirtualNetworkGateway } , 204 : { bodyMapper : Mappers . VirtualNetworkGateway } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion , Parameters . gatewayVip ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayName ] , headerParameters : [ Parameters . accept ] , serializer } ; const resetVpnClientSharedKeyOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey" , httpMethod : "POST" , responses : { 200 : { } , 201 : { } , 202 : { } , 204 : { } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayName ] , headerParameters : [ Parameters . accept ] , serializer } ; const generatevpnclientpackageOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage" , httpMethod : "POST" , responses : { 200 : { bodyMapper : { type : { name : "String" } } } , 201 : { bodyMapper : { type : { name : "String" } } } , 202 : { bodyMapper : { type : { name : "String" } } } , 204 : { bodyMapper : { type : { name : "String" } } } , default : { bodyMapper : Mappers . CloudError } } , requestBody : Parameters . parameters59 , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayName ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const generateVpnProfileOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile" , httpMethod : "POST" , responses : { 200 : { bodyMapper : { type : { name : "String" } } } , 201 : { bodyMapper : { type : { name : "String" } } } , 202 : { bodyMapper : { type : { name : "String" } } } , 204 : { bodyMapper : { type : { name : "String" } } } , default : { bodyMapper : Mappers . CloudError } } , requestBody : Parameters . parameters59 , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayName ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const getVpnProfilePackageUrlOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl" , httpMethod : "POST" , responses : { 200 : { bodyMapper : { type : { name : "String" } } } , 201 : { bodyMapper : { type : { name : "String" } } } , 202 : { bodyMapper : { type : { name : "String" } } } , 204 : { bodyMapper : { type : { name : "String" } } } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayName ] , headerParameters : [ Parameters . accept ] , serializer } ; const getBgpPeerStatusOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus" , httpMethod : "POST" , responses : { 200 : { bodyMapper : Mappers . BgpPeerStatusListResult } , 201 : { bodyMapper : Mappers . BgpPeerStatusListResult } , 202 : { bodyMapper : Mappers . BgpPeerStatusListResult } , 204 : { bodyMapper : Mappers . BgpPeerStatusListResult } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion , Parameters . peer ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayName ] , headerParameters : [ Parameters . accept ] , serializer } ; const supportedVpnDevicesOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/supportedvpndevices" , httpMethod : "POST" , responses : { 200 : { bodyMapper : { type : { name : "String" } } } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayName ] , headerParameters : [ Parameters . accept ] , serializer } ; const getLearnedRoutesOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes" , httpMethod : "POST" , responses : { 200 : { bodyMapper : Mappers . GatewayRouteListResult } , 201 : { bodyMapper : Mappers . GatewayRouteListResult } , 202 : { bodyMapper : Mappers . GatewayRouteListResult } , 204 : { bodyMapper : Mappers . GatewayRouteListResult } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayName ] , headerParameters : [ Parameters . accept ] , serializer } ; const getAdvertisedRoutesOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes" , httpMethod : "POST" , responses : { 200 : { bodyMapper : Mappers . GatewayRouteListResult } , 201 : { bodyMapper : Mappers . GatewayRouteListResult } , 202 : { bodyMapper : Mappers . GatewayRouteListResult } , 204 : { bodyMapper : Mappers . GatewayRouteListResult } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion , Parameters . peer1 ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayName ] , headerParameters : [ Parameters . accept ] , serializer } ; const setVpnclientIpsecParametersOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters" , httpMethod : "POST" , responses : { 200 : { bodyMapper : Mappers . VpnClientIPsecParameters } , 201 : { bodyMapper : Mappers . VpnClientIPsecParameters } , 202 : { bodyMapper : Mappers . VpnClientIPsecParameters } , 204 : { bodyMapper : Mappers . VpnClientIPsecParameters } , default : { bodyMapper : Mappers . CloudError } } , requestBody : Parameters . vpnclientIpsecParams , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayName ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const getVpnclientIpsecParametersOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters" , httpMethod : "POST" , responses : { 200 : { bodyMapper : Mappers . VpnClientIPsecParameters } , 201 : { bodyMapper : Mappers . VpnClientIPsecParameters } , 202 : { bodyMapper : Mappers . VpnClientIPsecParameters } , 204 : { bodyMapper : Mappers . VpnClientIPsecParameters } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayName ] , headerParameters : [ Parameters . accept ] , serializer } ; const vpnDeviceConfigurationScriptOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript" , httpMethod : "POST" , responses : { 200 : { bodyMapper : { type : { name : "String" } } } , default : { bodyMapper : Mappers . CloudError } } , requestBody : Parameters . parameters60 , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayConnectionName ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const startPacketCaptureOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startPacketCapture" , httpMethod : "POST" , responses : { 200 : { bodyMapper : { type : { name : "String" } } } , 201 : { bodyMapper : { type : { name : "String" } } } , 202 : { bodyMapper : { type : { name : "String" } } } , 204 : { bodyMapper : { type : { name : "String" } } } , default : { bodyMapper : Mappers . ErrorModel } } , requestBody : Parameters . parameters61 , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayName ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const stopPacketCaptureOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopPacketCapture" , httpMethod : "POST" , responses : { 200 : { bodyMapper : { type : { name : "String" } } } , 201 : { bodyMapper : { type : { name : "String" } } } , 202 : { bodyMapper : { type : { name : "String" } } } , 204 : { bodyMapper : { type : { name : "String" } } } , default : { bodyMapper : Mappers . ErrorModel } } , requestBody : Parameters . parameters62 , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayName ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const getVpnclientConnectionHealthOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth" , httpMethod : "POST" , responses : { 200 : { bodyMapper : Mappers . VpnClientConnectionHealthDetailListResult } , 201 : { bodyMapper : Mappers . VpnClientConnectionHealthDetailListResult } , 202 : { bodyMapper : Mappers . VpnClientConnectionHealthDetailListResult } , 204 : { bodyMapper : Mappers . VpnClientConnectionHealthDetailListResult } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayName ] , headerParameters : [ Parameters . accept ] , serializer } ; const disconnectVirtualNetworkGatewayVpnConnectionsOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/disconnectVirtualNetworkGatewayVpnConnections" , httpMethod : "POST" , responses : { 200 : { } , 201 : { } , 202 : { } , 204 : { } , default : { bodyMapper : Mappers . CloudError } } , requestBody : Parameters . request1 , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayName ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const listNextOperationSpec = { path : "{nextLink}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . VirtualNetworkGatewayListResult } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . nextLink ] , headerParameters : [ Parameters . accept ] , serializer } ; const listConnectionsNextOperationSpec = { path : "{nextLink}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . VirtualNetworkGatewayListConnectionsResult } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . nextLink , Parameters . virtualNetworkGatewayName ] , headerParameters : [ Parameters . accept ] , serializer } ;