Repository navigation
Expand file tree
/
Copy pathmodel_html_engine_options_input.go
More file actions
460 lines (389 loc) · 12.8 KB
/
Copy pathmodel_html_engine_options_input.go
File metadata and controls
460 lines (389 loc) · 12.8 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
/*
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 HtmlEngineOptionsInput type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &HtmlEngineOptionsInput{}
// HtmlEngineOptionsInput How an HTML template's PDFs are printed.
type HtmlEngineOptionsInput struct {
// The paper size. `Custom` uses `width` and `height`.
Format *PageFormat `json:"format,omitempty"`
// The page width for the `Custom` format, with a unit (`8.5in`, `210mm`).
Width *string `json:"width,omitempty"`
// The page height for the `Custom` format, with a unit.
Height *string `json:"height,omitempty"`
// How much to scale the page, such as `0.8`. `1` prints it at its normal size.
Scale *float32 `json:"scale,omitempty"`
// Print pages in landscape orientation.
Landscape *bool `json:"landscape,omitempty"`
// Print background colors and images.
PrintBackground *bool `json:"print_background,omitempty"`
// The top margin, with a unit, such as `1in` or `20mm`.
MarginTop *string `json:"margin_top,omitempty"`
// The bottom margin, with a unit.
MarginBottom *string `json:"margin_bottom,omitempty"`
// The left margin, with a unit.
MarginLeft *string `json:"margin_left,omitempty"`
// The right margin, with a unit.
MarginRight *string `json:"margin_right,omitempty"`
}
// NewHtmlEngineOptionsInput instantiates a new HtmlEngineOptionsInput 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 NewHtmlEngineOptionsInput() *HtmlEngineOptionsInput {
this := HtmlEngineOptionsInput{}
return &this
}
// NewHtmlEngineOptionsInputWithDefaults instantiates a new HtmlEngineOptionsInput 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 NewHtmlEngineOptionsInputWithDefaults() *HtmlEngineOptionsInput {
this := HtmlEngineOptionsInput{}
return &this
}
// GetFormat returns the Format field value if set, zero value otherwise.
func (o *HtmlEngineOptionsInput) GetFormat() PageFormat {
if o == nil || IsNil(o.Format) {
var ret PageFormat
return ret
}
return *o.Format
}
// GetFormatOk returns a tuple with the Format field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HtmlEngineOptionsInput) GetFormatOk() (*PageFormat, bool) {
if o == nil || IsNil(o.Format) {
return nil, false
}
return o.Format, true
}
// HasFormat returns a boolean if a field has been set.
func (o *HtmlEngineOptionsInput) HasFormat() bool {
if o != nil && !IsNil(o.Format) {
return true
}
return false
}
// SetFormat gets a reference to the given PageFormat and assigns it to the Format field.
func (o *HtmlEngineOptionsInput) SetFormat(v PageFormat) {
o.Format = &v
}
// GetWidth returns the Width field value if set, zero value otherwise.
func (o *HtmlEngineOptionsInput) GetWidth() string {
if o == nil || IsNil(o.Width) {
var ret string
return ret
}
return *o.Width
}
// GetWidthOk returns a tuple with the Width field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HtmlEngineOptionsInput) GetWidthOk() (*string, bool) {
if o == nil || IsNil(o.Width) {
return nil, false
}
return o.Width, true
}
// HasWidth returns a boolean if a field has been set.
func (o *HtmlEngineOptionsInput) HasWidth() bool {
if o != nil && !IsNil(o.Width) {
return true
}
return false
}
// SetWidth gets a reference to the given string and assigns it to the Width field.
func (o *HtmlEngineOptionsInput) SetWidth(v string) {
o.Width = &v
}
// GetHeight returns the Height field value if set, zero value otherwise.
func (o *HtmlEngineOptionsInput) GetHeight() string {
if o == nil || IsNil(o.Height) {
var ret string
return ret
}
return *o.Height
}
// GetHeightOk returns a tuple with the Height field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HtmlEngineOptionsInput) GetHeightOk() (*string, bool) {
if o == nil || IsNil(o.Height) {
return nil, false
}
return o.Height, true
}
// HasHeight returns a boolean if a field has been set.
func (o *HtmlEngineOptionsInput) HasHeight() bool {
if o != nil && !IsNil(o.Height) {
return true
}
return false
}
// SetHeight gets a reference to the given string and assigns it to the Height field.
func (o *HtmlEngineOptionsInput) SetHeight(v string) {
o.Height = &v
}
// GetScale returns the Scale field value if set, zero value otherwise.
func (o *HtmlEngineOptionsInput) GetScale() float32 {
if o == nil || IsNil(o.Scale) {
var ret float32
return ret
}
return *o.Scale
}
// GetScaleOk returns a tuple with the Scale field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HtmlEngineOptionsInput) GetScaleOk() (*float32, bool) {
if o == nil || IsNil(o.Scale) {
return nil, false
}
return o.Scale, true
}
// HasScale returns a boolean if a field has been set.
func (o *HtmlEngineOptionsInput) HasScale() bool {
if o != nil && !IsNil(o.Scale) {
return true
}
return false
}
// SetScale gets a reference to the given float32 and assigns it to the Scale field.
func (o *HtmlEngineOptionsInput) SetScale(v float32) {
o.Scale = &v
}
// GetLandscape returns the Landscape field value if set, zero value otherwise.
func (o *HtmlEngineOptionsInput) GetLandscape() bool {
if o == nil || IsNil(o.Landscape) {
var ret bool
return ret
}
return *o.Landscape
}
// GetLandscapeOk returns a tuple with the Landscape field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HtmlEngineOptionsInput) GetLandscapeOk() (*bool, bool) {
if o == nil || IsNil(o.Landscape) {
return nil, false
}
return o.Landscape, true
}
// HasLandscape returns a boolean if a field has been set.
func (o *HtmlEngineOptionsInput) HasLandscape() bool {
if o != nil && !IsNil(o.Landscape) {
return true
}
return false
}
// SetLandscape gets a reference to the given bool and assigns it to the Landscape field.
func (o *HtmlEngineOptionsInput) SetLandscape(v bool) {
o.Landscape = &v
}
// GetPrintBackground returns the PrintBackground field value if set, zero value otherwise.
func (o *HtmlEngineOptionsInput) GetPrintBackground() bool {
if o == nil || IsNil(o.PrintBackground) {
var ret bool
return ret
}
return *o.PrintBackground
}
// GetPrintBackgroundOk returns a tuple with the PrintBackground field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HtmlEngineOptionsInput) GetPrintBackgroundOk() (*bool, bool) {
if o == nil || IsNil(o.PrintBackground) {
return nil, false
}
return o.PrintBackground, true
}
// HasPrintBackground returns a boolean if a field has been set.
func (o *HtmlEngineOptionsInput) HasPrintBackground() bool {
if o != nil && !IsNil(o.PrintBackground) {
return true
}
return false
}
// SetPrintBackground gets a reference to the given bool and assigns it to the PrintBackground field.
func (o *HtmlEngineOptionsInput) SetPrintBackground(v bool) {
o.PrintBackground = &v
}
// GetMarginTop returns the MarginTop field value if set, zero value otherwise.
func (o *HtmlEngineOptionsInput) GetMarginTop() string {
if o == nil || IsNil(o.MarginTop) {
var ret string
return ret
}
return *o.MarginTop
}
// GetMarginTopOk returns a tuple with the MarginTop field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HtmlEngineOptionsInput) GetMarginTopOk() (*string, bool) {
if o == nil || IsNil(o.MarginTop) {
return nil, false
}
return o.MarginTop, true
}
// HasMarginTop returns a boolean if a field has been set.
func (o *HtmlEngineOptionsInput) HasMarginTop() bool {
if o != nil && !IsNil(o.MarginTop) {
return true
}
return false
}
// SetMarginTop gets a reference to the given string and assigns it to the MarginTop field.
func (o *HtmlEngineOptionsInput) SetMarginTop(v string) {
o.MarginTop = &v
}
// GetMarginBottom returns the MarginBottom field value if set, zero value otherwise.
func (o *HtmlEngineOptionsInput) GetMarginBottom() string {
if o == nil || IsNil(o.MarginBottom) {
var ret string
return ret
}
return *o.MarginBottom
}
// GetMarginBottomOk returns a tuple with the MarginBottom field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HtmlEngineOptionsInput) GetMarginBottomOk() (*string, bool) {
if o == nil || IsNil(o.MarginBottom) {
return nil, false
}
return o.MarginBottom, true
}
// HasMarginBottom returns a boolean if a field has been set.
func (o *HtmlEngineOptionsInput) HasMarginBottom() bool {
if o != nil && !IsNil(o.MarginBottom) {
return true
}
return false
}
// SetMarginBottom gets a reference to the given string and assigns it to the MarginBottom field.
func (o *HtmlEngineOptionsInput) SetMarginBottom(v string) {
o.MarginBottom = &v
}
// GetMarginLeft returns the MarginLeft field value if set, zero value otherwise.
func (o *HtmlEngineOptionsInput) GetMarginLeft() string {
if o == nil || IsNil(o.MarginLeft) {
var ret string
return ret
}
return *o.MarginLeft
}
// GetMarginLeftOk returns a tuple with the MarginLeft field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HtmlEngineOptionsInput) GetMarginLeftOk() (*string, bool) {
if o == nil || IsNil(o.MarginLeft) {
return nil, false
}
return o.MarginLeft, true
}
// HasMarginLeft returns a boolean if a field has been set.
func (o *HtmlEngineOptionsInput) HasMarginLeft() bool {
if o != nil && !IsNil(o.MarginLeft) {
return true
}
return false
}
// SetMarginLeft gets a reference to the given string and assigns it to the MarginLeft field.
func (o *HtmlEngineOptionsInput) SetMarginLeft(v string) {
o.MarginLeft = &v
}
// GetMarginRight returns the MarginRight field value if set, zero value otherwise.
func (o *HtmlEngineOptionsInput) GetMarginRight() string {
if o == nil || IsNil(o.MarginRight) {
var ret string
return ret
}
return *o.MarginRight
}
// GetMarginRightOk returns a tuple with the MarginRight field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HtmlEngineOptionsInput) GetMarginRightOk() (*string, bool) {
if o == nil || IsNil(o.MarginRight) {
return nil, false
}
return o.MarginRight, true
}
// HasMarginRight returns a boolean if a field has been set.
func (o *HtmlEngineOptionsInput) HasMarginRight() bool {
if o != nil && !IsNil(o.MarginRight) {
return true
}
return false
}
// SetMarginRight gets a reference to the given string and assigns it to the MarginRight field.
func (o *HtmlEngineOptionsInput) SetMarginRight(v string) {
o.MarginRight = &v
}
func (o HtmlEngineOptionsInput) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o HtmlEngineOptionsInput) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Format) {
toSerialize["format"] = o.Format
}
if !IsNil(o.Width) {
toSerialize["width"] = o.Width
}
if !IsNil(o.Height) {
toSerialize["height"] = o.Height
}
if !IsNil(o.Scale) {
toSerialize["scale"] = o.Scale
}
if !IsNil(o.Landscape) {
toSerialize["landscape"] = o.Landscape
}
if !IsNil(o.PrintBackground) {
toSerialize["print_background"] = o.PrintBackground
}
if !IsNil(o.MarginTop) {
toSerialize["margin_top"] = o.MarginTop
}
if !IsNil(o.MarginBottom) {
toSerialize["margin_bottom"] = o.MarginBottom
}
if !IsNil(o.MarginLeft) {
toSerialize["margin_left"] = o.MarginLeft
}
if !IsNil(o.MarginRight) {
toSerialize["margin_right"] = o.MarginRight
}
return toSerialize, nil
}
type NullableHtmlEngineOptionsInput struct {
value *HtmlEngineOptionsInput
isSet bool
}
func (v NullableHtmlEngineOptionsInput) Get() *HtmlEngineOptionsInput {
return v.value
}
func (v *NullableHtmlEngineOptionsInput) Set(val *HtmlEngineOptionsInput) {
v.value = val
v.isSet = true
}
func (v NullableHtmlEngineOptionsInput) IsSet() bool {
return v.isSet
}
func (v *NullableHtmlEngineOptionsInput) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableHtmlEngineOptionsInput(val *HtmlEngineOptionsInput) *NullableHtmlEngineOptionsInput {
return &NullableHtmlEngineOptionsInput{value: val, isSet: true}
}
func (v NullableHtmlEngineOptionsInput) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableHtmlEngineOptionsInput) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}