/// <summary>
 /// Creates or updates an Azure SQL Database backup LongTermRetention
 /// policy.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IDatabaseBackupOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group to which the server
 /// belongs.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Server on which the database is
 /// hosted.
 /// </param>
 /// <param name='databaseName'>
 /// Required. The name of the Azure SQL Database to be operated on
 /// (Updated or created).
 /// </param>
 /// <param name='backupLongTermRetentionPolicyName'>
 /// Required. The name of the Azure SQL Database backup
 /// LongTermRetention policy.
 /// </param>
 /// <param name='parameters'>
 /// Required. The required parameters for creating or updating a
 /// database backup LongTermRetention policy.
 /// </param>
 /// <returns>
 /// Response for long running Azure operations.
 /// </returns>
 public static Task<DatabaseBackupLongTermRetentionPolicyCreateOrUpdateResponse> CreateOrUpdateDatabaseBackupLongTermRetentionPolicyAsync(this IDatabaseBackupOperations operations, string resourceGroupName, string serverName, string databaseName, string backupLongTermRetentionPolicyName, DatabaseBackupLongTermRetentionPolicyCreateOrUpdateParameters parameters)
 {
     return operations.CreateOrUpdateDatabaseBackupLongTermRetentionPolicyAsync(resourceGroupName, serverName, databaseName, backupLongTermRetentionPolicyName, parameters, CancellationToken.None);
 }
 /// <summary>
 /// Creates or updates a backup LongTermRetention policy
 /// </summary>
 public Management.Sql.Models.DatabaseBackupLongTermRetentionPolicy SetDatabaseBackupLongTermRetentionPolicy(
     string resourceGroupName, 
     string serverName, 
     string databaseName, 
     string baPolicyName, 
     string clientRequestId, 
     DatabaseBackupLongTermRetentionPolicyCreateOrUpdateParameters parameters)
 {
     return GetCurrentSqlClient(clientRequestId).DatabaseBackup.CreateOrUpdateDatabaseBackupLongTermRetentionPolicy(
         resourceGroupName, 
         serverName, 
         databaseName, 
         baPolicyName, 
         parameters).DatabaseBackupLongTermRetentionPolicy;
 }
 /// <summary>
 /// Creates or updates an Azure SQL Database backup LongTermRetention
 /// policy.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IDatabaseBackupOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group to which the server
 /// belongs.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Server on which the database is
 /// hosted.
 /// </param>
 /// <param name='databaseName'>
 /// Required. The name of the Azure SQL Database to be operated on
 /// (Updated or created).
 /// </param>
 /// <param name='backupLongTermRetentionPolicyName'>
 /// Required. The name of the Azure SQL Database backup
 /// LongTermRetention policy.
 /// </param>
 /// <param name='parameters'>
 /// Required. The required parameters for creating or updating a
 /// database backup LongTermRetention policy.
 /// </param>
 /// <returns>
 /// Response for long running Azure operations.
 /// </returns>
 public static DatabaseBackupLongTermRetentionPolicyCreateOrUpdateResponse CreateOrUpdateDatabaseBackupLongTermRetentionPolicy(this IDatabaseBackupOperations operations, string resourceGroupName, string serverName, string databaseName, string backupLongTermRetentionPolicyName, DatabaseBackupLongTermRetentionPolicyCreateOrUpdateParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IDatabaseBackupOperations)s).CreateOrUpdateDatabaseBackupLongTermRetentionPolicyAsync(resourceGroupName, serverName, databaseName, backupLongTermRetentionPolicyName, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }