Skip to content

Commit 3ef8c38

Browse files
committed
Merge branch 'develop' of github.com:regulaforensics/DocumentReader-web-csharp-client into sp-19910-remove-outdated-dependencies
2 parents a251ded + 9075597 commit 3ef8c38

13 files changed

+1104
-22
lines changed
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
/*
2+
* Regula Document Reader Web API
3+
*
4+
* 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
5+
*
6+
* The version of the OpenAPI document: 7.2.0
7+
*
8+
* Generated by: https://github.com/openapitools/openapi-generator.git
9+
*/
10+
11+
using System;
12+
using System.Linq;
13+
using System.IO;
14+
using System.Text;
15+
using System.Text.RegularExpressions;
16+
using System.Collections;
17+
using System.Collections.Generic;
18+
using System.Collections.ObjectModel;
19+
using System.Runtime.Serialization;
20+
using Newtonsoft.Json;
21+
using Newtonsoft.Json.Converters;
22+
using System.ComponentModel.DataAnnotations;
23+
using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter;
24+
25+
namespace Regula.DocumentReader.WebClient.Model
26+
{
27+
/// <summary>
28+
/// ByteArrayResult
29+
/// </summary>
30+
[DataContract]
31+
public partial class ByteArrayResult : ResultItem, IEquatable<ByteArrayResult>, IValidatableObject
32+
{
33+
/// <summary>
34+
/// Initializes a new instance of the <see cref="ByteArrayResult" /> class.
35+
/// </summary>
36+
[JsonConstructorAttribute]
37+
protected ByteArrayResult() { }
38+
/// <summary>
39+
/// Initializes a new instance of the <see cref="ByteArrayResult" /> class.
40+
/// </summary>
41+
/// <param name="byteArray">Byte array in base64 (required).</param>
42+
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)
43+
{
44+
// to ensure "byteArray" is required (not null)
45+
if (byteArray == null)
46+
{
47+
throw new InvalidDataException("byteArray is a required property for ByteArrayResult and cannot be null");
48+
}
49+
else
50+
{
51+
this.ByteArray = byteArray;
52+
}
53+
54+
}
55+
56+
/// <summary>
57+
/// Byte array in base64
58+
/// </summary>
59+
/// <value>Byte array in base64</value>
60+
[DataMember(Name="ByteArray", EmitDefaultValue=true)]
61+
public string ByteArray { get; set; }
62+
63+
/// <summary>
64+
/// Returns the string presentation of the object
65+
/// </summary>
66+
/// <returns>String presentation of the object</returns>
67+
public override string ToString()
68+
{
69+
var sb = new StringBuilder();
70+
sb.Append("class ByteArrayResult {\n");
71+
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
72+
sb.Append(" ByteArray: ").Append(ByteArray).Append("\n");
73+
sb.Append("}\n");
74+
return sb.ToString();
75+
}
76+
77+
/// <summary>
78+
/// Returns the JSON string presentation of the object
79+
/// </summary>
80+
/// <returns>JSON string presentation of the object</returns>
81+
public override string ToJson()
82+
{
83+
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
84+
}
85+
86+
/// <summary>
87+
/// Returns true if objects are equal
88+
/// </summary>
89+
/// <param name="input">Object to be compared</param>
90+
/// <returns>Boolean</returns>
91+
public override bool Equals(object input)
92+
{
93+
return this.Equals(input as ByteArrayResult);
94+
}
95+
96+
/// <summary>
97+
/// Returns true if ByteArrayResult instances are equal
98+
/// </summary>
99+
/// <param name="input">Instance of ByteArrayResult to be compared</param>
100+
/// <returns>Boolean</returns>
101+
public bool Equals(ByteArrayResult input)
102+
{
103+
if (input == null)
104+
return false;
105+
106+
return base.Equals(input) &&
107+
(
108+
this.ByteArray == input.ByteArray ||
109+
(this.ByteArray != null &&
110+
this.ByteArray.Equals(input.ByteArray))
111+
);
112+
}
113+
114+
/// <summary>
115+
/// Gets the hash code
116+
/// </summary>
117+
/// <returns>Hash code</returns>
118+
public override int GetHashCode()
119+
{
120+
unchecked // Overflow is fine, just wrap
121+
{
122+
int hashCode = base.GetHashCode();
123+
if (this.ByteArray != null)
124+
hashCode = hashCode * 59 + this.ByteArray.GetHashCode();
125+
return hashCode;
126+
}
127+
}
128+
129+
/// <summary>
130+
/// To validate all properties of the instance
131+
/// </summary>
132+
/// <param name="validationContext">Validation context</param>
133+
/// <returns>Validation Result</returns>
134+
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
135+
{
136+
foreach(var x in base.BaseValidate(validationContext)) yield return x;
137+
yield break;
138+
}
139+
}
140+
141+
}

