-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmodel_authorization_issue_request.go
589 lines (500 loc) · 17.4 KB
/
model_authorization_issue_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
/*
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 AuthorizationIssueRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AuthorizationIssueRequest{}
// AuthorizationIssueRequest struct for AuthorizationIssueRequest
type AuthorizationIssueRequest struct {
// The ticket issued from Authlete `/auth/authorization` API.
Ticket string `json:"ticket"`
// The subject (= a user account managed by the service) who has granted authorization to the client application.
Subject string `json:"subject"`
// The time when the authentication of the end-user occurred. Its value is the number of seconds from `1970-01-01`.
AuthTime *int64 `json:"authTime,omitempty"`
// The Authentication Context Class Reference performed for the end-user authentication.
Acr *string `json:"acr,omitempty"`
// The claims of the end-user (= pieces of information about the end-user) in JSON format. See [OpenID Connect Core 1.0, 5.1. Standard Claims](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims) for details about the format.
Claims *string `json:"claims,omitempty"`
// Extra properties to associate with an access token and/or an authorization code.
Properties []Property `json:"properties,omitempty"`
// Scopes to associate with an access token and/or an authorization code. If a non-empty string array is given, it replaces the scopes specified by the original authorization request.
Scopes []string `json:"scopes,omitempty"`
// The value of the `sub` claim to embed in an ID token. If this request parameter is `null` or empty, the value of the `subject` request parameter is used as the value of the `sub` claim.
Sub *string `json:"sub,omitempty"`
// JSON that represents additional JWS header parameters for ID tokens that may be issued based on the authorization request.
IdtHeaderParams *string `json:"idtHeaderParams,omitempty"`
// Claim key-value pairs that are used to compute transformed claims.
ClaimsForTx *string `json:"claimsForTx,omitempty"`
// the claims that the user has consented for the client application to know.
ConsentedClaims []string `json:"consentedClaims,omitempty"`
AuthorizationDetails *AuthzDetails `json:"authorizationDetails,omitempty"`
// Additional claims that are added to the payload part of the JWT access token.
JwtAtClaims *string `json:"jwtAtClaims,omitempty"`
// The representation of an access token that may be issued as a result of the Authlete API call.
AccessToken *string `json:"accessToken,omitempty"`
}
// NewAuthorizationIssueRequest instantiates a new AuthorizationIssueRequest 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 NewAuthorizationIssueRequest(ticket string, subject string) *AuthorizationIssueRequest {
this := AuthorizationIssueRequest{}
this.Ticket = ticket
this.Subject = subject
return &this
}
// NewAuthorizationIssueRequestWithDefaults instantiates a new AuthorizationIssueRequest 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 NewAuthorizationIssueRequestWithDefaults() *AuthorizationIssueRequest {
this := AuthorizationIssueRequest{}
return &this
}
// GetTicket returns the Ticket field value
func (o *AuthorizationIssueRequest) GetTicket() string {
if o == nil {
var ret string
return ret
}
return o.Ticket
}
// GetTicketOk returns a tuple with the Ticket field value
// and a boolean to check if the value has been set.
func (o *AuthorizationIssueRequest) GetTicketOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Ticket, true
}
// SetTicket sets field value
func (o *AuthorizationIssueRequest) SetTicket(v string) {
o.Ticket = v
}
// GetSubject returns the Subject field value
func (o *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) GetSubjectOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Subject, true
}
// SetSubject sets field value
func (o *AuthorizationIssueRequest) SetSubject(v string) {
o.Subject = v
}
// GetAuthTime returns the AuthTime field value if set, zero value otherwise.
func (o *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) SetAuthTime(v int64) {
o.AuthTime = &v
}
// GetAcr returns the Acr field value if set, zero value otherwise.
func (o *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) SetAcr(v string) {
o.Acr = &v
}
// GetClaims returns the Claims field value if set, zero value otherwise.
func (o *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) SetClaims(v string) {
o.Claims = &v
}
// GetProperties returns the Properties field value if set, zero value otherwise.
func (o *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) SetProperties(v []Property) {
o.Properties = v
}
// GetScopes returns the Scopes field value if set, zero value otherwise.
func (o *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) SetScopes(v []string) {
o.Scopes = v
}
// GetSub returns the Sub field value if set, zero value otherwise.
func (o *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) SetSub(v string) {
o.Sub = &v
}
// GetIdtHeaderParams returns the IdtHeaderParams field value if set, zero value otherwise.
func (o *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) SetIdtHeaderParams(v string) {
o.IdtHeaderParams = &v
}
// GetClaimsForTx returns the ClaimsForTx field value if set, zero value otherwise.
func (o *AuthorizationIssueRequest) GetClaimsForTx() string {
if o == nil || isNil(o.ClaimsForTx) {
var ret string
return ret
}
return *o.ClaimsForTx
}
// GetClaimsForTxOk returns a tuple with the ClaimsForTx field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AuthorizationIssueRequest) GetClaimsForTxOk() (*string, bool) {
if o == nil || isNil(o.ClaimsForTx) {
return nil, false
}
return o.ClaimsForTx, true
}
// HasClaimsForTx returns a boolean if a field has been set.
func (o *AuthorizationIssueRequest) HasClaimsForTx() bool {
if o != nil && !isNil(o.ClaimsForTx) {
return true
}
return false
}
// SetClaimsForTx gets a reference to the given string and assigns it to the ClaimsForTx field.
func (o *AuthorizationIssueRequest) SetClaimsForTx(v string) {
o.ClaimsForTx = &v
}
// GetConsentedClaims returns the ConsentedClaims field value if set, zero value otherwise.
func (o *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) SetConsentedClaims(v []string) {
o.ConsentedClaims = v
}
// GetAuthorizationDetails returns the AuthorizationDetails field value if set, zero value otherwise.
func (o *AuthorizationIssueRequest) GetAuthorizationDetails() AuthzDetails {
if o == nil || isNil(o.AuthorizationDetails) {
var ret AuthzDetails
return ret
}
return *o.AuthorizationDetails
}
// GetAuthorizationDetailsOk returns a tuple with the AuthorizationDetails field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AuthorizationIssueRequest) GetAuthorizationDetailsOk() (*AuthzDetails, bool) {
if o == nil || isNil(o.AuthorizationDetails) {
return nil, false
}
return o.AuthorizationDetails, true
}
// HasAuthorizationDetails returns a boolean if a field has been set.
func (o *AuthorizationIssueRequest) HasAuthorizationDetails() bool {
if o != nil && !isNil(o.AuthorizationDetails) {
return true
}
return false
}
// SetAuthorizationDetails gets a reference to the given AuthzDetails and assigns it to the AuthorizationDetails field.
func (o *AuthorizationIssueRequest) SetAuthorizationDetails(v AuthzDetails) {
o.AuthorizationDetails = &v
}
// GetJwtAtClaims returns the JwtAtClaims field value if set, zero value otherwise.
func (o *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) 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 *AuthorizationIssueRequest) SetJwtAtClaims(v string) {
o.JwtAtClaims = &v
}
// GetAccessToken returns the AccessToken field value if set, zero value otherwise.
func (o *AuthorizationIssueRequest) GetAccessToken() string {
if o == nil || isNil(o.AccessToken) {
var ret string
return ret
}
return *o.AccessToken
}
// GetAccessTokenOk returns a tuple with the AccessToken field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AuthorizationIssueRequest) GetAccessTokenOk() (*string, bool) {
if o == nil || isNil(o.AccessToken) {
return nil, false
}
return o.AccessToken, true
}
// HasAccessToken returns a boolean if a field has been set.
func (o *AuthorizationIssueRequest) HasAccessToken() bool {
if o != nil && !isNil(o.AccessToken) {
return true
}
return false
}
// SetAccessToken gets a reference to the given string and assigns it to the AccessToken field.
func (o *AuthorizationIssueRequest) SetAccessToken(v string) {
o.AccessToken = &v
}
func (o AuthorizationIssueRequest) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AuthorizationIssueRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["ticket"] = o.Ticket
toSerialize["subject"] = o.Subject
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.Sub) {
toSerialize["sub"] = o.Sub
}
if !isNil(o.IdtHeaderParams) {
toSerialize["idtHeaderParams"] = o.IdtHeaderParams
}
if !isNil(o.ClaimsForTx) {
toSerialize["claimsForTx"] = o.ClaimsForTx
}
if !isNil(o.ConsentedClaims) {
toSerialize["consentedClaims"] = o.ConsentedClaims
}
if !isNil(o.AuthorizationDetails) {
toSerialize["authorizationDetails"] = o.AuthorizationDetails
}
if !isNil(o.JwtAtClaims) {
toSerialize["jwtAtClaims"] = o.JwtAtClaims
}
if !isNil(o.AccessToken) {
toSerialize["accessToken"] = o.AccessToken
}
return toSerialize, nil
}
type NullableAuthorizationIssueRequest struct {
value *AuthorizationIssueRequest
isSet bool
}
func (v NullableAuthorizationIssueRequest) Get() *AuthorizationIssueRequest {
return v.value
}
func (v *NullableAuthorizationIssueRequest) Set(val *AuthorizationIssueRequest) {
v.value = val
v.isSet = true
}
func (v NullableAuthorizationIssueRequest) IsSet() bool {
return v.isSet
}
func (v *NullableAuthorizationIssueRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAuthorizationIssueRequest(val *AuthorizationIssueRequest) *NullableAuthorizationIssueRequest {
return &NullableAuthorizationIssueRequest{value: val, isSet: true}
}
func (v NullableAuthorizationIssueRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAuthorizationIssueRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}