/
model_form_view_create_view.go
671 lines (571 loc) · 19.5 KB
/
model_form_view_create_view.go
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
/*
Baserow API spec
For more information about our REST API, please visit [this page](https://baserow.io/docs/apis%2Frest-api). For more information about our deprecation policy, please visit [this page](https://baserow.io/docs/apis%2Fdeprecations).
API version: 1.18.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package client
import (
"encoding/json"
)
// checks if the FormViewCreateView type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &FormViewCreateView{}
// FormViewCreateView struct for FormViewCreateView
type FormViewCreateView struct {
Name string `json:"name"`
Type ViewTypesEnum `json:"type"`
OwnershipType *OwnershipTypeEnum `json:"ownership_type,omitempty"`
FilterType *ConditionTypeEnum `json:"filter_type,omitempty"`
// Allows users to see results unfiltered while still keeping the filters saved for the view.
FiltersDisabled *bool `json:"filters_disabled,omitempty"`
// The title that is displayed at the beginning of the form.
Title *string `json:"title,omitempty"`
// The description that is displayed at the beginning of the form.
Description *string `json:"description,omitempty"`
Mode *ModeEnum `json:"mode,omitempty"`
CoverImage NullableFormViewCreateViewCoverImage `json:"cover_image,omitempty"`
LogoImage NullableFormViewCreateViewLogoImage `json:"logo_image,omitempty"`
// The text displayed on the submit button.
SubmitText *string `json:"submit_text,omitempty"`
SubmitAction *SubmitActionEnum `json:"submit_action,omitempty"`
// If the `submit_action` is MESSAGE, then this message will be shown to the visitor after submitting the form.
SubmitActionMessage *string `json:"submit_action_message,omitempty"`
// If the `submit_action` is REDIRECT,then the visitors will be redirected to the this URL after submitting the form.
SubmitActionRedirectUrl *string `json:"submit_action_redirect_url,omitempty"`
// Indicates whether the view is publicly accessible to visitors.
Public *bool `json:"public,omitempty"`
// The unique slug that can be used to construct a public URL.
Slug string `json:"slug"`
}
// NewFormViewCreateView instantiates a new FormViewCreateView 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 NewFormViewCreateView(name string, type_ ViewTypesEnum, slug string) *FormViewCreateView {
this := FormViewCreateView{}
this.Name = name
this.Type = type_
var ownershipType OwnershipTypeEnum = COLLABORATIVE
this.OwnershipType = &ownershipType
this.Slug = slug
return &this
}
// NewFormViewCreateViewWithDefaults instantiates a new FormViewCreateView 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 NewFormViewCreateViewWithDefaults() *FormViewCreateView {
this := FormViewCreateView{}
var ownershipType OwnershipTypeEnum = COLLABORATIVE
this.OwnershipType = &ownershipType
return &this
}
// GetName returns the Name field value
func (o *FormViewCreateView) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *FormViewCreateView) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *FormViewCreateView) SetName(v string) {
o.Name = v
}
// GetType returns the Type field value
func (o *FormViewCreateView) GetType() ViewTypesEnum {
if o == nil {
var ret ViewTypesEnum
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 *FormViewCreateView) GetTypeOk() (*ViewTypesEnum, bool) {
if o == nil {
return nil, false
}
return &o.Type, true
}
// SetType sets field value
func (o *FormViewCreateView) SetType(v ViewTypesEnum) {
o.Type = v
}
// GetOwnershipType returns the OwnershipType field value if set, zero value otherwise.
func (o *FormViewCreateView) GetOwnershipType() OwnershipTypeEnum {
if o == nil || IsNil(o.OwnershipType) {
var ret OwnershipTypeEnum
return ret
}
return *o.OwnershipType
}
// GetOwnershipTypeOk returns a tuple with the OwnershipType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormViewCreateView) GetOwnershipTypeOk() (*OwnershipTypeEnum, bool) {
if o == nil || IsNil(o.OwnershipType) {
return nil, false
}
return o.OwnershipType, true
}
// HasOwnershipType returns a boolean if a field has been set.
func (o *FormViewCreateView) HasOwnershipType() bool {
if o != nil && !IsNil(o.OwnershipType) {
return true
}
return false
}
// SetOwnershipType gets a reference to the given OwnershipTypeEnum and assigns it to the OwnershipType field.
func (o *FormViewCreateView) SetOwnershipType(v OwnershipTypeEnum) {
o.OwnershipType = &v
}
// GetFilterType returns the FilterType field value if set, zero value otherwise.
func (o *FormViewCreateView) GetFilterType() ConditionTypeEnum {
if o == nil || IsNil(o.FilterType) {
var ret ConditionTypeEnum
return ret
}
return *o.FilterType
}
// GetFilterTypeOk returns a tuple with the FilterType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormViewCreateView) GetFilterTypeOk() (*ConditionTypeEnum, bool) {
if o == nil || IsNil(o.FilterType) {
return nil, false
}
return o.FilterType, true
}
// HasFilterType returns a boolean if a field has been set.
func (o *FormViewCreateView) HasFilterType() bool {
if o != nil && !IsNil(o.FilterType) {
return true
}
return false
}
// SetFilterType gets a reference to the given ConditionTypeEnum and assigns it to the FilterType field.
func (o *FormViewCreateView) SetFilterType(v ConditionTypeEnum) {
o.FilterType = &v
}
// GetFiltersDisabled returns the FiltersDisabled field value if set, zero value otherwise.
func (o *FormViewCreateView) GetFiltersDisabled() bool {
if o == nil || IsNil(o.FiltersDisabled) {
var ret bool
return ret
}
return *o.FiltersDisabled
}
// GetFiltersDisabledOk returns a tuple with the FiltersDisabled field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormViewCreateView) GetFiltersDisabledOk() (*bool, bool) {
if o == nil || IsNil(o.FiltersDisabled) {
return nil, false
}
return o.FiltersDisabled, true
}
// HasFiltersDisabled returns a boolean if a field has been set.
func (o *FormViewCreateView) HasFiltersDisabled() bool {
if o != nil && !IsNil(o.FiltersDisabled) {
return true
}
return false
}
// SetFiltersDisabled gets a reference to the given bool and assigns it to the FiltersDisabled field.
func (o *FormViewCreateView) SetFiltersDisabled(v bool) {
o.FiltersDisabled = &v
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *FormViewCreateView) 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 *FormViewCreateView) 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 *FormViewCreateView) 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 *FormViewCreateView) SetTitle(v string) {
o.Title = &v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *FormViewCreateView) 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 *FormViewCreateView) 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 *FormViewCreateView) 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 *FormViewCreateView) SetDescription(v string) {
o.Description = &v
}
// GetMode returns the Mode field value if set, zero value otherwise.
func (o *FormViewCreateView) GetMode() ModeEnum {
if o == nil || IsNil(o.Mode) {
var ret ModeEnum
return ret
}
return *o.Mode
}
// GetModeOk returns a tuple with the Mode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormViewCreateView) GetModeOk() (*ModeEnum, bool) {
if o == nil || IsNil(o.Mode) {
return nil, false
}
return o.Mode, true
}
// HasMode returns a boolean if a field has been set.
func (o *FormViewCreateView) HasMode() bool {
if o != nil && !IsNil(o.Mode) {
return true
}
return false
}
// SetMode gets a reference to the given ModeEnum and assigns it to the Mode field.
func (o *FormViewCreateView) SetMode(v ModeEnum) {
o.Mode = &v
}
// GetCoverImage returns the CoverImage field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *FormViewCreateView) GetCoverImage() FormViewCreateViewCoverImage {
if o == nil || IsNil(o.CoverImage.Get()) {
var ret FormViewCreateViewCoverImage
return ret
}
return *o.CoverImage.Get()
}
// GetCoverImageOk returns a tuple with the CoverImage 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 *FormViewCreateView) GetCoverImageOk() (*FormViewCreateViewCoverImage, bool) {
if o == nil {
return nil, false
}
return o.CoverImage.Get(), o.CoverImage.IsSet()
}
// HasCoverImage returns a boolean if a field has been set.
func (o *FormViewCreateView) HasCoverImage() bool {
if o != nil && o.CoverImage.IsSet() {
return true
}
return false
}
// SetCoverImage gets a reference to the given NullableFormViewCreateViewCoverImage and assigns it to the CoverImage field.
func (o *FormViewCreateView) SetCoverImage(v FormViewCreateViewCoverImage) {
o.CoverImage.Set(&v)
}
// SetCoverImageNil sets the value for CoverImage to be an explicit nil
func (o *FormViewCreateView) SetCoverImageNil() {
o.CoverImage.Set(nil)
}
// UnsetCoverImage ensures that no value is present for CoverImage, not even an explicit nil
func (o *FormViewCreateView) UnsetCoverImage() {
o.CoverImage.Unset()
}
// GetLogoImage returns the LogoImage field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *FormViewCreateView) GetLogoImage() FormViewCreateViewLogoImage {
if o == nil || IsNil(o.LogoImage.Get()) {
var ret FormViewCreateViewLogoImage
return ret
}
return *o.LogoImage.Get()
}
// GetLogoImageOk returns a tuple with the LogoImage 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 *FormViewCreateView) GetLogoImageOk() (*FormViewCreateViewLogoImage, bool) {
if o == nil {
return nil, false
}
return o.LogoImage.Get(), o.LogoImage.IsSet()
}
// HasLogoImage returns a boolean if a field has been set.
func (o *FormViewCreateView) HasLogoImage() bool {
if o != nil && o.LogoImage.IsSet() {
return true
}
return false
}
// SetLogoImage gets a reference to the given NullableFormViewCreateViewLogoImage and assigns it to the LogoImage field.
func (o *FormViewCreateView) SetLogoImage(v FormViewCreateViewLogoImage) {
o.LogoImage.Set(&v)
}
// SetLogoImageNil sets the value for LogoImage to be an explicit nil
func (o *FormViewCreateView) SetLogoImageNil() {
o.LogoImage.Set(nil)
}
// UnsetLogoImage ensures that no value is present for LogoImage, not even an explicit nil
func (o *FormViewCreateView) UnsetLogoImage() {
o.LogoImage.Unset()
}
// GetSubmitText returns the SubmitText field value if set, zero value otherwise.
func (o *FormViewCreateView) GetSubmitText() string {
if o == nil || IsNil(o.SubmitText) {
var ret string
return ret
}
return *o.SubmitText
}
// GetSubmitTextOk returns a tuple with the SubmitText field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormViewCreateView) GetSubmitTextOk() (*string, bool) {
if o == nil || IsNil(o.SubmitText) {
return nil, false
}
return o.SubmitText, true
}
// HasSubmitText returns a boolean if a field has been set.
func (o *FormViewCreateView) HasSubmitText() bool {
if o != nil && !IsNil(o.SubmitText) {
return true
}
return false
}
// SetSubmitText gets a reference to the given string and assigns it to the SubmitText field.
func (o *FormViewCreateView) SetSubmitText(v string) {
o.SubmitText = &v
}
// GetSubmitAction returns the SubmitAction field value if set, zero value otherwise.
func (o *FormViewCreateView) GetSubmitAction() SubmitActionEnum {
if o == nil || IsNil(o.SubmitAction) {
var ret SubmitActionEnum
return ret
}
return *o.SubmitAction
}
// GetSubmitActionOk returns a tuple with the SubmitAction field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormViewCreateView) GetSubmitActionOk() (*SubmitActionEnum, bool) {
if o == nil || IsNil(o.SubmitAction) {
return nil, false
}
return o.SubmitAction, true
}
// HasSubmitAction returns a boolean if a field has been set.
func (o *FormViewCreateView) HasSubmitAction() bool {
if o != nil && !IsNil(o.SubmitAction) {
return true
}
return false
}
// SetSubmitAction gets a reference to the given SubmitActionEnum and assigns it to the SubmitAction field.
func (o *FormViewCreateView) SetSubmitAction(v SubmitActionEnum) {
o.SubmitAction = &v
}
// GetSubmitActionMessage returns the SubmitActionMessage field value if set, zero value otherwise.
func (o *FormViewCreateView) GetSubmitActionMessage() string {
if o == nil || IsNil(o.SubmitActionMessage) {
var ret string
return ret
}
return *o.SubmitActionMessage
}
// GetSubmitActionMessageOk returns a tuple with the SubmitActionMessage field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormViewCreateView) GetSubmitActionMessageOk() (*string, bool) {
if o == nil || IsNil(o.SubmitActionMessage) {
return nil, false
}
return o.SubmitActionMessage, true
}
// HasSubmitActionMessage returns a boolean if a field has been set.
func (o *FormViewCreateView) HasSubmitActionMessage() bool {
if o != nil && !IsNil(o.SubmitActionMessage) {
return true
}
return false
}
// SetSubmitActionMessage gets a reference to the given string and assigns it to the SubmitActionMessage field.
func (o *FormViewCreateView) SetSubmitActionMessage(v string) {
o.SubmitActionMessage = &v
}
// GetSubmitActionRedirectUrl returns the SubmitActionRedirectUrl field value if set, zero value otherwise.
func (o *FormViewCreateView) GetSubmitActionRedirectUrl() string {
if o == nil || IsNil(o.SubmitActionRedirectUrl) {
var ret string
return ret
}
return *o.SubmitActionRedirectUrl
}
// GetSubmitActionRedirectUrlOk returns a tuple with the SubmitActionRedirectUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormViewCreateView) GetSubmitActionRedirectUrlOk() (*string, bool) {
if o == nil || IsNil(o.SubmitActionRedirectUrl) {
return nil, false
}
return o.SubmitActionRedirectUrl, true
}
// HasSubmitActionRedirectUrl returns a boolean if a field has been set.
func (o *FormViewCreateView) HasSubmitActionRedirectUrl() bool {
if o != nil && !IsNil(o.SubmitActionRedirectUrl) {
return true
}
return false
}
// SetSubmitActionRedirectUrl gets a reference to the given string and assigns it to the SubmitActionRedirectUrl field.
func (o *FormViewCreateView) SetSubmitActionRedirectUrl(v string) {
o.SubmitActionRedirectUrl = &v
}
// GetPublic returns the Public field value if set, zero value otherwise.
func (o *FormViewCreateView) GetPublic() bool {
if o == nil || IsNil(o.Public) {
var ret bool
return ret
}
return *o.Public
}
// GetPublicOk returns a tuple with the Public field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormViewCreateView) GetPublicOk() (*bool, bool) {
if o == nil || IsNil(o.Public) {
return nil, false
}
return o.Public, true
}
// HasPublic returns a boolean if a field has been set.
func (o *FormViewCreateView) HasPublic() bool {
if o != nil && !IsNil(o.Public) {
return true
}
return false
}
// SetPublic gets a reference to the given bool and assigns it to the Public field.
func (o *FormViewCreateView) SetPublic(v bool) {
o.Public = &v
}
// GetSlug returns the Slug field value
func (o *FormViewCreateView) GetSlug() string {
if o == nil {
var ret string
return ret
}
return o.Slug
}
// GetSlugOk returns a tuple with the Slug field value
// and a boolean to check if the value has been set.
func (o *FormViewCreateView) GetSlugOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Slug, true
}
// SetSlug sets field value
func (o *FormViewCreateView) SetSlug(v string) {
o.Slug = v
}
func (o FormViewCreateView) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o FormViewCreateView) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["name"] = o.Name
toSerialize["type"] = o.Type
if !IsNil(o.OwnershipType) {
toSerialize["ownership_type"] = o.OwnershipType
}
if !IsNil(o.FilterType) {
toSerialize["filter_type"] = o.FilterType
}
if !IsNil(o.FiltersDisabled) {
toSerialize["filters_disabled"] = o.FiltersDisabled
}
if !IsNil(o.Title) {
toSerialize["title"] = o.Title
}
if !IsNil(o.Description) {
toSerialize["description"] = o.Description
}
if !IsNil(o.Mode) {
toSerialize["mode"] = o.Mode
}
if o.CoverImage.IsSet() {
toSerialize["cover_image"] = o.CoverImage.Get()
}
if o.LogoImage.IsSet() {
toSerialize["logo_image"] = o.LogoImage.Get()
}
if !IsNil(o.SubmitText) {
toSerialize["submit_text"] = o.SubmitText
}
if !IsNil(o.SubmitAction) {
toSerialize["submit_action"] = o.SubmitAction
}
if !IsNil(o.SubmitActionMessage) {
toSerialize["submit_action_message"] = o.SubmitActionMessage
}
if !IsNil(o.SubmitActionRedirectUrl) {
toSerialize["submit_action_redirect_url"] = o.SubmitActionRedirectUrl
}
if !IsNil(o.Public) {
toSerialize["public"] = o.Public
}
// skip: slug is readOnly
return toSerialize, nil
}
type NullableFormViewCreateView struct {
value *FormViewCreateView
isSet bool
}
func (v NullableFormViewCreateView) Get() *FormViewCreateView {
return v.value
}
func (v *NullableFormViewCreateView) Set(val *FormViewCreateView) {
v.value = val
v.isSet = true
}
func (v NullableFormViewCreateView) IsSet() bool {
return v.isSet
}
func (v *NullableFormViewCreateView) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFormViewCreateView(val *FormViewCreateView) *NullableFormViewCreateView {
return &NullableFormViewCreateView{value: val, isSet: true}
}
func (v NullableFormViewCreateView) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFormViewCreateView) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}