Skip to content

Commit 1dbde1c

Browse files
Merge pull request #116 from regulaforensics/4c3acb3b
update-clients
2 parents 7fa8d74 + f648d1f commit 1dbde1c

6 files changed

Lines changed: 336 additions & 42 deletions

File tree

src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionRequest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ namespace Regula.DocumentReader.WebClient.Model.Ext
55
public class RecognitionRequest : ProcessRequest
66
{
77
public RecognitionRequest(ProcessParams param, ProcessRequestImage image, string tag = null)
8-
: base(tag, param, new List<ProcessRequestImage> { image })
8+
: base(param, new List<ProcessRequestImage> { image }, tag)
99
{
1010
}
1111

1212
public RecognitionRequest(ProcessParams param, byte[] image, string tag = null)
13-
: base(tag, param, new List<ProcessRequestImage> { new ProcessRequestImage(image) })
13+
: base( param, new List<ProcessRequestImage> { new ProcessRequestImage(image) }, tag)
1414
{
1515
}
1616

1717
public RecognitionRequest(ProcessParams param, List<ProcessRequestImage> images, string tag = null)
18-
: base(tag, param, images)
18+
: base(param, images, tag)
1919
{
2020
}
2121

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
/*
2+
* Regula Document Reader Web API
3+
*
4+
* 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
5+
*
6+
* The version of the OpenAPI document: 7.2.0
7+
*
8+
* Generated by: https://github.com/openapitools/openapi-generator.git
9+
*/
10+
11+
using System;
12+
using System.Linq;
13+
using System.IO;
14+
using System.Text;
15+
using System.Text.RegularExpressions;
16+
using System.Collections;
17+
using System.Collections.Generic;
18+
using System.Collections.ObjectModel;
19+
using System.Runtime.Serialization;
20+
using Newtonsoft.Json;
21+
using Newtonsoft.Json.Converters;
22+
using System.ComponentModel.DataAnnotations;
23+
using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter;
24+
25+
namespace Regula.DocumentReader.WebClient.Model
26+
{
27+
/// <summary>
28+
/// GetTransactionsByTagResponse
29+
/// </summary>
30+
[DataContract]
31+
public partial class GetTransactionsByTagResponse : IEquatable<GetTransactionsByTagResponse>, IValidatableObject
32+
{
33+
/// <summary>
34+
/// Initializes a new instance of the <see cref="GetTransactionsByTagResponse" /> class.
35+
/// </summary>
36+
/// <param name="id">Transaction id.</param>
37+
/// <param name="state">Transaction status.</param>
38+
/// <param name="updatedAt">Last time updated.</param>
39+
public GetTransactionsByTagResponse(int id = default(int), int state = default(int), DateTime updatedAt = default(DateTime))
40+
{
41+
this.Id = id;
42+
this.State = state;
43+
this.UpdatedAt = updatedAt;
44+
}
45+
46+
/// <summary>
47+
/// Transaction id
48+
/// </summary>
49+
/// <value>Transaction id</value>
50+
[DataMember(Name="id", EmitDefaultValue=false)]
51+
public int Id { get; set; }
52+
53+
/// <summary>
54+
/// Transaction status
55+
/// </summary>
56+
/// <value>Transaction status</value>
57+
[DataMember(Name="state", EmitDefaultValue=false)]
58+
public int State { get; set; }
59+
60+
/// <summary>
61+
/// Last time updated
62+
/// </summary>
63+
/// <value>Last time updated</value>
64+
[DataMember(Name="updatedAt", EmitDefaultValue=false)]
65+
public DateTime UpdatedAt { get; set; }
66+
67+
/// <summary>
68+
/// Returns the string presentation of the object
69+
/// </summary>
70+
/// <returns>String presentation of the object</returns>
71+
public override string ToString()
72+
{
73+
var sb = new StringBuilder();
74+
sb.Append("class GetTransactionsByTagResponse {\n");
75+
sb.Append(" Id: ").Append(Id).Append("\n");
76+
sb.Append(" State: ").Append(State).Append("\n");
77+
sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n");
78+
sb.Append("}\n");
79+
return sb.ToString();
80+
}
81+
82+
/// <summary>
83+
/// Returns the JSON string presentation of the object
84+
/// </summary>
85+
/// <returns>JSON string presentation of the object</returns>
86+
public virtual string ToJson()
87+
{
88+
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
89+
}
90+
91+
/// <summary>
92+
/// Returns true if objects are equal
93+
/// </summary>
94+
/// <param name="input">Object to be compared</param>
95+
/// <returns>Boolean</returns>
96+
public override bool Equals(object input)
97+
{
98+
return this.Equals(input as GetTransactionsByTagResponse);
99+
}
100+
101+
/// <summary>
102+
/// Returns true if GetTransactionsByTagResponse instances are equal
103+
/// </summary>
104+
/// <param name="input">Instance of GetTransactionsByTagResponse to be compared</param>
105+
/// <returns>Boolean</returns>
106+
public bool Equals(GetTransactionsByTagResponse input)
107+
{
108+
if (input == null)
109+
return false;
110+
111+
return
112+
(
113+
this.Id == input.Id ||
114+
(this.Id != null &&
115+
this.Id.Equals(input.Id))
116+
) &&
117+
(
118+
this.State == input.State ||
119+
(this.State != null &&
120+
this.State.Equals(input.State))
121+
) &&
122+
(
123+
this.UpdatedAt == input.UpdatedAt ||
124+
(this.UpdatedAt != null &&
125+
this.UpdatedAt.Equals(input.UpdatedAt))
126+
);
127+
}
128+
129+
/// <summary>
130+
/// Gets the hash code
131+
/// </summary>
132+
/// <returns>Hash code</returns>
133+
public override int GetHashCode()
134+
{
135+
unchecked // Overflow is fine, just wrap
136+
{
137+
int hashCode = 41;
138+
if (this.Id != null)
139+
hashCode = hashCode * 59 + this.Id.GetHashCode();
140+
if (this.State != null)
141+
hashCode = hashCode * 59 + this.State.GetHashCode();
142+
if (this.UpdatedAt != null)
143+
hashCode = hashCode * 59 + this.UpdatedAt.GetHashCode();
144+
return hashCode;
145+
}
146+
}
147+
148+
/// <summary>
149+
/// To validate all properties of the instance
150+
/// </summary>
151+
/// <param name="validationContext">Validation context</param>
152+
/// <returns>Validation Result</returns>
153+
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
154+
{
155+
yield break;
156+
}
157+
}
158+
159+
}

src/Regula.DocumentReader.WebClient/Model/ImageQA.cs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,15 @@ public partial class ImageQA : IEquatable<ImageQA>, IValidatableObject
3939
/// <param name="focusCheck">This option enables focus check while performing image quality validation..</param>
4040
/// <param name="glaresCheck">This option enables glares check while performing image quality validation..</param>
4141
/// <param name="colornessCheck">This option enables colorness check while performing image quality validation..</param>
42-
/// <param name="moireCheck">This option enables screen capture (moire patterns) check while performing image quality validation..</param>
4342
/// <param name="documentPositionIndent">This parameter specifies the necessary margin. Default 0..</param>
44-
public ImageQA(double brightnessThreshold = default(double), int dpiThreshold = default(int), int angleThreshold = default(int), bool focusCheck = default(bool), bool glaresCheck = default(bool), bool colornessCheck = default(bool), bool moireCheck = default(bool), int documentPositionIndent = default(int))
43+
public ImageQA(double brightnessThreshold = default(double), int dpiThreshold = default(int), int angleThreshold = default(int), bool focusCheck = default(bool), bool glaresCheck = default(bool), bool colornessCheck = default(bool), int documentPositionIndent = default(int))
4544
{
4645
this.BrightnessThreshold = brightnessThreshold;
4746
this.DpiThreshold = dpiThreshold;
4847
this.AngleThreshold = angleThreshold;
4948
this.FocusCheck = focusCheck;
5049
this.GlaresCheck = glaresCheck;
5150
this.ColornessCheck = colornessCheck;
52-
this.MoireCheck = moireCheck;
5351
this.DocumentPositionIndent = documentPositionIndent;
5452
}
5553

@@ -95,13 +93,6 @@ public partial class ImageQA : IEquatable<ImageQA>, IValidatableObject
9593
[DataMember(Name="colornessCheck", EmitDefaultValue=false)]
9694
public bool ColornessCheck { get; set; }
9795

98-
/// <summary>
99-
/// This option enables screen capture (moire patterns) check while performing image quality validation.
100-
/// </summary>
101-
/// <value>This option enables screen capture (moire patterns) check while performing image quality validation.</value>
102-
[DataMember(Name="moireCheck", EmitDefaultValue=false)]
103-
public bool MoireCheck { get; set; }
104-
10596
/// <summary>
10697
/// This parameter specifies the necessary margin. Default 0.
10798
/// </summary>
@@ -123,7 +114,6 @@ public override string ToString()
123114
sb.Append(" FocusCheck: ").Append(FocusCheck).Append("\n");
124115
sb.Append(" GlaresCheck: ").Append(GlaresCheck).Append("\n");
125116
sb.Append(" ColornessCheck: ").Append(ColornessCheck).Append("\n");
126-
sb.Append(" MoireCheck: ").Append(MoireCheck).Append("\n");
127117
sb.Append(" DocumentPositionIndent: ").Append(DocumentPositionIndent).Append("\n");
128118
sb.Append("}\n");
129119
return sb.ToString();
@@ -189,11 +179,6 @@ public bool Equals(ImageQA input)
189179
(this.ColornessCheck != null &&
190180
this.ColornessCheck.Equals(input.ColornessCheck))
191181
) &&
192-
(
193-
this.MoireCheck == input.MoireCheck ||
194-
(this.MoireCheck != null &&
195-
this.MoireCheck.Equals(input.MoireCheck))
196-
) &&
197182
(
198183
this.DocumentPositionIndent == input.DocumentPositionIndent ||
199184
(this.DocumentPositionIndent != null &&
@@ -222,8 +207,6 @@ public override int GetHashCode()
222207
hashCode = hashCode * 59 + this.GlaresCheck.GetHashCode();
223208
if (this.ColornessCheck != null)
224209
hashCode = hashCode * 59 + this.ColornessCheck.GetHashCode();
225-
if (this.MoireCheck != null)
226-
hashCode = hashCode * 59 + this.MoireCheck.GetHashCode();
227210
if (this.DocumentPositionIndent != null)
228211
hashCode = hashCode * 59 + this.DocumentPositionIndent.GetHashCode();
229212
return hashCode;

src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ protected ProcessParams() { }
9191
/// <param name="checkAuth">This parameter is used to enable authenticity checks.</param>
9292
/// <param name="authParams">authParams.</param>
9393
/// <param name="mrzDetectMode">mrzDetectMode.</param>
94-
public ProcessParams(List<int> lcidFilter = default(List<int>), List<int> lcidIgnoreFilter = default(List<int>), bool oneShotIdentification = default(bool), bool useFaceApi = default(bool), FaceApi faceApi = default(FaceApi), bool doDetectCan = default(bool), int imageOutputMaxHeight = default(int), int imageOutputMaxWidth = default(int), string scenario = default(string), List<int> resultTypeOutput = default(List<int>), bool doublePageSpread = default(bool), bool generateDoublePageSpreadImage = default(bool), List<int> fieldTypesFilter = default(List<int>), string dateFormat = default(string), int measureSystem = default(int), int imageDpiOutMax = default(int), bool alreadyCropped = default(bool), Dictionary<string, Object> customParams = default(Dictionary<string, Object>), List<PerDocumentConfig> config = default(List<PerDocumentConfig>), bool log = default(bool), string logLevel = default(string), int forceDocID = default(int), bool matchTextFieldMask = default(bool), bool fastDocDetect = default(bool), bool updateOCRValidityByGlare = default(bool), bool checkRequiredTextFields = default(bool), bool returnCroppedBarcode = default(bool), ImageQA imageQa = default(ImageQA), bool respectImageQuality = default(bool), int forceDocFormat = default(int), bool noGraphics = default(bool), bool depersonalizeLog = default(bool), bool multiDocOnImage = default(bool), int shiftExpiryDate = default(int), int minimalHolderAge = default(int), bool returnUncroppedImage = default(bool), List<string> mrzFormatsFilter = default(List<string>), bool forceReadMrzBeforeLocate = default(bool), bool parseBarcodes = default(bool), int convertCase = default(int), bool splitNames = default(bool), bool disablePerforationOCR = default(bool), List<int> documentGroupFilter = default(List<int>), long processAuth = default(long), int deviceId = default(int), int deviceType = default(int), string deviceTypeHex = default(string), bool ignoreDeviceIdFromImage = default(bool), List<int> documentIdList = default(List<int>), ProcessParamsRfid rfid = default(ProcessParamsRfid), bool checkAuth = default(bool), AuthParams authParams = default(AuthParams), MrzDetectModeEnum mrzDetectMode = default(MrzDetectModeEnum))
94+
/// <param name="generateNumericCodes">This parameter is used to generate numeric representation for issuing state and nationality codes.</param>
95+
public ProcessParams(List<int> lcidFilter = default(List<int>), List<int> lcidIgnoreFilter = default(List<int>), bool oneShotIdentification = default(bool), bool useFaceApi = default(bool), FaceApi faceApi = default(FaceApi), bool doDetectCan = default(bool), int imageOutputMaxHeight = default(int), int imageOutputMaxWidth = default(int), string scenario = default(string), List<int> resultTypeOutput = default(List<int>), bool doublePageSpread = default(bool), bool generateDoublePageSpreadImage = default(bool), List<int> fieldTypesFilter = default(List<int>), string dateFormat = default(string), int measureSystem = default(int), int imageDpiOutMax = default(int), bool alreadyCropped = default(bool), Dictionary<string, Object> customParams = default(Dictionary<string, Object>), List<PerDocumentConfig> config = default(List<PerDocumentConfig>), bool log = default(bool), string logLevel = default(string), int forceDocID = default(int), bool matchTextFieldMask = default(bool), bool fastDocDetect = default(bool), bool updateOCRValidityByGlare = default(bool), bool checkRequiredTextFields = default(bool), bool returnCroppedBarcode = default(bool), ImageQA imageQa = default(ImageQA), bool respectImageQuality = default(bool), int forceDocFormat = default(int), bool noGraphics = default(bool), bool depersonalizeLog = default(bool), bool multiDocOnImage = default(bool), int shiftExpiryDate = default(int), int minimalHolderAge = default(int), bool returnUncroppedImage = default(bool), List<string> mrzFormatsFilter = default(List<string>), bool forceReadMrzBeforeLocate = default(bool), bool parseBarcodes = default(bool), int convertCase = default(int), bool splitNames = default(bool), bool disablePerforationOCR = default(bool), List<int> documentGroupFilter = default(List<int>), long processAuth = default(long), int deviceId = default(int), int deviceType = default(int), string deviceTypeHex = default(string), bool ignoreDeviceIdFromImage = default(bool), List<int> documentIdList = default(List<int>), ProcessParamsRfid rfid = default(ProcessParamsRfid), bool checkAuth = default(bool), AuthParams authParams = default(AuthParams), MrzDetectModeEnum mrzDetectMode = default(MrzDetectModeEnum), bool generateNumericCodes = default(bool))
9596
{
9697
// to ensure "scenario" is required (not null)
9798
if (scenario == null)
@@ -155,6 +156,7 @@ protected ProcessParams() { }
155156
this.CheckAuth = checkAuth;
156157
this.AuthParams = authParams;
157158
this.MrzDetectMode = mrzDetectMode;
159+
this.GenerateNumericCodes = generateNumericCodes;
158160
}
159161

160162
/// <summary>
@@ -518,6 +520,13 @@ protected ProcessParams() { }
518520
[DataMember(Name="mrzDetectMode", EmitDefaultValue=false)]
519521
public MrzDetectModeEnum MrzDetectMode { get; set; }
520522

523+
/// <summary>
524+
/// This parameter is used to generate numeric representation for issuing state and nationality codes
525+
/// </summary>
526+
/// <value>This parameter is used to generate numeric representation for issuing state and nationality codes</value>
527+
[DataMember(Name="generateNumericCodes", EmitDefaultValue=false)]
528+
public bool GenerateNumericCodes { get; set; }
529+
521530
/// <summary>
522531
/// Returns the string presentation of the object
523532
/// </summary>
@@ -579,6 +588,7 @@ public override string ToString()
579588
sb.Append(" CheckAuth: ").Append(CheckAuth).Append("\n");
580589
sb.Append(" AuthParams: ").Append(AuthParams).Append("\n");
581590
sb.Append(" MrzDetectMode: ").Append(MrzDetectMode).Append("\n");
591+
sb.Append(" GenerateNumericCodes: ").Append(GenerateNumericCodes).Append("\n");
582592
sb.Append("}\n");
583593
return sb.ToString();
584594
}
@@ -886,6 +896,11 @@ public bool Equals(ProcessParams input)
886896
this.MrzDetectMode == input.MrzDetectMode ||
887897
(this.MrzDetectMode != null &&
888898
this.MrzDetectMode.Equals(input.MrzDetectMode))
899+
) &&
900+
(
901+
this.GenerateNumericCodes == input.GenerateNumericCodes ||
902+
(this.GenerateNumericCodes != null &&
903+
this.GenerateNumericCodes.Equals(input.GenerateNumericCodes))
889904
);
890905
}
891906

@@ -1004,6 +1019,8 @@ public override int GetHashCode()
10041019
hashCode = hashCode * 59 + this.AuthParams.GetHashCode();
10051020
if (this.MrzDetectMode != null)
10061021
hashCode = hashCode * 59 + this.MrzDetectMode.GetHashCode();
1022+
if (this.GenerateNumericCodes != null)
1023+
hashCode = hashCode * 59 + this.GenerateNumericCodes.GetHashCode();
10071024
return hashCode;
10081025
}
10091026
}

0 commit comments

Comments
 (0)