/// <summary>
 /// Begins creating a new or updating an existing Azure SQL Server
 /// communication. To determine the status of the operation call
 /// GetServerCommunicationLinkOperationStatus.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.LegacySdk.IServerCommunicationLinkOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group to which the Azure SQL
 /// Server belongs.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Server.
 /// </param>
 /// <param name='communicationLinkName'>
 /// Required. The name of the Azure SQL Server communication link to be
 /// operated on (Updated or created).
 /// </param>
 /// <param name='parameters'>
 /// Required. The required parameters for creating or updating a Server
 /// communication link.
 /// </param>
 /// <returns>
 /// Response for long running Azure Sql server communication link
 /// operation.
 /// </returns>
 public static ServerCommunicationLinkCreateOrUpdateResponse BeginCreateOrUpdate(this IServerCommunicationLinkOperations operations, string resourceGroupName, string serverName, string communicationLinkName, ServerCommunicationLinkCreateOrUpdateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IServerCommunicationLinkOperations)s).BeginCreateOrUpdateAsync(resourceGroupName, serverName, communicationLinkName, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
        /// <summary>
        /// Creates or updates a server communication link
        /// </summary>
        public Management.Sql.LegacySdk.Models.ServerCommunicationLink CreateOrUpdate(string resourceGroupName, string serverName, string communicationLinkName, string clientRequestId, ServerCommunicationLinkCreateOrUpdateParameters parameters)
        {
            var resp = GetCurrentSqlClient(clientRequestId).CommunicationLinks.CreateOrUpdate(resourceGroupName, serverName, communicationLinkName, parameters);

            return(resp.ServerCommunicationLink);
        }
 /// <summary>
 /// Creates a new or updates an existing Azure SQL Server communication
 /// link.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.LegacySdk.IServerCommunicationLinkOperations.
 /// </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 Server.
 /// </param>
 /// <param name='communicationLinkName'>
 /// Required. The name of the Azure SQL Server communication link to be
 /// operated on (Updated or created).
 /// </param>
 /// <param name='parameters'>
 /// Required. The required parameters for creating or updating a Server
 /// communication link.
 /// </param>
 /// <returns>
 /// Response for long running Azure Sql server communication link
 /// operation.
 /// </returns>
 public static Task <ServerCommunicationLinkCreateOrUpdateResponse> CreateOrUpdateAsync(this IServerCommunicationLinkOperations operations, string resourceGroupName, string serverName, string communicationLinkName, ServerCommunicationLinkCreateOrUpdateParameters parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, serverName, communicationLinkName, parameters, CancellationToken.None));
 }