src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ protected DocumentImage() { }
3939
/// Initializes a new instance of the <see cref="DocumentImage" /> class.
4040
/// </summary>
4141
/// <param name="image">Base64 encoded image (required).</param>
42-
public DocumentImage(string image = default(string))
42+
/// <param name="format">Image format.</param>
43+
public DocumentImage(string image = default(string), string format = default(string))
4344
{
4445
// to ensure "image" is required (not null)
4546
if (image == null)
@@ -51,6 +52,7 @@ protected DocumentImage() { }
5152
this.Image = image;
5253
}
5354

55+
this.Format = format;
5456
}
5557

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

65+
/// <summary>
66+
/// Image format
67+
/// </summary>
68+
/// <value>Image format</value>
69+
[DataMember(Name="format", EmitDefaultValue=false)]
70+
public string Format { get; set; }
71+
6372
/// <summary>
6473
/// Returns the string presentation of the object
6574
/// </summary>
@@ -69,6 +78,7 @@ public override string ToString()
6978
var sb = new StringBuilder();
7079
sb.Append("class DocumentImage {\n");
7180
sb.Append(" Image: ").Append(Image).Append("\n");
81+
sb.Append(" Format: ").Append(Format).Append("\n");
7282
sb.Append("}\n");
7383
return sb.ToString();
7484
}
@@ -107,6 +117,11 @@ public bool Equals(DocumentImage input)
107117
this.Image == input.Image ||
108118
(this.Image != null &&
109119
this.Image.Equals(input.Image))
120+
) &&
121+
(
122+
this.Format == input.Format ||
123+
(this.Format != null &&
124+
this.Format.Equals(input.Format))
110125
);
111126
}
112127

@@ -121,6 +136,8 @@ public override int GetHashCode()
121136
int hashCode = 41;
122137
if (this.Image != null)
123138
hashCode = hashCode * 59 + this.Image.GetHashCode();
139+
if (this.Format != null)
140+
hashCode = hashCode * 59 + this.Format.GetHashCode();
124141
return hashCode;
125142
}
126143
}

