/// <summary>
 /// Retrieves all the backups in a device. Can be used to get the backups for
 /// failover also.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='forFailover'>
 /// Set to true if you need backups which can be used for failover.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Backup> > ListByDeviceAsync(this IBackupsOperations operations, string deviceName, string resourceGroupName, string managerName, ODataQuery <BackupFilter> odataQuery = default(ODataQuery <BackupFilter>), bool?forFailover = default(bool?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByDeviceWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, odataQuery, forFailover, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }