/
model_type_formula_result.go
551 lines (469 loc) · 17.9 KB
/
model_type_formula_result.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
/*
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 TypeFormulaResult type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TypeFormulaResult{}
// TypeFormulaResult struct for TypeFormulaResult
type TypeFormulaResult struct {
// Indicates if the time zone should be shown.
DateShowTzinfo NullableBool `json:"date_show_tzinfo,omitempty"`
DateFormat NullableCountFieldCreateFieldDateFormat `json:"date_format,omitempty"`
ArrayFormulaType NullableCountFieldCreateFieldArrayFormulaType `json:"array_formula_type,omitempty"`
// Force a timezone for the field overriding user profile settings.
DateForceTimezone NullableString `json:"date_force_timezone,omitempty"`
// Indicates if the field also includes a time.
DateIncludeTime NullableBool `json:"date_include_time,omitempty"`
Nullable bool `json:"nullable"`
DateTimeFormat NullableCountFieldCreateFieldDateTimeFormat `json:"date_time_format,omitempty"`
NumberDecimalPlaces NullableCountFieldCreateFieldNumberDecimalPlaces `json:"number_decimal_places,omitempty"`
Error NullableString `json:"error,omitempty"`
Formula string `json:"formula"`
FormulaType *FormulaTypeEnum `json:"formula_type,omitempty"`
}
// NewTypeFormulaResult instantiates a new TypeFormulaResult 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 NewTypeFormulaResult(nullable bool, formula string) *TypeFormulaResult {
this := TypeFormulaResult{}
this.Nullable = nullable
this.Formula = formula
return &this
}
// NewTypeFormulaResultWithDefaults instantiates a new TypeFormulaResult 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 NewTypeFormulaResultWithDefaults() *TypeFormulaResult {
this := TypeFormulaResult{}
return &this
}
// GetDateShowTzinfo returns the DateShowTzinfo field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *TypeFormulaResult) GetDateShowTzinfo() bool {
if o == nil || IsNil(o.DateShowTzinfo.Get()) {
var ret bool
return ret
}
return *o.DateShowTzinfo.Get()
}
// GetDateShowTzinfoOk returns a tuple with the DateShowTzinfo 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 *TypeFormulaResult) GetDateShowTzinfoOk() (*bool, bool) {
if o == nil {
return nil, false
}
return o.DateShowTzinfo.Get(), o.DateShowTzinfo.IsSet()
}
// HasDateShowTzinfo returns a boolean if a field has been set.
func (o *TypeFormulaResult) HasDateShowTzinfo() bool {
if o != nil && o.DateShowTzinfo.IsSet() {
return true
}
return false
}
// SetDateShowTzinfo gets a reference to the given NullableBool and assigns it to the DateShowTzinfo field.
func (o *TypeFormulaResult) SetDateShowTzinfo(v bool) {
o.DateShowTzinfo.Set(&v)
}
// SetDateShowTzinfoNil sets the value for DateShowTzinfo to be an explicit nil
func (o *TypeFormulaResult) SetDateShowTzinfoNil() {
o.DateShowTzinfo.Set(nil)
}
// UnsetDateShowTzinfo ensures that no value is present for DateShowTzinfo, not even an explicit nil
func (o *TypeFormulaResult) UnsetDateShowTzinfo() {
o.DateShowTzinfo.Unset()
}
// GetDateFormat returns the DateFormat field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *TypeFormulaResult) GetDateFormat() CountFieldCreateFieldDateFormat {
if o == nil || IsNil(o.DateFormat.Get()) {
var ret CountFieldCreateFieldDateFormat
return ret
}
return *o.DateFormat.Get()
}
// GetDateFormatOk returns a tuple with the DateFormat 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 *TypeFormulaResult) GetDateFormatOk() (*CountFieldCreateFieldDateFormat, bool) {
if o == nil {
return nil, false
}
return o.DateFormat.Get(), o.DateFormat.IsSet()
}
// HasDateFormat returns a boolean if a field has been set.
func (o *TypeFormulaResult) HasDateFormat() bool {
if o != nil && o.DateFormat.IsSet() {
return true
}
return false
}
// SetDateFormat gets a reference to the given NullableCountFieldCreateFieldDateFormat and assigns it to the DateFormat field.
func (o *TypeFormulaResult) SetDateFormat(v CountFieldCreateFieldDateFormat) {
o.DateFormat.Set(&v)
}
// SetDateFormatNil sets the value for DateFormat to be an explicit nil
func (o *TypeFormulaResult) SetDateFormatNil() {
o.DateFormat.Set(nil)
}
// UnsetDateFormat ensures that no value is present for DateFormat, not even an explicit nil
func (o *TypeFormulaResult) UnsetDateFormat() {
o.DateFormat.Unset()
}
// GetArrayFormulaType returns the ArrayFormulaType field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *TypeFormulaResult) GetArrayFormulaType() CountFieldCreateFieldArrayFormulaType {
if o == nil || IsNil(o.ArrayFormulaType.Get()) {
var ret CountFieldCreateFieldArrayFormulaType
return ret
}
return *o.ArrayFormulaType.Get()
}
// GetArrayFormulaTypeOk returns a tuple with the ArrayFormulaType 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 *TypeFormulaResult) GetArrayFormulaTypeOk() (*CountFieldCreateFieldArrayFormulaType, bool) {
if o == nil {
return nil, false
}
return o.ArrayFormulaType.Get(), o.ArrayFormulaType.IsSet()
}
// HasArrayFormulaType returns a boolean if a field has been set.
func (o *TypeFormulaResult) HasArrayFormulaType() bool {
if o != nil && o.ArrayFormulaType.IsSet() {
return true
}
return false
}
// SetArrayFormulaType gets a reference to the given NullableCountFieldCreateFieldArrayFormulaType and assigns it to the ArrayFormulaType field.
func (o *TypeFormulaResult) SetArrayFormulaType(v CountFieldCreateFieldArrayFormulaType) {
o.ArrayFormulaType.Set(&v)
}
// SetArrayFormulaTypeNil sets the value for ArrayFormulaType to be an explicit nil
func (o *TypeFormulaResult) SetArrayFormulaTypeNil() {
o.ArrayFormulaType.Set(nil)
}
// UnsetArrayFormulaType ensures that no value is present for ArrayFormulaType, not even an explicit nil
func (o *TypeFormulaResult) UnsetArrayFormulaType() {
o.ArrayFormulaType.Unset()
}
// GetDateForceTimezone returns the DateForceTimezone field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *TypeFormulaResult) GetDateForceTimezone() string {
if o == nil || IsNil(o.DateForceTimezone.Get()) {
var ret string
return ret
}
return *o.DateForceTimezone.Get()
}
// GetDateForceTimezoneOk returns a tuple with the DateForceTimezone 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 *TypeFormulaResult) GetDateForceTimezoneOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.DateForceTimezone.Get(), o.DateForceTimezone.IsSet()
}
// HasDateForceTimezone returns a boolean if a field has been set.
func (o *TypeFormulaResult) HasDateForceTimezone() bool {
if o != nil && o.DateForceTimezone.IsSet() {
return true
}
return false
}
// SetDateForceTimezone gets a reference to the given NullableString and assigns it to the DateForceTimezone field.
func (o *TypeFormulaResult) SetDateForceTimezone(v string) {
o.DateForceTimezone.Set(&v)
}
// SetDateForceTimezoneNil sets the value for DateForceTimezone to be an explicit nil
func (o *TypeFormulaResult) SetDateForceTimezoneNil() {
o.DateForceTimezone.Set(nil)
}
// UnsetDateForceTimezone ensures that no value is present for DateForceTimezone, not even an explicit nil
func (o *TypeFormulaResult) UnsetDateForceTimezone() {
o.DateForceTimezone.Unset()
}
// GetDateIncludeTime returns the DateIncludeTime field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *TypeFormulaResult) GetDateIncludeTime() bool {
if o == nil || IsNil(o.DateIncludeTime.Get()) {
var ret bool
return ret
}
return *o.DateIncludeTime.Get()
}
// GetDateIncludeTimeOk returns a tuple with the DateIncludeTime 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 *TypeFormulaResult) GetDateIncludeTimeOk() (*bool, bool) {
if o == nil {
return nil, false
}
return o.DateIncludeTime.Get(), o.DateIncludeTime.IsSet()
}
// HasDateIncludeTime returns a boolean if a field has been set.
func (o *TypeFormulaResult) HasDateIncludeTime() bool {
if o != nil && o.DateIncludeTime.IsSet() {
return true
}
return false
}
// SetDateIncludeTime gets a reference to the given NullableBool and assigns it to the DateIncludeTime field.
func (o *TypeFormulaResult) SetDateIncludeTime(v bool) {
o.DateIncludeTime.Set(&v)
}
// SetDateIncludeTimeNil sets the value for DateIncludeTime to be an explicit nil
func (o *TypeFormulaResult) SetDateIncludeTimeNil() {
o.DateIncludeTime.Set(nil)
}
// UnsetDateIncludeTime ensures that no value is present for DateIncludeTime, not even an explicit nil
func (o *TypeFormulaResult) UnsetDateIncludeTime() {
o.DateIncludeTime.Unset()
}
// GetNullable returns the Nullable field value
func (o *TypeFormulaResult) GetNullable() bool {
if o == nil {
var ret bool
return ret
}
return o.Nullable
}
// GetNullableOk returns a tuple with the Nullable field value
// and a boolean to check if the value has been set.
func (o *TypeFormulaResult) GetNullableOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Nullable, true
}
// SetNullable sets field value
func (o *TypeFormulaResult) SetNullable(v bool) {
o.Nullable = v
}
// GetDateTimeFormat returns the DateTimeFormat field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *TypeFormulaResult) GetDateTimeFormat() CountFieldCreateFieldDateTimeFormat {
if o == nil || IsNil(o.DateTimeFormat.Get()) {
var ret CountFieldCreateFieldDateTimeFormat
return ret
}
return *o.DateTimeFormat.Get()
}
// GetDateTimeFormatOk returns a tuple with the DateTimeFormat 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 *TypeFormulaResult) GetDateTimeFormatOk() (*CountFieldCreateFieldDateTimeFormat, bool) {
if o == nil {
return nil, false
}
return o.DateTimeFormat.Get(), o.DateTimeFormat.IsSet()
}
// HasDateTimeFormat returns a boolean if a field has been set.
func (o *TypeFormulaResult) HasDateTimeFormat() bool {
if o != nil && o.DateTimeFormat.IsSet() {
return true
}
return false
}
// SetDateTimeFormat gets a reference to the given NullableCountFieldCreateFieldDateTimeFormat and assigns it to the DateTimeFormat field.
func (o *TypeFormulaResult) SetDateTimeFormat(v CountFieldCreateFieldDateTimeFormat) {
o.DateTimeFormat.Set(&v)
}
// SetDateTimeFormatNil sets the value for DateTimeFormat to be an explicit nil
func (o *TypeFormulaResult) SetDateTimeFormatNil() {
o.DateTimeFormat.Set(nil)
}
// UnsetDateTimeFormat ensures that no value is present for DateTimeFormat, not even an explicit nil
func (o *TypeFormulaResult) UnsetDateTimeFormat() {
o.DateTimeFormat.Unset()
}
// GetNumberDecimalPlaces returns the NumberDecimalPlaces field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *TypeFormulaResult) GetNumberDecimalPlaces() CountFieldCreateFieldNumberDecimalPlaces {
if o == nil || IsNil(o.NumberDecimalPlaces.Get()) {
var ret CountFieldCreateFieldNumberDecimalPlaces
return ret
}
return *o.NumberDecimalPlaces.Get()
}
// GetNumberDecimalPlacesOk returns a tuple with the NumberDecimalPlaces 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 *TypeFormulaResult) GetNumberDecimalPlacesOk() (*CountFieldCreateFieldNumberDecimalPlaces, bool) {
if o == nil {
return nil, false
}
return o.NumberDecimalPlaces.Get(), o.NumberDecimalPlaces.IsSet()
}
// HasNumberDecimalPlaces returns a boolean if a field has been set.
func (o *TypeFormulaResult) HasNumberDecimalPlaces() bool {
if o != nil && o.NumberDecimalPlaces.IsSet() {
return true
}
return false
}
// SetNumberDecimalPlaces gets a reference to the given NullableCountFieldCreateFieldNumberDecimalPlaces and assigns it to the NumberDecimalPlaces field.
func (o *TypeFormulaResult) SetNumberDecimalPlaces(v CountFieldCreateFieldNumberDecimalPlaces) {
o.NumberDecimalPlaces.Set(&v)
}
// SetNumberDecimalPlacesNil sets the value for NumberDecimalPlaces to be an explicit nil
func (o *TypeFormulaResult) SetNumberDecimalPlacesNil() {
o.NumberDecimalPlaces.Set(nil)
}
// UnsetNumberDecimalPlaces ensures that no value is present for NumberDecimalPlaces, not even an explicit nil
func (o *TypeFormulaResult) UnsetNumberDecimalPlaces() {
o.NumberDecimalPlaces.Unset()
}
// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *TypeFormulaResult) GetError() string {
if o == nil || IsNil(o.Error.Get()) {
var ret string
return ret
}
return *o.Error.Get()
}
// GetErrorOk returns a tuple with the Error 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 *TypeFormulaResult) GetErrorOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Error.Get(), o.Error.IsSet()
}
// HasError returns a boolean if a field has been set.
func (o *TypeFormulaResult) HasError() bool {
if o != nil && o.Error.IsSet() {
return true
}
return false
}
// SetError gets a reference to the given NullableString and assigns it to the Error field.
func (o *TypeFormulaResult) SetError(v string) {
o.Error.Set(&v)
}
// SetErrorNil sets the value for Error to be an explicit nil
func (o *TypeFormulaResult) SetErrorNil() {
o.Error.Set(nil)
}
// UnsetError ensures that no value is present for Error, not even an explicit nil
func (o *TypeFormulaResult) UnsetError() {
o.Error.Unset()
}
// GetFormula returns the Formula field value
func (o *TypeFormulaResult) GetFormula() string {
if o == nil {
var ret string
return ret
}
return o.Formula
}
// GetFormulaOk returns a tuple with the Formula field value
// and a boolean to check if the value has been set.
func (o *TypeFormulaResult) GetFormulaOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Formula, true
}
// SetFormula sets field value
func (o *TypeFormulaResult) SetFormula(v string) {
o.Formula = v
}
// GetFormulaType returns the FormulaType field value if set, zero value otherwise.
func (o *TypeFormulaResult) GetFormulaType() FormulaTypeEnum {
if o == nil || IsNil(o.FormulaType) {
var ret FormulaTypeEnum
return ret
}
return *o.FormulaType
}
// GetFormulaTypeOk returns a tuple with the FormulaType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TypeFormulaResult) GetFormulaTypeOk() (*FormulaTypeEnum, bool) {
if o == nil || IsNil(o.FormulaType) {
return nil, false
}
return o.FormulaType, true
}
// HasFormulaType returns a boolean if a field has been set.
func (o *TypeFormulaResult) HasFormulaType() bool {
if o != nil && !IsNil(o.FormulaType) {
return true
}
return false
}
// SetFormulaType gets a reference to the given FormulaTypeEnum and assigns it to the FormulaType field.
func (o *TypeFormulaResult) SetFormulaType(v FormulaTypeEnum) {
o.FormulaType = &v
}
func (o TypeFormulaResult) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TypeFormulaResult) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.DateShowTzinfo.IsSet() {
toSerialize["date_show_tzinfo"] = o.DateShowTzinfo.Get()
}
if o.DateFormat.IsSet() {
toSerialize["date_format"] = o.DateFormat.Get()
}
if o.ArrayFormulaType.IsSet() {
toSerialize["array_formula_type"] = o.ArrayFormulaType.Get()
}
if o.DateForceTimezone.IsSet() {
toSerialize["date_force_timezone"] = o.DateForceTimezone.Get()
}
if o.DateIncludeTime.IsSet() {
toSerialize["date_include_time"] = o.DateIncludeTime.Get()
}
toSerialize["nullable"] = o.Nullable
if o.DateTimeFormat.IsSet() {
toSerialize["date_time_format"] = o.DateTimeFormat.Get()
}
if o.NumberDecimalPlaces.IsSet() {
toSerialize["number_decimal_places"] = o.NumberDecimalPlaces.Get()
}
if o.Error.IsSet() {
toSerialize["error"] = o.Error.Get()
}
toSerialize["formula"] = o.Formula
if !IsNil(o.FormulaType) {
toSerialize["formula_type"] = o.FormulaType
}
return toSerialize, nil
}
type NullableTypeFormulaResult struct {
value *TypeFormulaResult
isSet bool
}
func (v NullableTypeFormulaResult) Get() *TypeFormulaResult {
return v.value
}
func (v *NullableTypeFormulaResult) Set(val *TypeFormulaResult) {
v.value = val
v.isSet = true
}
func (v NullableTypeFormulaResult) IsSet() bool {
return v.isSet
}
func (v *NullableTypeFormulaResult) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTypeFormulaResult(val *TypeFormulaResult) *NullableTypeFormulaResult {
return &NullableTypeFormulaResult{value: val, isSet: true}
}
func (v NullableTypeFormulaResult) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTypeFormulaResult) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}