src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
namespace Regula.DocumentReader.WebClient.Model
2626
{
2727
/// <summary>
28-
/// DocumentImageResult
28+
/// Contains document image.
2929
/// </summary>
3030
[DataContract]
3131
public partial class DocumentImageResult : ResultItem, IEquatable<DocumentImageResult>, IValidatableObject
Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
/*
2+
* Regula Document Reader Web API
3+
*
4+
* 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
5+
*
6+
* The version of the OpenAPI document: 7.2.0
7+
*
8+
* Generated by: https://github.com/openapitools/openapi-generator.git
9+
*/
10+
11+
using System;
12+
using System.Linq;
13+
using System.IO;
14+
using System.Text;
15+
using System.Text.RegularExpressions;
16+
using System.Collections;
17+
using System.Collections.Generic;
18+
using System.Collections.ObjectModel;
19+
using System.Runtime.Serialization;
20+
using Newtonsoft.Json;
21+
using Newtonsoft.Json.Converters;
22+
using System.ComponentModel.DataAnnotations;
23+
using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter;
24+
25+
namespace Regula.DocumentReader.WebClient.Model
26+
{
27+
/// <summary>
28+
/// Document database information
29+
/// </summary>
30+
[DataContract]
31+
public partial class DocumentsDatabase : IEquatable<DocumentsDatabase>, IValidatableObject
32+
{
33+
/// <summary>
34+
/// Initializes a new instance of the <see cref="DocumentsDatabase" /> class.
35+
/// </summary>
36+
/// <param name="description">Document database description.</param>
37+
/// <param name="exportDate">Date the document database was created.</param>
38+
/// <param name="iD">Document database identifier.</param>
39+
/// <param name="version">Document database version.</param>
40+
public DocumentsDatabase(string description = default(string), string exportDate = default(string), string iD = default(string), string version = default(string))
41+
{
42+
this.Description = description;
43+
this.ExportDate = exportDate;
44+
this.ID = iD;
45+
this.Version = version;
46+
}
47+
48+
/// <summary>
49+
/// Document database description
50+
/// </summary>
51+
/// <value>Document database description</value>
52+
[DataMember(Name="Description", EmitDefaultValue=false)]
53+
public string Description { get; set; }
54+
55+
/// <summary>
56+
/// Date the document database was created
57+
/// </summary>
58+
/// <value>Date the document database was created</value>
59+
[DataMember(Name="ExportDate", EmitDefaultValue=false)]
60+
public string ExportDate { get; set; }
61+
62+
/// <summary>
63+
/// Document database identifier
64+
/// </summary>
65+
/// <value>Document database identifier</value>
66+
[DataMember(Name="ID", EmitDefaultValue=false)]
67+
public string ID { get; set; }
68+
69+
/// <summary>
70+
/// Document database version
71+
/// </summary>
72+
/// <value>Document database version</value>
73+
[DataMember(Name="Version", EmitDefaultValue=false)]
74+
public string Version { get; set; }
75+
76+
/// <summary>
77+
/// Returns the string presentation of the object
78+
/// </summary>
79+
/// <returns>String presentation of the object</returns>
80+
public override string ToString()
81+
{
82+
var sb = new StringBuilder();
83+
sb.Append("class DocumentsDatabase {\n");
84+
sb.Append(" Description: ").Append(Description).Append("\n");
85+
sb.Append(" ExportDate: ").Append(ExportDate).Append("\n");
86+
sb.Append(" ID: ").Append(ID).Append("\n");
87+
sb.Append(" Version: ").Append(Version).Append("\n");
88+
sb.Append("}\n");
89+
return sb.ToString();
90+
}
91+
92+
/// <summary>
93+
/// Returns the JSON string presentation of the object
94+
/// </summary>
95+
/// <returns>JSON string presentation of the object</returns>
96+
public virtual string ToJson()
97+
{
98+
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
99+
}
100+
101+
/// <summary>
102+
/// Returns true if objects are equal
103+
/// </summary>
104+
/// <param name="input">Object to be compared</param>
105+
/// <returns>Boolean</returns>
106+
public override bool Equals(object input)
107+
{
108+
return this.Equals(input as DocumentsDatabase);
109+
}
110+
111+
/// <summary>
112+
/// Returns true if DocumentsDatabase instances are equal
113+
/// </summary>
114+
/// <param name="input">Instance of DocumentsDatabase to be compared</param>
115+
/// <returns>Boolean</returns>
116+
public bool Equals(DocumentsDatabase input)
117+
{
118+
if (input == null)
119+
return false;
120+
121+
return
122+
(
123+
this.Description == input.Description ||
124+
(this.Description != null &&
125+
this.Description.Equals(input.Description))
126+
) &&
127+
(
128+
this.ExportDate == input.ExportDate ||
129+
(this.ExportDate != null &&
130+
this.ExportDate.Equals(input.ExportDate))
131+
) &&
132+
(
133+
this.ID == input.ID ||
134+
(this.ID != null &&
135+
this.ID.Equals(input.ID))
136+
) &&
137+
(
138+
this.Version == input.Version ||
139+
(this.Version != null &&
140+
this.Version.Equals(input.Version))
141+
);
142+
}
143+
144+
/// <summary>
145+
/// Gets the hash code
146+
/// </summary>
147+
/// <returns>Hash code</returns>
148+
public override int GetHashCode()
149+
{
150+
unchecked // Overflow is fine, just wrap
151+
{
152+
int hashCode = 41;
153+
if (this.Description != null)
154+
hashCode = hashCode * 59 + this.Description.GetHashCode();
155+
if (this.ExportDate != null)
156+
hashCode = hashCode * 59 + this.ExportDate.GetHashCode();
157+
if (this.ID != null)
158+
hashCode = hashCode * 59 + this.ID.GetHashCode();
159+
if (this.Version != null)
160+
hashCode = hashCode * 59 + this.Version.GetHashCode();
161+
return hashCode;
162+
}
163+
}
164+
165+
/// <summary>
166+
/// To validate all properties of the instance
167+
/// </summary>
168+
/// <param name="validationContext">Validation context</param>
169+
/// <returns>Validation Result</returns>
170+
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
171+
{
172+
yield break;
173+
}
174+
}
175+
176+
}

0 commit comments

Comments
 (0)