-
Notifications
You must be signed in to change notification settings - Fork 748
Expand file tree
/
Copy pathServiceIndexModel.cs
More file actions
33 lines (27 loc) · 1.06 KB
/
ServiceIndexModel.cs
File metadata and controls
33 lines (27 loc) · 1.06 KB
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
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace NuGet.Protocol.Model
{
internal sealed class ServiceIndexModel
{
[JsonPropertyName("version")]
public string? Version { get; set; }
[JsonPropertyName("resources")]
public IReadOnlyList<ServiceIndexEntryModel>? Resources { get; set; }
}
internal sealed class ServiceIndexEntryModel
{
[JsonPropertyName("@id")]
public string? Id { get; set; }
/// <summary>JSON string or array of strings.</summary>
[JsonPropertyName("@type")]
public JsonElement Type { get; set; }
/// <summary>Optional JSON string or array of strings.</summary>
[JsonPropertyName("clientVersion")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public JsonElement ClientVersion { get; set; }
}
}