Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
221 changes: 221 additions & 0 deletions src/Regula.DocumentReader.WebClient/Model/DeviceInfo2.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
/*
* 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>
/// DeviceInfo2
/// </summary>
[DataContract]
public partial class DeviceInfo2 : IEquatable<DeviceInfo2>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="DeviceInfo2" /> class.
/// </summary>
/// <param name="app">app.</param>
/// <param name="licenseId">licenseId.</param>
/// <param name="licenseType">licenseType.</param>
/// <param name="licenseSerial">licenseSerial.</param>
/// <param name="licenseValidUntil">licenseValidUntil.</param>
/// <param name="scenarios">scenarios.</param>
/// <param name="version">version.</param>
public DeviceInfo2(string app = default(string), string licenseId = default(string), string licenseType = default(string), string licenseSerial = default(string), DateTime licenseValidUntil = default(DateTime), List<string> scenarios = default(List<string>), string version = default(string))
{
this.App = app;
this.LicenseId = licenseId;
this.LicenseType = licenseType;
this.LicenseSerial = licenseSerial;
this.LicenseValidUntil = licenseValidUntil;
this.Scenarios = scenarios;
this.Version = version;
}

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

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

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

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

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

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

/// <summary>
/// Gets or Sets Version
/// </summary>
[DataMember(Name="version", EmitDefaultValue=false)]
public string Version { 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 DeviceInfo2 {\n");
sb.Append(" App: ").Append(App).Append("\n");
sb.Append(" LicenseId: ").Append(LicenseId).Append("\n");
sb.Append(" LicenseType: ").Append(LicenseType).Append("\n");
sb.Append(" LicenseSerial: ").Append(LicenseSerial).Append("\n");
sb.Append(" LicenseValidUntil: ").Append(LicenseValidUntil).Append("\n");
sb.Append(" Scenarios: ").Append(Scenarios).Append("\n");
sb.Append(" Version: ").Append(Version).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 DeviceInfo2);
}

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

return
(
this.App == input.App ||
(this.App != null &&
this.App.Equals(input.App))
) &&
(
this.LicenseId == input.LicenseId ||
(this.LicenseId != null &&
this.LicenseId.Equals(input.LicenseId))
) &&
(
this.LicenseType == input.LicenseType ||
(this.LicenseType != null &&
this.LicenseType.Equals(input.LicenseType))
) &&
(
this.LicenseSerial == input.LicenseSerial ||
(this.LicenseSerial != null &&
this.LicenseSerial.Equals(input.LicenseSerial))
) &&
(
this.LicenseValidUntil == input.LicenseValidUntil ||
(this.LicenseValidUntil != null &&
this.LicenseValidUntil.Equals(input.LicenseValidUntil))
) &&
(
this.Scenarios == input.Scenarios ||
this.Scenarios != null &&
input.Scenarios != null &&
this.Scenarios.SequenceEqual(input.Scenarios)
) &&
(
this.Version == input.Version ||
(this.Version != null &&
this.Version.Equals(input.Version))
);
}

/// <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.App != null)
hashCode = hashCode * 59 + this.App.GetHashCode();
if (this.LicenseId != null)
hashCode = hashCode * 59 + this.LicenseId.GetHashCode();
if (this.LicenseType != null)
hashCode = hashCode * 59 + this.LicenseType.GetHashCode();
if (this.LicenseSerial != null)
hashCode = hashCode * 59 + this.LicenseSerial.GetHashCode();
if (this.LicenseValidUntil != null)
hashCode = hashCode * 59 + this.LicenseValidUntil.GetHashCode();
if (this.Scenarios != null)
hashCode = hashCode * 59 + this.Scenarios.GetHashCode();
if (this.Version != null)
hashCode = hashCode * 59 + this.Version.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: 18 additions & 1 deletion src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ protected ProcessParams() { }
/// <param name="returnUncroppedImage">When enabled, returns input images in output. Disabled by default..</param>
/// <param name="mrzFormatsFilter">This option allows limiting MRZ formats to be recognized by specifying them in array..</param>
/// <param name="forceReadMrzBeforeLocate">When enabled, make sure that in series processing MRZ is located fully inside the result document image, if present on the document. Enabling this option may add extra processing time, by disabling optimizations, but allows more stability in output image quality. Disabled by default..</param>
/// <param name="forceBarcodeChecks">Allows you to bypass the minimum conditions that should be met to perform the barcode format check.</param>
/// <param name="parseBarcodes">This option can be disabled to stop parsing after barcode is read. Enabled by default..</param>
/// <param name="convertCase">convertCase.</param>
/// <param name="splitNames">When enabled, the Surname and GivenNames fields from MRZ will be divided into ft_First_Name, ft_Second_Name, ft_Third_Name, ft_Fourth_Name, ft_Last_Name fields. Disabled by default..</param>
Expand All @@ -92,7 +93,7 @@ protected ProcessParams() { }
/// <param name="authParams">authParams.</param>
/// <param name="mrzDetectMode">mrzDetectMode.</param>
/// <param name="generateNumericCodes">This parameter is used to generate numeric representation for issuing state and nationality codes.</param>
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))
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 forceBarcodeChecks = 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))
{
// to ensure "scenario" is required (not null)
if (scenario == null)
Expand Down Expand Up @@ -141,6 +142,7 @@ protected ProcessParams() { }
this.ReturnUncroppedImage = returnUncroppedImage;
this.MrzFormatsFilter = mrzFormatsFilter;
this.ForceReadMrzBeforeLocate = forceReadMrzBeforeLocate;
this.ForceBarcodeChecks = forceBarcodeChecks;
this.ParseBarcodes = parseBarcodes;
this.ConvertCase = convertCase;
this.SplitNames = splitNames;
Expand Down Expand Up @@ -419,6 +421,13 @@ protected ProcessParams() { }
[DataMember(Name="forceReadMrzBeforeLocate", EmitDefaultValue=false)]
public bool ForceReadMrzBeforeLocate { get; set; }

/// <summary>
/// Allows you to bypass the minimum conditions that should be met to perform the barcode format check
/// </summary>
/// <value>Allows you to bypass the minimum conditions that should be met to perform the barcode format check</value>
[DataMember(Name="forceBarcodeChecks", EmitDefaultValue=false)]
public bool ForceBarcodeChecks { get; set; }

/// <summary>
/// This option can be disabled to stop parsing after barcode is read. Enabled by default.
/// </summary>
Expand Down Expand Up @@ -573,6 +582,7 @@ public override string ToString()
sb.Append(" ReturnUncroppedImage: ").Append(ReturnUncroppedImage).Append("\n");
sb.Append(" MrzFormatsFilter: ").Append(MrzFormatsFilter).Append("\n");
sb.Append(" ForceReadMrzBeforeLocate: ").Append(ForceReadMrzBeforeLocate).Append("\n");
sb.Append(" ForceBarcodeChecks: ").Append(ForceBarcodeChecks).Append("\n");
sb.Append(" ParseBarcodes: ").Append(ParseBarcodes).Append("\n");
sb.Append(" ConvertCase: ").Append(ConvertCase).Append("\n");
sb.Append(" SplitNames: ").Append(SplitNames).Append("\n");
Expand Down Expand Up @@ -820,6 +830,11 @@ public bool Equals(ProcessParams input)
(this.ForceReadMrzBeforeLocate != null &&
this.ForceReadMrzBeforeLocate.Equals(input.ForceReadMrzBeforeLocate))
) &&
(
this.ForceBarcodeChecks == input.ForceBarcodeChecks ||
(this.ForceBarcodeChecks != null &&
this.ForceBarcodeChecks.Equals(input.ForceBarcodeChecks))
) &&
(
this.ParseBarcodes == input.ParseBarcodes ||
(this.ParseBarcodes != null &&
Expand Down Expand Up @@ -989,6 +1004,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.MrzFormatsFilter.GetHashCode();
if (this.ForceReadMrzBeforeLocate != null)
hashCode = hashCode * 59 + this.ForceReadMrzBeforeLocate.GetHashCode();
if (this.ForceBarcodeChecks != null)
hashCode = hashCode * 59 + this.ForceBarcodeChecks.GetHashCode();
if (this.ParseBarcodes != null)
hashCode = hashCode * 59 + this.ParseBarcodes.GetHashCode();
if (this.ConvertCase != null)
Expand Down
Loading