-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathFiberResult.cs
More file actions
225 lines (207 loc) · 10.3 KB
/
FiberResult.cs
File metadata and controls
225 lines (207 loc) · 10.3 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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
/*
* 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 JsonSubTypes;
using System.ComponentModel.DataAnnotations;
using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter;
using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter;
namespace Regula.DocumentReader.WebClient.Model
{
/// <summary>
/// FiberResult
/// </summary>
[DataContract(Name = "FiberResult")]
public partial class FiberResult : AuthenticityCheckResultItem, IValidatableObject
{
/// <summary>
/// Gets or Sets LightValue
/// </summary>
[DataMember(Name = "LightValue", EmitDefaultValue = false)]
public Light? LightValue { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="FiberResult" /> class.
/// </summary>
[JsonConstructorAttribute]
protected FiberResult() { }
/// <summary>
/// Initializes a new instance of the <see cref="FiberResult" /> class.
/// </summary>
/// <param name="rectCount">For UV_Fibers authenticity result type (required).</param>
/// <param name="expectedCount">Expected fibers number. For UV_Fibers authentication result type (required).</param>
/// <param name="lightValue">lightValue.</param>
/// <param name="lightDisp">For UV_Background authentication result type.</param>
/// <param name="rectArray">Coordinates of located areas for defined fibers type (required).</param>
/// <param name="width">Fibers width value for located areas (in pixels) (required).</param>
/// <param name="length">Fibers length value for located areas (in pixels) (required).</param>
/// <param name="area">Fibers value for areas (in pixels) (required).</param>
/// <param name="colorValues">Fibers color value (required).</param>
/// <param name="errorCode">errorCode.</param>
/// <param name="type">type (required) (default to AuthenticityResultType.UV_FIBERS).</param>
/// <param name="elementResult">elementResult.</param>
/// <param name="elementDiagnose">elementDiagnose.</param>
/// <param name="percentValue">percentValue.</param>
public FiberResult(int rectCount = default(int), int expectedCount = default(int), Light? lightValue = default(Light?), int lightDisp = default(int), List<RectangleCoordinates> rectArray = default(List<RectangleCoordinates>), List<int> width = default(List<int>), List<int> length = default(List<int>), List<int> area = default(List<int>), List<int> colorValues = default(List<int>), int errorCode = default(int), AuthenticityResultType type = AuthenticityResultType.UV_FIBERS, CheckResult? elementResult = default(CheckResult?), CheckDiagnose? elementDiagnose = default(CheckDiagnose?), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue)
{
this.RectCount = rectCount;
this.ExpectedCount = expectedCount;
// to ensure "rectArray" is required (not null)
if (rectArray == null)
{
throw new ArgumentNullException("rectArray is a required property for FiberResult and cannot be null");
}
this.RectArray = rectArray;
// to ensure "width" is required (not null)
if (width == null)
{
throw new ArgumentNullException("width is a required property for FiberResult and cannot be null");
}
this.Width = width;
// to ensure "length" is required (not null)
if (length == null)
{
throw new ArgumentNullException("length is a required property for FiberResult and cannot be null");
}
this.Length = length;
// to ensure "area" is required (not null)
if (area == null)
{
throw new ArgumentNullException("area is a required property for FiberResult and cannot be null");
}
this.Area = area;
// to ensure "colorValues" is required (not null)
if (colorValues == null)
{
throw new ArgumentNullException("colorValues is a required property for FiberResult and cannot be null");
}
this.ColorValues = colorValues;
this.LightValue = lightValue;
this.LightDisp = lightDisp;
this.ErrorCode = errorCode;
}
/// <summary>
/// For UV_Fibers authenticity result type
/// </summary>
/// <value>For UV_Fibers authenticity result type</value>
[DataMember(Name = "RectCount", IsRequired = true, EmitDefaultValue = true)]
public int RectCount { get; set; }
/// <summary>
/// Expected fibers number. For UV_Fibers authentication result type
/// </summary>
/// <value>Expected fibers number. For UV_Fibers authentication result type</value>
[DataMember(Name = "ExpectedCount", IsRequired = true, EmitDefaultValue = true)]
public int ExpectedCount { get; set; }
/// <summary>
/// For UV_Background authentication result type
/// </summary>
/// <value>For UV_Background authentication result type</value>
[DataMember(Name = "LightDisp", EmitDefaultValue = false)]
public int? LightDisp { get; set; }
/// <summary>
/// Coordinates of located areas for defined fibers type
/// </summary>
/// <value>Coordinates of located areas for defined fibers type</value>
[DataMember(Name = "RectArray", IsRequired = true, EmitDefaultValue = true)]
public List<RectangleCoordinates> RectArray { get; set; }
/// <summary>
/// Fibers width value for located areas (in pixels)
/// </summary>
/// <value>Fibers width value for located areas (in pixels)</value>
[DataMember(Name = "Width", IsRequired = true, EmitDefaultValue = true)]
public List<int> Width { get; set; }
/// <summary>
/// Fibers length value for located areas (in pixels)
/// </summary>
/// <value>Fibers length value for located areas (in pixels)</value>
[DataMember(Name = "Length", IsRequired = true, EmitDefaultValue = true)]
public List<int> Length { get; set; }
/// <summary>
/// Fibers value for areas (in pixels)
/// </summary>
/// <value>Fibers value for areas (in pixels)</value>
[DataMember(Name = "Area", IsRequired = true, EmitDefaultValue = true)]
public List<int> Area { get; set; }
/// <summary>
/// Fibers color value
/// </summary>
/// <value>Fibers color value</value>
/*
<example>[BLUE, GREEN, RED]</example>
*/
[DataMember(Name = "ColorValues", IsRequired = true, EmitDefaultValue = true)]
public List<int> ColorValues { get; set; }
/// <summary>
/// Gets or Sets ErrorCode
/// </summary>
[DataMember(Name = "ErrorCode", EmitDefaultValue = false)]
public int? ErrorCode { 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 FiberResult {\n");
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
sb.Append(" RectCount: ").Append(RectCount).Append("\n");
sb.Append(" ExpectedCount: ").Append(ExpectedCount).Append("\n");
sb.Append(" LightValue: ").Append(LightValue).Append("\n");
sb.Append(" LightDisp: ").Append(LightDisp).Append("\n");
sb.Append(" RectArray: ").Append(RectArray).Append("\n");
sb.Append(" Width: ").Append(Width).Append("\n");
sb.Append(" Length: ").Append(Length).Append("\n");
sb.Append(" Area: ").Append(Area).Append("\n");
sb.Append(" ColorValues: ").Append(ColorValues).Append("\n");
sb.Append(" ErrorCode: ").Append(ErrorCode).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 override 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)
{
return this.BaseValidate(validationContext);
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
protected IEnumerable<ValidationResult> BaseValidate(ValidationContext validationContext)
{
foreach (var x in base.BaseValidate(validationContext))
{
yield return x;
}
yield break;
}
}
}