-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathRfidSessionData.cs
More file actions
273 lines (249 loc) · 14.8 KB
/
RfidSessionData.cs
File metadata and controls
273 lines (249 loc) · 14.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
269
270
271
272
273
/*
* 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 is used to describe the results of work with the SDK within the context of the current communication session with electronic document
/// </summary>
[DataContract(Name = "RfidSessionData")]
public partial class RfidSessionData : IValidatableObject
{
/// <summary>
/// Gets or Sets ExtLeSupport
/// </summary>
[DataMember(Name = "ExtLeSupport", IsRequired = true, EmitDefaultValue = true)]
public RFIDErrorCodes ExtLeSupport { get; set; }
/// <summary>
/// Gets or Sets SessionProcedure
/// </summary>
[DataMember(Name = "Session_procedure", IsRequired = true, EmitDefaultValue = true)]
public RfidAuthenticationProcedureType SessionProcedure { get; set; }
/// <summary>
/// Gets or Sets Status
/// </summary>
[DataMember(Name = "Status", EmitDefaultValue = false)]
public CheckResult? Status { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="RfidSessionData" /> class.
/// </summary>
[JsonConstructorAttribute]
protected RfidSessionData() { }
/// <summary>
/// Initializes a new instance of the <see cref="RfidSessionData" /> class.
/// </summary>
/// <param name="virtualMode">Sign of virtual session when working with loaded data from a previous communication session with the electronic document.</param>
/// <param name="sDKVersion">Text SDKVersion value in format A.B (e.g. 3.1).</param>
/// <param name="driverVersion">Text DriverVersion value in format A.B.C.D (e.g. 6.2.5.4).</param>
/// <param name="firmwareVersion">Text FirmwareVersion value in format A.B (e.g. 5.19).</param>
/// <param name="applications">List of containers to store information about the involved applications of electronic document (required).</param>
/// <param name="accessControls">List of containers to store information about the supported procedures of authentication and secure data access within the context of the session (required).</param>
/// <param name="cardProperties">cardProperties (required).</param>
/// <param name="extLeSupport">extLeSupport (required).</param>
/// <param name="processTime">Time of processing, milliseconds (required).</param>
/// <param name="rootFiles">List of containers to store information about the read files of the root Master File (required).</param>
/// <param name="totalBytesSent">Total number of bytes transmitted to the RFID-chip during the whole session (required).</param>
/// <param name="totalBytesReceived">Total number of bytes received from the RFID-chip during the whole session (required).</param>
/// <param name="sessionKey">sessionKey.</param>
/// <param name="sessionTerminal">sessionTerminal (required).</param>
/// <param name="sessionProcedure">sessionProcedure (required).</param>
/// <param name="securityObjects">List of containers to store information about the detected document security objects (required).</param>
/// <param name="status">status.</param>
public RfidSessionData(bool virtualMode = default(bool), string sDKVersion = default(string), string driverVersion = default(string), string firmwareVersion = default(string), List<RfidApplication> applications = default(List<RfidApplication>), List<RfidAccessControlInfo> accessControls = default(List<RfidAccessControlInfo>), RfidCardPropertiesExt cardProperties = default(RfidCardPropertiesExt), RFIDErrorCodes extLeSupport = default(RFIDErrorCodes), decimal processTime = default(decimal), List<Object> rootFiles = default(List<Object>), decimal totalBytesSent = default(decimal), decimal totalBytesReceived = default(decimal), RfidAccessKey sessionKey = default(RfidAccessKey), RfidTerminal sessionTerminal = default(RfidTerminal), RfidAuthenticationProcedureType sessionProcedure = default(RfidAuthenticationProcedureType), List<RfidSecurityObject> securityObjects = default(List<RfidSecurityObject>), CheckResult? status = default(CheckResult?))
{
// to ensure "applications" is required (not null)
if (applications == null)
{
throw new ArgumentNullException("applications is a required property for RfidSessionData and cannot be null");
}
this.Applications = applications;
// to ensure "accessControls" is required (not null)
if (accessControls == null)
{
throw new ArgumentNullException("accessControls is a required property for RfidSessionData and cannot be null");
}
this.AccessControls = accessControls;
// to ensure "cardProperties" is required (not null)
if (cardProperties == null)
{
throw new ArgumentNullException("cardProperties is a required property for RfidSessionData and cannot be null");
}
this.CardProperties = cardProperties;
this.ExtLeSupport = extLeSupport;
this.ProcessTime = processTime;
// to ensure "rootFiles" is required (not null)
if (rootFiles == null)
{
throw new ArgumentNullException("rootFiles is a required property for RfidSessionData and cannot be null");
}
this.RootFiles = rootFiles;
this.TotalBytesSent = totalBytesSent;
this.TotalBytesReceived = totalBytesReceived;
// to ensure "sessionTerminal" is required (not null)
if (sessionTerminal == null)
{
throw new ArgumentNullException("sessionTerminal is a required property for RfidSessionData and cannot be null");
}
this.SessionTerminal = sessionTerminal;
this.SessionProcedure = sessionProcedure;
// to ensure "securityObjects" is required (not null)
if (securityObjects == null)
{
throw new ArgumentNullException("securityObjects is a required property for RfidSessionData and cannot be null");
}
this.SecurityObjects = securityObjects;
this.VirtualMode = virtualMode;
this.SDKVersion = sDKVersion;
this.DriverVersion = driverVersion;
this.FirmwareVersion = firmwareVersion;
this.SessionKey = sessionKey;
this.Status = status;
}
/// <summary>
/// Sign of virtual session when working with loaded data from a previous communication session with the electronic document
/// </summary>
/// <value>Sign of virtual session when working with loaded data from a previous communication session with the electronic document</value>
[DataMember(Name = "VirtualMode", EmitDefaultValue = false)]
public bool? VirtualMode { get; set; }
/// <summary>
/// Text SDKVersion value in format A.B (e.g. 3.1)
/// </summary>
/// <value>Text SDKVersion value in format A.B (e.g. 3.1)</value>
[DataMember(Name = "SDKVersion", EmitDefaultValue = false)]
public string? SDKVersion { get; set; }
/// <summary>
/// Text DriverVersion value in format A.B.C.D (e.g. 6.2.5.4)
/// </summary>
/// <value>Text DriverVersion value in format A.B.C.D (e.g. 6.2.5.4)</value>
[DataMember(Name = "DriverVersion", EmitDefaultValue = false)]
public string? DriverVersion { get; set; }
/// <summary>
/// Text FirmwareVersion value in format A.B (e.g. 5.19)
/// </summary>
/// <value>Text FirmwareVersion value in format A.B (e.g. 5.19)</value>
[DataMember(Name = "FirmwareVersion", EmitDefaultValue = false)]
public string? FirmwareVersion { get; set; }
/// <summary>
/// List of containers to store information about the involved applications of electronic document
/// </summary>
/// <value>List of containers to store information about the involved applications of electronic document</value>
[DataMember(Name = "Applications", IsRequired = true, EmitDefaultValue = true)]
public List<RfidApplication> Applications { get; set; }
/// <summary>
/// List of containers to store information about the supported procedures of authentication and secure data access within the context of the session
/// </summary>
/// <value>List of containers to store information about the supported procedures of authentication and secure data access within the context of the session</value>
[DataMember(Name = "AccessControls", IsRequired = true, EmitDefaultValue = true)]
public List<RfidAccessControlInfo> AccessControls { get; set; }
/// <summary>
/// Gets or Sets CardProperties
/// </summary>
[DataMember(Name = "CardProperties", IsRequired = true, EmitDefaultValue = true)]
public RfidCardPropertiesExt CardProperties { get; set; }
/// <summary>
/// Time of processing, milliseconds
/// </summary>
/// <value>Time of processing, milliseconds</value>
[DataMember(Name = "ProcessTime", IsRequired = true, EmitDefaultValue = true)]
public decimal ProcessTime { get; set; }
/// <summary>
/// List of containers to store information about the read files of the root Master File
/// </summary>
/// <value>List of containers to store information about the read files of the root Master File</value>
[DataMember(Name = "RootFiles", IsRequired = true, EmitDefaultValue = true)]
public List<Object> RootFiles { get; set; }
/// <summary>
/// Total number of bytes transmitted to the RFID-chip during the whole session
/// </summary>
/// <value>Total number of bytes transmitted to the RFID-chip during the whole session</value>
[DataMember(Name = "TotalBytesSent", IsRequired = true, EmitDefaultValue = true)]
public decimal TotalBytesSent { get; set; }
/// <summary>
/// Total number of bytes received from the RFID-chip during the whole session
/// </summary>
/// <value>Total number of bytes received from the RFID-chip during the whole session</value>
[DataMember(Name = "TotalBytesReceived", IsRequired = true, EmitDefaultValue = true)]
public decimal TotalBytesReceived { get; set; }
/// <summary>
/// Gets or Sets SessionKey
/// </summary>
[DataMember(Name = "Session_key", EmitDefaultValue = false)]
public RfidAccessKey? SessionKey { get; set; }
/// <summary>
/// Gets or Sets SessionTerminal
/// </summary>
[DataMember(Name = "Session_terminal", IsRequired = true, EmitDefaultValue = true)]
public RfidTerminal SessionTerminal { get; set; }
/// <summary>
/// List of containers to store information about the detected document security objects
/// </summary>
/// <value>List of containers to store information about the detected document security objects</value>
[DataMember(Name = "SecurityObjects", IsRequired = true, EmitDefaultValue = true)]
public List<RfidSecurityObject> SecurityObjects { 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 RfidSessionData {\n");
sb.Append(" VirtualMode: ").Append(VirtualMode).Append("\n");
sb.Append(" SDKVersion: ").Append(SDKVersion).Append("\n");
sb.Append(" DriverVersion: ").Append(DriverVersion).Append("\n");
sb.Append(" FirmwareVersion: ").Append(FirmwareVersion).Append("\n");
sb.Append(" Applications: ").Append(Applications).Append("\n");
sb.Append(" AccessControls: ").Append(AccessControls).Append("\n");
sb.Append(" CardProperties: ").Append(CardProperties).Append("\n");
sb.Append(" ExtLeSupport: ").Append(ExtLeSupport).Append("\n");
sb.Append(" ProcessTime: ").Append(ProcessTime).Append("\n");
sb.Append(" RootFiles: ").Append(RootFiles).Append("\n");
sb.Append(" TotalBytesSent: ").Append(TotalBytesSent).Append("\n");
sb.Append(" TotalBytesReceived: ").Append(TotalBytesReceived).Append("\n");
sb.Append(" SessionKey: ").Append(SessionKey).Append("\n");
sb.Append(" SessionTerminal: ").Append(SessionTerminal).Append("\n");
sb.Append(" SessionProcedure: ").Append(SessionProcedure).Append("\n");
sb.Append(" SecurityObjects: ").Append(SecurityObjects).Append("\n");
sb.Append(" Status: ").Append(Status).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;
}
}
}