-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
DocumentFieldSchema.cs
50 lines (44 loc) · 2.13 KB
/
DocumentFieldSchema.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System.Collections.Generic;
using Azure.Core;
namespace Azure.AI.FormRecognizer.DocumentAnalysis
{
/// <summary> Description of the field semantic schema using a JSON Schema style syntax. </summary>
public partial class DocumentFieldSchema
{
/// <summary> Initializes a new instance of DocumentFieldSchema. </summary>
/// <param name="type"> Semantic data type of the field value. </param>
internal DocumentFieldSchema(DocumentFieldType type)
{
Type = type;
Properties = new ChangeTrackingDictionary<string, DocumentFieldSchema>();
}
/// <summary> Initializes a new instance of DocumentFieldSchema. </summary>
/// <param name="type"> Semantic data type of the field value. </param>
/// <param name="description"> Field description. </param>
/// <param name="example"> Example field content. </param>
/// <param name="items"> Field type schema of each array element. </param>
/// <param name="properties"> Named sub-fields of the object field. </param>
internal DocumentFieldSchema(DocumentFieldType type, string description, string example, DocumentFieldSchema items, IReadOnlyDictionary<string, DocumentFieldSchema> properties)
{
Type = type;
Description = description;
Example = example;
Items = items;
Properties = properties;
}
/// <summary> Semantic data type of the field value. </summary>
public DocumentFieldType Type { get; }
/// <summary> Field description. </summary>
public string Description { get; }
/// <summary> Example field content. </summary>
public string Example { get; }
/// <summary> Field type schema of each array element. </summary>
public DocumentFieldSchema Items { get; }
/// <summary> Named sub-fields of the object field. </summary>
public IReadOnlyDictionary<string, DocumentFieldSchema> Properties { get; }
}
}