/// <summary>
 /// Checks the availability of the given notificationHub in a
 /// namespace.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj870968.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.NotificationHubs.INotificationHubOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// Required. The namespace name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The notificationHub name.
 /// </param>
 /// <returns>
 /// Response of the Check NameAvailability operation.
 /// </returns>
 public static CheckAvailabilityResponse CheckAvailability(this INotificationHubOperations operations, string resourceGroupName, string namespaceName, CheckAvailabilityParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((INotificationHubOperations)s).CheckAvailabilityAsync(resourceGroupName, namespaceName, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <summary>
 /// Checks the availability of the given notificationHub in a
 /// namespace.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj870968.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.NotificationHubs.INotificationHubOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// Required. The namespace name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The notificationHub name.
 /// </param>
 /// <returns>
 /// Response of the Check NameAvailability operation.
 /// </returns>
 public static Task<CheckAvailabilityResponse> CheckAvailabilityAsync(this INotificationHubOperations operations, string resourceGroupName, string namespaceName, CheckAvailabilityParameters parameters)
 {
     return operations.CheckAvailabilityAsync(resourceGroupName, namespaceName, parameters, CancellationToken.None);
 }
 /// <summary>
 /// Checks the availability of the given service namespace across all
 /// Windows Azure subscriptions. This is useful because the domain
 /// name is created based on the service namespace name.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj870968.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.NotificationHubs.INamespaceOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. The namespace name.
 /// </param>
 /// <returns>
 /// Response of the Check NameAvailability operation.
 /// </returns>
 public static Task<CheckAvailabilityResponse> CheckAvailabilityAsync(this INamespaceOperations operations, CheckAvailabilityParameters parameters)
 {
     return operations.CheckAvailabilityAsync(parameters, CancellationToken.None);
 }