-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathRfidSignerInfoEx.cs
More file actions
244 lines (225 loc) · 12.3 KB
/
RfidSignerInfoEx.cs
File metadata and controls
244 lines (225 loc) · 12.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
/*
* 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 contents of a single copy of digital signature of the document security object and the results of its check within the context of the communication session with electronic document
/// </summary>
[DataContract(Name = "RfidSignerInfoEx")]
public partial class RfidSignerInfoEx : IValidatableObject
{
/// <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="RfidSignerInfoEx" /> class.
/// </summary>
[JsonConstructorAttribute]
protected RfidSignerInfoEx() { }
/// <summary>
/// Initializes a new instance of the <see cref="RfidSignerInfoEx" /> class.
/// </summary>
/// <param name="varVersion">Version of SignerInfo ASN.1 structure (required).</param>
/// <param name="issuer">issuer (required).</param>
/// <param name="serialNumber">serialNumber (required).</param>
/// <param name="subjectKeyIdentifier">subjectKeyIdentifier (required).</param>
/// <param name="digestAlgorithm">Hash algorithm identifier (OID) for digital signature generation (required).</param>
/// <param name="signedAttributes">List of the signed attributes (required).</param>
/// <param name="signatureAlgorithm">Digital signature algorithm identifier (OID) (required).</param>
/// <param name="signature">signature (required).</param>
/// <param name="pAStatus">pAStatus (required).</param>
/// <param name="certificateChain">Certificate chain, used for the digital signature verification. (required).</param>
/// <param name="dataToHash">Binary data array used to calculate the hash value for digital signature verification. Base64 encoded. (required).</param>
/// <param name="notifications">Can be ParsingErrorCodes or ParsingNotificationCodes enum. (required).</param>
public RfidSignerInfoEx(decimal varVersion = default(decimal), RfidDistinguishedName issuer = default(RfidDistinguishedName), TrfFtBytes serialNumber = default(TrfFtBytes), TrfFtBytes subjectKeyIdentifier = default(TrfFtBytes), string digestAlgorithm = default(string), List<RfidAttributeData> signedAttributes = default(List<RfidAttributeData>), string signatureAlgorithm = default(string), TrfFtBytes signature = default(TrfFtBytes), RFIDErrorCodes pAStatus = default(RFIDErrorCodes), List<RfidCertificateEx> certificateChain = default(List<RfidCertificateEx>), string dataToHash = default(string), List<long> notifications = default(List<long>))
{
this.VarVersion = varVersion;
// to ensure "issuer" is required (not null)
if (issuer == null)
{
throw new ArgumentNullException("issuer is a required property for RfidSignerInfoEx and cannot be null");
}
this.Issuer = issuer;
// to ensure "serialNumber" is required (not null)
if (serialNumber == null)
{
throw new ArgumentNullException("serialNumber is a required property for RfidSignerInfoEx and cannot be null");
}
this.SerialNumber = serialNumber;
// to ensure "subjectKeyIdentifier" is required (not null)
if (subjectKeyIdentifier == null)
{
throw new ArgumentNullException("subjectKeyIdentifier is a required property for RfidSignerInfoEx and cannot be null");
}
this.SubjectKeyIdentifier = subjectKeyIdentifier;
// to ensure "digestAlgorithm" is required (not null)
if (digestAlgorithm == null)
{
throw new ArgumentNullException("digestAlgorithm is a required property for RfidSignerInfoEx and cannot be null");
}
this.DigestAlgorithm = digestAlgorithm;
// to ensure "signedAttributes" is required (not null)
if (signedAttributes == null)
{
throw new ArgumentNullException("signedAttributes is a required property for RfidSignerInfoEx and cannot be null");
}
this.SignedAttributes = signedAttributes;
// to ensure "signatureAlgorithm" is required (not null)
if (signatureAlgorithm == null)
{
throw new ArgumentNullException("signatureAlgorithm is a required property for RfidSignerInfoEx and cannot be null");
}
this.SignatureAlgorithm = signatureAlgorithm;
// to ensure "signature" is required (not null)
if (signature == null)
{
throw new ArgumentNullException("signature is a required property for RfidSignerInfoEx and cannot be null");
}
this.Signature = signature;
this.PAStatus = pAStatus;
// to ensure "certificateChain" is required (not null)
if (certificateChain == null)
{
throw new ArgumentNullException("certificateChain is a required property for RfidSignerInfoEx and cannot be null");
}
this.CertificateChain = certificateChain;
// to ensure "dataToHash" is required (not null)
if (dataToHash == null)
{
throw new ArgumentNullException("dataToHash is a required property for RfidSignerInfoEx and cannot be null");
}
this.DataToHash = dataToHash;
// to ensure "notifications" is required (not null)
if (notifications == null)
{
throw new ArgumentNullException("notifications is a required property for RfidSignerInfoEx and cannot be null");
}
this.Notifications = notifications;
}
/// <summary>
/// Version of SignerInfo ASN.1 structure
/// </summary>
/// <value>Version of SignerInfo ASN.1 structure</value>
[DataMember(Name = "Version", IsRequired = true, EmitDefaultValue = true)]
public decimal VarVersion { get; set; }
/// <summary>
/// Gets or Sets Issuer
/// </summary>
[DataMember(Name = "Issuer", IsRequired = true, EmitDefaultValue = true)]
public RfidDistinguishedName Issuer { get; set; }
/// <summary>
/// Gets or Sets SerialNumber
/// </summary>
[DataMember(Name = "SerialNumber", IsRequired = true, EmitDefaultValue = true)]
public TrfFtBytes SerialNumber { get; set; }
/// <summary>
/// Gets or Sets SubjectKeyIdentifier
/// </summary>
[DataMember(Name = "SubjectKeyIdentifier", IsRequired = true, EmitDefaultValue = true)]
public TrfFtBytes SubjectKeyIdentifier { get; set; }
/// <summary>
/// Hash algorithm identifier (OID) for digital signature generation
/// </summary>
/// <value>Hash algorithm identifier (OID) for digital signature generation</value>
[DataMember(Name = "DigestAlgorithm", IsRequired = true, EmitDefaultValue = true)]
public string DigestAlgorithm { get; set; }
/// <summary>
/// List of the signed attributes
/// </summary>
/// <value>List of the signed attributes</value>
[DataMember(Name = "SignedAttributes", IsRequired = true, EmitDefaultValue = true)]
public List<RfidAttributeData> SignedAttributes { get; set; }
/// <summary>
/// Digital signature algorithm identifier (OID)
/// </summary>
/// <value>Digital signature algorithm identifier (OID)</value>
[DataMember(Name = "SignatureAlgorithm", IsRequired = true, EmitDefaultValue = true)]
public string SignatureAlgorithm { get; set; }
/// <summary>
/// Gets or Sets Signature
/// </summary>
[DataMember(Name = "Signature", IsRequired = true, EmitDefaultValue = true)]
public TrfFtBytes Signature { get; set; }
/// <summary>
/// Certificate chain, used for the digital signature verification.
/// </summary>
/// <value>Certificate chain, used for the digital signature verification.</value>
[DataMember(Name = "CertificateChain", IsRequired = true, EmitDefaultValue = true)]
public List<RfidCertificateEx> CertificateChain { get; set; }
/// <summary>
/// Binary data array used to calculate the hash value for digital signature verification. Base64 encoded.
/// </summary>
/// <value>Binary data array used to calculate the hash value for digital signature verification. Base64 encoded.</value>
[DataMember(Name = "DataToHash", IsRequired = true, EmitDefaultValue = true)]
public string DataToHash { get; set; }
/// <summary>
/// Can be ParsingErrorCodes or ParsingNotificationCodes enum.
/// </summary>
/// <value>Can be ParsingErrorCodes or ParsingNotificationCodes enum.</value>
[DataMember(Name = "Notifications", IsRequired = true, EmitDefaultValue = true)]
public List<long> Notifications { 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 RfidSignerInfoEx {\n");
sb.Append(" VarVersion: ").Append(VarVersion).Append("\n");
sb.Append(" Issuer: ").Append(Issuer).Append("\n");
sb.Append(" SerialNumber: ").Append(SerialNumber).Append("\n");
sb.Append(" SubjectKeyIdentifier: ").Append(SubjectKeyIdentifier).Append("\n");
sb.Append(" DigestAlgorithm: ").Append(DigestAlgorithm).Append("\n");
sb.Append(" SignedAttributes: ").Append(SignedAttributes).Append("\n");
sb.Append(" SignatureAlgorithm: ").Append(SignatureAlgorithm).Append("\n");
sb.Append(" Signature: ").Append(Signature).Append("\n");
sb.Append(" PAStatus: ").Append(PAStatus).Append("\n");
sb.Append(" CertificateChain: ").Append(CertificateChain).Append("\n");
sb.Append(" DataToHash: ").Append(DataToHash).Append("\n");
sb.Append(" Notifications: ").Append(Notifications).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;
}
}
}