-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathSignatureRequestSendRequest.cs
More file actions
815 lines (769 loc) · 49.1 KB
/
SignatureRequestSendRequest.cs
File metadata and controls
815 lines (769 loc) · 49.1 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
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
/*
* 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>
/// SignatureRequestSendRequest
/// </summary>
[DataContract(Name = "SignatureRequestSendRequest")]
[JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)]
public partial class SignatureRequestSendRequest : IOpenApiTyped, IEquatable<SignatureRequestSendRequest>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="SignatureRequestSendRequest" /> class.
/// </summary>
[JsonConstructorAttribute]
protected SignatureRequestSendRequest() { }
/// <summary>
/// Initializes a new instance of the <see cref="SignatureRequestSendRequest" /> class.
/// </summary>
/// <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="signers">Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both..</param>
/// <param name="groupedSigners">Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both..</param>
/// <param name="allowDecline">Allows signers to decline to sign a document if `true`. Defaults to `false`. (default to false).</param>
/// <param name="allowReassign">Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **Note**: Only available for Premium plan and higher. (default to false).</param>
/// <param name="attachments">A list describing the attachments.</param>
/// <param name="ccEmailAddresses">The email addresses that should be CCed..</param>
/// <param name="clientId">The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app..</param>
/// <param name="customFields">When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template..</param>
/// <param name="fieldOptions">fieldOptions.</param>
/// <param name="formFieldGroups">Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`..</param>
/// <param name="formFieldRules">Conditional Logic rules for fields defined in `form_fields_per_document`..</param>
/// <param name="formFieldsPerDocument">The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE**: Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`.</param>
/// <param name="hideTextTags">Enables automatic Text Tag removal when set to true. **NOTE**: Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. (default to false).</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="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="useTextTags">Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. (default to false).</param>
/// <param name="expiresAt">When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details..</param>
/// <param name="certificationTypes">certificationTypes.</param>
public SignatureRequestSendRequest(List<System.IO.Stream> files = default(List<System.IO.Stream>), List<string> fileUrls = default(List<string>), List<SubSignatureRequestSigner> signers = default(List<SubSignatureRequestSigner>), List<SubSignatureRequestGroupedSigners> groupedSigners = default(List<SubSignatureRequestGroupedSigners>), bool allowDecline = false, bool allowReassign = false, List<SubAttachment> attachments = default(List<SubAttachment>), List<string> ccEmailAddresses = default(List<string>), string clientId = default(string), List<SubCustomField> customFields = default(List<SubCustomField>), SubFieldOptions fieldOptions = default(SubFieldOptions), List<SubFormFieldGroup> formFieldGroups = default(List<SubFormFieldGroup>), List<SubFormFieldRule> formFieldRules = default(List<SubFormFieldRule>), List<SubFormFieldsPerDocumentBase> formFieldsPerDocument = default(List<SubFormFieldsPerDocumentBase>), bool hideTextTags = false, bool isQualifiedSignature = false, bool isEid = false, string message = default(string), Dictionary<string, Object> metadata = default(Dictionary<string, Object>), SubSigningOptions signingOptions = default(SubSigningOptions), string signingRedirectUrl = default(string), string subject = default(string), bool testMode = false, string title = default(string), bool useTextTags = false, int? expiresAt = default(int?), SubCertificationTypes certificationTypes = default(SubCertificationTypes))
{
this.Files = files;
this.FileUrls = fileUrls;
this.Signers = signers;
this.GroupedSigners = groupedSigners;
this.AllowDecline = allowDecline;
this.AllowReassign = allowReassign;
this.Attachments = attachments;
this.CcEmailAddresses = ccEmailAddresses;
this.ClientId = clientId;
this.CustomFields = customFields;
this.FieldOptions = fieldOptions;
this.FormFieldGroups = formFieldGroups;
this.FormFieldRules = formFieldRules;
this.FormFieldsPerDocument = formFieldsPerDocument;
this.HideTextTags = hideTextTags;
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.UseTextTags = useTextTags;
this.ExpiresAt = expiresAt;
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 SignatureRequestSendRequest Init(string jsonData)
{
var obj = JsonConvert.DeserializeObject<SignatureRequestSendRequest>(jsonData);
if (obj == null)
{
throw new Exception("Unable to deserialize JSON to instance of SignatureRequestSendRequest");
}
return obj;
}
/// <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>
/// Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.
/// </summary>
/// <value>Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.</value>
[DataMember(Name = "signers", EmitDefaultValue = true)]
public List<SubSignatureRequestSigner> Signers { get; set; }
/// <summary>
/// Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.
/// </summary>
/// <value>Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.</value>
[DataMember(Name = "grouped_signers", EmitDefaultValue = true)]
public List<SubSignatureRequestGroupedSigners> GroupedSigners { 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>
/// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **Note**: Only available for Premium plan and higher.
/// </summary>
/// <value>Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **Note**: Only available for Premium plan and higher.</value>
[DataMember(Name = "allow_reassign", EmitDefaultValue = true)]
public bool AllowReassign { get; set; }
/// <summary>
/// A list describing the attachments
/// </summary>
/// <value>A list describing the attachments</value>
[DataMember(Name = "attachments", EmitDefaultValue = true)]
public List<SubAttachment> Attachments { get; set; }
/// <summary>
/// The email addresses that should be CCed.
/// </summary>
/// <value>The email addresses that should be CCed.</value>
[DataMember(Name = "cc_email_addresses", EmitDefaultValue = true)]
public List<string> CcEmailAddresses { get; set; }
/// <summary>
/// The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app.
/// </summary>
/// <value>The client id of the API App you want to associate with this 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>
/// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.
/// </summary>
/// <value>When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.</value>
[DataMember(Name = "custom_fields", EmitDefaultValue = true)]
public List<SubCustomField> CustomFields { get; set; }
/// <summary>
/// Gets or Sets FieldOptions
/// </summary>
[DataMember(Name = "field_options", EmitDefaultValue = true)]
public SubFieldOptions FieldOptions { get; set; }
/// <summary>
/// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.
/// </summary>
/// <value>Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.</value>
[DataMember(Name = "form_field_groups", EmitDefaultValue = true)]
public List<SubFormFieldGroup> FormFieldGroups { get; set; }
/// <summary>
/// Conditional Logic rules for fields defined in `form_fields_per_document`.
/// </summary>
/// <value>Conditional Logic rules for fields defined in `form_fields_per_document`.</value>
[DataMember(Name = "form_field_rules", EmitDefaultValue = true)]
public List<SubFormFieldRule> FormFieldRules { get; set; }
/// <summary>
/// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE**: Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`
/// </summary>
/// <value>The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE**: Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`</value>
[DataMember(Name = "form_fields_per_document", EmitDefaultValue = true)]
public List<SubFormFieldsPerDocumentBase> FormFieldsPerDocument { get; set; }
/// <summary>
/// Enables automatic Text Tag removal when set to true. **NOTE**: Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information.
/// </summary>
/// <value>Enables automatic Text Tag removal when set to true. **NOTE**: Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information.</value>
[DataMember(Name = "hide_text_tags", EmitDefaultValue = true)]
public bool HideTextTags { 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>
/// Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`.
/// </summary>
/// <value>Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`.</value>
[DataMember(Name = "use_text_tags", EmitDefaultValue = true)]
public bool UseTextTags { get; set; }
/// <summary>
/// When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.
/// </summary>
/// <value>When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.</value>
[DataMember(Name = "expires_at", EmitDefaultValue = true)]
public int? ExpiresAt { 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 SignatureRequestSendRequest {\n");
sb.Append(" Files: ").Append(Files).Append("\n");
sb.Append(" FileUrls: ").Append(FileUrls).Append("\n");
sb.Append(" Signers: ").Append(Signers).Append("\n");
sb.Append(" GroupedSigners: ").Append(GroupedSigners).Append("\n");
sb.Append(" AllowDecline: ").Append(AllowDecline).Append("\n");
sb.Append(" AllowReassign: ").Append(AllowReassign).Append("\n");
sb.Append(" Attachments: ").Append(Attachments).Append("\n");
sb.Append(" CcEmailAddresses: ").Append(CcEmailAddresses).Append("\n");
sb.Append(" ClientId: ").Append(ClientId).Append("\n");
sb.Append(" CustomFields: ").Append(CustomFields).Append("\n");
sb.Append(" FieldOptions: ").Append(FieldOptions).Append("\n");
sb.Append(" FormFieldGroups: ").Append(FormFieldGroups).Append("\n");
sb.Append(" FormFieldRules: ").Append(FormFieldRules).Append("\n");
sb.Append(" FormFieldsPerDocument: ").Append(FormFieldsPerDocument).Append("\n");
sb.Append(" HideTextTags: ").Append(HideTextTags).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(" UseTextTags: ").Append(UseTextTags).Append("\n");
sb.Append(" ExpiresAt: ").Append(ExpiresAt).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 SignatureRequestSendRequest);
}
/// <summary>
/// Returns true if SignatureRequestSendRequest instances are equal
/// </summary>
/// <param name="input">Instance of SignatureRequestSendRequest to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(SignatureRequestSendRequest input)
{
if (input == null)
{
return false;
}
return
(
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.Signers == input.Signers ||
this.Signers != null &&
input.Signers != null &&
this.Signers.SequenceEqual(input.Signers)
) &&
(
this.GroupedSigners == input.GroupedSigners ||
this.GroupedSigners != null &&
input.GroupedSigners != null &&
this.GroupedSigners.SequenceEqual(input.GroupedSigners)
) &&
(
this.AllowDecline == input.AllowDecline ||
this.AllowDecline.Equals(input.AllowDecline)
) &&
(
this.AllowReassign == input.AllowReassign ||
this.AllowReassign.Equals(input.AllowReassign)
) &&
(
this.Attachments == input.Attachments ||
this.Attachments != null &&
input.Attachments != null &&
this.Attachments.SequenceEqual(input.Attachments)
) &&
(
this.CcEmailAddresses == input.CcEmailAddresses ||
this.CcEmailAddresses != null &&
input.CcEmailAddresses != null &&
this.CcEmailAddresses.SequenceEqual(input.CcEmailAddresses)
) &&
(
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.FieldOptions == input.FieldOptions ||
(this.FieldOptions != null &&
this.FieldOptions.Equals(input.FieldOptions))
) &&
(
this.FormFieldGroups == input.FormFieldGroups ||
this.FormFieldGroups != null &&
input.FormFieldGroups != null &&
this.FormFieldGroups.SequenceEqual(input.FormFieldGroups)
) &&
(
this.FormFieldRules == input.FormFieldRules ||
this.FormFieldRules != null &&
input.FormFieldRules != null &&
this.FormFieldRules.SequenceEqual(input.FormFieldRules)
) &&
(
this.FormFieldsPerDocument == input.FormFieldsPerDocument ||
this.FormFieldsPerDocument != null &&
input.FormFieldsPerDocument != null &&
this.FormFieldsPerDocument.SequenceEqual(input.FormFieldsPerDocument)
) &&
(
this.HideTextTags == input.HideTextTags ||
this.HideTextTags.Equals(input.HideTextTags)
) &&
(
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.UseTextTags == input.UseTextTags ||
this.UseTextTags.Equals(input.UseTextTags)
) &&
(
this.ExpiresAt == input.ExpiresAt ||
(this.ExpiresAt != null &&
this.ExpiresAt.Equals(input.ExpiresAt))
) &&
(
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.Files != null)
{
hashCode = (hashCode * 59) + this.Files.GetHashCode();
}
if (this.FileUrls != null)
{
hashCode = (hashCode * 59) + this.FileUrls.GetHashCode();
}
if (this.Signers != null)
{
hashCode = (hashCode * 59) + this.Signers.GetHashCode();
}
if (this.GroupedSigners != null)
{
hashCode = (hashCode * 59) + this.GroupedSigners.GetHashCode();
}
hashCode = (hashCode * 59) + this.AllowDecline.GetHashCode();
hashCode = (hashCode * 59) + this.AllowReassign.GetHashCode();
if (this.Attachments != null)
{
hashCode = (hashCode * 59) + this.Attachments.GetHashCode();
}
if (this.CcEmailAddresses != null)
{
hashCode = (hashCode * 59) + this.CcEmailAddresses.GetHashCode();
}
if (this.ClientId != null)
{
hashCode = (hashCode * 59) + this.ClientId.GetHashCode();
}
if (this.CustomFields != null)
{
hashCode = (hashCode * 59) + this.CustomFields.GetHashCode();
}
if (this.FieldOptions != null)
{
hashCode = (hashCode * 59) + this.FieldOptions.GetHashCode();
}
if (this.FormFieldGroups != null)
{
hashCode = (hashCode * 59) + this.FormFieldGroups.GetHashCode();
}
if (this.FormFieldRules != null)
{
hashCode = (hashCode * 59) + this.FormFieldRules.GetHashCode();
}
if (this.FormFieldsPerDocument != null)
{
hashCode = (hashCode * 59) + this.FormFieldsPerDocument.GetHashCode();
}
hashCode = (hashCode * 59) + this.HideTextTags.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();
}
hashCode = (hashCode * 59) + this.UseTextTags.GetHashCode();
if (this.ExpiresAt != null)
{
hashCode = (hashCode * 59) + this.ExpiresAt.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 = "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 = "signers",
Property = "Signers",
Type = "List<SubSignatureRequestSigner>",
Value = Signers,
});
types.Add(new OpenApiType(){
Name = "grouped_signers",
Property = "GroupedSigners",
Type = "List<SubSignatureRequestGroupedSigners>",
Value = GroupedSigners,
});
types.Add(new OpenApiType(){
Name = "allow_decline",
Property = "AllowDecline",
Type = "bool",
Value = AllowDecline,
});
types.Add(new OpenApiType(){
Name = "allow_reassign",
Property = "AllowReassign",
Type = "bool",
Value = AllowReassign,
});
types.Add(new OpenApiType(){
Name = "attachments",
Property = "Attachments",
Type = "List<SubAttachment>",
Value = Attachments,
});
types.Add(new OpenApiType(){
Name = "cc_email_addresses",
Property = "CcEmailAddresses",
Type = "List<string>",
Value = CcEmailAddresses,
});
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 = "field_options",
Property = "FieldOptions",
Type = "SubFieldOptions",
Value = FieldOptions,
});
types.Add(new OpenApiType(){
Name = "form_field_groups",
Property = "FormFieldGroups",
Type = "List<SubFormFieldGroup>",
Value = FormFieldGroups,
});
types.Add(new OpenApiType(){
Name = "form_field_rules",
Property = "FormFieldRules",
Type = "List<SubFormFieldRule>",
Value = FormFieldRules,
});
types.Add(new OpenApiType(){
Name = "form_fields_per_document",
Property = "FormFieldsPerDocument",
Type = "List<SubFormFieldsPerDocumentBase>",
Value = FormFieldsPerDocument,
});
types.Add(new OpenApiType(){
Name = "hide_text_tags",
Property = "HideTextTags",
Type = "bool",
Value = HideTextTags,
});
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 = "use_text_tags",
Property = "UseTextTags",
Type = "bool",
Value = UseTextTags,
});
types.Add(new OpenApiType(){
Name = "expires_at",
Property = "ExpiresAt",
Type = "int?",
Value = ExpiresAt,
});
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;
}
}
}