-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathRfidDG1.cs
More file actions
282 lines (259 loc) · 13.3 KB
/
Copy pathRfidDG1.cs
File metadata and controls
282 lines (259 loc) · 13.3 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
269
270
271
272
273
274
275
276
277
278
279
280
281
282
/*
* 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>
/// Structure used to store the contents of EF.DG1 informational data group of ePassport application – document MRZ data
/// </summary>
[DataContract(Name = "RfidDG1")]
public partial class RfidDG1 : IValidatableObject
{
/// <summary>
/// Gets or Sets DocumentID
/// </summary>
[DataMember(Name = "DocumentID", IsRequired = true, EmitDefaultValue = true)]
public DocumentFormat DocumentID { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="RfidDG1" /> class.
/// </summary>
[JsonConstructorAttribute]
protected RfidDG1() { }
/// <summary>
/// Initializes a new instance of the <see cref="RfidDG1" /> class.
/// </summary>
/// <param name="type">type (required).</param>
/// <param name="documentID">documentID (required).</param>
/// <param name="documentType">Symbolic code of document type (required).</param>
/// <param name="state">Symbolic code of document issuing state (required).</param>
/// <param name="holder">DO’s name and surname (required).</param>
/// <param name="documentNumber">Document number (required).</param>
/// <param name="checkDigitDocumentNumber">Check digit of document number (required).</param>
/// <param name="nationality">Symbolic code of DO’s nationality (required).</param>
/// <param name="birthday">DO’s date of birth (required).</param>
/// <param name="checkDigitBirthday">Check digit of DO’s date of birth (required).</param>
/// <param name="sex">DO’s sex (required).</param>
/// <param name="expiryDate">Term of validity of the document (required).</param>
/// <param name="checkDigitExpiryDate">Check digit of term of validity of the document (required).</param>
/// <param name="optionalData">DO’s personal number or other additional data (required).</param>
/// <param name="checkDigitOptionalData">Check digit of additional data (required).</param>
/// <param name="checkDigitComposite">General check digit (required).</param>
public RfidDG1(int type = default(int), DocumentFormat documentID = default(DocumentFormat), string documentType = default(string), string state = default(string), string holder = default(string), string documentNumber = default(string), decimal checkDigitDocumentNumber = default(decimal), string nationality = default(string), string birthday = default(string), decimal checkDigitBirthday = default(decimal), string sex = default(string), string expiryDate = default(string), decimal checkDigitExpiryDate = default(decimal), string optionalData = default(string), decimal checkDigitOptionalData = default(decimal), decimal checkDigitComposite = default(decimal))
{
this.Type = type;
this.DocumentID = documentID;
// to ensure "documentType" is required (not null)
if (documentType == null)
{
throw new ArgumentNullException("documentType is a required property for RfidDG1 and cannot be null");
}
this.DocumentType = documentType;
// to ensure "state" is required (not null)
if (state == null)
{
throw new ArgumentNullException("state is a required property for RfidDG1 and cannot be null");
}
this.State = state;
// to ensure "holder" is required (not null)
if (holder == null)
{
throw new ArgumentNullException("holder is a required property for RfidDG1 and cannot be null");
}
this.Holder = holder;
// to ensure "documentNumber" is required (not null)
if (documentNumber == null)
{
throw new ArgumentNullException("documentNumber is a required property for RfidDG1 and cannot be null");
}
this.DocumentNumber = documentNumber;
this.CheckDigitDocumentNumber = checkDigitDocumentNumber;
// to ensure "nationality" is required (not null)
if (nationality == null)
{
throw new ArgumentNullException("nationality is a required property for RfidDG1 and cannot be null");
}
this.Nationality = nationality;
// to ensure "birthday" is required (not null)
if (birthday == null)
{
throw new ArgumentNullException("birthday is a required property for RfidDG1 and cannot be null");
}
this.Birthday = birthday;
this.CheckDigitBirthday = checkDigitBirthday;
// to ensure "sex" is required (not null)
if (sex == null)
{
throw new ArgumentNullException("sex is a required property for RfidDG1 and cannot be null");
}
this.Sex = sex;
// to ensure "expiryDate" is required (not null)
if (expiryDate == null)
{
throw new ArgumentNullException("expiryDate is a required property for RfidDG1 and cannot be null");
}
this.ExpiryDate = expiryDate;
this.CheckDigitExpiryDate = checkDigitExpiryDate;
// to ensure "optionalData" is required (not null)
if (optionalData == null)
{
throw new ArgumentNullException("optionalData is a required property for RfidDG1 and cannot be null");
}
this.OptionalData = optionalData;
this.CheckDigitOptionalData = checkDigitOptionalData;
this.CheckDigitComposite = checkDigitComposite;
}
/// <summary>
/// Gets or Sets Type
/// </summary>
[DataMember(Name = "Type", IsRequired = true, EmitDefaultValue = true)]
public int Type { get; set; }
/// <summary>
/// Symbolic code of document type
/// </summary>
/// <value>Symbolic code of document type</value>
[DataMember(Name = "DocumentType", IsRequired = true, EmitDefaultValue = true)]
public string DocumentType { get; set; }
/// <summary>
/// Symbolic code of document issuing state
/// </summary>
/// <value>Symbolic code of document issuing state</value>
[DataMember(Name = "State", IsRequired = true, EmitDefaultValue = true)]
public string State { get; set; }
/// <summary>
/// DO’s name and surname
/// </summary>
/// <value>DO’s name and surname</value>
[DataMember(Name = "Holder", IsRequired = true, EmitDefaultValue = true)]
public string Holder { get; set; }
/// <summary>
/// Document number
/// </summary>
/// <value>Document number</value>
[DataMember(Name = "DocumentNumber", IsRequired = true, EmitDefaultValue = true)]
public string DocumentNumber { get; set; }
/// <summary>
/// Check digit of document number
/// </summary>
/// <value>Check digit of document number</value>
[DataMember(Name = "CheckDigitDocumentNumber", IsRequired = true, EmitDefaultValue = true)]
public decimal CheckDigitDocumentNumber { get; set; }
/// <summary>
/// Symbolic code of DO’s nationality
/// </summary>
/// <value>Symbolic code of DO’s nationality</value>
[DataMember(Name = "Nationality", IsRequired = true, EmitDefaultValue = true)]
public string Nationality { get; set; }
/// <summary>
/// DO’s date of birth
/// </summary>
/// <value>DO’s date of birth</value>
[DataMember(Name = "Birthday", IsRequired = true, EmitDefaultValue = true)]
public string Birthday { get; set; }
/// <summary>
/// Check digit of DO’s date of birth
/// </summary>
/// <value>Check digit of DO’s date of birth</value>
[DataMember(Name = "CheckDigitBirthday", IsRequired = true, EmitDefaultValue = true)]
public decimal CheckDigitBirthday { get; set; }
/// <summary>
/// DO’s sex
/// </summary>
/// <value>DO’s sex</value>
[DataMember(Name = "Sex", IsRequired = true, EmitDefaultValue = true)]
public string Sex { get; set; }
/// <summary>
/// Term of validity of the document
/// </summary>
/// <value>Term of validity of the document</value>
[DataMember(Name = "ExpiryDate", IsRequired = true, EmitDefaultValue = true)]
public string ExpiryDate { get; set; }
/// <summary>
/// Check digit of term of validity of the document
/// </summary>
/// <value>Check digit of term of validity of the document</value>
[DataMember(Name = "CheckDigitExpiryDate", IsRequired = true, EmitDefaultValue = true)]
public decimal CheckDigitExpiryDate { get; set; }
/// <summary>
/// DO’s personal number or other additional data
/// </summary>
/// <value>DO’s personal number or other additional data</value>
[DataMember(Name = "OptionalData", IsRequired = true, EmitDefaultValue = true)]
public string OptionalData { get; set; }
/// <summary>
/// Check digit of additional data
/// </summary>
/// <value>Check digit of additional data</value>
[DataMember(Name = "CheckDigitOptionalData", IsRequired = true, EmitDefaultValue = true)]
public decimal CheckDigitOptionalData { get; set; }
/// <summary>
/// General check digit
/// </summary>
/// <value>General check digit</value>
[DataMember(Name = "CheckDigitComposite", IsRequired = true, EmitDefaultValue = true)]
public decimal CheckDigitComposite { 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 RfidDG1 {\n");
sb.Append(" Type: ").Append(Type).Append("\n");
sb.Append(" DocumentID: ").Append(DocumentID).Append("\n");
sb.Append(" DocumentType: ").Append(DocumentType).Append("\n");
sb.Append(" State: ").Append(State).Append("\n");
sb.Append(" Holder: ").Append(Holder).Append("\n");
sb.Append(" DocumentNumber: ").Append(DocumentNumber).Append("\n");
sb.Append(" CheckDigitDocumentNumber: ").Append(CheckDigitDocumentNumber).Append("\n");
sb.Append(" Nationality: ").Append(Nationality).Append("\n");
sb.Append(" Birthday: ").Append(Birthday).Append("\n");
sb.Append(" CheckDigitBirthday: ").Append(CheckDigitBirthday).Append("\n");
sb.Append(" Sex: ").Append(Sex).Append("\n");
sb.Append(" ExpiryDate: ").Append(ExpiryDate).Append("\n");
sb.Append(" CheckDigitExpiryDate: ").Append(CheckDigitExpiryDate).Append("\n");
sb.Append(" OptionalData: ").Append(OptionalData).Append("\n");
sb.Append(" CheckDigitOptionalData: ").Append(CheckDigitOptionalData).Append("\n");
sb.Append(" CheckDigitComposite: ").Append(CheckDigitComposite).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;
}
}
}