-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmodel_goal_request.go
More file actions
452 lines (381 loc) · 11.8 KB
/
model_goal_request.go
File metadata and controls
452 lines (381 loc) · 11.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
/*
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 GoalRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GoalRequest{}
// GoalRequest struct for GoalRequest
type GoalRequest struct {
// Unique identifier of the account for the goal.
AccountGuid string `json:"account_guid"`
// Amount of the goal.
Amount float32 `json:"amount"`
// The goal type.
GoalTypeName string `json:"goal_type_name"`
// The category of the goal.
MetaTypeName string `json:"meta_type_name"`
// The name of the goal.
Name string `json:"name"`
// 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"`
// Date and time the goal is to complete. Intended for users to set their own goal completion dates.
TargetedToCompleteAt *string `json:"targeted_to_complete_at,omitempty"`
}
// NewGoalRequest instantiates a new GoalRequest 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 NewGoalRequest(accountGuid string, amount float32, goalTypeName string, metaTypeName string, name string) *GoalRequest {
this := GoalRequest{}
this.AccountGuid = accountGuid
this.Amount = amount
this.GoalTypeName = goalTypeName
this.MetaTypeName = metaTypeName
this.Name = name
return &this
}
// NewGoalRequestWithDefaults instantiates a new GoalRequest 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 NewGoalRequestWithDefaults() *GoalRequest {
this := GoalRequest{}
return &this
}
// GetAccountGuid returns the AccountGuid field value
func (o *GoalRequest) GetAccountGuid() string {
if o == nil {
var ret string
return ret
}
return o.AccountGuid
}
// GetAccountGuidOk returns a tuple with the AccountGuid field value
// and a boolean to check if the value has been set.
func (o *GoalRequest) GetAccountGuidOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.AccountGuid, true
}
// SetAccountGuid sets field value
func (o *GoalRequest) SetAccountGuid(v string) {
o.AccountGuid = v
}
// GetAmount returns the Amount field value
func (o *GoalRequest) GetAmount() float32 {
if o == nil {
var ret float32
return ret
}
return o.Amount
}
// GetAmountOk returns a tuple with the Amount field value
// and a boolean to check if the value has been set.
func (o *GoalRequest) GetAmountOk() (*float32, bool) {
if o == nil {
return nil, false
}
return &o.Amount, true
}
// SetAmount sets field value
func (o *GoalRequest) SetAmount(v float32) {
o.Amount = v
}
// GetGoalTypeName returns the GoalTypeName field value
func (o *GoalRequest) GetGoalTypeName() string {
if o == nil {
var ret string
return ret
}
return o.GoalTypeName
}
// GetGoalTypeNameOk returns a tuple with the GoalTypeName field value
// and a boolean to check if the value has been set.
func (o *GoalRequest) GetGoalTypeNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.GoalTypeName, true
}
// SetGoalTypeName sets field value
func (o *GoalRequest) SetGoalTypeName(v string) {
o.GoalTypeName = v
}
// GetMetaTypeName returns the MetaTypeName field value
func (o *GoalRequest) GetMetaTypeName() string {
if o == nil {
var ret string
return ret
}
return o.MetaTypeName
}
// GetMetaTypeNameOk returns a tuple with the MetaTypeName field value
// and a boolean to check if the value has been set.
func (o *GoalRequest) GetMetaTypeNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.MetaTypeName, true
}
// SetMetaTypeName sets field value
func (o *GoalRequest) SetMetaTypeName(v string) {
o.MetaTypeName = v
}
// GetName returns the Name field value
func (o *GoalRequest) 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 *GoalRequest) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *GoalRequest) SetName(v string) {
o.Name = v
}
// GetCompletedAt returns the CompletedAt field value if set, zero value otherwise.
func (o *GoalRequest) 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 *GoalRequest) 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 *GoalRequest) 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 *GoalRequest) SetCompletedAt(v string) {
o.CompletedAt = &v
}
// GetHasBeenSpent returns the HasBeenSpent field value if set, zero value otherwise.
func (o *GoalRequest) 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 *GoalRequest) 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 *GoalRequest) 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 *GoalRequest) SetHasBeenSpent(v bool) {
o.HasBeenSpent = &v
}
// GetIsComplete returns the IsComplete field value if set, zero value otherwise.
func (o *GoalRequest) 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 *GoalRequest) 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 *GoalRequest) 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 *GoalRequest) SetIsComplete(v bool) {
o.IsComplete = &v
}
// GetMetadata returns the Metadata field value if set, zero value otherwise.
func (o *GoalRequest) 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 *GoalRequest) 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 *GoalRequest) 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 *GoalRequest) SetMetadata(v string) {
o.Metadata = &v
}
// GetPosition returns the Position field value if set, zero value otherwise.
func (o *GoalRequest) 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 *GoalRequest) 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 *GoalRequest) 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 *GoalRequest) SetPosition(v int32) {
o.Position = &v
}
// GetTargetedToCompleteAt returns the TargetedToCompleteAt field value if set, zero value otherwise.
func (o *GoalRequest) 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 *GoalRequest) 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 *GoalRequest) 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 *GoalRequest) SetTargetedToCompleteAt(v string) {
o.TargetedToCompleteAt = &v
}
func (o GoalRequest) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GoalRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["account_guid"] = o.AccountGuid
toSerialize["amount"] = o.Amount
toSerialize["goal_type_name"] = o.GoalTypeName
toSerialize["meta_type_name"] = o.MetaTypeName
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.TargetedToCompleteAt) {
toSerialize["targeted_to_complete_at"] = o.TargetedToCompleteAt
}
return toSerialize, nil
}
type NullableGoalRequest struct {
value *GoalRequest
isSet bool
}
func (v NullableGoalRequest) Get() *GoalRequest {
return v.value
}
func (v *NullableGoalRequest) Set(val *GoalRequest) {
v.value = val
v.isSet = true
}
func (v NullableGoalRequest) IsSet() bool {
return v.isSet
}
func (v *NullableGoalRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGoalRequest(val *GoalRequest) *NullableGoalRequest {
return &NullableGoalRequest{value: val, isSet: true}
}
func (v NullableGoalRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGoalRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}