-
Notifications
You must be signed in to change notification settings - Fork 1
/
model_device_complete_request.go
581 lines (493 loc) · 16.4 KB
/
model_device_complete_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
/*
Authlete API
Authlete API Document.
API version: 2.3.12
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package authlete
import (
"encoding/json"
)
// checks if the DeviceCompleteRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DeviceCompleteRequest{}
// DeviceCompleteRequest struct for DeviceCompleteRequest
type DeviceCompleteRequest struct {
// A user code.
UserCode string `json:"userCode"`
// The result of the end-user authentication and authorization. One of the following. Details are described in the description.
Result string `json:"result"`
// The subject (= unique identifier) of the end-user.
Subject string `json:"subject"`
// The value of the sub claim that should be used in the ID token.
Sub *string `json:"sub,omitempty"`
// The time at which the end-user was authenticated. Its value is the number of seconds from `1970-01-01`.
AuthTime *int64 `json:"authTime,omitempty"`
// The reference of the authentication context class which the end-user authentication satisfied.
Acr *string `json:"acr,omitempty"`
// Additional claims which will be embedded in the ID token.
Claims *string `json:"claims,omitempty"`
// The extra properties associated with the access token.
Properties []Property `json:"properties,omitempty"`
// Scopes to replace the scopes specified in the original device authorization request with. When nothing is specified for this parameter, replacement is not performed.
Scopes []string `json:"scopes,omitempty"`
// The description of the error. If this optional request parameter is given, its value is used as the value of the `error_description` property, but it is used only when the result is not `AUTHORIZED`. To comply with the specification strictly, the description must not include characters outside the set `%x20-21 / %x23-5B / %x5D-7E`.
ErrorDescription *string `json:"errorDescription,omitempty"`
// The URI of a document which describes the error in detail. This corresponds to the `error_uri` property in the response to the client.
ErrorUri *string `json:"errorUri,omitempty"`
// JSON that represents additional JWS header parameters for ID tokens.
IdtHeaderParams *string `json:"idtHeaderParams,omitempty"`
// the claims that the user has consented for the client application to know.
ConsentedClaims []string `json:"consentedClaims,omitempty"`
// Additional claims that are added to the payload part of the JWT access token.
JwtAtClaims *string `json:"jwtAtClaims,omitempty"`
}
// NewDeviceCompleteRequest instantiates a new DeviceCompleteRequest 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 NewDeviceCompleteRequest(userCode string, result string, subject string) *DeviceCompleteRequest {
this := DeviceCompleteRequest{}
this.UserCode = userCode
this.Result = result
this.Subject = subject
return &this
}
// NewDeviceCompleteRequestWithDefaults instantiates a new DeviceCompleteRequest 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 NewDeviceCompleteRequestWithDefaults() *DeviceCompleteRequest {
this := DeviceCompleteRequest{}
return &this
}
// GetUserCode returns the UserCode field value
func (o *DeviceCompleteRequest) GetUserCode() string {
if o == nil {
var ret string
return ret
}
return o.UserCode
}
// GetUserCodeOk returns a tuple with the UserCode field value
// and a boolean to check if the value has been set.
func (o *DeviceCompleteRequest) GetUserCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.UserCode, true
}
// SetUserCode sets field value
func (o *DeviceCompleteRequest) SetUserCode(v string) {
o.UserCode = v
}
// GetResult returns the Result field value
func (o *DeviceCompleteRequest) GetResult() string {
if o == nil {
var ret string
return ret
}
return o.Result
}
// GetResultOk returns a tuple with the Result field value
// and a boolean to check if the value has been set.
func (o *DeviceCompleteRequest) GetResultOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Result, true
}
// SetResult sets field value
func (o *DeviceCompleteRequest) SetResult(v string) {
o.Result = v
}
// GetSubject returns the Subject field value
func (o *DeviceCompleteRequest) GetSubject() string {
if o == nil {
var ret string
return ret
}
return o.Subject
}
// GetSubjectOk returns a tuple with the Subject field value
// and a boolean to check if the value has been set.
func (o *DeviceCompleteRequest) GetSubjectOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Subject, true
}
// SetSubject sets field value
func (o *DeviceCompleteRequest) SetSubject(v string) {
o.Subject = v
}
// GetSub returns the Sub field value if set, zero value otherwise.
func (o *DeviceCompleteRequest) GetSub() string {
if o == nil || isNil(o.Sub) {
var ret string
return ret
}
return *o.Sub
}
// GetSubOk returns a tuple with the Sub field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceCompleteRequest) GetSubOk() (*string, bool) {
if o == nil || isNil(o.Sub) {
return nil, false
}
return o.Sub, true
}
// HasSub returns a boolean if a field has been set.
func (o *DeviceCompleteRequest) HasSub() bool {
if o != nil && !isNil(o.Sub) {
return true
}
return false
}
// SetSub gets a reference to the given string and assigns it to the Sub field.
func (o *DeviceCompleteRequest) SetSub(v string) {
o.Sub = &v
}
// GetAuthTime returns the AuthTime field value if set, zero value otherwise.
func (o *DeviceCompleteRequest) GetAuthTime() int64 {
if o == nil || isNil(o.AuthTime) {
var ret int64
return ret
}
return *o.AuthTime
}
// GetAuthTimeOk returns a tuple with the AuthTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceCompleteRequest) GetAuthTimeOk() (*int64, bool) {
if o == nil || isNil(o.AuthTime) {
return nil, false
}
return o.AuthTime, true
}
// HasAuthTime returns a boolean if a field has been set.
func (o *DeviceCompleteRequest) HasAuthTime() bool {
if o != nil && !isNil(o.AuthTime) {
return true
}
return false
}
// SetAuthTime gets a reference to the given int64 and assigns it to the AuthTime field.
func (o *DeviceCompleteRequest) SetAuthTime(v int64) {
o.AuthTime = &v
}
// GetAcr returns the Acr field value if set, zero value otherwise.
func (o *DeviceCompleteRequest) GetAcr() string {
if o == nil || isNil(o.Acr) {
var ret string
return ret
}
return *o.Acr
}
// GetAcrOk returns a tuple with the Acr field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceCompleteRequest) GetAcrOk() (*string, bool) {
if o == nil || isNil(o.Acr) {
return nil, false
}
return o.Acr, true
}
// HasAcr returns a boolean if a field has been set.
func (o *DeviceCompleteRequest) HasAcr() bool {
if o != nil && !isNil(o.Acr) {
return true
}
return false
}
// SetAcr gets a reference to the given string and assigns it to the Acr field.
func (o *DeviceCompleteRequest) SetAcr(v string) {
o.Acr = &v
}
// GetClaims returns the Claims field value if set, zero value otherwise.
func (o *DeviceCompleteRequest) GetClaims() string {
if o == nil || isNil(o.Claims) {
var ret string
return ret
}
return *o.Claims
}
// GetClaimsOk returns a tuple with the Claims field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceCompleteRequest) GetClaimsOk() (*string, bool) {
if o == nil || isNil(o.Claims) {
return nil, false
}
return o.Claims, true
}
// HasClaims returns a boolean if a field has been set.
func (o *DeviceCompleteRequest) HasClaims() bool {
if o != nil && !isNil(o.Claims) {
return true
}
return false
}
// SetClaims gets a reference to the given string and assigns it to the Claims field.
func (o *DeviceCompleteRequest) SetClaims(v string) {
o.Claims = &v
}
// GetProperties returns the Properties field value if set, zero value otherwise.
func (o *DeviceCompleteRequest) GetProperties() []Property {
if o == nil || isNil(o.Properties) {
var ret []Property
return ret
}
return o.Properties
}
// GetPropertiesOk returns a tuple with the Properties field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceCompleteRequest) GetPropertiesOk() ([]Property, bool) {
if o == nil || isNil(o.Properties) {
return nil, false
}
return o.Properties, true
}
// HasProperties returns a boolean if a field has been set.
func (o *DeviceCompleteRequest) HasProperties() bool {
if o != nil && !isNil(o.Properties) {
return true
}
return false
}
// SetProperties gets a reference to the given []Property and assigns it to the Properties field.
func (o *DeviceCompleteRequest) SetProperties(v []Property) {
o.Properties = v
}
// GetScopes returns the Scopes field value if set, zero value otherwise.
func (o *DeviceCompleteRequest) GetScopes() []string {
if o == nil || isNil(o.Scopes) {
var ret []string
return ret
}
return o.Scopes
}
// GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceCompleteRequest) GetScopesOk() ([]string, bool) {
if o == nil || isNil(o.Scopes) {
return nil, false
}
return o.Scopes, true
}
// HasScopes returns a boolean if a field has been set.
func (o *DeviceCompleteRequest) HasScopes() bool {
if o != nil && !isNil(o.Scopes) {
return true
}
return false
}
// SetScopes gets a reference to the given []string and assigns it to the Scopes field.
func (o *DeviceCompleteRequest) SetScopes(v []string) {
o.Scopes = v
}
// GetErrorDescription returns the ErrorDescription field value if set, zero value otherwise.
func (o *DeviceCompleteRequest) GetErrorDescription() string {
if o == nil || isNil(o.ErrorDescription) {
var ret string
return ret
}
return *o.ErrorDescription
}
// GetErrorDescriptionOk returns a tuple with the ErrorDescription field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceCompleteRequest) GetErrorDescriptionOk() (*string, bool) {
if o == nil || isNil(o.ErrorDescription) {
return nil, false
}
return o.ErrorDescription, true
}
// HasErrorDescription returns a boolean if a field has been set.
func (o *DeviceCompleteRequest) HasErrorDescription() bool {
if o != nil && !isNil(o.ErrorDescription) {
return true
}
return false
}
// SetErrorDescription gets a reference to the given string and assigns it to the ErrorDescription field.
func (o *DeviceCompleteRequest) SetErrorDescription(v string) {
o.ErrorDescription = &v
}
// GetErrorUri returns the ErrorUri field value if set, zero value otherwise.
func (o *DeviceCompleteRequest) GetErrorUri() string {
if o == nil || isNil(o.ErrorUri) {
var ret string
return ret
}
return *o.ErrorUri
}
// GetErrorUriOk returns a tuple with the ErrorUri field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceCompleteRequest) GetErrorUriOk() (*string, bool) {
if o == nil || isNil(o.ErrorUri) {
return nil, false
}
return o.ErrorUri, true
}
// HasErrorUri returns a boolean if a field has been set.
func (o *DeviceCompleteRequest) HasErrorUri() bool {
if o != nil && !isNil(o.ErrorUri) {
return true
}
return false
}
// SetErrorUri gets a reference to the given string and assigns it to the ErrorUri field.
func (o *DeviceCompleteRequest) SetErrorUri(v string) {
o.ErrorUri = &v
}
// GetIdtHeaderParams returns the IdtHeaderParams field value if set, zero value otherwise.
func (o *DeviceCompleteRequest) GetIdtHeaderParams() string {
if o == nil || isNil(o.IdtHeaderParams) {
var ret string
return ret
}
return *o.IdtHeaderParams
}
// GetIdtHeaderParamsOk returns a tuple with the IdtHeaderParams field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceCompleteRequest) GetIdtHeaderParamsOk() (*string, bool) {
if o == nil || isNil(o.IdtHeaderParams) {
return nil, false
}
return o.IdtHeaderParams, true
}
// HasIdtHeaderParams returns a boolean if a field has been set.
func (o *DeviceCompleteRequest) HasIdtHeaderParams() bool {
if o != nil && !isNil(o.IdtHeaderParams) {
return true
}
return false
}
// SetIdtHeaderParams gets a reference to the given string and assigns it to the IdtHeaderParams field.
func (o *DeviceCompleteRequest) SetIdtHeaderParams(v string) {
o.IdtHeaderParams = &v
}
// GetConsentedClaims returns the ConsentedClaims field value if set, zero value otherwise.
func (o *DeviceCompleteRequest) GetConsentedClaims() []string {
if o == nil || isNil(o.ConsentedClaims) {
var ret []string
return ret
}
return o.ConsentedClaims
}
// GetConsentedClaimsOk returns a tuple with the ConsentedClaims field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceCompleteRequest) GetConsentedClaimsOk() ([]string, bool) {
if o == nil || isNil(o.ConsentedClaims) {
return nil, false
}
return o.ConsentedClaims, true
}
// HasConsentedClaims returns a boolean if a field has been set.
func (o *DeviceCompleteRequest) HasConsentedClaims() bool {
if o != nil && !isNil(o.ConsentedClaims) {
return true
}
return false
}
// SetConsentedClaims gets a reference to the given []string and assigns it to the ConsentedClaims field.
func (o *DeviceCompleteRequest) SetConsentedClaims(v []string) {
o.ConsentedClaims = v
}
// GetJwtAtClaims returns the JwtAtClaims field value if set, zero value otherwise.
func (o *DeviceCompleteRequest) GetJwtAtClaims() string {
if o == nil || isNil(o.JwtAtClaims) {
var ret string
return ret
}
return *o.JwtAtClaims
}
// GetJwtAtClaimsOk returns a tuple with the JwtAtClaims field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceCompleteRequest) GetJwtAtClaimsOk() (*string, bool) {
if o == nil || isNil(o.JwtAtClaims) {
return nil, false
}
return o.JwtAtClaims, true
}
// HasJwtAtClaims returns a boolean if a field has been set.
func (o *DeviceCompleteRequest) HasJwtAtClaims() bool {
if o != nil && !isNil(o.JwtAtClaims) {
return true
}
return false
}
// SetJwtAtClaims gets a reference to the given string and assigns it to the JwtAtClaims field.
func (o *DeviceCompleteRequest) SetJwtAtClaims(v string) {
o.JwtAtClaims = &v
}
func (o DeviceCompleteRequest) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DeviceCompleteRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["userCode"] = o.UserCode
toSerialize["result"] = o.Result
toSerialize["subject"] = o.Subject
if !isNil(o.Sub) {
toSerialize["sub"] = o.Sub
}
if !isNil(o.AuthTime) {
toSerialize["authTime"] = o.AuthTime
}
if !isNil(o.Acr) {
toSerialize["acr"] = o.Acr
}
if !isNil(o.Claims) {
toSerialize["claims"] = o.Claims
}
if !isNil(o.Properties) {
toSerialize["properties"] = o.Properties
}
if !isNil(o.Scopes) {
toSerialize["scopes"] = o.Scopes
}
if !isNil(o.ErrorDescription) {
toSerialize["errorDescription"] = o.ErrorDescription
}
if !isNil(o.ErrorUri) {
toSerialize["errorUri"] = o.ErrorUri
}
if !isNil(o.IdtHeaderParams) {
toSerialize["idtHeaderParams"] = o.IdtHeaderParams
}
if !isNil(o.ConsentedClaims) {
toSerialize["consentedClaims"] = o.ConsentedClaims
}
if !isNil(o.JwtAtClaims) {
toSerialize["jwtAtClaims"] = o.JwtAtClaims
}
return toSerialize, nil
}
type NullableDeviceCompleteRequest struct {
value *DeviceCompleteRequest
isSet bool
}
func (v NullableDeviceCompleteRequest) Get() *DeviceCompleteRequest {
return v.value
}
func (v *NullableDeviceCompleteRequest) Set(val *DeviceCompleteRequest) {
v.value = val
v.isSet = true
}
func (v NullableDeviceCompleteRequest) IsSet() bool {
return v.isSet
}
func (v *NullableDeviceCompleteRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDeviceCompleteRequest(val *DeviceCompleteRequest) *NullableDeviceCompleteRequest {
return &NullableDeviceCompleteRequest{value: val, isSet: true}
}
func (v NullableDeviceCompleteRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDeviceCompleteRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}