/// <summary>
 /// Retrieves the details of a nat ruleGet.
 /// </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='natRuleName'>
 /// The name of the nat rule.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <VpnGatewayNatRule> GetAsync(this INatRulesOperations operations, string resourceGroupName, string gatewayName, string natRuleName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, gatewayName, natRuleName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Creates a nat rule to a scalable vpn gateway if it doesn't exist else
 /// updates the existing nat rules.
 /// </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='natRuleName'>
 /// The name of the nat rule.
 /// </param>
 /// <param name='natRuleParameters'>
 /// Parameters supplied to create or Update a Nat Rule.
 /// </param>
 public static VpnGatewayNatRule CreateOrUpdate(this INatRulesOperations operations, string resourceGroupName, string gatewayName, string natRuleName, VpnGatewayNatRule natRuleParameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, gatewayName, natRuleName, natRuleParameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieves the details of a nat ruleGet.
 /// </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='natRuleName'>
 /// The name of the nat rule.
 /// </param>
 public static VpnGatewayNatRule Get(this INatRulesOperations operations, string resourceGroupName, string gatewayName, string natRuleName)
 {
     return(operations.GetAsync(resourceGroupName, gatewayName, natRuleName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieves all nat rules 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 <VpnGatewayNatRule> > ListByVpnGatewayNextAsync(this INatRulesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByVpnGatewayNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Retrieves all nat rules 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 <VpnGatewayNatRule> ListByVpnGatewayNext(this INatRulesOperations operations, string nextPageLink)
 {
     return(operations.ListByVpnGatewayNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes a nat rule.
 /// </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='natRuleName'>
 /// The name of the nat rule.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this INatRulesOperations operations, string resourceGroupName, string gatewayName, string natRuleName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, gatewayName, natRuleName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Deletes a nat rule.
 /// </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='natRuleName'>
 /// The name of the nat rule.
 /// </param>
 public static void BeginDelete(this INatRulesOperations operations, string resourceGroupName, string gatewayName, string natRuleName)
 {
     operations.BeginDeleteAsync(resourceGroupName, gatewayName, natRuleName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Retrieves all nat rules 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 <VpnGatewayNatRule> ListByVpnGateway(this INatRulesOperations operations, string resourceGroupName, string gatewayName)
 {
     return(operations.ListByVpnGatewayAsync(resourceGroupName, gatewayName).GetAwaiter().GetResult());
 }