-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathSymbolCandidate.cs
More file actions
129 lines (116 loc) · 5.27 KB
/
SymbolCandidate.cs
File metadata and controls
129 lines (116 loc) · 5.27 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/*
* Regula Document Reader Web API
*
* Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core
*
* The version of the OpenAPI document: 7.6.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter;
using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter;
namespace Regula.DocumentReader.WebClient.Model
{
/// <summary>
/// Describes an individual character recognition candidate
/// </summary>
[DataContract(Name = "SymbolCandidate")]
public partial class SymbolCandidate : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="SymbolCandidate" /> class.
/// </summary>
[JsonConstructorAttribute]
protected SymbolCandidate() { }
/// <summary>
/// Initializes a new instance of the <see cref="SymbolCandidate" /> class.
/// </summary>
/// <param name="symbolCode">Unicode symbol code (required).</param>
/// <param name="symbolProbability">character recognition probability (0–100,%) (required).</param>
/// <param name="varClass">varClass.</param>
/// <param name="subClass">subClass.</param>
public SymbolCandidate(long symbolCode = default(long), int symbolProbability = default(int), int varClass = default(int), int subClass = default(int))
{
this.SymbolCode = symbolCode;
this.SymbolProbability = symbolProbability;
this.Class = varClass;
this.SubClass = subClass;
}
/// <summary>
/// Unicode symbol code
/// </summary>
/// <value>Unicode symbol code</value>
[DataMember(Name = "SymbolCode", IsRequired = true, EmitDefaultValue = true)]
public long SymbolCode { get; set; }
/// <summary>
/// character recognition probability (0–100,%)
/// </summary>
/// <value>character recognition probability (0–100,%)</value>
[DataMember(Name = "SymbolProbability", IsRequired = true, EmitDefaultValue = true)]
public int SymbolProbability { get; set; }
/// <summary>
/// Gets or Sets Class
/// </summary>
[DataMember(Name = "Class", EmitDefaultValue = false)]
public int? Class { get; set; }
/// <summary>
/// Gets or Sets SubClass
/// </summary>
[DataMember(Name = "SubClass", EmitDefaultValue = false)]
public int? SubClass { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class SymbolCandidate {\n");
sb.Append(" SymbolCode: ").Append(SymbolCode).Append("\n");
sb.Append(" SymbolProbability: ").Append(SymbolProbability).Append("\n");
sb.Append(" Class: ").Append(Class).Append("\n");
sb.Append(" SubClass: ").Append(SubClass).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
// SymbolProbability (int) maximum
if (this.SymbolProbability > (int)100)
{
yield return new ValidationResult("Invalid value for SymbolProbability, must be a value less than or equal to 100.", new [] { "SymbolProbability" });
}
// SymbolProbability (int) minimum
if (this.SymbolProbability < (int)0)
{
yield return new ValidationResult("Invalid value for SymbolProbability, must be a value greater than or equal to 0.", new [] { "SymbolProbability" });
}
yield break;
}
}
}