-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathmodel_authentication.go
More file actions
486 lines (396 loc) · 15.5 KB
/
model_authentication.go
File metadata and controls
486 lines (396 loc) · 15.5 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
/*
STACKIT Git API
STACKIT Git management API.
API version: 1beta.0.4
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package git
import (
"encoding/json"
"time"
)
// checks if the Authentication type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Authentication{}
/*
types and functions for auto_discover_url
*/
// isNotNullableString
type AuthenticationGetAutoDiscoverUrlAttributeType = *string
func getAuthenticationGetAutoDiscoverUrlAttributeTypeOk(arg AuthenticationGetAutoDiscoverUrlAttributeType) (ret AuthenticationGetAutoDiscoverUrlRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setAuthenticationGetAutoDiscoverUrlAttributeType(arg *AuthenticationGetAutoDiscoverUrlAttributeType, val AuthenticationGetAutoDiscoverUrlRetType) {
*arg = &val
}
type AuthenticationGetAutoDiscoverUrlArgType = string
type AuthenticationGetAutoDiscoverUrlRetType = string
/*
types and functions for client_id
*/
// isNotNullableString
type AuthenticationGetClientIdAttributeType = *string
func getAuthenticationGetClientIdAttributeTypeOk(arg AuthenticationGetClientIdAttributeType) (ret AuthenticationGetClientIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setAuthenticationGetClientIdAttributeType(arg *AuthenticationGetClientIdAttributeType, val AuthenticationGetClientIdRetType) {
*arg = &val
}
type AuthenticationGetClientIdArgType = string
type AuthenticationGetClientIdRetType = string
/*
types and functions for created_at
*/
// isDateTime
type AuthenticationGetCreatedAtAttributeType = *time.Time
type AuthenticationGetCreatedAtArgType = time.Time
type AuthenticationGetCreatedAtRetType = time.Time
func getAuthenticationGetCreatedAtAttributeTypeOk(arg AuthenticationGetCreatedAtAttributeType) (ret AuthenticationGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setAuthenticationGetCreatedAtAttributeType(arg *AuthenticationGetCreatedAtAttributeType, val AuthenticationGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for icon_url
*/
// isNotNullableString
type AuthenticationGetIconUrlAttributeType = *string
func getAuthenticationGetIconUrlAttributeTypeOk(arg AuthenticationGetIconUrlAttributeType) (ret AuthenticationGetIconUrlRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setAuthenticationGetIconUrlAttributeType(arg *AuthenticationGetIconUrlAttributeType, val AuthenticationGetIconUrlRetType) {
*arg = &val
}
type AuthenticationGetIconUrlArgType = string
type AuthenticationGetIconUrlRetType = string
/*
types and functions for id
*/
// isNotNullableString
type AuthenticationGetIdAttributeType = *string
func getAuthenticationGetIdAttributeTypeOk(arg AuthenticationGetIdAttributeType) (ret AuthenticationGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setAuthenticationGetIdAttributeType(arg *AuthenticationGetIdAttributeType, val AuthenticationGetIdRetType) {
*arg = &val
}
type AuthenticationGetIdArgType = string
type AuthenticationGetIdRetType = string
/*
types and functions for name
*/
// isNotNullableString
type AuthenticationGetNameAttributeType = *string
func getAuthenticationGetNameAttributeTypeOk(arg AuthenticationGetNameAttributeType) (ret AuthenticationGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setAuthenticationGetNameAttributeType(arg *AuthenticationGetNameAttributeType, val AuthenticationGetNameRetType) {
*arg = &val
}
type AuthenticationGetNameArgType = string
type AuthenticationGetNameRetType = string
/*
types and functions for provider
*/
// isNotNullableString
type AuthenticationGetProviderAttributeType = *string
func getAuthenticationGetProviderAttributeTypeOk(arg AuthenticationGetProviderAttributeType) (ret AuthenticationGetProviderRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setAuthenticationGetProviderAttributeType(arg *AuthenticationGetProviderAttributeType, val AuthenticationGetProviderRetType) {
*arg = &val
}
type AuthenticationGetProviderArgType = string
type AuthenticationGetProviderRetType = string
/*
types and functions for scopes
*/
// isNotNullableString
type AuthenticationGetScopesAttributeType = *string
func getAuthenticationGetScopesAttributeTypeOk(arg AuthenticationGetScopesAttributeType) (ret AuthenticationGetScopesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setAuthenticationGetScopesAttributeType(arg *AuthenticationGetScopesAttributeType, val AuthenticationGetScopesRetType) {
*arg = &val
}
type AuthenticationGetScopesArgType = string
type AuthenticationGetScopesRetType = string
/*
types and functions for status
*/
// isNotNullableString
type AuthenticationGetStatusAttributeType = *string
func getAuthenticationGetStatusAttributeTypeOk(arg AuthenticationGetStatusAttributeType) (ret AuthenticationGetStatusRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setAuthenticationGetStatusAttributeType(arg *AuthenticationGetStatusAttributeType, val AuthenticationGetStatusRetType) {
*arg = &val
}
type AuthenticationGetStatusArgType = string
type AuthenticationGetStatusRetType = string
// Authentication Describes an authentication definition associated to a STACKIT Git instance. The provider type will be an openidConnect type.
type Authentication struct {
// The well-known configuration url to use for this authentication definition.
// REQUIRED
AutoDiscoverUrl AuthenticationGetAutoDiscoverUrlAttributeType `json:"auto_discover_url" required:"true"`
// The IDP client id to use.
// REQUIRED
ClientId AuthenticationGetClientIdAttributeType `json:"client_id" required:"true"`
// REQUIRED
CreatedAt AuthenticationGetCreatedAtAttributeType `json:"created_at" required:"true"`
// The url of the icon to use for this authentication definition.
// REQUIRED
IconUrl AuthenticationGetIconUrlAttributeType `json:"icon_url" required:"true"`
// An auto generated unique uuid which identifies the authentication definition in STACKIT Git instances.
// REQUIRED
Id AuthenticationGetIdAttributeType `json:"id" required:"true"`
// The name to identify an authentication definition associated with a STACKIT Git instance.
// REQUIRED
Name AuthenticationGetNameAttributeType `json:"name" required:"true"`
// The Oauth2 provider to use.
// REQUIRED
Provider AuthenticationGetProviderAttributeType `json:"provider" required:"true"`
// Scopes defines the OIDC scopes to request.
// REQUIRED
Scopes AuthenticationGetScopesAttributeType `json:"scopes" required:"true"`
// The current status of the authentication definition.
// REQUIRED
Status AuthenticationGetStatusAttributeType `json:"status" required:"true"`
}
type _Authentication Authentication
// NewAuthentication instantiates a new Authentication 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 NewAuthentication(autoDiscoverUrl AuthenticationGetAutoDiscoverUrlArgType, clientId AuthenticationGetClientIdArgType, createdAt AuthenticationGetCreatedAtArgType, iconUrl AuthenticationGetIconUrlArgType, id AuthenticationGetIdArgType, name AuthenticationGetNameArgType, provider AuthenticationGetProviderArgType, scopes AuthenticationGetScopesArgType, status AuthenticationGetStatusArgType) *Authentication {
this := Authentication{}
setAuthenticationGetAutoDiscoverUrlAttributeType(&this.AutoDiscoverUrl, autoDiscoverUrl)
setAuthenticationGetClientIdAttributeType(&this.ClientId, clientId)
setAuthenticationGetCreatedAtAttributeType(&this.CreatedAt, createdAt)
setAuthenticationGetIconUrlAttributeType(&this.IconUrl, iconUrl)
setAuthenticationGetIdAttributeType(&this.Id, id)
setAuthenticationGetNameAttributeType(&this.Name, name)
setAuthenticationGetProviderAttributeType(&this.Provider, provider)
setAuthenticationGetScopesAttributeType(&this.Scopes, scopes)
setAuthenticationGetStatusAttributeType(&this.Status, status)
return &this
}
// NewAuthenticationWithDefaults instantiates a new Authentication 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 NewAuthenticationWithDefaults() *Authentication {
this := Authentication{}
return &this
}
// GetAutoDiscoverUrl returns the AutoDiscoverUrl field value
func (o *Authentication) GetAutoDiscoverUrl() (ret AuthenticationGetAutoDiscoverUrlRetType) {
ret, _ = o.GetAutoDiscoverUrlOk()
return ret
}
// GetAutoDiscoverUrlOk returns a tuple with the AutoDiscoverUrl field value
// and a boolean to check if the value has been set.
func (o *Authentication) GetAutoDiscoverUrlOk() (ret AuthenticationGetAutoDiscoverUrlRetType, ok bool) {
return getAuthenticationGetAutoDiscoverUrlAttributeTypeOk(o.AutoDiscoverUrl)
}
// SetAutoDiscoverUrl sets field value
func (o *Authentication) SetAutoDiscoverUrl(v AuthenticationGetAutoDiscoverUrlRetType) {
setAuthenticationGetAutoDiscoverUrlAttributeType(&o.AutoDiscoverUrl, v)
}
// GetClientId returns the ClientId field value
func (o *Authentication) GetClientId() (ret AuthenticationGetClientIdRetType) {
ret, _ = o.GetClientIdOk()
return ret
}
// GetClientIdOk returns a tuple with the ClientId field value
// and a boolean to check if the value has been set.
func (o *Authentication) GetClientIdOk() (ret AuthenticationGetClientIdRetType, ok bool) {
return getAuthenticationGetClientIdAttributeTypeOk(o.ClientId)
}
// SetClientId sets field value
func (o *Authentication) SetClientId(v AuthenticationGetClientIdRetType) {
setAuthenticationGetClientIdAttributeType(&o.ClientId, v)
}
// GetCreatedAt returns the CreatedAt field value
func (o *Authentication) GetCreatedAt() (ret AuthenticationGetCreatedAtRetType) {
ret, _ = o.GetCreatedAtOk()
return ret
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value
// and a boolean to check if the value has been set.
func (o *Authentication) GetCreatedAtOk() (ret AuthenticationGetCreatedAtRetType, ok bool) {
return getAuthenticationGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// SetCreatedAt sets field value
func (o *Authentication) SetCreatedAt(v AuthenticationGetCreatedAtRetType) {
setAuthenticationGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetIconUrl returns the IconUrl field value
func (o *Authentication) GetIconUrl() (ret AuthenticationGetIconUrlRetType) {
ret, _ = o.GetIconUrlOk()
return ret
}
// GetIconUrlOk returns a tuple with the IconUrl field value
// and a boolean to check if the value has been set.
func (o *Authentication) GetIconUrlOk() (ret AuthenticationGetIconUrlRetType, ok bool) {
return getAuthenticationGetIconUrlAttributeTypeOk(o.IconUrl)
}
// SetIconUrl sets field value
func (o *Authentication) SetIconUrl(v AuthenticationGetIconUrlRetType) {
setAuthenticationGetIconUrlAttributeType(&o.IconUrl, v)
}
// GetId returns the Id field value
func (o *Authentication) GetId() (ret AuthenticationGetIdRetType) {
ret, _ = o.GetIdOk()
return ret
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *Authentication) GetIdOk() (ret AuthenticationGetIdRetType, ok bool) {
return getAuthenticationGetIdAttributeTypeOk(o.Id)
}
// SetId sets field value
func (o *Authentication) SetId(v AuthenticationGetIdRetType) {
setAuthenticationGetIdAttributeType(&o.Id, v)
}
// GetName returns the Name field value
func (o *Authentication) GetName() (ret AuthenticationGetNameRetType) {
ret, _ = o.GetNameOk()
return ret
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *Authentication) GetNameOk() (ret AuthenticationGetNameRetType, ok bool) {
return getAuthenticationGetNameAttributeTypeOk(o.Name)
}
// SetName sets field value
func (o *Authentication) SetName(v AuthenticationGetNameRetType) {
setAuthenticationGetNameAttributeType(&o.Name, v)
}
// GetProvider returns the Provider field value
func (o *Authentication) GetProvider() (ret AuthenticationGetProviderRetType) {
ret, _ = o.GetProviderOk()
return ret
}
// GetProviderOk returns a tuple with the Provider field value
// and a boolean to check if the value has been set.
func (o *Authentication) GetProviderOk() (ret AuthenticationGetProviderRetType, ok bool) {
return getAuthenticationGetProviderAttributeTypeOk(o.Provider)
}
// SetProvider sets field value
func (o *Authentication) SetProvider(v AuthenticationGetProviderRetType) {
setAuthenticationGetProviderAttributeType(&o.Provider, v)
}
// GetScopes returns the Scopes field value
func (o *Authentication) GetScopes() (ret AuthenticationGetScopesRetType) {
ret, _ = o.GetScopesOk()
return ret
}
// GetScopesOk returns a tuple with the Scopes field value
// and a boolean to check if the value has been set.
func (o *Authentication) GetScopesOk() (ret AuthenticationGetScopesRetType, ok bool) {
return getAuthenticationGetScopesAttributeTypeOk(o.Scopes)
}
// SetScopes sets field value
func (o *Authentication) SetScopes(v AuthenticationGetScopesRetType) {
setAuthenticationGetScopesAttributeType(&o.Scopes, v)
}
// GetStatus returns the Status field value
func (o *Authentication) GetStatus() (ret AuthenticationGetStatusRetType) {
ret, _ = o.GetStatusOk()
return ret
}
// GetStatusOk returns a tuple with the Status field value
// and a boolean to check if the value has been set.
func (o *Authentication) GetStatusOk() (ret AuthenticationGetStatusRetType, ok bool) {
return getAuthenticationGetStatusAttributeTypeOk(o.Status)
}
// SetStatus sets field value
func (o *Authentication) SetStatus(v AuthenticationGetStatusRetType) {
setAuthenticationGetStatusAttributeType(&o.Status, v)
}
func (o Authentication) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getAuthenticationGetAutoDiscoverUrlAttributeTypeOk(o.AutoDiscoverUrl); ok {
toSerialize["AutoDiscoverUrl"] = val
}
if val, ok := getAuthenticationGetClientIdAttributeTypeOk(o.ClientId); ok {
toSerialize["ClientId"] = val
}
if val, ok := getAuthenticationGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getAuthenticationGetIconUrlAttributeTypeOk(o.IconUrl); ok {
toSerialize["IconUrl"] = val
}
if val, ok := getAuthenticationGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getAuthenticationGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getAuthenticationGetProviderAttributeTypeOk(o.Provider); ok {
toSerialize["Provider"] = val
}
if val, ok := getAuthenticationGetScopesAttributeTypeOk(o.Scopes); ok {
toSerialize["Scopes"] = val
}
if val, ok := getAuthenticationGetStatusAttributeTypeOk(o.Status); ok {
toSerialize["Status"] = val
}
return toSerialize, nil
}
type NullableAuthentication struct {
value *Authentication
isSet bool
}
func (v NullableAuthentication) Get() *Authentication {
return v.value
}
func (v *NullableAuthentication) Set(val *Authentication) {
v.value = val
v.isSet = true
}
func (v NullableAuthentication) IsSet() bool {
return v.isSet
}
func (v *NullableAuthentication) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAuthentication(val *Authentication) *NullableAuthentication {
return &NullableAuthentication{value: val, isSet: true}
}
func (v NullableAuthentication) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAuthentication) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}