This repository was archived by the owner on Jan 16, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel_reactor.go
More file actions
556 lines (470 loc) · 14.9 KB
/
model_reactor.go
File metadata and controls
556 lines (470 loc) · 14.9 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
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
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
/*
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"
"time"
)
// checks if the Reactor type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Reactor{}
// Reactor struct for Reactor
type Reactor struct {
Id *string `json:"id,omitempty"`
TenantId *string `json:"tenant_id,omitempty"`
Name NullableString `json:"name,omitempty"`
// Deprecated
Formula *ReactorFormula `json:"formula,omitempty"`
Code NullableString `json:"code,omitempty"`
Application *Application `json:"application,omitempty"`
CreatedBy NullableString `json:"created_by,omitempty"`
CreatedAt NullableTime `json:"created_at,omitempty"`
ModifiedBy NullableString `json:"modified_by,omitempty"`
ModifiedAt NullableTime `json:"modified_at,omitempty"`
Configuration map[string]string `json:"configuration,omitempty"`
}
// NewReactor instantiates a new Reactor 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 NewReactor() *Reactor {
this := Reactor{}
return &this
}
// NewReactorWithDefaults instantiates a new Reactor 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 NewReactorWithDefaults() *Reactor {
this := Reactor{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *Reactor) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Reactor) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field is not nil.
func (o *Reactor) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *Reactor) SetId(v string) {
o.Id = &v
}
// GetTenantId returns the TenantId field value if set, zero value otherwise.
func (o *Reactor) GetTenantId() string {
if o == nil || IsNil(o.TenantId) {
var ret string
return ret
}
return *o.TenantId
}
// GetTenantIdOk returns a tuple with the TenantId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Reactor) GetTenantIdOk() (*string, bool) {
if o == nil || IsNil(o.TenantId) {
return nil, false
}
return o.TenantId, true
}
// HasTenantId returns a boolean if a field is not nil.
func (o *Reactor) HasTenantId() bool {
if o != nil && !IsNil(o.TenantId) {
return true
}
return false
}
// SetTenantId gets a reference to the given string and assigns it to the TenantId field.
func (o *Reactor) SetTenantId(v string) {
o.TenantId = &v
}
// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Reactor) GetName() string {
if o == nil || IsNil(o.Name.Get()) {
var ret string
return ret
}
return *o.Name.Get()
}
// GetNameOk returns a tuple with the Name 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 *Reactor) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Name.Get(), o.Name.IsSet()
}
// HasName returns a boolean if a field is not nil.
func (o *Reactor) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given NullableString and assigns it to the Name field.
func (o *Reactor) SetName(v string) {
o.Name.Set(&v)
}
// SetNameNil sets the value for Name to be an explicit nil
func (o *Reactor) SetNameNil() {
o.Name.Set(nil)
}
// UnsetName ensures that no value is present for Name, not even an explicit nil
func (o *Reactor) UnsetName() {
o.Name.Unset()
}
// GetFormula returns the Formula field value if set, zero value otherwise.
// Deprecated
func (o *Reactor) GetFormula() ReactorFormula {
if o == nil || IsNil(o.Formula) {
var ret ReactorFormula
return ret
}
return *o.Formula
}
// GetFormulaOk returns a tuple with the Formula field value if set, nil otherwise
// and a boolean to check if the value has been set.
// Deprecated
func (o *Reactor) GetFormulaOk() (*ReactorFormula, bool) {
if o == nil || IsNil(o.Formula) {
return nil, false
}
return o.Formula, true
}
// HasFormula returns a boolean if a field is not nil.
func (o *Reactor) HasFormula() bool {
if o != nil && !IsNil(o.Formula) {
return true
}
return false
}
// SetFormula gets a reference to the given ReactorFormula and assigns it to the Formula field.
// Deprecated
func (o *Reactor) SetFormula(v ReactorFormula) {
o.Formula = &v
}
// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Reactor) GetCode() string {
if o == nil || IsNil(o.Code.Get()) {
var ret string
return ret
}
return *o.Code.Get()
}
// GetCodeOk returns a tuple with the Code 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 *Reactor) GetCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Code.Get(), o.Code.IsSet()
}
// HasCode returns a boolean if a field is not nil.
func (o *Reactor) HasCode() bool {
if o != nil && !IsNil(o.Code) {
return true
}
return false
}
// SetCode gets a reference to the given NullableString and assigns it to the Code field.
func (o *Reactor) SetCode(v string) {
o.Code.Set(&v)
}
// SetCodeNil sets the value for Code to be an explicit nil
func (o *Reactor) SetCodeNil() {
o.Code.Set(nil)
}
// UnsetCode ensures that no value is present for Code, not even an explicit nil
func (o *Reactor) UnsetCode() {
o.Code.Unset()
}
// GetApplication returns the Application field value if set, zero value otherwise.
func (o *Reactor) GetApplication() Application {
if o == nil || IsNil(o.Application) {
var ret Application
return ret
}
return *o.Application
}
// GetApplicationOk returns a tuple with the Application field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Reactor) GetApplicationOk() (*Application, bool) {
if o == nil || IsNil(o.Application) {
return nil, false
}
return o.Application, true
}
// HasApplication returns a boolean if a field is not nil.
func (o *Reactor) HasApplication() bool {
if o != nil && !IsNil(o.Application) {
return true
}
return false
}
// SetApplication gets a reference to the given Application and assigns it to the Application field.
func (o *Reactor) SetApplication(v Application) {
o.Application = &v
}
// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Reactor) GetCreatedBy() string {
if o == nil || IsNil(o.CreatedBy.Get()) {
var ret string
return ret
}
return *o.CreatedBy.Get()
}
// GetCreatedByOk returns a tuple with the CreatedBy 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 *Reactor) GetCreatedByOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.CreatedBy.Get(), o.CreatedBy.IsSet()
}
// HasCreatedBy returns a boolean if a field is not nil.
func (o *Reactor) HasCreatedBy() bool {
if o != nil && !IsNil(o.CreatedBy) {
return true
}
return false
}
// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field.
func (o *Reactor) SetCreatedBy(v string) {
o.CreatedBy.Set(&v)
}
// SetCreatedByNil sets the value for CreatedBy to be an explicit nil
func (o *Reactor) SetCreatedByNil() {
o.CreatedBy.Set(nil)
}
// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil
func (o *Reactor) UnsetCreatedBy() {
o.CreatedBy.Unset()
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Reactor) GetCreatedAt() time.Time {
if o == nil || IsNil(o.CreatedAt.Get()) {
var ret time.Time
return ret
}
return *o.CreatedAt.Get()
}
// GetCreatedAtOk returns a tuple with the CreatedAt 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 *Reactor) GetCreatedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return o.CreatedAt.Get(), o.CreatedAt.IsSet()
}
// HasCreatedAt returns a boolean if a field is not nil.
func (o *Reactor) HasCreatedAt() bool {
if o != nil && !IsNil(o.CreatedAt) {
return true
}
return false
}
// SetCreatedAt gets a reference to the given NullableTime and assigns it to the CreatedAt field.
func (o *Reactor) SetCreatedAt(v time.Time) {
o.CreatedAt.Set(&v)
}
// SetCreatedAtNil sets the value for CreatedAt to be an explicit nil
func (o *Reactor) SetCreatedAtNil() {
o.CreatedAt.Set(nil)
}
// UnsetCreatedAt ensures that no value is present for CreatedAt, not even an explicit nil
func (o *Reactor) UnsetCreatedAt() {
o.CreatedAt.Unset()
}
// GetModifiedBy returns the ModifiedBy field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Reactor) GetModifiedBy() string {
if o == nil || IsNil(o.ModifiedBy.Get()) {
var ret string
return ret
}
return *o.ModifiedBy.Get()
}
// GetModifiedByOk returns a tuple with the ModifiedBy 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 *Reactor) GetModifiedByOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.ModifiedBy.Get(), o.ModifiedBy.IsSet()
}
// HasModifiedBy returns a boolean if a field is not nil.
func (o *Reactor) HasModifiedBy() bool {
if o != nil && !IsNil(o.ModifiedBy) {
return true
}
return false
}
// SetModifiedBy gets a reference to the given NullableString and assigns it to the ModifiedBy field.
func (o *Reactor) SetModifiedBy(v string) {
o.ModifiedBy.Set(&v)
}
// SetModifiedByNil sets the value for ModifiedBy to be an explicit nil
func (o *Reactor) SetModifiedByNil() {
o.ModifiedBy.Set(nil)
}
// UnsetModifiedBy ensures that no value is present for ModifiedBy, not even an explicit nil
func (o *Reactor) UnsetModifiedBy() {
o.ModifiedBy.Unset()
}
// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Reactor) GetModifiedAt() time.Time {
if o == nil || IsNil(o.ModifiedAt.Get()) {
var ret time.Time
return ret
}
return *o.ModifiedAt.Get()
}
// GetModifiedAtOk returns a tuple with the ModifiedAt 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 *Reactor) GetModifiedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return o.ModifiedAt.Get(), o.ModifiedAt.IsSet()
}
// HasModifiedAt returns a boolean if a field is not nil.
func (o *Reactor) HasModifiedAt() bool {
if o != nil && !IsNil(o.ModifiedAt) {
return true
}
return false
}
// SetModifiedAt gets a reference to the given NullableTime and assigns it to the ModifiedAt field.
func (o *Reactor) SetModifiedAt(v time.Time) {
o.ModifiedAt.Set(&v)
}
// SetModifiedAtNil sets the value for ModifiedAt to be an explicit nil
func (o *Reactor) SetModifiedAtNil() {
o.ModifiedAt.Set(nil)
}
// UnsetModifiedAt ensures that no value is present for ModifiedAt, not even an explicit nil
func (o *Reactor) UnsetModifiedAt() {
o.ModifiedAt.Unset()
}
// GetConfiguration returns the Configuration field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Reactor) GetConfiguration() map[string]string {
if o == nil {
var ret map[string]string
return ret
}
return o.Configuration
}
// GetConfigurationOk returns a tuple with the Configuration 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 *Reactor) GetConfigurationOk() (*map[string]string, bool) {
if o == nil || IsNil(o.Configuration) {
return nil, false
}
return &o.Configuration, true
}
// HasConfiguration returns a boolean if a field is not nil.
func (o *Reactor) HasConfiguration() bool {
if o != nil && !IsNil(o.Configuration) {
return true
}
return false
}
// SetConfiguration gets a reference to the given map[string]string and assigns it to the Configuration field.
func (o *Reactor) SetConfiguration(v map[string]string) {
o.Configuration = v
}
func (o Reactor) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Reactor) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.TenantId) {
toSerialize["tenant_id"] = o.TenantId
}
if o.Name.IsSet() {
toSerialize["name"] = o.Name.Get()
}
if !IsNil(o.Formula) {
toSerialize["formula"] = o.Formula
}
if o.Code.IsSet() {
toSerialize["code"] = o.Code.Get()
}
if !IsNil(o.Application) {
toSerialize["application"] = o.Application
}
if o.CreatedBy.IsSet() {
toSerialize["created_by"] = o.CreatedBy.Get()
}
if o.CreatedAt.IsSet() {
toSerialize["created_at"] = o.CreatedAt.Get()
}
if o.ModifiedBy.IsSet() {
toSerialize["modified_by"] = o.ModifiedBy.Get()
}
if o.ModifiedAt.IsSet() {
toSerialize["modified_at"] = o.ModifiedAt.Get()
}
if o.Configuration != nil {
toSerialize["configuration"] = o.Configuration
}
return toSerialize, nil
}
type NullableReactor struct {
value *Reactor
isSet bool
}
func (v NullableReactor) Get() *Reactor {
return v.value
}
func (v *NullableReactor) Set(val *Reactor) {
v.value = val
v.isSet = true
}
func (v NullableReactor) IsSet() bool {
return v.isSet
}
func (v *NullableReactor) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableReactor(val *Reactor) *NullableReactor {
return &NullableReactor{value: val, isSet: true}
}
func (v NullableReactor) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableReactor) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}