commit 46e403f880501a9101d313068e600be9ae2fbc8c Author: Xander Sigler Date: Tue Jan 18 12:09:42 2022 -0800 Initial Commit diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..194d190 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,29 @@ +kind: pipeline +type: docker +name: RadarrSharp + +environment: + BUILD_NUM_SINCE_LAST_MINOR_VERSION: 15 + +steps: +- name: init + image: busybox + commands: + - echo 'Starting build pipeline for RadarrSharp' + - echo Drone build number is ${DRONE_BUILD_NUMBER} + - echo Revision is $((${DRONE_BUILD_NUMBER}-$BUILD_NUM_SINCE_LAST_MINOR_VERSION)) + +- name: nuget-publish + image: mcr.microsoft.com/dotnet/sdk:5.0 + environment: + NUGET_API_KEY: + from_secret: Nuget_Api_key + commands: + - dotnet build + - dotnet pack -p:Version=1.0.$((${DRONE_BUILD_NUMBER}-$BUILD_NUM_SINCE_LAST_MINOR_VERSION)) -o . + - dotnet nuget push *.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json + +- name: finish + image: busybox + commands: + - echo 'Finished deployment for RadarrSharp' diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..394706c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.vs/ +bin/ +obj/ \ No newline at end of file diff --git a/Helpers/RadarrExtensions.cs b/Helpers/RadarrExtensions.cs new file mode 100644 index 0000000..ab22d54 --- /dev/null +++ b/Helpers/RadarrExtensions.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; + +namespace RadarrSharp.Helpers +{ + public static class RadarrExtensions + { + public static Tuple ToTuple(this object value, string key) + { + if (value == null) + return null; + return new Tuple(key, value.ToString()); + } + + public static List> ToList(this Tuple tuple) + { + if (tuple == null) + return null; + return new List>() { tuple }; + } + + public static List> ParamList(params Tuple[] tuples) + { + if (tuples == null) + return null; + var combinedTuples = new List>(); + foreach (var p in tuples) + { + combinedTuples.Add(p); + } + return combinedTuples; + } + } +} diff --git a/Models/Blocklist.cs b/Models/Blocklist.cs new file mode 100644 index 0000000..483dd55 --- /dev/null +++ b/Models/Blocklist.cs @@ -0,0 +1,116 @@ +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 Blocklist { + /// + /// Gets or Sets MovieId + /// + [DataMember(Name="movieId", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "movieId")] + public decimal? MovieId { get; set; } + + /// + /// Gets or Sets SourceTitle + /// + [DataMember(Name="sourceTitle", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "sourceTitle")] + public string SourceTitle { get; set; } + + /// + /// Gets or Sets Languages + /// + [DataMember(Name="languages", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "languages")] + public List Languages { get; set; } + + /// + /// Gets or Sets Quality + /// + [DataMember(Name="quality", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "quality")] + public Quality Quality { get; set; } + + /// + /// Gets or Sets CustomFormats + /// + [DataMember(Name="customFormats", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "customFormats")] + public List CustomFormats { get; set; } + + /// + /// Gets or Sets Date + /// + [DataMember(Name="date", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "date")] + public string Date { get; set; } + + /// + /// Gets or Sets Protocol + /// + [DataMember(Name="protocol", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "protocol")] + public string Protocol { get; set; } + + /// + /// Gets or Sets Indexer + /// + [DataMember(Name="indexer", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "indexer")] + public string Indexer { get; set; } + + /// + /// Gets or Sets Message + /// + [DataMember(Name="message", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public decimal? Id { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class Blocklist {\n"); + sb.Append(" MovieId: ").Append(MovieId).Append("\n"); + sb.Append(" SourceTitle: ").Append(SourceTitle).Append("\n"); + sb.Append(" Languages: ").Append(Languages).Append("\n"); + sb.Append(" Quality: ").Append(Quality).Append("\n"); + sb.Append(" CustomFormats: ").Append(CustomFormats).Append("\n"); + sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" Protocol: ").Append(Protocol).Append("\n"); + sb.Append(" Indexer: ").Append(Indexer).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Id: ").Append(Id).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); + } + +} +} diff --git a/Models/BlocklistBulkBody.cs b/Models/BlocklistBulkBody.cs new file mode 100644 index 0000000..66f6fa5 --- /dev/null +++ b/Models/BlocklistBulkBody.cs @@ -0,0 +1,45 @@ +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 BlocklistBulkBody { + /// + /// Database ids of the blocklist items to delete + /// + /// Database ids of the blocklist items to delete + [DataMember(Name="ids", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "ids")] + public List Ids { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class BlocklistBulkBody {\n"); + sb.Append(" Ids: ").Append(Ids).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); + } + +} +} diff --git a/Models/Collection.cs b/Models/Collection.cs new file mode 100644 index 0000000..df04009 --- /dev/null +++ b/Models/Collection.cs @@ -0,0 +1,60 @@ +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 Collection { + /// + /// Gets or Sets Name + /// + [DataMember(Name="name", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or Sets TmdbId + /// + [DataMember(Name="tmdbId", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "tmdbId")] + public int? TmdbId { get; set; } + + /// + /// Gets or Sets Images + /// + [DataMember(Name="images", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "images")] + public List Images { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class Collection {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" TmdbId: ").Append(TmdbId).Append("\n"); + sb.Append(" Images: ").Append(Images).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); + } + +} +} diff --git a/Models/ConfigHostBody.cs b/Models/ConfigHostBody.cs new file mode 100644 index 0000000..aa47192 --- /dev/null +++ b/Models/ConfigHostBody.cs @@ -0,0 +1,292 @@ +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 ConfigHostBody { + /// + /// Gets or Sets BindAddress + /// + [DataMember(Name="bindAddress", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "bindAddress")] + public string BindAddress { get; set; } + + /// + /// Gets or Sets Port + /// + [DataMember(Name="port", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "port")] + public decimal? Port { get; set; } + + /// + /// Gets or Sets SslPort + /// + [DataMember(Name="sslPort", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "sslPort")] + public decimal? SslPort { get; set; } + + /// + /// Gets or Sets EnableSsl + /// + [DataMember(Name="enableSsl", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "enableSsl")] + public bool? EnableSsl { get; set; } + + /// + /// Gets or Sets LaunchBrowser + /// + [DataMember(Name="launchBrowser", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "launchBrowser")] + public bool? LaunchBrowser { get; set; } + + /// + /// Gets or Sets AuthenticationMethod + /// + [DataMember(Name="authenticationMethod", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "authenticationMethod")] + public string AuthenticationMethod { get; set; } + + /// + /// Gets or Sets AnalyticsEnabled + /// + [DataMember(Name="analyticsEnabled", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "analyticsEnabled")] + public bool? AnalyticsEnabled { get; set; } + + /// + /// Gets or Sets Username + /// + [DataMember(Name="username", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "username")] + public string Username { get; set; } + + /// + /// Gets or Sets Password + /// + [DataMember(Name="password", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "password")] + public string Password { get; set; } + + /// + /// Gets or Sets LogLevel + /// + [DataMember(Name="logLevel", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "logLevel")] + public string LogLevel { get; set; } + + /// + /// Gets or Sets ConsoleLogLevel + /// + [DataMember(Name="consoleLogLevel", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "consoleLogLevel")] + public string ConsoleLogLevel { get; set; } + + /// + /// Gets or Sets Branch + /// + [DataMember(Name="branch", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "branch")] + public string Branch { get; set; } + + /// + /// Gets or Sets ApiKey + /// + [DataMember(Name="apiKey", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "apiKey")] + public string ApiKey { get; set; } + + /// + /// Gets or Sets SslCertPath + /// + [DataMember(Name="sslCertPath", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "sslCertPath")] + public string SslCertPath { get; set; } + + /// + /// Gets or Sets SslCertPassword + /// + [DataMember(Name="sslCertPassword", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "sslCertPassword")] + public string SslCertPassword { get; set; } + + /// + /// Gets or Sets UrlBase + /// + [DataMember(Name="urlBase", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "urlBase")] + public string UrlBase { get; set; } + + /// + /// Gets or Sets UpdateAutomatically + /// + [DataMember(Name="updateAutomatically", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "updateAutomatically")] + public bool? UpdateAutomatically { get; set; } + + /// + /// Gets or Sets UpdateMechanism + /// + [DataMember(Name="updateMechanism", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "updateMechanism")] + public string UpdateMechanism { get; set; } + + /// + /// Gets or Sets UpdateScriptPath + /// + [DataMember(Name="updateScriptPath", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "updateScriptPath")] + public string UpdateScriptPath { get; set; } + + /// + /// Gets or Sets ProxyEnabled + /// + [DataMember(Name="proxyEnabled", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "proxyEnabled")] + public bool? ProxyEnabled { get; set; } + + /// + /// Gets or Sets ProxyType + /// + [DataMember(Name="proxyType", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "proxyType")] + public string ProxyType { get; set; } + + /// + /// Gets or Sets ProxyHostname + /// + [DataMember(Name="proxyHostname", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "proxyHostname")] + public string ProxyHostname { get; set; } + + /// + /// Gets or Sets ProxyPort + /// + [DataMember(Name="proxyPort", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "proxyPort")] + public decimal? ProxyPort { get; set; } + + /// + /// Gets or Sets ProxyUsername + /// + [DataMember(Name="proxyUsername", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "proxyUsername")] + public string ProxyUsername { get; set; } + + /// + /// Gets or Sets ProxyPassword + /// + [DataMember(Name="proxyPassword", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "proxyPassword")] + public string ProxyPassword { get; set; } + + /// + /// Gets or Sets ProxyBypassFilter + /// + [DataMember(Name="proxyBypassFilter", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "proxyBypassFilter")] + public string ProxyBypassFilter { get; set; } + + /// + /// Gets or Sets ProxyBypassLocalAddresses + /// + [DataMember(Name="proxyBypassLocalAddresses", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "proxyBypassLocalAddresses")] + public bool? ProxyBypassLocalAddresses { get; set; } + + /// + /// Gets or Sets CertificateValidation + /// + [DataMember(Name="certificateValidation", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "certificateValidation")] + public string CertificateValidation { get; set; } + + /// + /// Gets or Sets BackupFolder + /// + [DataMember(Name="backupFolder", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "backupFolder")] + public string BackupFolder { get; set; } + + /// + /// Gets or Sets BackupInterval + /// + [DataMember(Name="backupInterval", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "backupInterval")] + public decimal? BackupInterval { get; set; } + + /// + /// Gets or Sets BackupRetention + /// + [DataMember(Name="backupRetention", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "backupRetention")] + public decimal? BackupRetention { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public decimal? Id { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class ConfigHostBody {\n"); + sb.Append(" BindAddress: ").Append(BindAddress).Append("\n"); + sb.Append(" Port: ").Append(Port).Append("\n"); + sb.Append(" SslPort: ").Append(SslPort).Append("\n"); + sb.Append(" EnableSsl: ").Append(EnableSsl).Append("\n"); + sb.Append(" LaunchBrowser: ").Append(LaunchBrowser).Append("\n"); + sb.Append(" AuthenticationMethod: ").Append(AuthenticationMethod).Append("\n"); + sb.Append(" AnalyticsEnabled: ").Append(AnalyticsEnabled).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" LogLevel: ").Append(LogLevel).Append("\n"); + sb.Append(" ConsoleLogLevel: ").Append(ConsoleLogLevel).Append("\n"); + sb.Append(" Branch: ").Append(Branch).Append("\n"); + sb.Append(" ApiKey: ").Append(ApiKey).Append("\n"); + sb.Append(" SslCertPath: ").Append(SslCertPath).Append("\n"); + sb.Append(" SslCertPassword: ").Append(SslCertPassword).Append("\n"); + sb.Append(" UrlBase: ").Append(UrlBase).Append("\n"); + sb.Append(" UpdateAutomatically: ").Append(UpdateAutomatically).Append("\n"); + sb.Append(" UpdateMechanism: ").Append(UpdateMechanism).Append("\n"); + sb.Append(" UpdateScriptPath: ").Append(UpdateScriptPath).Append("\n"); + sb.Append(" ProxyEnabled: ").Append(ProxyEnabled).Append("\n"); + sb.Append(" ProxyType: ").Append(ProxyType).Append("\n"); + sb.Append(" ProxyHostname: ").Append(ProxyHostname).Append("\n"); + sb.Append(" ProxyPort: ").Append(ProxyPort).Append("\n"); + sb.Append(" ProxyUsername: ").Append(ProxyUsername).Append("\n"); + sb.Append(" ProxyPassword: ").Append(ProxyPassword).Append("\n"); + sb.Append(" ProxyBypassFilter: ").Append(ProxyBypassFilter).Append("\n"); + sb.Append(" ProxyBypassLocalAddresses: ").Append(ProxyBypassLocalAddresses).Append("\n"); + sb.Append(" CertificateValidation: ").Append(CertificateValidation).Append("\n"); + sb.Append(" BackupFolder: ").Append(BackupFolder).Append("\n"); + sb.Append(" BackupInterval: ").Append(BackupInterval).Append("\n"); + sb.Append(" BackupRetention: ").Append(BackupRetention).Append("\n"); + sb.Append(" Id: ").Append(Id).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); + } + +} +} diff --git a/Models/ConfigNamingBody.cs b/Models/ConfigNamingBody.cs new file mode 100644 index 0000000..024fd40 --- /dev/null +++ b/Models/ConfigNamingBody.cs @@ -0,0 +1,100 @@ +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 ConfigNamingBody { + /// + /// Gets or Sets RenameMovies + /// + [DataMember(Name="renameMovies", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "renameMovies")] + public bool? RenameMovies { get; set; } + + /// + /// Gets or Sets ReplaceIllegalCharacters + /// + [DataMember(Name="replaceIllegalCharacters", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "replaceIllegalCharacters")] + public bool? ReplaceIllegalCharacters { get; set; } + + /// + /// Gets or Sets ColonReplacementFormat + /// + [DataMember(Name="colonReplacementFormat", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "colonReplacementFormat")] + public string ColonReplacementFormat { get; set; } + + /// + /// Gets or Sets StandardMovieFormat + /// + [DataMember(Name="standardMovieFormat", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "standardMovieFormat")] + public string StandardMovieFormat { get; set; } + + /// + /// Gets or Sets MovieFolderFormat + /// + [DataMember(Name="movieFolderFormat", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "movieFolderFormat")] + public string MovieFolderFormat { get; set; } + + /// + /// Gets or Sets IncludeQuality + /// + [DataMember(Name="includeQuality", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "includeQuality")] + public bool? IncludeQuality { get; set; } + + /// + /// Gets or Sets ReplaceSpaces + /// + [DataMember(Name="replaceSpaces", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "replaceSpaces")] + public bool? ReplaceSpaces { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public decimal? Id { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class ConfigNamingBody {\n"); + sb.Append(" RenameMovies: ").Append(RenameMovies).Append("\n"); + sb.Append(" ReplaceIllegalCharacters: ").Append(ReplaceIllegalCharacters).Append("\n"); + sb.Append(" ColonReplacementFormat: ").Append(ColonReplacementFormat).Append("\n"); + sb.Append(" StandardMovieFormat: ").Append(StandardMovieFormat).Append("\n"); + sb.Append(" MovieFolderFormat: ").Append(MovieFolderFormat).Append("\n"); + sb.Append(" IncludeQuality: ").Append(IncludeQuality).Append("\n"); + sb.Append(" ReplaceSpaces: ").Append(ReplaceSpaces).Append("\n"); + sb.Append(" Id: ").Append(Id).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); + } + +} +} diff --git a/Models/ConfigUiBody.cs b/Models/ConfigUiBody.cs new file mode 100644 index 0000000..372659e --- /dev/null +++ b/Models/ConfigUiBody.cs @@ -0,0 +1,116 @@ +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 ConfigUiBody { + /// + /// Gets or Sets FirstDayOfWeek + /// + [DataMember(Name="firstDayOfWeek", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "firstDayOfWeek")] + public int? FirstDayOfWeek { get; set; } + + /// + /// Gets or Sets CalendarWeekColumnHeader + /// + [DataMember(Name="calendarWeekColumnHeader", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "calendarWeekColumnHeader")] + public string CalendarWeekColumnHeader { get; set; } + + /// + /// Gets or Sets MovieRuntimeFormat + /// + [DataMember(Name="movieRuntimeFormat", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "movieRuntimeFormat")] + public string MovieRuntimeFormat { get; set; } + + /// + /// Gets or Sets ShortDateFormat + /// + [DataMember(Name="shortDateFormat", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "shortDateFormat")] + public string ShortDateFormat { get; set; } + + /// + /// Gets or Sets LongDateFormat + /// + [DataMember(Name="longDateFormat", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "longDateFormat")] + public string LongDateFormat { get; set; } + + /// + /// Gets or Sets TimeFormat + /// + [DataMember(Name="timeFormat", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "timeFormat")] + public string TimeFormat { get; set; } + + /// + /// Gets or Sets ShowRelativeDates + /// + [DataMember(Name="showRelativeDates", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "showRelativeDates")] + public bool? ShowRelativeDates { get; set; } + + /// + /// Gets or Sets EnableColorImpairedMode + /// + [DataMember(Name="enableColorImpairedMode", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "enableColorImpairedMode")] + public bool? EnableColorImpairedMode { get; set; } + + /// + /// Gets or Sets MovieInfoLanguage + /// + [DataMember(Name="movieInfoLanguage", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "movieInfoLanguage")] + public decimal? MovieInfoLanguage { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class ConfigUiBody {\n"); + sb.Append(" FirstDayOfWeek: ").Append(FirstDayOfWeek).Append("\n"); + sb.Append(" CalendarWeekColumnHeader: ").Append(CalendarWeekColumnHeader).Append("\n"); + sb.Append(" MovieRuntimeFormat: ").Append(MovieRuntimeFormat).Append("\n"); + sb.Append(" ShortDateFormat: ").Append(ShortDateFormat).Append("\n"); + sb.Append(" LongDateFormat: ").Append(LongDateFormat).Append("\n"); + sb.Append(" TimeFormat: ").Append(TimeFormat).Append("\n"); + sb.Append(" ShowRelativeDates: ").Append(ShowRelativeDates).Append("\n"); + sb.Append(" EnableColorImpairedMode: ").Append(EnableColorImpairedMode).Append("\n"); + sb.Append(" MovieInfoLanguage: ").Append(MovieInfoLanguage).Append("\n"); + sb.Append(" Id: ").Append(Id).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); + } + +} +} diff --git a/Models/CustomFormat.cs b/Models/CustomFormat.cs new file mode 100644 index 0000000..8d30352 --- /dev/null +++ b/Models/CustomFormat.cs @@ -0,0 +1,68 @@ +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 CustomFormat { + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name="name", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or Sets IncludeCustomFormatWhenRenaming + /// + [DataMember(Name="includeCustomFormatWhenRenaming", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "includeCustomFormatWhenRenaming")] + public bool? IncludeCustomFormatWhenRenaming { get; set; } + + /// + /// Gets or Sets Specifications + /// + [DataMember(Name="specifications", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "specifications")] + public List Specifications { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class CustomFormat {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" IncludeCustomFormatWhenRenaming: ").Append(IncludeCustomFormatWhenRenaming).Append("\n"); + sb.Append(" Specifications: ").Append(Specifications).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); + } + +} +} diff --git a/Models/CustomFormatSpecifications.cs b/Models/CustomFormatSpecifications.cs new file mode 100644 index 0000000..9b1cf67 --- /dev/null +++ b/Models/CustomFormatSpecifications.cs @@ -0,0 +1,92 @@ +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 CustomFormatSpecifications { + /// + /// Gets or Sets Name + /// + [DataMember(Name="name", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or Sets Implementation + /// + [DataMember(Name="implementation", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "implementation")] + public string Implementation { get; set; } + + /// + /// Gets or Sets ImplementationName + /// + [DataMember(Name="implementationName", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "implementationName")] + public string ImplementationName { get; set; } + + /// + /// Gets or Sets InfoLink + /// + [DataMember(Name="infoLink", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "infoLink")] + public string InfoLink { get; set; } + + /// + /// Gets or Sets Negate + /// + [DataMember(Name="negate", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "negate")] + public bool? Negate { get; set; } + + /// + /// Gets or Sets Required + /// + [DataMember(Name="required", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "required")] + public bool? Required { get; set; } + + /// + /// Gets or Sets Fields + /// + [DataMember(Name="fields", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "fields")] + public List Fields { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class CustomFormatSpecifications {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Implementation: ").Append(Implementation).Append("\n"); + sb.Append(" ImplementationName: ").Append(ImplementationName).Append("\n"); + sb.Append(" InfoLink: ").Append(InfoLink).Append("\n"); + sb.Append(" Negate: ").Append(Negate).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); + sb.Append(" Fields: ").Append(Fields).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); + } + +} +} diff --git a/Models/CustomfilterFilters.cs b/Models/CustomfilterFilters.cs new file mode 100644 index 0000000..b79994e --- /dev/null +++ b/Models/CustomfilterFilters.cs @@ -0,0 +1,60 @@ +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 CustomfilterFilters { + /// + /// Gets or Sets Key + /// + [DataMember(Name="key", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "key")] + public string Key { get; set; } + + /// + /// Gets or Sets Value + /// + [DataMember(Name="value", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "value")] + public List Value { get; set; } + + /// + /// Gets or Sets Type + /// + [DataMember(Name="type", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class CustomfilterFilters {\n"); + sb.Append(" Key: ").Append(Key).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Type: ").Append(Type).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); + } + +} +} diff --git a/Models/DownloadClient.cs b/Models/DownloadClient.cs new file mode 100644 index 0000000..281045d --- /dev/null +++ b/Models/DownloadClient.cs @@ -0,0 +1,124 @@ +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 DownloadClient { + /// + /// Gets or Sets Enable + /// + [DataMember(Name="enable", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "enable")] + public bool? Enable { get; set; } + + /// + /// Gets or Sets Protocol + /// + [DataMember(Name="protocol", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "protocol")] + public string Protocol { get; set; } + + /// + /// Gets or Sets Priority + /// + [DataMember(Name="priority", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "priority")] + public int? Priority { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name="name", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or Sets Fields + /// + [DataMember(Name="fields", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "fields")] + public List Fields { get; set; } + + /// + /// Gets or Sets ImplementationName + /// + [DataMember(Name="implementationName", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "implementationName")] + public string ImplementationName { get; set; } + + /// + /// Gets or Sets Implementation + /// + [DataMember(Name="implementation", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "implementation")] + public string Implementation { get; set; } + + /// + /// Gets or Sets ConfigContract + /// + [DataMember(Name="configContract", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "configContract")] + public string ConfigContract { get; set; } + + /// + /// Gets or Sets InfoLink + /// + [DataMember(Name="infoLink", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "infoLink")] + public string InfoLink { get; set; } + + /// + /// Gets or Sets Tags + /// + [DataMember(Name="tags", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "tags")] + public List Tags { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class DownloadClient {\n"); + sb.Append(" Enable: ").Append(Enable).Append("\n"); + sb.Append(" Protocol: ").Append(Protocol).Append("\n"); + sb.Append(" Priority: ").Append(Priority).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Fields: ").Append(Fields).Append("\n"); + sb.Append(" ImplementationName: ").Append(ImplementationName).Append("\n"); + sb.Append(" Implementation: ").Append(Implementation).Append("\n"); + sb.Append(" ConfigContract: ").Append(ConfigContract).Append("\n"); + sb.Append(" InfoLink: ").Append(InfoLink).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" Id: ").Append(Id).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); + } + +} +} diff --git a/Models/History.cs b/Models/History.cs new file mode 100644 index 0000000..eb13d58 --- /dev/null +++ b/Models/History.cs @@ -0,0 +1,124 @@ +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 History { + /// + /// Gets or Sets MovieId + /// + [DataMember(Name="movieId", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "movieId")] + public decimal? MovieId { get; set; } + + /// + /// Gets or Sets SourceTitle + /// + [DataMember(Name="sourceTitle", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "sourceTitle")] + public string SourceTitle { get; set; } + + /// + /// Gets or Sets Languages + /// + [DataMember(Name="languages", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "languages")] + public List Languages { get; set; } + + /// + /// Gets or Sets Quality + /// + [DataMember(Name="quality", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "quality")] + public Quality Quality { get; set; } + + /// + /// Gets or Sets CustomFormats + /// + [DataMember(Name="customFormats", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "customFormats")] + public List CustomFormats { get; set; } + + /// + /// Gets or Sets QualityCutoffNotMet + /// + [DataMember(Name="qualityCutoffNotMet", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "qualityCutoffNotMet")] + public bool? QualityCutoffNotMet { get; set; } + + /// + /// Gets or Sets Date + /// + [DataMember(Name="date", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "date")] + public string Date { get; set; } + + /// + /// Gets or Sets DownloadId + /// + [DataMember(Name="downloadId", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "downloadId")] + public string DownloadId { get; set; } + + /// + /// Gets or Sets EventType + /// + [DataMember(Name="eventType", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "eventType")] + public string EventType { get; set; } + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "data")] + public Object Data { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public decimal? Id { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class History {\n"); + sb.Append(" MovieId: ").Append(MovieId).Append("\n"); + sb.Append(" SourceTitle: ").Append(SourceTitle).Append("\n"); + sb.Append(" Languages: ").Append(Languages).Append("\n"); + sb.Append(" Quality: ").Append(Quality).Append("\n"); + sb.Append(" CustomFormats: ").Append(CustomFormats).Append("\n"); + sb.Append(" QualityCutoffNotMet: ").Append(QualityCutoffNotMet).Append("\n"); + sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" DownloadId: ").Append(DownloadId).Append("\n"); + sb.Append(" EventType: ").Append(EventType).Append("\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Id: ").Append(Id).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); + } + +} +} diff --git a/Models/HistoryLanguages.cs b/Models/HistoryLanguages.cs new file mode 100644 index 0000000..976ffee --- /dev/null +++ b/Models/HistoryLanguages.cs @@ -0,0 +1,52 @@ +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 HistoryLanguages { + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public decimal? Id { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name="name", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class HistoryLanguages {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).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); + } + +} +} diff --git a/Models/Image.cs b/Models/Image.cs new file mode 100644 index 0000000..aa46362 --- /dev/null +++ b/Models/Image.cs @@ -0,0 +1,60 @@ +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 Image { + /// + /// Gets or Sets CoverType + /// + [DataMember(Name="coverType", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "coverType")] + public string CoverType { get; set; } + + /// + /// Gets or Sets Url + /// + [DataMember(Name="url", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "url")] + public string Url { get; set; } + + /// + /// Gets or Sets RemoteUrl + /// + [DataMember(Name="remoteUrl", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "remoteUrl")] + public string RemoteUrl { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class Image {\n"); + sb.Append(" CoverType: ").Append(CoverType).Append("\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" RemoteUrl: ").Append(RemoteUrl).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); + } + +} +} diff --git a/Models/ImportList.cs b/Models/ImportList.cs new file mode 100644 index 0000000..bdbff5b --- /dev/null +++ b/Models/ImportList.cs @@ -0,0 +1,172 @@ +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 ImportList { + /// + /// Gets or Sets Enabled + /// + [DataMember(Name="enabled", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "enabled")] + public bool? Enabled { get; set; } + + /// + /// Gets or Sets EnableAuto + /// + [DataMember(Name="enableAuto", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "enableAuto")] + public bool? EnableAuto { get; set; } + + /// + /// Gets or Sets ShouldMonitor + /// + [DataMember(Name="shouldMonitor", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "shouldMonitor")] + public bool? ShouldMonitor { 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 decimal? QualityProfileId { get; set; } + + /// + /// Gets or Sets SearchOnAdd + /// + [DataMember(Name="searchOnAdd", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "searchOnAdd")] + public bool? SearchOnAdd { get; set; } + + /// + /// Gets or Sets MinimumAvailability + /// + [DataMember(Name="minimumAvailability", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "minimumAvailability")] + public string MinimumAvailability { get; set; } + + /// + /// Gets or Sets ListType + /// + [DataMember(Name="listType", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "listType")] + public string ListType { get; set; } + + /// + /// Gets or Sets ListOrder + /// + [DataMember(Name="listOrder", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "listOrder")] + public decimal? ListOrder { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name="name", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or Sets Fields + /// + [DataMember(Name="fields", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "fields")] + public List Fields { get; set; } + + /// + /// Gets or Sets ImplementationName + /// + [DataMember(Name="implementationName", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "implementationName")] + public string ImplementationName { get; set; } + + /// + /// Gets or Sets Implementation + /// + [DataMember(Name="implementation", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "implementation")] + public string Implementation { get; set; } + + /// + /// Gets or Sets ConfigContract + /// + [DataMember(Name="configContract", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "configContract")] + public string ConfigContract { get; set; } + + /// + /// Gets or Sets InfoLink + /// + [DataMember(Name="infoLink", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "infoLink")] + public string InfoLink { get; set; } + + /// + /// Gets or Sets Tags + /// + [DataMember(Name="tags", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "tags")] + public List Tags { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class ImportList {\n"); + sb.Append(" Enabled: ").Append(Enabled).Append("\n"); + sb.Append(" EnableAuto: ").Append(EnableAuto).Append("\n"); + sb.Append(" ShouldMonitor: ").Append(ShouldMonitor).Append("\n"); + sb.Append(" RootFolderPath: ").Append(RootFolderPath).Append("\n"); + sb.Append(" QualityProfileId: ").Append(QualityProfileId).Append("\n"); + sb.Append(" SearchOnAdd: ").Append(SearchOnAdd).Append("\n"); + sb.Append(" MinimumAvailability: ").Append(MinimumAvailability).Append("\n"); + sb.Append(" ListType: ").Append(ListType).Append("\n"); + sb.Append(" ListOrder: ").Append(ListOrder).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Fields: ").Append(Fields).Append("\n"); + sb.Append(" ImplementationName: ").Append(ImplementationName).Append("\n"); + sb.Append(" Implementation: ").Append(Implementation).Append("\n"); + sb.Append(" ConfigContract: ").Append(ConfigContract).Append("\n"); + sb.Append(" InfoLink: ").Append(InfoLink).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" Id: ").Append(Id).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); + } + +} +} diff --git a/Models/Indexer.cs b/Models/Indexer.cs new file mode 100644 index 0000000..72d45e4 --- /dev/null +++ b/Models/Indexer.cs @@ -0,0 +1,156 @@ +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 Indexer { + /// + /// Gets or Sets EnableRss + /// + [DataMember(Name="enableRss", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "enableRss")] + public bool? EnableRss { get; set; } + + /// + /// Gets or Sets EnableAutomaticSearch + /// + [DataMember(Name="enableAutomaticSearch", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "enableAutomaticSearch")] + public bool? EnableAutomaticSearch { get; set; } + + /// + /// Gets or Sets EnableInteractiveSearch + /// + [DataMember(Name="enableInteractiveSearch", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "enableInteractiveSearch")] + public bool? EnableInteractiveSearch { get; set; } + + /// + /// Gets or Sets SupportsRss + /// + [DataMember(Name="supportsRss", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "supportsRss")] + public bool? SupportsRss { get; set; } + + /// + /// Gets or Sets SupportsSearch + /// + [DataMember(Name="supportsSearch", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "supportsSearch")] + public bool? SupportsSearch { get; set; } + + /// + /// Gets or Sets Protocol + /// + [DataMember(Name="protocol", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "protocol")] + public string Protocol { get; set; } + + /// + /// Gets or Sets Priority + /// + [DataMember(Name="priority", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "priority")] + public int? Priority { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name="name", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or Sets Fields + /// + [DataMember(Name="fields", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "fields")] + public List Fields { get; set; } + + /// + /// Gets or Sets ImplementationName + /// + [DataMember(Name="implementationName", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "implementationName")] + public string ImplementationName { get; set; } + + /// + /// Gets or Sets Implementation + /// + [DataMember(Name="implementation", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "implementation")] + public string Implementation { get; set; } + + /// + /// Gets or Sets ConfigContract + /// + [DataMember(Name="configContract", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "configContract")] + public string ConfigContract { get; set; } + + /// + /// Gets or Sets InfoLink + /// + [DataMember(Name="infoLink", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "infoLink")] + public string InfoLink { get; set; } + + /// + /// Gets or Sets Tags + /// + [DataMember(Name="tags", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "tags")] + public List Tags { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public decimal? Id { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class Indexer {\n"); + sb.Append(" EnableRss: ").Append(EnableRss).Append("\n"); + sb.Append(" EnableAutomaticSearch: ").Append(EnableAutomaticSearch).Append("\n"); + sb.Append(" EnableInteractiveSearch: ").Append(EnableInteractiveSearch).Append("\n"); + sb.Append(" SupportsRss: ").Append(SupportsRss).Append("\n"); + sb.Append(" SupportsSearch: ").Append(SupportsSearch).Append("\n"); + sb.Append(" Protocol: ").Append(Protocol).Append("\n"); + sb.Append(" Priority: ").Append(Priority).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Fields: ").Append(Fields).Append("\n"); + sb.Append(" ImplementationName: ").Append(ImplementationName).Append("\n"); + sb.Append(" Implementation: ").Append(Implementation).Append("\n"); + sb.Append(" ConfigContract: ").Append(ConfigContract).Append("\n"); + sb.Append(" InfoLink: ").Append(InfoLink).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" Id: ").Append(Id).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); + } + +} +} diff --git a/Models/InlineResponse200.cs b/Models/InlineResponse200.cs new file mode 100644 index 0000000..dc4ca56 --- /dev/null +++ b/Models/InlineResponse200.cs @@ -0,0 +1,244 @@ +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 InlineResponse200 { + /// + /// Gets or Sets Version + /// + [DataMember(Name="version", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "version")] + public string Version { get; set; } + + /// + /// Gets or Sets BuildTime + /// + [DataMember(Name="buildTime", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "buildTime")] + public string BuildTime { get; set; } + + /// + /// Gets or Sets IsDebug + /// + [DataMember(Name="isDebug", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "isDebug")] + public bool? IsDebug { get; set; } + + /// + /// Gets or Sets IsProduction + /// + [DataMember(Name="isProduction", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "isProduction")] + public bool? IsProduction { get; set; } + + /// + /// Gets or Sets IsAdmin + /// + [DataMember(Name="isAdmin", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "isAdmin")] + public bool? IsAdmin { get; set; } + + /// + /// Gets or Sets IsUserInteractive + /// + [DataMember(Name="isUserInteractive", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "isUserInteractive")] + public bool? IsUserInteractive { get; set; } + + /// + /// Gets or Sets StartupPath + /// + [DataMember(Name="startupPath", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "startupPath")] + public string StartupPath { get; set; } + + /// + /// Gets or Sets AppData + /// + [DataMember(Name="appData", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "appData")] + public string AppData { get; set; } + + /// + /// Gets or Sets OsName + /// + [DataMember(Name="osName", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "osName")] + public string OsName { get; set; } + + /// + /// Gets or Sets OsVersion + /// + [DataMember(Name="osVersion", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "osVersion")] + public string OsVersion { get; set; } + + /// + /// Gets or Sets IsNetCore + /// + [DataMember(Name="isNetCore", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "isNetCore")] + public bool? IsNetCore { get; set; } + + /// + /// Gets or Sets IsMono + /// + [DataMember(Name="isMono", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "isMono")] + public bool? IsMono { get; set; } + + /// + /// Gets or Sets IsLinux + /// + [DataMember(Name="isLinux", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "isLinux")] + public bool? IsLinux { get; set; } + + /// + /// Gets or Sets IsOsx + /// + [DataMember(Name="isOsx", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "isOsx")] + public bool? IsOsx { get; set; } + + /// + /// Gets or Sets IsWindows + /// + [DataMember(Name="isWindows", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "isWindows")] + public bool? IsWindows { get; set; } + + /// + /// Gets or Sets IsDocker + /// + [DataMember(Name="isDocker", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "isDocker")] + public bool? IsDocker { get; set; } + + /// + /// Gets or Sets Mode + /// + [DataMember(Name="mode", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "mode")] + public string Mode { get; set; } + + /// + /// Gets or Sets Branch + /// + [DataMember(Name="branch", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "branch")] + public string Branch { get; set; } + + /// + /// Gets or Sets Authentication + /// + [DataMember(Name="authentication", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "authentication")] + public string Authentication { get; set; } + + /// + /// Gets or Sets SqliteVersion + /// + [DataMember(Name="sqliteVersion", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "sqliteVersion")] + public string SqliteVersion { get; set; } + + /// + /// Gets or Sets MigrationVersion + /// + [DataMember(Name="migrationVersion", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "migrationVersion")] + public int? MigrationVersion { get; set; } + + /// + /// Gets or Sets UrlBase + /// + [DataMember(Name="urlBase", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "urlBase")] + public string UrlBase { get; set; } + + /// + /// Gets or Sets RuntimeVersion + /// + [DataMember(Name="runtimeVersion", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "runtimeVersion")] + public string RuntimeVersion { get; set; } + + /// + /// Gets or Sets RuntimeName + /// + [DataMember(Name="runtimeName", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "runtimeName")] + public string RuntimeName { get; set; } + + /// + /// Gets or Sets StartTime + /// + [DataMember(Name="startTime", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "startTime")] + public string StartTime { get; set; } + + /// + /// Gets or Sets PackageUpdateMechanism + /// + [DataMember(Name="packageUpdateMechanism", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "packageUpdateMechanism")] + public string PackageUpdateMechanism { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class InlineResponse200 {\n"); + sb.Append(" Version: ").Append(Version).Append("\n"); + sb.Append(" BuildTime: ").Append(BuildTime).Append("\n"); + sb.Append(" IsDebug: ").Append(IsDebug).Append("\n"); + sb.Append(" IsProduction: ").Append(IsProduction).Append("\n"); + sb.Append(" IsAdmin: ").Append(IsAdmin).Append("\n"); + sb.Append(" IsUserInteractive: ").Append(IsUserInteractive).Append("\n"); + sb.Append(" StartupPath: ").Append(StartupPath).Append("\n"); + sb.Append(" AppData: ").Append(AppData).Append("\n"); + sb.Append(" OsName: ").Append(OsName).Append("\n"); + sb.Append(" OsVersion: ").Append(OsVersion).Append("\n"); + sb.Append(" IsNetCore: ").Append(IsNetCore).Append("\n"); + sb.Append(" IsMono: ").Append(IsMono).Append("\n"); + sb.Append(" IsLinux: ").Append(IsLinux).Append("\n"); + sb.Append(" IsOsx: ").Append(IsOsx).Append("\n"); + sb.Append(" IsWindows: ").Append(IsWindows).Append("\n"); + sb.Append(" IsDocker: ").Append(IsDocker).Append("\n"); + sb.Append(" Mode: ").Append(Mode).Append("\n"); + sb.Append(" Branch: ").Append(Branch).Append("\n"); + sb.Append(" Authentication: ").Append(Authentication).Append("\n"); + sb.Append(" SqliteVersion: ").Append(SqliteVersion).Append("\n"); + sb.Append(" MigrationVersion: ").Append(MigrationVersion).Append("\n"); + sb.Append(" UrlBase: ").Append(UrlBase).Append("\n"); + sb.Append(" RuntimeVersion: ").Append(RuntimeVersion).Append("\n"); + sb.Append(" RuntimeName: ").Append(RuntimeName).Append("\n"); + sb.Append(" StartTime: ").Append(StartTime).Append("\n"); + sb.Append(" PackageUpdateMechanism: ").Append(PackageUpdateMechanism).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); + } + +} +} diff --git a/Models/InlineResponse2001.cs b/Models/InlineResponse2001.cs new file mode 100644 index 0000000..bb07573 --- /dev/null +++ b/Models/InlineResponse2001.cs @@ -0,0 +1,116 @@ +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 InlineResponse2001 { + /// + /// Gets or Sets Version + /// + [DataMember(Name="version", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "version")] + public string Version { get; set; } + + /// + /// Gets or Sets Branch + /// + [DataMember(Name="branch", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "branch")] + public string Branch { get; set; } + + /// + /// Gets or Sets ReleaseDate + /// + [DataMember(Name="releaseDate", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "releaseDate")] + public string ReleaseDate { get; set; } + + /// + /// Gets or Sets FileName + /// + [DataMember(Name="fileName", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "fileName")] + public string FileName { get; set; } + + /// + /// Gets or Sets Url + /// + [DataMember(Name="url", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "url")] + public string Url { get; set; } + + /// + /// Gets or Sets Installed + /// + [DataMember(Name="installed", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "installed")] + public bool? Installed { get; set; } + + /// + /// Gets or Sets Installable + /// + [DataMember(Name="installable", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "installable")] + public bool? Installable { get; set; } + + /// + /// Gets or Sets Latest + /// + [DataMember(Name="latest", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "latest")] + public bool? Latest { get; set; } + + /// + /// Gets or Sets Changes + /// + [DataMember(Name="changes", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "changes")] + public InlineResponse2001Changes Changes { get; set; } + + /// + /// Gets or Sets Hash + /// + [DataMember(Name="hash", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "hash")] + public string Hash { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class InlineResponse2001 {\n"); + sb.Append(" Version: ").Append(Version).Append("\n"); + sb.Append(" Branch: ").Append(Branch).Append("\n"); + sb.Append(" ReleaseDate: ").Append(ReleaseDate).Append("\n"); + sb.Append(" FileName: ").Append(FileName).Append("\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" Installed: ").Append(Installed).Append("\n"); + sb.Append(" Installable: ").Append(Installable).Append("\n"); + sb.Append(" Latest: ").Append(Latest).Append("\n"); + sb.Append(" Changes: ").Append(Changes).Append("\n"); + sb.Append(" Hash: ").Append(Hash).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); + } + +} +} diff --git a/Models/InlineResponse20010.cs b/Models/InlineResponse20010.cs new file mode 100644 index 0000000..4f2f500 --- /dev/null +++ b/Models/InlineResponse20010.cs @@ -0,0 +1,92 @@ +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 InlineResponse20010 { + /// + /// Gets or Sets TotalCount + /// + [DataMember(Name="totalCount", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "totalCount")] + public int? TotalCount { get; set; } + + /// + /// Gets or Sets Count + /// + [DataMember(Name="count", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "count")] + public int? Count { get; set; } + + /// + /// Gets or Sets UnknownCount + /// + [DataMember(Name="unknownCount", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "unknownCount")] + public int? UnknownCount { get; set; } + + /// + /// Gets or Sets Errors + /// + [DataMember(Name="errors", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "errors")] + public bool? Errors { get; set; } + + /// + /// Gets or Sets Warnings + /// + [DataMember(Name="warnings", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "warnings")] + public bool? Warnings { get; set; } + + /// + /// Gets or Sets UnknownErrors + /// + [DataMember(Name="unknownErrors", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "unknownErrors")] + public bool? UnknownErrors { get; set; } + + /// + /// Gets or Sets UnknownWarnings + /// + [DataMember(Name="unknownWarnings", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "unknownWarnings")] + public bool? UnknownWarnings { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20010 {\n"); + sb.Append(" TotalCount: ").Append(TotalCount).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append(" UnknownCount: ").Append(UnknownCount).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" Warnings: ").Append(Warnings).Append("\n"); + sb.Append(" UnknownErrors: ").Append(UnknownErrors).Append("\n"); + sb.Append(" UnknownWarnings: ").Append(UnknownWarnings).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); + } + +} +} diff --git a/Models/InlineResponse2001Changes.cs b/Models/InlineResponse2001Changes.cs new file mode 100644 index 0000000..9d8c3ac --- /dev/null +++ b/Models/InlineResponse2001Changes.cs @@ -0,0 +1,52 @@ +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 InlineResponse2001Changes { + /// + /// Gets or Sets _New + /// + [DataMember(Name="new", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "new")] + public List _New { get; set; } + + /// + /// Gets or Sets _Fixed + /// + [DataMember(Name="fixed", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "fixed")] + public List _Fixed { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class InlineResponse2001Changes {\n"); + sb.Append(" _New: ").Append(_New).Append("\n"); + sb.Append(" _Fixed: ").Append(_Fixed).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); + } + +} +} diff --git a/Models/InlineResponse2002.cs b/Models/InlineResponse2002.cs new file mode 100644 index 0000000..5933c2d --- /dev/null +++ b/Models/InlineResponse2002.cs @@ -0,0 +1,76 @@ +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 InlineResponse2002 { + /// + /// Gets or Sets Page + /// + [DataMember(Name="page", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "page")] + public int? Page { get; set; } + + /// + /// Gets or Sets PageSize + /// + [DataMember(Name="pageSize", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "pageSize")] + public int? PageSize { get; set; } + + /// + /// Gets or Sets SortDirection + /// + [DataMember(Name="sortDirection", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "sortDirection")] + public string SortDirection { get; set; } + + /// + /// Gets or Sets TotalRecords + /// + [DataMember(Name="totalRecords", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "totalRecords")] + public int? TotalRecords { get; set; } + + /// + /// Gets or Sets Records + /// + [DataMember(Name="records", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "records")] + public List Records { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class InlineResponse2002 {\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" PageSize: ").Append(PageSize).Append("\n"); + sb.Append(" SortDirection: ").Append(SortDirection).Append("\n"); + sb.Append(" TotalRecords: ").Append(TotalRecords).Append("\n"); + sb.Append(" Records: ").Append(Records).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); + } + +} +} diff --git a/Models/InlineResponse2003.cs b/Models/InlineResponse2003.cs new file mode 100644 index 0000000..0f95350 --- /dev/null +++ b/Models/InlineResponse2003.cs @@ -0,0 +1,68 @@ +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 InlineResponse2003 { + /// + /// Gets or Sets Type + /// + [DataMember(Name="type", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or Sets Label + /// + [DataMember(Name="label", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "label")] + public string Label { get; set; } + + /// + /// Gets or Sets Filters + /// + [DataMember(Name="filters", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "filters")] + public List Filters { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class InlineResponse2003 {\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Label: ").Append(Label).Append("\n"); + sb.Append(" Filters: ").Append(Filters).Append("\n"); + sb.Append(" Id: ").Append(Id).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); + } + +} +} diff --git a/Models/InlineResponse2004.cs b/Models/InlineResponse2004.cs new file mode 100644 index 0000000..84dca47 --- /dev/null +++ b/Models/InlineResponse2004.cs @@ -0,0 +1,116 @@ +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 InlineResponse2004 { + /// + /// Gets or Sets FirstDayOfWeek + /// + [DataMember(Name="firstDayOfWeek", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "firstDayOfWeek")] + public int? FirstDayOfWeek { get; set; } + + /// + /// Gets or Sets CalendarWeekColumnHeader + /// + [DataMember(Name="calendarWeekColumnHeader", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "calendarWeekColumnHeader")] + public string CalendarWeekColumnHeader { get; set; } + + /// + /// Gets or Sets MovieRuntimeFormat + /// + [DataMember(Name="movieRuntimeFormat", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "movieRuntimeFormat")] + public string MovieRuntimeFormat { get; set; } + + /// + /// Gets or Sets ShortDateFormat + /// + [DataMember(Name="shortDateFormat", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "shortDateFormat")] + public string ShortDateFormat { get; set; } + + /// + /// Gets or Sets LongDateFormat + /// + [DataMember(Name="longDateFormat", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "longDateFormat")] + public string LongDateFormat { get; set; } + + /// + /// Gets or Sets TimeFormat + /// + [DataMember(Name="timeFormat", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "timeFormat")] + public string TimeFormat { get; set; } + + /// + /// Gets or Sets ShowRelativeDates + /// + [DataMember(Name="showRelativeDates", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "showRelativeDates")] + public bool? ShowRelativeDates { get; set; } + + /// + /// Gets or Sets EnableColorImpairedMode + /// + [DataMember(Name="enableColorImpairedMode", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "enableColorImpairedMode")] + public bool? EnableColorImpairedMode { get; set; } + + /// + /// Gets or Sets MovieInfoLanguage + /// + [DataMember(Name="movieInfoLanguage", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "movieInfoLanguage")] + public int? MovieInfoLanguage { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class InlineResponse2004 {\n"); + sb.Append(" FirstDayOfWeek: ").Append(FirstDayOfWeek).Append("\n"); + sb.Append(" CalendarWeekColumnHeader: ").Append(CalendarWeekColumnHeader).Append("\n"); + sb.Append(" MovieRuntimeFormat: ").Append(MovieRuntimeFormat).Append("\n"); + sb.Append(" ShortDateFormat: ").Append(ShortDateFormat).Append("\n"); + sb.Append(" LongDateFormat: ").Append(LongDateFormat).Append("\n"); + sb.Append(" TimeFormat: ").Append(TimeFormat).Append("\n"); + sb.Append(" ShowRelativeDates: ").Append(ShowRelativeDates).Append("\n"); + sb.Append(" EnableColorImpairedMode: ").Append(EnableColorImpairedMode).Append("\n"); + sb.Append(" MovieInfoLanguage: ").Append(MovieInfoLanguage).Append("\n"); + sb.Append(" Id: ").Append(Id).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); + } + +} +} diff --git a/Models/InlineResponse2005.cs b/Models/InlineResponse2005.cs new file mode 100644 index 0000000..7d17de0 --- /dev/null +++ b/Models/InlineResponse2005.cs @@ -0,0 +1,68 @@ +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 InlineResponse2005 { + /// + /// Gets or Sets Host + /// + [DataMember(Name="host", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "host")] + public string Host { get; set; } + + /// + /// Gets or Sets RemotePath + /// + [DataMember(Name="remotePath", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "remotePath")] + public string RemotePath { get; set; } + + /// + /// Gets or Sets LocalPath + /// + [DataMember(Name="localPath", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "localPath")] + public string LocalPath { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class InlineResponse2005 {\n"); + sb.Append(" Host: ").Append(Host).Append("\n"); + sb.Append(" RemotePath: ").Append(RemotePath).Append("\n"); + sb.Append(" LocalPath: ").Append(LocalPath).Append("\n"); + sb.Append(" Id: ").Append(Id).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); + } + +} +} diff --git a/Models/InlineResponse2006.cs b/Models/InlineResponse2006.cs new file mode 100644 index 0000000..efcd5fd --- /dev/null +++ b/Models/InlineResponse2006.cs @@ -0,0 +1,88 @@ +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 InlineResponse2006 { + /// + /// 1 + /// + /// 1 + [DataMember(Name="page", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "page")] + public int? Page { get; set; } + + /// + /// 20 + /// + /// 20 + [DataMember(Name="pageSize", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "pageSize")] + public int? PageSize { get; set; } + + /// + /// descending + /// + /// descending + [DataMember(Name="sortDirection", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "sortDirection")] + public string SortDirection { get; set; } + + /// + /// date + /// + /// date + [DataMember(Name="sortKey", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "sortKey")] + public string SortKey { get; set; } + + /// + /// Gets or Sets TotalRecords + /// + [DataMember(Name="totalRecords", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "totalRecords")] + public int? TotalRecords { get; set; } + + /// + /// Gets or Sets Records + /// + [DataMember(Name="records", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "records")] + public List Records { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class InlineResponse2006 {\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" PageSize: ").Append(PageSize).Append("\n"); + sb.Append(" SortDirection: ").Append(SortDirection).Append("\n"); + sb.Append(" SortKey: ").Append(SortKey).Append("\n"); + sb.Append(" TotalRecords: ").Append(TotalRecords).Append("\n"); + sb.Append(" Records: ").Append(Records).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); + } + +} +} diff --git a/Models/InlineResponse2007.cs b/Models/InlineResponse2007.cs new file mode 100644 index 0000000..caea2be --- /dev/null +++ b/Models/InlineResponse2007.cs @@ -0,0 +1,292 @@ +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 InlineResponse2007 { + /// + /// Gets or Sets BindAddress + /// + [DataMember(Name="bindAddress", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "bindAddress")] + public string BindAddress { get; set; } + + /// + /// Gets or Sets Port + /// + [DataMember(Name="port", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "port")] + public int? Port { get; set; } + + /// + /// Gets or Sets SslPort + /// + [DataMember(Name="sslPort", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "sslPort")] + public int? SslPort { get; set; } + + /// + /// Gets or Sets EnableSsl + /// + [DataMember(Name="enableSsl", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "enableSsl")] + public bool? EnableSsl { get; set; } + + /// + /// Gets or Sets LaunchBrowser + /// + [DataMember(Name="launchBrowser", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "launchBrowser")] + public bool? LaunchBrowser { get; set; } + + /// + /// Gets or Sets AuthenticationMethod + /// + [DataMember(Name="authenticationMethod", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "authenticationMethod")] + public string AuthenticationMethod { get; set; } + + /// + /// Gets or Sets AnalyticsEnabled + /// + [DataMember(Name="analyticsEnabled", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "analyticsEnabled")] + public bool? AnalyticsEnabled { get; set; } + + /// + /// Gets or Sets Username + /// + [DataMember(Name="username", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "username")] + public string Username { get; set; } + + /// + /// Gets or Sets Password + /// + [DataMember(Name="password", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "password")] + public string Password { get; set; } + + /// + /// Gets or Sets LogLevel + /// + [DataMember(Name="logLevel", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "logLevel")] + public string LogLevel { get; set; } + + /// + /// Gets or Sets ConsoleLogLevel + /// + [DataMember(Name="consoleLogLevel", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "consoleLogLevel")] + public string ConsoleLogLevel { get; set; } + + /// + /// Gets or Sets Branch + /// + [DataMember(Name="branch", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "branch")] + public string Branch { get; set; } + + /// + /// Gets or Sets ApiKey + /// + [DataMember(Name="apiKey", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "apiKey")] + public string ApiKey { get; set; } + + /// + /// Gets or Sets SslCertPath + /// + [DataMember(Name="sslCertPath", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "sslCertPath")] + public string SslCertPath { get; set; } + + /// + /// Gets or Sets SslCertPassword + /// + [DataMember(Name="sslCertPassword", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "sslCertPassword")] + public string SslCertPassword { get; set; } + + /// + /// Gets or Sets UrlBase + /// + [DataMember(Name="urlBase", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "urlBase")] + public string UrlBase { get; set; } + + /// + /// Gets or Sets UpdateAutomatically + /// + [DataMember(Name="updateAutomatically", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "updateAutomatically")] + public bool? UpdateAutomatically { get; set; } + + /// + /// Gets or Sets UpdateMechanism + /// + [DataMember(Name="updateMechanism", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "updateMechanism")] + public string UpdateMechanism { get; set; } + + /// + /// Gets or Sets UpdateScriptPath + /// + [DataMember(Name="updateScriptPath", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "updateScriptPath")] + public string UpdateScriptPath { get; set; } + + /// + /// Gets or Sets ProxyEnabled + /// + [DataMember(Name="proxyEnabled", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "proxyEnabled")] + public bool? ProxyEnabled { get; set; } + + /// + /// Gets or Sets ProxyType + /// + [DataMember(Name="proxyType", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "proxyType")] + public string ProxyType { get; set; } + + /// + /// Gets or Sets ProxyHostname + /// + [DataMember(Name="proxyHostname", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "proxyHostname")] + public string ProxyHostname { get; set; } + + /// + /// Gets or Sets ProxyPort + /// + [DataMember(Name="proxyPort", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "proxyPort")] + public int? ProxyPort { get; set; } + + /// + /// Gets or Sets ProxyUsername + /// + [DataMember(Name="proxyUsername", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "proxyUsername")] + public string ProxyUsername { get; set; } + + /// + /// Gets or Sets ProxyPassword + /// + [DataMember(Name="proxyPassword", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "proxyPassword")] + public string ProxyPassword { get; set; } + + /// + /// Gets or Sets ProxyBypassFilter + /// + [DataMember(Name="proxyBypassFilter", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "proxyBypassFilter")] + public string ProxyBypassFilter { get; set; } + + /// + /// Gets or Sets ProxyBypassLocalAddresses + /// + [DataMember(Name="proxyBypassLocalAddresses", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "proxyBypassLocalAddresses")] + public bool? ProxyBypassLocalAddresses { get; set; } + + /// + /// Gets or Sets CertificateValidation + /// + [DataMember(Name="certificateValidation", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "certificateValidation")] + public string CertificateValidation { get; set; } + + /// + /// Gets or Sets BackupFolder + /// + [DataMember(Name="backupFolder", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "backupFolder")] + public string BackupFolder { get; set; } + + /// + /// Gets or Sets BackupInterval + /// + [DataMember(Name="backupInterval", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "backupInterval")] + public int? BackupInterval { get; set; } + + /// + /// Gets or Sets BackupRetention + /// + [DataMember(Name="backupRetention", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "backupRetention")] + public int? BackupRetention { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class InlineResponse2007 {\n"); + sb.Append(" BindAddress: ").Append(BindAddress).Append("\n"); + sb.Append(" Port: ").Append(Port).Append("\n"); + sb.Append(" SslPort: ").Append(SslPort).Append("\n"); + sb.Append(" EnableSsl: ").Append(EnableSsl).Append("\n"); + sb.Append(" LaunchBrowser: ").Append(LaunchBrowser).Append("\n"); + sb.Append(" AuthenticationMethod: ").Append(AuthenticationMethod).Append("\n"); + sb.Append(" AnalyticsEnabled: ").Append(AnalyticsEnabled).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" LogLevel: ").Append(LogLevel).Append("\n"); + sb.Append(" ConsoleLogLevel: ").Append(ConsoleLogLevel).Append("\n"); + sb.Append(" Branch: ").Append(Branch).Append("\n"); + sb.Append(" ApiKey: ").Append(ApiKey).Append("\n"); + sb.Append(" SslCertPath: ").Append(SslCertPath).Append("\n"); + sb.Append(" SslCertPassword: ").Append(SslCertPassword).Append("\n"); + sb.Append(" UrlBase: ").Append(UrlBase).Append("\n"); + sb.Append(" UpdateAutomatically: ").Append(UpdateAutomatically).Append("\n"); + sb.Append(" UpdateMechanism: ").Append(UpdateMechanism).Append("\n"); + sb.Append(" UpdateScriptPath: ").Append(UpdateScriptPath).Append("\n"); + sb.Append(" ProxyEnabled: ").Append(ProxyEnabled).Append("\n"); + sb.Append(" ProxyType: ").Append(ProxyType).Append("\n"); + sb.Append(" ProxyHostname: ").Append(ProxyHostname).Append("\n"); + sb.Append(" ProxyPort: ").Append(ProxyPort).Append("\n"); + sb.Append(" ProxyUsername: ").Append(ProxyUsername).Append("\n"); + sb.Append(" ProxyPassword: ").Append(ProxyPassword).Append("\n"); + sb.Append(" ProxyBypassFilter: ").Append(ProxyBypassFilter).Append("\n"); + sb.Append(" ProxyBypassLocalAddresses: ").Append(ProxyBypassLocalAddresses).Append("\n"); + sb.Append(" CertificateValidation: ").Append(CertificateValidation).Append("\n"); + sb.Append(" BackupFolder: ").Append(BackupFolder).Append("\n"); + sb.Append(" BackupInterval: ").Append(BackupInterval).Append("\n"); + sb.Append(" BackupRetention: ").Append(BackupRetention).Append("\n"); + sb.Append(" Id: ").Append(Id).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); + } + +} +} diff --git a/Models/InlineResponse2008.cs b/Models/InlineResponse2008.cs new file mode 100644 index 0000000..39b0a1b --- /dev/null +++ b/Models/InlineResponse2008.cs @@ -0,0 +1,100 @@ +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 InlineResponse2008 { + /// + /// Gets or Sets RenameMovies + /// + [DataMember(Name="renameMovies", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "renameMovies")] + public bool? RenameMovies { get; set; } + + /// + /// Gets or Sets ReplaceIllegalCharacters + /// + [DataMember(Name="replaceIllegalCharacters", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "replaceIllegalCharacters")] + public bool? ReplaceIllegalCharacters { get; set; } + + /// + /// Gets or Sets ColonReplacementFormat + /// + [DataMember(Name="colonReplacementFormat", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "colonReplacementFormat")] + public string ColonReplacementFormat { get; set; } + + /// + /// Gets or Sets StandardMovieFormat + /// + [DataMember(Name="standardMovieFormat", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "standardMovieFormat")] + public string StandardMovieFormat { get; set; } + + /// + /// Gets or Sets MovieFolderFormat + /// + [DataMember(Name="movieFolderFormat", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "movieFolderFormat")] + public string MovieFolderFormat { get; set; } + + /// + /// Gets or Sets IncludeQuality + /// + [DataMember(Name="includeQuality", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "includeQuality")] + public bool? IncludeQuality { get; set; } + + /// + /// Gets or Sets ReplaceSpaces + /// + [DataMember(Name="replaceSpaces", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "replaceSpaces")] + public bool? ReplaceSpaces { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public decimal? Id { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class InlineResponse2008 {\n"); + sb.Append(" RenameMovies: ").Append(RenameMovies).Append("\n"); + sb.Append(" ReplaceIllegalCharacters: ").Append(ReplaceIllegalCharacters).Append("\n"); + sb.Append(" ColonReplacementFormat: ").Append(ColonReplacementFormat).Append("\n"); + sb.Append(" StandardMovieFormat: ").Append(StandardMovieFormat).Append("\n"); + sb.Append(" MovieFolderFormat: ").Append(MovieFolderFormat).Append("\n"); + sb.Append(" IncludeQuality: ").Append(IncludeQuality).Append("\n"); + sb.Append(" ReplaceSpaces: ").Append(ReplaceSpaces).Append("\n"); + sb.Append(" Id: ").Append(Id).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); + } + +} +} diff --git a/Models/InlineResponse2009.cs b/Models/InlineResponse2009.cs new file mode 100644 index 0000000..fd75e07 --- /dev/null +++ b/Models/InlineResponse2009.cs @@ -0,0 +1,188 @@ +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 InlineResponse2009 { + /// + /// Gets or Sets Languages + /// + [DataMember(Name="languages", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "languages")] + public List Languages { get; set; } + + /// + /// Gets or Sets Quality + /// + [DataMember(Name="quality", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "quality")] + public Quality Quality { get; set; } + + /// + /// Gets or Sets CustomFormats + /// + [DataMember(Name="customFormats", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "customFormats")] + public List CustomFormats { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name="size", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "size")] + public decimal? Size { get; set; } + + /// + /// Gets or Sets Title + /// + [DataMember(Name="title", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "title")] + public string Title { get; set; } + + /// + /// Gets or Sets Sizeleft + /// + [DataMember(Name="sizeleft", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "sizeleft")] + public decimal? Sizeleft { get; set; } + + /// + /// Gets or Sets Timeleft + /// + [DataMember(Name="timeleft", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "timeleft")] + public string Timeleft { get; set; } + + /// + /// Gets or Sets EstimatedCompletionTime + /// + [DataMember(Name="estimatedCompletionTime", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "estimatedCompletionTime")] + public string EstimatedCompletionTime { get; set; } + + /// + /// Gets or Sets Status + /// + [DataMember(Name="status", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or Sets TrackedDownloadStatus + /// + [DataMember(Name="trackedDownloadStatus", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "trackedDownloadStatus")] + public string TrackedDownloadStatus { get; set; } + + /// + /// Gets or Sets TrackedDownloadState + /// + [DataMember(Name="trackedDownloadState", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "trackedDownloadState")] + public string TrackedDownloadState { get; set; } + + /// + /// Gets or Sets StatusMessages + /// + [DataMember(Name="statusMessages", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "statusMessages")] + public List StatusMessages { get; set; } + + /// + /// Gets or Sets ErrorMessage + /// + [DataMember(Name="errorMessage", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "errorMessage")] + public string ErrorMessage { get; set; } + + /// + /// Gets or Sets DownloadId + /// + [DataMember(Name="downloadId", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "downloadId")] + public string DownloadId { get; set; } + + /// + /// Gets or Sets Protocol + /// + [DataMember(Name="protocol", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "protocol")] + public string Protocol { get; set; } + + /// + /// Gets or Sets DownloadClient + /// + [DataMember(Name="downloadClient", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "downloadClient")] + public string DownloadClient { get; set; } + + /// + /// Gets or Sets Indexer + /// + [DataMember(Name="indexer", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "indexer")] + public string Indexer { get; set; } + + /// + /// Gets or Sets OutputPath + /// + [DataMember(Name="outputPath", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "outputPath")] + public string OutputPath { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class InlineResponse2009 {\n"); + sb.Append(" Languages: ").Append(Languages).Append("\n"); + sb.Append(" Quality: ").Append(Quality).Append("\n"); + sb.Append(" CustomFormats: ").Append(CustomFormats).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append(" Sizeleft: ").Append(Sizeleft).Append("\n"); + sb.Append(" Timeleft: ").Append(Timeleft).Append("\n"); + sb.Append(" EstimatedCompletionTime: ").Append(EstimatedCompletionTime).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" TrackedDownloadStatus: ").Append(TrackedDownloadStatus).Append("\n"); + sb.Append(" TrackedDownloadState: ").Append(TrackedDownloadState).Append("\n"); + sb.Append(" StatusMessages: ").Append(StatusMessages).Append("\n"); + sb.Append(" ErrorMessage: ").Append(ErrorMessage).Append("\n"); + sb.Append(" DownloadId: ").Append(DownloadId).Append("\n"); + sb.Append(" Protocol: ").Append(Protocol).Append("\n"); + sb.Append(" DownloadClient: ").Append(DownloadClient).Append("\n"); + sb.Append(" Indexer: ").Append(Indexer).Append("\n"); + sb.Append(" OutputPath: ").Append(OutputPath).Append("\n"); + sb.Append(" Id: ").Append(Id).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); + } + +} +} diff --git a/Models/InlineResponse201.cs b/Models/InlineResponse201.cs new file mode 100644 index 0000000..40947cc --- /dev/null +++ b/Models/InlineResponse201.cs @@ -0,0 +1,44 @@ +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 InlineResponse201 { + /// + /// Gets or Sets Name + /// + [DataMember(Name="name", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class InlineResponse201 {\n"); + sb.Append(" Name: ").Append(Name).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); + } + +} +} diff --git a/Models/InlineResponse401.cs b/Models/InlineResponse401.cs new file mode 100644 index 0000000..50561d0 --- /dev/null +++ b/Models/InlineResponse401.cs @@ -0,0 +1,44 @@ +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 InlineResponse401 { + /// + /// Gets or Sets Error + /// + [DataMember(Name="error", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "error")] + public string Error { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class InlineResponse401 {\n"); + sb.Append(" Error: ").Append(Error).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); + } + +} +} diff --git a/Models/Metadata.cs b/Models/Metadata.cs new file mode 100644 index 0000000..02d0506 --- /dev/null +++ b/Models/Metadata.cs @@ -0,0 +1,108 @@ +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 Metadata { + /// + /// Gets or Sets Enable + /// + [DataMember(Name="enable", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "enable")] + public bool? Enable { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name="name", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or Sets Fields + /// + [DataMember(Name="fields", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "fields")] + public List Fields { get; set; } + + /// + /// Gets or Sets ImplementationName + /// + [DataMember(Name="implementationName", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "implementationName")] + public string ImplementationName { get; set; } + + /// + /// Gets or Sets Implementation + /// + [DataMember(Name="implementation", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "implementation")] + public string Implementation { get; set; } + + /// + /// Gets or Sets ConfigContract + /// + [DataMember(Name="configContract", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "configContract")] + public string ConfigContract { get; set; } + + /// + /// Gets or Sets InfoLink + /// + [DataMember(Name="infoLink", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "infoLink")] + public string InfoLink { get; set; } + + /// + /// Gets or Sets Tags + /// + [DataMember(Name="tags", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "tags")] + public List Tags { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class Metadata {\n"); + sb.Append(" Enable: ").Append(Enable).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Fields: ").Append(Fields).Append("\n"); + sb.Append(" ImplementationName: ").Append(ImplementationName).Append("\n"); + sb.Append(" Implementation: ").Append(Implementation).Append("\n"); + sb.Append(" ConfigContract: ").Append(ConfigContract).Append("\n"); + sb.Append(" InfoLink: ").Append(InfoLink).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" Id: ").Append(Id).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); + } + +} +} diff --git a/Models/Movie.cs b/Models/Movie.cs new file mode 100644 index 0000000..6daa2f7 --- /dev/null +++ b/Models/Movie.cs @@ -0,0 +1,302 @@ +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); + } + + } +} diff --git a/Models/MovieEditorBody.cs b/Models/MovieEditorBody.cs new file mode 100644 index 0000000..bced4d2 --- /dev/null +++ b/Models/MovieEditorBody.cs @@ -0,0 +1,100 @@ +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 MovieEditorBody { + /// + /// Gets or Sets MovieIds + /// + [DataMember(Name="movieIds", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "movieIds")] + public List MovieIds { get; set; } + + /// + /// Gets or Sets Monitored + /// + [DataMember(Name="monitored", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "monitored")] + public bool? Monitored { get; set; } + + /// + /// Gets or Sets QualityProfileId + /// + [DataMember(Name="qualityProfileId", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "qualityProfileId")] + public int? QualityProfileId { get; set; } + + /// + /// Gets or Sets MinimumAvailability + /// + [DataMember(Name="minimumAvailability", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "minimumAvailability")] + public string MinimumAvailability { get; set; } + + /// + /// Gets or Sets RootFolderPath + /// + [DataMember(Name="rootFolderPath", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "rootFolderPath")] + public string RootFolderPath { get; set; } + + /// + /// Gets or Sets Tags + /// + [DataMember(Name="tags", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "tags")] + public List Tags { get; set; } + + /// + /// Gets or Sets ApplyTags + /// + [DataMember(Name="applyTags", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "applyTags")] + public string ApplyTags { get; set; } + + /// + /// Gets or Sets MoveFiles + /// + [DataMember(Name="moveFiles", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "moveFiles")] + public bool? MoveFiles { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class MovieEditorBody {\n"); + sb.Append(" MovieIds: ").Append(MovieIds).Append("\n"); + sb.Append(" Monitored: ").Append(Monitored).Append("\n"); + sb.Append(" QualityProfileId: ").Append(QualityProfileId).Append("\n"); + sb.Append(" MinimumAvailability: ").Append(MinimumAvailability).Append("\n"); + sb.Append(" RootFolderPath: ").Append(RootFolderPath).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" ApplyTags: ").Append(ApplyTags).Append("\n"); + sb.Append(" MoveFiles: ").Append(MoveFiles).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); + } + +} +} diff --git a/Models/MovieEditorBody1.cs b/Models/MovieEditorBody1.cs new file mode 100644 index 0000000..9254455 --- /dev/null +++ b/Models/MovieEditorBody1.cs @@ -0,0 +1,60 @@ +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 MovieEditorBody1 { + /// + /// Gets or Sets MovieIds + /// + [DataMember(Name="movieIds", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "movieIds")] + public List MovieIds { get; set; } + + /// + /// Gets or Sets DeleteFIles + /// + [DataMember(Name="deleteFIles", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "deleteFIles")] + public bool? DeleteFIles { get; set; } + + /// + /// Gets or Sets AddImportExclusion + /// + [DataMember(Name="addImportExclusion", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "addImportExclusion")] + public bool? AddImportExclusion { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class MovieEditorBody1 {\n"); + sb.Append(" MovieIds: ").Append(MovieIds).Append("\n"); + sb.Append(" DeleteFIles: ").Append(DeleteFIles).Append("\n"); + sb.Append(" AddImportExclusion: ").Append(AddImportExclusion).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); + } + +} +} diff --git a/Models/MovieFile.cs b/Models/MovieFile.cs new file mode 100644 index 0000000..1b2914c --- /dev/null +++ b/Models/MovieFile.cs @@ -0,0 +1,132 @@ +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 MovieFile { + /// + /// Gets or Sets MovieId + /// + [DataMember(Name="movieId", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "movieId")] + public int? MovieId { get; set; } + + /// + /// Gets or Sets RelativePath + /// + [DataMember(Name="relativePath", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "relativePath")] + public string RelativePath { get; set; } + + /// + /// Gets or Sets Path + /// + [DataMember(Name="path", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "path")] + public string Path { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name="size", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "size")] + public decimal? Size { get; set; } + + /// + /// Gets or Sets DateAdded + /// + [DataMember(Name="dateAdded", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "dateAdded")] + public string DateAdded { get; set; } + + /// + /// Gets or Sets IndexerFlags + /// + [DataMember(Name="indexerFlags", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "indexerFlags")] + public int? IndexerFlags { get; set; } + + /// + /// Gets or Sets Quality + /// + [DataMember(Name="quality", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "quality")] + public Quality Quality { get; set; } + + /// + /// Gets or Sets MediaInfo + /// + [DataMember(Name="mediaInfo", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "mediaInfo")] + public MovieFileMediaInfo MediaInfo { get; set; } + + /// + /// Gets or Sets QualityCutoffNotMet + /// + [DataMember(Name="qualityCutoffNotMet", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "qualityCutoffNotMet")] + public bool? QualityCutoffNotMet { get; set; } + + /// + /// Gets or Sets Languages + /// + [DataMember(Name="languages", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "languages")] + public List Languages { get; set; } + + /// + /// Gets or Sets ReleaseGroup + /// + [DataMember(Name="releaseGroup", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "releaseGroup")] + public string ReleaseGroup { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class MovieFile {\n"); + sb.Append(" MovieId: ").Append(MovieId).Append("\n"); + sb.Append(" RelativePath: ").Append(RelativePath).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" DateAdded: ").Append(DateAdded).Append("\n"); + sb.Append(" IndexerFlags: ").Append(IndexerFlags).Append("\n"); + sb.Append(" Quality: ").Append(Quality).Append("\n"); + sb.Append(" MediaInfo: ").Append(MediaInfo).Append("\n"); + sb.Append(" QualityCutoffNotMet: ").Append(QualityCutoffNotMet).Append("\n"); + sb.Append(" Languages: ").Append(Languages).Append("\n"); + sb.Append(" ReleaseGroup: ").Append(ReleaseGroup).Append("\n"); + sb.Append(" Id: ").Append(Id).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); + } + +} +} diff --git a/Models/MovieFileMediaInfo.cs b/Models/MovieFileMediaInfo.cs new file mode 100644 index 0000000..33b74c0 --- /dev/null +++ b/Models/MovieFileMediaInfo.cs @@ -0,0 +1,148 @@ +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 MovieFileMediaInfo { + /// + /// Gets or Sets AudioAdditionalFeatures + /// + [DataMember(Name="audioAdditionalFeatures", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "audioAdditionalFeatures")] + public string AudioAdditionalFeatures { get; set; } + + /// + /// Gets or Sets AudioBitrate + /// + [DataMember(Name="audioBitrate", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "audioBitrate")] + public decimal? AudioBitrate { get; set; } + + /// + /// Gets or Sets AudioChannels + /// + [DataMember(Name="audioChannels", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "audioChannels")] + public decimal? AudioChannels { get; set; } + + /// + /// Gets or Sets AudioCodec + /// + [DataMember(Name="audioCodec", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "audioCodec")] + public string AudioCodec { get; set; } + + /// + /// Gets or Sets AudioLanguages + /// + [DataMember(Name="audioLanguages", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "audioLanguages")] + public string AudioLanguages { get; set; } + + /// + /// Gets or Sets AudioStreamCount + /// + [DataMember(Name="audioStreamCount", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "audioStreamCount")] + public decimal? AudioStreamCount { get; set; } + + /// + /// Gets or Sets VideoBitDepth + /// + [DataMember(Name="videoBitDepth", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "videoBitDepth")] + public decimal? VideoBitDepth { get; set; } + + /// + /// Gets or Sets VideoBitrate + /// + [DataMember(Name="videoBitrate", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "videoBitrate")] + public decimal? VideoBitrate { get; set; } + + /// + /// Gets or Sets VideoCodec + /// + [DataMember(Name="videoCodec", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "videoCodec")] + public string VideoCodec { get; set; } + + /// + /// Gets or Sets VideoFps + /// + [DataMember(Name="videoFps", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "videoFps")] + public decimal? VideoFps { get; set; } + + /// + /// Gets or Sets Resolution + /// + [DataMember(Name="resolution", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "resolution")] + public string Resolution { get; set; } + + /// + /// Gets or Sets RunTime + /// + [DataMember(Name="runTime", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "runTime")] + public string RunTime { get; set; } + + /// + /// Gets or Sets ScanType + /// + [DataMember(Name="scanType", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "scanType")] + public string ScanType { get; set; } + + /// + /// Gets or Sets Subtitles + /// + [DataMember(Name="subtitles", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "subtitles")] + public string Subtitles { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class MovieFileMediaInfo {\n"); + sb.Append(" AudioAdditionalFeatures: ").Append(AudioAdditionalFeatures).Append("\n"); + sb.Append(" AudioBitrate: ").Append(AudioBitrate).Append("\n"); + sb.Append(" AudioChannels: ").Append(AudioChannels).Append("\n"); + sb.Append(" AudioCodec: ").Append(AudioCodec).Append("\n"); + sb.Append(" AudioLanguages: ").Append(AudioLanguages).Append("\n"); + sb.Append(" AudioStreamCount: ").Append(AudioStreamCount).Append("\n"); + sb.Append(" VideoBitDepth: ").Append(VideoBitDepth).Append("\n"); + sb.Append(" VideoBitrate: ").Append(VideoBitrate).Append("\n"); + sb.Append(" VideoCodec: ").Append(VideoCodec).Append("\n"); + sb.Append(" VideoFps: ").Append(VideoFps).Append("\n"); + sb.Append(" Resolution: ").Append(Resolution).Append("\n"); + sb.Append(" RunTime: ").Append(RunTime).Append("\n"); + sb.Append(" ScanType: ").Append(ScanType).Append("\n"); + sb.Append(" Subtitles: ").Append(Subtitles).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); + } + +} +} diff --git a/Models/Notification.cs b/Models/Notification.cs new file mode 100644 index 0000000..26f36e4 --- /dev/null +++ b/Models/Notification.cs @@ -0,0 +1,212 @@ +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 Notification { + /// + /// Gets or Sets OnGrab + /// + [DataMember(Name="onGrab", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "onGrab")] + public bool? OnGrab { get; set; } + + /// + /// Gets or Sets OnDownload + /// + [DataMember(Name="onDownload", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "onDownload")] + public bool? OnDownload { get; set; } + + /// + /// Gets or Sets OnUpgrade + /// + [DataMember(Name="onUpgrade", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "onUpgrade")] + public bool? OnUpgrade { get; set; } + + /// + /// Gets or Sets OnRename + /// + [DataMember(Name="onRename", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "onRename")] + public bool? OnRename { get; set; } + + /// + /// Gets or Sets OnDelete + /// + [DataMember(Name="onDelete", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "onDelete")] + public bool? OnDelete { get; set; } + + /// + /// Gets or Sets OnHealthIssue + /// + [DataMember(Name="onHealthIssue", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "onHealthIssue")] + public bool? OnHealthIssue { get; set; } + + /// + /// Gets or Sets SupportsOnGrab + /// + [DataMember(Name="supportsOnGrab", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "supportsOnGrab")] + public bool? SupportsOnGrab { get; set; } + + /// + /// Gets or Sets SupportsOnDownload + /// + [DataMember(Name="supportsOnDownload", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "supportsOnDownload")] + public bool? SupportsOnDownload { get; set; } + + /// + /// Gets or Sets SupportsOnUpgrade + /// + [DataMember(Name="supportsOnUpgrade", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "supportsOnUpgrade")] + public bool? SupportsOnUpgrade { get; set; } + + /// + /// Gets or Sets SupportsOnRename + /// + [DataMember(Name="supportsOnRename", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "supportsOnRename")] + public bool? SupportsOnRename { get; set; } + + /// + /// Gets or Sets SupportsOnDelete + /// + [DataMember(Name="supportsOnDelete", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "supportsOnDelete")] + public bool? SupportsOnDelete { get; set; } + + /// + /// Gets or Sets SupportsOnHealthIssue + /// + [DataMember(Name="supportsOnHealthIssue", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "supportsOnHealthIssue")] + public bool? SupportsOnHealthIssue { get; set; } + + /// + /// Gets or Sets IncludeHealthWarnings + /// + [DataMember(Name="includeHealthWarnings", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "includeHealthWarnings")] + public bool? IncludeHealthWarnings { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name="name", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or Sets Fields + /// + [DataMember(Name="fields", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "fields")] + public List Fields { get; set; } + + /// + /// Gets or Sets ImplementationName + /// + [DataMember(Name="implementationName", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "implementationName")] + public string ImplementationName { get; set; } + + /// + /// Gets or Sets Implementation + /// + [DataMember(Name="implementation", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "implementation")] + public string Implementation { get; set; } + + /// + /// Gets or Sets ConfigContract + /// + [DataMember(Name="configContract", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "configContract")] + public string ConfigContract { get; set; } + + /// + /// Gets or Sets InfoLink + /// + [DataMember(Name="infoLink", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "infoLink")] + public string InfoLink { get; set; } + + /// + /// Gets or Sets Message + /// + [DataMember(Name="message", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "message")] + public NotificationMessage Message { get; set; } + + /// + /// Gets or Sets Tags + /// + [DataMember(Name="tags", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "tags")] + public List Tags { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class Notification {\n"); + sb.Append(" OnGrab: ").Append(OnGrab).Append("\n"); + sb.Append(" OnDownload: ").Append(OnDownload).Append("\n"); + sb.Append(" OnUpgrade: ").Append(OnUpgrade).Append("\n"); + sb.Append(" OnRename: ").Append(OnRename).Append("\n"); + sb.Append(" OnDelete: ").Append(OnDelete).Append("\n"); + sb.Append(" OnHealthIssue: ").Append(OnHealthIssue).Append("\n"); + sb.Append(" SupportsOnGrab: ").Append(SupportsOnGrab).Append("\n"); + sb.Append(" SupportsOnDownload: ").Append(SupportsOnDownload).Append("\n"); + sb.Append(" SupportsOnUpgrade: ").Append(SupportsOnUpgrade).Append("\n"); + sb.Append(" SupportsOnRename: ").Append(SupportsOnRename).Append("\n"); + sb.Append(" SupportsOnDelete: ").Append(SupportsOnDelete).Append("\n"); + sb.Append(" SupportsOnHealthIssue: ").Append(SupportsOnHealthIssue).Append("\n"); + sb.Append(" IncludeHealthWarnings: ").Append(IncludeHealthWarnings).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Fields: ").Append(Fields).Append("\n"); + sb.Append(" ImplementationName: ").Append(ImplementationName).Append("\n"); + sb.Append(" Implementation: ").Append(Implementation).Append("\n"); + sb.Append(" ConfigContract: ").Append(ConfigContract).Append("\n"); + sb.Append(" InfoLink: ").Append(InfoLink).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" Id: ").Append(Id).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); + } + +} +} diff --git a/Models/NotificationMessage.cs b/Models/NotificationMessage.cs new file mode 100644 index 0000000..26507a6 --- /dev/null +++ b/Models/NotificationMessage.cs @@ -0,0 +1,52 @@ +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 NotificationMessage { + /// + /// Gets or Sets Message + /// + [DataMember(Name="message", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or Sets Type + /// + [DataMember(Name="type", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class NotificationMessage {\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Type: ").Append(Type).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); + } + +} +} diff --git a/Models/ProviderField.cs b/Models/ProviderField.cs new file mode 100644 index 0000000..2a1e5e7 --- /dev/null +++ b/Models/ProviderField.cs @@ -0,0 +1,92 @@ +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 ProviderField { + /// + /// Gets or Sets Order + /// + [DataMember(Name="order", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "order")] + public int? Order { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name="name", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or Sets Label + /// + [DataMember(Name="label", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "label")] + public string Label { get; set; } + + /// + /// Gets or Sets HelpText + /// + [DataMember(Name="helpText", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "helpText")] + public string HelpText { get; set; } + + /// + /// Gets or Sets Value + /// + [DataMember(Name="value", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + /// + /// Gets or Sets Type + /// + [DataMember(Name="type", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or Sets Advanced + /// + [DataMember(Name="advanced", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "advanced")] + public bool? Advanced { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class ProviderField {\n"); + sb.Append(" Order: ").Append(Order).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Label: ").Append(Label).Append("\n"); + sb.Append(" HelpText: ").Append(HelpText).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Advanced: ").Append(Advanced).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); + } + +} +} diff --git a/Models/Quality.cs b/Models/Quality.cs new file mode 100644 index 0000000..3f935fc --- /dev/null +++ b/Models/Quality.cs @@ -0,0 +1,52 @@ +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 Quality { + /// + /// Gets or Sets _Quality + /// + [DataMember(Name="quality", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "quality")] + public QualityQuality _Quality { get; set; } + + /// + /// Gets or Sets Revision + /// + [DataMember(Name="revision", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "revision")] + public QualityRevision Revision { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class Quality {\n"); + sb.Append(" _Quality: ").Append(_Quality).Append("\n"); + sb.Append(" Revision: ").Append(Revision).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); + } + +} +} diff --git a/Models/QualityProfile.cs b/Models/QualityProfile.cs new file mode 100644 index 0000000..d3ff869 --- /dev/null +++ b/Models/QualityProfile.cs @@ -0,0 +1,108 @@ +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 QualityProfile { + /// + /// Gets or Sets Name + /// + [DataMember(Name="name", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or Sets UpgradeAllowed + /// + [DataMember(Name="upgradeAllowed", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "upgradeAllowed")] + public bool? UpgradeAllowed { get; set; } + + /// + /// Gets or Sets Cutoff + /// + [DataMember(Name="cutoff", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "cutoff")] + public int? Cutoff { get; set; } + + /// + /// Gets or Sets Items + /// + [DataMember(Name="items", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "items")] + public List Items { get; set; } + + /// + /// Gets or Sets MinFormatScore + /// + [DataMember(Name="minFormatScore", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "minFormatScore")] + public int? MinFormatScore { get; set; } + + /// + /// Gets or Sets CutoffFormatScore + /// + [DataMember(Name="cutoffFormatScore", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "cutoffFormatScore")] + public int? CutoffFormatScore { get; set; } + + /// + /// Gets or Sets FormatItems + /// + [DataMember(Name="formatItems", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "formatItems")] + public List FormatItems { get; set; } + + /// + /// Gets or Sets Language + /// + [DataMember(Name="language", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "language")] + public QueuedetailsLanguages Language { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class QualityProfile {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" UpgradeAllowed: ").Append(UpgradeAllowed).Append("\n"); + sb.Append(" Cutoff: ").Append(Cutoff).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" MinFormatScore: ").Append(MinFormatScore).Append("\n"); + sb.Append(" CutoffFormatScore: ").Append(CutoffFormatScore).Append("\n"); + sb.Append(" FormatItems: ").Append(FormatItems).Append("\n"); + sb.Append(" Language: ").Append(Language).Append("\n"); + sb.Append(" Id: ").Append(Id).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); + } + +} +} diff --git a/Models/QualityProfileFormatItems.cs b/Models/QualityProfileFormatItems.cs new file mode 100644 index 0000000..7dc1db9 --- /dev/null +++ b/Models/QualityProfileFormatItems.cs @@ -0,0 +1,60 @@ +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 QualityProfileFormatItems { + /// + /// Gets or Sets Format + /// + [DataMember(Name="format", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "format")] + public int? Format { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name="name", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or Sets Score + /// + [DataMember(Name="score", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "score")] + public int? Score { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class QualityProfileFormatItems {\n"); + sb.Append(" Format: ").Append(Format).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Score: ").Append(Score).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); + } + +} +} diff --git a/Models/QualityQuality.cs b/Models/QualityQuality.cs new file mode 100644 index 0000000..84550ac --- /dev/null +++ b/Models/QualityQuality.cs @@ -0,0 +1,76 @@ +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 QualityQuality { + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name="name", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or Sets Source + /// + [DataMember(Name="source", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "source")] + public string Source { get; set; } + + /// + /// Gets or Sets Resolution + /// + [DataMember(Name="resolution", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "resolution")] + public int? Resolution { get; set; } + + /// + /// Gets or Sets Modifier + /// + [DataMember(Name="modifier", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "modifier")] + public string Modifier { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class QualityQuality {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Source: ").Append(Source).Append("\n"); + sb.Append(" Resolution: ").Append(Resolution).Append("\n"); + sb.Append(" Modifier: ").Append(Modifier).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); + } + +} +} diff --git a/Models/QualityRevision.cs b/Models/QualityRevision.cs new file mode 100644 index 0000000..91cebf4 --- /dev/null +++ b/Models/QualityRevision.cs @@ -0,0 +1,60 @@ +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 QualityRevision { + /// + /// Gets or Sets Version + /// + [DataMember(Name="version", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "version")] + public int? Version { get; set; } + + /// + /// Gets or Sets Real + /// + [DataMember(Name="real", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "real")] + public int? Real { get; set; } + + /// + /// Gets or Sets IsRepack + /// + [DataMember(Name="isRepack", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "isRepack")] + public bool? IsRepack { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class QualityRevision {\n"); + sb.Append(" Version: ").Append(Version).Append("\n"); + sb.Append(" Real: ").Append(Real).Append("\n"); + sb.Append(" IsRepack: ").Append(IsRepack).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); + } + +} +} diff --git a/Models/QueueBulkBody.cs b/Models/QueueBulkBody.cs new file mode 100644 index 0000000..35f91cb --- /dev/null +++ b/Models/QueueBulkBody.cs @@ -0,0 +1,44 @@ +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 QueueBulkBody { + /// + /// Gets or Sets Ids + /// + [DataMember(Name="ids", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "ids")] + public List Ids { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class QueueBulkBody {\n"); + sb.Append(" Ids: ").Append(Ids).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); + } + +} +} diff --git a/Models/QueuedetailsLanguages.cs b/Models/QueuedetailsLanguages.cs new file mode 100644 index 0000000..3d8c6b2 --- /dev/null +++ b/Models/QueuedetailsLanguages.cs @@ -0,0 +1,52 @@ +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 QueuedetailsLanguages { + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name="name", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class QueuedetailsLanguages {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).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); + } + +} +} diff --git a/Models/QueuedetailsStatusMessages.cs b/Models/QueuedetailsStatusMessages.cs new file mode 100644 index 0000000..d5c700f --- /dev/null +++ b/Models/QueuedetailsStatusMessages.cs @@ -0,0 +1,52 @@ +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 QueuedetailsStatusMessages { + /// + /// Gets or Sets Title + /// + [DataMember(Name="title", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "title")] + public string Title { get; set; } + + /// + /// Gets or Sets Messages + /// + [DataMember(Name="messages", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "messages")] + public List Messages { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class QueuedetailsStatusMessages {\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append(" Messages: ").Append(Messages).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); + } + +} +} diff --git a/Models/Rating.cs b/Models/Rating.cs new file mode 100644 index 0000000..0b2d546 --- /dev/null +++ b/Models/Rating.cs @@ -0,0 +1,52 @@ +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 Rating { + /// + /// Gets or Sets Votes + /// + [DataMember(Name="votes", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "votes")] + public int? Votes { get; set; } + + /// + /// Gets or Sets Value + /// + [DataMember(Name="value", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "value")] + public decimal? Value { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class Rating {\n"); + sb.Append(" Votes: ").Append(Votes).Append("\n"); + sb.Append(" Value: ").Append(Value).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); + } + +} +} diff --git a/Models/Tag.cs b/Models/Tag.cs new file mode 100644 index 0000000..b6eb19c --- /dev/null +++ b/Models/Tag.cs @@ -0,0 +1,52 @@ +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 Tag { + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// Gets or Sets Label + /// + [DataMember(Name="label", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "label")] + public string Label { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class Tag {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Label: ").Append(Label).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); + } + +} +} diff --git a/Models/TagDetail.cs b/Models/TagDetail.cs new file mode 100644 index 0000000..09bfacb --- /dev/null +++ b/Models/TagDetail.cs @@ -0,0 +1,92 @@ +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 TagDetail { + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// Gets or Sets Label + /// + [DataMember(Name="label", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "label")] + public string Label { get; set; } + + /// + /// Gets or Sets DelayProfileIds + /// + [DataMember(Name="delayProfileIds", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "delayProfileIds")] + public List DelayProfileIds { get; set; } + + /// + /// Gets or Sets NotificationIds + /// + [DataMember(Name="notificationIds", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "notificationIds")] + public List NotificationIds { get; set; } + + /// + /// Gets or Sets RestrictionIds + /// + [DataMember(Name="restrictionIds", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "restrictionIds")] + public List RestrictionIds { get; set; } + + /// + /// Gets or Sets NetImportIds + /// + [DataMember(Name="netImportIds", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "netImportIds")] + public List NetImportIds { get; set; } + + /// + /// Gets or Sets MovieIds + /// + [DataMember(Name="movieIds", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "movieIds")] + public List MovieIds { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class TagDetail {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Label: ").Append(Label).Append("\n"); + sb.Append(" DelayProfileIds: ").Append(DelayProfileIds).Append("\n"); + sb.Append(" NotificationIds: ").Append(NotificationIds).Append("\n"); + sb.Append(" RestrictionIds: ").Append(RestrictionIds).Append("\n"); + sb.Append(" NetImportIds: ").Append(NetImportIds).Append("\n"); + sb.Append(" MovieIds: ").Append(MovieIds).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); + } + +} +} diff --git a/Proxies/IRadarrProxy.cs b/Proxies/IRadarrProxy.cs new file mode 100644 index 0000000..a33afab --- /dev/null +++ b/Proxies/IRadarrProxy.cs @@ -0,0 +1,13 @@ +using System.Net.Http; +using System.Threading.Tasks; + +namespace RadarrSharp.Proxies +{ + internal interface IRadarrProxy + { + Task GetAsync(string url); + Task PostAsync(string rootUrl, U data); + Task PutAsync(string rootUrl, U data); + Task DeleteAsync(string rootUrl); + } +} diff --git a/Proxies/RadarrProxy.cs b/Proxies/RadarrProxy.cs new file mode 100644 index 0000000..8321cd0 --- /dev/null +++ b/Proxies/RadarrProxy.cs @@ -0,0 +1,53 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; + +namespace RadarrSharp.Proxies +{ + public class RadarrProxy : IRadarrProxy + { + private HttpClient _client; + public RadarrProxy() + { + _client = new HttpClient(); + } + public async Task GetAsync(string rootUrl) + { + var resp = await _client.GetAsync(rootUrl); + var content = await resp.Content.ReadAsStringAsync(); + return JsonConvert.DeserializeObject(content); + } + + public async Task PostAsync(string rootUrl, U data) + { + var jsonPayload = JsonConvert.SerializeObject(data); + var response = await _client.PostAsync(rootUrl, PrepJsonForPost(jsonPayload)); + var resp = await response.Content.ReadAsStringAsync(); + return JsonConvert.DeserializeObject(resp); + } + + public async Task PutAsync(string rootUrl, U data) + { + var jsonPayload = JsonConvert.SerializeObject(data); + var response = await _client.PutAsync(rootUrl, PrepJsonForPost(jsonPayload)); + + return JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync()); + } + + public async Task DeleteAsync(string rootUrl) + { + var resp = await _client.DeleteAsync(rootUrl); + return resp; + } + + private StringContent PrepJsonForPost(string jsonObj) + { + return new StringContent(jsonObj, Encoding.UTF8, "application/json"); + } + } +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..76c020e --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +Radarr API implementation in c# \ No newline at end of file diff --git a/RadarrClient.cs b/RadarrClient.cs new file mode 100644 index 0000000..389b7f3 --- /dev/null +++ b/RadarrClient.cs @@ -0,0 +1,26 @@ +using RadarrSharp.Services; +using RadarrSharp.Services.Implementation; +using RadarrSharp.Services.Interface; + +namespace RadarrSharp +{ + public class RadarrClient + { + public IMovieService Movie; + public IQualityService Quality; + private string _ip, _port, _apiKey; + public RadarrClient(string ip, string port, string apiKey) + { + this._ip = ip; + this._port = port; + this._apiKey = apiKey; + RegisterRadarrServices(); + } + + private void RegisterRadarrServices() + { + Movie = new MovieService(_ip, _port, _apiKey); + Quality = new QualityService(_ip, _port, _apiKey); + } + } +} diff --git a/RadarrSharp-Siglerdev.1.0.3.nupkg b/RadarrSharp-Siglerdev.1.0.3.nupkg new file mode 100644 index 0000000..fbb2b13 Binary files /dev/null and b/RadarrSharp-Siglerdev.1.0.3.nupkg differ diff --git a/RadarrSharp.csproj b/RadarrSharp.csproj new file mode 100644 index 0000000..51d756f --- /dev/null +++ b/RadarrSharp.csproj @@ -0,0 +1,21 @@ + + + + net5.0 + 97WaterPolo + Siglerdev + RadarrSharp-Siglerdev + 1.0.0 + 42 + true + + + + + + + + + + + diff --git a/Services/BaseRadarrService.cs b/Services/BaseRadarrService.cs new file mode 100644 index 0000000..9518e56 --- /dev/null +++ b/Services/BaseRadarrService.cs @@ -0,0 +1,60 @@ +using RadarrSharp.Proxies; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; + +namespace RadarrSharp.Services +{ + public abstract class BaseRadarrService + { + private IRadarrProxy _proxy; + private string _ip, _port, _apiKey; + protected BaseRadarrService(string ip, string port, string apiKey) + { + _proxy = new RadarrProxy(); + this._ip = ip; + this._port = port; + this._apiKey = apiKey; + } + + public async Task GetAsync(string endpoint, IEnumerable> qParams = null) + { + var resp = await _proxy.GetAsync(GenerateApiUrl(endpoint, qParams)); + return resp; + } + + public async Task PostAsync(string endpoint, U data, IEnumerable> qParams = null) + { + var resp = await _proxy.PostAsync(GenerateApiUrl(endpoint, qParams), data); + return resp; + } + + public async Task PutAsync(string endpoint, U data, IEnumerable> qParams = null) + { + var resp = await _proxy.PutAsync(GenerateApiUrl(endpoint, qParams), data); + return resp; + } + public async Task DeleteAsync(string endpoint, IEnumerable> qParams = null) + { + var resp = await _proxy.DeleteAsync(GenerateApiUrl(endpoint, qParams)); + return resp; + } + + + protected string GenerateApiUrl(string endpoint, IEnumerable> qParams = null) + { + StringBuilder url = new StringBuilder($"{_ip}:{_port}/api/v3/{endpoint}?apikey={_apiKey}"); + if (qParams != null) + { + foreach (var param in qParams) + { + url.Append($"&{param.Item1}={param.Item2}"); + } + } + return url.ToString(); + } + } +} diff --git a/Services/Implementation/MovieService.cs b/Services/Implementation/MovieService.cs new file mode 100644 index 0000000..8a879e2 --- /dev/null +++ b/Services/Implementation/MovieService.cs @@ -0,0 +1,60 @@ +using RadarrSharp.Services.Interface; +using RadarrSharp.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using RadarrSharp.Helpers; +using System.Threading.Tasks; +using System.Web; + +namespace RadarrSharp.Services.Implementation +{ + + public class MovieService : BaseRadarrService, IMovieService + { + public MovieService(string ip, string port, string apiKey) : base(ip, port, apiKey) + { + + } + + public async Task> GetMovies(string tmdbId = null) + { + var movies = await base.GetAsync>("movie", tmdbId.ToTuple("tmdbId").ToList()); + return movies; + } + + public async Task AddMovie(Movie movie) + { + var resp = await base.PostAsync("movie", movie); + return resp; + } + + public async Task PutMovie(Movie movie, bool moveFiles) + { + var resp = await base.PutAsync("movie", movie, moveFiles.ToTuple("moveFiles").ToList()); + return resp; + } + + public async Task> GetMovie(int id) + { + var movies = await base.GetAsync>($"movie/{id}"); + return movies; + } + + public async Task DeleteMovie(int id, bool addImportExclusion, bool deleteFiles) + { + var responseMessage = await base.DeleteAsync($"movie/{id}", + RadarrExtensions.ParamList( + addImportExclusion.ToTuple("addImportExclusion"), + deleteFiles.ToTuple("deleteFiles"))); + return responseMessage.IsSuccessStatusCode; + } + + public async Task> MovieLookup(string searchTerm) + { + searchTerm = HttpUtility.UrlEncode(searchTerm); + var movies = await base.GetAsync>("movie/lookup", searchTerm.ToTuple("term").ToList()); + return movies; + } + } +} diff --git a/Services/Implementation/QualityService.cs b/Services/Implementation/QualityService.cs new file mode 100644 index 0000000..ec3a38e --- /dev/null +++ b/Services/Implementation/QualityService.cs @@ -0,0 +1,23 @@ +using RadarrSharp.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace RadarrSharp.Services.Implementation +{ + public class QualityService : BaseRadarrService, IQualityService + { + public QualityService(string ip, string port, string apiKey) : base(ip, port, apiKey) + { + + } + + public async Task> GetQualities() + { + var qualityProfiles = await base.GetAsync>("qualityProfile"); + return qualityProfiles; + } + } +} diff --git a/Services/Interface/IMovieService.cs b/Services/Interface/IMovieService.cs new file mode 100644 index 0000000..0db73e7 --- /dev/null +++ b/Services/Interface/IMovieService.cs @@ -0,0 +1,17 @@ +using RadarrSharp.Models; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace RadarrSharp.Services.Interface +{ + public interface IMovieService + { + Task AddMovie(Movie movie); + Task DeleteMovie(int id, bool addImportExclusion, bool deleteFiles); + Task> GetMovie(int id); + Task> GetMovies(string tmdbId = null); + Task> MovieLookup(string searchTerm); + Task PutMovie(Movie movie, bool moveFiles); + } +} diff --git a/Services/Interface/IQualityService.cs b/Services/Interface/IQualityService.cs new file mode 100644 index 0000000..ef02585 --- /dev/null +++ b/Services/Interface/IQualityService.cs @@ -0,0 +1,11 @@ +using RadarrSharp.Models; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace RadarrSharp.Services.Implementation +{ + public interface IQualityService + { + Task> GetQualities(); + } +} \ No newline at end of file