Repository navigation
Expand file tree
/
Copy pathmodel_field_input.go
More file actions
3710 lines (3210 loc) · 125 KB
/
Copy pathmodel_field_input.go
File metadata and controls
3710 lines (3210 loc) · 125 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"
)
// checks if the FieldInput type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &FieldInput{}
// FieldInput 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 FieldInput struct {
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// Number fields only: the value must be a whole number. Shared by every field with the same `name`.
Integer *bool `json:"integer,omitempty"`
// Number fields only: the smallest value allowed. Shared by every field with the same `name`.
Minimum NullableFloat32 `json:"minimum,omitempty"`
// Number fields only: the largest value allowed. Shared by every field with the same `name`.
Maximum NullableFloat32 `json:"maximum,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// The field's width, in the units of `x`. A check mark is sized to the field's width.
Width *float32 `json:"width,omitempty"`
// 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,omitempty"`
// Rotates the field clockwise by this many degrees, from -360 to 360 (negative turns it counterclockwise).
Rotation *float32 `json:"rotation,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// Text display only: the font size in points. Empty uses the template's default font size.
FontSize NullableInt32 `json:"font_size,omitempty"`
// Text display only: extra space between characters, in points. Empty uses the template's default.
CharacterSpacing *float32 `json:"character_spacing,omitempty"`
// Text display only: prints the text in bold.
Bold *bool `json:"bold,omitempty"`
// Text display only: prints the text in capital letters.
Uppercase *bool `json:"uppercase,omitempty"`
// Text display only: draws a line through the text.
Strikethrough *bool `json:"strikethrough,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// Text display only: how the text is aligned vertically in the field: `bottom`, `center` or `top`.
VAlignment *TextVerticalAlignment `json:"v_alignment,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// Shape display only, with `shape_type` `polygon`: the number of sides, 3 to 12.
ShapeSides *int32 `json:"shape_sides,omitempty"`
// Shape display only: the width of the shape's border, in points.
ShapeBorderWidth *int32 `json:"shape_border_width,omitempty"`
// Shape display only: the shape's border color, as a hex code. Null draws no border.
ShapeBorderColor *string `json:"shape_border_color,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// Shape display only: the color that fills the shape, as a hex code. Null leaves it unfilled.
ShapeFillColor NullableString `json:"shape_fill_color,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// Check display only: the character printed, as an HTML entity: `✓` (✓), `✔` (✔, the default), `✖` (✖), `✗` (✗) or `✘` (✘).
CheckCharacter *CheckCharacter `json:"check_character,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// With `number_condition_type` `range`: leaves `number_condition_range_min` itself out of the range.
NumberConditionRangeExclusiveMin *bool `json:"number_condition_range_exclusive_min,omitempty"`
// With `number_condition_type` `range`: leaves `number_condition_range_max` itself out of the range.
NumberConditionRangeExclusiveMax *bool `json:"number_condition_range_exclusive_max,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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,omitempty"`
// 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 NullableFieldDependencyInput `json:"dependencies,omitempty"`
// The field's ID. Required when updating a field. When adding one, leave it out for the next free ID.
Id *int32 `json:"id,omitempty"`
}
// NewFieldInput instantiates a new FieldInput 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 NewFieldInput() *FieldInput {
this := FieldInput{}
return &this
}
// NewFieldInputWithDefaults instantiates a new FieldInput 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 NewFieldInputWithDefaults() *FieldInput {
this := FieldInput{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *FieldInput) GetName() string {
if o == nil || IsNil(o.Name.Get()) {
var ret string
return ret
}
return *o.Name.Get()
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// 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 *FieldInput) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Name.Get(), o.Name.IsSet()
}
// HasName returns a boolean if a field has been set.
func (o *FieldInput) HasName() bool {
if o != nil && o.Name.IsSet() {
return true
}
return false
}
// SetName gets a reference to the given NullableString and assigns it to the Name field.
func (o *FieldInput) SetName(v string) {
o.Name.Set(&v)
}
// SetNameNil sets the value for Name to be an explicit nil
func (o *FieldInput) SetNameNil() {
o.Name.Set(nil)
}
// UnsetName ensures that no value is present for Name, not even an explicit nil
func (o *FieldInput) UnsetName() {
o.Name.Unset()
}
// GetPage returns the Page field value if set, zero value otherwise.
func (o *FieldInput) GetPage() int32 {
if o == nil || IsNil(o.Page) {
var ret int32
return ret
}
return *o.Page
}
// GetPageOk returns a tuple with the Page field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FieldInput) GetPageOk() (*int32, bool) {
if o == nil || IsNil(o.Page) {
return nil, false
}
return o.Page, true
}
// HasPage returns a boolean if a field has been set.
func (o *FieldInput) HasPage() bool {
if o != nil && !IsNil(o.Page) {
return true
}
return false
}
// SetPage gets a reference to the given int32 and assigns it to the Page field.
func (o *FieldInput) SetPage(v int32) {
o.Page = &v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *FieldInput) GetType() FieldType {
if o == nil || IsNil(o.Type) {
var ret FieldType
return ret
}
return *o.Type
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FieldInput) GetTypeOk() (*FieldType, bool) {
if o == nil || IsNil(o.Type) {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *FieldInput) HasType() bool {
if o != nil && !IsNil(o.Type) {
return true
}
return false
}
// SetType gets a reference to the given FieldType and assigns it to the Type field.
func (o *FieldInput) SetType(v FieldType) {
o.Type = &v
}
// GetStatic returns the Static field value if set, zero value otherwise.
func (o *FieldInput) GetStatic() bool {
if o == nil || IsNil(o.Static) {
var ret bool
return ret
}
return *o.Static
}
// GetStaticOk returns a tuple with the Static field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FieldInput) GetStaticOk() (*bool, bool) {
if o == nil || IsNil(o.Static) {
return nil, false
}
return o.Static, true
}
// HasStatic returns a boolean if a field has been set.
func (o *FieldInput) HasStatic() bool {
if o != nil && !IsNil(o.Static) {
return true
}
return false
}
// SetStatic gets a reference to the given bool and assigns it to the Static field.
func (o *FieldInput) SetStatic(v bool) {
o.Static = &v
}
// GetEditable returns the Editable field value if set, zero value otherwise.
func (o *FieldInput) GetEditable() bool {
if o == nil || IsNil(o.Editable) {
var ret bool
return ret
}
return *o.Editable
}
// GetEditableOk returns a tuple with the Editable field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FieldInput) GetEditableOk() (*bool, bool) {
if o == nil || IsNil(o.Editable) {
return nil, false
}
return o.Editable, true
}
// HasEditable returns a boolean if a field has been set.
func (o *FieldInput) HasEditable() bool {
if o != nil && !IsNil(o.Editable) {
return true
}
return false
}
// SetEditable gets a reference to the given bool and assigns it to the Editable field.
func (o *FieldInput) SetEditable(v bool) {
o.Editable = &v
}
// GetDefault returns the Default field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *FieldInput) GetDefault() string {
if o == nil || IsNil(o.Default.Get()) {
var ret string
return ret
}
return *o.Default.Get()
}
// GetDefaultOk returns a tuple with the Default field value if set, nil otherwise
// 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 *FieldInput) GetDefaultOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Default.Get(), o.Default.IsSet()
}
// HasDefault returns a boolean if a field has been set.
func (o *FieldInput) HasDefault() bool {
if o != nil && o.Default.IsSet() {
return true
}
return false
}
// SetDefault gets a reference to the given NullableString and assigns it to the Default field.
func (o *FieldInput) SetDefault(v string) {
o.Default.Set(&v)
}
// SetDefaultNil sets the value for Default to be an explicit nil
func (o *FieldInput) SetDefaultNil() {
o.Default.Set(nil)
}
// UnsetDefault ensures that no value is present for Default, not even an explicit nil
func (o *FieldInput) UnsetDefault() {
o.Default.Unset()
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *FieldInput) GetTitle() string {
if o == nil || IsNil(o.Title) {
var ret string
return ret
}
return *o.Title
}
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FieldInput) GetTitleOk() (*string, bool) {
if o == nil || IsNil(o.Title) {
return nil, false
}
return o.Title, true
}
// HasTitle returns a boolean if a field has been set.
func (o *FieldInput) HasTitle() bool {
if o != nil && !IsNil(o.Title) {
return true
}
return false
}
// SetTitle gets a reference to the given string and assigns it to the Title field.
func (o *FieldInput) SetTitle(v string) {
o.Title = &v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *FieldInput) GetDescription() string {
if o == nil || IsNil(o.Description) {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FieldInput) GetDescriptionOk() (*string, bool) {
if o == nil || IsNil(o.Description) {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *FieldInput) HasDescription() bool {
if o != nil && !IsNil(o.Description) {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *FieldInput) SetDescription(v string) {
o.Description = &v
}
// GetPlaceholder returns the Placeholder field value if set, zero value otherwise.
func (o *FieldInput) GetPlaceholder() string {
if o == nil || IsNil(o.Placeholder) {
var ret string
return ret
}
return *o.Placeholder
}
// GetPlaceholderOk returns a tuple with the Placeholder field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FieldInput) GetPlaceholderOk() (*string, bool) {
if o == nil || IsNil(o.Placeholder) {
return nil, false
}
return o.Placeholder, true
}
// HasPlaceholder returns a boolean if a field has been set.
func (o *FieldInput) HasPlaceholder() bool {
if o != nil && !IsNil(o.Placeholder) {
return true
}
return false
}
// SetPlaceholder gets a reference to the given string and assigns it to the Placeholder field.
func (o *FieldInput) SetPlaceholder(v string) {
o.Placeholder = &v
}
// GetMetadata returns the Metadata field value if set, zero value otherwise.
func (o *FieldInput) GetMetadata() string {
if o == nil || IsNil(o.Metadata) {
var ret string
return ret
}
return *o.Metadata
}
// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FieldInput) GetMetadataOk() (*string, bool) {
if o == nil || IsNil(o.Metadata) {
return nil, false
}
return o.Metadata, true
}
// HasMetadata returns a boolean if a field has been set.
func (o *FieldInput) HasMetadata() bool {
if o != nil && !IsNil(o.Metadata) {
return true
}
return false
}
// SetMetadata gets a reference to the given string and assigns it to the Metadata field.
func (o *FieldInput) SetMetadata(v string) {
o.Metadata = &v
}
// GetRequired returns the Required field value if set, zero value otherwise.
func (o *FieldInput) GetRequired() bool {
if o == nil || IsNil(o.Required) {
var ret bool
return ret
}
return *o.Required
}
// GetRequiredOk returns a tuple with the Required field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FieldInput) GetRequiredOk() (*bool, bool) {
if o == nil || IsNil(o.Required) {
return nil, false
}
return o.Required, true
}
// HasRequired returns a boolean if a field has been set.
func (o *FieldInput) HasRequired() bool {
if o != nil && !IsNil(o.Required) {
return true
}
return false
}
// SetRequired gets a reference to the given bool and assigns it to the Required field.
func (o *FieldInput) SetRequired(v bool) {
o.Required = &v
}
// GetOptionList returns the OptionList field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *FieldInput) GetOptionList() string {
if o == nil || IsNil(o.OptionList.Get()) {
var ret string
return ret
}
return *o.OptionList.Get()
}
// GetOptionListOk returns a tuple with the OptionList field value if set, nil otherwise
// 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 *FieldInput) GetOptionListOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.OptionList.Get(), o.OptionList.IsSet()
}
// HasOptionList returns a boolean if a field has been set.
func (o *FieldInput) HasOptionList() bool {
if o != nil && o.OptionList.IsSet() {
return true
}
return false
}
// SetOptionList gets a reference to the given NullableString and assigns it to the OptionList field.
func (o *FieldInput) SetOptionList(v string) {
o.OptionList.Set(&v)
}
// SetOptionListNil sets the value for OptionList to be an explicit nil
func (o *FieldInput) SetOptionListNil() {
o.OptionList.Set(nil)
}
// UnsetOptionList ensures that no value is present for OptionList, not even an explicit nil
func (o *FieldInput) UnsetOptionList() {
o.OptionList.Unset()
}
// GetCombinedFieldNames returns the CombinedFieldNames field value if set, zero value otherwise.
func (o *FieldInput) GetCombinedFieldNames() string {
if o == nil || IsNil(o.CombinedFieldNames) {
var ret string
return ret
}
return *o.CombinedFieldNames
}
// GetCombinedFieldNamesOk returns a tuple with the CombinedFieldNames field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FieldInput) GetCombinedFieldNamesOk() (*string, bool) {
if o == nil || IsNil(o.CombinedFieldNames) {
return nil, false
}
return o.CombinedFieldNames, true
}
// HasCombinedFieldNames returns a boolean if a field has been set.
func (o *FieldInput) HasCombinedFieldNames() bool {
if o != nil && !IsNil(o.CombinedFieldNames) {
return true
}
return false
}
// SetCombinedFieldNames gets a reference to the given string and assigns it to the CombinedFieldNames field.
func (o *FieldInput) SetCombinedFieldNames(v string) {
o.CombinedFieldNames = &v
}
// GetCombinedFieldType returns the CombinedFieldType field value if set, zero value otherwise.
func (o *FieldInput) GetCombinedFieldType() CombinedFieldType {
if o == nil || IsNil(o.CombinedFieldType) {
var ret CombinedFieldType
return ret
}
return *o.CombinedFieldType
}
// GetCombinedFieldTypeOk returns a tuple with the CombinedFieldType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FieldInput) GetCombinedFieldTypeOk() (*CombinedFieldType, bool) {
if o == nil || IsNil(o.CombinedFieldType) {
return nil, false
}
return o.CombinedFieldType, true
}
// HasCombinedFieldType returns a boolean if a field has been set.
func (o *FieldInput) HasCombinedFieldType() bool {
if o != nil && !IsNil(o.CombinedFieldType) {
return true
}
return false
}
// SetCombinedFieldType gets a reference to the given CombinedFieldType and assigns it to the CombinedFieldType field.
func (o *FieldInput) SetCombinedFieldType(v CombinedFieldType) {
o.CombinedFieldType = &v
}
// GetCombinedFieldSeparator returns the CombinedFieldSeparator field value if set, zero value otherwise.
func (o *FieldInput) GetCombinedFieldSeparator() string {
if o == nil || IsNil(o.CombinedFieldSeparator) {
var ret string
return ret
}
return *o.CombinedFieldSeparator
}
// GetCombinedFieldSeparatorOk returns a tuple with the CombinedFieldSeparator field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FieldInput) GetCombinedFieldSeparatorOk() (*string, bool) {
if o == nil || IsNil(o.CombinedFieldSeparator) {
return nil, false
}
return o.CombinedFieldSeparator, true
}
// HasCombinedFieldSeparator returns a boolean if a field has been set.
func (o *FieldInput) HasCombinedFieldSeparator() bool {
if o != nil && !IsNil(o.CombinedFieldSeparator) {
return true
}
return false
}
// SetCombinedFieldSeparator gets a reference to the given string and assigns it to the CombinedFieldSeparator field.
func (o *FieldInput) SetCombinedFieldSeparator(v string) {
o.CombinedFieldSeparator = &v
}
// GetCombinedFieldFormat returns the CombinedFieldFormat field value if set, zero value otherwise.
func (o *FieldInput) GetCombinedFieldFormat() string {
if o == nil || IsNil(o.CombinedFieldFormat) {
var ret string
return ret
}
return *o.CombinedFieldFormat
}
// GetCombinedFieldFormatOk returns a tuple with the CombinedFieldFormat field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FieldInput) GetCombinedFieldFormatOk() (*string, bool) {
if o == nil || IsNil(o.CombinedFieldFormat) {
return nil, false
}
return o.CombinedFieldFormat, true
}
// HasCombinedFieldFormat returns a boolean if a field has been set.
func (o *FieldInput) HasCombinedFieldFormat() bool {
if o != nil && !IsNil(o.CombinedFieldFormat) {
return true
}
return false
}
// SetCombinedFieldFormat gets a reference to the given string and assigns it to the CombinedFieldFormat field.
func (o *FieldInput) SetCombinedFieldFormat(v string) {
o.CombinedFieldFormat = &v
}
// GetInteger returns the Integer field value if set, zero value otherwise.
func (o *FieldInput) GetInteger() bool {
if o == nil || IsNil(o.Integer) {
var ret bool
return ret
}
return *o.Integer
}
// GetIntegerOk returns a tuple with the Integer field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FieldInput) GetIntegerOk() (*bool, bool) {
if o == nil || IsNil(o.Integer) {
return nil, false
}
return o.Integer, true
}
// HasInteger returns a boolean if a field has been set.
func (o *FieldInput) HasInteger() bool {
if o != nil && !IsNil(o.Integer) {
return true
}
return false
}
// SetInteger gets a reference to the given bool and assigns it to the Integer field.
func (o *FieldInput) SetInteger(v bool) {
o.Integer = &v
}
// GetMinimum returns the Minimum field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *FieldInput) GetMinimum() float32 {
if o == nil || IsNil(o.Minimum.Get()) {
var ret float32
return ret
}
return *o.Minimum.Get()
}
// GetMinimumOk returns a tuple with the Minimum field value if set, nil otherwise
// 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 *FieldInput) GetMinimumOk() (*float32, bool) {
if o == nil {
return nil, false
}
return o.Minimum.Get(), o.Minimum.IsSet()
}
// HasMinimum returns a boolean if a field has been set.
func (o *FieldInput) HasMinimum() bool {
if o != nil && o.Minimum.IsSet() {
return true
}
return false
}
// SetMinimum gets a reference to the given NullableFloat32 and assigns it to the Minimum field.
func (o *FieldInput) SetMinimum(v float32) {
o.Minimum.Set(&v)
}
// SetMinimumNil sets the value for Minimum to be an explicit nil
func (o *FieldInput) SetMinimumNil() {
o.Minimum.Set(nil)
}
// UnsetMinimum ensures that no value is present for Minimum, not even an explicit nil
func (o *FieldInput) UnsetMinimum() {
o.Minimum.Unset()
}
// GetMaximum returns the Maximum field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *FieldInput) GetMaximum() float32 {
if o == nil || IsNil(o.Maximum.Get()) {
var ret float32
return ret
}
return *o.Maximum.Get()
}
// GetMaximumOk returns a tuple with the Maximum field value if set, nil otherwise
// 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 *FieldInput) GetMaximumOk() (*float32, bool) {
if o == nil {
return nil, false
}
return o.Maximum.Get(), o.Maximum.IsSet()
}
// HasMaximum returns a boolean if a field has been set.
func (o *FieldInput) HasMaximum() bool {
if o != nil && o.Maximum.IsSet() {
return true
}
return false
}
// SetMaximum gets a reference to the given NullableFloat32 and assigns it to the Maximum field.
func (o *FieldInput) SetMaximum(v float32) {
o.Maximum.Set(&v)
}
// SetMaximumNil sets the value for Maximum to be an explicit nil
func (o *FieldInput) SetMaximumNil() {
o.Maximum.Set(nil)
}
// UnsetMaximum ensures that no value is present for Maximum, not even an explicit nil
func (o *FieldInput) UnsetMaximum() {
o.Maximum.Unset()
}
// GetExclusiveMinimum returns the ExclusiveMinimum field value if set, zero value otherwise.
func (o *FieldInput) GetExclusiveMinimum() bool {
if o == nil || IsNil(o.ExclusiveMinimum) {
var ret bool
return ret
}
return *o.ExclusiveMinimum
}
// GetExclusiveMinimumOk returns a tuple with the ExclusiveMinimum field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FieldInput) GetExclusiveMinimumOk() (*bool, bool) {
if o == nil || IsNil(o.ExclusiveMinimum) {
return nil, false
}
return o.ExclusiveMinimum, true
}
// HasExclusiveMinimum returns a boolean if a field has been set.
func (o *FieldInput) HasExclusiveMinimum() bool {
if o != nil && !IsNil(o.ExclusiveMinimum) {
return true
}
return false
}
// SetExclusiveMinimum gets a reference to the given bool and assigns it to the ExclusiveMinimum field.
func (o *FieldInput) SetExclusiveMinimum(v bool) {
o.ExclusiveMinimum = &v
}
// GetExclusiveMaximum returns the ExclusiveMaximum field value if set, zero value otherwise.
func (o *FieldInput) GetExclusiveMaximum() bool {
if o == nil || IsNil(o.ExclusiveMaximum) {
var ret bool
return ret
}
return *o.ExclusiveMaximum
}
// GetExclusiveMaximumOk returns a tuple with the ExclusiveMaximum field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FieldInput) GetExclusiveMaximumOk() (*bool, bool) {
if o == nil || IsNil(o.ExclusiveMaximum) {
return nil, false
}
return o.ExclusiveMaximum, true
}
// HasExclusiveMaximum returns a boolean if a field has been set.
func (o *FieldInput) HasExclusiveMaximum() bool {
if o != nil && !IsNil(o.ExclusiveMaximum) {
return true
}
return false
}
// SetExclusiveMaximum gets a reference to the given bool and assigns it to the ExclusiveMaximum field.
func (o *FieldInput) SetExclusiveMaximum(v bool) {
o.ExclusiveMaximum = &v
}
// GetIncludeTime returns the IncludeTime field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *FieldInput) GetIncludeTime() bool {
if o == nil || IsNil(o.IncludeTime.Get()) {
var ret bool
return ret
}
return *o.IncludeTime.Get()
}
// GetIncludeTimeOk returns a tuple with the IncludeTime field value if set, nil otherwise
// 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 *FieldInput) GetIncludeTimeOk() (*bool, bool) {
if o == nil {
return nil, false
}
return o.IncludeTime.Get(), o.IncludeTime.IsSet()
}
// HasIncludeTime returns a boolean if a field has been set.
func (o *FieldInput) HasIncludeTime() bool {
if o != nil && o.IncludeTime.IsSet() {
return true
}
return false
}
// SetIncludeTime gets a reference to the given NullableBool and assigns it to the IncludeTime field.
func (o *FieldInput) SetIncludeTime(v bool) {
o.IncludeTime.Set(&v)
}
// SetIncludeTimeNil sets the value for IncludeTime to be an explicit nil
func (o *FieldInput) SetIncludeTimeNil() {
o.IncludeTime.Set(nil)
}
// UnsetIncludeTime ensures that no value is present for IncludeTime, not even an explicit nil
func (o *FieldInput) UnsetIncludeTime() {
o.IncludeTime.Unset()
}
// GetSignatureAllowDraw returns the SignatureAllowDraw field value if set, zero value otherwise.
func (o *FieldInput) GetSignatureAllowDraw() bool {
if o == nil || IsNil(o.SignatureAllowDraw) {
var ret bool
return ret
}
return *o.SignatureAllowDraw
}
// GetSignatureAllowDrawOk returns a tuple with the SignatureAllowDraw field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FieldInput) GetSignatureAllowDrawOk() (*bool, bool) {
if o == nil || IsNil(o.SignatureAllowDraw) {
return nil, false
}
return o.SignatureAllowDraw, true