Skip to content

Commit b5c788b

Browse files
GubinAlexanderKirylKovaliovactions-user
authored
master <- develop (#120)
* update smoke test run * update-clients * Fix ci * SP-17901: Update RestSharp package * update-clients * Add PercentValue --------- Co-authored-by: = <=> Co-authored-by: Kiryl Kovaliov <kkirusha@gmail.com> Co-authored-by: GitHub Action <action@github.com>
1 parent f7aa4c2 commit b5c788b

13 files changed

+358
-49
lines changed

.github/workflows/run-smoke-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ name: run smoke test
33
on:
44
pull_request:
55
branches:
6+
- develop
67
- master
8+
- stable
79

810
jobs:
911
run_smoke_test:

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ protected AuthenticityCheckResultItem() { }
5858
/// <param name="type">Same as authenticity result type, but used for safe parsing of not-described values. See authenticity result type (required) (default to 0).</param>
5959
/// <param name="elementResult">elementResult.</param>
6060
/// <param name="elementDiagnose">elementDiagnose.</param>
61-
public AuthenticityCheckResultItem(int type = 0, int elementResult = default(int), int elementDiagnose = default(int))
61+
/// <param name="percentValue">percentValue.</param>
62+
public AuthenticityCheckResultItem(int type = 0, int elementResult = default(int), int elementDiagnose = default(int), int percentValue = 0)
6263
{
6364
// to ensure "type" is required (not null)
6465
if (type == null)
@@ -69,7 +70,7 @@ protected AuthenticityCheckResultItem() { }
6970
{
7071
this.Type = type;
7172
}
72-
73+
this.PercentValue = percentValue;
7374
this.ElementResult = elementResult;
7475
this.ElementDiagnose = elementDiagnose;
7576
}
@@ -81,6 +82,13 @@ protected AuthenticityCheckResultItem() { }
8182
[DataMember(Name="Type", EmitDefaultValue=true)]
8283
public int Type { get; set; }
8384

85+
/// <summary>
86+
/// Gets or Sets PercentValue
87+
/// </summary>
88+
[DataMember(Name="PercentValue", EmitDefaultValue=false)]
89+
public int PercentValue { get; set; }
90+
91+
8492
/// <summary>
8593
/// Gets or Sets ElementResult
8694
/// </summary>

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

Lines changed: 8 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

@@ -24,6 +24,11 @@ public RecognitionRequest(ProcessParams param, ContainerList containerList, stri
2424
{
2525
}
2626

27+
public RecognitionRequest(ProcessParams param, List<ProcessRequestImage> images, string extPortrait, string tag = null)
28+
: base(param, images, tag, extPortrait:extPortrait)
29+
{
30+
}
31+
2732
public string Json => Newtonsoft.Json.JsonConvert.SerializeObject(this);
2833
}
2934
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected FiberResult() { }
4747
/// <param name="length">Fibers length value for located areas (in pixels).</param>
4848
/// <param name="area">Fibers value for areas (in pixels).</param>
4949
/// <param name="colorValues">Fibers color value.</param>
50-
public FiberResult(int rectCount = default(int), int expectedCount = default(int), int lightValue = default(int), 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 type = 0, int elementResult = default(int), int elementDiagnose = default(int)) : base(type, elementResult, elementDiagnose)
50+
public FiberResult(int rectCount = default(int), int expectedCount = default(int), int lightValue = default(int), 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 type = 0, int elementResult = default(int), int elementDiagnose = default(int), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue)
5151
{
5252
this.RectCount = rectCount;
5353
this.ExpectedCount = expectedCount;
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/OCRSecurityTextResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ protected OCRSecurityTextResult() { }
4848
/// <param name="etalonResultOCR">etalonResultOCR.</param>
4949
/// <param name="reserved1">reserved1.</param>
5050
/// <param name="reserved2">reserved2.</param>
51-
public OCRSecurityTextResult(int criticalFlag = default(int), int lightType = default(int), RectangleCoordinates fieldRect = default(RectangleCoordinates), int etalonResultType = default(int), int etalonFieldType = default(int), int etalonLightType = default(int), string securityTextResultOCR = default(string), string etalonResultOCR = default(string), int reserved1 = default(int), int reserved2 = default(int), int type = 0, int elementResult = default(int), int elementDiagnose = default(int)) : base(type, elementResult, elementDiagnose)
51+
public OCRSecurityTextResult(int criticalFlag = default(int), int lightType = default(int), RectangleCoordinates fieldRect = default(RectangleCoordinates), int etalonResultType = default(int), int etalonFieldType = default(int), int etalonLightType = default(int), string securityTextResultOCR = default(string), string etalonResultOCR = default(string), int reserved1 = default(int), int reserved2 = default(int), int type = 0, int elementResult = default(int), int elementDiagnose = default(int), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue)
5252
{
5353
this.CriticalFlag = criticalFlag;
5454
this.LightType = lightType;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected PhotoIdentResult() { }
4747
/// <param name="step">step.</param>
4848
/// <param name="angle">angle.</param>
4949
/// <param name="reserved3">reserved3.</param>
50-
public PhotoIdentResult(int lightIndex = default(int), RectangleCoordinates area = default(RectangleCoordinates), ImageData sourceImage = default(ImageData), RawImageContainerList resultImages = default(RawImageContainerList), int fieldTypesCount = default(int), List<int> fieldTypesList = default(List<int>), int step = default(int), int angle = default(int), int reserved3 = default(int), int type = 0, int elementResult = default(int), int elementDiagnose = default(int)) : base(type, elementResult, elementDiagnose)
50+
public PhotoIdentResult(int lightIndex = default(int), RectangleCoordinates area = default(RectangleCoordinates), ImageData sourceImage = default(ImageData), RawImageContainerList resultImages = default(RawImageContainerList), int fieldTypesCount = default(int), List<int> fieldTypesList = default(List<int>), int step = default(int), int angle = default(int), int reserved3 = default(int), int type = 0, int elementResult = default(int), int elementDiagnose = default(int), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue)
5151
{
5252
this.LightIndex = lightIndex;
5353
this.Area = area;

0 commit comments

Comments
 (0)