-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathRestApiTemplatedField.cs
35 lines (30 loc) · 1.05 KB
/
RestApiTemplatedField.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
34
35
using System.Text.Json.Serialization;
namespace Arcane.Framework.Sources.RestApi.Models;
/// <summary>
/// Represents a templated field in a REST API request or request body.
/// </summary>
public record RestApiTemplatedField
{
/// <summary>
/// Gets or sets the type of the templated field.
/// </summary>
[JsonPropertyName("fieldType")]
[JsonConverter(typeof(JsonStringEnumConverter))]
public TemplatedFieldType FieldType { get; init; }
/// <summary>
/// Gets or sets the name of the templated field.
/// </summary>
[JsonPropertyName("fieldName")]
public string FieldName { get; init; }
/// <summary>
/// Gets or sets the format string of the templated field.
/// </summary>
[JsonPropertyName("formatString")]
public string FormatString { get; init; }
/// <summary>
/// Gets or sets the placement of the templated field.
/// </summary>
[JsonPropertyName("placement")]
[JsonConverter(typeof(JsonStringEnumConverter))]
public TemplatedFieldPlacement Placement { get; init; }
}