-
Notifications
You must be signed in to change notification settings - Fork 88
/
model_link_session_finished_webhook.go
328 lines (274 loc) · 8.86 KB
/
model_link_session_finished_webhook.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
/*
* 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"
)
// LinkSessionFinishedWebhook Contains the state of a completed Link session, along with the public token if available.
type LinkSessionFinishedWebhook struct {
// `LINK`
WebhookType string `json:"webhook_type"`
// `SESSION_FINISHED`
WebhookCode string `json:"webhook_code"`
// The final status of the Link session. Will always be \"SUCCESS\" or \"EXITED\".
Status string `json:"status"`
// The identifier for the Link session.
LinkSessionId string `json:"link_session_id"`
// The link token used to create the Link session.
LinkToken string `json:"link_token"`
// The public token generated by the Link session.
PublicToken *string `json:"public_token,omitempty"`
Environment WebhookEnvironmentValues `json:"environment"`
AdditionalProperties map[string]interface{}
}
type _LinkSessionFinishedWebhook LinkSessionFinishedWebhook
// NewLinkSessionFinishedWebhook instantiates a new LinkSessionFinishedWebhook 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 NewLinkSessionFinishedWebhook(webhookType string, webhookCode string, status string, linkSessionId string, linkToken string, environment WebhookEnvironmentValues) *LinkSessionFinishedWebhook {
this := LinkSessionFinishedWebhook{}
this.WebhookType = webhookType
this.WebhookCode = webhookCode
this.Status = status
this.LinkSessionId = linkSessionId
this.LinkToken = linkToken
this.Environment = environment
return &this
}
// NewLinkSessionFinishedWebhookWithDefaults instantiates a new LinkSessionFinishedWebhook 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 NewLinkSessionFinishedWebhookWithDefaults() *LinkSessionFinishedWebhook {
this := LinkSessionFinishedWebhook{}
return &this
}
// GetWebhookType returns the WebhookType field value
func (o *LinkSessionFinishedWebhook) GetWebhookType() string {
if o == nil {
var ret string
return ret
}
return o.WebhookType
}
// GetWebhookTypeOk returns a tuple with the WebhookType field value
// and a boolean to check if the value has been set.
func (o *LinkSessionFinishedWebhook) GetWebhookTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.WebhookType, true
}
// SetWebhookType sets field value
func (o *LinkSessionFinishedWebhook) SetWebhookType(v string) {
o.WebhookType = v
}
// GetWebhookCode returns the WebhookCode field value
func (o *LinkSessionFinishedWebhook) GetWebhookCode() string {
if o == nil {
var ret string
return ret
}
return o.WebhookCode
}
// GetWebhookCodeOk returns a tuple with the WebhookCode field value
// and a boolean to check if the value has been set.
func (o *LinkSessionFinishedWebhook) GetWebhookCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.WebhookCode, true
}
// SetWebhookCode sets field value
func (o *LinkSessionFinishedWebhook) SetWebhookCode(v string) {
o.WebhookCode = v
}
// GetStatus returns the Status field value
func (o *LinkSessionFinishedWebhook) GetStatus() string {
if o == nil {
var ret string
return ret
}
return o.Status
}
// GetStatusOk returns a tuple with the Status field value
// and a boolean to check if the value has been set.
func (o *LinkSessionFinishedWebhook) GetStatusOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Status, true
}
// SetStatus sets field value
func (o *LinkSessionFinishedWebhook) SetStatus(v string) {
o.Status = v
}
// GetLinkSessionId returns the LinkSessionId field value
func (o *LinkSessionFinishedWebhook) GetLinkSessionId() string {
if o == nil {
var ret string
return ret
}
return o.LinkSessionId
}
// GetLinkSessionIdOk returns a tuple with the LinkSessionId field value
// and a boolean to check if the value has been set.
func (o *LinkSessionFinishedWebhook) GetLinkSessionIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.LinkSessionId, true
}
// SetLinkSessionId sets field value
func (o *LinkSessionFinishedWebhook) SetLinkSessionId(v string) {
o.LinkSessionId = v
}
// GetLinkToken returns the LinkToken field value
func (o *LinkSessionFinishedWebhook) GetLinkToken() string {
if o == nil {
var ret string
return ret
}
return o.LinkToken
}
// GetLinkTokenOk returns a tuple with the LinkToken field value
// and a boolean to check if the value has been set.
func (o *LinkSessionFinishedWebhook) GetLinkTokenOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.LinkToken, true
}
// SetLinkToken sets field value
func (o *LinkSessionFinishedWebhook) SetLinkToken(v string) {
o.LinkToken = v
}
// GetPublicToken returns the PublicToken field value if set, zero value otherwise.
func (o *LinkSessionFinishedWebhook) GetPublicToken() string {
if o == nil || o.PublicToken == nil {
var ret string
return ret
}
return *o.PublicToken
}
// GetPublicTokenOk returns a tuple with the PublicToken field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LinkSessionFinishedWebhook) GetPublicTokenOk() (*string, bool) {
if o == nil || o.PublicToken == nil {
return nil, false
}
return o.PublicToken, true
}
// HasPublicToken returns a boolean if a field has been set.
func (o *LinkSessionFinishedWebhook) HasPublicToken() bool {
if o != nil && o.PublicToken != nil {
return true
}
return false
}
// SetPublicToken gets a reference to the given string and assigns it to the PublicToken field.
func (o *LinkSessionFinishedWebhook) SetPublicToken(v string) {
o.PublicToken = &v
}
// GetEnvironment returns the Environment field value
func (o *LinkSessionFinishedWebhook) GetEnvironment() WebhookEnvironmentValues {
if o == nil {
var ret WebhookEnvironmentValues
return ret
}
return o.Environment
}
// GetEnvironmentOk returns a tuple with the Environment field value
// and a boolean to check if the value has been set.
func (o *LinkSessionFinishedWebhook) GetEnvironmentOk() (*WebhookEnvironmentValues, bool) {
if o == nil {
return nil, false
}
return &o.Environment, true
}
// SetEnvironment sets field value
func (o *LinkSessionFinishedWebhook) SetEnvironment(v WebhookEnvironmentValues) {
o.Environment = v
}
func (o LinkSessionFinishedWebhook) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["webhook_type"] = o.WebhookType
}
if true {
toSerialize["webhook_code"] = o.WebhookCode
}
if true {
toSerialize["status"] = o.Status
}
if true {
toSerialize["link_session_id"] = o.LinkSessionId
}
if true {
toSerialize["link_token"] = o.LinkToken
}
if o.PublicToken != nil {
toSerialize["public_token"] = o.PublicToken
}
if true {
toSerialize["environment"] = o.Environment
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *LinkSessionFinishedWebhook) UnmarshalJSON(bytes []byte) (err error) {
varLinkSessionFinishedWebhook := _LinkSessionFinishedWebhook{}
if err = json.Unmarshal(bytes, &varLinkSessionFinishedWebhook); err == nil {
*o = LinkSessionFinishedWebhook(varLinkSessionFinishedWebhook)
} else {
return err
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "webhook_type")
delete(additionalProperties, "webhook_code")
delete(additionalProperties, "status")
delete(additionalProperties, "link_session_id")
delete(additionalProperties, "link_token")
delete(additionalProperties, "public_token")
delete(additionalProperties, "environment")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableLinkSessionFinishedWebhook struct {
value *LinkSessionFinishedWebhook
isSet bool
}
func (v NullableLinkSessionFinishedWebhook) Get() *LinkSessionFinishedWebhook {
return v.value
}
func (v *NullableLinkSessionFinishedWebhook) Set(val *LinkSessionFinishedWebhook) {
v.value = val
v.isSet = true
}
func (v NullableLinkSessionFinishedWebhook) IsSet() bool {
return v.isSet
}
func (v *NullableLinkSessionFinishedWebhook) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLinkSessionFinishedWebhook(val *LinkSessionFinishedWebhook) *NullableLinkSessionFinishedWebhook {
return &NullableLinkSessionFinishedWebhook{value: val, isSet: true}
}
func (v NullableLinkSessionFinishedWebhook) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLinkSessionFinishedWebhook) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}