/// <summary>
 /// Retrieves the details of a vpn connection.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name of the VpnGateway.
 /// </param>
 /// <param name='gatewayName'>
 /// The name of the gateway.
 /// </param>
 /// <param name='connectionName'>
 /// The name of the vpn connection.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <VpnConnection> GetAsync(this IVpnConnectionsOperations operations, string resourceGroupName, string gatewayName, string connectionName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, gatewayName, connectionName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Retrieves all vpn connections for a particular virtual wan vpn gateway.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <VpnConnection> > ListByVpnGatewayNextAsync(this IVpnConnectionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByVpnGatewayNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Creates a vpn connection to a scalable vpn gateway if it doesn't exist else
 /// updates the existing connection.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name of the VpnGateway.
 /// </param>
 /// <param name='gatewayName'>
 /// The name of the gateway.
 /// </param>
 /// <param name='connectionName'>
 /// The name of the connection.
 /// </param>
 /// <param name='vpnConnectionParameters'>
 /// Parameters supplied to create or Update a VPN Connection.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <VpnConnection> BeginCreateOrUpdateAsync(this IVpnConnectionsOperations operations, string resourceGroupName, string gatewayName, string connectionName, VpnConnection vpnConnectionParameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Stops packet capture on Vpn connection in the specified resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='gatewayName'>
 /// The name of the gateway.
 /// </param>
 /// <param name='vpnConnectionName'>
 /// The name of the vpn connection.
 /// </param>
 /// <param name='parameters'>
 /// Vpn Connection packet capture parameters supplied to stop packet capture on
 /// gateway connection.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <string> BeginStopPacketCaptureAsync(this IVpnConnectionsOperations operations, string resourceGroupName, string gatewayName, string vpnConnectionName, VpnConnectionPacketCaptureStopParameters parameters = default(VpnConnectionPacketCaptureStopParameters), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginStopPacketCaptureWithHttpMessagesAsync(resourceGroupName, gatewayName, vpnConnectionName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Creates a vpn connection to a scalable vpn gateway if it doesn't exist else
 /// updates the existing connection.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name of the VpnGateway.
 /// </param>
 /// <param name='gatewayName'>
 /// The name of the gateway.
 /// </param>
 /// <param name='connectionName'>
 /// The name of the connection.
 /// </param>
 /// <param name='vpnConnectionParameters'>
 /// Parameters supplied to create or Update a VPN Connection.
 /// </param>
 public static VpnConnection CreateOrUpdate(this IVpnConnectionsOperations operations, string resourceGroupName, string gatewayName, string connectionName, VpnConnection vpnConnectionParameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieves the details of a vpn connection.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name of the VpnGateway.
 /// </param>
 /// <param name='gatewayName'>
 /// The name of the gateway.
 /// </param>
 /// <param name='connectionName'>
 /// The name of the vpn connection.
 /// </param>
 public static VpnConnection Get(this IVpnConnectionsOperations operations, string resourceGroupName, string gatewayName, string connectionName)
 {
     return(operations.GetAsync(resourceGroupName, gatewayName, connectionName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieves all vpn connections for a particular virtual wan vpn gateway.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <VpnConnection> ListByVpnGatewayNext(this IVpnConnectionsOperations operations, string nextPageLink)
 {
     return(operations.ListByVpnGatewayNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes a vpn connection.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name of the VpnGateway.
 /// </param>
 /// <param name='gatewayName'>
 /// The name of the gateway.
 /// </param>
 /// <param name='connectionName'>
 /// The name of the connection.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IVpnConnectionsOperations operations, string resourceGroupName, string gatewayName, string connectionName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, gatewayName, connectionName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Deletes a vpn connection.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name of the VpnGateway.
 /// </param>
 /// <param name='gatewayName'>
 /// The name of the gateway.
 /// </param>
 /// <param name='connectionName'>
 /// The name of the connection.
 /// </param>
 public static void BeginDelete(this IVpnConnectionsOperations operations, string resourceGroupName, string gatewayName, string connectionName)
 {
     operations.BeginDeleteAsync(resourceGroupName, gatewayName, connectionName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Retrieves all vpn connections for a particular virtual wan vpn gateway.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name of the VpnGateway.
 /// </param>
 /// <param name='gatewayName'>
 /// The name of the gateway.
 /// </param>
 public static IPage <VpnConnection> ListByVpnGateway(this IVpnConnectionsOperations operations, string resourceGroupName, string gatewayName)
 {
     return(operations.ListByVpnGatewayAsync(resourceGroupName, gatewayName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Stops packet capture on Vpn connection in the specified resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='gatewayName'>
 /// The name of the gateway.
 /// </param>
 /// <param name='vpnConnectionName'>
 /// The name of the vpn connection.
 /// </param>
 /// <param name='parameters'>
 /// Vpn Connection packet capture parameters supplied to stop packet capture on
 /// gateway connection.
 /// </param>
 public static string BeginStopPacketCapture(this IVpnConnectionsOperations operations, string resourceGroupName, string gatewayName, string vpnConnectionName, VpnConnectionPacketCaptureStopParameters parameters = default(VpnConnectionPacketCaptureStopParameters))
 {
     return(operations.BeginStopPacketCaptureAsync(resourceGroupName, gatewayName, vpnConnectionName, parameters).GetAwaiter().GetResult());
 }