-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathIdentResult.cs
More file actions
181 lines (165 loc) · 7.74 KB
/
IdentResult.cs
File metadata and controls
181 lines (165 loc) · 7.74 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
/*
* 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>
/// IdentResult
/// </summary>
[DataContract(Name = "IdentResult")]
public partial class IdentResult : AuthenticityCheckResultItem, IValidatableObject
{
/// <summary>
/// Gets or Sets ElementType
/// </summary>
[DataMember(Name = "ElementType", IsRequired = true, EmitDefaultValue = true)]
public SecurityFeatureType ElementType { get; set; }
/// <summary>
/// Gets or Sets LightIndex
/// </summary>
[DataMember(Name = "LightIndex", IsRequired = true, EmitDefaultValue = true)]
public Light LightIndex { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="IdentResult" /> class.
/// </summary>
[JsonConstructorAttribute]
protected IdentResult() { }
/// <summary>
/// Initializes a new instance of the <see cref="IdentResult" /> class.
/// </summary>
/// <param name="elementType">elementType (required).</param>
/// <param name="lightIndex">lightIndex (required).</param>
/// <param name="area">area.</param>
/// <param name="image">image (required).</param>
/// <param name="etalonImage">etalonImage (required).</param>
/// <param name="areaList">areaList.</param>
/// <param name="elementID">elementID.</param>
/// <param name="result">result.</param>
/// <param name="type">type (required) (default to AuthenticityResultType.IMAGE_PATTERN).</param>
/// <param name="elementResult">elementResult.</param>
/// <param name="elementDiagnose">elementDiagnose.</param>
/// <param name="percentValue">percentValue.</param>
public IdentResult(SecurityFeatureType elementType = default(SecurityFeatureType), Light lightIndex = default(Light), RectangleCoordinates area = default(RectangleCoordinates), ImageData image = default(ImageData), ImageData etalonImage = default(ImageData), AreaContainer areaList = default(AreaContainer), int elementID = default(int), int result = default(int), AuthenticityResultType type = AuthenticityResultType.IMAGE_PATTERN, CheckResult? elementResult = default(CheckResult?), CheckDiagnose? elementDiagnose = default(CheckDiagnose?), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue)
{
this.ElementType = elementType;
this.LightIndex = lightIndex;
// to ensure "image" is required (not null)
if (image == null)
{
throw new ArgumentNullException("image is a required property for IdentResult and cannot be null");
}
this.Image = image;
// to ensure "etalonImage" is required (not null)
if (etalonImage == null)
{
throw new ArgumentNullException("etalonImage is a required property for IdentResult and cannot be null");
}
this.EtalonImage = etalonImage;
this.Area = area;
this.AreaList = areaList;
this.ElementID = elementID;
this.Result = result;
}
/// <summary>
/// Gets or Sets Area
/// </summary>
[DataMember(Name = "Area", EmitDefaultValue = false)]
public RectangleCoordinates? Area { get; set; }
/// <summary>
/// Gets or Sets Image
/// </summary>
[DataMember(Name = "Image", IsRequired = true, EmitDefaultValue = true)]
public ImageData Image { get; set; }
/// <summary>
/// Gets or Sets EtalonImage
/// </summary>
[DataMember(Name = "EtalonImage", IsRequired = true, EmitDefaultValue = true)]
public ImageData EtalonImage { get; set; }
/// <summary>
/// Gets or Sets AreaList
/// </summary>
[DataMember(Name = "AreaList", EmitDefaultValue = false)]
public AreaContainer? AreaList { get; set; }
/// <summary>
/// Gets or Sets ElementID
/// </summary>
[DataMember(Name = "ElementID", EmitDefaultValue = false)]
public int? ElementID { get; set; }
/// <summary>
/// Gets or Sets Result
/// </summary>
[DataMember(Name = "Result", EmitDefaultValue = false)]
public int? Result { 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 IdentResult {\n");
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
sb.Append(" ElementType: ").Append(ElementType).Append("\n");
sb.Append(" LightIndex: ").Append(LightIndex).Append("\n");
sb.Append(" Area: ").Append(Area).Append("\n");
sb.Append(" Image: ").Append(Image).Append("\n");
sb.Append(" EtalonImage: ").Append(EtalonImage).Append("\n");
sb.Append(" AreaList: ").Append(AreaList).Append("\n");
sb.Append(" ElementID: ").Append(ElementID).Append("\n");
sb.Append(" Result: ").Append(Result).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;
}
}
}