/// <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>
 /// Create Or Update workload group
 /// </summary>
 /// <remarks>
 /// Create Or Update a Sql pool's workload group.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace
 /// </param>
 /// <param name='sqlPoolName'>
 /// SQL pool name
 /// </param>
 /// <param name='workloadGroupName'>
 /// The name of the workload group.
 /// </param>
 /// <param name='parameters'>
 /// The requested workload group state.
 /// </param>
 public static WorkloadGroup BeginCreateOrUpdate(this ISqlPoolWorkloadGroupOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, string workloadGroupName, WorkloadGroup parameters)
 {
     return(operations.BeginCreateOrUpdateAsync(resourceGroupName, workspaceName, sqlPoolName, workloadGroupName, parameters).GetAwaiter().GetResult());
 }
 /// <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>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <WorkloadGroup> BeginCreateOrUpdateAsync(this IWorkloadGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string workloadGroupName, WorkloadGroup parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, workloadGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Create Or Update workload group
 /// </summary>
 /// <remarks>
 /// Create Or Update a Sql pool's workload group.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace
 /// </param>
 /// <param name='sqlPoolName'>
 /// SQL pool name
 /// </param>
 /// <param name='workloadGroupName'>
 /// The name of the workload group.
 /// </param>
 /// <param name='parameters'>
 /// The requested workload group state.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <WorkloadGroup> CreateOrUpdateAsync(this ISqlPoolWorkloadGroupOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, string workloadGroupName, WorkloadGroup parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, workloadGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }