/// <summary>
 /// Checks that the database principal assignment is valid and is not already
 /// in use.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group containing the Kusto cluster.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the Kusto cluster.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database in the Kusto cluster.
 /// </param>
 /// <param name='principalAssignmentName'>
 /// The name of the resource.
 /// </param>
 public static CheckNameResult CheckNameAvailability(this IDatabasePrincipalAssignmentsOperations operations, string resourceGroupName, string clusterName, string databaseName, DatabasePrincipalAssignmentCheckNameRequest principalAssignmentName)
 {
     return(operations.CheckNameAvailabilityAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Checks that the database principal assignment is valid and is not already
 /// in use.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group containing the Kusto cluster.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the Kusto cluster.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database in the Kusto cluster.
 /// </param>
 /// <param name='principalAssignmentName'>
 /// The name of the resource.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CheckNameResult> CheckNameAvailabilityAsync(this IDatabasePrincipalAssignmentsOperations operations, string resourceGroupName, string clusterName, string databaseName, DatabasePrincipalAssignmentCheckNameRequest principalAssignmentName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Checks that the database principal assignment is valid and is not already
 /// in use.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='kustoPoolName'>
 /// The name of the Kusto pool.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database in the Kusto pool.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='principalAssignmentName'>
 /// The name of the resource.
 /// </param>
 public static CheckNameResult CheckNameAvailability(this IKustoPoolDatabasePrincipalAssignmentsOperations operations, string workspaceName, string kustoPoolName, string databaseName, string resourceGroupName, DatabasePrincipalAssignmentCheckNameRequest principalAssignmentName)
 {
     return(operations.CheckNameAvailabilityAsync(workspaceName, kustoPoolName, databaseName, resourceGroupName, principalAssignmentName).GetAwaiter().GetResult());
 }