/// <summary>
 /// Initializes a new instance of the SqlManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public SqlManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._auditingPolicy                       = new AuditingPolicyOperations(this);
     this._capabilities                         = new CapabilitiesOperations(this);
     this._databaseActivation                   = new DatabaseActivationOperations(this);
     this._databaseBackup                       = new DatabaseBackupOperations(this);
     this._databases                            = new DatabaseOperations(this);
     this._dataMasking                          = new DataMaskingOperations(this);
     this._elasticPools                         = new ElasticPoolOperations(this);
     this._firewallRules                        = new FirewallRuleOperations(this);
     this._recommendedElasticPools              = new RecommendedElasticPoolOperations(this);
     this._recommendedIndexes                   = new RecommendedIndexOperations(this);
     this._databaseReplicationLinks             = new ReplicationLinkOperations(this);
     this._secureConnection                     = new SecureConnectionPolicyOperations(this);
     this._securityAlertPolicy                  = new SecurityAlertPolicyOperations(this);
     this._serverAdministrators                 = new ServerAdministratorOperations(this);
     this._communicationLinks                   = new ServerCommunicationLinkOperations(this);
     this._serverDisasterRecoveryConfigurations = new ServerDisasterRecoveryConfigurationOperations(this);
     this._servers                            = new ServerOperations(this);
     this._serverUpgrades                     = new ServerUpgradeOperations(this);
     this._serviceObjectives                  = new ServiceObjectiveOperations(this);
     this._serviceTierAdvisors                = new ServiceTierAdvisorOperations(this);
     this._transparentDataEncryption          = new TransparentDataEncryptionOperations(this);
     this._apiVersion                         = "2014-04-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout                  = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// Returns information about Azure SQL Server communication links.
 /// </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>
 /// <returns>
 /// Represents the response to a List Azure Sql Server communication
 /// link request.
 /// </returns>
 public static ServerCommunicationLinkListResponse List(this IServerCommunicationLinkOperations operations, string resourceGroupName, string serverName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IServerCommunicationLinkOperations)s).ListAsync(resourceGroupName, serverName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <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 ServerCommunicationLinkCreateOrUpdateResponse CreateOrUpdate(this IServerCommunicationLinkOperations operations, string resourceGroupName, string serverName, string communicationLinkName, ServerCommunicationLinkCreateOrUpdateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IServerCommunicationLinkOperations)s).CreateOrUpdateAsync(resourceGroupName, serverName, communicationLinkName, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Returns information about Azure SQL Server communication links.
 /// </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>
 /// <returns>
 /// Represents the response to a List Azure Sql Server communication
 /// link request.
 /// </returns>
 public static Task <ServerCommunicationLinkListResponse> ListAsync(this IServerCommunicationLinkOperations operations, string resourceGroupName, string serverName)
 {
     return(operations.ListAsync(resourceGroupName, serverName, CancellationToken.None));
 }
 /// <summary>
 /// Gets the status of an Azure Sql Server communication link create or
 /// update operation.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.LegacySdk.IServerCommunicationLinkOperations.
 /// </param>
 /// <param name='operationStatusLink'>
 /// Required. Location value returned by the Begin operation
 /// </param>
 /// <returns>
 /// Response for long running Azure Sql server communication link
 /// operation.
 /// </returns>
 public static Task <ServerCommunicationLinkCreateOrUpdateResponse> GetServerCommunicationLinkOperationStatusAsync(this IServerCommunicationLinkOperations operations, string operationStatusLink)
 {
     return(operations.GetServerCommunicationLinkOperationStatusAsync(operationStatusLink, CancellationToken.None));
 }
 /// <summary>
 /// Gets the status of an Azure Sql Server communication link create or
 /// update operation.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.LegacySdk.IServerCommunicationLinkOperations.
 /// </param>
 /// <param name='operationStatusLink'>
 /// Required. Location value returned by the Begin operation
 /// </param>
 /// <returns>
 /// Response for long running Azure Sql server communication link
 /// operation.
 /// </returns>
 public static ServerCommunicationLinkCreateOrUpdateResponse GetServerCommunicationLinkOperationStatus(this IServerCommunicationLinkOperations operations, string operationStatusLink)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IServerCommunicationLinkOperations)s).GetServerCommunicationLinkOperationStatusAsync(operationStatusLink);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes the Azure SQL server communication link with the given name.
 /// </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
 /// retrieved.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> DeleteAsync(this IServerCommunicationLinkOperations operations, string resourceGroupName, string serverName, string communicationLinkName)
 {
     return(operations.DeleteAsync(resourceGroupName, serverName, communicationLinkName, CancellationToken.None));
 }
 /// <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));
 }