blob: 2394b98a7624ed344bb9810505df75bcab7c2f65 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
using System.Text.Json.Serialization;
namespace LibMatrix.Homeservers.ImplementationDetails.Synapse.Models.Responses;
public class SynapseAdminBackgroundUpdateStatusResponse {
[JsonPropertyName("enabled")]
public bool Enabled { get; set; }
[JsonPropertyName("current_updates")]
public Dictionary<string, BackgroundUpdateInfo> CurrentUpdates { get; set; }
public class BackgroundUpdateInfo {
[JsonPropertyName("name")]
public string Name { get; set; }
[JsonPropertyName("total_item_count")]
public int TotalItemCount { get; set; }
[JsonPropertyName("total_duration_ms")]
public double TotalDurationMs { get; set; }
[JsonPropertyName("average_items_per_ms")]
public double AverageItemsPerMs { get; set; }
[JsonIgnore]
public TimeSpan TotalDuration => TimeSpan.FromMilliseconds(TotalDurationMs);
}
}
|