-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathmodel_o_auth2_logout_request.go
421 lines (350 loc) · 11.4 KB
/
model_o_auth2_logout_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
/*
Ory Hydra API
Documentation for all of Ory Hydra's APIs.
API version: v2.4.0-alpha.1
Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package client
import (
"encoding/json"
"time"
)
// checks if the OAuth2LogoutRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &OAuth2LogoutRequest{}
// OAuth2LogoutRequest struct for OAuth2LogoutRequest
type OAuth2LogoutRequest struct {
// Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session.
Challenge *string `json:"challenge,omitempty"`
Client *OAuth2Client `json:"client,omitempty"`
ExpiresAt *time.Time `json:"expires_at,omitempty"`
// RequestURL is the original Logout URL requested.
RequestUrl *string `json:"request_url,omitempty"`
RequestedAt *time.Time `json:"requested_at,omitempty"`
// RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client.
RpInitiated *bool `json:"rp_initiated,omitempty"`
// SessionID is the login session ID that was requested to log out.
Sid *string `json:"sid,omitempty"`
// Subject is the user for whom the logout was request.
Subject *string `json:"subject,omitempty"`
AdditionalProperties map[string]interface{}
}
type _OAuth2LogoutRequest OAuth2LogoutRequest
// NewOAuth2LogoutRequest instantiates a new OAuth2LogoutRequest 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 NewOAuth2LogoutRequest() *OAuth2LogoutRequest {
this := OAuth2LogoutRequest{}
return &this
}
// NewOAuth2LogoutRequestWithDefaults instantiates a new OAuth2LogoutRequest 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 NewOAuth2LogoutRequestWithDefaults() *OAuth2LogoutRequest {
this := OAuth2LogoutRequest{}
return &this
}
// GetChallenge returns the Challenge field value if set, zero value otherwise.
func (o *OAuth2LogoutRequest) GetChallenge() string {
if o == nil || IsNil(o.Challenge) {
var ret string
return ret
}
return *o.Challenge
}
// GetChallengeOk returns a tuple with the Challenge field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2LogoutRequest) GetChallengeOk() (*string, bool) {
if o == nil || IsNil(o.Challenge) {
return nil, false
}
return o.Challenge, true
}
// HasChallenge returns a boolean if a field has been set.
func (o *OAuth2LogoutRequest) HasChallenge() bool {
if o != nil && !IsNil(o.Challenge) {
return true
}
return false
}
// SetChallenge gets a reference to the given string and assigns it to the Challenge field.
func (o *OAuth2LogoutRequest) SetChallenge(v string) {
o.Challenge = &v
}
// GetClient returns the Client field value if set, zero value otherwise.
func (o *OAuth2LogoutRequest) GetClient() OAuth2Client {
if o == nil || IsNil(o.Client) {
var ret OAuth2Client
return ret
}
return *o.Client
}
// GetClientOk returns a tuple with the Client field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2LogoutRequest) GetClientOk() (*OAuth2Client, bool) {
if o == nil || IsNil(o.Client) {
return nil, false
}
return o.Client, true
}
// HasClient returns a boolean if a field has been set.
func (o *OAuth2LogoutRequest) HasClient() bool {
if o != nil && !IsNil(o.Client) {
return true
}
return false
}
// SetClient gets a reference to the given OAuth2Client and assigns it to the Client field.
func (o *OAuth2LogoutRequest) SetClient(v OAuth2Client) {
o.Client = &v
}
// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise.
func (o *OAuth2LogoutRequest) GetExpiresAt() time.Time {
if o == nil || IsNil(o.ExpiresAt) {
var ret time.Time
return ret
}
return *o.ExpiresAt
}
// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2LogoutRequest) GetExpiresAtOk() (*time.Time, bool) {
if o == nil || IsNil(o.ExpiresAt) {
return nil, false
}
return o.ExpiresAt, true
}
// HasExpiresAt returns a boolean if a field has been set.
func (o *OAuth2LogoutRequest) HasExpiresAt() bool {
if o != nil && !IsNil(o.ExpiresAt) {
return true
}
return false
}
// SetExpiresAt gets a reference to the given time.Time and assigns it to the ExpiresAt field.
func (o *OAuth2LogoutRequest) SetExpiresAt(v time.Time) {
o.ExpiresAt = &v
}
// GetRequestUrl returns the RequestUrl field value if set, zero value otherwise.
func (o *OAuth2LogoutRequest) GetRequestUrl() string {
if o == nil || IsNil(o.RequestUrl) {
var ret string
return ret
}
return *o.RequestUrl
}
// GetRequestUrlOk returns a tuple with the RequestUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2LogoutRequest) GetRequestUrlOk() (*string, bool) {
if o == nil || IsNil(o.RequestUrl) {
return nil, false
}
return o.RequestUrl, true
}
// HasRequestUrl returns a boolean if a field has been set.
func (o *OAuth2LogoutRequest) HasRequestUrl() bool {
if o != nil && !IsNil(o.RequestUrl) {
return true
}
return false
}
// SetRequestUrl gets a reference to the given string and assigns it to the RequestUrl field.
func (o *OAuth2LogoutRequest) SetRequestUrl(v string) {
o.RequestUrl = &v
}
// GetRequestedAt returns the RequestedAt field value if set, zero value otherwise.
func (o *OAuth2LogoutRequest) GetRequestedAt() time.Time {
if o == nil || IsNil(o.RequestedAt) {
var ret time.Time
return ret
}
return *o.RequestedAt
}
// GetRequestedAtOk returns a tuple with the RequestedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2LogoutRequest) GetRequestedAtOk() (*time.Time, bool) {
if o == nil || IsNil(o.RequestedAt) {
return nil, false
}
return o.RequestedAt, true
}
// HasRequestedAt returns a boolean if a field has been set.
func (o *OAuth2LogoutRequest) HasRequestedAt() bool {
if o != nil && !IsNil(o.RequestedAt) {
return true
}
return false
}
// SetRequestedAt gets a reference to the given time.Time and assigns it to the RequestedAt field.
func (o *OAuth2LogoutRequest) SetRequestedAt(v time.Time) {
o.RequestedAt = &v
}
// GetRpInitiated returns the RpInitiated field value if set, zero value otherwise.
func (o *OAuth2LogoutRequest) GetRpInitiated() bool {
if o == nil || IsNil(o.RpInitiated) {
var ret bool
return ret
}
return *o.RpInitiated
}
// GetRpInitiatedOk returns a tuple with the RpInitiated field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2LogoutRequest) GetRpInitiatedOk() (*bool, bool) {
if o == nil || IsNil(o.RpInitiated) {
return nil, false
}
return o.RpInitiated, true
}
// HasRpInitiated returns a boolean if a field has been set.
func (o *OAuth2LogoutRequest) HasRpInitiated() bool {
if o != nil && !IsNil(o.RpInitiated) {
return true
}
return false
}
// SetRpInitiated gets a reference to the given bool and assigns it to the RpInitiated field.
func (o *OAuth2LogoutRequest) SetRpInitiated(v bool) {
o.RpInitiated = &v
}
// GetSid returns the Sid field value if set, zero value otherwise.
func (o *OAuth2LogoutRequest) GetSid() string {
if o == nil || IsNil(o.Sid) {
var ret string
return ret
}
return *o.Sid
}
// GetSidOk returns a tuple with the Sid field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2LogoutRequest) GetSidOk() (*string, bool) {
if o == nil || IsNil(o.Sid) {
return nil, false
}
return o.Sid, true
}
// HasSid returns a boolean if a field has been set.
func (o *OAuth2LogoutRequest) HasSid() bool {
if o != nil && !IsNil(o.Sid) {
return true
}
return false
}
// SetSid gets a reference to the given string and assigns it to the Sid field.
func (o *OAuth2LogoutRequest) SetSid(v string) {
o.Sid = &v
}
// GetSubject returns the Subject field value if set, zero value otherwise.
func (o *OAuth2LogoutRequest) GetSubject() string {
if o == nil || IsNil(o.Subject) {
var ret string
return ret
}
return *o.Subject
}
// GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2LogoutRequest) GetSubjectOk() (*string, bool) {
if o == nil || IsNil(o.Subject) {
return nil, false
}
return o.Subject, true
}
// HasSubject returns a boolean if a field has been set.
func (o *OAuth2LogoutRequest) HasSubject() bool {
if o != nil && !IsNil(o.Subject) {
return true
}
return false
}
// SetSubject gets a reference to the given string and assigns it to the Subject field.
func (o *OAuth2LogoutRequest) SetSubject(v string) {
o.Subject = &v
}
func (o OAuth2LogoutRequest) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o OAuth2LogoutRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Challenge) {
toSerialize["challenge"] = o.Challenge
}
if !IsNil(o.Client) {
toSerialize["client"] = o.Client
}
if !IsNil(o.ExpiresAt) {
toSerialize["expires_at"] = o.ExpiresAt
}
if !IsNil(o.RequestUrl) {
toSerialize["request_url"] = o.RequestUrl
}
if !IsNil(o.RequestedAt) {
toSerialize["requested_at"] = o.RequestedAt
}
if !IsNil(o.RpInitiated) {
toSerialize["rp_initiated"] = o.RpInitiated
}
if !IsNil(o.Sid) {
toSerialize["sid"] = o.Sid
}
if !IsNil(o.Subject) {
toSerialize["subject"] = o.Subject
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *OAuth2LogoutRequest) UnmarshalJSON(data []byte) (err error) {
varOAuth2LogoutRequest := _OAuth2LogoutRequest{}
err = json.Unmarshal(data, &varOAuth2LogoutRequest)
if err != nil {
return err
}
*o = OAuth2LogoutRequest(varOAuth2LogoutRequest)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "challenge")
delete(additionalProperties, "client")
delete(additionalProperties, "expires_at")
delete(additionalProperties, "request_url")
delete(additionalProperties, "requested_at")
delete(additionalProperties, "rp_initiated")
delete(additionalProperties, "sid")
delete(additionalProperties, "subject")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableOAuth2LogoutRequest struct {
value *OAuth2LogoutRequest
isSet bool
}
func (v NullableOAuth2LogoutRequest) Get() *OAuth2LogoutRequest {
return v.value
}
func (v *NullableOAuth2LogoutRequest) Set(val *OAuth2LogoutRequest) {
v.value = val
v.isSet = true
}
func (v NullableOAuth2LogoutRequest) IsSet() bool {
return v.isSet
}
func (v *NullableOAuth2LogoutRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableOAuth2LogoutRequest(val *OAuth2LogoutRequest) *NullableOAuth2LogoutRequest {
return &NullableOAuth2LogoutRequest{value: val, isSet: true}
}
func (v NullableOAuth2LogoutRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableOAuth2LogoutRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}