namespace OpenAuth.WebApi; public class CommonTopicRequest { /** * The command is sent and the response is matched by the tid and bid fields in the message, * and the reply should keep the tid and bid the same. */ public string Tid { get; set; } public string Bid { get; set; } public long? Timestamp { get; set; } public T Data { get; set; } public override string ToString() { return $"CommonTopicRequest{{tid='{Tid}', bid='{Bid}', timestamp={Timestamp}, data={Data}}}"; } public CommonTopicRequest SetTid(string tid) { Tid = tid; return this; } public CommonTopicRequest SetBid(string bid) { Bid = bid; return this; } public CommonTopicRequest SetTimestamp(long? timestamp) { Timestamp = timestamp; return this; } public CommonTopicRequest SetData(T data) { Data = data; return this; } } public class OsdTopicRequest : CommonTopicRequest { public string method { get; set; } public OsdTopicRequest SetTid(string tid) { Tid = tid; return this; } public OsdTopicRequest SetBid(string bid) { Bid = bid; return this; } public OsdTopicRequest SetTimestamp(long? timestamp) { Timestamp = timestamp; return this; } public OsdTopicRequest SetData(T data) { Data = data; return this; } public OsdTopicRequest SetMethod(string method) { this.method = method; return this; } }