import { PagedAsyncIterableIterator } from "@azure/core-paging" ; import { VirtualNetworkGatewayConnections } 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 { VirtualNetworkGatewayConnection , VirtualNetworkGatewayConnectionsListNextOptionalParams , VirtualNetworkGatewayConnectionsListOptionalParams , VirtualNetworkGatewayConnectionsCreateOrUpdateOptionalParams , VirtualNetworkGatewayConnectionsCreateOrUpdateResponse , VirtualNetworkGatewayConnectionsGetOptionalParams , VirtualNetworkGatewayConnectionsGetResponse , VirtualNetworkGatewayConnectionsDeleteOptionalParams , TagsObject , VirtualNetworkGatewayConnectionsUpdateTagsOptionalParams , VirtualNetworkGatewayConnectionsUpdateTagsResponse , ConnectionSharedKey , VirtualNetworkGatewayConnectionsSetSharedKeyOptionalParams , VirtualNetworkGatewayConnectionsSetSharedKeyResponse , VirtualNetworkGatewayConnectionsGetSharedKeyOptionalParams , VirtualNetworkGatewayConnectionsGetSharedKeyResponse , VirtualNetworkGatewayConnectionsListResponse , ConnectionResetSharedKey , VirtualNetworkGatewayConnectionsResetSharedKeyOptionalParams , VirtualNetworkGatewayConnectionsResetSharedKeyResponse , VirtualNetworkGatewayConnectionsStartPacketCaptureOptionalParams , VirtualNetworkGatewayConnectionsStartPacketCaptureResponse , VpnPacketCaptureStopParameters , VirtualNetworkGatewayConnectionsStopPacketCaptureOptionalParams , VirtualNetworkGatewayConnectionsStopPacketCaptureResponse , VirtualNetworkGatewayConnectionsGetIkeSasOptionalParams , VirtualNetworkGatewayConnectionsGetIkeSasResponse , VirtualNetworkGatewayConnectionsResetConnectionOptionalParams , VirtualNetworkGatewayConnectionsListNextResponse } from "../models" ; /** Class containing VirtualNetworkGatewayConnections operations. */ export class VirtualNetworkGatewayConnectionsImpl implements VirtualNetworkGatewayConnections { 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 virtualNetworkGatewayConnectionName param parameters param options async beginCreateOrUpdate ( resourceGroupName , virtualNetworkGatewayConnectionName , parameters , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualNetworkGatewayConnectionsCreateOrUpdateResponse > => { 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 , virtualNetworkGatewayConnectionName , parameters , options } , createOrUpdateOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "azure-async-operation" } ) ; } param resourceGroupName param virtualNetworkGatewayConnectionName param parameters param options async beginCreateOrUpdateAndWait ( resourceGroupName , virtualNetworkGatewayConnectionName , parameters , options ? ) { const poller = await this . beginCreateOrUpdate ( resourceGroupName , virtualNetworkGatewayConnectionName , parameters , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayConnectionName param options get ( resourceGroupName , virtualNetworkGatewayConnectionName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , virtualNetworkGatewayConnectionName , options } , getOperationSpec ) ; } param resourceGroupName param virtualNetworkGatewayConnectionName param options async beginDelete ( resourceGroupName , virtualNetworkGatewayConnectionName , 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 , virtualNetworkGatewayConnectionName , options } , deleteOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param virtualNetworkGatewayConnectionName param options async beginDeleteAndWait ( resourceGroupName , virtualNetworkGatewayConnectionName , options ? ) { const poller = await this . beginDelete ( resourceGroupName , virtualNetworkGatewayConnectionName , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayConnectionName param parameters param options async beginUpdateTags ( resourceGroupName , virtualNetworkGatewayConnectionName , parameters , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualNetworkGatewayConnectionsUpdateTagsResponse > => { 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 , virtualNetworkGatewayConnectionName , parameters , options } , updateTagsOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "azure-async-operation" } ) ; } param resourceGroupName param virtualNetworkGatewayConnectionName param parameters param options async beginUpdateTagsAndWait ( resourceGroupName , virtualNetworkGatewayConnectionName , parameters , options ? ) { const poller = await this . beginUpdateTags ( resourceGroupName , virtualNetworkGatewayConnectionName , parameters , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayConnectionName param parameters param options async beginSetSharedKey ( resourceGroupName , virtualNetworkGatewayConnectionName , parameters , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualNetworkGatewayConnectionsSetSharedKeyResponse > => { 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 , virtualNetworkGatewayConnectionName , parameters , options } , setSharedKeyOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "azure-async-operation" } ) ; } param resourceGroupName param virtualNetworkGatewayConnectionName param parameters param options async beginSetSharedKeyAndWait ( resourceGroupName , virtualNetworkGatewayConnectionName , parameters , options ? ) { const poller = await this . beginSetSharedKey ( resourceGroupName , virtualNetworkGatewayConnectionName , parameters , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayConnectionName param options getSharedKey ( resourceGroupName , virtualNetworkGatewayConnectionName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , virtualNetworkGatewayConnectionName , options } , getSharedKeyOperationSpec ) ; } param resourceGroupName param options private _list ( resourceGroupName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , options } , listOperationSpec ) ; } param resourceGroupName param virtualNetworkGatewayConnectionName param parameters param options async beginResetSharedKey ( resourceGroupName , virtualNetworkGatewayConnectionName , parameters , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualNetworkGatewayConnectionsResetSharedKeyResponse > => { 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 , virtualNetworkGatewayConnectionName , parameters , options } , resetSharedKeyOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param virtualNetworkGatewayConnectionName param parameters param options async beginResetSharedKeyAndWait ( resourceGroupName , virtualNetworkGatewayConnectionName , parameters , options ? ) { const poller = await this . beginResetSharedKey ( resourceGroupName , virtualNetworkGatewayConnectionName , parameters , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayConnectionName param options async beginStartPacketCapture ( resourceGroupName , virtualNetworkGatewayConnectionName , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualNetworkGatewayConnectionsStartPacketCaptureResponse > => { 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 , virtualNetworkGatewayConnectionName , options } , startPacketCaptureOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param virtualNetworkGatewayConnectionName param options async beginStartPacketCaptureAndWait ( resourceGroupName , virtualNetworkGatewayConnectionName , options ? ) { const poller = await this . beginStartPacketCapture ( resourceGroupName , virtualNetworkGatewayConnectionName , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayConnectionName param parameters param options async beginStopPacketCapture ( resourceGroupName , virtualNetworkGatewayConnectionName , parameters , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualNetworkGatewayConnectionsStopPacketCaptureResponse > => { 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 , virtualNetworkGatewayConnectionName , parameters , options } , stopPacketCaptureOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param virtualNetworkGatewayConnectionName param parameters param options async beginStopPacketCaptureAndWait ( resourceGroupName , virtualNetworkGatewayConnectionName , parameters , options ? ) { const poller = await this . beginStopPacketCapture ( resourceGroupName , virtualNetworkGatewayConnectionName , parameters , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayConnectionName param options async beginGetIkeSas ( resourceGroupName , virtualNetworkGatewayConnectionName , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualNetworkGatewayConnectionsGetIkeSasResponse > => { 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 , virtualNetworkGatewayConnectionName , options } , getIkeSasOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param virtualNetworkGatewayConnectionName param options async beginGetIkeSasAndWait ( resourceGroupName , virtualNetworkGatewayConnectionName , options ? ) { const poller = await this . beginGetIkeSas ( resourceGroupName , virtualNetworkGatewayConnectionName , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualNetworkGatewayConnectionName param options async beginResetConnection ( resourceGroupName , virtualNetworkGatewayConnectionName , 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 , virtualNetworkGatewayConnectionName , options } , resetConnectionOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param virtualNetworkGatewayConnectionName param options async beginResetConnectionAndWait ( resourceGroupName , virtualNetworkGatewayConnectionName , options ? ) { const poller = await this . beginResetConnection ( resourceGroupName , virtualNetworkGatewayConnectionName , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param nextLink param options private _listNext ( resourceGroupName , nextLink , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , nextLink , options } , listNextOperationSpec ) ; } } const serializer = coreClient . createSerializer ( Mappers , false ) ; const createOrUpdateOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}" , httpMethod : "PUT" , responses : { 200 : { bodyMapper : Mappers . VirtualNetworkGatewayConnection } , 201 : { bodyMapper : Mappers . VirtualNetworkGatewayConnection } , 202 : { bodyMapper : Mappers . VirtualNetworkGatewayConnection } , 204 : { bodyMapper : Mappers . VirtualNetworkGatewayConnection } , default : { bodyMapper : Mappers . CloudError } } , requestBody : Parameters . parameters63 , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayConnectionName ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const getOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . VirtualNetworkGatewayConnection } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayConnectionName ] , headerParameters : [ Parameters . accept ] , serializer } ; const deleteOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}" , httpMethod : "DELETE" , responses : { 200 : { } , 201 : { } , 202 : { } , 204 : { } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayConnectionName ] , headerParameters : [ Parameters . accept ] , serializer } ; const updateTagsOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}" , httpMethod : "PATCH" , responses : { 200 : { bodyMapper : Mappers . VirtualNetworkGatewayConnection } , 201 : { bodyMapper : Mappers . VirtualNetworkGatewayConnection } , 202 : { bodyMapper : Mappers . VirtualNetworkGatewayConnection } , 204 : { bodyMapper : Mappers . VirtualNetworkGatewayConnection } , default : { bodyMapper : Mappers . CloudError } } , requestBody : Parameters . parameters1 , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayConnectionName ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const setSharedKeyOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey" , httpMethod : "PUT" , responses : { 200 : { bodyMapper : Mappers . ConnectionSharedKey } , 201 : { bodyMapper : Mappers . ConnectionSharedKey } , 202 : { bodyMapper : Mappers . ConnectionSharedKey } , 204 : { bodyMapper : Mappers . ConnectionSharedKey } , default : { bodyMapper : Mappers . CloudError } } , requestBody : Parameters . parameters64 , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayConnectionName ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const getSharedKeyOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . ConnectionSharedKey } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayConnectionName ] , headerParameters : [ Parameters . accept ] , serializer } ; const listOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . VirtualNetworkGatewayConnectionListResult } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId ] , headerParameters : [ Parameters . accept ] , serializer } ; const resetSharedKeyOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset" , httpMethod : "POST" , responses : { 200 : { bodyMapper : Mappers . ConnectionResetSharedKey } , 201 : { bodyMapper : Mappers . ConnectionResetSharedKey } , 202 : { bodyMapper : Mappers . ConnectionResetSharedKey } , 204 : { bodyMapper : Mappers . ConnectionResetSharedKey } , default : { bodyMapper : Mappers . CloudError } } , requestBody : Parameters . parameters65 , 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/connections/{virtualNetworkGatewayConnectionName}/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 . virtualNetworkGatewayConnectionName ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const stopPacketCaptureOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/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 . virtualNetworkGatewayConnectionName ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const getIkeSasOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/getikesas" , 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 . ErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayConnectionName ] , headerParameters : [ Parameters . accept ] , serializer } ; const resetConnectionOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/resetconnection" , httpMethod : "POST" , responses : { 200 : { } , 201 : { } , 202 : { } , 204 : { } , default : { bodyMapper : Mappers . ErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualNetworkGatewayConnectionName ] , headerParameters : [ Parameters . accept ] , serializer } ; const listNextOperationSpec = { path : "{nextLink}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . VirtualNetworkGatewayConnectionListResult } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . nextLink ] , headerParameters : [ Parameters . accept ] , serializer } ;