Skip to content

Commit

Permalink
Update clients
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 25, 2024
1 parent 3dc58bc commit 7a8cd91
Show file tree
Hide file tree
Showing 13 changed files with 1,104 additions and 22 deletions.
141 changes: 141 additions & 0 deletions src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs
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;
}
}

}
19 changes: 18 additions & 1 deletion src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ protected DocumentImage() { }
/// Initializes a new instance of the <see cref="DocumentImage" /> class.
/// </summary>
/// <param name="image">Base64 encoded image (required).</param>
public DocumentImage(string image = default(string))
/// <param name="format">Image format.</param>
public DocumentImage(string image = default(string), string format = default(string))
{
// to ensure "image" is required (not null)
if (image == null)
Expand All @@ -51,6 +52,7 @@ protected DocumentImage() { }
this.Image = image;
}

this.Format = format;
}

/// <summary>
Expand All @@ -60,6 +62,13 @@ protected DocumentImage() { }
[DataMember(Name="image", EmitDefaultValue=true)]
public string Image { get; set; }

/// <summary>
/// Image format
/// </summary>
/// <value>Image format</value>
[DataMember(Name="format", EmitDefaultValue=false)]
public string Format { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
Expand All @@ -69,6 +78,7 @@ public override string ToString()
var sb = new StringBuilder();
sb.Append("class DocumentImage {\n");
sb.Append(" Image: ").Append(Image).Append("\n");
sb.Append(" Format: ").Append(Format).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down Expand Up @@ -107,6 +117,11 @@ public bool Equals(DocumentImage input)
this.Image == input.Image ||
(this.Image != null &&
this.Image.Equals(input.Image))
) &&
(
this.Format == input.Format ||
(this.Format != null &&
this.Format.Equals(input.Format))
);
}

Expand All @@ -121,6 +136,8 @@ public override int GetHashCode()
int hashCode = 41;
if (this.Image != null)
hashCode = hashCode * 59 + this.Image.GetHashCode();
if (this.Format != null)
hashCode = hashCode * 59 + this.Format.GetHashCode();
return hashCode;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
namespace Regula.DocumentReader.WebClient.Model
{
/// <summary>
/// DocumentImageResult
/// Contains document image.
/// </summary>
[DataContract]
public partial class DocumentImageResult : ResultItem, IEquatable<DocumentImageResult>, IValidatableObject
Expand Down
176 changes: 176 additions & 0 deletions src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs
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;
}
}

}
Loading

0 comments on commit 7a8cd91

Please sign in to comment.