/
model_funds_type.go
376 lines (317 loc) · 10.1 KB
/
model_funds_type.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
/*
BAI2 API
Moov Bai2 ([Automated Clearing House](https://en.wikipedia.org/wiki/Automated_Clearing_House)) implements an HTTP API for creating, parsing and validating Bais files. BAI2- a widely accepted and used Bank Statement Format for Bank Reconciliation.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package client
import (
"encoding/json"
)
// checks if the FundsType type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &FundsType{}
// FundsType struct for FundsType
type FundsType struct {
TypeCode *string `json:"type_code,omitempty"`
Date *string `json:"date,omitempty"`
Time *string `json:"time,omitempty"`
ImmediateAmount *string `json:"immediate_amount,omitempty"`
OneDayAmount *string `json:"one_day_amount,omitempty"`
TwoDayAmount *string `json:"two_day_amount,omitempty"`
DistributionNumber *int32 `json:"distribution_number,omitempty"`
Distributions []Distribution `json:"distributions,omitempty"`
}
// NewFundsType instantiates a new FundsType 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 NewFundsType() *FundsType {
this := FundsType{}
return &this
}
// NewFundsTypeWithDefaults instantiates a new FundsType 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 NewFundsTypeWithDefaults() *FundsType {
this := FundsType{}
return &this
}
// GetTypeCode returns the TypeCode field value if set, zero value otherwise.
func (o *FundsType) GetTypeCode() string {
if o == nil || IsNil(o.TypeCode) {
var ret string
return ret
}
return *o.TypeCode
}
// GetTypeCodeOk returns a tuple with the TypeCode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FundsType) GetTypeCodeOk() (*string, bool) {
if o == nil || IsNil(o.TypeCode) {
return nil, false
}
return o.TypeCode, true
}
// HasTypeCode returns a boolean if a field has been set.
func (o *FundsType) HasTypeCode() bool {
if o != nil && !IsNil(o.TypeCode) {
return true
}
return false
}
// SetTypeCode gets a reference to the given string and assigns it to the TypeCode field.
func (o *FundsType) SetTypeCode(v string) {
o.TypeCode = &v
}
// GetDate returns the Date field value if set, zero value otherwise.
func (o *FundsType) GetDate() string {
if o == nil || IsNil(o.Date) {
var ret string
return ret
}
return *o.Date
}
// GetDateOk returns a tuple with the Date field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FundsType) GetDateOk() (*string, bool) {
if o == nil || IsNil(o.Date) {
return nil, false
}
return o.Date, true
}
// HasDate returns a boolean if a field has been set.
func (o *FundsType) HasDate() bool {
if o != nil && !IsNil(o.Date) {
return true
}
return false
}
// SetDate gets a reference to the given string and assigns it to the Date field.
func (o *FundsType) SetDate(v string) {
o.Date = &v
}
// GetTime returns the Time field value if set, zero value otherwise.
func (o *FundsType) GetTime() string {
if o == nil || IsNil(o.Time) {
var ret string
return ret
}
return *o.Time
}
// GetTimeOk returns a tuple with the Time field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FundsType) GetTimeOk() (*string, bool) {
if o == nil || IsNil(o.Time) {
return nil, false
}
return o.Time, true
}
// HasTime returns a boolean if a field has been set.
func (o *FundsType) HasTime() bool {
if o != nil && !IsNil(o.Time) {
return true
}
return false
}
// SetTime gets a reference to the given string and assigns it to the Time field.
func (o *FundsType) SetTime(v string) {
o.Time = &v
}
// GetImmediateAmount returns the ImmediateAmount field value if set, zero value otherwise.
func (o *FundsType) GetImmediateAmount() string {
if o == nil || IsNil(o.ImmediateAmount) {
var ret string
return ret
}
return *o.ImmediateAmount
}
// GetImmediateAmountOk returns a tuple with the ImmediateAmount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FundsType) GetImmediateAmountOk() (*string, bool) {
if o == nil || IsNil(o.ImmediateAmount) {
return nil, false
}
return o.ImmediateAmount, true
}
// HasImmediateAmount returns a boolean if a field has been set.
func (o *FundsType) HasImmediateAmount() bool {
if o != nil && !IsNil(o.ImmediateAmount) {
return true
}
return false
}
// SetImmediateAmount gets a reference to the given string and assigns it to the ImmediateAmount field.
func (o *FundsType) SetImmediateAmount(v string) {
o.ImmediateAmount = &v
}
// GetOneDayAmount returns the OneDayAmount field value if set, zero value otherwise.
func (o *FundsType) GetOneDayAmount() string {
if o == nil || IsNil(o.OneDayAmount) {
var ret string
return ret
}
return *o.OneDayAmount
}
// GetOneDayAmountOk returns a tuple with the OneDayAmount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FundsType) GetOneDayAmountOk() (*string, bool) {
if o == nil || IsNil(o.OneDayAmount) {
return nil, false
}
return o.OneDayAmount, true
}
// HasOneDayAmount returns a boolean if a field has been set.
func (o *FundsType) HasOneDayAmount() bool {
if o != nil && !IsNil(o.OneDayAmount) {
return true
}
return false
}
// SetOneDayAmount gets a reference to the given string and assigns it to the OneDayAmount field.
func (o *FundsType) SetOneDayAmount(v string) {
o.OneDayAmount = &v
}
// GetTwoDayAmount returns the TwoDayAmount field value if set, zero value otherwise.
func (o *FundsType) GetTwoDayAmount() string {
if o == nil || IsNil(o.TwoDayAmount) {
var ret string
return ret
}
return *o.TwoDayAmount
}
// GetTwoDayAmountOk returns a tuple with the TwoDayAmount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FundsType) GetTwoDayAmountOk() (*string, bool) {
if o == nil || IsNil(o.TwoDayAmount) {
return nil, false
}
return o.TwoDayAmount, true
}
// HasTwoDayAmount returns a boolean if a field has been set.
func (o *FundsType) HasTwoDayAmount() bool {
if o != nil && !IsNil(o.TwoDayAmount) {
return true
}
return false
}
// SetTwoDayAmount gets a reference to the given string and assigns it to the TwoDayAmount field.
func (o *FundsType) SetTwoDayAmount(v string) {
o.TwoDayAmount = &v
}
// GetDistributionNumber returns the DistributionNumber field value if set, zero value otherwise.
func (o *FundsType) GetDistributionNumber() int32 {
if o == nil || IsNil(o.DistributionNumber) {
var ret int32
return ret
}
return *o.DistributionNumber
}
// GetDistributionNumberOk returns a tuple with the DistributionNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FundsType) GetDistributionNumberOk() (*int32, bool) {
if o == nil || IsNil(o.DistributionNumber) {
return nil, false
}
return o.DistributionNumber, true
}
// HasDistributionNumber returns a boolean if a field has been set.
func (o *FundsType) HasDistributionNumber() bool {
if o != nil && !IsNil(o.DistributionNumber) {
return true
}
return false
}
// SetDistributionNumber gets a reference to the given int32 and assigns it to the DistributionNumber field.
func (o *FundsType) SetDistributionNumber(v int32) {
o.DistributionNumber = &v
}
// GetDistributions returns the Distributions field value if set, zero value otherwise.
func (o *FundsType) GetDistributions() []Distribution {
if o == nil || IsNil(o.Distributions) {
var ret []Distribution
return ret
}
return o.Distributions
}
// GetDistributionsOk returns a tuple with the Distributions field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FundsType) GetDistributionsOk() ([]Distribution, bool) {
if o == nil || IsNil(o.Distributions) {
return nil, false
}
return o.Distributions, true
}
// HasDistributions returns a boolean if a field has been set.
func (o *FundsType) HasDistributions() bool {
if o != nil && !IsNil(o.Distributions) {
return true
}
return false
}
// SetDistributions gets a reference to the given []Distribution and assigns it to the Distributions field.
func (o *FundsType) SetDistributions(v []Distribution) {
o.Distributions = v
}
func (o FundsType) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o FundsType) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.TypeCode) {
toSerialize["type_code"] = o.TypeCode
}
if !IsNil(o.Date) {
toSerialize["date"] = o.Date
}
if !IsNil(o.Time) {
toSerialize["time"] = o.Time
}
if !IsNil(o.ImmediateAmount) {
toSerialize["immediate_amount"] = o.ImmediateAmount
}
if !IsNil(o.OneDayAmount) {
toSerialize["one_day_amount"] = o.OneDayAmount
}
if !IsNil(o.TwoDayAmount) {
toSerialize["two_day_amount"] = o.TwoDayAmount
}
if !IsNil(o.DistributionNumber) {
toSerialize["distribution_number"] = o.DistributionNumber
}
if !IsNil(o.Distributions) {
toSerialize["distributions"] = o.Distributions
}
return toSerialize, nil
}
type NullableFundsType struct {
value *FundsType
isSet bool
}
func (v NullableFundsType) Get() *FundsType {
return v.value
}
func (v *NullableFundsType) Set(val *FundsType) {
v.value = val
v.isSet = true
}
func (v NullableFundsType) IsSet() bool {
return v.isSet
}
func (v *NullableFundsType) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFundsType(val *FundsType) *NullableFundsType {
return &NullableFundsType{value: val, isSet: true}
}
func (v NullableFundsType) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFundsType) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}