using System.Collections.ObjectModel;
using Newtonsoft.Json;
namespace Jellyfin.Plugin.TubeArchivistMetadata.TubeArchivist
{
///
/// A class representing pagination information from the TubeArchivist API.
///
public class PaginationInfo
{
///
/// Initializes a new instance of the class.
///
/// The size of the page.
/// The starting page number.
/// The collection of previous page numbers.
/// The current page number.
/// A value indicating whether the max hits have been reached.
/// The parameters used for pagination.
/// The last page number.
/// The collection of next page numbers.
/// The total number of hits.
public PaginationInfo(
int pageSize,
int pageFrom,
Collection prevPages,
int currentPage,
bool maxHits,
string parameters,
int lastPage,
Collection nextPages,
int totalHits)
{
this.PageSize = pageSize;
this.PageFrom = pageFrom;
this.PrevPages = prevPages;
this.CurrentPage = currentPage;
this.MaxHits = maxHits;
this.Parameters = parameters;
this.LastPage = lastPage;
this.NextPages = nextPages;
this.TotalHits = totalHits;
}
///
/// Gets the page size.
///
[JsonProperty(PropertyName = "page_size")]
public int PageSize { get; }
///
/// Gets the page from.
///
[JsonProperty(PropertyName = "page_from")]
public int PageFrom { get; }
///
/// Gets the previous pages.
///
[JsonProperty(PropertyName = "prev_pages")]
public Collection PrevPages { get; }
///
/// Gets the current page.
///
[JsonProperty(PropertyName = "current_page")]
public int CurrentPage { get; }
///
/// Gets a value indicating whether the max hits have been reached.
///
[JsonProperty(PropertyName = "max_hits")]
public bool MaxHits { get; }
///
/// Gets the parameters.
///
[JsonProperty(PropertyName = "params")]
public string Parameters { get; }
///
/// Gets the last page.
///
[JsonProperty(PropertyName = "last_page")]
public int LastPage { get; }
///
/// Gets the next pages.
///
[JsonProperty(PropertyName = "next_pages")]
public Collection NextPages { get; }
///
/// Gets the total hits.
///
[JsonProperty(PropertyName = "total_hits")]
public int TotalHits { get; }
}
}