Repository navigation
Expand file tree
/
Copy pathmodel_field.go
More file actions
2929 lines (2529 loc) · 95.2 KB
/
Copy pathmodel_field.go
File metadata and controls
2929 lines (2529 loc) · 95.2 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
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
DocSpring API
Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
API version: v2
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package docspring
import (
"encoding/json"
"fmt"
)
// checks if the Field type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Field{}
// Field A field of a template: the name of a value in submission data, and how and where it prints. Fields with the same `name` share one value and the settings the descriptions say are shared. A PDF template's fields are placed on its pages: `x`, `y`, `width` and `height` are in units where every page is 2480 wide, measured from the top-left corner of the field's `page`. To convert from PDF points, multiply by 2480 and divide by the page's width in points (`document.page_dimensions` on the template). An HTML or Word template's fields are all on page 1, and their placement and style settings aren't used: its HTML or Word document places and styles each value.
type Field struct {
// The field's ID, an integer that's unique within the template.
Id int32 `json:"id"`
// The field's name, the key of its value in submission data. A `/` nests the key in objects and arrays (`client/address`, `items/0/price`); write a literal `/` as `~1` and `~` as `~0`. Fields with the same name share one value and their shared settings, and array indexes inside a name are ignored for settings, so `items/0/price` and `items/1/price` share settings but not values. A `#` and a line number (`notes#0`, `notes#1`) splits one value over several fields as lines of text, and names that start with `@@` print submission details such as `@@date`.
Name NullableString `json:"name"`
// The number of the page the field is on, starting at 1. A field added without one goes on page 1, and a field moved to another page without a new `y` keeps its place on the page.
Page int32 `json:"page"`
// The name of the PDF form field this field was made from, when the template's PDF had fillable fields. Null for fields added in DocSpring.
AcroformName NullableString `json:"acroform_name"`
// The data type of the field's value: `string`, `number`, `boolean`, `date`, `address`, `country`, `email`, `url`, `image`, `signature`, `initials`, `barcode`, or `combined` (made from other fields' values, never sent in submission data). It sets how the value is validated and which `display_type`s the field can use. `object` and `array` are the types of field groups (the template's `field_groups`), not of fields. Shared by every field with the same `name`.
Type FieldType `json:"type"`
// The field prints fixed content, its `default`, instead of a value from submission data, and it's left out of the template's data schema and forms. Static check marks and shapes always print unless `hidden`, and a static number field's `default` can be a formula. Shared by every field with the same `name`.
Static bool `json:"static"`
// Text and check display only: prints the field as a fillable PDF form field instead of flat content (a text field with an `option_list` becomes a dropdown). A submission's `editable` option, when set, overrides this for every field. Shared by every field with the same `name`.
Editable bool `json:"editable"`
// The value used when a submission leaves the field out, and the value forms are pre-filled with. A required field still needs a value in each submission. An image field's default is an image URL, a number field's can be a formula, and a static field's is the content it prints. Shared by every field with the same `name`.
Default NullableString `json:"default"`
// The field's title in the template's data schema and on forms. When it's empty, a title is made from the field's name. Shared by every field with the same `name`.
Title string `json:"title"`
// Help text for the field, added to the template's data schema and shown on forms. Shared by every field with the same `name`.
Description string `json:"description"`
// Placeholder text for the field's input on forms, added to the template's data schema as `x-placeholder`. Shared by every field with the same `name`.
Placeholder string `json:"placeholder"`
// Text for your own use, added to the template's data schema as `x-metadata`. DocSpring doesn't use it. Shared by every field with the same `name`.
Metadata string `json:"metadata"`
// Whether each submission must include a value for the field. A submission without one fails validation, and no PDF is generated. Shared by every field with the same `name`.
Required bool `json:"required"`
// String fields only: a comma-separated list of the values the field accepts. It's added to the template's data schema as an `enum`, forms show it as a select list, and an `editable` field becomes a dropdown. Shared by every field with the same `name`.
OptionList NullableString `json:"option_list"`
// Combined fields only: a comma-separated list of the names of the fields whose values are combined, in order. Shared by every field with the same `name`.
CombinedFieldNames string `json:"combined_field_names"`
// Combined fields only: `separator` joins the values with `combined_field_separator`, and `format` puts them into `combined_field_format`. Shared by every field with the same `name`.
CombinedFieldType CombinedFieldType `json:"combined_field_type"`
// Combined fields only: the text placed between the values when `combined_field_type` is `separator`. Empty values are skipped. Defaults to a space. Shared by every field with the same `name`.
CombinedFieldSeparator string `json:"combined_field_separator"`
// Combined fields only: the text for `combined_field_type` `format`, where `$0`, `$1` and so on are replaced with the values of `combined_field_names` in order, such as `Full name: $0, Occupation: $1`. Shared by every field with the same `name`.
CombinedFieldFormat string `json:"combined_field_format"`
// Number fields only: the value must be a whole number. Shared by every field with the same `name`.
Integer bool `json:"integer"`
// Number fields only: the smallest value allowed. Shared by every field with the same `name`.
Minimum NullableFloat32 `json:"minimum"`
// Number fields only: the largest value allowed. Shared by every field with the same `name`.
Maximum NullableFloat32 `json:"maximum"`
// Number fields only: the value must be greater than `minimum`, not equal to it. Shared by every field with the same `name`.
ExclusiveMinimum bool `json:"exclusive_minimum"`
// Number fields only: the value must be less than `maximum`, not equal to it. Shared by every field with the same `name`.
ExclusiveMaximum bool `json:"exclusive_maximum"`
// Date fields only: the value is a date and time (`YYYY-MM-DDThh:mm:ss.fffZ`) instead of a date (`YYYY-MM-DD`), and it prints with the template's date-time format unless `date_time_format` is set. Shared by every field with the same `name`.
IncludeTime NullableBool `json:"include_time"`
// Signature and initials fields only: lets signers draw their signature on forms and in data requests. Shared by every field with the same `name`.
SignatureAllowDraw bool `json:"signature_allow_draw"`
// Signature and initials fields only: lets signers type their name and choose a script font instead of drawing, on forms and in data requests. Shared by every field with the same `name`.
SignatureAllowType bool `json:"signature_allow_type"`
// Barcode fields only: the barcode format, which the value must match. `code_128` and `pdf417` take any ASCII text; `code_39` and `code_93` take capital letters, digits, spaces and `- . $ / + %`; `code_25` takes digits; `ean_13` takes 12 digits, `ean_8` 7 digits and `upc_a` 11 digits (the check digit is added). Shared by every field with the same `name`.
BarcodeSymbology BarcodeSymbology `json:"barcode_symbology"`
// Leaves the field off the PDF. It stays in the template's data schema (marked `x-hidden`) and on forms, so other fields, such as combined fields, can use its value. A hidden static check mark or shape isn't printed.
Hidden bool `json:"hidden"`
// The distance from the page's left edge to the field's left edge. Positions and sizes are in units where every page is 2480 wide: one unit is the page's width in points divided by 2480 (about 0.247 points on a US Letter page).
X float32 `json:"x"`
// The distance from the top edge of the field's `page` down to the field's top edge, in the units of `x`. A page is 2480 times its height divided by its width units tall: about 3209 for US Letter and 3508 for A4.
Y float32 `json:"y"`
// The field's width, in the units of `x`. A check mark is sized to the field's width.
Width float32 `json:"width"`
// The field's height, in the units of `x`. The template editor keeps check marks, QR codes, and square and circle shapes square, with `height` equal to `width`.
Height float32 `json:"height"`
// Rotates the field clockwise by this many degrees, from -360 to 360 (negative turns it counterclockwise).
Rotation float32 `json:"rotation"`
// How the value appears on the PDF: `text`, `check` (a check mark), `shape`, `qrcode`, `barcode`, or `image` (image, signature and initials fields). Check marks and shapes print only when the value meets the field's `condition`, and the field's `type` limits which display types it can use.
DisplayType FieldDisplayType `json:"display_type"`
// The opacity of the field's content and background, from 0 (invisible) to 1. QR codes and barcodes always print at full opacity.
Opacity float32 `json:"opacity"`
// Date fields only: how the date prints, as a strftime format such as `%m/%d/%Y`, or a calculation such as `@years_since`, `@years_until` or `@diff_years` (also months, weeks, days, hours, minutes and seconds), counted to when the PDF is generated. Empty uses the template's date format, or its date-time format with `include_time`.
DateTimeFormat NullableString `json:"date_time_format"`
// Text display only: the font, one of `Helvetica`, `Arial`, `Calibri`, `Open Sans`, `Roboto`, `Lato`, `Poppins`, `Public Sans`, `Questrial`, `Times New Roman`, `Dancing Script`, `Lovtony Script`, or the monospace `Courier`, `Inconsolata`, `Menlo`, `Roboto Mono` and `Ubuntu Mono`. Empty uses the template's default typeface.
Typeface NullableTypeface `json:"typeface"`
// Text display only: the font size in points. Empty uses the template's default font size.
FontSize NullableInt32 `json:"font_size"`
// Text display only: extra space between characters, in points. Empty uses the template's default.
CharacterSpacing float32 `json:"character_spacing"`
// Text display only: prints the text in bold.
Bold bool `json:"bold"`
// Text display only: prints the text in capital letters.
Uppercase bool `json:"uppercase"`
// Text display only: draws a line through the text.
Strikethrough bool `json:"strikethrough"`
// Text display only: keeps the spaces at the start of the text and of each line, so text can be lined up with spaces.
KeepLeadingSpaces bool `json:"keep_leading_spaces"`
// Text display only: what happens to text that doesn't fit the field. `shrink_to_fit` makes the font smaller, down to 5 points; `truncate` cuts the text off and returns the rest in the submission's `truncated_text`.
Overflow TextOverflow `json:"overflow"`
// Text display only: wraps the text over as many lines as fit in the field's height instead of printing one line, and forms show a multi-line input.
Multiline bool `json:"multiline"`
// Text display only, with `multiline`: spreads the text over exactly this many evenly spaced lines in the field's height (up to 300), to line up with lines printed on the form. Empty uses the font's normal line spacing.
MultilineLines NullableInt32 `json:"multiline_lines"`
// Text display only: the fewest characters the value can have, added to the template's data schema. Not used for date, address, country or number fields, or fields with an `option_list`.
MinLength float32 `json:"min_length"`
// Text display only: the most characters the value can have, added to the template's data schema; it also limits an `editable` field. Not used for date, address, country or number fields, or fields with an `option_list`.
MaxLength NullableInt32 `json:"max_length"`
// Text display only, with a monospace `typeface` (`Courier`, `Inconsolata`, `Menlo`, `Roboto Mono` or `Ubuntu Mono`): adds the number of characters that fit in the field to the template's data schema as its maximum length.
AutoCalculateMaxLength bool `json:"auto_calculate_max_length"`
// Text display only: the text color, as a hex code such as `444444`. Empty uses the template's default text color.
Color NullableString `json:"color"`
// Text display only: the name of a data field whose value, a hex code such as `FF0000`, sets the text color for each submission. That field is added to the template's data schema, with `color` as its default.
ColorFieldName NullableString `json:"color_field_name"`
// Makes the `color_field_name` field required. When it isn't required and a submission leaves it out, `color` is used.
ColorFieldRequired bool `json:"color_field_required"`
// Text and check display only: a color that fills the field's area behind its content, as a hex code, to cover what the page shows there. Check fields print it even when unchecked; text fields print it only when they have a value.
BackgroundColor NullableString `json:"background_color"`
// Text and check display only: the name of a data field whose value, a hex code, sets the background color for each submission. That field is added to the template's data schema, with `background_color` as its default.
BackgroundColorFieldName NullableString `json:"background_color_field_name"`
// Makes the `background_color_field_name` field required. When it isn't required and a submission leaves it out, `background_color` is used.
BackgroundColorFieldRequired bool `json:"background_color_field_required"`
// Text display only: how the text is aligned across the field: `left`, `center`, `right` or `justify` (both edges of every line of multiline text except the last of each paragraph).
Alignment TextAlignment `json:"alignment"`
// Text display only: how the text is aligned vertically in the field: `bottom`, `center` or `top`.
VAlignment TextVerticalAlignment `json:"v_alignment"`
// Text display only: splits the field into `comb_number_of_cells` boxes of equal width and prints one character, centered, in each.
Comb bool `json:"comb"`
// With `comb`: how many boxes the field has. The value's maximum length in the template's data schema is this plus `comb_value_offset`.
CombNumberOfCells int32 `json:"comb_number_of_cells"`
// With `comb`: the position, from 0, of the first character of the value that this field prints. For an SSN printed in boxes of 3, 2 and 4 digits, three fields named `ssn` use offsets 0, 3 and 5.
CombValueOffset int32 `json:"comb_value_offset"`
// Shape display only: `square`, `rectangle`, `circle`, `ellipse`, `triangle` or `polygon`. A square or circle uses the smaller of `width` and `height`.
ShapeType ShapeType `json:"shape_type"`
// Shape display only, with `shape_type` `polygon`: the number of sides, 3 to 12.
ShapeSides int32 `json:"shape_sides"`
// Shape display only: the width of the shape's border, in points.
ShapeBorderWidth int32 `json:"shape_border_width"`
// Shape display only: the shape's border color, as a hex code. Null draws no border.
ShapeBorderColor string `json:"shape_border_color"`
// Shape display only: the name of a data field whose value, a hex code, sets the border color for each submission. That field is added to the template's data schema, with `shape_border_color` as its default.
ShapeBorderColorFieldName NullableString `json:"shape_border_color_field_name"`
// Makes the `shape_border_color_field_name` field required. When it isn't required and a submission leaves it out, `shape_border_color` is used.
ShapeBorderColorFieldRequired bool `json:"shape_border_color_field_required"`
// Shape display only: the color that fills the shape, as a hex code. Null leaves it unfilled.
ShapeFillColor NullableString `json:"shape_fill_color"`
// Shape display only: the name of a data field whose value, a hex code, sets the fill color for each submission. That field is added to the template's data schema, with `shape_fill_color` as its default.
ShapeFillColorFieldName NullableString `json:"shape_fill_color_field_name"`
// Makes the `shape_fill_color_field_name` field required. When it isn't required and a submission leaves it out, `shape_fill_color` is used.
ShapeFillColorFieldRequired bool `json:"shape_fill_color_field_required"`
// Check display only: the character printed, as an HTML entity: `✓` (✓), `✔` (✔, the default), `✖` (✖), `✗` (✗) or `✘` (✘).
CheckCharacter CheckCharacter `json:"check_character"`
// Check display only: the check mark's color, as a hex code. Empty uses the template's default check color.
CheckColor NullableString `json:"check_color"`
// Check display only: the name of a data field whose value, a hex code, sets the check mark's color for each submission. That field is added to the template's data schema, with `check_color` as its default.
CheckColorFieldName NullableString `json:"check_color_field_name"`
// Makes the `check_color_field_name` field required. When it isn't required and a submission leaves it out, `check_color` is used.
CheckColorFieldRequired bool `json:"check_color_field_required"`
// QR code display only: the QR code's color, as a hex code, printed on a white background. Empty prints it in black.
QrcodeColor NullableString `json:"qrcode_color"`
// QR code display only: the name of a data field whose value, a hex code, sets the QR code's color for each submission. That field is added to the template's data schema, with `qrcode_color` as its default.
QrcodeColorFieldName NullableString `json:"qrcode_color_field_name"`
// Makes the `qrcode_color_field_name` field required. When it isn't required and a submission leaves it out, `qrcode_color` is used.
QrcodeColorFieldRequired bool `json:"qrcode_color_field_required"`
// Boolean fields with text display: the text printed when the value is `true`. Empty uses the template's `true_text`; when neither is set, nothing prints.
TrueText NullableString `json:"true_text"`
// Boolean fields with text display: the text printed when the value is `false`. Empty uses the template's `false_text`; when neither is set, nothing prints.
FalseText NullableString `json:"false_text"`
// Check and shape display only: the value a string or number field's value is compared with, by `string_condition_type` or `number_condition_type`, to decide whether the check mark or shape prints. Boolean fields print when `true` (see `invert_boolean_condition`), and other types print when they have a value.
Condition NullableString `json:"condition"`
// String fields with check or shape display: how the value is compared with `condition`: `equals`, `contains`, `starts_with`, `ends_with`, or `regex`, where `condition` is a regular expression (RE2 syntax) the value must match; each has a `not_` form that prints when it doesn't match (`not_equals`, `not_regex`, ...). `blank` prints when the value is empty or only spaces and line breaks, and `not_blank` when it isn't; they ignore `condition`.
StringConditionType StringConditionType `json:"string_condition_type"`
// Number fields with check or shape display: how the value is compared with `condition`: `equals`, `gt` (greater than), `gte` (greater than or equal to), `lt` (less than), `lte` (less than or equal to), or `range`, between `number_condition_range_min` and `number_condition_range_max`.
NumberConditionType NumberConditionType `json:"number_condition_type"`
// With `number_condition_type` `range`: the lower end of the range, included unless `number_condition_range_exclusive_min` is set.
NumberConditionRangeMin NullableFloat32 `json:"number_condition_range_min"`
// With `number_condition_type` `range`: the upper end of the range, included unless `number_condition_range_exclusive_max` is set.
NumberConditionRangeMax NullableFloat32 `json:"number_condition_range_max"`
// With `number_condition_type` `range`: leaves `number_condition_range_min` itself out of the range.
NumberConditionRangeExclusiveMin bool `json:"number_condition_range_exclusive_min"`
// With `number_condition_type` `range`: leaves `number_condition_range_max` itself out of the range.
NumberConditionRangeExclusiveMax bool `json:"number_condition_range_exclusive_max"`
// Boolean fields with check or shape display: prints the check mark or shape when the value is `false` or missing, instead of `true`.
InvertBooleanCondition bool `json:"invert_boolean_condition"`
// Number fields only: forms show a currency input, and the template's data schema gives the field `format: currency`. It doesn't change how the number prints.
Currency bool `json:"currency"`
// Number fields with text display: prints the number with this many decimal places, from 0 (rounds to a whole number) to 99. Empty prints the number as it was sent.
DecimalPlaces NullableInt32 `json:"decimal_places"`
// Image fields only: how the image is resized to the field. `fit` keeps its proportions and fits it inside the field, which can leave empty space; `fill` keeps its proportions and crops it to fill the field; `stretch` stretches it to the field's size. Signatures and initials always fit.
ImageScaleType ImageScaleType `json:"image_scale_type"`
// Image, signature and initials fields: where the image sits in the field with `fit`, or which part is kept with `fill`: `NorthWest` (top left), `North`, `NorthEast`, `West`, `Center`, `East`, `SouthWest`, `South` or `SouthEast` (bottom right). It also aligns typed signatures, and isn't used with `stretch`.
ImageGravity ImageGravity `json:"image_gravity"`
// The field's own conditional logic rule: when other fields' values meet its conditions, the field is shown, made required, or both. Null when it has none. The template's rules (`field_dependencies`) can apply to the field too. Shared by every field with the same `name`.
Dependencies NullableFieldDependency `json:"dependencies"`
AdditionalProperties map[string]interface{}
}
type _Field Field
// NewField instantiates a new Field object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewField(id int32, name NullableString, page int32, acroformName NullableString, type_ FieldType, static bool, editable bool, default_ NullableString, title string, description string, placeholder string, metadata string, required bool, optionList NullableString, combinedFieldNames string, combinedFieldType CombinedFieldType, combinedFieldSeparator string, combinedFieldFormat string, integer bool, minimum NullableFloat32, maximum NullableFloat32, exclusiveMinimum bool, exclusiveMaximum bool, includeTime NullableBool, signatureAllowDraw bool, signatureAllowType bool, barcodeSymbology BarcodeSymbology, hidden bool, x float32, y float32, width float32, height float32, rotation float32, displayType FieldDisplayType, opacity float32, dateTimeFormat NullableString, typeface NullableTypeface, fontSize NullableInt32, characterSpacing float32, bold bool, uppercase bool, strikethrough bool, keepLeadingSpaces bool, overflow TextOverflow, multiline bool, multilineLines NullableInt32, minLength float32, maxLength NullableInt32, autoCalculateMaxLength bool, color NullableString, colorFieldName NullableString, colorFieldRequired bool, backgroundColor NullableString, backgroundColorFieldName NullableString, backgroundColorFieldRequired bool, alignment TextAlignment, vAlignment TextVerticalAlignment, comb bool, combNumberOfCells int32, combValueOffset int32, shapeType ShapeType, shapeSides int32, shapeBorderWidth int32, shapeBorderColor string, shapeBorderColorFieldName NullableString, shapeBorderColorFieldRequired bool, shapeFillColor NullableString, shapeFillColorFieldName NullableString, shapeFillColorFieldRequired bool, checkCharacter CheckCharacter, checkColor NullableString, checkColorFieldName NullableString, checkColorFieldRequired bool, qrcodeColor NullableString, qrcodeColorFieldName NullableString, qrcodeColorFieldRequired bool, trueText NullableString, falseText NullableString, condition NullableString, stringConditionType StringConditionType, numberConditionType NumberConditionType, numberConditionRangeMin NullableFloat32, numberConditionRangeMax NullableFloat32, numberConditionRangeExclusiveMin bool, numberConditionRangeExclusiveMax bool, invertBooleanCondition bool, currency bool, decimalPlaces NullableInt32, imageScaleType ImageScaleType, imageGravity ImageGravity, dependencies NullableFieldDependency) *Field {
this := Field{}
this.Id = id
this.Name = name
this.Page = page
this.AcroformName = acroformName
this.Type = type_
this.Static = static
this.Editable = editable
this.Default = default_
this.Title = title
this.Description = description
this.Placeholder = placeholder
this.Metadata = metadata
this.Required = required
this.OptionList = optionList
this.CombinedFieldNames = combinedFieldNames
this.CombinedFieldType = combinedFieldType
this.CombinedFieldSeparator = combinedFieldSeparator
this.CombinedFieldFormat = combinedFieldFormat
this.Integer = integer
this.Minimum = minimum
this.Maximum = maximum
this.ExclusiveMinimum = exclusiveMinimum
this.ExclusiveMaximum = exclusiveMaximum
this.IncludeTime = includeTime
this.SignatureAllowDraw = signatureAllowDraw
this.SignatureAllowType = signatureAllowType
this.BarcodeSymbology = barcodeSymbology
this.Hidden = hidden
this.X = x
this.Y = y
this.Width = width
this.Height = height
this.Rotation = rotation
this.DisplayType = displayType
this.Opacity = opacity
this.DateTimeFormat = dateTimeFormat
this.Typeface = typeface
this.FontSize = fontSize
this.CharacterSpacing = characterSpacing
this.Bold = bold
this.Uppercase = uppercase
this.Strikethrough = strikethrough
this.KeepLeadingSpaces = keepLeadingSpaces
this.Overflow = overflow
this.Multiline = multiline
this.MultilineLines = multilineLines
this.MinLength = minLength
this.MaxLength = maxLength
this.AutoCalculateMaxLength = autoCalculateMaxLength
this.Color = color
this.ColorFieldName = colorFieldName
this.ColorFieldRequired = colorFieldRequired
this.BackgroundColor = backgroundColor
this.BackgroundColorFieldName = backgroundColorFieldName
this.BackgroundColorFieldRequired = backgroundColorFieldRequired
this.Alignment = alignment
this.VAlignment = vAlignment
this.Comb = comb
this.CombNumberOfCells = combNumberOfCells
this.CombValueOffset = combValueOffset
this.ShapeType = shapeType
this.ShapeSides = shapeSides
this.ShapeBorderWidth = shapeBorderWidth
this.ShapeBorderColor = shapeBorderColor
this.ShapeBorderColorFieldName = shapeBorderColorFieldName
this.ShapeBorderColorFieldRequired = shapeBorderColorFieldRequired
this.ShapeFillColor = shapeFillColor
this.ShapeFillColorFieldName = shapeFillColorFieldName
this.ShapeFillColorFieldRequired = shapeFillColorFieldRequired
this.CheckCharacter = checkCharacter
this.CheckColor = checkColor
this.CheckColorFieldName = checkColorFieldName
this.CheckColorFieldRequired = checkColorFieldRequired
this.QrcodeColor = qrcodeColor
this.QrcodeColorFieldName = qrcodeColorFieldName
this.QrcodeColorFieldRequired = qrcodeColorFieldRequired
this.TrueText = trueText
this.FalseText = falseText
this.Condition = condition
this.StringConditionType = stringConditionType
this.NumberConditionType = numberConditionType
this.NumberConditionRangeMin = numberConditionRangeMin
this.NumberConditionRangeMax = numberConditionRangeMax
this.NumberConditionRangeExclusiveMin = numberConditionRangeExclusiveMin
this.NumberConditionRangeExclusiveMax = numberConditionRangeExclusiveMax
this.InvertBooleanCondition = invertBooleanCondition
this.Currency = currency
this.DecimalPlaces = decimalPlaces
this.ImageScaleType = imageScaleType
this.ImageGravity = imageGravity
this.Dependencies = dependencies
return &this
}
// NewFieldWithDefaults instantiates a new Field object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewFieldWithDefaults() *Field {
this := Field{}
return &this
}
// GetId returns the Id field value
func (o *Field) GetId() int32 {
if o == nil {
var ret int32
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *Field) GetIdOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *Field) SetId(v int32) {
o.Id = v
}
// GetName returns the Name field value
// If the value is explicit nil, the zero value for string will be returned
func (o *Field) GetName() string {
if o == nil || o.Name.Get() == nil {
var ret string
return ret
}
return *o.Name.Get()
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Field) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Name.Get(), o.Name.IsSet()
}
// SetName sets field value
func (o *Field) SetName(v string) {
o.Name.Set(&v)
}
// GetPage returns the Page field value
func (o *Field) GetPage() int32 {
if o == nil {
var ret int32
return ret
}
return o.Page
}
// GetPageOk returns a tuple with the Page field value
// and a boolean to check if the value has been set.
func (o *Field) GetPageOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.Page, true
}
// SetPage sets field value
func (o *Field) SetPage(v int32) {
o.Page = v
}
// GetAcroformName returns the AcroformName field value
// If the value is explicit nil, the zero value for string will be returned
func (o *Field) GetAcroformName() string {
if o == nil || o.AcroformName.Get() == nil {
var ret string
return ret
}
return *o.AcroformName.Get()
}
// GetAcroformNameOk returns a tuple with the AcroformName field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Field) GetAcroformNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.AcroformName.Get(), o.AcroformName.IsSet()
}
// SetAcroformName sets field value
func (o *Field) SetAcroformName(v string) {
o.AcroformName.Set(&v)
}
// GetType returns the Type field value
func (o *Field) GetType() FieldType {
if o == nil {
var ret FieldType
return ret
}
return o.Type
}
// GetTypeOk returns a tuple with the Type field value
// and a boolean to check if the value has been set.
func (o *Field) GetTypeOk() (*FieldType, bool) {
if o == nil {
return nil, false
}
return &o.Type, true
}
// SetType sets field value
func (o *Field) SetType(v FieldType) {
o.Type = v
}
// GetStatic returns the Static field value
func (o *Field) GetStatic() bool {
if o == nil {
var ret bool
return ret
}
return o.Static
}
// GetStaticOk returns a tuple with the Static field value
// and a boolean to check if the value has been set.
func (o *Field) GetStaticOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Static, true
}
// SetStatic sets field value
func (o *Field) SetStatic(v bool) {
o.Static = v
}
// GetEditable returns the Editable field value
func (o *Field) GetEditable() bool {
if o == nil {
var ret bool
return ret
}
return o.Editable
}
// GetEditableOk returns a tuple with the Editable field value
// and a boolean to check if the value has been set.
func (o *Field) GetEditableOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Editable, true
}
// SetEditable sets field value
func (o *Field) SetEditable(v bool) {
o.Editable = v
}
// GetDefault returns the Default field value
// If the value is explicit nil, the zero value for string will be returned
func (o *Field) GetDefault() string {
if o == nil || o.Default.Get() == nil {
var ret string
return ret
}
return *o.Default.Get()
}
// GetDefaultOk returns a tuple with the Default field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Field) GetDefaultOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Default.Get(), o.Default.IsSet()
}
// SetDefault sets field value
func (o *Field) SetDefault(v string) {
o.Default.Set(&v)
}
// GetTitle returns the Title field value
func (o *Field) GetTitle() string {
if o == nil {
var ret string
return ret
}
return o.Title
}
// GetTitleOk returns a tuple with the Title field value
// and a boolean to check if the value has been set.
func (o *Field) GetTitleOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Title, true
}
// SetTitle sets field value
func (o *Field) SetTitle(v string) {
o.Title = v
}
// GetDescription returns the Description field value
func (o *Field) GetDescription() string {
if o == nil {
var ret string
return ret
}
return o.Description
}
// GetDescriptionOk returns a tuple with the Description field value
// and a boolean to check if the value has been set.
func (o *Field) GetDescriptionOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Description, true
}
// SetDescription sets field value
func (o *Field) SetDescription(v string) {
o.Description = v
}
// GetPlaceholder returns the Placeholder field value
func (o *Field) GetPlaceholder() string {
if o == nil {
var ret string
return ret
}
return o.Placeholder
}
// GetPlaceholderOk returns a tuple with the Placeholder field value
// and a boolean to check if the value has been set.
func (o *Field) GetPlaceholderOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Placeholder, true
}
// SetPlaceholder sets field value
func (o *Field) SetPlaceholder(v string) {
o.Placeholder = v
}
// GetMetadata returns the Metadata field value
func (o *Field) GetMetadata() string {
if o == nil {
var ret string
return ret
}
return o.Metadata
}
// GetMetadataOk returns a tuple with the Metadata field value
// and a boolean to check if the value has been set.
func (o *Field) GetMetadataOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Metadata, true
}
// SetMetadata sets field value
func (o *Field) SetMetadata(v string) {
o.Metadata = v
}
// GetRequired returns the Required field value
func (o *Field) GetRequired() bool {
if o == nil {
var ret bool
return ret
}
return o.Required
}
// GetRequiredOk returns a tuple with the Required field value
// and a boolean to check if the value has been set.
func (o *Field) GetRequiredOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Required, true
}
// SetRequired sets field value
func (o *Field) SetRequired(v bool) {
o.Required = v
}
// GetOptionList returns the OptionList field value
// If the value is explicit nil, the zero value for string will be returned
func (o *Field) GetOptionList() string {
if o == nil || o.OptionList.Get() == nil {
var ret string
return ret
}
return *o.OptionList.Get()
}
// GetOptionListOk returns a tuple with the OptionList field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Field) GetOptionListOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.OptionList.Get(), o.OptionList.IsSet()
}
// SetOptionList sets field value
func (o *Field) SetOptionList(v string) {
o.OptionList.Set(&v)
}
// GetCombinedFieldNames returns the CombinedFieldNames field value
func (o *Field) GetCombinedFieldNames() string {
if o == nil {
var ret string
return ret
}
return o.CombinedFieldNames
}
// GetCombinedFieldNamesOk returns a tuple with the CombinedFieldNames field value
// and a boolean to check if the value has been set.
func (o *Field) GetCombinedFieldNamesOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.CombinedFieldNames, true
}
// SetCombinedFieldNames sets field value
func (o *Field) SetCombinedFieldNames(v string) {
o.CombinedFieldNames = v
}
// GetCombinedFieldType returns the CombinedFieldType field value
func (o *Field) GetCombinedFieldType() CombinedFieldType {
if o == nil {
var ret CombinedFieldType
return ret
}
return o.CombinedFieldType
}
// GetCombinedFieldTypeOk returns a tuple with the CombinedFieldType field value
// and a boolean to check if the value has been set.
func (o *Field) GetCombinedFieldTypeOk() (*CombinedFieldType, bool) {
if o == nil {
return nil, false
}
return &o.CombinedFieldType, true
}
// SetCombinedFieldType sets field value
func (o *Field) SetCombinedFieldType(v CombinedFieldType) {
o.CombinedFieldType = v
}
// GetCombinedFieldSeparator returns the CombinedFieldSeparator field value
func (o *Field) GetCombinedFieldSeparator() string {
if o == nil {
var ret string
return ret
}
return o.CombinedFieldSeparator
}
// GetCombinedFieldSeparatorOk returns a tuple with the CombinedFieldSeparator field value
// and a boolean to check if the value has been set.
func (o *Field) GetCombinedFieldSeparatorOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.CombinedFieldSeparator, true
}
// SetCombinedFieldSeparator sets field value
func (o *Field) SetCombinedFieldSeparator(v string) {
o.CombinedFieldSeparator = v
}
// GetCombinedFieldFormat returns the CombinedFieldFormat field value
func (o *Field) GetCombinedFieldFormat() string {
if o == nil {
var ret string
return ret
}
return o.CombinedFieldFormat
}
// GetCombinedFieldFormatOk returns a tuple with the CombinedFieldFormat field value
// and a boolean to check if the value has been set.
func (o *Field) GetCombinedFieldFormatOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.CombinedFieldFormat, true
}
// SetCombinedFieldFormat sets field value
func (o *Field) SetCombinedFieldFormat(v string) {
o.CombinedFieldFormat = v
}
// GetInteger returns the Integer field value
func (o *Field) GetInteger() bool {
if o == nil {
var ret bool
return ret
}
return o.Integer
}
// GetIntegerOk returns a tuple with the Integer field value
// and a boolean to check if the value has been set.
func (o *Field) GetIntegerOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Integer, true
}
// SetInteger sets field value
func (o *Field) SetInteger(v bool) {
o.Integer = v
}
// GetMinimum returns the Minimum field value
// If the value is explicit nil, the zero value for float32 will be returned
func (o *Field) GetMinimum() float32 {
if o == nil || o.Minimum.Get() == nil {
var ret float32
return ret
}
return *o.Minimum.Get()
}
// GetMinimumOk returns a tuple with the Minimum field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Field) GetMinimumOk() (*float32, bool) {
if o == nil {
return nil, false
}
return o.Minimum.Get(), o.Minimum.IsSet()
}
// SetMinimum sets field value
func (o *Field) SetMinimum(v float32) {
o.Minimum.Set(&v)
}
// GetMaximum returns the Maximum field value
// If the value is explicit nil, the zero value for float32 will be returned
func (o *Field) GetMaximum() float32 {
if o == nil || o.Maximum.Get() == nil {
var ret float32
return ret
}
return *o.Maximum.Get()
}
// GetMaximumOk returns a tuple with the Maximum field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Field) GetMaximumOk() (*float32, bool) {
if o == nil {
return nil, false
}
return o.Maximum.Get(), o.Maximum.IsSet()
}
// SetMaximum sets field value
func (o *Field) SetMaximum(v float32) {
o.Maximum.Set(&v)
}
// GetExclusiveMinimum returns the ExclusiveMinimum field value
func (o *Field) GetExclusiveMinimum() bool {
if o == nil {
var ret bool
return ret
}
return o.ExclusiveMinimum
}
// GetExclusiveMinimumOk returns a tuple with the ExclusiveMinimum field value
// and a boolean to check if the value has been set.
func (o *Field) GetExclusiveMinimumOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.ExclusiveMinimum, true
}
// SetExclusiveMinimum sets field value
func (o *Field) SetExclusiveMinimum(v bool) {
o.ExclusiveMinimum = v
}
// GetExclusiveMaximum returns the ExclusiveMaximum field value
func (o *Field) GetExclusiveMaximum() bool {
if o == nil {
var ret bool
return ret
}
return o.ExclusiveMaximum
}
// GetExclusiveMaximumOk returns a tuple with the ExclusiveMaximum field value
// and a boolean to check if the value has been set.
func (o *Field) GetExclusiveMaximumOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.ExclusiveMaximum, true
}
// SetExclusiveMaximum sets field value
func (o *Field) SetExclusiveMaximum(v bool) {
o.ExclusiveMaximum = v
}
// GetIncludeTime returns the IncludeTime field value
// If the value is explicit nil, the zero value for bool will be returned
func (o *Field) GetIncludeTime() bool {
if o == nil || o.IncludeTime.Get() == nil {
var ret bool
return ret
}
return *o.IncludeTime.Get()
}
// GetIncludeTimeOk returns a tuple with the IncludeTime field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Field) GetIncludeTimeOk() (*bool, bool) {
if o == nil {
return nil, false
}
return o.IncludeTime.Get(), o.IncludeTime.IsSet()
}
// SetIncludeTime sets field value
func (o *Field) SetIncludeTime(v bool) {
o.IncludeTime.Set(&v)
}
// GetSignatureAllowDraw returns the SignatureAllowDraw field value
func (o *Field) GetSignatureAllowDraw() bool {
if o == nil {
var ret bool
return ret
}
return o.SignatureAllowDraw
}
// GetSignatureAllowDrawOk returns a tuple with the SignatureAllowDraw field value
// and a boolean to check if the value has been set.
func (o *Field) GetSignatureAllowDrawOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.SignatureAllowDraw, true
}
// SetSignatureAllowDraw sets field value
func (o *Field) SetSignatureAllowDraw(v bool) {
o.SignatureAllowDraw = v
}
// GetSignatureAllowType returns the SignatureAllowType field value
func (o *Field) GetSignatureAllowType() bool {
if o == nil {
var ret bool
return ret
}
return o.SignatureAllowType
}
// GetSignatureAllowTypeOk returns a tuple with the SignatureAllowType field value
// and a boolean to check if the value has been set.
func (o *Field) GetSignatureAllowTypeOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.SignatureAllowType, true
}
// SetSignatureAllowType sets field value
func (o *Field) SetSignatureAllowType(v bool) {
o.SignatureAllowType = v
}
// GetBarcodeSymbology returns the BarcodeSymbology field value
func (o *Field) GetBarcodeSymbology() BarcodeSymbology {
if o == nil {
var ret BarcodeSymbology
return ret
}
return o.BarcodeSymbology
}
// GetBarcodeSymbologyOk returns a tuple with the BarcodeSymbology field value
// and a boolean to check if the value has been set.
func (o *Field) GetBarcodeSymbologyOk() (*BarcodeSymbology, bool) {
if o == nil {
return nil, false
}
return &o.BarcodeSymbology, true
}
// SetBarcodeSymbology sets field value
func (o *Field) SetBarcodeSymbology(v BarcodeSymbology) {
o.BarcodeSymbology = v
}
// GetHidden returns the Hidden field value
func (o *Field) GetHidden() bool {
if o == nil {
var ret bool
return ret
}
return o.Hidden
}
// GetHiddenOk returns a tuple with the Hidden field value
// and a boolean to check if the value has been set.
func (o *Field) GetHiddenOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Hidden, true
}
// SetHidden sets field value
func (o *Field) SetHidden(v bool) {