-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3dc58bc
commit 7a8cd91
Showing
13 changed files
with
1,104 additions
and
22 deletions.
There are no files selected for viewing
141 changes: 141 additions & 0 deletions
141
src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
/* | ||
* 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> | ||
/// ByteArrayResult | ||
/// </summary> | ||
[DataContract] | ||
public partial class ByteArrayResult : ResultItem, IEquatable<ByteArrayResult>, IValidatableObject | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ByteArrayResult" /> class. | ||
/// </summary> | ||
[JsonConstructorAttribute] | ||
protected ByteArrayResult() { } | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ByteArrayResult" /> class. | ||
/// </summary> | ||
/// <param name="byteArray">Byte array in base64 (required).</param> | ||
public ByteArrayResult(string byteArray = default(string), 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) | ||
{ | ||
// to ensure "byteArray" is required (not null) | ||
if (byteArray == null) | ||
{ | ||
throw new InvalidDataException("byteArray is a required property for ByteArrayResult and cannot be null"); | ||
} | ||
else | ||
{ | ||
this.ByteArray = byteArray; | ||
} | ||
|
||
} | ||
|
||
/// <summary> | ||
/// Byte array in base64 | ||
/// </summary> | ||
/// <value>Byte array in base64</value> | ||
[DataMember(Name="ByteArray", EmitDefaultValue=true)] | ||
public string ByteArray { 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 ByteArrayResult {\n"); | ||
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); | ||
sb.Append(" ByteArray: ").Append(ByteArray).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 override 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 ByteArrayResult); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if ByteArrayResult instances are equal | ||
/// </summary> | ||
/// <param name="input">Instance of ByteArrayResult to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public bool Equals(ByteArrayResult input) | ||
{ | ||
if (input == null) | ||
return false; | ||
|
||
return base.Equals(input) && | ||
( | ||
this.ByteArray == input.ByteArray || | ||
(this.ByteArray != null && | ||
this.ByteArray.Equals(input.ByteArray)) | ||
); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the hash code | ||
/// </summary> | ||
/// <returns>Hash code</returns> | ||
public override int GetHashCode() | ||
{ | ||
unchecked // Overflow is fine, just wrap | ||
{ | ||
int hashCode = base.GetHashCode(); | ||
if (this.ByteArray != null) | ||
hashCode = hashCode * 59 + this.ByteArray.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) | ||
{ | ||
foreach(var x in base.BaseValidate(validationContext)) yield return x; | ||
yield break; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
176 changes: 176 additions & 0 deletions
176
src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
/* | ||
* 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> | ||
/// Document database information | ||
/// </summary> | ||
[DataContract] | ||
public partial class DocumentsDatabase : IEquatable<DocumentsDatabase>, IValidatableObject | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="DocumentsDatabase" /> class. | ||
/// </summary> | ||
/// <param name="description">Document database description.</param> | ||
/// <param name="exportDate">Date the document database was created.</param> | ||
/// <param name="iD">Document database identifier.</param> | ||
/// <param name="version">Document database version.</param> | ||
public DocumentsDatabase(string description = default(string), string exportDate = default(string), string iD = default(string), string version = default(string)) | ||
{ | ||
this.Description = description; | ||
this.ExportDate = exportDate; | ||
this.ID = iD; | ||
this.Version = version; | ||
} | ||
|
||
/// <summary> | ||
/// Document database description | ||
/// </summary> | ||
/// <value>Document database description</value> | ||
[DataMember(Name="Description", EmitDefaultValue=false)] | ||
public string Description { get; set; } | ||
|
||
/// <summary> | ||
/// Date the document database was created | ||
/// </summary> | ||
/// <value>Date the document database was created</value> | ||
[DataMember(Name="ExportDate", EmitDefaultValue=false)] | ||
public string ExportDate { get; set; } | ||
|
||
/// <summary> | ||
/// Document database identifier | ||
/// </summary> | ||
/// <value>Document database identifier</value> | ||
[DataMember(Name="ID", EmitDefaultValue=false)] | ||
public string ID { get; set; } | ||
|
||
/// <summary> | ||
/// Document database version | ||
/// </summary> | ||
/// <value>Document database version</value> | ||
[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 DocumentsDatabase {\n"); | ||
sb.Append(" Description: ").Append(Description).Append("\n"); | ||
sb.Append(" ExportDate: ").Append(ExportDate).Append("\n"); | ||
sb.Append(" ID: ").Append(ID).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 DocumentsDatabase); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if DocumentsDatabase instances are equal | ||
/// </summary> | ||
/// <param name="input">Instance of DocumentsDatabase to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public bool Equals(DocumentsDatabase input) | ||
{ | ||
if (input == null) | ||
return false; | ||
|
||
return | ||
( | ||
this.Description == input.Description || | ||
(this.Description != null && | ||
this.Description.Equals(input.Description)) | ||
) && | ||
( | ||
this.ExportDate == input.ExportDate || | ||
(this.ExportDate != null && | ||
this.ExportDate.Equals(input.ExportDate)) | ||
) && | ||
( | ||
this.ID == input.ID || | ||
(this.ID != null && | ||
this.ID.Equals(input.ID)) | ||
) && | ||
( | ||
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.Description != null) | ||
hashCode = hashCode * 59 + this.Description.GetHashCode(); | ||
if (this.ExportDate != null) | ||
hashCode = hashCode * 59 + this.ExportDate.GetHashCode(); | ||
if (this.ID != null) | ||
hashCode = hashCode * 59 + this.ID.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; | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.