/// <summary>
 /// Checks whether the custom host name maps to an Api Management
 /// service.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IApiManagementOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='name'>
 /// Required. The name of the Api Management service.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the CheckCustomHostname operation.
 /// </param>
 /// <returns>
 /// The response of the CheckCustomHostname operation.
 /// </returns>
 public static Task<ApiServiceCheckCustomHostnameResponse> CheckCustomHostnameAsync(this IApiManagementOperations operations, string resourceGroupName, string name, ApiServiceCheckCustomHostnameParameters parameters)
 {
     return operations.CheckCustomHostnameAsync(resourceGroupName, name, parameters, CancellationToken.None);
 }
 /// <summary>
 /// Checks whether the custom host name maps to an Api Management
 /// service.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IApiManagementOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='name'>
 /// Required. The name of the Api Management service.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the CheckCustomHostname operation.
 /// </param>
 /// <returns>
 /// The response of the CheckCustomHostname operation.
 /// </returns>
 public static ApiServiceCheckCustomHostnameResponse CheckCustomHostname(this IApiManagementOperations operations, string resourceGroupName, string name, ApiServiceCheckCustomHostnameParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IApiManagementOperations)s).CheckCustomHostnameAsync(resourceGroupName, name, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }