-
Notifications
You must be signed in to change notification settings - Fork 88
/
model_institution_status.go
520 lines (442 loc) · 17.3 KB
/
model_institution_status.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
/*
* The Plaid API
*
* The Plaid REST API. Please see https://plaid.com/docs/api for more details.
*
* API version: 2020-09-14_1.508.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package plaid
import (
"encoding/json"
)
// InstitutionStatus The status of an institution is determined by the health of its Item logins, Transactions updates, Investments updates, Liabilities updates, Auth requests, Balance requests, Identity requests, Investments requests, and Liabilities requests. A login attempt is conducted during the initial Item add in Link. If there is not enough traffic to accurately calculate an institution's status, Plaid will return null rather than potentially inaccurate data. Institution status is accessible in the Dashboard and via the API using the `/institutions/get_by_id` endpoint with the `include_status` option set to true. Note that institution status is not available in the Sandbox environment.
type InstitutionStatus struct {
ItemLogins NullableProductStatus `json:"item_logins,omitempty"`
TransactionsUpdates NullableProductStatus `json:"transactions_updates,omitempty"`
Auth NullableProductStatus `json:"auth,omitempty"`
Identity NullableProductStatus `json:"identity,omitempty"`
InvestmentsUpdates NullableProductStatus `json:"investments_updates,omitempty"`
LiabilitiesUpdates NullableProductStatus `json:"liabilities_updates,omitempty"`
Liabilities NullableProductStatus `json:"liabilities,omitempty"`
Investments NullableProductStatus `json:"investments,omitempty"`
// Details of recent health incidents associated with the institution.
HealthIncidents []HealthIncident `json:"health_incidents,omitempty"`
AdditionalProperties map[string]interface{}
}
type _InstitutionStatus InstitutionStatus
// NewInstitutionStatus instantiates a new InstitutionStatus 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 NewInstitutionStatus() *InstitutionStatus {
this := InstitutionStatus{}
return &this
}
// NewInstitutionStatusWithDefaults instantiates a new InstitutionStatus 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 NewInstitutionStatusWithDefaults() *InstitutionStatus {
this := InstitutionStatus{}
return &this
}
// GetItemLogins returns the ItemLogins field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *InstitutionStatus) GetItemLogins() ProductStatus {
if o == nil || o.ItemLogins.Get() == nil {
var ret ProductStatus
return ret
}
return *o.ItemLogins.Get()
}
// GetItemLoginsOk returns a tuple with the ItemLogins 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 *InstitutionStatus) GetItemLoginsOk() (*ProductStatus, bool) {
if o == nil {
return nil, false
}
return o.ItemLogins.Get(), o.ItemLogins.IsSet()
}
// HasItemLogins returns a boolean if a field has been set.
func (o *InstitutionStatus) HasItemLogins() bool {
if o != nil && o.ItemLogins.IsSet() {
return true
}
return false
}
// SetItemLogins gets a reference to the given NullableProductStatus and assigns it to the ItemLogins field.
func (o *InstitutionStatus) SetItemLogins(v ProductStatus) {
o.ItemLogins.Set(&v)
}
// SetItemLoginsNil sets the value for ItemLogins to be an explicit nil
func (o *InstitutionStatus) SetItemLoginsNil() {
o.ItemLogins.Set(nil)
}
// UnsetItemLogins ensures that no value is present for ItemLogins, not even an explicit nil
func (o *InstitutionStatus) UnsetItemLogins() {
o.ItemLogins.Unset()
}
// GetTransactionsUpdates returns the TransactionsUpdates field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *InstitutionStatus) GetTransactionsUpdates() ProductStatus {
if o == nil || o.TransactionsUpdates.Get() == nil {
var ret ProductStatus
return ret
}
return *o.TransactionsUpdates.Get()
}
// GetTransactionsUpdatesOk returns a tuple with the TransactionsUpdates 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 *InstitutionStatus) GetTransactionsUpdatesOk() (*ProductStatus, bool) {
if o == nil {
return nil, false
}
return o.TransactionsUpdates.Get(), o.TransactionsUpdates.IsSet()
}
// HasTransactionsUpdates returns a boolean if a field has been set.
func (o *InstitutionStatus) HasTransactionsUpdates() bool {
if o != nil && o.TransactionsUpdates.IsSet() {
return true
}
return false
}
// SetTransactionsUpdates gets a reference to the given NullableProductStatus and assigns it to the TransactionsUpdates field.
func (o *InstitutionStatus) SetTransactionsUpdates(v ProductStatus) {
o.TransactionsUpdates.Set(&v)
}
// SetTransactionsUpdatesNil sets the value for TransactionsUpdates to be an explicit nil
func (o *InstitutionStatus) SetTransactionsUpdatesNil() {
o.TransactionsUpdates.Set(nil)
}
// UnsetTransactionsUpdates ensures that no value is present for TransactionsUpdates, not even an explicit nil
func (o *InstitutionStatus) UnsetTransactionsUpdates() {
o.TransactionsUpdates.Unset()
}
// GetAuth returns the Auth field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *InstitutionStatus) GetAuth() ProductStatus {
if o == nil || o.Auth.Get() == nil {
var ret ProductStatus
return ret
}
return *o.Auth.Get()
}
// GetAuthOk returns a tuple with the Auth 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 *InstitutionStatus) GetAuthOk() (*ProductStatus, bool) {
if o == nil {
return nil, false
}
return o.Auth.Get(), o.Auth.IsSet()
}
// HasAuth returns a boolean if a field has been set.
func (o *InstitutionStatus) HasAuth() bool {
if o != nil && o.Auth.IsSet() {
return true
}
return false
}
// SetAuth gets a reference to the given NullableProductStatus and assigns it to the Auth field.
func (o *InstitutionStatus) SetAuth(v ProductStatus) {
o.Auth.Set(&v)
}
// SetAuthNil sets the value for Auth to be an explicit nil
func (o *InstitutionStatus) SetAuthNil() {
o.Auth.Set(nil)
}
// UnsetAuth ensures that no value is present for Auth, not even an explicit nil
func (o *InstitutionStatus) UnsetAuth() {
o.Auth.Unset()
}
// GetIdentity returns the Identity field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *InstitutionStatus) GetIdentity() ProductStatus {
if o == nil || o.Identity.Get() == nil {
var ret ProductStatus
return ret
}
return *o.Identity.Get()
}
// GetIdentityOk returns a tuple with the Identity 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 *InstitutionStatus) GetIdentityOk() (*ProductStatus, bool) {
if o == nil {
return nil, false
}
return o.Identity.Get(), o.Identity.IsSet()
}
// HasIdentity returns a boolean if a field has been set.
func (o *InstitutionStatus) HasIdentity() bool {
if o != nil && o.Identity.IsSet() {
return true
}
return false
}
// SetIdentity gets a reference to the given NullableProductStatus and assigns it to the Identity field.
func (o *InstitutionStatus) SetIdentity(v ProductStatus) {
o.Identity.Set(&v)
}
// SetIdentityNil sets the value for Identity to be an explicit nil
func (o *InstitutionStatus) SetIdentityNil() {
o.Identity.Set(nil)
}
// UnsetIdentity ensures that no value is present for Identity, not even an explicit nil
func (o *InstitutionStatus) UnsetIdentity() {
o.Identity.Unset()
}
// GetInvestmentsUpdates returns the InvestmentsUpdates field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *InstitutionStatus) GetInvestmentsUpdates() ProductStatus {
if o == nil || o.InvestmentsUpdates.Get() == nil {
var ret ProductStatus
return ret
}
return *o.InvestmentsUpdates.Get()
}
// GetInvestmentsUpdatesOk returns a tuple with the InvestmentsUpdates 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 *InstitutionStatus) GetInvestmentsUpdatesOk() (*ProductStatus, bool) {
if o == nil {
return nil, false
}
return o.InvestmentsUpdates.Get(), o.InvestmentsUpdates.IsSet()
}
// HasInvestmentsUpdates returns a boolean if a field has been set.
func (o *InstitutionStatus) HasInvestmentsUpdates() bool {
if o != nil && o.InvestmentsUpdates.IsSet() {
return true
}
return false
}
// SetInvestmentsUpdates gets a reference to the given NullableProductStatus and assigns it to the InvestmentsUpdates field.
func (o *InstitutionStatus) SetInvestmentsUpdates(v ProductStatus) {
o.InvestmentsUpdates.Set(&v)
}
// SetInvestmentsUpdatesNil sets the value for InvestmentsUpdates to be an explicit nil
func (o *InstitutionStatus) SetInvestmentsUpdatesNil() {
o.InvestmentsUpdates.Set(nil)
}
// UnsetInvestmentsUpdates ensures that no value is present for InvestmentsUpdates, not even an explicit nil
func (o *InstitutionStatus) UnsetInvestmentsUpdates() {
o.InvestmentsUpdates.Unset()
}
// GetLiabilitiesUpdates returns the LiabilitiesUpdates field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *InstitutionStatus) GetLiabilitiesUpdates() ProductStatus {
if o == nil || o.LiabilitiesUpdates.Get() == nil {
var ret ProductStatus
return ret
}
return *o.LiabilitiesUpdates.Get()
}
// GetLiabilitiesUpdatesOk returns a tuple with the LiabilitiesUpdates 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 *InstitutionStatus) GetLiabilitiesUpdatesOk() (*ProductStatus, bool) {
if o == nil {
return nil, false
}
return o.LiabilitiesUpdates.Get(), o.LiabilitiesUpdates.IsSet()
}
// HasLiabilitiesUpdates returns a boolean if a field has been set.
func (o *InstitutionStatus) HasLiabilitiesUpdates() bool {
if o != nil && o.LiabilitiesUpdates.IsSet() {
return true
}
return false
}
// SetLiabilitiesUpdates gets a reference to the given NullableProductStatus and assigns it to the LiabilitiesUpdates field.
func (o *InstitutionStatus) SetLiabilitiesUpdates(v ProductStatus) {
o.LiabilitiesUpdates.Set(&v)
}
// SetLiabilitiesUpdatesNil sets the value for LiabilitiesUpdates to be an explicit nil
func (o *InstitutionStatus) SetLiabilitiesUpdatesNil() {
o.LiabilitiesUpdates.Set(nil)
}
// UnsetLiabilitiesUpdates ensures that no value is present for LiabilitiesUpdates, not even an explicit nil
func (o *InstitutionStatus) UnsetLiabilitiesUpdates() {
o.LiabilitiesUpdates.Unset()
}
// GetLiabilities returns the Liabilities field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *InstitutionStatus) GetLiabilities() ProductStatus {
if o == nil || o.Liabilities.Get() == nil {
var ret ProductStatus
return ret
}
return *o.Liabilities.Get()
}
// GetLiabilitiesOk returns a tuple with the Liabilities 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 *InstitutionStatus) GetLiabilitiesOk() (*ProductStatus, bool) {
if o == nil {
return nil, false
}
return o.Liabilities.Get(), o.Liabilities.IsSet()
}
// HasLiabilities returns a boolean if a field has been set.
func (o *InstitutionStatus) HasLiabilities() bool {
if o != nil && o.Liabilities.IsSet() {
return true
}
return false
}
// SetLiabilities gets a reference to the given NullableProductStatus and assigns it to the Liabilities field.
func (o *InstitutionStatus) SetLiabilities(v ProductStatus) {
o.Liabilities.Set(&v)
}
// SetLiabilitiesNil sets the value for Liabilities to be an explicit nil
func (o *InstitutionStatus) SetLiabilitiesNil() {
o.Liabilities.Set(nil)
}
// UnsetLiabilities ensures that no value is present for Liabilities, not even an explicit nil
func (o *InstitutionStatus) UnsetLiabilities() {
o.Liabilities.Unset()
}
// GetInvestments returns the Investments field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *InstitutionStatus) GetInvestments() ProductStatus {
if o == nil || o.Investments.Get() == nil {
var ret ProductStatus
return ret
}
return *o.Investments.Get()
}
// GetInvestmentsOk returns a tuple with the Investments 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 *InstitutionStatus) GetInvestmentsOk() (*ProductStatus, bool) {
if o == nil {
return nil, false
}
return o.Investments.Get(), o.Investments.IsSet()
}
// HasInvestments returns a boolean if a field has been set.
func (o *InstitutionStatus) HasInvestments() bool {
if o != nil && o.Investments.IsSet() {
return true
}
return false
}
// SetInvestments gets a reference to the given NullableProductStatus and assigns it to the Investments field.
func (o *InstitutionStatus) SetInvestments(v ProductStatus) {
o.Investments.Set(&v)
}
// SetInvestmentsNil sets the value for Investments to be an explicit nil
func (o *InstitutionStatus) SetInvestmentsNil() {
o.Investments.Set(nil)
}
// UnsetInvestments ensures that no value is present for Investments, not even an explicit nil
func (o *InstitutionStatus) UnsetInvestments() {
o.Investments.Unset()
}
// GetHealthIncidents returns the HealthIncidents field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *InstitutionStatus) GetHealthIncidents() []HealthIncident {
if o == nil {
var ret []HealthIncident
return ret
}
return o.HealthIncidents
}
// GetHealthIncidentsOk returns a tuple with the HealthIncidents 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 *InstitutionStatus) GetHealthIncidentsOk() (*[]HealthIncident, bool) {
if o == nil || o.HealthIncidents == nil {
return nil, false
}
return &o.HealthIncidents, true
}
// HasHealthIncidents returns a boolean if a field has been set.
func (o *InstitutionStatus) HasHealthIncidents() bool {
if o != nil && o.HealthIncidents != nil {
return true
}
return false
}
// SetHealthIncidents gets a reference to the given []HealthIncident and assigns it to the HealthIncidents field.
func (o *InstitutionStatus) SetHealthIncidents(v []HealthIncident) {
o.HealthIncidents = v
}
func (o InstitutionStatus) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.ItemLogins.IsSet() {
toSerialize["item_logins"] = o.ItemLogins.Get()
}
if o.TransactionsUpdates.IsSet() {
toSerialize["transactions_updates"] = o.TransactionsUpdates.Get()
}
if o.Auth.IsSet() {
toSerialize["auth"] = o.Auth.Get()
}
if o.Identity.IsSet() {
toSerialize["identity"] = o.Identity.Get()
}
if o.InvestmentsUpdates.IsSet() {
toSerialize["investments_updates"] = o.InvestmentsUpdates.Get()
}
if o.LiabilitiesUpdates.IsSet() {
toSerialize["liabilities_updates"] = o.LiabilitiesUpdates.Get()
}
if o.Liabilities.IsSet() {
toSerialize["liabilities"] = o.Liabilities.Get()
}
if o.Investments.IsSet() {
toSerialize["investments"] = o.Investments.Get()
}
if o.HealthIncidents != nil {
toSerialize["health_incidents"] = o.HealthIncidents
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *InstitutionStatus) UnmarshalJSON(bytes []byte) (err error) {
varInstitutionStatus := _InstitutionStatus{}
if err = json.Unmarshal(bytes, &varInstitutionStatus); err == nil {
*o = InstitutionStatus(varInstitutionStatus)
} else {
return err
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "item_logins")
delete(additionalProperties, "transactions_updates")
delete(additionalProperties, "auth")
delete(additionalProperties, "identity")
delete(additionalProperties, "investments_updates")
delete(additionalProperties, "liabilities_updates")
delete(additionalProperties, "liabilities")
delete(additionalProperties, "investments")
delete(additionalProperties, "health_incidents")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableInstitutionStatus struct {
value *InstitutionStatus
isSet bool
}
func (v NullableInstitutionStatus) Get() *InstitutionStatus {
return v.value
}
func (v *NullableInstitutionStatus) Set(val *InstitutionStatus) {
v.value = val
v.isSet = true
}
func (v NullableInstitutionStatus) IsSet() bool {
return v.isSet
}
func (v *NullableInstitutionStatus) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInstitutionStatus(val *InstitutionStatus) *NullableInstitutionStatus {
return &NullableInstitutionStatus{value: val, isSet: true}
}
func (v NullableInstitutionStatus) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInstitutionStatus) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}