forked from okta/okta-sdk-golang
/
model_o_auth2_claim.go
528 lines (445 loc) · 14.2 KB
/
model_o_auth2_claim.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
/*
Okta Admin Management
Allows customers to easily access the Okta Management APIs
Copyright 2018 - Present Okta, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
API version: 5.1.0
Contact: devex-public@okta.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package okta
import (
"encoding/json"
)
// OAuth2Claim struct for OAuth2Claim
type OAuth2Claim struct {
AlwaysIncludeInToken *bool `json:"alwaysIncludeInToken,omitempty"`
ClaimType *OAuth2ClaimType `json:"claimType,omitempty"`
Conditions *OAuth2ClaimConditions `json:"conditions,omitempty"`
GroupFilterType *OAuth2ClaimGroupFilterType `json:"group_filter_type,omitempty"`
Id *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Status *LifecycleStatus `json:"status,omitempty"`
System *bool `json:"system,omitempty"`
Value *string `json:"value,omitempty"`
ValueType *OAuth2ClaimValueType `json:"valueType,omitempty"`
Links *LinksSelf `json:"_links,omitempty"`
AdditionalProperties map[string]interface{}
}
type _OAuth2Claim OAuth2Claim
// NewOAuth2Claim instantiates a new OAuth2Claim 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 NewOAuth2Claim() *OAuth2Claim {
this := OAuth2Claim{}
return &this
}
// NewOAuth2ClaimWithDefaults instantiates a new OAuth2Claim 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 NewOAuth2ClaimWithDefaults() *OAuth2Claim {
this := OAuth2Claim{}
return &this
}
// GetAlwaysIncludeInToken returns the AlwaysIncludeInToken field value if set, zero value otherwise.
func (o *OAuth2Claim) GetAlwaysIncludeInToken() bool {
if o == nil || o.AlwaysIncludeInToken == nil {
var ret bool
return ret
}
return *o.AlwaysIncludeInToken
}
// GetAlwaysIncludeInTokenOk returns a tuple with the AlwaysIncludeInToken field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2Claim) GetAlwaysIncludeInTokenOk() (*bool, bool) {
if o == nil || o.AlwaysIncludeInToken == nil {
return nil, false
}
return o.AlwaysIncludeInToken, true
}
// HasAlwaysIncludeInToken returns a boolean if a field has been set.
func (o *OAuth2Claim) HasAlwaysIncludeInToken() bool {
if o != nil && o.AlwaysIncludeInToken != nil {
return true
}
return false
}
// SetAlwaysIncludeInToken gets a reference to the given bool and assigns it to the AlwaysIncludeInToken field.
func (o *OAuth2Claim) SetAlwaysIncludeInToken(v bool) {
o.AlwaysIncludeInToken = &v
}
// GetClaimType returns the ClaimType field value if set, zero value otherwise.
func (o *OAuth2Claim) GetClaimType() OAuth2ClaimType {
if o == nil || o.ClaimType == nil {
var ret OAuth2ClaimType
return ret
}
return *o.ClaimType
}
// GetClaimTypeOk returns a tuple with the ClaimType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2Claim) GetClaimTypeOk() (*OAuth2ClaimType, bool) {
if o == nil || o.ClaimType == nil {
return nil, false
}
return o.ClaimType, true
}
// HasClaimType returns a boolean if a field has been set.
func (o *OAuth2Claim) HasClaimType() bool {
if o != nil && o.ClaimType != nil {
return true
}
return false
}
// SetClaimType gets a reference to the given OAuth2ClaimType and assigns it to the ClaimType field.
func (o *OAuth2Claim) SetClaimType(v OAuth2ClaimType) {
o.ClaimType = &v
}
// GetConditions returns the Conditions field value if set, zero value otherwise.
func (o *OAuth2Claim) GetConditions() OAuth2ClaimConditions {
if o == nil || o.Conditions == nil {
var ret OAuth2ClaimConditions
return ret
}
return *o.Conditions
}
// GetConditionsOk returns a tuple with the Conditions field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2Claim) GetConditionsOk() (*OAuth2ClaimConditions, bool) {
if o == nil || o.Conditions == nil {
return nil, false
}
return o.Conditions, true
}
// HasConditions returns a boolean if a field has been set.
func (o *OAuth2Claim) HasConditions() bool {
if o != nil && o.Conditions != nil {
return true
}
return false
}
// SetConditions gets a reference to the given OAuth2ClaimConditions and assigns it to the Conditions field.
func (o *OAuth2Claim) SetConditions(v OAuth2ClaimConditions) {
o.Conditions = &v
}
// GetGroupFilterType returns the GroupFilterType field value if set, zero value otherwise.
func (o *OAuth2Claim) GetGroupFilterType() OAuth2ClaimGroupFilterType {
if o == nil || o.GroupFilterType == nil {
var ret OAuth2ClaimGroupFilterType
return ret
}
return *o.GroupFilterType
}
// GetGroupFilterTypeOk returns a tuple with the GroupFilterType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2Claim) GetGroupFilterTypeOk() (*OAuth2ClaimGroupFilterType, bool) {
if o == nil || o.GroupFilterType == nil {
return nil, false
}
return o.GroupFilterType, true
}
// HasGroupFilterType returns a boolean if a field has been set.
func (o *OAuth2Claim) HasGroupFilterType() bool {
if o != nil && o.GroupFilterType != nil {
return true
}
return false
}
// SetGroupFilterType gets a reference to the given OAuth2ClaimGroupFilterType and assigns it to the GroupFilterType field.
func (o *OAuth2Claim) SetGroupFilterType(v OAuth2ClaimGroupFilterType) {
o.GroupFilterType = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *OAuth2Claim) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2Claim) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *OAuth2Claim) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *OAuth2Claim) SetId(v string) {
o.Id = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *OAuth2Claim) GetName() string {
if o == nil || o.Name == nil {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2Claim) GetNameOk() (*string, bool) {
if o == nil || o.Name == nil {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *OAuth2Claim) HasName() bool {
if o != nil && o.Name != nil {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *OAuth2Claim) SetName(v string) {
o.Name = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *OAuth2Claim) GetStatus() LifecycleStatus {
if o == nil || o.Status == nil {
var ret LifecycleStatus
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2Claim) GetStatusOk() (*LifecycleStatus, bool) {
if o == nil || o.Status == nil {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *OAuth2Claim) HasStatus() bool {
if o != nil && o.Status != nil {
return true
}
return false
}
// SetStatus gets a reference to the given LifecycleStatus and assigns it to the Status field.
func (o *OAuth2Claim) SetStatus(v LifecycleStatus) {
o.Status = &v
}
// GetSystem returns the System field value if set, zero value otherwise.
func (o *OAuth2Claim) GetSystem() bool {
if o == nil || o.System == nil {
var ret bool
return ret
}
return *o.System
}
// GetSystemOk returns a tuple with the System field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2Claim) GetSystemOk() (*bool, bool) {
if o == nil || o.System == nil {
return nil, false
}
return o.System, true
}
// HasSystem returns a boolean if a field has been set.
func (o *OAuth2Claim) HasSystem() bool {
if o != nil && o.System != nil {
return true
}
return false
}
// SetSystem gets a reference to the given bool and assigns it to the System field.
func (o *OAuth2Claim) SetSystem(v bool) {
o.System = &v
}
// GetValue returns the Value field value if set, zero value otherwise.
func (o *OAuth2Claim) GetValue() string {
if o == nil || o.Value == nil {
var ret string
return ret
}
return *o.Value
}
// GetValueOk returns a tuple with the Value field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2Claim) GetValueOk() (*string, bool) {
if o == nil || o.Value == nil {
return nil, false
}
return o.Value, true
}
// HasValue returns a boolean if a field has been set.
func (o *OAuth2Claim) HasValue() bool {
if o != nil && o.Value != nil {
return true
}
return false
}
// SetValue gets a reference to the given string and assigns it to the Value field.
func (o *OAuth2Claim) SetValue(v string) {
o.Value = &v
}
// GetValueType returns the ValueType field value if set, zero value otherwise.
func (o *OAuth2Claim) GetValueType() OAuth2ClaimValueType {
if o == nil || o.ValueType == nil {
var ret OAuth2ClaimValueType
return ret
}
return *o.ValueType
}
// GetValueTypeOk returns a tuple with the ValueType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2Claim) GetValueTypeOk() (*OAuth2ClaimValueType, bool) {
if o == nil || o.ValueType == nil {
return nil, false
}
return o.ValueType, true
}
// HasValueType returns a boolean if a field has been set.
func (o *OAuth2Claim) HasValueType() bool {
if o != nil && o.ValueType != nil {
return true
}
return false
}
// SetValueType gets a reference to the given OAuth2ClaimValueType and assigns it to the ValueType field.
func (o *OAuth2Claim) SetValueType(v OAuth2ClaimValueType) {
o.ValueType = &v
}
// GetLinks returns the Links field value if set, zero value otherwise.
func (o *OAuth2Claim) GetLinks() LinksSelf {
if o == nil || o.Links == nil {
var ret LinksSelf
return ret
}
return *o.Links
}
// GetLinksOk returns a tuple with the Links field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2Claim) GetLinksOk() (*LinksSelf, bool) {
if o == nil || o.Links == nil {
return nil, false
}
return o.Links, true
}
// HasLinks returns a boolean if a field has been set.
func (o *OAuth2Claim) HasLinks() bool {
if o != nil && o.Links != nil {
return true
}
return false
}
// SetLinks gets a reference to the given LinksSelf and assigns it to the Links field.
func (o *OAuth2Claim) SetLinks(v LinksSelf) {
o.Links = &v
}
func (o OAuth2Claim) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.AlwaysIncludeInToken != nil {
toSerialize["alwaysIncludeInToken"] = o.AlwaysIncludeInToken
}
if o.ClaimType != nil {
toSerialize["claimType"] = o.ClaimType
}
if o.Conditions != nil {
toSerialize["conditions"] = o.Conditions
}
if o.GroupFilterType != nil {
toSerialize["group_filter_type"] = o.GroupFilterType
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if o.Name != nil {
toSerialize["name"] = o.Name
}
if o.Status != nil {
toSerialize["status"] = o.Status
}
if o.System != nil {
toSerialize["system"] = o.System
}
if o.Value != nil {
toSerialize["value"] = o.Value
}
if o.ValueType != nil {
toSerialize["valueType"] = o.ValueType
}
if o.Links != nil {
toSerialize["_links"] = o.Links
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *OAuth2Claim) UnmarshalJSON(bytes []byte) (err error) {
varOAuth2Claim := _OAuth2Claim{}
err = json.Unmarshal(bytes, &varOAuth2Claim)
if err == nil {
*o = OAuth2Claim(varOAuth2Claim)
} else {
return err
}
additionalProperties := make(map[string]interface{})
err = json.Unmarshal(bytes, &additionalProperties)
if err == nil {
delete(additionalProperties, "alwaysIncludeInToken")
delete(additionalProperties, "claimType")
delete(additionalProperties, "conditions")
delete(additionalProperties, "group_filter_type")
delete(additionalProperties, "id")
delete(additionalProperties, "name")
delete(additionalProperties, "status")
delete(additionalProperties, "system")
delete(additionalProperties, "value")
delete(additionalProperties, "valueType")
delete(additionalProperties, "_links")
o.AdditionalProperties = additionalProperties
} else {
return err
}
return err
}
type NullableOAuth2Claim struct {
value *OAuth2Claim
isSet bool
}
func (v NullableOAuth2Claim) Get() *OAuth2Claim {
return v.value
}
func (v *NullableOAuth2Claim) Set(val *OAuth2Claim) {
v.value = val
v.isSet = true
}
func (v NullableOAuth2Claim) IsSet() bool {
return v.isSet
}
func (v *NullableOAuth2Claim) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableOAuth2Claim(val *OAuth2Claim) *NullableOAuth2Claim {
return &NullableOAuth2Claim{value: val, isSet: true}
}
func (v NullableOAuth2Claim) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableOAuth2Claim) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}