diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index fe14611..cac2b82 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -23,6 +23,7 @@ src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs src/Regula.DocumentReader.WebClient/Model/DetailsRFID.cs src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs +src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoFieldsList.cs src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedField.cs src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfo.cs src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs diff --git a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs index a0304a2..0941a03 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs @@ -38,27 +38,17 @@ protected DocBarCodeInfo() { } /// /// Initializes a new instance of the class. /// - /// Count of array fields. - /// Data from barcode. - public DocBarCodeInfo(int nFields = default(int), List pArrayFields = default(List), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// docBarCodeInfo. + public DocBarCodeInfo(DocBarCodeInfoFieldsList docBarCodeInfo = default(DocBarCodeInfoFieldsList), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - this.NFields = nFields; - this.PArrayFields = pArrayFields; + this._DocBarCodeInfo = docBarCodeInfo; } /// - /// Count of array fields + /// Gets or Sets _DocBarCodeInfo /// - /// Count of array fields - [DataMember(Name="nFields", EmitDefaultValue=false)] - public int NFields { get; set; } - - /// - /// Data from barcode - /// - /// Data from barcode - [DataMember(Name="pArrayFields", EmitDefaultValue=false)] - public List PArrayFields { get; set; } + [DataMember(Name="DocBarCodeInfo", EmitDefaultValue=false)] + public DocBarCodeInfoFieldsList _DocBarCodeInfo { get; set; } /// /// Returns the string presentation of the object @@ -69,8 +59,7 @@ public override string ToString() var sb = new StringBuilder(); sb.Append("class DocBarCodeInfo {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" NFields: ").Append(NFields).Append("\n"); - sb.Append(" PArrayFields: ").Append(PArrayFields).Append("\n"); + sb.Append(" _DocBarCodeInfo: ").Append(_DocBarCodeInfo).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -106,15 +95,9 @@ public bool Equals(DocBarCodeInfo input) return base.Equals(input) && ( - this.NFields == input.NFields || - (this.NFields != null && - this.NFields.Equals(input.NFields)) - ) && base.Equals(input) && - ( - this.PArrayFields == input.PArrayFields || - this.PArrayFields != null && - input.PArrayFields != null && - this.PArrayFields.SequenceEqual(input.PArrayFields) + this._DocBarCodeInfo == input._DocBarCodeInfo || + (this._DocBarCodeInfo != null && + this._DocBarCodeInfo.Equals(input._DocBarCodeInfo)) ); } @@ -127,10 +110,8 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = base.GetHashCode(); - if (this.NFields != null) - hashCode = hashCode * 59 + this.NFields.GetHashCode(); - if (this.PArrayFields != null) - hashCode = hashCode * 59 + this.PArrayFields.GetHashCode(); + if (this._DocBarCodeInfo != null) + hashCode = hashCode * 59 + this._DocBarCodeInfo.GetHashCode(); return hashCode; } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoFieldsList.cs b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoFieldsList.cs new file mode 100644 index 0000000..c8b76e8 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoFieldsList.cs @@ -0,0 +1,143 @@ +/* + * 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: 6.8.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 +{ + /// + /// DocBarCodeInfoFieldsList + /// + [DataContract] + public partial class DocBarCodeInfoFieldsList : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Count of array fields. + /// Data from barcode. + public DocBarCodeInfoFieldsList(int nFields = default(int), List pArrayFields = default(List)) + { + this.NFields = nFields; + this.PArrayFields = pArrayFields; + } + + /// + /// Count of array fields + /// + /// Count of array fields + [DataMember(Name="nFields", EmitDefaultValue=false)] + public int NFields { get; set; } + + /// + /// Data from barcode + /// + /// Data from barcode + [DataMember(Name="pArrayFields", EmitDefaultValue=false)] + public List PArrayFields { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DocBarCodeInfoFieldsList {\n"); + sb.Append(" NFields: ").Append(NFields).Append("\n"); + sb.Append(" PArrayFields: ").Append(PArrayFields).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DocBarCodeInfoFieldsList); + } + + /// + /// Returns true if DocBarCodeInfoFieldsList instances are equal + /// + /// Instance of DocBarCodeInfoFieldsList to be compared + /// Boolean + public bool Equals(DocBarCodeInfoFieldsList input) + { + if (input == null) + return false; + + return + ( + this.NFields == input.NFields || + (this.NFields != null && + this.NFields.Equals(input.NFields)) + ) && + ( + this.PArrayFields == input.PArrayFields || + this.PArrayFields != null && + input.PArrayFields != null && + this.PArrayFields.SequenceEqual(input.PArrayFields) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.NFields != null) + hashCode = hashCode * 59 + this.NFields.GetHashCode(); + if (this.PArrayFields != null) + hashCode = hashCode * 59 + this.PArrayFields.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +}