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