/// <summary>
 /// Updates a SQL Server database copy.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Sql.IDatabaseCopyOperations.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the source or destination SQL Server instance
 /// </param>
 /// <param name='databaseName'>
 /// Required. The name of the database
 /// </param>
 /// <param name='databaseCopyName'>
 /// Required. The unique identifier for the database copy to update
 /// </param>
 /// <param name='parameters'>
 /// Required. Additional parameters for the update database copy
 /// operation
 /// </param>
 /// <returns>
 /// Response to the update request.
 /// </returns>
 public static DatabaseCopyUpdateResponse Update(this IDatabaseCopyOperations operations, string serverName, string databaseName, Guid databaseCopyName, DatabaseCopyUpdateParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IDatabaseCopyOperations)s).UpdateAsync(serverName, databaseName, databaseCopyName, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <summary>
 /// Updates a SQL Server database copy.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Sql.IDatabaseCopyOperations.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the source or destination SQL Server instance
 /// </param>
 /// <param name='databaseName'>
 /// Required. The name of the database
 /// </param>
 /// <param name='databaseCopyName'>
 /// Required. The unique identifier for the database copy to update
 /// </param>
 /// <param name='parameters'>
 /// Required. Additional parameters for the update database copy
 /// operation
 /// </param>
 /// <returns>
 /// Response to the update request.
 /// </returns>
 public static Task<DatabaseCopyUpdateResponse> UpdateAsync(this IDatabaseCopyOperations operations, string serverName, string databaseName, Guid databaseCopyName, DatabaseCopyUpdateParameters parameters)
 {
     return operations.UpdateAsync(serverName, databaseName, databaseCopyName, parameters, CancellationToken.None);
 }
 /// <summary>
 /// The Update Database Copy operation updates a SQL Server database
 /// copy.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Sql.IDatabaseCopyOperations.
 /// </param>
 /// <param name='serverName'>
 /// The name of the source or destination SQL Server instance
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database
 /// </param>
 /// <param name='databaseCopyName'>
 /// The unique identifier for the database copy to update
 /// </param>
 /// <param name='parameters'>
 /// Additional parameters for the update database copy operation
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static DatabaseCopyResponse Update(this IDatabaseCopyOperations operations, string serverName, string databaseName, Guid databaseCopyName, DatabaseCopyUpdateParameters parameters)
 {
     try
     {
         return operations.UpdateAsync(serverName, databaseName, databaseCopyName, parameters).Result;
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }