-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDatabaseDocument.cs
More file actions
268 lines (244 loc) · 11.8 KB
/
DatabaseDocument.cs
File metadata and controls
268 lines (244 loc) · 11.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
/*
* 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: 8.1.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter;
using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter;
namespace Regula.DocumentReader.WebClient.Model
{
/// <summary>
/// DatabaseDocument
/// </summary>
[DataContract(Name = "DatabaseDocument")]
public partial class DatabaseDocument : IValidatableObject
{
/// <summary>
/// Gets or Sets DocType
/// </summary>
[DataMember(Name = "doc_type", IsRequired = true, EmitDefaultValue = true)]
public DocumentType DocType { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="DatabaseDocument" /> class.
/// </summary>
[JsonConstructorAttribute]
protected DatabaseDocument() { }
/// <summary>
/// Initializes a new instance of the <see cref="DatabaseDocument" /> class.
/// </summary>
/// <param name="barcodeFields">Whether the document has a barcode. (required).</param>
/// <param name="country">Country name. (required).</param>
/// <param name="createad">Date when the document description was created in the database. (required).</param>
/// <param name="docType">docType (required).</param>
/// <param name="document">Document name. (required).</param>
/// <param name="graphicFields">The presence of graphic fields in the document. (required).</param>
/// <param name="id">Document code. (required).</param>
/// <param name="mrz">The document has an MRZ. (required).</param>
/// <param name="region">Country region..</param>
/// <param name="rfidChip">The document has an RFID chip. (required).</param>
/// <param name="textFields">The presence of text fields in the document. (required).</param>
/// <param name="updated">Date when the document description was updated in the database. (required).</param>
/// <param name="year">The year when the document was issued..</param>
/// <param name="sovereignty">Guardian country..</param>
/// <param name="deprecated">Whether the document is no longer in circulation..</param>
/// <param name="icaoCode">ICAO country code..</param>
/// <param name="docCodes">Document codes..</param>
public DatabaseDocument(bool barcodeFields = default, string country = default, string createad = default, DocumentType docType = default, string document = default, bool graphicFields = default, int id = default, bool mrz = default, string? region = default, bool rfidChip = default, bool textFields = default, string updated = default, string? year = default, string? sovereignty = default, bool? deprecated = default, string? icaoCode = default, string? docCodes = default)
{
this.BarcodeFields = barcodeFields;
// to ensure "country" is required (not null)
if (country == null)
{
throw new ArgumentNullException("country is a required property for DatabaseDocument and cannot be null");
}
this.Country = country;
// to ensure "createad" is required (not null)
if (createad == null)
{
throw new ArgumentNullException("createad is a required property for DatabaseDocument and cannot be null");
}
this.Createad = createad;
this.DocType = docType;
// to ensure "document" is required (not null)
if (document == null)
{
throw new ArgumentNullException("document is a required property for DatabaseDocument and cannot be null");
}
this.Document = document;
this.GraphicFields = graphicFields;
this.Id = id;
this.Mrz = mrz;
this.RfidChip = rfidChip;
this.TextFields = textFields;
// to ensure "updated" is required (not null)
if (updated == null)
{
throw new ArgumentNullException("updated is a required property for DatabaseDocument and cannot be null");
}
this.Updated = updated;
this.Region = region;
this.Year = year;
this.Sovereignty = sovereignty;
this.Deprecated = deprecated;
this.IcaoCode = icaoCode;
this.DocCodes = docCodes;
}
/// <summary>
/// Whether the document has a barcode.
/// </summary>
/// <value>Whether the document has a barcode.</value>
[DataMember(Name = "barcode_fields", IsRequired = true, EmitDefaultValue = true)]
public bool BarcodeFields { get; set; }
/// <summary>
/// Country name.
/// </summary>
/// <value>Country name.</value>
[DataMember(Name = "country", IsRequired = true, EmitDefaultValue = true)]
public string Country { get; set; }
/// <summary>
/// Date when the document description was created in the database.
/// </summary>
/// <value>Date when the document description was created in the database.</value>
[DataMember(Name = "createad", IsRequired = true, EmitDefaultValue = true)]
public string Createad { get; set; }
/// <summary>
/// Document name.
/// </summary>
/// <value>Document name.</value>
[DataMember(Name = "document", IsRequired = true, EmitDefaultValue = true)]
public string Document { get; set; }
/// <summary>
/// The presence of graphic fields in the document.
/// </summary>
/// <value>The presence of graphic fields in the document.</value>
[DataMember(Name = "graphic_fields", IsRequired = true, EmitDefaultValue = true)]
public bool GraphicFields { get; set; }
/// <summary>
/// Document code.
/// </summary>
/// <value>Document code.</value>
[DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)]
public int Id { get; set; }
/// <summary>
/// The document has an MRZ.
/// </summary>
/// <value>The document has an MRZ.</value>
[DataMember(Name = "mrz", IsRequired = true, EmitDefaultValue = true)]
public bool Mrz { get; set; }
/// <summary>
/// Country region.
/// </summary>
/// <value>Country region.</value>
[DataMember(Name = "region", EmitDefaultValue = false)]
public string? Region { get; set; }
/// <summary>
/// The document has an RFID chip.
/// </summary>
/// <value>The document has an RFID chip.</value>
[DataMember(Name = "rfid_chip", IsRequired = true, EmitDefaultValue = true)]
public bool RfidChip { get; set; }
/// <summary>
/// The presence of text fields in the document.
/// </summary>
/// <value>The presence of text fields in the document.</value>
[DataMember(Name = "text_fields", IsRequired = true, EmitDefaultValue = true)]
public bool TextFields { get; set; }
/// <summary>
/// Date when the document description was updated in the database.
/// </summary>
/// <value>Date when the document description was updated in the database.</value>
[DataMember(Name = "updated", IsRequired = true, EmitDefaultValue = true)]
public string Updated { get; set; }
/// <summary>
/// The year when the document was issued.
/// </summary>
/// <value>The year when the document was issued.</value>
[DataMember(Name = "year", EmitDefaultValue = false)]
public string? Year { get; set; }
/// <summary>
/// Guardian country.
/// </summary>
/// <value>Guardian country.</value>
[DataMember(Name = "sovereignty", EmitDefaultValue = false)]
public string? Sovereignty { get; set; }
/// <summary>
/// Whether the document is no longer in circulation.
/// </summary>
/// <value>Whether the document is no longer in circulation.</value>
[DataMember(Name = "deprecated", EmitDefaultValue = false)]
public bool? Deprecated { get; set; }
/// <summary>
/// ICAO country code.
/// </summary>
/// <value>ICAO country code.</value>
[DataMember(Name = "icao_code", EmitDefaultValue = false)]
public string? IcaoCode { get; set; }
/// <summary>
/// Document codes.
/// </summary>
/// <value>Document codes.</value>
[DataMember(Name = "doc_codes", EmitDefaultValue = false)]
public string? DocCodes { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class DatabaseDocument {\n");
sb.Append(" BarcodeFields: ").Append(BarcodeFields).Append("\n");
sb.Append(" Country: ").Append(Country).Append("\n");
sb.Append(" Createad: ").Append(Createad).Append("\n");
sb.Append(" DocType: ").Append(DocType).Append("\n");
sb.Append(" Document: ").Append(Document).Append("\n");
sb.Append(" GraphicFields: ").Append(GraphicFields).Append("\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Mrz: ").Append(Mrz).Append("\n");
sb.Append(" Region: ").Append(Region).Append("\n");
sb.Append(" RfidChip: ").Append(RfidChip).Append("\n");
sb.Append(" TextFields: ").Append(TextFields).Append("\n");
sb.Append(" Updated: ").Append(Updated).Append("\n");
sb.Append(" Year: ").Append(Year).Append("\n");
sb.Append(" Sovereignty: ").Append(Sovereignty).Append("\n");
sb.Append(" Deprecated: ").Append(Deprecated).Append("\n");
sb.Append(" IcaoCode: ").Append(IcaoCode).Append("\n");
sb.Append(" DocCodes: ").Append(DocCodes).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>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}