/// <summary>
 /// Updates an existing Azure SQL Database Failover Group.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IFailoverGroupOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group to which the Azure SQL
 /// Database Server belongs.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Database Server on which the
 /// Azure SQL Database Failover Group is hosted.
 /// </param>
 /// <param name='failoverGroupName'>
 /// Required. The name of the Azure SQL Database Failover Group to be
 /// updated.
 /// </param>
 /// <param name='parameters'>
 /// Required. The required parameters for patch updating an Azure Sql
 /// Databaser Failover Group.
 /// </param>
 /// <returns>
 /// Response for long running Azure Sql Database Failover Group
 /// operation.
 /// </returns>
 public static Task <FailoverGroupPatchUpdateResponse> PatchUpdateAsync(this IFailoverGroupOperations operations, string resourceGroupName, string serverName, string failoverGroupName, FailoverGroupPatchUpdateParameters parameters)
 {
     return(operations.PatchUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters, CancellationToken.None));
 }
        /// <summary>
        /// Patch-updates an Failover Group
        /// </summary>
        public Management.Sql.Models.FailoverGroup PatchUpdate(string resourceGroupName, string serverName, string FailoverGroupName, string clientRequestId, FailoverGroupPatchUpdateParameters parameters)
        {
            var resp = GetCurrentSqlClient(clientRequestId).FailoverGroups.PatchUpdate(resourceGroupName, serverName, FailoverGroupName, parameters);

            return(resp.FailoverGroup);
        }
 /// <summary>
 /// Updates an existing Azure SQL Database Failover Group.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IFailoverGroupOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group to which the Azure SQL
 /// Database Server belongs.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Database Server on which the
 /// Azure SQL Database Failover Group is hosted.
 /// </param>
 /// <param name='failoverGroupName'>
 /// Required. The name of the Azure SQL Database Failover Group to be
 /// updated.
 /// </param>
 /// <param name='parameters'>
 /// Required. The required parameters for patch updating an Azure Sql
 /// Databaser Failover Group.
 /// </param>
 /// <returns>
 /// Response for long running Azure Sql Database Failover Group
 /// operation.
 /// </returns>
 public static FailoverGroupPatchUpdateResponse PatchUpdate(this IFailoverGroupOperations operations, string resourceGroupName, string serverName, string failoverGroupName, FailoverGroupPatchUpdateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IFailoverGroupOperations)s).PatchUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }