Skip to content

Commit

Permalink
master <- develop (#120)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
  • Loading branch information
3 people authored Sep 4, 2024
1 parent f7aa4c2 commit b5c788b
Show file tree
Hide file tree
Showing 13 changed files with 358 additions and 49 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/run-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: run smoke test
on:
pull_request:
branches:
- develop
- master
- stable

jobs:
run_smoke_test:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ protected AuthenticityCheckResultItem() { }
/// <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>
/// <param name="elementResult">elementResult.</param>
/// <param name="elementDiagnose">elementDiagnose.</param>
public AuthenticityCheckResultItem(int type = 0, int elementResult = default(int), int elementDiagnose = default(int))
/// <param name="percentValue">percentValue.</param>
public AuthenticityCheckResultItem(int type = 0, int elementResult = default(int), int elementDiagnose = default(int), int percentValue = 0)
{
// to ensure "type" is required (not null)
if (type == null)
Expand All @@ -69,7 +70,7 @@ protected AuthenticityCheckResultItem() { }
{
this.Type = type;
}

this.PercentValue = percentValue;
this.ElementResult = elementResult;
this.ElementDiagnose = elementDiagnose;
}
Expand All @@ -81,6 +82,13 @@ protected AuthenticityCheckResultItem() { }
[DataMember(Name="Type", EmitDefaultValue=true)]
public int Type { get; set; }

/// <summary>
/// Gets or Sets PercentValue
/// </summary>
[DataMember(Name="PercentValue", EmitDefaultValue=false)]
public int PercentValue { get; set; }


/// <summary>
/// Gets or Sets ElementResult
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ namespace Regula.DocumentReader.WebClient.Model.Ext
public class RecognitionRequest : ProcessRequest
{
public RecognitionRequest(ProcessParams param, ProcessRequestImage image, string tag = null)
: base(tag, param, new List<ProcessRequestImage> { image })
: base(param, new List<ProcessRequestImage> { image }, tag)
{
}

public RecognitionRequest(ProcessParams param, byte[] image, string tag = null)
: base(tag, param, new List<ProcessRequestImage> { new ProcessRequestImage(image) })
: base( param, new List<ProcessRequestImage> { new ProcessRequestImage(image) }, tag)
{
}

public RecognitionRequest(ProcessParams param, List<ProcessRequestImage> images, string tag = null)
: base(tag, param, images)
: base(param, images, tag)
{
}

Expand All @@ -24,6 +24,11 @@ public RecognitionRequest(ProcessParams param, ContainerList containerList, stri
{
}

public RecognitionRequest(ProcessParams param, List<ProcessRequestImage> images, string extPortrait, string tag = null)
: base(param, images, tag, extPortrait:extPortrait)
{
}

public string Json => Newtonsoft.Json.JsonConvert.SerializeObject(this);
}
}
2 changes: 1 addition & 1 deletion src/Regula.DocumentReader.WebClient/Model/FiberResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected FiberResult() { }
/// <param name="length">Fibers length value for located areas (in pixels).</param>
/// <param name="area">Fibers value for areas (in pixels).</param>
/// <param name="colorValues">Fibers color value.</param>
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)
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)
{
this.RectCount = rectCount;
this.ExpectedCount = expectedCount;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
/*
* 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.2.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter;

namespace Regula.DocumentReader.WebClient.Model
{
/// <summary>
/// GetTransactionsByTagResponse
/// </summary>
[DataContract]
public partial class GetTransactionsByTagResponse : IEquatable<GetTransactionsByTagResponse>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="GetTransactionsByTagResponse" /> class.
/// </summary>
/// <param name="id">Transaction id.</param>
/// <param name="state">Transaction status.</param>
/// <param name="updatedAt">Last time updated.</param>
public GetTransactionsByTagResponse(int id = default(int), int state = default(int), DateTime updatedAt = default(DateTime))
{
this.Id = id;
this.State = state;
this.UpdatedAt = updatedAt;
}

/// <summary>
/// Transaction id
/// </summary>
/// <value>Transaction id</value>
[DataMember(Name="id", EmitDefaultValue=false)]
public int Id { get; set; }

/// <summary>
/// Transaction status
/// </summary>
/// <value>Transaction status</value>
[DataMember(Name="state", EmitDefaultValue=false)]
public int State { get; set; }

/// <summary>
/// Last time updated
/// </summary>
/// <value>Last time updated</value>
[DataMember(Name="updatedAt", EmitDefaultValue=false)]
public DateTime UpdatedAt { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class GetTransactionsByTagResponse {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" State: ").Append(State).Append("\n");
sb.Append(" UpdatedAt: ").Append(UpdatedAt).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>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as GetTransactionsByTagResponse);
}

/// <summary>
/// Returns true if GetTransactionsByTagResponse instances are equal
/// </summary>
/// <param name="input">Instance of GetTransactionsByTagResponse to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(GetTransactionsByTagResponse input)
{
if (input == null)
return false;

return
(
this.Id == input.Id ||
(this.Id != null &&
this.Id.Equals(input.Id))
) &&
(
this.State == input.State ||
(this.State != null &&
this.State.Equals(input.State))
) &&
(
this.UpdatedAt == input.UpdatedAt ||
(this.UpdatedAt != null &&
this.UpdatedAt.Equals(input.UpdatedAt))
);
}

/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Id != null)
hashCode = hashCode * 59 + this.Id.GetHashCode();
if (this.State != null)
hashCode = hashCode * 59 + this.State.GetHashCode();
if (this.UpdatedAt != null)
hashCode = hashCode * 59 + this.UpdatedAt.GetHashCode();
return hashCode;
}
}

/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}

}
19 changes: 1 addition & 18 deletions src/Regula.DocumentReader.WebClient/Model/ImageQA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,15 @@ public partial class ImageQA : IEquatable<ImageQA>, IValidatableObject
/// <param name="focusCheck">This option enables focus check while performing image quality validation..</param>
/// <param name="glaresCheck">This option enables glares check while performing image quality validation..</param>
/// <param name="colornessCheck">This option enables colorness check while performing image quality validation..</param>
/// <param name="moireCheck">This option enables screen capture (moire patterns) check while performing image quality validation..</param>
/// <param name="documentPositionIndent">This parameter specifies the necessary margin. Default 0..</param>
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))
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))
{
this.BrightnessThreshold = brightnessThreshold;
this.DpiThreshold = dpiThreshold;
this.AngleThreshold = angleThreshold;
this.FocusCheck = focusCheck;
this.GlaresCheck = glaresCheck;
this.ColornessCheck = colornessCheck;
this.MoireCheck = moireCheck;
this.DocumentPositionIndent = documentPositionIndent;
}

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

/// <summary>
/// This option enables screen capture (moire patterns) check while performing image quality validation.
/// </summary>
/// <value>This option enables screen capture (moire patterns) check while performing image quality validation.</value>
[DataMember(Name="moireCheck", EmitDefaultValue=false)]
public bool MoireCheck { get; set; }

/// <summary>
/// This parameter specifies the necessary margin. Default 0.
/// </summary>
Expand All @@ -123,7 +114,6 @@ public override string ToString()
sb.Append(" FocusCheck: ").Append(FocusCheck).Append("\n");
sb.Append(" GlaresCheck: ").Append(GlaresCheck).Append("\n");
sb.Append(" ColornessCheck: ").Append(ColornessCheck).Append("\n");
sb.Append(" MoireCheck: ").Append(MoireCheck).Append("\n");
sb.Append(" DocumentPositionIndent: ").Append(DocumentPositionIndent).Append("\n");
sb.Append("}\n");
return sb.ToString();
Expand Down Expand Up @@ -189,11 +179,6 @@ public bool Equals(ImageQA input)
(this.ColornessCheck != null &&
this.ColornessCheck.Equals(input.ColornessCheck))
) &&
(
this.MoireCheck == input.MoireCheck ||
(this.MoireCheck != null &&
this.MoireCheck.Equals(input.MoireCheck))
) &&
(
this.DocumentPositionIndent == input.DocumentPositionIndent ||
(this.DocumentPositionIndent != null &&
Expand Down Expand Up @@ -222,8 +207,6 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.GlaresCheck.GetHashCode();
if (this.ColornessCheck != null)
hashCode = hashCode * 59 + this.ColornessCheck.GetHashCode();
if (this.MoireCheck != null)
hashCode = hashCode * 59 + this.MoireCheck.GetHashCode();
if (this.DocumentPositionIndent != null)
hashCode = hashCode * 59 + this.DocumentPositionIndent.GetHashCode();
return hashCode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected OCRSecurityTextResult() { }
/// <param name="etalonResultOCR">etalonResultOCR.</param>
/// <param name="reserved1">reserved1.</param>
/// <param name="reserved2">reserved2.</param>
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)
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)
{
this.CriticalFlag = criticalFlag;
this.LightType = lightType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected PhotoIdentResult() { }
/// <param name="step">step.</param>
/// <param name="angle">angle.</param>
/// <param name="reserved3">reserved3.</param>
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)
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)
{
this.LightIndex = lightIndex;
this.Area = area;
Expand Down
Loading

0 comments on commit b5c788b

Please sign in to comment.