-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_authenticate_three_ds_session_request.go
481 lines (406 loc) · 17 KB
/
model_authenticate_three_ds_session_request.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
/*
Basis Theory API
## Getting Started * Sign-in to [Basis Theory](https://basistheory.com) and go to [Applications](https://portal.basistheory.com/applications) * Create a Basis Theory Private Application * All permissions should be selected * Paste the API Key into the `BT-API-KEY` variable
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package basistheory
import (
"encoding/json"
)
// checks if the AuthenticateThreeDSSessionRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AuthenticateThreeDSSessionRequest{}
// AuthenticateThreeDSSessionRequest struct for AuthenticateThreeDSSessionRequest
type AuthenticateThreeDSSessionRequest struct {
AuthenticationCategory string `json:"authentication_category"`
AuthenticationType string `json:"authentication_type"`
ChallengePreference NullableString `json:"challenge_preference,omitempty"`
RequestDecoupledChallenge *bool `json:"request_decoupled_challenge,omitempty"`
DecoupledChallengeMaxTime NullableInt32 `json:"decoupled_challenge_max_time,omitempty"`
PurchaseInfo *ThreeDSPurchaseInfo `json:"purchase_info,omitempty"`
MerchantInfo *ThreeDSMerchantInfo `json:"merchant_info,omitempty"`
RequestorInfo ThreeDSRequestorInfo `json:"requestor_info"`
CardholderInfo *ThreeDSCardholderInfo `json:"cardholder_info,omitempty"`
BroadcastInfo interface{} `json:"broadcast_info,omitempty"`
MessageExtensions []ThreeDSMessageExtension `json:"message_extensions,omitempty"`
}
// NewAuthenticateThreeDSSessionRequest instantiates a new AuthenticateThreeDSSessionRequest 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 NewAuthenticateThreeDSSessionRequest(authenticationCategory string, authenticationType string, requestorInfo ThreeDSRequestorInfo) *AuthenticateThreeDSSessionRequest {
this := AuthenticateThreeDSSessionRequest{}
this.AuthenticationCategory = authenticationCategory
this.AuthenticationType = authenticationType
this.RequestorInfo = requestorInfo
return &this
}
// NewAuthenticateThreeDSSessionRequestWithDefaults instantiates a new AuthenticateThreeDSSessionRequest 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 NewAuthenticateThreeDSSessionRequestWithDefaults() *AuthenticateThreeDSSessionRequest {
this := AuthenticateThreeDSSessionRequest{}
return &this
}
// GetAuthenticationCategory returns the AuthenticationCategory field value
func (o *AuthenticateThreeDSSessionRequest) GetAuthenticationCategory() string {
if o == nil {
var ret string
return ret
}
return o.AuthenticationCategory
}
// GetAuthenticationCategoryOk returns a tuple with the AuthenticationCategory field value
// and a boolean to check if the value has been set.
func (o *AuthenticateThreeDSSessionRequest) GetAuthenticationCategoryOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.AuthenticationCategory, true
}
// SetAuthenticationCategory sets field value
func (o *AuthenticateThreeDSSessionRequest) SetAuthenticationCategory(v string) {
o.AuthenticationCategory = v
}
// GetAuthenticationType returns the AuthenticationType field value
func (o *AuthenticateThreeDSSessionRequest) GetAuthenticationType() string {
if o == nil {
var ret string
return ret
}
return o.AuthenticationType
}
// GetAuthenticationTypeOk returns a tuple with the AuthenticationType field value
// and a boolean to check if the value has been set.
func (o *AuthenticateThreeDSSessionRequest) GetAuthenticationTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.AuthenticationType, true
}
// SetAuthenticationType sets field value
func (o *AuthenticateThreeDSSessionRequest) SetAuthenticationType(v string) {
o.AuthenticationType = v
}
// GetChallengePreference returns the ChallengePreference field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AuthenticateThreeDSSessionRequest) GetChallengePreference() string {
if o == nil || IsNil(o.ChallengePreference.Get()) {
var ret string
return ret
}
return *o.ChallengePreference.Get()
}
// GetChallengePreferenceOk returns a tuple with the ChallengePreference 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 *AuthenticateThreeDSSessionRequest) GetChallengePreferenceOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.ChallengePreference.Get(), o.ChallengePreference.IsSet()
}
// HasChallengePreference returns a boolean if a field is not nil.
func (o *AuthenticateThreeDSSessionRequest) HasChallengePreference() bool {
if o != nil && !IsNil(o.ChallengePreference) {
return true
}
return false
}
// SetChallengePreference gets a reference to the given NullableString and assigns it to the ChallengePreference field.
func (o *AuthenticateThreeDSSessionRequest) SetChallengePreference(v string) {
o.ChallengePreference.Set(&v)
}
// SetChallengePreferenceNil sets the value for ChallengePreference to be an explicit nil
func (o *AuthenticateThreeDSSessionRequest) SetChallengePreferenceNil() {
o.ChallengePreference.Set(nil)
}
// UnsetChallengePreference ensures that no value is present for ChallengePreference, not even an explicit nil
func (o *AuthenticateThreeDSSessionRequest) UnsetChallengePreference() {
o.ChallengePreference.Unset()
}
// GetRequestDecoupledChallenge returns the RequestDecoupledChallenge field value if set, zero value otherwise.
func (o *AuthenticateThreeDSSessionRequest) GetRequestDecoupledChallenge() bool {
if o == nil || IsNil(o.RequestDecoupledChallenge) {
var ret bool
return ret
}
return *o.RequestDecoupledChallenge
}
// GetRequestDecoupledChallengeOk returns a tuple with the RequestDecoupledChallenge field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AuthenticateThreeDSSessionRequest) GetRequestDecoupledChallengeOk() (*bool, bool) {
if o == nil || IsNil(o.RequestDecoupledChallenge) {
return nil, false
}
return o.RequestDecoupledChallenge, true
}
// HasRequestDecoupledChallenge returns a boolean if a field is not nil.
func (o *AuthenticateThreeDSSessionRequest) HasRequestDecoupledChallenge() bool {
if o != nil && !IsNil(o.RequestDecoupledChallenge) {
return true
}
return false
}
// SetRequestDecoupledChallenge gets a reference to the given bool and assigns it to the RequestDecoupledChallenge field.
func (o *AuthenticateThreeDSSessionRequest) SetRequestDecoupledChallenge(v bool) {
o.RequestDecoupledChallenge = &v
}
// GetDecoupledChallengeMaxTime returns the DecoupledChallengeMaxTime field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AuthenticateThreeDSSessionRequest) GetDecoupledChallengeMaxTime() int32 {
if o == nil || IsNil(o.DecoupledChallengeMaxTime.Get()) {
var ret int32
return ret
}
return *o.DecoupledChallengeMaxTime.Get()
}
// GetDecoupledChallengeMaxTimeOk returns a tuple with the DecoupledChallengeMaxTime 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 *AuthenticateThreeDSSessionRequest) GetDecoupledChallengeMaxTimeOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.DecoupledChallengeMaxTime.Get(), o.DecoupledChallengeMaxTime.IsSet()
}
// HasDecoupledChallengeMaxTime returns a boolean if a field is not nil.
func (o *AuthenticateThreeDSSessionRequest) HasDecoupledChallengeMaxTime() bool {
if o != nil && !IsNil(o.DecoupledChallengeMaxTime) {
return true
}
return false
}
// SetDecoupledChallengeMaxTime gets a reference to the given NullableInt32 and assigns it to the DecoupledChallengeMaxTime field.
func (o *AuthenticateThreeDSSessionRequest) SetDecoupledChallengeMaxTime(v int32) {
o.DecoupledChallengeMaxTime.Set(&v)
}
// SetDecoupledChallengeMaxTimeNil sets the value for DecoupledChallengeMaxTime to be an explicit nil
func (o *AuthenticateThreeDSSessionRequest) SetDecoupledChallengeMaxTimeNil() {
o.DecoupledChallengeMaxTime.Set(nil)
}
// UnsetDecoupledChallengeMaxTime ensures that no value is present for DecoupledChallengeMaxTime, not even an explicit nil
func (o *AuthenticateThreeDSSessionRequest) UnsetDecoupledChallengeMaxTime() {
o.DecoupledChallengeMaxTime.Unset()
}
// GetPurchaseInfo returns the PurchaseInfo field value if set, zero value otherwise.
func (o *AuthenticateThreeDSSessionRequest) GetPurchaseInfo() ThreeDSPurchaseInfo {
if o == nil || IsNil(o.PurchaseInfo) {
var ret ThreeDSPurchaseInfo
return ret
}
return *o.PurchaseInfo
}
// GetPurchaseInfoOk returns a tuple with the PurchaseInfo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AuthenticateThreeDSSessionRequest) GetPurchaseInfoOk() (*ThreeDSPurchaseInfo, bool) {
if o == nil || IsNil(o.PurchaseInfo) {
return nil, false
}
return o.PurchaseInfo, true
}
// HasPurchaseInfo returns a boolean if a field is not nil.
func (o *AuthenticateThreeDSSessionRequest) HasPurchaseInfo() bool {
if o != nil && !IsNil(o.PurchaseInfo) {
return true
}
return false
}
// SetPurchaseInfo gets a reference to the given ThreeDSPurchaseInfo and assigns it to the PurchaseInfo field.
func (o *AuthenticateThreeDSSessionRequest) SetPurchaseInfo(v ThreeDSPurchaseInfo) {
o.PurchaseInfo = &v
}
// GetMerchantInfo returns the MerchantInfo field value if set, zero value otherwise.
func (o *AuthenticateThreeDSSessionRequest) GetMerchantInfo() ThreeDSMerchantInfo {
if o == nil || IsNil(o.MerchantInfo) {
var ret ThreeDSMerchantInfo
return ret
}
return *o.MerchantInfo
}
// GetMerchantInfoOk returns a tuple with the MerchantInfo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AuthenticateThreeDSSessionRequest) GetMerchantInfoOk() (*ThreeDSMerchantInfo, bool) {
if o == nil || IsNil(o.MerchantInfo) {
return nil, false
}
return o.MerchantInfo, true
}
// HasMerchantInfo returns a boolean if a field is not nil.
func (o *AuthenticateThreeDSSessionRequest) HasMerchantInfo() bool {
if o != nil && !IsNil(o.MerchantInfo) {
return true
}
return false
}
// SetMerchantInfo gets a reference to the given ThreeDSMerchantInfo and assigns it to the MerchantInfo field.
func (o *AuthenticateThreeDSSessionRequest) SetMerchantInfo(v ThreeDSMerchantInfo) {
o.MerchantInfo = &v
}
// GetRequestorInfo returns the RequestorInfo field value
func (o *AuthenticateThreeDSSessionRequest) GetRequestorInfo() ThreeDSRequestorInfo {
if o == nil {
var ret ThreeDSRequestorInfo
return ret
}
return o.RequestorInfo
}
// GetRequestorInfoOk returns a tuple with the RequestorInfo field value
// and a boolean to check if the value has been set.
func (o *AuthenticateThreeDSSessionRequest) GetRequestorInfoOk() (*ThreeDSRequestorInfo, bool) {
if o == nil {
return nil, false
}
return &o.RequestorInfo, true
}
// SetRequestorInfo sets field value
func (o *AuthenticateThreeDSSessionRequest) SetRequestorInfo(v ThreeDSRequestorInfo) {
o.RequestorInfo = v
}
// GetCardholderInfo returns the CardholderInfo field value if set, zero value otherwise.
func (o *AuthenticateThreeDSSessionRequest) GetCardholderInfo() ThreeDSCardholderInfo {
if o == nil || IsNil(o.CardholderInfo) {
var ret ThreeDSCardholderInfo
return ret
}
return *o.CardholderInfo
}
// GetCardholderInfoOk returns a tuple with the CardholderInfo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AuthenticateThreeDSSessionRequest) GetCardholderInfoOk() (*ThreeDSCardholderInfo, bool) {
if o == nil || IsNil(o.CardholderInfo) {
return nil, false
}
return o.CardholderInfo, true
}
// HasCardholderInfo returns a boolean if a field is not nil.
func (o *AuthenticateThreeDSSessionRequest) HasCardholderInfo() bool {
if o != nil && !IsNil(o.CardholderInfo) {
return true
}
return false
}
// SetCardholderInfo gets a reference to the given ThreeDSCardholderInfo and assigns it to the CardholderInfo field.
func (o *AuthenticateThreeDSSessionRequest) SetCardholderInfo(v ThreeDSCardholderInfo) {
o.CardholderInfo = &v
}
// GetBroadcastInfo returns the BroadcastInfo field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AuthenticateThreeDSSessionRequest) GetBroadcastInfo() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.BroadcastInfo
}
// GetBroadcastInfoOk returns a tuple with the BroadcastInfo 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 *AuthenticateThreeDSSessionRequest) GetBroadcastInfoOk() (*interface{}, bool) {
if o == nil || IsNil(o.BroadcastInfo) {
return nil, false
}
return &o.BroadcastInfo, true
}
// HasBroadcastInfo returns a boolean if a field is not nil.
func (o *AuthenticateThreeDSSessionRequest) HasBroadcastInfo() bool {
if o != nil && !IsNil(o.BroadcastInfo) {
return true
}
return false
}
// SetBroadcastInfo gets a reference to the given interface{} and assigns it to the BroadcastInfo field.
func (o *AuthenticateThreeDSSessionRequest) SetBroadcastInfo(v interface{}) {
o.BroadcastInfo = v
}
// GetMessageExtensions returns the MessageExtensions field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AuthenticateThreeDSSessionRequest) GetMessageExtensions() []ThreeDSMessageExtension {
if o == nil {
var ret []ThreeDSMessageExtension
return ret
}
return o.MessageExtensions
}
// GetMessageExtensionsOk returns a tuple with the MessageExtensions 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 *AuthenticateThreeDSSessionRequest) GetMessageExtensionsOk() ([]ThreeDSMessageExtension, bool) {
if o == nil || IsNil(o.MessageExtensions) {
return nil, false
}
return o.MessageExtensions, true
}
// HasMessageExtensions returns a boolean if a field is not nil.
func (o *AuthenticateThreeDSSessionRequest) HasMessageExtensions() bool {
if o != nil && !IsNil(o.MessageExtensions) {
return true
}
return false
}
// SetMessageExtensions gets a reference to the given []ThreeDSMessageExtension and assigns it to the MessageExtensions field.
func (o *AuthenticateThreeDSSessionRequest) SetMessageExtensions(v []ThreeDSMessageExtension) {
o.MessageExtensions = v
}
func (o AuthenticateThreeDSSessionRequest) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AuthenticateThreeDSSessionRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["authentication_category"] = o.AuthenticationCategory
toSerialize["authentication_type"] = o.AuthenticationType
if o.ChallengePreference.IsSet() {
toSerialize["challenge_preference"] = o.ChallengePreference.Get()
}
if !IsNil(o.RequestDecoupledChallenge) {
toSerialize["request_decoupled_challenge"] = o.RequestDecoupledChallenge
}
if o.DecoupledChallengeMaxTime.IsSet() {
toSerialize["decoupled_challenge_max_time"] = o.DecoupledChallengeMaxTime.Get()
}
if !IsNil(o.PurchaseInfo) {
toSerialize["purchase_info"] = o.PurchaseInfo
}
if !IsNil(o.MerchantInfo) {
toSerialize["merchant_info"] = o.MerchantInfo
}
toSerialize["requestor_info"] = o.RequestorInfo
if !IsNil(o.CardholderInfo) {
toSerialize["cardholder_info"] = o.CardholderInfo
}
if o.BroadcastInfo != nil {
toSerialize["broadcast_info"] = o.BroadcastInfo
}
if o.MessageExtensions != nil {
toSerialize["message_extensions"] = o.MessageExtensions
}
return toSerialize, nil
}
type NullableAuthenticateThreeDSSessionRequest struct {
value *AuthenticateThreeDSSessionRequest
isSet bool
}
func (v NullableAuthenticateThreeDSSessionRequest) Get() *AuthenticateThreeDSSessionRequest {
return v.value
}
func (v *NullableAuthenticateThreeDSSessionRequest) Set(val *AuthenticateThreeDSSessionRequest) {
v.value = val
v.isSet = true
}
func (v NullableAuthenticateThreeDSSessionRequest) IsSet() bool {
return v.isSet
}
func (v *NullableAuthenticateThreeDSSessionRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAuthenticateThreeDSSessionRequest(val *AuthenticateThreeDSSessionRequest) *NullableAuthenticateThreeDSSessionRequest {
return &NullableAuthenticateThreeDSSessionRequest{value: val, isSet: true}
}
func (v NullableAuthenticateThreeDSSessionRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAuthenticateThreeDSSessionRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}