/// <summary>
 /// You can create a server farm by issuing an HTTP POST request. Only
 /// one server farm per webspace is permitted. You can retrieve server
 /// farm details by using HTTP GET, change server farm properties by
 /// using HTTP PUT, and delete a server farm by using HTTP DELETE. A
 /// request body is required for server farm creation (HTTP POST) and
 /// server farm update (HTTP PUT).  Warning: Creating a server farm
 /// changes your webspace's Compute Mode from Shared to Dedicated. You
 /// will be charged from the moment the server farm is created, even
 /// if all your sites are still running in Free mode.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn194277.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.WebSites.IServerFarmOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Create Server Farm operation.
 /// </param>
 /// <returns>
 /// The Create Server Farm operation response.
 /// </returns>
 public static ServerFarmCreateOrUpdateResponse CreateOrUpdate(this IServerFarmOperations operations, string resourceGroupName, ServerFarmCreateOrUpdateParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IServerFarmOperations)s).CreateOrUpdateAsync(resourceGroupName, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <summary>
 /// You can create a server farm by issuing an HTTP POST request. Only
 /// one server farm per webspace is permitted. You can retrieve server
 /// farm details by using HTTP GET, change server farm properties by
 /// using HTTP PUT, and delete a server farm by using HTTP DELETE. A
 /// request body is required for server farm creation (HTTP POST) and
 /// server farm update (HTTP PUT).  Warning: Creating a server farm
 /// changes your webspace's Compute Mode from Shared to Dedicated. You
 /// will be charged from the moment the server farm is created, even
 /// if all your sites are still running in Free mode.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn194277.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.WebSites.IServerFarmOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Create Server Farm operation.
 /// </param>
 /// <returns>
 /// The Create Server Farm operation response.
 /// </returns>
 public static Task<ServerFarmCreateOrUpdateResponse> CreateOrUpdateAsync(this IServerFarmOperations operations, string resourceGroupName, ServerFarmCreateOrUpdateParameters parameters)
 {
     return operations.CreateOrUpdateAsync(resourceGroupName, parameters, CancellationToken.None);
 }