-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathOneCandidate.cs
More file actions
211 lines (190 loc) · 10.8 KB
/
Copy pathOneCandidate.cs
File metadata and controls
211 lines (190 loc) · 10.8 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
/*
* 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: 8.1.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>
/// Contains information about one document type candidate
/// </summary>
[DataContract(Name = "OneCandidate")]
public partial class OneCandidate : IValidatableObject
{
/// <summary>
/// Gets or Sets RFIDPresence
/// </summary>
[DataMember(Name = "RFID_Presence", IsRequired = true, EmitDefaultValue = true)]
public RfidLocation RFIDPresence { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="OneCandidate" /> class.
/// </summary>
[JsonConstructorAttribute]
protected OneCandidate() { }
/// <summary>
/// Initializes a new instance of the <see cref="OneCandidate" /> class.
/// </summary>
/// <param name="documentName">Document name.</param>
/// <param name="iD">Unique document type template identifier (Regula's internal numeric code) (required).</param>
/// <param name="p">A measure of the likelihood of correct recognition in the analysis of this type of document (required).</param>
/// <param name="rotated180">Indicates if the document of the given type is rotated by 180 degrees (required).</param>
/// <param name="rFIDPresence">rFIDPresence (required).</param>
/// <param name="fDSIDList">fDSIDList.</param>
/// <param name="necessaryLights">Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document (required).</param>
/// <param name="checkAuthenticity">Set of authentication options provided for this type of document (combination of Authenticity enum) (required).</param>
/// <param name="uVExp">The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme (required).</param>
/// <param name="authenticityNecessaryLights">Combination of lighting scheme identifiers (combination of Light enum) needed to perform all authenticity checks specified in CheckAuthenticity (required).</param>
/// <param name="oVIExp">Camera exposure value necessary when obtaining document images of the given type for AXIAL lighting scheme (required).</param>
/// <param name="rotationAngle">rotationAngle.</param>
public OneCandidate(string documentName = default(string), int iD = default(int), decimal p = default(decimal), int rotated180 = default(int), RfidLocation rFIDPresence = default(RfidLocation), FDSIDList fDSIDList = default(FDSIDList), int necessaryLights = default(int), int checkAuthenticity = default(int), int uVExp = default(int), int authenticityNecessaryLights = default(int), decimal oVIExp = default(decimal), int rotationAngle = default(int))
{
this.ID = iD;
this.P = p;
this.Rotated180 = rotated180;
this.RFIDPresence = rFIDPresence;
this.NecessaryLights = necessaryLights;
this.CheckAuthenticity = checkAuthenticity;
this.UVExp = uVExp;
this.AuthenticityNecessaryLights = authenticityNecessaryLights;
this.OVIExp = oVIExp;
this.DocumentName = documentName;
this.FDSIDList = fDSIDList;
this.RotationAngle = rotationAngle;
}
/// <summary>
/// Document name
/// </summary>
/// <value>Document name</value>
[DataMember(Name = "DocumentName", EmitDefaultValue = false)]
public string? DocumentName { get; set; }
/// <summary>
/// Unique document type template identifier (Regula's internal numeric code)
/// </summary>
/// <value>Unique document type template identifier (Regula's internal numeric code)</value>
[DataMember(Name = "ID", IsRequired = true, EmitDefaultValue = true)]
public int ID { get; set; }
/// <summary>
/// A measure of the likelihood of correct recognition in the analysis of this type of document
/// </summary>
/// <value>A measure of the likelihood of correct recognition in the analysis of this type of document</value>
/*
<example>0.9913095831871032</example>
*/
[DataMember(Name = "P", IsRequired = true, EmitDefaultValue = true)]
public decimal P { get; set; }
/// <summary>
/// Indicates if the document of the given type is rotated by 180 degrees
/// </summary>
/// <value>Indicates if the document of the given type is rotated by 180 degrees</value>
[DataMember(Name = "Rotated180", IsRequired = true, EmitDefaultValue = true)]
public int Rotated180 { get; set; }
/// <summary>
/// Gets or Sets FDSIDList
/// </summary>
[DataMember(Name = "FDSIDList", EmitDefaultValue = false)]
public FDSIDList? FDSIDList { get; set; }
/// <summary>
/// Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document
/// </summary>
/// <value>Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document</value>
[DataMember(Name = "NecessaryLights", IsRequired = true, EmitDefaultValue = true)]
public int NecessaryLights { get; set; }
/// <summary>
/// Set of authentication options provided for this type of document (combination of Authenticity enum)
/// </summary>
/// <value>Set of authentication options provided for this type of document (combination of Authenticity enum)</value>
[DataMember(Name = "CheckAuthenticity", IsRequired = true, EmitDefaultValue = true)]
public int CheckAuthenticity { get; set; }
/// <summary>
/// The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme
/// </summary>
/// <value>The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme</value>
[DataMember(Name = "UVExp", IsRequired = true, EmitDefaultValue = true)]
public int UVExp { get; set; }
/// <summary>
/// Combination of lighting scheme identifiers (combination of Light enum) needed to perform all authenticity checks specified in CheckAuthenticity
/// </summary>
/// <value>Combination of lighting scheme identifiers (combination of Light enum) needed to perform all authenticity checks specified in CheckAuthenticity</value>
[DataMember(Name = "AuthenticityNecessaryLights", IsRequired = true, EmitDefaultValue = true)]
public int AuthenticityNecessaryLights { get; set; }
/// <summary>
/// Camera exposure value necessary when obtaining document images of the given type for AXIAL lighting scheme
/// </summary>
/// <value>Camera exposure value necessary when obtaining document images of the given type for AXIAL lighting scheme</value>
[DataMember(Name = "OVIExp", IsRequired = true, EmitDefaultValue = true)]
public decimal OVIExp { get; set; }
/// <summary>
/// Gets or Sets RotationAngle
/// </summary>
[DataMember(Name = "RotationAngle", EmitDefaultValue = false)]
public int? RotationAngle { 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 OneCandidate {\n");
sb.Append(" DocumentName: ").Append(DocumentName).Append("\n");
sb.Append(" ID: ").Append(ID).Append("\n");
sb.Append(" P: ").Append(P).Append("\n");
sb.Append(" Rotated180: ").Append(Rotated180).Append("\n");
sb.Append(" RFIDPresence: ").Append(RFIDPresence).Append("\n");
sb.Append(" FDSIDList: ").Append(FDSIDList).Append("\n");
sb.Append(" NecessaryLights: ").Append(NecessaryLights).Append("\n");
sb.Append(" CheckAuthenticity: ").Append(CheckAuthenticity).Append("\n");
sb.Append(" UVExp: ").Append(UVExp).Append("\n");
sb.Append(" AuthenticityNecessaryLights: ").Append(AuthenticityNecessaryLights).Append("\n");
sb.Append(" OVIExp: ").Append(OVIExp).Append("\n");
sb.Append(" RotationAngle: ").Append(RotationAngle).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)
{
// P (decimal) maximum
if (this.P > (decimal)1)
{
yield return new ValidationResult("Invalid value for P, must be a value less than or equal to 1.", new [] { "P" });
}
// P (decimal) minimum
if (this.P < (decimal)0)
{
yield return new ValidationResult("Invalid value for P, must be a value greater than or equal to 0.", new [] { "P" });
}
yield break;
}
}
}