/// <summary>
 /// Gets a long term retention backup.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='locationName'>
 /// The location of the database.
 /// </param>
 /// <param name='longTermRetentionServerName'>
 /// The name of the server
 /// </param>
 /// <param name='longTermRetentionDatabaseName'>
 /// The name of the database
 /// </param>
 /// <param name='backupName'>
 /// The backup name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <LongTermRetentionBackup> GetByResourceGroupAsync(this ILongTermRetentionBackupsOperations operations, string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetByResourceGroupWithHttpMessagesAsync(resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists the long term retention backups for a given server.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <LongTermRetentionBackup> > ListByServerNextAsync(this ILongTermRetentionBackupsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByServerNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists the long term retention backups for a given server.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <LongTermRetentionBackup> ListByServerNext(this ILongTermRetentionBackupsOperations operations, string nextPageLink)
 {
     return(operations.ListByServerNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes a long term retention backup.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='locationName'>
 /// The location of the database
 /// </param>
 /// <param name='longTermRetentionServerName'>
 /// The name of the server
 /// </param>
 /// <param name='longTermRetentionDatabaseName'>
 /// The name of the database
 /// </param>
 /// <param name='backupName'>
 /// The backup name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this ILongTermRetentionBackupsOperations operations, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Deletes a long term retention backup.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='locationName'>
 /// The location of the database
 /// </param>
 /// <param name='longTermRetentionServerName'>
 /// The name of the server
 /// </param>
 /// <param name='longTermRetentionDatabaseName'>
 /// The name of the database
 /// </param>
 /// <param name='backupName'>
 /// The backup name.
 /// </param>
 public static void BeginDelete(this ILongTermRetentionBackupsOperations operations, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName)
 {
     operations.BeginDeleteAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Lists the long term retention backups for a given server.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='locationName'>
 /// The location of the database
 /// </param>
 /// <param name='longTermRetentionServerName'>
 /// The name of the server
 /// </param>
 /// <param name='onlyLatestPerDatabase'>
 /// Whether or not to only get the latest backup for each database.
 /// </param>
 /// <param name='databaseState'>
 /// Whether to query against just live databases, just deleted databases, or
 /// all databases. Possible values include: 'All', 'Live', 'Deleted'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <LongTermRetentionBackup> > ListByServerAsync(this ILongTermRetentionBackupsOperations operations, string locationName, string longTermRetentionServerName, bool?onlyLatestPerDatabase = default(bool?), string databaseState = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByServerWithHttpMessagesAsync(locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists the long term retention backups for a given server.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='locationName'>
 /// The location of the database
 /// </param>
 /// <param name='longTermRetentionServerName'>
 /// The name of the server
 /// </param>
 /// <param name='onlyLatestPerDatabase'>
 /// Whether or not to only get the latest backup for each database.
 /// </param>
 /// <param name='databaseState'>
 /// Whether to query against just live databases, just deleted databases, or
 /// all databases. Possible values include: 'All', 'Live', 'Deleted'
 /// </param>
 public static IPage <LongTermRetentionBackup> ListByServer(this ILongTermRetentionBackupsOperations operations, string locationName, string longTermRetentionServerName, bool?onlyLatestPerDatabase = default(bool?), string databaseState = default(string))
 {
     return(operations.ListByServerAsync(locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets a long term retention backup.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='locationName'>
 /// The location of the database.
 /// </param>
 /// <param name='longTermRetentionServerName'>
 /// The name of the server
 /// </param>
 /// <param name='longTermRetentionDatabaseName'>
 /// The name of the database
 /// </param>
 /// <param name='backupName'>
 /// The backup name.
 /// </param>
 public static LongTermRetentionBackup GetByResourceGroup(this ILongTermRetentionBackupsOperations operations, string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName)
 {
     return(operations.GetByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName).GetAwaiter().GetResult());
 }