Files
Cleanuparr/code/Data/Models/Deluge/Request/DelugeRequest.cs
2025-05-27 02:21:34 +03:00

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;
}
}