-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmodel_budget_response.go
More file actions
735 lines (629 loc) · 21.8 KB
/
model_budget_response.go
File metadata and controls
735 lines (629 loc) · 21.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
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
/*
MX Platform API
The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. Just getting started? See our [use case guides](/use-cases/).
API version: 20111101
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package mxplatformgo
import (
"encoding/json"
)
// checks if the BudgetResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &BudgetResponse{}
// BudgetResponse struct for BudgetResponse
type BudgetResponse struct {
// A goal amount set by the user for a category's transaction total during a month.
Amount *float32 `json:"amount,omitempty"`
// Unique identifier for the budget category. Defined by MX.
CategoryGuid *string `json:"category_guid,omitempty"`
// Date and time the budget was created, represented in ISO 8601 format with timestamp.
CreatedAt *string `json:"created_at,omitempty"`
// Unique identifier for the budget. Defined by MX.
Guid *string `json:"guid,omitempty"`
// If the budget has been exceeded, this field will be true. Otherwise, this field will be false.
IsExceeded *bool `json:"is_exceeded,omitempty"`
// If the budget is off track, this field will be true. Otherwise, this field will be false.
IsOffTrack *bool `json:"is_off_track,omitempty"`
// Additional information a partner can store on the budget.
Metadata NullableString `json:"metadata,omitempty"`
// The name of the budget that is visible to the user (ie \"Food\", \"Bills\", \"Entertainment\", etc).
Name NullableString `json:"name,omitempty"`
// The percentage amount of off track spending. (Deprecated).
OffTrackPercentage NullableFloat32 `json:"off_track_percentage,omitempty"`
// Unique identifier for the parent budget. Defined by MX.
ParentGuid NullableString `json:"parent_guid,omitempty"`
// The percentage of a budget that has been spent during the current calendar month Calculated as the transaction total divided by the amount and then multiplied by 100.A value of zero will be returned when `amount` is zero.
PercentSpent NullableFloat32 `json:"percent_spent,omitempty"`
// The projected amount of spending for the budget.
ProjectedSpending *float32 `json:"projected_spending,omitempty"`
// The revision number of this budget record.
Revision *int32 `json:"revision,omitempty"`
// The cumulative amount of all transactions under the budget.
TransactionTotal interface{} `json:"transaction_total,omitempty"`
// Date and time the budget was updated, represented in ISO 8601 format with timestamp.
UpdatedAt interface{} `json:"updated_at,omitempty"`
// Unique identifier for the user. Defined by MX.
UserGuid interface{} `json:"user_guid,omitempty"`
}
// NewBudgetResponse instantiates a new BudgetResponse 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 NewBudgetResponse() *BudgetResponse {
this := BudgetResponse{}
return &this
}
// NewBudgetResponseWithDefaults instantiates a new BudgetResponse 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 NewBudgetResponseWithDefaults() *BudgetResponse {
this := BudgetResponse{}
return &this
}
// GetAmount returns the Amount field value if set, zero value otherwise.
func (o *BudgetResponse) GetAmount() float32 {
if o == nil || IsNil(o.Amount) {
var ret float32
return ret
}
return *o.Amount
}
// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BudgetResponse) GetAmountOk() (*float32, bool) {
if o == nil || IsNil(o.Amount) {
return nil, false
}
return o.Amount, true
}
// HasAmount returns a boolean if a field has been set.
func (o *BudgetResponse) HasAmount() bool {
if o != nil && !IsNil(o.Amount) {
return true
}
return false
}
// SetAmount gets a reference to the given float32 and assigns it to the Amount field.
func (o *BudgetResponse) SetAmount(v float32) {
o.Amount = &v
}
// GetCategoryGuid returns the CategoryGuid field value if set, zero value otherwise.
func (o *BudgetResponse) GetCategoryGuid() string {
if o == nil || IsNil(o.CategoryGuid) {
var ret string
return ret
}
return *o.CategoryGuid
}
// GetCategoryGuidOk returns a tuple with the CategoryGuid field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BudgetResponse) GetCategoryGuidOk() (*string, bool) {
if o == nil || IsNil(o.CategoryGuid) {
return nil, false
}
return o.CategoryGuid, true
}
// HasCategoryGuid returns a boolean if a field has been set.
func (o *BudgetResponse) HasCategoryGuid() bool {
if o != nil && !IsNil(o.CategoryGuid) {
return true
}
return false
}
// SetCategoryGuid gets a reference to the given string and assigns it to the CategoryGuid field.
func (o *BudgetResponse) SetCategoryGuid(v string) {
o.CategoryGuid = &v
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *BudgetResponse) GetCreatedAt() string {
if o == nil || IsNil(o.CreatedAt) {
var ret string
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 *BudgetResponse) GetCreatedAtOk() (*string, 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 *BudgetResponse) HasCreatedAt() bool {
if o != nil && !IsNil(o.CreatedAt) {
return true
}
return false
}
// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field.
func (o *BudgetResponse) SetCreatedAt(v string) {
o.CreatedAt = &v
}
// GetGuid returns the Guid field value if set, zero value otherwise.
func (o *BudgetResponse) GetGuid() string {
if o == nil || IsNil(o.Guid) {
var ret string
return ret
}
return *o.Guid
}
// GetGuidOk returns a tuple with the Guid field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BudgetResponse) GetGuidOk() (*string, bool) {
if o == nil || IsNil(o.Guid) {
return nil, false
}
return o.Guid, true
}
// HasGuid returns a boolean if a field has been set.
func (o *BudgetResponse) HasGuid() bool {
if o != nil && !IsNil(o.Guid) {
return true
}
return false
}
// SetGuid gets a reference to the given string and assigns it to the Guid field.
func (o *BudgetResponse) SetGuid(v string) {
o.Guid = &v
}
// GetIsExceeded returns the IsExceeded field value if set, zero value otherwise.
func (o *BudgetResponse) GetIsExceeded() bool {
if o == nil || IsNil(o.IsExceeded) {
var ret bool
return ret
}
return *o.IsExceeded
}
// GetIsExceededOk returns a tuple with the IsExceeded field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BudgetResponse) GetIsExceededOk() (*bool, bool) {
if o == nil || IsNil(o.IsExceeded) {
return nil, false
}
return o.IsExceeded, true
}
// HasIsExceeded returns a boolean if a field has been set.
func (o *BudgetResponse) HasIsExceeded() bool {
if o != nil && !IsNil(o.IsExceeded) {
return true
}
return false
}
// SetIsExceeded gets a reference to the given bool and assigns it to the IsExceeded field.
func (o *BudgetResponse) SetIsExceeded(v bool) {
o.IsExceeded = &v
}
// GetIsOffTrack returns the IsOffTrack field value if set, zero value otherwise.
func (o *BudgetResponse) GetIsOffTrack() bool {
if o == nil || IsNil(o.IsOffTrack) {
var ret bool
return ret
}
return *o.IsOffTrack
}
// GetIsOffTrackOk returns a tuple with the IsOffTrack field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BudgetResponse) GetIsOffTrackOk() (*bool, bool) {
if o == nil || IsNil(o.IsOffTrack) {
return nil, false
}
return o.IsOffTrack, true
}
// HasIsOffTrack returns a boolean if a field has been set.
func (o *BudgetResponse) HasIsOffTrack() bool {
if o != nil && !IsNil(o.IsOffTrack) {
return true
}
return false
}
// SetIsOffTrack gets a reference to the given bool and assigns it to the IsOffTrack field.
func (o *BudgetResponse) SetIsOffTrack(v bool) {
o.IsOffTrack = &v
}
// GetMetadata returns the Metadata field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BudgetResponse) GetMetadata() string {
if o == nil || IsNil(o.Metadata.Get()) {
var ret string
return ret
}
return *o.Metadata.Get()
}
// GetMetadataOk returns a tuple with the Metadata 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 *BudgetResponse) GetMetadataOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Metadata.Get(), o.Metadata.IsSet()
}
// HasMetadata returns a boolean if a field has been set.
func (o *BudgetResponse) HasMetadata() bool {
if o != nil && o.Metadata.IsSet() {
return true
}
return false
}
// SetMetadata gets a reference to the given NullableString and assigns it to the Metadata field.
func (o *BudgetResponse) SetMetadata(v string) {
o.Metadata.Set(&v)
}
// SetMetadataNil sets the value for Metadata to be an explicit nil
func (o *BudgetResponse) SetMetadataNil() {
o.Metadata.Set(nil)
}
// UnsetMetadata ensures that no value is present for Metadata, not even an explicit nil
func (o *BudgetResponse) UnsetMetadata() {
o.Metadata.Unset()
}
// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BudgetResponse) GetName() string {
if o == nil || IsNil(o.Name.Get()) {
var ret string
return ret
}
return *o.Name.Get()
}
// GetNameOk returns a tuple with the Name 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 *BudgetResponse) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Name.Get(), o.Name.IsSet()
}
// HasName returns a boolean if a field has been set.
func (o *BudgetResponse) HasName() bool {
if o != nil && o.Name.IsSet() {
return true
}
return false
}
// SetName gets a reference to the given NullableString and assigns it to the Name field.
func (o *BudgetResponse) SetName(v string) {
o.Name.Set(&v)
}
// SetNameNil sets the value for Name to be an explicit nil
func (o *BudgetResponse) SetNameNil() {
o.Name.Set(nil)
}
// UnsetName ensures that no value is present for Name, not even an explicit nil
func (o *BudgetResponse) UnsetName() {
o.Name.Unset()
}
// GetOffTrackPercentage returns the OffTrackPercentage field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BudgetResponse) GetOffTrackPercentage() float32 {
if o == nil || IsNil(o.OffTrackPercentage.Get()) {
var ret float32
return ret
}
return *o.OffTrackPercentage.Get()
}
// GetOffTrackPercentageOk returns a tuple with the OffTrackPercentage 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 *BudgetResponse) GetOffTrackPercentageOk() (*float32, bool) {
if o == nil {
return nil, false
}
return o.OffTrackPercentage.Get(), o.OffTrackPercentage.IsSet()
}
// HasOffTrackPercentage returns a boolean if a field has been set.
func (o *BudgetResponse) HasOffTrackPercentage() bool {
if o != nil && o.OffTrackPercentage.IsSet() {
return true
}
return false
}
// SetOffTrackPercentage gets a reference to the given NullableFloat32 and assigns it to the OffTrackPercentage field.
func (o *BudgetResponse) SetOffTrackPercentage(v float32) {
o.OffTrackPercentage.Set(&v)
}
// SetOffTrackPercentageNil sets the value for OffTrackPercentage to be an explicit nil
func (o *BudgetResponse) SetOffTrackPercentageNil() {
o.OffTrackPercentage.Set(nil)
}
// UnsetOffTrackPercentage ensures that no value is present for OffTrackPercentage, not even an explicit nil
func (o *BudgetResponse) UnsetOffTrackPercentage() {
o.OffTrackPercentage.Unset()
}
// GetParentGuid returns the ParentGuid field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BudgetResponse) GetParentGuid() string {
if o == nil || IsNil(o.ParentGuid.Get()) {
var ret string
return ret
}
return *o.ParentGuid.Get()
}
// GetParentGuidOk returns a tuple with the ParentGuid 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 *BudgetResponse) GetParentGuidOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.ParentGuid.Get(), o.ParentGuid.IsSet()
}
// HasParentGuid returns a boolean if a field has been set.
func (o *BudgetResponse) HasParentGuid() bool {
if o != nil && o.ParentGuid.IsSet() {
return true
}
return false
}
// SetParentGuid gets a reference to the given NullableString and assigns it to the ParentGuid field.
func (o *BudgetResponse) SetParentGuid(v string) {
o.ParentGuid.Set(&v)
}
// SetParentGuidNil sets the value for ParentGuid to be an explicit nil
func (o *BudgetResponse) SetParentGuidNil() {
o.ParentGuid.Set(nil)
}
// UnsetParentGuid ensures that no value is present for ParentGuid, not even an explicit nil
func (o *BudgetResponse) UnsetParentGuid() {
o.ParentGuid.Unset()
}
// GetPercentSpent returns the PercentSpent field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BudgetResponse) GetPercentSpent() float32 {
if o == nil || IsNil(o.PercentSpent.Get()) {
var ret float32
return ret
}
return *o.PercentSpent.Get()
}
// GetPercentSpentOk returns a tuple with the PercentSpent 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 *BudgetResponse) GetPercentSpentOk() (*float32, bool) {
if o == nil {
return nil, false
}
return o.PercentSpent.Get(), o.PercentSpent.IsSet()
}
// HasPercentSpent returns a boolean if a field has been set.
func (o *BudgetResponse) HasPercentSpent() bool {
if o != nil && o.PercentSpent.IsSet() {
return true
}
return false
}
// SetPercentSpent gets a reference to the given NullableFloat32 and assigns it to the PercentSpent field.
func (o *BudgetResponse) SetPercentSpent(v float32) {
o.PercentSpent.Set(&v)
}
// SetPercentSpentNil sets the value for PercentSpent to be an explicit nil
func (o *BudgetResponse) SetPercentSpentNil() {
o.PercentSpent.Set(nil)
}
// UnsetPercentSpent ensures that no value is present for PercentSpent, not even an explicit nil
func (o *BudgetResponse) UnsetPercentSpent() {
o.PercentSpent.Unset()
}
// GetProjectedSpending returns the ProjectedSpending field value if set, zero value otherwise.
func (o *BudgetResponse) GetProjectedSpending() float32 {
if o == nil || IsNil(o.ProjectedSpending) {
var ret float32
return ret
}
return *o.ProjectedSpending
}
// GetProjectedSpendingOk returns a tuple with the ProjectedSpending field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BudgetResponse) GetProjectedSpendingOk() (*float32, bool) {
if o == nil || IsNil(o.ProjectedSpending) {
return nil, false
}
return o.ProjectedSpending, true
}
// HasProjectedSpending returns a boolean if a field has been set.
func (o *BudgetResponse) HasProjectedSpending() bool {
if o != nil && !IsNil(o.ProjectedSpending) {
return true
}
return false
}
// SetProjectedSpending gets a reference to the given float32 and assigns it to the ProjectedSpending field.
func (o *BudgetResponse) SetProjectedSpending(v float32) {
o.ProjectedSpending = &v
}
// GetRevision returns the Revision field value if set, zero value otherwise.
func (o *BudgetResponse) GetRevision() int32 {
if o == nil || IsNil(o.Revision) {
var ret int32
return ret
}
return *o.Revision
}
// GetRevisionOk returns a tuple with the Revision field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BudgetResponse) GetRevisionOk() (*int32, bool) {
if o == nil || IsNil(o.Revision) {
return nil, false
}
return o.Revision, true
}
// HasRevision returns a boolean if a field has been set.
func (o *BudgetResponse) HasRevision() bool {
if o != nil && !IsNil(o.Revision) {
return true
}
return false
}
// SetRevision gets a reference to the given int32 and assigns it to the Revision field.
func (o *BudgetResponse) SetRevision(v int32) {
o.Revision = &v
}
// GetTransactionTotal returns the TransactionTotal field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BudgetResponse) GetTransactionTotal() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.TransactionTotal
}
// GetTransactionTotalOk returns a tuple with the TransactionTotal 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 *BudgetResponse) GetTransactionTotalOk() (*interface{}, bool) {
if o == nil || IsNil(o.TransactionTotal) {
return nil, false
}
return &o.TransactionTotal, true
}
// HasTransactionTotal returns a boolean if a field has been set.
func (o *BudgetResponse) HasTransactionTotal() bool {
if o != nil && IsNil(o.TransactionTotal) {
return true
}
return false
}
// SetTransactionTotal gets a reference to the given interface{} and assigns it to the TransactionTotal field.
func (o *BudgetResponse) SetTransactionTotal(v interface{}) {
o.TransactionTotal = v
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BudgetResponse) GetUpdatedAt() interface{} {
if o == nil {
var ret interface{}
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.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *BudgetResponse) GetUpdatedAtOk() (*interface{}, 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 *BudgetResponse) HasUpdatedAt() bool {
if o != nil && IsNil(o.UpdatedAt) {
return true
}
return false
}
// SetUpdatedAt gets a reference to the given interface{} and assigns it to the UpdatedAt field.
func (o *BudgetResponse) SetUpdatedAt(v interface{}) {
o.UpdatedAt = v
}
// GetUserGuid returns the UserGuid field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BudgetResponse) GetUserGuid() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.UserGuid
}
// GetUserGuidOk returns a tuple with the UserGuid 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 *BudgetResponse) GetUserGuidOk() (*interface{}, bool) {
if o == nil || IsNil(o.UserGuid) {
return nil, false
}
return &o.UserGuid, true
}
// HasUserGuid returns a boolean if a field has been set.
func (o *BudgetResponse) HasUserGuid() bool {
if o != nil && IsNil(o.UserGuid) {
return true
}
return false
}
// SetUserGuid gets a reference to the given interface{} and assigns it to the UserGuid field.
func (o *BudgetResponse) SetUserGuid(v interface{}) {
o.UserGuid = v
}
func (o BudgetResponse) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o BudgetResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Amount) {
toSerialize["amount"] = o.Amount
}
if !IsNil(o.CategoryGuid) {
toSerialize["category_guid"] = o.CategoryGuid
}
if !IsNil(o.CreatedAt) {
toSerialize["created_at"] = o.CreatedAt
}
if !IsNil(o.Guid) {
toSerialize["guid"] = o.Guid
}
if !IsNil(o.IsExceeded) {
toSerialize["is_exceeded"] = o.IsExceeded
}
if !IsNil(o.IsOffTrack) {
toSerialize["is_off_track"] = o.IsOffTrack
}
if o.Metadata.IsSet() {
toSerialize["metadata"] = o.Metadata.Get()
}
if o.Name.IsSet() {
toSerialize["name"] = o.Name.Get()
}
if o.OffTrackPercentage.IsSet() {
toSerialize["off_track_percentage"] = o.OffTrackPercentage.Get()
}
if o.ParentGuid.IsSet() {
toSerialize["parent_guid"] = o.ParentGuid.Get()
}
if o.PercentSpent.IsSet() {
toSerialize["percent_spent"] = o.PercentSpent.Get()
}
if !IsNil(o.ProjectedSpending) {
toSerialize["projected_spending"] = o.ProjectedSpending
}
if !IsNil(o.Revision) {
toSerialize["revision"] = o.Revision
}
if o.TransactionTotal != nil {
toSerialize["transaction_total"] = o.TransactionTotal
}
if o.UpdatedAt != nil {
toSerialize["updated_at"] = o.UpdatedAt
}
if o.UserGuid != nil {
toSerialize["user_guid"] = o.UserGuid
}
return toSerialize, nil
}
type NullableBudgetResponse struct {
value *BudgetResponse
isSet bool
}
func (v NullableBudgetResponse) Get() *BudgetResponse {
return v.value
}
func (v *NullableBudgetResponse) Set(val *BudgetResponse) {
v.value = val
v.isSet = true
}
func (v NullableBudgetResponse) IsSet() bool {
return v.isSet
}
func (v *NullableBudgetResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBudgetResponse(val *BudgetResponse) *NullableBudgetResponse {
return &NullableBudgetResponse{value: val, isSet: true}
}
func (v NullableBudgetResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBudgetResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}