-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathSignatureRequestSendWithTemplateRequest.cs
More file actions
609 lines (572 loc) · 30.9 KB
/
SignatureRequestSendWithTemplateRequest.cs
File metadata and controls
609 lines (572 loc) · 30.9 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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
/*
* Dropbox Sign API
*
* Dropbox Sign v3 API
*
* The version of the OpenAPI document: 3.0.0
* Contact: apisupport@hellosign.com
* 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 OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter;
namespace Dropbox.Sign.Model
{
/// <summary>
/// SignatureRequestSendWithTemplateRequest
/// </summary>
[DataContract(Name = "SignatureRequestSendWithTemplateRequest")]
[JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)]
public partial class SignatureRequestSendWithTemplateRequest : IOpenApiTyped, IEquatable<SignatureRequestSendWithTemplateRequest>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="SignatureRequestSendWithTemplateRequest" /> class.
/// </summary>
[JsonConstructorAttribute]
protected SignatureRequestSendWithTemplateRequest() { }
/// <summary>
/// Initializes a new instance of the <see cref="SignatureRequestSendWithTemplateRequest" /> class.
/// </summary>
/// <param name="templateIds">Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. (required).</param>
/// <param name="allowDecline">Allows signers to decline to sign a document if `true`. Defaults to `false`. (default to false).</param>
/// <param name="ccs">Add CC email recipients. Required when a CC role exists for the Template..</param>
/// <param name="clientId">Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app..</param>
/// <param name="customFields">An array defining values and options for custom fields. Required when a custom field exists in the Template..</param>
/// <param name="files">Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both..</param>
/// <param name="fileUrls">Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both..</param>
/// <param name="isQualifiedSignature">Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.<br> **Note**: QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. (default to false).</param>
/// <param name="isEid">Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br> **Note**: eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. (default to false).</param>
/// <param name="message">The custom message in the email that will be sent to the signers..</param>
/// <param name="metadata">Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long..</param>
/// <param name="signers">Add Signers to your Templated-based Signature Request. (required).</param>
/// <param name="signingOptions">signingOptions.</param>
/// <param name="signingRedirectUrl">The URL you want signers redirected to after they successfully sign..</param>
/// <param name="subject">The subject in the email that will be sent to the signers..</param>
/// <param name="testMode">Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. (default to false).</param>
/// <param name="title">The title you want to assign to the SignatureRequest..</param>
/// <param name="certificationTypes">certificationTypes.</param>
public SignatureRequestSendWithTemplateRequest(List<string> templateIds = default(List<string>), bool allowDecline = false, List<SubCC> ccs = default(List<SubCC>), string clientId = default(string), List<SubCustomField> customFields = default(List<SubCustomField>), List<System.IO.Stream> files = default(List<System.IO.Stream>), List<string> fileUrls = default(List<string>), bool isQualifiedSignature = false, bool isEid = false, string message = default(string), Dictionary<string, Object> metadata = default(Dictionary<string, Object>), List<SubSignatureRequestTemplateSigner> signers = default(List<SubSignatureRequestTemplateSigner>), SubSigningOptions signingOptions = default(SubSigningOptions), string signingRedirectUrl = default(string), string subject = default(string), bool testMode = false, string title = default(string), SubCertificationTypes certificationTypes = default(SubCertificationTypes))
{
// to ensure "templateIds" is required (not null)
if (templateIds == null)
{
throw new ArgumentNullException("templateIds is a required property for SignatureRequestSendWithTemplateRequest and cannot be null");
}
this.TemplateIds = templateIds;
// to ensure "signers" is required (not null)
if (signers == null)
{
throw new ArgumentNullException("signers is a required property for SignatureRequestSendWithTemplateRequest and cannot be null");
}
this.Signers = signers;
this.AllowDecline = allowDecline;
this.Ccs = ccs;
this.ClientId = clientId;
this.CustomFields = customFields;
this.Files = files;
this.FileUrls = fileUrls;
this.IsQualifiedSignature = isQualifiedSignature;
this.IsEid = isEid;
this.Message = message;
this.Metadata = metadata;
this.SigningOptions = signingOptions;
this.SigningRedirectUrl = signingRedirectUrl;
this.Subject = subject;
this.TestMode = testMode;
this.Title = title;
this.CertificationTypes = certificationTypes;
}
/// <summary>
/// Attempt to instantiate and hydrate a new instance of this class
/// </summary>
/// <param name="jsonData">String of JSON data representing target object</param>
public static SignatureRequestSendWithTemplateRequest Init(string jsonData)
{
var obj = JsonConvert.DeserializeObject<SignatureRequestSendWithTemplateRequest>(jsonData);
if (obj == null)
{
throw new Exception("Unable to deserialize JSON to instance of SignatureRequestSendWithTemplateRequest");
}
return obj;
}
/// <summary>
/// Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.
/// </summary>
/// <value>Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.</value>
[DataMember(Name = "template_ids", IsRequired = true, EmitDefaultValue = true)]
public List<string> TemplateIds { get; set; }
/// <summary>
/// Add Signers to your Templated-based Signature Request.
/// </summary>
/// <value>Add Signers to your Templated-based Signature Request.</value>
[DataMember(Name = "signers", IsRequired = true, EmitDefaultValue = true)]
public List<SubSignatureRequestTemplateSigner> Signers { get; set; }
/// <summary>
/// Allows signers to decline to sign a document if `true`. Defaults to `false`.
/// </summary>
/// <value>Allows signers to decline to sign a document if `true`. Defaults to `false`.</value>
[DataMember(Name = "allow_decline", EmitDefaultValue = true)]
public bool AllowDecline { get; set; }
/// <summary>
/// Add CC email recipients. Required when a CC role exists for the Template.
/// </summary>
/// <value>Add CC email recipients. Required when a CC role exists for the Template.</value>
[DataMember(Name = "ccs", EmitDefaultValue = true)]
public List<SubCC> Ccs { get; set; }
/// <summary>
/// Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app.
/// </summary>
/// <value>Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app.</value>
[DataMember(Name = "client_id", EmitDefaultValue = true)]
public string ClientId { get; set; }
/// <summary>
/// An array defining values and options for custom fields. Required when a custom field exists in the Template.
/// </summary>
/// <value>An array defining values and options for custom fields. Required when a custom field exists in the Template.</value>
[DataMember(Name = "custom_fields", EmitDefaultValue = true)]
public List<SubCustomField> CustomFields { get; set; }
/// <summary>
/// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.
/// </summary>
/// <value>Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.</value>
[DataMember(Name = "files", EmitDefaultValue = true)]
public List<System.IO.Stream> Files { get; set; }
/// <summary>
/// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.
/// </summary>
/// <value>Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.</value>
[DataMember(Name = "file_urls", EmitDefaultValue = true)]
public List<string> FileUrls { get; set; }
/// <summary>
/// Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.<br> **Note**: QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer.
/// </summary>
/// <value>Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.<br> **Note**: QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer.</value>
[DataMember(Name = "is_qualified_signature", EmitDefaultValue = true)]
[Obsolete]
public bool IsQualifiedSignature { get; set; }
/// <summary>
/// Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br> **Note**: eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer.
/// </summary>
/// <value>Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br> **Note**: eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer.</value>
[DataMember(Name = "is_eid", EmitDefaultValue = true)]
public bool IsEid { get; set; }
/// <summary>
/// The custom message in the email that will be sent to the signers.
/// </summary>
/// <value>The custom message in the email that will be sent to the signers.</value>
[DataMember(Name = "message", EmitDefaultValue = true)]
public string Message { get; set; }
/// <summary>
/// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.
/// </summary>
/// <value>Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.</value>
[DataMember(Name = "metadata", EmitDefaultValue = true)]
public Dictionary<string, Object> Metadata { get; set; }
/// <summary>
/// Gets or Sets SigningOptions
/// </summary>
[DataMember(Name = "signing_options", EmitDefaultValue = true)]
public SubSigningOptions SigningOptions { get; set; }
/// <summary>
/// The URL you want signers redirected to after they successfully sign.
/// </summary>
/// <value>The URL you want signers redirected to after they successfully sign.</value>
[DataMember(Name = "signing_redirect_url", EmitDefaultValue = true)]
public string SigningRedirectUrl { get; set; }
/// <summary>
/// The subject in the email that will be sent to the signers.
/// </summary>
/// <value>The subject in the email that will be sent to the signers.</value>
[DataMember(Name = "subject", EmitDefaultValue = true)]
public string Subject { get; set; }
/// <summary>
/// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.
/// </summary>
/// <value>Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.</value>
[DataMember(Name = "test_mode", EmitDefaultValue = true)]
public bool TestMode { get; set; }
/// <summary>
/// The title you want to assign to the SignatureRequest.
/// </summary>
/// <value>The title you want to assign to the SignatureRequest.</value>
[DataMember(Name = "title", EmitDefaultValue = true)]
public string Title { get; set; }
/// <summary>
/// Gets or Sets CertificationTypes
/// </summary>
[DataMember(Name = "certification_types", EmitDefaultValue = true)]
public SubCertificationTypes CertificationTypes { 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 SignatureRequestSendWithTemplateRequest {\n");
sb.Append(" TemplateIds: ").Append(TemplateIds).Append("\n");
sb.Append(" Signers: ").Append(Signers).Append("\n");
sb.Append(" AllowDecline: ").Append(AllowDecline).Append("\n");
sb.Append(" Ccs: ").Append(Ccs).Append("\n");
sb.Append(" ClientId: ").Append(ClientId).Append("\n");
sb.Append(" CustomFields: ").Append(CustomFields).Append("\n");
sb.Append(" Files: ").Append(Files).Append("\n");
sb.Append(" FileUrls: ").Append(FileUrls).Append("\n");
sb.Append(" IsQualifiedSignature: ").Append(IsQualifiedSignature).Append("\n");
sb.Append(" IsEid: ").Append(IsEid).Append("\n");
sb.Append(" Message: ").Append(Message).Append("\n");
sb.Append(" Metadata: ").Append(Metadata).Append("\n");
sb.Append(" SigningOptions: ").Append(SigningOptions).Append("\n");
sb.Append(" SigningRedirectUrl: ").Append(SigningRedirectUrl).Append("\n");
sb.Append(" Subject: ").Append(Subject).Append("\n");
sb.Append(" TestMode: ").Append(TestMode).Append("\n");
sb.Append(" Title: ").Append(Title).Append("\n");
sb.Append(" CertificationTypes: ").Append(CertificationTypes).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>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as SignatureRequestSendWithTemplateRequest);
}
/// <summary>
/// Returns true if SignatureRequestSendWithTemplateRequest instances are equal
/// </summary>
/// <param name="input">Instance of SignatureRequestSendWithTemplateRequest to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(SignatureRequestSendWithTemplateRequest input)
{
if (input == null)
{
return false;
}
return
(
this.TemplateIds == input.TemplateIds ||
this.TemplateIds != null &&
input.TemplateIds != null &&
this.TemplateIds.SequenceEqual(input.TemplateIds)
) &&
(
this.Signers == input.Signers ||
this.Signers != null &&
input.Signers != null &&
this.Signers.SequenceEqual(input.Signers)
) &&
(
this.AllowDecline == input.AllowDecline ||
this.AllowDecline.Equals(input.AllowDecline)
) &&
(
this.Ccs == input.Ccs ||
this.Ccs != null &&
input.Ccs != null &&
this.Ccs.SequenceEqual(input.Ccs)
) &&
(
this.ClientId == input.ClientId ||
(this.ClientId != null &&
this.ClientId.Equals(input.ClientId))
) &&
(
this.CustomFields == input.CustomFields ||
this.CustomFields != null &&
input.CustomFields != null &&
this.CustomFields.SequenceEqual(input.CustomFields)
) &&
(
this.Files == input.Files ||
this.Files != null &&
input.Files != null &&
this.Files.SequenceEqual(input.Files)
) &&
(
this.FileUrls == input.FileUrls ||
this.FileUrls != null &&
input.FileUrls != null &&
this.FileUrls.SequenceEqual(input.FileUrls)
) &&
(
this.IsQualifiedSignature == input.IsQualifiedSignature ||
this.IsQualifiedSignature.Equals(input.IsQualifiedSignature)
) &&
(
this.IsEid == input.IsEid ||
this.IsEid.Equals(input.IsEid)
) &&
(
this.Message == input.Message ||
(this.Message != null &&
this.Message.Equals(input.Message))
) &&
(
this.Metadata == input.Metadata ||
this.Metadata != null &&
input.Metadata != null &&
this.Metadata.SequenceEqual(input.Metadata)
) &&
(
this.SigningOptions == input.SigningOptions ||
(this.SigningOptions != null &&
this.SigningOptions.Equals(input.SigningOptions))
) &&
(
this.SigningRedirectUrl == input.SigningRedirectUrl ||
(this.SigningRedirectUrl != null &&
this.SigningRedirectUrl.Equals(input.SigningRedirectUrl))
) &&
(
this.Subject == input.Subject ||
(this.Subject != null &&
this.Subject.Equals(input.Subject))
) &&
(
this.TestMode == input.TestMode ||
this.TestMode.Equals(input.TestMode)
) &&
(
this.Title == input.Title ||
(this.Title != null &&
this.Title.Equals(input.Title))
) &&
(
this.CertificationTypes == input.CertificationTypes ||
(this.CertificationTypes != null &&
this.CertificationTypes.Equals(input.CertificationTypes))
);
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.TemplateIds != null)
{
hashCode = (hashCode * 59) + this.TemplateIds.GetHashCode();
}
if (this.Signers != null)
{
hashCode = (hashCode * 59) + this.Signers.GetHashCode();
}
hashCode = (hashCode * 59) + this.AllowDecline.GetHashCode();
if (this.Ccs != null)
{
hashCode = (hashCode * 59) + this.Ccs.GetHashCode();
}
if (this.ClientId != null)
{
hashCode = (hashCode * 59) + this.ClientId.GetHashCode();
}
if (this.CustomFields != null)
{
hashCode = (hashCode * 59) + this.CustomFields.GetHashCode();
}
if (this.Files != null)
{
hashCode = (hashCode * 59) + this.Files.GetHashCode();
}
if (this.FileUrls != null)
{
hashCode = (hashCode * 59) + this.FileUrls.GetHashCode();
}
hashCode = (hashCode * 59) + this.IsQualifiedSignature.GetHashCode();
hashCode = (hashCode * 59) + this.IsEid.GetHashCode();
if (this.Message != null)
{
hashCode = (hashCode * 59) + this.Message.GetHashCode();
}
if (this.Metadata != null)
{
hashCode = (hashCode * 59) + this.Metadata.GetHashCode();
}
if (this.SigningOptions != null)
{
hashCode = (hashCode * 59) + this.SigningOptions.GetHashCode();
}
if (this.SigningRedirectUrl != null)
{
hashCode = (hashCode * 59) + this.SigningRedirectUrl.GetHashCode();
}
if (this.Subject != null)
{
hashCode = (hashCode * 59) + this.Subject.GetHashCode();
}
hashCode = (hashCode * 59) + this.TestMode.GetHashCode();
if (this.Title != null)
{
hashCode = (hashCode * 59) + this.Title.GetHashCode();
}
if (this.CertificationTypes != null)
{
hashCode = (hashCode * 59) + this.CertificationTypes.GetHashCode();
}
return hashCode;
}
}
public List<OpenApiType> GetOpenApiTypes()
{
var types = new List<OpenApiType>();
types.Add(new OpenApiType(){
Name = "template_ids",
Property = "TemplateIds",
Type = "List<string>",
Value = TemplateIds,
});
types.Add(new OpenApiType(){
Name = "signers",
Property = "Signers",
Type = "List<SubSignatureRequestTemplateSigner>",
Value = Signers,
});
types.Add(new OpenApiType(){
Name = "allow_decline",
Property = "AllowDecline",
Type = "bool",
Value = AllowDecline,
});
types.Add(new OpenApiType(){
Name = "ccs",
Property = "Ccs",
Type = "List<SubCC>",
Value = Ccs,
});
types.Add(new OpenApiType(){
Name = "client_id",
Property = "ClientId",
Type = "string",
Value = ClientId,
});
types.Add(new OpenApiType(){
Name = "custom_fields",
Property = "CustomFields",
Type = "List<SubCustomField>",
Value = CustomFields,
});
types.Add(new OpenApiType(){
Name = "files",
Property = "Files",
Type = "List<System.IO.Stream>",
Value = Files,
});
types.Add(new OpenApiType(){
Name = "file_urls",
Property = "FileUrls",
Type = "List<string>",
Value = FileUrls,
});
types.Add(new OpenApiType(){
Name = "is_qualified_signature",
Property = "IsQualifiedSignature",
Type = "bool",
Value = IsQualifiedSignature,
});
types.Add(new OpenApiType(){
Name = "is_eid",
Property = "IsEid",
Type = "bool",
Value = IsEid,
});
types.Add(new OpenApiType(){
Name = "message",
Property = "Message",
Type = "string",
Value = Message,
});
types.Add(new OpenApiType(){
Name = "metadata",
Property = "Metadata",
Type = "Dictionary<string, Object>",
Value = Metadata,
});
types.Add(new OpenApiType(){
Name = "signing_options",
Property = "SigningOptions",
Type = "SubSigningOptions",
Value = SigningOptions,
});
types.Add(new OpenApiType(){
Name = "signing_redirect_url",
Property = "SigningRedirectUrl",
Type = "string",
Value = SigningRedirectUrl,
});
types.Add(new OpenApiType(){
Name = "subject",
Property = "Subject",
Type = "string",
Value = Subject,
});
types.Add(new OpenApiType(){
Name = "test_mode",
Property = "TestMode",
Type = "bool",
Value = TestMode,
});
types.Add(new OpenApiType(){
Name = "title",
Property = "Title",
Type = "string",
Value = Title,
});
types.Add(new OpenApiType(){
Name = "certification_types",
Property = "CertificationTypes",
Type = "SubCertificationTypes",
Value = CertificationTypes,
});
return types;
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
{
// Message (string) maxLength
if (this.Message != null && this.Message.Length > 5000)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" });
}
// Subject (string) maxLength
if (this.Subject != null && this.Subject.Length > 255)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Subject, length must be less than 255.", new [] { "Subject" });
}
// Title (string) maxLength
if (this.Title != null && this.Title.Length > 255)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Title, length must be less than 255.", new [] { "Title" });
}
yield break;
}
}
}