/
model_admin_dashboard.go
576 lines (483 loc) · 17.4 KB
/
model_admin_dashboard.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
/*
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 AdminDashboard type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AdminDashboard{}
// AdminDashboard struct for AdminDashboard
type AdminDashboard struct {
TotalUsers int32 `json:"total_users"`
TotalGroups int32 `json:"total_groups"`
TotalWorkspaces int32 `json:"total_workspaces"`
TotalApplications int32 `json:"total_applications"`
NewUsersLast24Hours int32 `json:"new_users_last_24_hours"`
NewUsersLast7Days int32 `json:"new_users_last_7_days"`
NewUsersLast30Days int32 `json:"new_users_last_30_days"`
PreviousNewUsersLast24Hours int32 `json:"previous_new_users_last_24_hours"`
PreviousNewUsersLast7Days int32 `json:"previous_new_users_last_7_days"`
PreviousNewUsersLast30Days int32 `json:"previous_new_users_last_30_days"`
ActiveUsersLast24Hours int32 `json:"active_users_last_24_hours"`
ActiveUsersLast7Days int32 `json:"active_users_last_7_days"`
ActiveUsersLast30Days int32 `json:"active_users_last_30_days"`
PreviousActiveUsersLast24Hours int32 `json:"previous_active_users_last_24_hours"`
PreviousActiveUsersLast7Days int32 `json:"previous_active_users_last_7_days"`
PreviousActiveUsersLast30Days int32 `json:"previous_active_users_last_30_days"`
NewUsersPerDay []AdminDashboardPerDay `json:"new_users_per_day"`
ActiveUsersPerDay []AdminDashboardPerDay `json:"active_users_per_day"`
}
// NewAdminDashboard instantiates a new AdminDashboard 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 NewAdminDashboard(totalUsers int32, totalGroups int32, totalWorkspaces int32, totalApplications int32, newUsersLast24Hours int32, newUsersLast7Days int32, newUsersLast30Days int32, previousNewUsersLast24Hours int32, previousNewUsersLast7Days int32, previousNewUsersLast30Days int32, activeUsersLast24Hours int32, activeUsersLast7Days int32, activeUsersLast30Days int32, previousActiveUsersLast24Hours int32, previousActiveUsersLast7Days int32, previousActiveUsersLast30Days int32, newUsersPerDay []AdminDashboardPerDay, activeUsersPerDay []AdminDashboardPerDay) *AdminDashboard {
this := AdminDashboard{}
this.TotalUsers = totalUsers
this.TotalGroups = totalGroups
this.TotalWorkspaces = totalWorkspaces
this.TotalApplications = totalApplications
this.NewUsersLast24Hours = newUsersLast24Hours
this.NewUsersLast7Days = newUsersLast7Days
this.NewUsersLast30Days = newUsersLast30Days
this.PreviousNewUsersLast24Hours = previousNewUsersLast24Hours
this.PreviousNewUsersLast7Days = previousNewUsersLast7Days
this.PreviousNewUsersLast30Days = previousNewUsersLast30Days
this.ActiveUsersLast24Hours = activeUsersLast24Hours
this.ActiveUsersLast7Days = activeUsersLast7Days
this.ActiveUsersLast30Days = activeUsersLast30Days
this.PreviousActiveUsersLast24Hours = previousActiveUsersLast24Hours
this.PreviousActiveUsersLast7Days = previousActiveUsersLast7Days
this.PreviousActiveUsersLast30Days = previousActiveUsersLast30Days
this.NewUsersPerDay = newUsersPerDay
this.ActiveUsersPerDay = activeUsersPerDay
return &this
}
// NewAdminDashboardWithDefaults instantiates a new AdminDashboard 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 NewAdminDashboardWithDefaults() *AdminDashboard {
this := AdminDashboard{}
return &this
}
// GetTotalUsers returns the TotalUsers field value
func (o *AdminDashboard) GetTotalUsers() int32 {
if o == nil {
var ret int32
return ret
}
return o.TotalUsers
}
// GetTotalUsersOk returns a tuple with the TotalUsers field value
// and a boolean to check if the value has been set.
func (o *AdminDashboard) GetTotalUsersOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.TotalUsers, true
}
// SetTotalUsers sets field value
func (o *AdminDashboard) SetTotalUsers(v int32) {
o.TotalUsers = v
}
// GetTotalGroups returns the TotalGroups field value
func (o *AdminDashboard) GetTotalGroups() int32 {
if o == nil {
var ret int32
return ret
}
return o.TotalGroups
}
// GetTotalGroupsOk returns a tuple with the TotalGroups field value
// and a boolean to check if the value has been set.
func (o *AdminDashboard) GetTotalGroupsOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.TotalGroups, true
}
// SetTotalGroups sets field value
func (o *AdminDashboard) SetTotalGroups(v int32) {
o.TotalGroups = v
}
// GetTotalWorkspaces returns the TotalWorkspaces field value
func (o *AdminDashboard) GetTotalWorkspaces() int32 {
if o == nil {
var ret int32
return ret
}
return o.TotalWorkspaces
}
// GetTotalWorkspacesOk returns a tuple with the TotalWorkspaces field value
// and a boolean to check if the value has been set.
func (o *AdminDashboard) GetTotalWorkspacesOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.TotalWorkspaces, true
}
// SetTotalWorkspaces sets field value
func (o *AdminDashboard) SetTotalWorkspaces(v int32) {
o.TotalWorkspaces = v
}
// GetTotalApplications returns the TotalApplications field value
func (o *AdminDashboard) GetTotalApplications() int32 {
if o == nil {
var ret int32
return ret
}
return o.TotalApplications
}
// GetTotalApplicationsOk returns a tuple with the TotalApplications field value
// and a boolean to check if the value has been set.
func (o *AdminDashboard) GetTotalApplicationsOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.TotalApplications, true
}
// SetTotalApplications sets field value
func (o *AdminDashboard) SetTotalApplications(v int32) {
o.TotalApplications = v
}
// GetNewUsersLast24Hours returns the NewUsersLast24Hours field value
func (o *AdminDashboard) GetNewUsersLast24Hours() int32 {
if o == nil {
var ret int32
return ret
}
return o.NewUsersLast24Hours
}
// GetNewUsersLast24HoursOk returns a tuple with the NewUsersLast24Hours field value
// and a boolean to check if the value has been set.
func (o *AdminDashboard) GetNewUsersLast24HoursOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.NewUsersLast24Hours, true
}
// SetNewUsersLast24Hours sets field value
func (o *AdminDashboard) SetNewUsersLast24Hours(v int32) {
o.NewUsersLast24Hours = v
}
// GetNewUsersLast7Days returns the NewUsersLast7Days field value
func (o *AdminDashboard) GetNewUsersLast7Days() int32 {
if o == nil {
var ret int32
return ret
}
return o.NewUsersLast7Days
}
// GetNewUsersLast7DaysOk returns a tuple with the NewUsersLast7Days field value
// and a boolean to check if the value has been set.
func (o *AdminDashboard) GetNewUsersLast7DaysOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.NewUsersLast7Days, true
}
// SetNewUsersLast7Days sets field value
func (o *AdminDashboard) SetNewUsersLast7Days(v int32) {
o.NewUsersLast7Days = v
}
// GetNewUsersLast30Days returns the NewUsersLast30Days field value
func (o *AdminDashboard) GetNewUsersLast30Days() int32 {
if o == nil {
var ret int32
return ret
}
return o.NewUsersLast30Days
}
// GetNewUsersLast30DaysOk returns a tuple with the NewUsersLast30Days field value
// and a boolean to check if the value has been set.
func (o *AdminDashboard) GetNewUsersLast30DaysOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.NewUsersLast30Days, true
}
// SetNewUsersLast30Days sets field value
func (o *AdminDashboard) SetNewUsersLast30Days(v int32) {
o.NewUsersLast30Days = v
}
// GetPreviousNewUsersLast24Hours returns the PreviousNewUsersLast24Hours field value
func (o *AdminDashboard) GetPreviousNewUsersLast24Hours() int32 {
if o == nil {
var ret int32
return ret
}
return o.PreviousNewUsersLast24Hours
}
// GetPreviousNewUsersLast24HoursOk returns a tuple with the PreviousNewUsersLast24Hours field value
// and a boolean to check if the value has been set.
func (o *AdminDashboard) GetPreviousNewUsersLast24HoursOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.PreviousNewUsersLast24Hours, true
}
// SetPreviousNewUsersLast24Hours sets field value
func (o *AdminDashboard) SetPreviousNewUsersLast24Hours(v int32) {
o.PreviousNewUsersLast24Hours = v
}
// GetPreviousNewUsersLast7Days returns the PreviousNewUsersLast7Days field value
func (o *AdminDashboard) GetPreviousNewUsersLast7Days() int32 {
if o == nil {
var ret int32
return ret
}
return o.PreviousNewUsersLast7Days
}
// GetPreviousNewUsersLast7DaysOk returns a tuple with the PreviousNewUsersLast7Days field value
// and a boolean to check if the value has been set.
func (o *AdminDashboard) GetPreviousNewUsersLast7DaysOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.PreviousNewUsersLast7Days, true
}
// SetPreviousNewUsersLast7Days sets field value
func (o *AdminDashboard) SetPreviousNewUsersLast7Days(v int32) {
o.PreviousNewUsersLast7Days = v
}
// GetPreviousNewUsersLast30Days returns the PreviousNewUsersLast30Days field value
func (o *AdminDashboard) GetPreviousNewUsersLast30Days() int32 {
if o == nil {
var ret int32
return ret
}
return o.PreviousNewUsersLast30Days
}
// GetPreviousNewUsersLast30DaysOk returns a tuple with the PreviousNewUsersLast30Days field value
// and a boolean to check if the value has been set.
func (o *AdminDashboard) GetPreviousNewUsersLast30DaysOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.PreviousNewUsersLast30Days, true
}
// SetPreviousNewUsersLast30Days sets field value
func (o *AdminDashboard) SetPreviousNewUsersLast30Days(v int32) {
o.PreviousNewUsersLast30Days = v
}
// GetActiveUsersLast24Hours returns the ActiveUsersLast24Hours field value
func (o *AdminDashboard) GetActiveUsersLast24Hours() int32 {
if o == nil {
var ret int32
return ret
}
return o.ActiveUsersLast24Hours
}
// GetActiveUsersLast24HoursOk returns a tuple with the ActiveUsersLast24Hours field value
// and a boolean to check if the value has been set.
func (o *AdminDashboard) GetActiveUsersLast24HoursOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.ActiveUsersLast24Hours, true
}
// SetActiveUsersLast24Hours sets field value
func (o *AdminDashboard) SetActiveUsersLast24Hours(v int32) {
o.ActiveUsersLast24Hours = v
}
// GetActiveUsersLast7Days returns the ActiveUsersLast7Days field value
func (o *AdminDashboard) GetActiveUsersLast7Days() int32 {
if o == nil {
var ret int32
return ret
}
return o.ActiveUsersLast7Days
}
// GetActiveUsersLast7DaysOk returns a tuple with the ActiveUsersLast7Days field value
// and a boolean to check if the value has been set.
func (o *AdminDashboard) GetActiveUsersLast7DaysOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.ActiveUsersLast7Days, true
}
// SetActiveUsersLast7Days sets field value
func (o *AdminDashboard) SetActiveUsersLast7Days(v int32) {
o.ActiveUsersLast7Days = v
}
// GetActiveUsersLast30Days returns the ActiveUsersLast30Days field value
func (o *AdminDashboard) GetActiveUsersLast30Days() int32 {
if o == nil {
var ret int32
return ret
}
return o.ActiveUsersLast30Days
}
// GetActiveUsersLast30DaysOk returns a tuple with the ActiveUsersLast30Days field value
// and a boolean to check if the value has been set.
func (o *AdminDashboard) GetActiveUsersLast30DaysOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.ActiveUsersLast30Days, true
}
// SetActiveUsersLast30Days sets field value
func (o *AdminDashboard) SetActiveUsersLast30Days(v int32) {
o.ActiveUsersLast30Days = v
}
// GetPreviousActiveUsersLast24Hours returns the PreviousActiveUsersLast24Hours field value
func (o *AdminDashboard) GetPreviousActiveUsersLast24Hours() int32 {
if o == nil {
var ret int32
return ret
}
return o.PreviousActiveUsersLast24Hours
}
// GetPreviousActiveUsersLast24HoursOk returns a tuple with the PreviousActiveUsersLast24Hours field value
// and a boolean to check if the value has been set.
func (o *AdminDashboard) GetPreviousActiveUsersLast24HoursOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.PreviousActiveUsersLast24Hours, true
}
// SetPreviousActiveUsersLast24Hours sets field value
func (o *AdminDashboard) SetPreviousActiveUsersLast24Hours(v int32) {
o.PreviousActiveUsersLast24Hours = v
}
// GetPreviousActiveUsersLast7Days returns the PreviousActiveUsersLast7Days field value
func (o *AdminDashboard) GetPreviousActiveUsersLast7Days() int32 {
if o == nil {
var ret int32
return ret
}
return o.PreviousActiveUsersLast7Days
}
// GetPreviousActiveUsersLast7DaysOk returns a tuple with the PreviousActiveUsersLast7Days field value
// and a boolean to check if the value has been set.
func (o *AdminDashboard) GetPreviousActiveUsersLast7DaysOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.PreviousActiveUsersLast7Days, true
}
// SetPreviousActiveUsersLast7Days sets field value
func (o *AdminDashboard) SetPreviousActiveUsersLast7Days(v int32) {
o.PreviousActiveUsersLast7Days = v
}
// GetPreviousActiveUsersLast30Days returns the PreviousActiveUsersLast30Days field value
func (o *AdminDashboard) GetPreviousActiveUsersLast30Days() int32 {
if o == nil {
var ret int32
return ret
}
return o.PreviousActiveUsersLast30Days
}
// GetPreviousActiveUsersLast30DaysOk returns a tuple with the PreviousActiveUsersLast30Days field value
// and a boolean to check if the value has been set.
func (o *AdminDashboard) GetPreviousActiveUsersLast30DaysOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.PreviousActiveUsersLast30Days, true
}
// SetPreviousActiveUsersLast30Days sets field value
func (o *AdminDashboard) SetPreviousActiveUsersLast30Days(v int32) {
o.PreviousActiveUsersLast30Days = v
}
// GetNewUsersPerDay returns the NewUsersPerDay field value
func (o *AdminDashboard) GetNewUsersPerDay() []AdminDashboardPerDay {
if o == nil {
var ret []AdminDashboardPerDay
return ret
}
return o.NewUsersPerDay
}
// GetNewUsersPerDayOk returns a tuple with the NewUsersPerDay field value
// and a boolean to check if the value has been set.
func (o *AdminDashboard) GetNewUsersPerDayOk() ([]AdminDashboardPerDay, bool) {
if o == nil {
return nil, false
}
return o.NewUsersPerDay, true
}
// SetNewUsersPerDay sets field value
func (o *AdminDashboard) SetNewUsersPerDay(v []AdminDashboardPerDay) {
o.NewUsersPerDay = v
}
// GetActiveUsersPerDay returns the ActiveUsersPerDay field value
func (o *AdminDashboard) GetActiveUsersPerDay() []AdminDashboardPerDay {
if o == nil {
var ret []AdminDashboardPerDay
return ret
}
return o.ActiveUsersPerDay
}
// GetActiveUsersPerDayOk returns a tuple with the ActiveUsersPerDay field value
// and a boolean to check if the value has been set.
func (o *AdminDashboard) GetActiveUsersPerDayOk() ([]AdminDashboardPerDay, bool) {
if o == nil {
return nil, false
}
return o.ActiveUsersPerDay, true
}
// SetActiveUsersPerDay sets field value
func (o *AdminDashboard) SetActiveUsersPerDay(v []AdminDashboardPerDay) {
o.ActiveUsersPerDay = v
}
func (o AdminDashboard) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AdminDashboard) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["total_users"] = o.TotalUsers
toSerialize["total_groups"] = o.TotalGroups
toSerialize["total_workspaces"] = o.TotalWorkspaces
toSerialize["total_applications"] = o.TotalApplications
toSerialize["new_users_last_24_hours"] = o.NewUsersLast24Hours
toSerialize["new_users_last_7_days"] = o.NewUsersLast7Days
toSerialize["new_users_last_30_days"] = o.NewUsersLast30Days
toSerialize["previous_new_users_last_24_hours"] = o.PreviousNewUsersLast24Hours
toSerialize["previous_new_users_last_7_days"] = o.PreviousNewUsersLast7Days
toSerialize["previous_new_users_last_30_days"] = o.PreviousNewUsersLast30Days
toSerialize["active_users_last_24_hours"] = o.ActiveUsersLast24Hours
toSerialize["active_users_last_7_days"] = o.ActiveUsersLast7Days
toSerialize["active_users_last_30_days"] = o.ActiveUsersLast30Days
toSerialize["previous_active_users_last_24_hours"] = o.PreviousActiveUsersLast24Hours
toSerialize["previous_active_users_last_7_days"] = o.PreviousActiveUsersLast7Days
toSerialize["previous_active_users_last_30_days"] = o.PreviousActiveUsersLast30Days
toSerialize["new_users_per_day"] = o.NewUsersPerDay
toSerialize["active_users_per_day"] = o.ActiveUsersPerDay
return toSerialize, nil
}
type NullableAdminDashboard struct {
value *AdminDashboard
isSet bool
}
func (v NullableAdminDashboard) Get() *AdminDashboard {
return v.value
}
func (v *NullableAdminDashboard) Set(val *AdminDashboard) {
v.value = val
v.isSet = true
}
func (v NullableAdminDashboard) IsSet() bool {
return v.isSet
}
func (v *NullableAdminDashboard) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAdminDashboard(val *AdminDashboard) *NullableAdminDashboard {
return &NullableAdminDashboard{value: val, isSet: true}
}
func (v NullableAdminDashboard) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAdminDashboard) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}