You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

303 lines
11 KiB

3 years ago
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace RadarrSharp.Models
{
/// <summary>
///
/// </summary>
[DataContract]
public class Movie
{
/// <summary>
/// Gets or Sets Id
/// </summary>
[DataMember(Name = "id", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "id")]
public int Id { get; set; }
/// <summary>
/// Gets or Sets Title
/// </summary>
[DataMember(Name = "title", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "title")]
public string Title { get; set; }
/// <summary>
/// Gets or Sets SortTitle
/// </summary>
[DataMember(Name = "sortTitle", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "sortTitle")]
public string SortTitle { get; set; }
/// <summary>
/// Gets or Sets SizeOnDisk
/// </summary>
[DataMember(Name = "sizeOnDisk", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "sizeOnDisk")]
public long SizeOnDisk { get; set; }
/// <summary>
/// Gets or Sets Overview
/// </summary>
[DataMember(Name = "overview", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "overview")]
public string Overview { get; set; }
/// <summary>
/// Gets or Sets InCinemas
/// </summary>
[DataMember(Name = "inCinemas", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "inCinemas")]
public string InCinemas { get; set; }
/// <summary>
/// Gets or Sets PhysicalRelease
/// </summary>
[DataMember(Name = "physicalRelease", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "physicalRelease")]
public string PhysicalRelease { get; set; }
/// <summary>
/// Gets or Sets Images
/// </summary>
[DataMember(Name = "images", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "images")]
public List<Image> Images { get; set; }
/// <summary>
/// Gets or Sets Website
/// </summary>
[DataMember(Name = "website", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "website")]
public string Website { get; set; }
/// <summary>
/// Gets or Sets Year
/// </summary>
[DataMember(Name = "year", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "year")]
public int? Year { get; set; }
/// <summary>
/// Gets or Sets HasFile
/// </summary>
[DataMember(Name = "hasFile", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "hasFile")]
public bool? HasFile { get; set; }
/// <summary>
/// Gets or Sets YouTubeTrailerId
/// </summary>
[DataMember(Name = "youTubeTrailerId", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "youTubeTrailerId")]
public string YouTubeTrailerId { get; set; }
/// <summary>
/// Gets or Sets Studio
/// </summary>
[DataMember(Name = "studio", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "studio")]
public string Studio { get; set; }
/// <summary>
/// Gets or Sets Path
/// </summary>
[DataMember(Name = "path", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "path")]
public string Path { get; set; }
/// <summary>
/// Gets or Sets RootFolderPath
/// </summary>
[DataMember(Name = "rootFolderPath", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "rootFolderPath")]
public string RootFolderPath { get; set; }
/// <summary>
/// Gets or Sets QualityProfileId
/// </summary>
[DataMember(Name = "qualityProfileId", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "qualityProfileId")]
public int? QualityProfileId { get; set; }
/// <summary>
/// Gets or Sets Monitored
/// </summary>
[DataMember(Name = "monitored", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "monitored")]
public bool? Monitored { get; set; }
/// <summary>
/// Gets or Sets MinimumAvailability
/// </summary>
[DataMember(Name = "minimumAvailability", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "minimumAvailability")]
public string MinimumAvailability { get; set; }
/// <summary>
/// Gets or Sets IsAvailable
/// </summary>
[DataMember(Name = "isAvailable", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "isAvailable")]
public bool? IsAvailable { get; set; }
/// <summary>
/// Gets or Sets FolderName
/// </summary>
[DataMember(Name = "folderName", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "folderName")]
public string FolderName { get; set; }
/// <summary>
/// Gets or Sets Runtime
/// </summary>
[DataMember(Name = "runtime", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "runtime")]
public int? Runtime { get; set; }
/// <summary>
/// Gets or Sets CleanTitle
/// </summary>
[DataMember(Name = "cleanTitle", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "cleanTitle")]
public string CleanTitle { get; set; }
/// <summary>
/// Gets or Sets ImdbId
/// </summary>
[DataMember(Name = "imdbId", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "imdbId")]
public string ImdbId { get; set; }
/// <summary>
/// Gets or Sets TmdbId
/// </summary>
[DataMember(Name = "tmdbId", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "tmdbId")]
public int? TmdbId { get; set; }
/// <summary>
/// Gets or Sets TitleSlug
/// </summary>
[DataMember(Name = "titleSlug", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "titleSlug")]
public string TitleSlug { get; set; }
/// <summary>
/// Gets or Sets Certification
/// </summary>
[DataMember(Name = "certification", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "certification")]
public string Certification { get; set; }
/// <summary>
/// Gets or Sets Genres
/// </summary>
[DataMember(Name = "genres", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "genres")]
public List<string> Genres { get; set; }
/// <summary>
/// Gets or Sets Tags
/// </summary>
[DataMember(Name = "tags", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "tags")]
public List<int?> Tags { get; set; }
/// <summary>
/// Gets or Sets Added
/// </summary>
[DataMember(Name = "added", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "added")]
public string Added { get; set; }
/// <summary>
/// Gets or Sets Ratings
/// </summary>
[DataMember(Name = "ratings", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "ratings")]
public Rating Ratings { get; set; }
/// <summary>
/// Gets or Sets Collection
/// </summary>
[DataMember(Name = "collection", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "collection")]
public Collection Collection { get; set; }
/// <summary>
/// movie status
/// </summary>
/// <value>movie status</value>
[DataMember(Name = "status", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }
public void FixPathObject(string moviePath)
{
if (string.IsNullOrWhiteSpace(this.Path))
this.Path = $"/{moviePath}/{Title} ({Year})";
}
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class Movie {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Title: ").Append(Title).Append("\n");
sb.Append(" SortTitle: ").Append(SortTitle).Append("\n");
sb.Append(" SizeOnDisk: ").Append(SizeOnDisk).Append("\n");
sb.Append(" Overview: ").Append(Overview).Append("\n");
sb.Append(" InCinemas: ").Append(InCinemas).Append("\n");
sb.Append(" PhysicalRelease: ").Append(PhysicalRelease).Append("\n");
sb.Append(" Images: ").Append(Images).Append("\n");
sb.Append(" Website: ").Append(Website).Append("\n");
sb.Append(" Year: ").Append(Year).Append("\n");
sb.Append(" HasFile: ").Append(HasFile).Append("\n");
sb.Append(" YouTubeTrailerId: ").Append(YouTubeTrailerId).Append("\n");
sb.Append(" Studio: ").Append(Studio).Append("\n");
sb.Append(" Path: ").Append(Path).Append("\n");
sb.Append(" RootFolderPath: ").Append(RootFolderPath).Append("\n");
sb.Append(" QualityProfileId: ").Append(QualityProfileId).Append("\n");
sb.Append(" Monitored: ").Append(Monitored).Append("\n");
sb.Append(" MinimumAvailability: ").Append(MinimumAvailability).Append("\n");
sb.Append(" IsAvailable: ").Append(IsAvailable).Append("\n");
sb.Append(" FolderName: ").Append(FolderName).Append("\n");
sb.Append(" Runtime: ").Append(Runtime).Append("\n");
sb.Append(" CleanTitle: ").Append(CleanTitle).Append("\n");
sb.Append(" ImdbId: ").Append(ImdbId).Append("\n");
sb.Append(" TmdbId: ").Append(TmdbId).Append("\n");
sb.Append(" TitleSlug: ").Append(TitleSlug).Append("\n");
sb.Append(" Certification: ").Append(Certification).Append("\n");
sb.Append(" Genres: ").Append(Genres).Append("\n");
sb.Append(" Tags: ").Append(Tags).Append("\n");
sb.Append(" Added: ").Append(Added).Append("\n");
sb.Append(" Ratings: ").Append(Ratings).Append("\n");
sb.Append(" Collection: ").Append(Collection).Append("\n");
sb.Append(" Status: ").Append(Status).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}