-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmodel_goals_response.go
680 lines (579 loc) · 18.6 KB
/
model_goals_response.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
/*
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.
API version: 0.1.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package mxplatformgo
import (
"encoding/json"
)
// checks if the GoalsResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GoalsResponse{}
// GoalsResponse struct for GoalsResponse
type GoalsResponse struct {
// Unique identifier of the account for the goal.
AccountGuid *string `json:"account_guid,omitempty"`
// Amount of the goal.
Amount *float32 `json:"amount,omitempty"`
// The current amount of the goal.
CurrentAmount *float32 `json:"current_amount,omitempty"`
// The unique identifier for the goal. Defined by MX.
Guid *string `json:"guid,omitempty"`
// The goal type.
GoalTypeName *string `json:"goal_type_name,omitempty"`
// The category of the goal.
MetaTypeName *string `json:"meta_type_name,omitempty"`
// The name of the goal.
Name *string `json:"name,omitempty"`
// Date and time the goal was completed.
CompletedAt *string `json:"completed_at,omitempty"`
// Determines if the goal has been spent.
HasBeenSpent *bool `json:"has_been_spent,omitempty"`
// Determines if the goal is complete.
IsComplete *bool `json:"is_complete,omitempty"`
// Additional information a partner can store on the goal.
Metadata *string `json:"metadata,omitempty"`
// The priority of the goal in relation to multiple goals.
Position *int32 `json:"position,omitempty"`
// The date on which the project was completed.
ProjectedToCompleteAt *string `json:"projected_to_complete_at,omitempty"`
TargetedToCompleteAt *string `json:"targeted_to_complete_at,omitempty"`
TrackTypeName *string `json:"track_type_name,omitempty"`
// The unique identifier for the the user. Defined by MX.
UserGuid *string `json:"user_guid,omitempty"`
}
// NewGoalsResponse instantiates a new GoalsResponse 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 NewGoalsResponse() *GoalsResponse {
this := GoalsResponse{}
return &this
}
// NewGoalsResponseWithDefaults instantiates a new GoalsResponse 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 NewGoalsResponseWithDefaults() *GoalsResponse {
this := GoalsResponse{}
return &this
}
// GetAccountGuid returns the AccountGuid field value if set, zero value otherwise.
func (o *GoalsResponse) GetAccountGuid() string {
if o == nil || IsNil(o.AccountGuid) {
var ret string
return ret
}
return *o.AccountGuid
}
// GetAccountGuidOk returns a tuple with the AccountGuid field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GoalsResponse) GetAccountGuidOk() (*string, bool) {
if o == nil || IsNil(o.AccountGuid) {
return nil, false
}
return o.AccountGuid, true
}
// HasAccountGuid returns a boolean if a field has been set.
func (o *GoalsResponse) HasAccountGuid() bool {
if o != nil && !IsNil(o.AccountGuid) {
return true
}
return false
}
// SetAccountGuid gets a reference to the given string and assigns it to the AccountGuid field.
func (o *GoalsResponse) SetAccountGuid(v string) {
o.AccountGuid = &v
}
// GetAmount returns the Amount field value if set, zero value otherwise.
func (o *GoalsResponse) 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 *GoalsResponse) 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 *GoalsResponse) 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 *GoalsResponse) SetAmount(v float32) {
o.Amount = &v
}
// GetCurrentAmount returns the CurrentAmount field value if set, zero value otherwise.
func (o *GoalsResponse) GetCurrentAmount() float32 {
if o == nil || IsNil(o.CurrentAmount) {
var ret float32
return ret
}
return *o.CurrentAmount
}
// GetCurrentAmountOk returns a tuple with the CurrentAmount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GoalsResponse) GetCurrentAmountOk() (*float32, bool) {
if o == nil || IsNil(o.CurrentAmount) {
return nil, false
}
return o.CurrentAmount, true
}
// HasCurrentAmount returns a boolean if a field has been set.
func (o *GoalsResponse) HasCurrentAmount() bool {
if o != nil && !IsNil(o.CurrentAmount) {
return true
}
return false
}
// SetCurrentAmount gets a reference to the given float32 and assigns it to the CurrentAmount field.
func (o *GoalsResponse) SetCurrentAmount(v float32) {
o.CurrentAmount = &v
}
// GetGuid returns the Guid field value if set, zero value otherwise.
func (o *GoalsResponse) 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 *GoalsResponse) 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 *GoalsResponse) 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 *GoalsResponse) SetGuid(v string) {
o.Guid = &v
}
// GetGoalTypeName returns the GoalTypeName field value if set, zero value otherwise.
func (o *GoalsResponse) GetGoalTypeName() string {
if o == nil || IsNil(o.GoalTypeName) {
var ret string
return ret
}
return *o.GoalTypeName
}
// GetGoalTypeNameOk returns a tuple with the GoalTypeName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GoalsResponse) GetGoalTypeNameOk() (*string, bool) {
if o == nil || IsNil(o.GoalTypeName) {
return nil, false
}
return o.GoalTypeName, true
}
// HasGoalTypeName returns a boolean if a field has been set.
func (o *GoalsResponse) HasGoalTypeName() bool {
if o != nil && !IsNil(o.GoalTypeName) {
return true
}
return false
}
// SetGoalTypeName gets a reference to the given string and assigns it to the GoalTypeName field.
func (o *GoalsResponse) SetGoalTypeName(v string) {
o.GoalTypeName = &v
}
// GetMetaTypeName returns the MetaTypeName field value if set, zero value otherwise.
func (o *GoalsResponse) GetMetaTypeName() string {
if o == nil || IsNil(o.MetaTypeName) {
var ret string
return ret
}
return *o.MetaTypeName
}
// GetMetaTypeNameOk returns a tuple with the MetaTypeName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GoalsResponse) GetMetaTypeNameOk() (*string, bool) {
if o == nil || IsNil(o.MetaTypeName) {
return nil, false
}
return o.MetaTypeName, true
}
// HasMetaTypeName returns a boolean if a field has been set.
func (o *GoalsResponse) HasMetaTypeName() bool {
if o != nil && !IsNil(o.MetaTypeName) {
return true
}
return false
}
// SetMetaTypeName gets a reference to the given string and assigns it to the MetaTypeName field.
func (o *GoalsResponse) SetMetaTypeName(v string) {
o.MetaTypeName = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *GoalsResponse) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GoalsResponse) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *GoalsResponse) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *GoalsResponse) SetName(v string) {
o.Name = &v
}
// GetCompletedAt returns the CompletedAt field value if set, zero value otherwise.
func (o *GoalsResponse) GetCompletedAt() string {
if o == nil || IsNil(o.CompletedAt) {
var ret string
return ret
}
return *o.CompletedAt
}
// GetCompletedAtOk returns a tuple with the CompletedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GoalsResponse) GetCompletedAtOk() (*string, bool) {
if o == nil || IsNil(o.CompletedAt) {
return nil, false
}
return o.CompletedAt, true
}
// HasCompletedAt returns a boolean if a field has been set.
func (o *GoalsResponse) HasCompletedAt() bool {
if o != nil && !IsNil(o.CompletedAt) {
return true
}
return false
}
// SetCompletedAt gets a reference to the given string and assigns it to the CompletedAt field.
func (o *GoalsResponse) SetCompletedAt(v string) {
o.CompletedAt = &v
}
// GetHasBeenSpent returns the HasBeenSpent field value if set, zero value otherwise.
func (o *GoalsResponse) GetHasBeenSpent() bool {
if o == nil || IsNil(o.HasBeenSpent) {
var ret bool
return ret
}
return *o.HasBeenSpent
}
// GetHasBeenSpentOk returns a tuple with the HasBeenSpent field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GoalsResponse) GetHasBeenSpentOk() (*bool, bool) {
if o == nil || IsNil(o.HasBeenSpent) {
return nil, false
}
return o.HasBeenSpent, true
}
// HasHasBeenSpent returns a boolean if a field has been set.
func (o *GoalsResponse) HasHasBeenSpent() bool {
if o != nil && !IsNil(o.HasBeenSpent) {
return true
}
return false
}
// SetHasBeenSpent gets a reference to the given bool and assigns it to the HasBeenSpent field.
func (o *GoalsResponse) SetHasBeenSpent(v bool) {
o.HasBeenSpent = &v
}
// GetIsComplete returns the IsComplete field value if set, zero value otherwise.
func (o *GoalsResponse) GetIsComplete() bool {
if o == nil || IsNil(o.IsComplete) {
var ret bool
return ret
}
return *o.IsComplete
}
// GetIsCompleteOk returns a tuple with the IsComplete field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GoalsResponse) GetIsCompleteOk() (*bool, bool) {
if o == nil || IsNil(o.IsComplete) {
return nil, false
}
return o.IsComplete, true
}
// HasIsComplete returns a boolean if a field has been set.
func (o *GoalsResponse) HasIsComplete() bool {
if o != nil && !IsNil(o.IsComplete) {
return true
}
return false
}
// SetIsComplete gets a reference to the given bool and assigns it to the IsComplete field.
func (o *GoalsResponse) SetIsComplete(v bool) {
o.IsComplete = &v
}
// GetMetadata returns the Metadata field value if set, zero value otherwise.
func (o *GoalsResponse) GetMetadata() string {
if o == nil || IsNil(o.Metadata) {
var ret string
return ret
}
return *o.Metadata
}
// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GoalsResponse) GetMetadataOk() (*string, bool) {
if o == nil || IsNil(o.Metadata) {
return nil, false
}
return o.Metadata, true
}
// HasMetadata returns a boolean if a field has been set.
func (o *GoalsResponse) HasMetadata() bool {
if o != nil && !IsNil(o.Metadata) {
return true
}
return false
}
// SetMetadata gets a reference to the given string and assigns it to the Metadata field.
func (o *GoalsResponse) SetMetadata(v string) {
o.Metadata = &v
}
// GetPosition returns the Position field value if set, zero value otherwise.
func (o *GoalsResponse) GetPosition() int32 {
if o == nil || IsNil(o.Position) {
var ret int32
return ret
}
return *o.Position
}
// GetPositionOk returns a tuple with the Position field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GoalsResponse) GetPositionOk() (*int32, bool) {
if o == nil || IsNil(o.Position) {
return nil, false
}
return o.Position, true
}
// HasPosition returns a boolean if a field has been set.
func (o *GoalsResponse) HasPosition() bool {
if o != nil && !IsNil(o.Position) {
return true
}
return false
}
// SetPosition gets a reference to the given int32 and assigns it to the Position field.
func (o *GoalsResponse) SetPosition(v int32) {
o.Position = &v
}
// GetProjectedToCompleteAt returns the ProjectedToCompleteAt field value if set, zero value otherwise.
func (o *GoalsResponse) GetProjectedToCompleteAt() string {
if o == nil || IsNil(o.ProjectedToCompleteAt) {
var ret string
return ret
}
return *o.ProjectedToCompleteAt
}
// GetProjectedToCompleteAtOk returns a tuple with the ProjectedToCompleteAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GoalsResponse) GetProjectedToCompleteAtOk() (*string, bool) {
if o == nil || IsNil(o.ProjectedToCompleteAt) {
return nil, false
}
return o.ProjectedToCompleteAt, true
}
// HasProjectedToCompleteAt returns a boolean if a field has been set.
func (o *GoalsResponse) HasProjectedToCompleteAt() bool {
if o != nil && !IsNil(o.ProjectedToCompleteAt) {
return true
}
return false
}
// SetProjectedToCompleteAt gets a reference to the given string and assigns it to the ProjectedToCompleteAt field.
func (o *GoalsResponse) SetProjectedToCompleteAt(v string) {
o.ProjectedToCompleteAt = &v
}
// GetTargetedToCompleteAt returns the TargetedToCompleteAt field value if set, zero value otherwise.
func (o *GoalsResponse) GetTargetedToCompleteAt() string {
if o == nil || IsNil(o.TargetedToCompleteAt) {
var ret string
return ret
}
return *o.TargetedToCompleteAt
}
// GetTargetedToCompleteAtOk returns a tuple with the TargetedToCompleteAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GoalsResponse) GetTargetedToCompleteAtOk() (*string, bool) {
if o == nil || IsNil(o.TargetedToCompleteAt) {
return nil, false
}
return o.TargetedToCompleteAt, true
}
// HasTargetedToCompleteAt returns a boolean if a field has been set.
func (o *GoalsResponse) HasTargetedToCompleteAt() bool {
if o != nil && !IsNil(o.TargetedToCompleteAt) {
return true
}
return false
}
// SetTargetedToCompleteAt gets a reference to the given string and assigns it to the TargetedToCompleteAt field.
func (o *GoalsResponse) SetTargetedToCompleteAt(v string) {
o.TargetedToCompleteAt = &v
}
// GetTrackTypeName returns the TrackTypeName field value if set, zero value otherwise.
func (o *GoalsResponse) GetTrackTypeName() string {
if o == nil || IsNil(o.TrackTypeName) {
var ret string
return ret
}
return *o.TrackTypeName
}
// GetTrackTypeNameOk returns a tuple with the TrackTypeName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GoalsResponse) GetTrackTypeNameOk() (*string, bool) {
if o == nil || IsNil(o.TrackTypeName) {
return nil, false
}
return o.TrackTypeName, true
}
// HasTrackTypeName returns a boolean if a field has been set.
func (o *GoalsResponse) HasTrackTypeName() bool {
if o != nil && !IsNil(o.TrackTypeName) {
return true
}
return false
}
// SetTrackTypeName gets a reference to the given string and assigns it to the TrackTypeName field.
func (o *GoalsResponse) SetTrackTypeName(v string) {
o.TrackTypeName = &v
}
// GetUserGuid returns the UserGuid field value if set, zero value otherwise.
func (o *GoalsResponse) GetUserGuid() string {
if o == nil || IsNil(o.UserGuid) {
var ret string
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.
func (o *GoalsResponse) GetUserGuidOk() (*string, 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 *GoalsResponse) HasUserGuid() bool {
if o != nil && !IsNil(o.UserGuid) {
return true
}
return false
}
// SetUserGuid gets a reference to the given string and assigns it to the UserGuid field.
func (o *GoalsResponse) SetUserGuid(v string) {
o.UserGuid = &v
}
func (o GoalsResponse) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GoalsResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.AccountGuid) {
toSerialize["account_guid"] = o.AccountGuid
}
if !IsNil(o.Amount) {
toSerialize["amount"] = o.Amount
}
if !IsNil(o.CurrentAmount) {
toSerialize["current_amount"] = o.CurrentAmount
}
if !IsNil(o.Guid) {
toSerialize["guid"] = o.Guid
}
if !IsNil(o.GoalTypeName) {
toSerialize["goal_type_name"] = o.GoalTypeName
}
if !IsNil(o.MetaTypeName) {
toSerialize["meta_type_name"] = o.MetaTypeName
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.CompletedAt) {
toSerialize["completed_at"] = o.CompletedAt
}
if !IsNil(o.HasBeenSpent) {
toSerialize["has_been_spent"] = o.HasBeenSpent
}
if !IsNil(o.IsComplete) {
toSerialize["is_complete"] = o.IsComplete
}
if !IsNil(o.Metadata) {
toSerialize["metadata"] = o.Metadata
}
if !IsNil(o.Position) {
toSerialize["position"] = o.Position
}
if !IsNil(o.ProjectedToCompleteAt) {
toSerialize["projected_to_complete_at"] = o.ProjectedToCompleteAt
}
if !IsNil(o.TargetedToCompleteAt) {
toSerialize["targeted_to_complete_at"] = o.TargetedToCompleteAt
}
if !IsNil(o.TrackTypeName) {
toSerialize["track_type_name"] = o.TrackTypeName
}
if !IsNil(o.UserGuid) {
toSerialize["user_guid"] = o.UserGuid
}
return toSerialize, nil
}
type NullableGoalsResponse struct {
value *GoalsResponse
isSet bool
}
func (v NullableGoalsResponse) Get() *GoalsResponse {
return v.value
}
func (v *NullableGoalsResponse) Set(val *GoalsResponse) {
v.value = val
v.isSet = true
}
func (v NullableGoalsResponse) IsSet() bool {
return v.isSet
}
func (v *NullableGoalsResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGoalsResponse(val *GoalsResponse) *NullableGoalsResponse {
return &NullableGoalsResponse{value: val, isSet: true}
}
func (v NullableGoalsResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGoalsResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}