-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathRfidCertificateEx.cs
More file actions
247 lines (227 loc) · 12.7 KB
/
RfidCertificateEx.cs
File metadata and controls
247 lines (227 loc) · 12.7 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
/*
* 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 certificate contents used for the digital signature verification of the document security object within the context of the communication session with electronic document.
/// </summary>
[DataContract(Name = "RfidCertificateEx")]
public partial class RfidCertificateEx : IValidatableObject
{
/// <summary>
/// Gets or Sets Origin
/// </summary>
[DataMember(Name = "Origin", IsRequired = true, EmitDefaultValue = true)]
public RfidCertificateOrigin Origin { get; set; }
/// <summary>
/// Gets or Sets Type
/// </summary>
[DataMember(Name = "Type", IsRequired = true, EmitDefaultValue = true)]
public RfidCertificateType Type { get; set; }
/// <summary>
/// Gets or Sets PAStatus
/// </summary>
[DataMember(Name = "PA_Status", IsRequired = true, EmitDefaultValue = true)]
public RFIDErrorCodes PAStatus { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="RfidCertificateEx" /> class.
/// </summary>
[JsonConstructorAttribute]
protected RfidCertificateEx() { }
/// <summary>
/// Initializes a new instance of the <see cref="RfidCertificateEx" /> class.
/// </summary>
/// <param name="varVersion">Version of Certificate ASN.1 structure (required).</param>
/// <param name="serialNumber">Certificate serial number. Base64 encoded. (required).</param>
/// <param name="signatureAlgorithm">Certificate digital signature algorithm identifier (OID); String in the format S1 (S2), where S1 – algorithm name, S2 – identifier (OID string). (required).</param>
/// <param name="issuer">issuer (required).</param>
/// <param name="validity">validity (required).</param>
/// <param name="subject">subject (required).</param>
/// <param name="subjectPKAlgorithm">Certificate public key algorithm identifier (OID); String in the format S1 (S2), where S1 – algorithm name, S2 – identifier (OID string). (required).</param>
/// <param name="extensions">List of the certificate extensions (required).</param>
/// <param name="notifications">List of remarks arisen during the analysis of the certificate data structure and its validity verification. Can be ParsingErrorCodes or ParsingNotificationCodes enum. (required).</param>
/// <param name="origin">origin (required).</param>
/// <param name="type">type (required).</param>
/// <param name="fileName">fileName (required).</param>
/// <param name="pAStatus">pAStatus (required).</param>
public RfidCertificateEx(decimal varVersion = default(decimal), string serialNumber = default(string), string signatureAlgorithm = default(string), RfidDistinguishedName issuer = default(RfidDistinguishedName), RfidValidity validity = default(RfidValidity), RfidDistinguishedName subject = default(RfidDistinguishedName), string subjectPKAlgorithm = default(string), List<RfidPkiExtension> extensions = default(List<RfidPkiExtension>), List<long> notifications = default(List<long>), RfidCertificateOrigin origin = default(RfidCertificateOrigin), RfidCertificateType type = default(RfidCertificateType), TrfFtString fileName = default(TrfFtString), RFIDErrorCodes pAStatus = default(RFIDErrorCodes))
{
this.VarVersion = varVersion;
// to ensure "serialNumber" is required (not null)
if (serialNumber == null)
{
throw new ArgumentNullException("serialNumber is a required property for RfidCertificateEx and cannot be null");
}
this.SerialNumber = serialNumber;
// to ensure "signatureAlgorithm" is required (not null)
if (signatureAlgorithm == null)
{
throw new ArgumentNullException("signatureAlgorithm is a required property for RfidCertificateEx and cannot be null");
}
this.SignatureAlgorithm = signatureAlgorithm;
// to ensure "issuer" is required (not null)
if (issuer == null)
{
throw new ArgumentNullException("issuer is a required property for RfidCertificateEx and cannot be null");
}
this.Issuer = issuer;
// to ensure "validity" is required (not null)
if (validity == null)
{
throw new ArgumentNullException("validity is a required property for RfidCertificateEx and cannot be null");
}
this.Validity = validity;
// to ensure "subject" is required (not null)
if (subject == null)
{
throw new ArgumentNullException("subject is a required property for RfidCertificateEx and cannot be null");
}
this.Subject = subject;
// to ensure "subjectPKAlgorithm" is required (not null)
if (subjectPKAlgorithm == null)
{
throw new ArgumentNullException("subjectPKAlgorithm is a required property for RfidCertificateEx and cannot be null");
}
this.SubjectPKAlgorithm = subjectPKAlgorithm;
// to ensure "extensions" is required (not null)
if (extensions == null)
{
throw new ArgumentNullException("extensions is a required property for RfidCertificateEx and cannot be null");
}
this.Extensions = extensions;
// to ensure "notifications" is required (not null)
if (notifications == null)
{
throw new ArgumentNullException("notifications is a required property for RfidCertificateEx and cannot be null");
}
this.Notifications = notifications;
this.Origin = origin;
this.Type = type;
// to ensure "fileName" is required (not null)
if (fileName == null)
{
throw new ArgumentNullException("fileName is a required property for RfidCertificateEx and cannot be null");
}
this.FileName = fileName;
this.PAStatus = pAStatus;
}
/// <summary>
/// Version of Certificate ASN.1 structure
/// </summary>
/// <value>Version of Certificate ASN.1 structure</value>
[DataMember(Name = "Version", IsRequired = true, EmitDefaultValue = true)]
public decimal VarVersion { get; set; }
/// <summary>
/// Certificate serial number. Base64 encoded.
/// </summary>
/// <value>Certificate serial number. Base64 encoded.</value>
[DataMember(Name = "SerialNumber", IsRequired = true, EmitDefaultValue = true)]
public string SerialNumber { get; set; }
/// <summary>
/// Certificate digital signature algorithm identifier (OID); String in the format S1 (S2), where S1 – algorithm name, S2 – identifier (OID string).
/// </summary>
/// <value>Certificate digital signature algorithm identifier (OID); String in the format S1 (S2), where S1 – algorithm name, S2 – identifier (OID string).</value>
[DataMember(Name = "SignatureAlgorithm", IsRequired = true, EmitDefaultValue = true)]
public string SignatureAlgorithm { get; set; }
/// <summary>
/// Gets or Sets Issuer
/// </summary>
[DataMember(Name = "Issuer", IsRequired = true, EmitDefaultValue = true)]
public RfidDistinguishedName Issuer { get; set; }
/// <summary>
/// Gets or Sets Validity
/// </summary>
[DataMember(Name = "Validity", IsRequired = true, EmitDefaultValue = true)]
public RfidValidity Validity { get; set; }
/// <summary>
/// Gets or Sets Subject
/// </summary>
[DataMember(Name = "Subject", IsRequired = true, EmitDefaultValue = true)]
public RfidDistinguishedName Subject { get; set; }
/// <summary>
/// Certificate public key algorithm identifier (OID); String in the format S1 (S2), where S1 – algorithm name, S2 – identifier (OID string).
/// </summary>
/// <value>Certificate public key algorithm identifier (OID); String in the format S1 (S2), where S1 – algorithm name, S2 – identifier (OID string).</value>
[DataMember(Name = "SubjectPKAlgorithm", IsRequired = true, EmitDefaultValue = true)]
public string SubjectPKAlgorithm { get; set; }
/// <summary>
/// List of the certificate extensions
/// </summary>
/// <value>List of the certificate extensions</value>
[DataMember(Name = "Extensions", IsRequired = true, EmitDefaultValue = true)]
public List<RfidPkiExtension> Extensions { get; set; }
/// <summary>
/// List of remarks arisen during the analysis of the certificate data structure and its validity verification. Can be ParsingErrorCodes or ParsingNotificationCodes enum.
/// </summary>
/// <value>List of remarks arisen during the analysis of the certificate data structure and its validity verification. Can be ParsingErrorCodes or ParsingNotificationCodes enum.</value>
[DataMember(Name = "Notifications", IsRequired = true, EmitDefaultValue = true)]
public List<long> Notifications { get; set; }
/// <summary>
/// Gets or Sets FileName
/// </summary>
[DataMember(Name = "FileName", IsRequired = true, EmitDefaultValue = true)]
public TrfFtString FileName { 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 RfidCertificateEx {\n");
sb.Append(" VarVersion: ").Append(VarVersion).Append("\n");
sb.Append(" SerialNumber: ").Append(SerialNumber).Append("\n");
sb.Append(" SignatureAlgorithm: ").Append(SignatureAlgorithm).Append("\n");
sb.Append(" Issuer: ").Append(Issuer).Append("\n");
sb.Append(" Validity: ").Append(Validity).Append("\n");
sb.Append(" Subject: ").Append(Subject).Append("\n");
sb.Append(" SubjectPKAlgorithm: ").Append(SubjectPKAlgorithm).Append("\n");
sb.Append(" Extensions: ").Append(Extensions).Append("\n");
sb.Append(" Notifications: ").Append(Notifications).Append("\n");
sb.Append(" Origin: ").Append(Origin).Append("\n");
sb.Append(" Type: ").Append(Type).Append("\n");
sb.Append(" FileName: ").Append(FileName).Append("\n");
sb.Append(" PAStatus: ").Append(PAStatus).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;
}
}
}