/// <summary>
 /// Gets the list of workload groups
 /// </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 <WorkloadGroup> > ListByDatabaseNextAsync(this IWorkloadGroupsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByDatabaseNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets a workload group
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='workloadGroupName'>
 /// The name of the workload group.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <WorkloadGroup> GetAsync(this IWorkloadGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string workloadGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, workloadGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Creates or updates a workload group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='workloadGroupName'>
 /// The name of the workload group.
 /// </param>
 /// <param name='parameters'>
 /// The requested workload group state.
 /// </param>
 public static WorkloadGroup CreateOrUpdate(this IWorkloadGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string workloadGroupName, WorkloadGroup parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, serverName, databaseName, workloadGroupName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets a workload group
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='workloadGroupName'>
 /// The name of the workload group.
 /// </param>
 public static WorkloadGroup Get(this IWorkloadGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string workloadGroupName)
 {
     return(operations.GetAsync(resourceGroupName, serverName, databaseName, workloadGroupName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets the list of workload groups
 /// </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 <WorkloadGroup> ListByDatabaseNext(this IWorkloadGroupsOperations operations, string nextPageLink)
 {
     return(operations.ListByDatabaseNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes a workload group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='workloadGroupName'>
 /// The name of the workload group to delete.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IWorkloadGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string workloadGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, workloadGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Deletes a workload group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='workloadGroupName'>
 /// The name of the workload group to delete.
 /// </param>
 public static void BeginDelete(this IWorkloadGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string workloadGroupName)
 {
     operations.BeginDeleteAsync(resourceGroupName, serverName, databaseName, workloadGroupName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Gets the list of workload groups
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 public static IPage <WorkloadGroup> ListByDatabase(this IWorkloadGroupsOperations operations, string resourceGroupName, string serverName, string databaseName)
 {
     return(operations.ListByDatabaseAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult());
 }