Files
qbtmud/Lantean.QBitTorrentClient/Models/TorrentPeers.cs
2024-04-22 14:15:07 +01:00

37 lines
1014 B
C#

using System.Text.Json.Serialization;
namespace Lantean.QBitTorrentClient.Models
{
public record TorrentPeers
{
[JsonConstructor]
public TorrentPeers(
bool fullUpdate,
IReadOnlyDictionary<string, Peer>? peers,
IReadOnlyList<string>? peersRemoved,
int requestId,
bool? showFlags)
{
FullUpdate = fullUpdate;
Peers = peers;
PeersRemoved = peersRemoved;
RequestId = requestId;
ShowFlags = showFlags;
}
[JsonPropertyName("full_update")]
public bool FullUpdate { get; }
[JsonPropertyName("peers")]
public IReadOnlyDictionary<string, Peer>? Peers { get; }
[JsonPropertyName("peers_removed")]
public IReadOnlyList<string>? PeersRemoved { get; }
[JsonPropertyName("rid")]
public int RequestId { get; }
[JsonPropertyName("show_flags")]
public bool? ShowFlags { get; }
}
}