-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathFDSIDList.cs
More file actions
219 lines (198 loc) · 9.57 KB
/
Copy pathFDSIDList.cs
File metadata and controls
219 lines (198 loc) · 9.57 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
/*
* 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>
/// Extended document type info and Regula's 'Information Reference Systems' links
/// </summary>
[DataContract(Name = "FDSIDList")]
public partial class FDSIDList : IValidatableObject
{
/// <summary>
/// Gets or Sets DType
/// </summary>
[DataMember(Name = "dType", IsRequired = true, EmitDefaultValue = true)]
public DocumentType DType { get; set; }
/// <summary>
/// Gets or Sets DFormat
/// </summary>
[DataMember(Name = "dFormat", IsRequired = true, EmitDefaultValue = true)]
public DocumentFormat DFormat { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="FDSIDList" /> class.
/// </summary>
[JsonConstructorAttribute]
protected FDSIDList() { }
/// <summary>
/// Initializes a new instance of the <see cref="FDSIDList" /> class.
/// </summary>
/// <param name="iCAOCode">ICAO code of the issuing country (required).</param>
/// <param name="count">Number of elements in the List.</param>
/// <param name="list">Document identifiers in 'Information Reference Systems'.</param>
/// <param name="dType">dType (required).</param>
/// <param name="dFormat">dFormat (required).</param>
/// <param name="dMRZ">Flag indicating the presence of MRZ on the document (required).</param>
/// <param name="dDescription">Document description.</param>
/// <param name="dYear">Year of publication of the document.</param>
/// <param name="dCountryName">Issuing country name (required).</param>
/// <param name="dStateCode">Issuing state code.</param>
/// <param name="dStateName">Issuing state name.</param>
/// <param name="isDeprecated">Whether the document is deprecated (required).</param>
public FDSIDList(string iCAOCode = default(string), decimal count = default(decimal), List<int> list = default(List<int>), DocumentType dType = default(DocumentType), DocumentFormat dFormat = default(DocumentFormat), bool dMRZ = default(bool), string dDescription = default(string), string dYear = default(string), string dCountryName = default(string), string dStateCode = default(string), string dStateName = default(string), bool isDeprecated = default(bool))
{
// to ensure "iCAOCode" is required (not null)
if (iCAOCode == null)
{
throw new ArgumentNullException("iCAOCode is a required property for FDSIDList and cannot be null");
}
this.ICAOCode = iCAOCode;
this.DType = dType;
this.DFormat = dFormat;
this.DMRZ = dMRZ;
// to ensure "dCountryName" is required (not null)
if (dCountryName == null)
{
throw new ArgumentNullException("dCountryName is a required property for FDSIDList and cannot be null");
}
this.DCountryName = dCountryName;
this.IsDeprecated = isDeprecated;
this.Count = count;
this.List = list;
this.DDescription = dDescription;
this.DYear = dYear;
this.DStateCode = dStateCode;
this.DStateName = dStateName;
}
/// <summary>
/// ICAO code of the issuing country
/// </summary>
/// <value>ICAO code of the issuing country</value>
[DataMember(Name = "ICAOCode", IsRequired = true, EmitDefaultValue = true)]
public string ICAOCode { get; set; }
/// <summary>
/// Number of elements in the List
/// </summary>
/// <value>Number of elements in the List</value>
[DataMember(Name = "Count", EmitDefaultValue = false)]
public decimal? Count { get; set; }
/// <summary>
/// Document identifiers in 'Information Reference Systems'
/// </summary>
/// <value>Document identifiers in 'Information Reference Systems'</value>
[DataMember(Name = "List", EmitDefaultValue = false)]
public List<int>? List { get; set; }
/// <summary>
/// Flag indicating the presence of MRZ on the document
/// </summary>
/// <value>Flag indicating the presence of MRZ on the document</value>
[DataMember(Name = "dMRZ", IsRequired = true, EmitDefaultValue = true)]
public bool DMRZ { get; set; }
/// <summary>
/// Document description
/// </summary>
/// <value>Document description</value>
[DataMember(Name = "dDescription", EmitDefaultValue = false)]
public string? DDescription { get; set; }
/// <summary>
/// Year of publication of the document
/// </summary>
/// <value>Year of publication of the document</value>
[DataMember(Name = "dYear", EmitDefaultValue = false)]
public string? DYear { get; set; }
/// <summary>
/// Issuing country name
/// </summary>
/// <value>Issuing country name</value>
[DataMember(Name = "dCountryName", IsRequired = true, EmitDefaultValue = true)]
public string DCountryName { get; set; }
/// <summary>
/// Issuing state code
/// </summary>
/// <value>Issuing state code</value>
[DataMember(Name = "dStateCode", EmitDefaultValue = false)]
public string? DStateCode { get; set; }
/// <summary>
/// Issuing state name
/// </summary>
/// <value>Issuing state name</value>
[DataMember(Name = "dStateName", EmitDefaultValue = false)]
public string? DStateName { get; set; }
/// <summary>
/// Whether the document is deprecated
/// </summary>
/// <value>Whether the document is deprecated</value>
[DataMember(Name = "isDeprecated", IsRequired = true, EmitDefaultValue = true)]
public bool IsDeprecated { 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 FDSIDList {\n");
sb.Append(" ICAOCode: ").Append(ICAOCode).Append("\n");
sb.Append(" Count: ").Append(Count).Append("\n");
sb.Append(" List: ").Append(List).Append("\n");
sb.Append(" DType: ").Append(DType).Append("\n");
sb.Append(" DFormat: ").Append(DFormat).Append("\n");
sb.Append(" DMRZ: ").Append(DMRZ).Append("\n");
sb.Append(" DDescription: ").Append(DDescription).Append("\n");
sb.Append(" DYear: ").Append(DYear).Append("\n");
sb.Append(" DCountryName: ").Append(DCountryName).Append("\n");
sb.Append(" DStateCode: ").Append(DStateCode).Append("\n");
sb.Append(" DStateName: ").Append(DStateName).Append("\n");
sb.Append(" IsDeprecated: ").Append(IsDeprecated).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)
{
// ICAOCode (string) maxLength
if (this.ICAOCode != null && this.ICAOCode.Length > 3)
{
yield return new ValidationResult("Invalid value for ICAOCode, length must be less than 3.", new [] { "ICAOCode" });
}
// ICAOCode (string) minLength
if (this.ICAOCode != null && this.ICAOCode.Length < 3)
{
yield return new ValidationResult("Invalid value for ICAOCode, length must be greater than 3.", new [] { "ICAOCode" });
}
yield break;
}
}
}