-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_submission_data_request.go
758 lines (642 loc) · 21.8 KB
/
model_submission_data_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
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
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
/*
DocSpring API
DocSpring provides an API that helps you fill out and sign PDF templates.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package docspring
import (
"encoding/json"
"bytes"
"fmt"
)
// checks if the SubmissionDataRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SubmissionDataRequest{}
// SubmissionDataRequest struct for SubmissionDataRequest
type SubmissionDataRequest struct {
Id NullableString `json:"id"`
Email NullableString `json:"email"`
Name NullableString `json:"name"`
Order NullableInt32 `json:"order"`
SortOrder int32 `json:"sort_order"`
Fields []string `json:"fields"`
Metadata map[string]interface{} `json:"metadata"`
State string `json:"state"`
ViewedAt NullableString `json:"viewed_at"`
CompletedAt NullableString `json:"completed_at"`
Data map[string]interface{} `json:"data"`
AuthType string `json:"auth_type"`
AuthSecondFactorType string `json:"auth_second_factor_type"`
AuthProvider NullableString `json:"auth_provider"`
AuthSessionStartedAt NullableString `json:"auth_session_started_at"`
AuthSessionIdHash NullableString `json:"auth_session_id_hash"`
AuthUserIdHash NullableString `json:"auth_user_id_hash"`
AuthUsernameHash NullableString `json:"auth_username_hash"`
AuthPhoneNumberHash NullableString `json:"auth_phone_number_hash"`
IpAddress NullableString `json:"ip_address"`
UserAgent NullableString `json:"user_agent"`
}
type _SubmissionDataRequest SubmissionDataRequest
// NewSubmissionDataRequest instantiates a new SubmissionDataRequest 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 NewSubmissionDataRequest(id NullableString, email NullableString, name NullableString, order NullableInt32, sortOrder int32, fields []string, metadata map[string]interface{}, state string, viewedAt NullableString, completedAt NullableString, data map[string]interface{}, authType string, authSecondFactorType string, authProvider NullableString, authSessionStartedAt NullableString, authSessionIdHash NullableString, authUserIdHash NullableString, authUsernameHash NullableString, authPhoneNumberHash NullableString, ipAddress NullableString, userAgent NullableString) *SubmissionDataRequest {
this := SubmissionDataRequest{}
this.Id = id
this.Email = email
this.Name = name
this.Order = order
this.SortOrder = sortOrder
this.Fields = fields
this.Metadata = metadata
this.State = state
this.ViewedAt = viewedAt
this.CompletedAt = completedAt
this.Data = data
this.AuthType = authType
this.AuthSecondFactorType = authSecondFactorType
this.AuthProvider = authProvider
this.AuthSessionStartedAt = authSessionStartedAt
this.AuthSessionIdHash = authSessionIdHash
this.AuthUserIdHash = authUserIdHash
this.AuthUsernameHash = authUsernameHash
this.AuthPhoneNumberHash = authPhoneNumberHash
this.IpAddress = ipAddress
this.UserAgent = userAgent
return &this
}
// NewSubmissionDataRequestWithDefaults instantiates a new SubmissionDataRequest 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 NewSubmissionDataRequestWithDefaults() *SubmissionDataRequest {
this := SubmissionDataRequest{}
return &this
}
// GetId returns the Id field value
// If the value is explicit nil, the zero value for string will be returned
func (o *SubmissionDataRequest) GetId() string {
if o == nil || o.Id.Get() == nil {
var ret string
return ret
}
return *o.Id.Get()
}
// GetIdOk returns a tuple with the Id field value
// 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 *SubmissionDataRequest) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Id.Get(), o.Id.IsSet()
}
// SetId sets field value
func (o *SubmissionDataRequest) SetId(v string) {
o.Id.Set(&v)
}
// GetEmail returns the Email field value
// If the value is explicit nil, the zero value for string will be returned
func (o *SubmissionDataRequest) GetEmail() string {
if o == nil || o.Email.Get() == nil {
var ret string
return ret
}
return *o.Email.Get()
}
// GetEmailOk returns a tuple with the Email field value
// 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 *SubmissionDataRequest) GetEmailOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Email.Get(), o.Email.IsSet()
}
// SetEmail sets field value
func (o *SubmissionDataRequest) SetEmail(v string) {
o.Email.Set(&v)
}
// GetName returns the Name field value
// If the value is explicit nil, the zero value for string will be returned
func (o *SubmissionDataRequest) GetName() string {
if o == nil || o.Name.Get() == nil {
var ret string
return ret
}
return *o.Name.Get()
}
// GetNameOk returns a tuple with the Name field value
// 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 *SubmissionDataRequest) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Name.Get(), o.Name.IsSet()
}
// SetName sets field value
func (o *SubmissionDataRequest) SetName(v string) {
o.Name.Set(&v)
}
// GetOrder returns the Order field value
// If the value is explicit nil, the zero value for int32 will be returned
func (o *SubmissionDataRequest) GetOrder() int32 {
if o == nil || o.Order.Get() == nil {
var ret int32
return ret
}
return *o.Order.Get()
}
// GetOrderOk returns a tuple with the Order field value
// 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 *SubmissionDataRequest) GetOrderOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.Order.Get(), o.Order.IsSet()
}
// SetOrder sets field value
func (o *SubmissionDataRequest) SetOrder(v int32) {
o.Order.Set(&v)
}
// GetSortOrder returns the SortOrder field value
func (o *SubmissionDataRequest) GetSortOrder() int32 {
if o == nil {
var ret int32
return ret
}
return o.SortOrder
}
// GetSortOrderOk returns a tuple with the SortOrder field value
// and a boolean to check if the value has been set.
func (o *SubmissionDataRequest) GetSortOrderOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.SortOrder, true
}
// SetSortOrder sets field value
func (o *SubmissionDataRequest) SetSortOrder(v int32) {
o.SortOrder = v
}
// GetFields returns the Fields field value
// If the value is explicit nil, the zero value for []string will be returned
func (o *SubmissionDataRequest) GetFields() []string {
if o == nil {
var ret []string
return ret
}
return o.Fields
}
// GetFieldsOk returns a tuple with the Fields field value
// 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 *SubmissionDataRequest) GetFieldsOk() ([]string, bool) {
if o == nil || IsNil(o.Fields) {
return nil, false
}
return o.Fields, true
}
// SetFields sets field value
func (o *SubmissionDataRequest) SetFields(v []string) {
o.Fields = v
}
// GetMetadata returns the Metadata field value
// If the value is explicit nil, the zero value for map[string]interface{} will be returned
func (o *SubmissionDataRequest) GetMetadata() map[string]interface{} {
if o == nil {
var ret map[string]interface{}
return ret
}
return o.Metadata
}
// GetMetadataOk returns a tuple with the Metadata field value
// 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 *SubmissionDataRequest) GetMetadataOk() (map[string]interface{}, bool) {
if o == nil || IsNil(o.Metadata) {
return map[string]interface{}{}, false
}
return o.Metadata, true
}
// SetMetadata sets field value
func (o *SubmissionDataRequest) SetMetadata(v map[string]interface{}) {
o.Metadata = v
}
// GetState returns the State field value
func (o *SubmissionDataRequest) GetState() string {
if o == nil {
var ret string
return ret
}
return o.State
}
// GetStateOk returns a tuple with the State field value
// and a boolean to check if the value has been set.
func (o *SubmissionDataRequest) GetStateOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.State, true
}
// SetState sets field value
func (o *SubmissionDataRequest) SetState(v string) {
o.State = v
}
// GetViewedAt returns the ViewedAt field value
// If the value is explicit nil, the zero value for string will be returned
func (o *SubmissionDataRequest) GetViewedAt() string {
if o == nil || o.ViewedAt.Get() == nil {
var ret string
return ret
}
return *o.ViewedAt.Get()
}
// GetViewedAtOk returns a tuple with the ViewedAt field value
// 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 *SubmissionDataRequest) GetViewedAtOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.ViewedAt.Get(), o.ViewedAt.IsSet()
}
// SetViewedAt sets field value
func (o *SubmissionDataRequest) SetViewedAt(v string) {
o.ViewedAt.Set(&v)
}
// GetCompletedAt returns the CompletedAt field value
// If the value is explicit nil, the zero value for string will be returned
func (o *SubmissionDataRequest) GetCompletedAt() string {
if o == nil || o.CompletedAt.Get() == nil {
var ret string
return ret
}
return *o.CompletedAt.Get()
}
// GetCompletedAtOk returns a tuple with the CompletedAt field value
// 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 *SubmissionDataRequest) GetCompletedAtOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.CompletedAt.Get(), o.CompletedAt.IsSet()
}
// SetCompletedAt sets field value
func (o *SubmissionDataRequest) SetCompletedAt(v string) {
o.CompletedAt.Set(&v)
}
// GetData returns the Data field value
// If the value is explicit nil, the zero value for map[string]interface{} will be returned
func (o *SubmissionDataRequest) GetData() map[string]interface{} {
if o == nil {
var ret map[string]interface{}
return ret
}
return o.Data
}
// GetDataOk returns a tuple with the Data field value
// 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 *SubmissionDataRequest) GetDataOk() (map[string]interface{}, bool) {
if o == nil || IsNil(o.Data) {
return map[string]interface{}{}, false
}
return o.Data, true
}
// SetData sets field value
func (o *SubmissionDataRequest) SetData(v map[string]interface{}) {
o.Data = v
}
// GetAuthType returns the AuthType field value
func (o *SubmissionDataRequest) GetAuthType() string {
if o == nil {
var ret string
return ret
}
return o.AuthType
}
// GetAuthTypeOk returns a tuple with the AuthType field value
// and a boolean to check if the value has been set.
func (o *SubmissionDataRequest) GetAuthTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.AuthType, true
}
// SetAuthType sets field value
func (o *SubmissionDataRequest) SetAuthType(v string) {
o.AuthType = v
}
// GetAuthSecondFactorType returns the AuthSecondFactorType field value
func (o *SubmissionDataRequest) GetAuthSecondFactorType() string {
if o == nil {
var ret string
return ret
}
return o.AuthSecondFactorType
}
// GetAuthSecondFactorTypeOk returns a tuple with the AuthSecondFactorType field value
// and a boolean to check if the value has been set.
func (o *SubmissionDataRequest) GetAuthSecondFactorTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.AuthSecondFactorType, true
}
// SetAuthSecondFactorType sets field value
func (o *SubmissionDataRequest) SetAuthSecondFactorType(v string) {
o.AuthSecondFactorType = v
}
// GetAuthProvider returns the AuthProvider field value
// If the value is explicit nil, the zero value for string will be returned
func (o *SubmissionDataRequest) GetAuthProvider() string {
if o == nil || o.AuthProvider.Get() == nil {
var ret string
return ret
}
return *o.AuthProvider.Get()
}
// GetAuthProviderOk returns a tuple with the AuthProvider field value
// 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 *SubmissionDataRequest) GetAuthProviderOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.AuthProvider.Get(), o.AuthProvider.IsSet()
}
// SetAuthProvider sets field value
func (o *SubmissionDataRequest) SetAuthProvider(v string) {
o.AuthProvider.Set(&v)
}
// GetAuthSessionStartedAt returns the AuthSessionStartedAt field value
// If the value is explicit nil, the zero value for string will be returned
func (o *SubmissionDataRequest) GetAuthSessionStartedAt() string {
if o == nil || o.AuthSessionStartedAt.Get() == nil {
var ret string
return ret
}
return *o.AuthSessionStartedAt.Get()
}
// GetAuthSessionStartedAtOk returns a tuple with the AuthSessionStartedAt field value
// 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 *SubmissionDataRequest) GetAuthSessionStartedAtOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.AuthSessionStartedAt.Get(), o.AuthSessionStartedAt.IsSet()
}
// SetAuthSessionStartedAt sets field value
func (o *SubmissionDataRequest) SetAuthSessionStartedAt(v string) {
o.AuthSessionStartedAt.Set(&v)
}
// GetAuthSessionIdHash returns the AuthSessionIdHash field value
// If the value is explicit nil, the zero value for string will be returned
func (o *SubmissionDataRequest) GetAuthSessionIdHash() string {
if o == nil || o.AuthSessionIdHash.Get() == nil {
var ret string
return ret
}
return *o.AuthSessionIdHash.Get()
}
// GetAuthSessionIdHashOk returns a tuple with the AuthSessionIdHash field value
// 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 *SubmissionDataRequest) GetAuthSessionIdHashOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.AuthSessionIdHash.Get(), o.AuthSessionIdHash.IsSet()
}
// SetAuthSessionIdHash sets field value
func (o *SubmissionDataRequest) SetAuthSessionIdHash(v string) {
o.AuthSessionIdHash.Set(&v)
}
// GetAuthUserIdHash returns the AuthUserIdHash field value
// If the value is explicit nil, the zero value for string will be returned
func (o *SubmissionDataRequest) GetAuthUserIdHash() string {
if o == nil || o.AuthUserIdHash.Get() == nil {
var ret string
return ret
}
return *o.AuthUserIdHash.Get()
}
// GetAuthUserIdHashOk returns a tuple with the AuthUserIdHash field value
// 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 *SubmissionDataRequest) GetAuthUserIdHashOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.AuthUserIdHash.Get(), o.AuthUserIdHash.IsSet()
}
// SetAuthUserIdHash sets field value
func (o *SubmissionDataRequest) SetAuthUserIdHash(v string) {
o.AuthUserIdHash.Set(&v)
}
// GetAuthUsernameHash returns the AuthUsernameHash field value
// If the value is explicit nil, the zero value for string will be returned
func (o *SubmissionDataRequest) GetAuthUsernameHash() string {
if o == nil || o.AuthUsernameHash.Get() == nil {
var ret string
return ret
}
return *o.AuthUsernameHash.Get()
}
// GetAuthUsernameHashOk returns a tuple with the AuthUsernameHash field value
// 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 *SubmissionDataRequest) GetAuthUsernameHashOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.AuthUsernameHash.Get(), o.AuthUsernameHash.IsSet()
}
// SetAuthUsernameHash sets field value
func (o *SubmissionDataRequest) SetAuthUsernameHash(v string) {
o.AuthUsernameHash.Set(&v)
}
// GetAuthPhoneNumberHash returns the AuthPhoneNumberHash field value
// If the value is explicit nil, the zero value for string will be returned
func (o *SubmissionDataRequest) GetAuthPhoneNumberHash() string {
if o == nil || o.AuthPhoneNumberHash.Get() == nil {
var ret string
return ret
}
return *o.AuthPhoneNumberHash.Get()
}
// GetAuthPhoneNumberHashOk returns a tuple with the AuthPhoneNumberHash field value
// 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 *SubmissionDataRequest) GetAuthPhoneNumberHashOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.AuthPhoneNumberHash.Get(), o.AuthPhoneNumberHash.IsSet()
}
// SetAuthPhoneNumberHash sets field value
func (o *SubmissionDataRequest) SetAuthPhoneNumberHash(v string) {
o.AuthPhoneNumberHash.Set(&v)
}
// GetIpAddress returns the IpAddress field value
// If the value is explicit nil, the zero value for string will be returned
func (o *SubmissionDataRequest) GetIpAddress() string {
if o == nil || o.IpAddress.Get() == nil {
var ret string
return ret
}
return *o.IpAddress.Get()
}
// GetIpAddressOk returns a tuple with the IpAddress field value
// 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 *SubmissionDataRequest) GetIpAddressOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.IpAddress.Get(), o.IpAddress.IsSet()
}
// SetIpAddress sets field value
func (o *SubmissionDataRequest) SetIpAddress(v string) {
o.IpAddress.Set(&v)
}
// GetUserAgent returns the UserAgent field value
// If the value is explicit nil, the zero value for string will be returned
func (o *SubmissionDataRequest) GetUserAgent() string {
if o == nil || o.UserAgent.Get() == nil {
var ret string
return ret
}
return *o.UserAgent.Get()
}
// GetUserAgentOk returns a tuple with the UserAgent field value
// 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 *SubmissionDataRequest) GetUserAgentOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.UserAgent.Get(), o.UserAgent.IsSet()
}
// SetUserAgent sets field value
func (o *SubmissionDataRequest) SetUserAgent(v string) {
o.UserAgent.Set(&v)
}
func (o SubmissionDataRequest) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SubmissionDataRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["id"] = o.Id.Get()
toSerialize["email"] = o.Email.Get()
toSerialize["name"] = o.Name.Get()
toSerialize["order"] = o.Order.Get()
toSerialize["sort_order"] = o.SortOrder
if o.Fields != nil {
toSerialize["fields"] = o.Fields
}
if o.Metadata != nil {
toSerialize["metadata"] = o.Metadata
}
toSerialize["state"] = o.State
toSerialize["viewed_at"] = o.ViewedAt.Get()
toSerialize["completed_at"] = o.CompletedAt.Get()
if o.Data != nil {
toSerialize["data"] = o.Data
}
toSerialize["auth_type"] = o.AuthType
toSerialize["auth_second_factor_type"] = o.AuthSecondFactorType
toSerialize["auth_provider"] = o.AuthProvider.Get()
toSerialize["auth_session_started_at"] = o.AuthSessionStartedAt.Get()
toSerialize["auth_session_id_hash"] = o.AuthSessionIdHash.Get()
toSerialize["auth_user_id_hash"] = o.AuthUserIdHash.Get()
toSerialize["auth_username_hash"] = o.AuthUsernameHash.Get()
toSerialize["auth_phone_number_hash"] = o.AuthPhoneNumberHash.Get()
toSerialize["ip_address"] = o.IpAddress.Get()
toSerialize["user_agent"] = o.UserAgent.Get()
return toSerialize, nil
}
func (o *SubmissionDataRequest) UnmarshalJSON(data []byte) (err error) {
// This validates that all required properties are included in the JSON object
// by unmarshalling the object into a generic map with string keys and checking
// that every required field exists as a key in the generic map.
requiredProperties := []string{
"id",
"email",
"name",
"order",
"sort_order",
"fields",
"metadata",
"state",
"viewed_at",
"completed_at",
"data",
"auth_type",
"auth_second_factor_type",
"auth_provider",
"auth_session_started_at",
"auth_session_id_hash",
"auth_user_id_hash",
"auth_username_hash",
"auth_phone_number_hash",
"ip_address",
"user_agent",
}
allProperties := make(map[string]interface{})
err = json.Unmarshal(data, &allProperties)
if err != nil {
return err;
}
for _, requiredProperty := range(requiredProperties) {
if _, exists := allProperties[requiredProperty]; !exists {
return fmt.Errorf("no value given for required property %v", requiredProperty)
}
}
varSubmissionDataRequest := _SubmissionDataRequest{}
decoder := json.NewDecoder(bytes.NewReader(data))
decoder.DisallowUnknownFields()
err = decoder.Decode(&varSubmissionDataRequest)
if err != nil {
return err
}
*o = SubmissionDataRequest(varSubmissionDataRequest)
return err
}
type NullableSubmissionDataRequest struct {
value *SubmissionDataRequest
isSet bool
}
func (v NullableSubmissionDataRequest) Get() *SubmissionDataRequest {
return v.value
}
func (v *NullableSubmissionDataRequest) Set(val *SubmissionDataRequest) {
v.value = val
v.isSet = true
}
func (v NullableSubmissionDataRequest) IsSet() bool {
return v.isSet
}
func (v *NullableSubmissionDataRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSubmissionDataRequest(val *SubmissionDataRequest) *NullableSubmissionDataRequest {
return &NullableSubmissionDataRequest{value: val, isSet: true}
}
func (v NullableSubmissionDataRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSubmissionDataRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}