-
-
Notifications
You must be signed in to change notification settings - Fork 229
/
MappingsResponse.cs
33 lines (28 loc) · 987 Bytes
/
MappingsResponse.cs
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
29
30
31
32
33
using System.Diagnostics;
using J = Newtonsoft.Json.JsonPropertyAttribute;
using I = Newtonsoft.Json.JsonIgnoreAttribute;
namespace FModel.ViewModels.ApiEndpoints.Models;
[DebuggerDisplay("{" + nameof(FileName) + "}")]
public class MappingsResponse
{
[J] public string Url { get; set; }
[J] public string FileName { get; set; }
[I][J] public string Hash { get; private set; }
[I][J] public long Length { get; private set; }
[I][J] public string Uploaded { get; private set; }
[J] public Meta Meta { get; set; }
public MappingsResponse()
{
Url = string.Empty;
FileName = string.Empty;
Meta = new Meta();
}
[I] public bool IsValid => !string.IsNullOrEmpty(Url) &&
!string.IsNullOrEmpty(FileName);
}
[DebuggerDisplay("{" + nameof(CompressionMethod) + "}")]
public class Meta
{
[I][J] public string Version { get; private set; }
[J] public string CompressionMethod { get; set; }
}