/
model_hub_db_table_v3.go
811 lines (688 loc) · 22.9 KB
/
model_hub_db_table_v3.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
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
/*
Hubdb
HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`.
API version: v3
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hubdb
import (
"bytes"
"encoding/json"
"fmt"
"time"
)
// checks if the HubDbTableV3 type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &HubDbTableV3{}
// HubDbTableV3 Model for HubDB table
type HubDbTableV3 struct {
// Specifies the key value pairs of the metadata fields with the associated column ids
DynamicMetaTags *map[string]int32 `json:"dynamicMetaTags,omitempty"`
UpdatedBy *SimpleUser `json:"updatedBy,omitempty"`
// Specifies whether the table can be read by public without authorization
AllowPublicApiAccess *bool `json:"allowPublicApiAccess,omitempty"`
// Specifies whether the table can be used for creation of dynamic pages
UseForPages *bool `json:"useForPages,omitempty"`
// Timestamp at which the table is published recently
PublishedAt *time.Time `json:"publishedAt,omitempty"`
// List of columns in the table
Columns []Column `json:"columns,omitempty"`
// Label of the table
Label string `json:"label"`
Published *bool `json:"published,omitempty"`
// Number of columns including deleted
ColumnCount *int32 `json:"columnCount,omitempty"`
// Specifies whether child tables can be created
AllowChildTables *bool `json:"allowChildTables,omitempty"`
// Timestamp at which the table is created
CreatedAt *time.Time `json:"createdAt,omitempty"`
Deleted *bool `json:"deleted,omitempty"`
CreatedBy *SimpleUser `json:"createdBy,omitempty"`
// Name of the table
Name string `json:"name"`
// Specifies creation of multi-level dynamic pages using child tables
EnableChildTablePages *bool `json:"enableChildTablePages,omitempty"`
// Id of the table
Id *string `json:"id,omitempty"`
// Number of rows in the table
RowCount *int32 `json:"rowCount,omitempty"`
IsOrderedManually *bool `json:"isOrderedManually,omitempty"`
// Timestamp at which the table is updated recently
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
}
type _HubDbTableV3 HubDbTableV3
// NewHubDbTableV3 instantiates a new HubDbTableV3 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 NewHubDbTableV3(label string, name string) *HubDbTableV3 {
this := HubDbTableV3{}
this.Label = label
this.Name = name
return &this
}
// NewHubDbTableV3WithDefaults instantiates a new HubDbTableV3 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 NewHubDbTableV3WithDefaults() *HubDbTableV3 {
this := HubDbTableV3{}
return &this
}
// GetDynamicMetaTags returns the DynamicMetaTags field value if set, zero value otherwise.
func (o *HubDbTableV3) GetDynamicMetaTags() map[string]int32 {
if o == nil || IsNil(o.DynamicMetaTags) {
var ret map[string]int32
return ret
}
return *o.DynamicMetaTags
}
// GetDynamicMetaTagsOk returns a tuple with the DynamicMetaTags field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HubDbTableV3) GetDynamicMetaTagsOk() (*map[string]int32, bool) {
if o == nil || IsNil(o.DynamicMetaTags) {
return nil, false
}
return o.DynamicMetaTags, true
}
// HasDynamicMetaTags returns a boolean if a field has been set.
func (o *HubDbTableV3) HasDynamicMetaTags() bool {
if o != nil && !IsNil(o.DynamicMetaTags) {
return true
}
return false
}
// SetDynamicMetaTags gets a reference to the given map[string]int32 and assigns it to the DynamicMetaTags field.
func (o *HubDbTableV3) SetDynamicMetaTags(v map[string]int32) {
o.DynamicMetaTags = &v
}
// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise.
func (o *HubDbTableV3) GetUpdatedBy() SimpleUser {
if o == nil || IsNil(o.UpdatedBy) {
var ret SimpleUser
return ret
}
return *o.UpdatedBy
}
// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HubDbTableV3) GetUpdatedByOk() (*SimpleUser, bool) {
if o == nil || IsNil(o.UpdatedBy) {
return nil, false
}
return o.UpdatedBy, true
}
// HasUpdatedBy returns a boolean if a field has been set.
func (o *HubDbTableV3) HasUpdatedBy() bool {
if o != nil && !IsNil(o.UpdatedBy) {
return true
}
return false
}
// SetUpdatedBy gets a reference to the given SimpleUser and assigns it to the UpdatedBy field.
func (o *HubDbTableV3) SetUpdatedBy(v SimpleUser) {
o.UpdatedBy = &v
}
// GetAllowPublicApiAccess returns the AllowPublicApiAccess field value if set, zero value otherwise.
func (o *HubDbTableV3) GetAllowPublicApiAccess() bool {
if o == nil || IsNil(o.AllowPublicApiAccess) {
var ret bool
return ret
}
return *o.AllowPublicApiAccess
}
// GetAllowPublicApiAccessOk returns a tuple with the AllowPublicApiAccess field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HubDbTableV3) GetAllowPublicApiAccessOk() (*bool, bool) {
if o == nil || IsNil(o.AllowPublicApiAccess) {
return nil, false
}
return o.AllowPublicApiAccess, true
}
// HasAllowPublicApiAccess returns a boolean if a field has been set.
func (o *HubDbTableV3) HasAllowPublicApiAccess() bool {
if o != nil && !IsNil(o.AllowPublicApiAccess) {
return true
}
return false
}
// SetAllowPublicApiAccess gets a reference to the given bool and assigns it to the AllowPublicApiAccess field.
func (o *HubDbTableV3) SetAllowPublicApiAccess(v bool) {
o.AllowPublicApiAccess = &v
}
// GetUseForPages returns the UseForPages field value if set, zero value otherwise.
func (o *HubDbTableV3) GetUseForPages() bool {
if o == nil || IsNil(o.UseForPages) {
var ret bool
return ret
}
return *o.UseForPages
}
// GetUseForPagesOk returns a tuple with the UseForPages field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HubDbTableV3) GetUseForPagesOk() (*bool, bool) {
if o == nil || IsNil(o.UseForPages) {
return nil, false
}
return o.UseForPages, true
}
// HasUseForPages returns a boolean if a field has been set.
func (o *HubDbTableV3) HasUseForPages() bool {
if o != nil && !IsNil(o.UseForPages) {
return true
}
return false
}
// SetUseForPages gets a reference to the given bool and assigns it to the UseForPages field.
func (o *HubDbTableV3) SetUseForPages(v bool) {
o.UseForPages = &v
}
// GetPublishedAt returns the PublishedAt field value if set, zero value otherwise.
func (o *HubDbTableV3) GetPublishedAt() time.Time {
if o == nil || IsNil(o.PublishedAt) {
var ret time.Time
return ret
}
return *o.PublishedAt
}
// GetPublishedAtOk returns a tuple with the PublishedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HubDbTableV3) GetPublishedAtOk() (*time.Time, bool) {
if o == nil || IsNil(o.PublishedAt) {
return nil, false
}
return o.PublishedAt, true
}
// HasPublishedAt returns a boolean if a field has been set.
func (o *HubDbTableV3) HasPublishedAt() bool {
if o != nil && !IsNil(o.PublishedAt) {
return true
}
return false
}
// SetPublishedAt gets a reference to the given time.Time and assigns it to the PublishedAt field.
func (o *HubDbTableV3) SetPublishedAt(v time.Time) {
o.PublishedAt = &v
}
// GetColumns returns the Columns field value if set, zero value otherwise.
func (o *HubDbTableV3) GetColumns() []Column {
if o == nil || IsNil(o.Columns) {
var ret []Column
return ret
}
return o.Columns
}
// GetColumnsOk returns a tuple with the Columns field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HubDbTableV3) GetColumnsOk() ([]Column, bool) {
if o == nil || IsNil(o.Columns) {
return nil, false
}
return o.Columns, true
}
// HasColumns returns a boolean if a field has been set.
func (o *HubDbTableV3) HasColumns() bool {
if o != nil && !IsNil(o.Columns) {
return true
}
return false
}
// SetColumns gets a reference to the given []Column and assigns it to the Columns field.
func (o *HubDbTableV3) SetColumns(v []Column) {
o.Columns = v
}
// GetLabel returns the Label field value
func (o *HubDbTableV3) GetLabel() string {
if o == nil {
var ret string
return ret
}
return o.Label
}
// GetLabelOk returns a tuple with the Label field value
// and a boolean to check if the value has been set.
func (o *HubDbTableV3) GetLabelOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Label, true
}
// SetLabel sets field value
func (o *HubDbTableV3) SetLabel(v string) {
o.Label = v
}
// GetPublished returns the Published field value if set, zero value otherwise.
func (o *HubDbTableV3) GetPublished() bool {
if o == nil || IsNil(o.Published) {
var ret bool
return ret
}
return *o.Published
}
// GetPublishedOk returns a tuple with the Published field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HubDbTableV3) GetPublishedOk() (*bool, bool) {
if o == nil || IsNil(o.Published) {
return nil, false
}
return o.Published, true
}
// HasPublished returns a boolean if a field has been set.
func (o *HubDbTableV3) HasPublished() bool {
if o != nil && !IsNil(o.Published) {
return true
}
return false
}
// SetPublished gets a reference to the given bool and assigns it to the Published field.
func (o *HubDbTableV3) SetPublished(v bool) {
o.Published = &v
}
// GetColumnCount returns the ColumnCount field value if set, zero value otherwise.
func (o *HubDbTableV3) GetColumnCount() int32 {
if o == nil || IsNil(o.ColumnCount) {
var ret int32
return ret
}
return *o.ColumnCount
}
// GetColumnCountOk returns a tuple with the ColumnCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HubDbTableV3) GetColumnCountOk() (*int32, bool) {
if o == nil || IsNil(o.ColumnCount) {
return nil, false
}
return o.ColumnCount, true
}
// HasColumnCount returns a boolean if a field has been set.
func (o *HubDbTableV3) HasColumnCount() bool {
if o != nil && !IsNil(o.ColumnCount) {
return true
}
return false
}
// SetColumnCount gets a reference to the given int32 and assigns it to the ColumnCount field.
func (o *HubDbTableV3) SetColumnCount(v int32) {
o.ColumnCount = &v
}
// GetAllowChildTables returns the AllowChildTables field value if set, zero value otherwise.
func (o *HubDbTableV3) GetAllowChildTables() bool {
if o == nil || IsNil(o.AllowChildTables) {
var ret bool
return ret
}
return *o.AllowChildTables
}
// GetAllowChildTablesOk returns a tuple with the AllowChildTables field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HubDbTableV3) GetAllowChildTablesOk() (*bool, bool) {
if o == nil || IsNil(o.AllowChildTables) {
return nil, false
}
return o.AllowChildTables, true
}
// HasAllowChildTables returns a boolean if a field has been set.
func (o *HubDbTableV3) HasAllowChildTables() bool {
if o != nil && !IsNil(o.AllowChildTables) {
return true
}
return false
}
// SetAllowChildTables gets a reference to the given bool and assigns it to the AllowChildTables field.
func (o *HubDbTableV3) SetAllowChildTables(v bool) {
o.AllowChildTables = &v
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *HubDbTableV3) GetCreatedAt() time.Time {
if o == nil || IsNil(o.CreatedAt) {
var ret time.Time
return ret
}
return *o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HubDbTableV3) GetCreatedAtOk() (*time.Time, bool) {
if o == nil || IsNil(o.CreatedAt) {
return nil, false
}
return o.CreatedAt, true
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *HubDbTableV3) HasCreatedAt() bool {
if o != nil && !IsNil(o.CreatedAt) {
return true
}
return false
}
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
func (o *HubDbTableV3) SetCreatedAt(v time.Time) {
o.CreatedAt = &v
}
// GetDeleted returns the Deleted field value if set, zero value otherwise.
func (o *HubDbTableV3) GetDeleted() bool {
if o == nil || IsNil(o.Deleted) {
var ret bool
return ret
}
return *o.Deleted
}
// GetDeletedOk returns a tuple with the Deleted field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HubDbTableV3) GetDeletedOk() (*bool, bool) {
if o == nil || IsNil(o.Deleted) {
return nil, false
}
return o.Deleted, true
}
// HasDeleted returns a boolean if a field has been set.
func (o *HubDbTableV3) HasDeleted() bool {
if o != nil && !IsNil(o.Deleted) {
return true
}
return false
}
// SetDeleted gets a reference to the given bool and assigns it to the Deleted field.
func (o *HubDbTableV3) SetDeleted(v bool) {
o.Deleted = &v
}
// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise.
func (o *HubDbTableV3) GetCreatedBy() SimpleUser {
if o == nil || IsNil(o.CreatedBy) {
var ret SimpleUser
return ret
}
return *o.CreatedBy
}
// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HubDbTableV3) GetCreatedByOk() (*SimpleUser, bool) {
if o == nil || IsNil(o.CreatedBy) {
return nil, false
}
return o.CreatedBy, true
}
// HasCreatedBy returns a boolean if a field has been set.
func (o *HubDbTableV3) HasCreatedBy() bool {
if o != nil && !IsNil(o.CreatedBy) {
return true
}
return false
}
// SetCreatedBy gets a reference to the given SimpleUser and assigns it to the CreatedBy field.
func (o *HubDbTableV3) SetCreatedBy(v SimpleUser) {
o.CreatedBy = &v
}
// GetName returns the Name field value
func (o *HubDbTableV3) 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 *HubDbTableV3) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *HubDbTableV3) SetName(v string) {
o.Name = v
}
// GetEnableChildTablePages returns the EnableChildTablePages field value if set, zero value otherwise.
func (o *HubDbTableV3) GetEnableChildTablePages() bool {
if o == nil || IsNil(o.EnableChildTablePages) {
var ret bool
return ret
}
return *o.EnableChildTablePages
}
// GetEnableChildTablePagesOk returns a tuple with the EnableChildTablePages field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HubDbTableV3) GetEnableChildTablePagesOk() (*bool, bool) {
if o == nil || IsNil(o.EnableChildTablePages) {
return nil, false
}
return o.EnableChildTablePages, true
}
// HasEnableChildTablePages returns a boolean if a field has been set.
func (o *HubDbTableV3) HasEnableChildTablePages() bool {
if o != nil && !IsNil(o.EnableChildTablePages) {
return true
}
return false
}
// SetEnableChildTablePages gets a reference to the given bool and assigns it to the EnableChildTablePages field.
func (o *HubDbTableV3) SetEnableChildTablePages(v bool) {
o.EnableChildTablePages = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *HubDbTableV3) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HubDbTableV3) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *HubDbTableV3) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *HubDbTableV3) SetId(v string) {
o.Id = &v
}
// GetRowCount returns the RowCount field value if set, zero value otherwise.
func (o *HubDbTableV3) GetRowCount() int32 {
if o == nil || IsNil(o.RowCount) {
var ret int32
return ret
}
return *o.RowCount
}
// GetRowCountOk returns a tuple with the RowCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HubDbTableV3) GetRowCountOk() (*int32, bool) {
if o == nil || IsNil(o.RowCount) {
return nil, false
}
return o.RowCount, true
}
// HasRowCount returns a boolean if a field has been set.
func (o *HubDbTableV3) HasRowCount() bool {
if o != nil && !IsNil(o.RowCount) {
return true
}
return false
}
// SetRowCount gets a reference to the given int32 and assigns it to the RowCount field.
func (o *HubDbTableV3) SetRowCount(v int32) {
o.RowCount = &v
}
// GetIsOrderedManually returns the IsOrderedManually field value if set, zero value otherwise.
func (o *HubDbTableV3) GetIsOrderedManually() bool {
if o == nil || IsNil(o.IsOrderedManually) {
var ret bool
return ret
}
return *o.IsOrderedManually
}
// GetIsOrderedManuallyOk returns a tuple with the IsOrderedManually field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HubDbTableV3) GetIsOrderedManuallyOk() (*bool, bool) {
if o == nil || IsNil(o.IsOrderedManually) {
return nil, false
}
return o.IsOrderedManually, true
}
// HasIsOrderedManually returns a boolean if a field has been set.
func (o *HubDbTableV3) HasIsOrderedManually() bool {
if o != nil && !IsNil(o.IsOrderedManually) {
return true
}
return false
}
// SetIsOrderedManually gets a reference to the given bool and assigns it to the IsOrderedManually field.
func (o *HubDbTableV3) SetIsOrderedManually(v bool) {
o.IsOrderedManually = &v
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *HubDbTableV3) GetUpdatedAt() time.Time {
if o == nil || IsNil(o.UpdatedAt) {
var ret time.Time
return ret
}
return *o.UpdatedAt
}
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HubDbTableV3) GetUpdatedAtOk() (*time.Time, bool) {
if o == nil || IsNil(o.UpdatedAt) {
return nil, false
}
return o.UpdatedAt, true
}
// HasUpdatedAt returns a boolean if a field has been set.
func (o *HubDbTableV3) HasUpdatedAt() bool {
if o != nil && !IsNil(o.UpdatedAt) {
return true
}
return false
}
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
func (o *HubDbTableV3) SetUpdatedAt(v time.Time) {
o.UpdatedAt = &v
}
func (o HubDbTableV3) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o HubDbTableV3) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.DynamicMetaTags) {
toSerialize["dynamicMetaTags"] = o.DynamicMetaTags
}
if !IsNil(o.UpdatedBy) {
toSerialize["updatedBy"] = o.UpdatedBy
}
if !IsNil(o.AllowPublicApiAccess) {
toSerialize["allowPublicApiAccess"] = o.AllowPublicApiAccess
}
if !IsNil(o.UseForPages) {
toSerialize["useForPages"] = o.UseForPages
}
if !IsNil(o.PublishedAt) {
toSerialize["publishedAt"] = o.PublishedAt
}
if !IsNil(o.Columns) {
toSerialize["columns"] = o.Columns
}
toSerialize["label"] = o.Label
if !IsNil(o.Published) {
toSerialize["published"] = o.Published
}
if !IsNil(o.ColumnCount) {
toSerialize["columnCount"] = o.ColumnCount
}
if !IsNil(o.AllowChildTables) {
toSerialize["allowChildTables"] = o.AllowChildTables
}
if !IsNil(o.CreatedAt) {
toSerialize["createdAt"] = o.CreatedAt
}
if !IsNil(o.Deleted) {
toSerialize["deleted"] = o.Deleted
}
if !IsNil(o.CreatedBy) {
toSerialize["createdBy"] = o.CreatedBy
}
toSerialize["name"] = o.Name
if !IsNil(o.EnableChildTablePages) {
toSerialize["enableChildTablePages"] = o.EnableChildTablePages
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.RowCount) {
toSerialize["rowCount"] = o.RowCount
}
if !IsNil(o.IsOrderedManually) {
toSerialize["isOrderedManually"] = o.IsOrderedManually
}
if !IsNil(o.UpdatedAt) {
toSerialize["updatedAt"] = o.UpdatedAt
}
return toSerialize, nil
}
func (o *HubDbTableV3) UnmarshalJSON(data []byte) (err error) {
// This validates that all required properties are included in the JSON object
// by unmarshalling the object into a generic map with string keys and checking
// that every required field exists as a key in the generic map.
requiredProperties := []string{
"label",
"name",
}
allProperties := make(map[string]interface{})
err = json.Unmarshal(data, &allProperties)
if err != nil {
return err
}
for _, requiredProperty := range requiredProperties {
if _, exists := allProperties[requiredProperty]; !exists {
return fmt.Errorf("no value given for required property %v", requiredProperty)
}
}
varHubDbTableV3 := _HubDbTableV3{}
decoder := json.NewDecoder(bytes.NewReader(data))
decoder.DisallowUnknownFields()
err = decoder.Decode(&varHubDbTableV3)
if err != nil {
return err
}
*o = HubDbTableV3(varHubDbTableV3)
return err
}
type NullableHubDbTableV3 struct {
value *HubDbTableV3
isSet bool
}
func (v NullableHubDbTableV3) Get() *HubDbTableV3 {
return v.value
}
func (v *NullableHubDbTableV3) Set(val *HubDbTableV3) {
v.value = val
v.isSet = true
}
func (v NullableHubDbTableV3) IsSet() bool {
return v.isSet
}
func (v *NullableHubDbTableV3) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableHubDbTableV3(val *HubDbTableV3) *NullableHubDbTableV3 {
return &NullableHubDbTableV3{value: val, isSet: true}
}
func (v NullableHubDbTableV3) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableHubDbTableV3) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}