diff options
Diffstat (limited to 'MediaBrowser.Api/Reports/Model')
| -rw-r--r-- | MediaBrowser.Api/Reports/Model/ReportGroup.cs | 44 | ||||
| -rw-r--r-- | MediaBrowser.Api/Reports/Model/ReportHeader.cs | 54 | ||||
| -rw-r--r-- | MediaBrowser.Api/Reports/Model/ReportItem.cs | 34 | ||||
| -rw-r--r-- | MediaBrowser.Api/Reports/Model/ReportResult.cs | 53 | ||||
| -rw-r--r-- | MediaBrowser.Api/Reports/Model/ReportRow.cs | 71 |
5 files changed, 256 insertions, 0 deletions
diff --git a/MediaBrowser.Api/Reports/Model/ReportGroup.cs b/MediaBrowser.Api/Reports/Model/ReportGroup.cs new file mode 100644 index 000000000..49c76c7ba --- /dev/null +++ b/MediaBrowser.Api/Reports/Model/ReportGroup.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MediaBrowser.Api.Reports +{ + + /// <summary> A report group. </summary> + public class ReportGroup + { + /// <summary> + /// Initializes a new instance of the MediaBrowser.Api.Reports.ReportGroup class. </summary> + public ReportGroup() + { + Rows = new List<ReportRow>(); + } + + /// <summary> + /// Initializes a new instance of the MediaBrowser.Api.Reports.ReportGroup class. </summary> + /// <param name="rows"> The rows. </param> + public ReportGroup(List<ReportRow> rows) + { + Rows = rows; + } + + /// <summary> Gets or sets the name. </summary> + /// <value> The name. </value> + public string Name { get; set; } + + /// <summary> Gets or sets the rows. </summary> + /// <value> The rows. </value> + public List<ReportRow> Rows { get; set; } + + /// <summary> Returns a string that represents the current object. </summary> + /// <returns> A string that represents the current object. </returns> + /// <seealso cref="M:System.Object.ToString()"/> + public override string ToString() + { + return Name; + } + } +} diff --git a/MediaBrowser.Api/Reports/Model/ReportHeader.cs b/MediaBrowser.Api/Reports/Model/ReportHeader.cs new file mode 100644 index 000000000..81b85954a --- /dev/null +++ b/MediaBrowser.Api/Reports/Model/ReportHeader.cs @@ -0,0 +1,54 @@ +using MediaBrowser.Controller.Entities; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MediaBrowser.Api.Reports +{ + /// <summary> A report header. </summary> + public class ReportHeader + { + /// <summary> Initializes a new instance of the ReportHeader class. </summary> + public ReportHeader() + { + ItemViewType = ItemViewType.None; + Visible = true; + CanGroup = true; + } + + /// <summary> Gets or sets the type of the header field. </summary> + /// <value> The type of the header field. </value> + public ReportFieldType HeaderFieldType { get; set; } + + /// <summary> Gets or sets the name of the header. </summary> + /// <value> The name of the header. </value> + public string Name { get; set; } + + /// <summary> Gets or sets the name of the field. </summary> + /// <value> The name of the field. </value> + public HeaderMetadata FieldName { get; set; } + + /// <summary> Gets or sets the sort field. </summary> + /// <value> The sort field. </value> + public string SortField { get; set; } + + /// <summary> Gets or sets the type. </summary> + /// <value> The type. </value> + public string Type { get; set; } + + /// <summary> Gets or sets the type of the item view. </summary> + /// <value> The type of the item view. </value> + public ItemViewType ItemViewType { get; set; } + + /// <summary> Gets or sets a value indicating whether this object is visible. </summary> + /// <value> true if visible, false if not. </value> + public bool Visible { get; set; } + + /// <summary> Gets or sets a value indicating whether we can group. </summary> + /// <value> true if we can group, false if not. </value> + public bool CanGroup { get; set; } + + } +} diff --git a/MediaBrowser.Api/Reports/Model/ReportItem.cs b/MediaBrowser.Api/Reports/Model/ReportItem.cs new file mode 100644 index 000000000..06d0b0c46 --- /dev/null +++ b/MediaBrowser.Api/Reports/Model/ReportItem.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MediaBrowser.Api.Reports +{ + /// <summary> A report item. </summary> + public class ReportItem + { + /// <summary> Gets or sets the identifier. </summary> + /// <value> The identifier. </value> + public string Id { get; set; } + + /// <summary> Gets or sets the name. </summary> + /// <value> The name. </value> + public string Name { get; set; } + + public string Image { get; set; } + + /// <summary> Gets or sets the custom tag. </summary> + /// <value> The custom tag. </value> + public string CustomTag { get; set; } + + /// <summary> Returns a string that represents the current object. </summary> + /// <returns> A string that represents the current object. </returns> + /// <seealso cref="M:System.Object.ToString()"/> + public override string ToString() + { + return Name; + } + } +} diff --git a/MediaBrowser.Api/Reports/Model/ReportResult.cs b/MediaBrowser.Api/Reports/Model/ReportResult.cs new file mode 100644 index 000000000..a4bc95aa1 --- /dev/null +++ b/MediaBrowser.Api/Reports/Model/ReportResult.cs @@ -0,0 +1,53 @@ +using System.Collections.Generic; + +namespace MediaBrowser.Api.Reports +{ + + /// <summary> Encapsulates the result of a report. </summary> + public class ReportResult + { + /// <summary> + /// Initializes a new instance of the MediaBrowser.Api.Reports.ReportResult class. </summary> + public ReportResult() + { + Rows = new List<ReportRow>(); + Headers = new List<ReportHeader>(); + Groups = new List<ReportGroup>(); + TotalRecordCount = 0; + IsGrouped = false; + } + + /// <summary> + /// Initializes a new instance of the MediaBrowser.Api.Reports.ReportResult class. </summary> + /// <param name="headers"> The headers. </param> + /// <param name="rows"> The rows. </param> + public ReportResult(List<ReportHeader> headers, List<ReportRow> rows) + { + Rows = rows; + Headers = headers; + TotalRecordCount = 0; + } + + /// <summary> Gets or sets the rows. </summary> + /// <value> The rows. </value> + public List<ReportRow> Rows { get; set; } + + /// <summary> Gets or sets the headers. </summary> + /// <value> The headers. </value> + public List<ReportHeader> Headers { get; set; } + + /// <summary> Gets or sets the groups. </summary> + /// <value> The groups. </value> + public List<ReportGroup> Groups { get; set; } + + + /// <summary> Gets or sets the number of total records. </summary> + /// <value> The total number of record count. </value> + public int TotalRecordCount { get; set; } + + /// <summary> Gets or sets the is grouped. </summary> + /// <value> The is grouped. </value> + public bool IsGrouped { get; set; } + + } +} diff --git a/MediaBrowser.Api/Reports/Model/ReportRow.cs b/MediaBrowser.Api/Reports/Model/ReportRow.cs new file mode 100644 index 000000000..d9bae8afa --- /dev/null +++ b/MediaBrowser.Api/Reports/Model/ReportRow.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MediaBrowser.Api.Reports +{ + public class ReportRow + { + /// <summary> + /// Initializes a new instance of the ReportRow class. + /// </summary> + public ReportRow() + { + Columns = new List<ReportItem>(); + } + + /// <summary> Gets or sets the identifier. </summary> + /// <value> The identifier. </value> + public string Id { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this object has backdrop image. </summary> + /// <value> true if this object has backdrop image, false if not. </value> + public bool HasImageTagsBackdrop { get; set; } + + /// <summary> Gets or sets a value indicating whether this object has image tags. </summary> + /// <value> true if this object has image tags, false if not. </value> + public bool HasImageTagsPrimary { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this object has image tags logo. </summary> + /// <value> true if this object has image tags logo, false if not. </value> + public bool HasImageTagsLogo { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this object has local trailer. </summary> + /// <value> true if this object has local trailer, false if not. </value> + public bool HasLocalTrailer { get; set; } + + /// <summary> Gets or sets a value indicating whether this object has lock data. </summary> + /// <value> true if this object has lock data, false if not. </value> + public bool HasLockData { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this object has embedded image. </summary> + /// <value> true if this object has embedded image, false if not. </value> + public bool HasEmbeddedImage { get; set; } + + /// <summary> Gets or sets a value indicating whether this object has subtitles. </summary> + /// <value> true if this object has subtitles, false if not. </value> + public bool HasSubtitles { get; set; } + + /// <summary> Gets or sets a value indicating whether this object has specials. </summary> + /// <value> true if this object has specials, false if not. </value> + public bool HasSpecials { get; set; } + + /// <summary> Gets or sets a value indicating whether this object is unidentified. </summary> + /// <value> true if this object is unidentified, false if not. </value> + public bool IsUnidentified { get; set; } + + /// <summary> Gets or sets the columns. </summary> + /// <value> The columns. </value> + public List<ReportItem> Columns { get; set; } + + /// <summary> Gets or sets the type. </summary> + /// <value> The type. </value> + public ReportIncludeItemTypes RowType { get; set; } + } +} |
