/// <summary>
 /// The RegenerateKey operation regenerates the specified account key
 /// for the given Batch account.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Batch.IAccountOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group that contains the Batch
 /// account.
 /// </param>
 /// <param name='accountName'>
 /// Required. The name of the account.
 /// </param>
 /// <param name='parameters'>
 /// Required. The type of key to regenerate
 /// </param>
 /// <returns>
 /// Values returned by the RegenerateKey operation.
 /// </returns>
 public static Task<BatchAccountRegenerateKeyResponse> RegenerateKeyAsync(this IAccountOperations operations, string resourceGroupName, string accountName, BatchAccountRegenerateKeyParameters parameters)
 {
     return operations.RegenerateKeyAsync(resourceGroupName, accountName, parameters, CancellationToken.None);
 }
 /// <summary>
 /// The RegenerateKey operation regenerates the specified account key
 /// for the given Batch account.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Batch.IAccountOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group that contains the Batch
 /// account.
 /// </param>
 /// <param name='accountName'>
 /// Required. The name of the account.
 /// </param>
 /// <param name='parameters'>
 /// Required. The type of key to regenerate
 /// </param>
 /// <returns>
 /// Values returned by the RegenerateKey operation.
 /// </returns>
 public static BatchAccountRegenerateKeyResponse RegenerateKey(this IAccountOperations operations, string resourceGroupName, string accountName, BatchAccountRegenerateKeyParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IAccountOperations)s).RegenerateKeyAsync(resourceGroupName, accountName, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }