/// <summary>
 /// Create a new hub instance or update an existing instance.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataFactories.IHubOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the data factory.
 /// </param>
 /// <param name='dataFactoryName'>
 /// Required. The name of the data factory.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters required to create or update a hub.
 /// </param>
 /// <returns>
 /// The create or update hub operation response.
 /// </returns>
 public static HubCreateOrUpdateResponse BeginCreateOrUpdate(this IHubOperations operations, string resourceGroupName, string dataFactoryName, HubCreateOrUpdateParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IHubOperations)s).BeginCreateOrUpdateAsync(resourceGroupName, dataFactoryName, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <summary>
 /// Create a new hub instance or update an existing instance.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataFactories.IHubOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the data factory.
 /// </param>
 /// <param name='dataFactoryName'>
 /// Required. The name of the data factory.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters required to create or update a hub.
 /// </param>
 /// <returns>
 /// The create or update hub operation response.
 /// </returns>
 public static Task<HubCreateOrUpdateResponse> BeginCreateOrUpdateAsync(this IHubOperations operations, string resourceGroupName, string dataFactoryName, HubCreateOrUpdateParameters parameters)
 {
     return operations.BeginCreateOrUpdateAsync(resourceGroupName, dataFactoryName, parameters, CancellationToken.None);
 }