mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-06-10 23:06:04 -04:00
32 lines
752 B
C#
32 lines
752 B
C#
using Newtonsoft.Json;
|
|
|
|
namespace Data.Models.Deluge.Request;
|
|
|
|
public class DelugeRequest
|
|
{
|
|
[JsonProperty(PropertyName = "id")]
|
|
public int RequestId { get; set; }
|
|
|
|
[JsonProperty(PropertyName = "method")]
|
|
public string Method { get; set; }
|
|
|
|
[JsonProperty(PropertyName = "params")]
|
|
public List<object> Params { get; set; }
|
|
|
|
[JsonIgnore]
|
|
public NullValueHandling NullValueHandling { get; set; }
|
|
|
|
public DelugeRequest(int requestId, string method, params object[]? parameters)
|
|
{
|
|
RequestId = requestId;
|
|
Method = method;
|
|
Params = [];
|
|
|
|
if (parameters != null)
|
|
{
|
|
Params.AddRange(parameters);
|
|
}
|
|
|
|
NullValueHandling = NullValueHandling.Include;
|
|
}
|
|
} |