generated from delphix/.github
/
model_saml_config_params.go
411 lines (350 loc) · 11.7 KB
/
model_saml_config_params.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
/*
Delphix DCT API
Delphix DCT API
API version: 3.1.0
Contact: support@delphix.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package delphix_dct_api
import (
"encoding/json"
)
// checks if the SAMLConfigParams type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SAMLConfigParams{}
// SAMLConfigParams Parameters to read or update SAML Config
type SAMLConfigParams struct {
// When set, SAML settings are enabled. False by default.
Enabled *bool `json:"enabled,omitempty"`
// When set, the system will automatically create new Accounts for those who have logged in using SAML. This must be true if SAML user is not already registered in system. True by default.
AutoCreateUsers *bool `json:"auto_create_users,omitempty"`
// IdP metadata for this service provider. This is a required property for successful SAML authentication.
Metadata *string `json:"metadata,omitempty"`
// Unique identifier of this instance as a SAML/SSO service provider.
EntityId *string `json:"entity_id,omitempty"`
// Maximum time difference allowed between a SAML response and the DCT's current time, in seconds. If not set, it defaults to 120 seconds.
ResponseSkew *int32 `json:"response_skew,omitempty"`
// Group mapped attribute on SAML to create account tags in DCT.
GroupAttr *string `json:"group_attr,omitempty"`
// First name attribute mapped on SAML used for mapping on DCT account.
FirstNameAttr *string `json:"first_name_attr,omitempty"`
// Last name attribute mapped on SAML used for mapping on DCT account.
LastNameAttr *string `json:"last_name_attr,omitempty"`
}
// NewSAMLConfigParams instantiates a new SAMLConfigParams 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 NewSAMLConfigParams() *SAMLConfigParams {
this := SAMLConfigParams{}
var enabled bool = false
this.Enabled = &enabled
var autoCreateUsers bool = true
this.AutoCreateUsers = &autoCreateUsers
var responseSkew int32 = 120
this.ResponseSkew = &responseSkew
var groupAttr string = "groups"
this.GroupAttr = &groupAttr
var firstNameAttr string = "firstName"
this.FirstNameAttr = &firstNameAttr
var lastNameAttr string = "lastName"
this.LastNameAttr = &lastNameAttr
return &this
}
// NewSAMLConfigParamsWithDefaults instantiates a new SAMLConfigParams 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 NewSAMLConfigParamsWithDefaults() *SAMLConfigParams {
this := SAMLConfigParams{}
var enabled bool = false
this.Enabled = &enabled
var autoCreateUsers bool = true
this.AutoCreateUsers = &autoCreateUsers
var responseSkew int32 = 120
this.ResponseSkew = &responseSkew
var groupAttr string = "groups"
this.GroupAttr = &groupAttr
var firstNameAttr string = "firstName"
this.FirstNameAttr = &firstNameAttr
var lastNameAttr string = "lastName"
this.LastNameAttr = &lastNameAttr
return &this
}
// GetEnabled returns the Enabled field value if set, zero value otherwise.
func (o *SAMLConfigParams) GetEnabled() bool {
if o == nil || IsNil(o.Enabled) {
var ret bool
return ret
}
return *o.Enabled
}
// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SAMLConfigParams) GetEnabledOk() (*bool, bool) {
if o == nil || IsNil(o.Enabled) {
return nil, false
}
return o.Enabled, true
}
// HasEnabled returns a boolean if a field has been set.
func (o *SAMLConfigParams) HasEnabled() bool {
if o != nil && !IsNil(o.Enabled) {
return true
}
return false
}
// SetEnabled gets a reference to the given bool and assigns it to the Enabled field.
func (o *SAMLConfigParams) SetEnabled(v bool) {
o.Enabled = &v
}
// GetAutoCreateUsers returns the AutoCreateUsers field value if set, zero value otherwise.
func (o *SAMLConfigParams) GetAutoCreateUsers() bool {
if o == nil || IsNil(o.AutoCreateUsers) {
var ret bool
return ret
}
return *o.AutoCreateUsers
}
// GetAutoCreateUsersOk returns a tuple with the AutoCreateUsers field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SAMLConfigParams) GetAutoCreateUsersOk() (*bool, bool) {
if o == nil || IsNil(o.AutoCreateUsers) {
return nil, false
}
return o.AutoCreateUsers, true
}
// HasAutoCreateUsers returns a boolean if a field has been set.
func (o *SAMLConfigParams) HasAutoCreateUsers() bool {
if o != nil && !IsNil(o.AutoCreateUsers) {
return true
}
return false
}
// SetAutoCreateUsers gets a reference to the given bool and assigns it to the AutoCreateUsers field.
func (o *SAMLConfigParams) SetAutoCreateUsers(v bool) {
o.AutoCreateUsers = &v
}
// GetMetadata returns the Metadata field value if set, zero value otherwise.
func (o *SAMLConfigParams) GetMetadata() string {
if o == nil || IsNil(o.Metadata) {
var ret string
return ret
}
return *o.Metadata
}
// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SAMLConfigParams) GetMetadataOk() (*string, bool) {
if o == nil || IsNil(o.Metadata) {
return nil, false
}
return o.Metadata, true
}
// HasMetadata returns a boolean if a field has been set.
func (o *SAMLConfigParams) HasMetadata() bool {
if o != nil && !IsNil(o.Metadata) {
return true
}
return false
}
// SetMetadata gets a reference to the given string and assigns it to the Metadata field.
func (o *SAMLConfigParams) SetMetadata(v string) {
o.Metadata = &v
}
// GetEntityId returns the EntityId field value if set, zero value otherwise.
func (o *SAMLConfigParams) GetEntityId() string {
if o == nil || IsNil(o.EntityId) {
var ret string
return ret
}
return *o.EntityId
}
// GetEntityIdOk returns a tuple with the EntityId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SAMLConfigParams) GetEntityIdOk() (*string, bool) {
if o == nil || IsNil(o.EntityId) {
return nil, false
}
return o.EntityId, true
}
// HasEntityId returns a boolean if a field has been set.
func (o *SAMLConfigParams) HasEntityId() bool {
if o != nil && !IsNil(o.EntityId) {
return true
}
return false
}
// SetEntityId gets a reference to the given string and assigns it to the EntityId field.
func (o *SAMLConfigParams) SetEntityId(v string) {
o.EntityId = &v
}
// GetResponseSkew returns the ResponseSkew field value if set, zero value otherwise.
func (o *SAMLConfigParams) GetResponseSkew() int32 {
if o == nil || IsNil(o.ResponseSkew) {
var ret int32
return ret
}
return *o.ResponseSkew
}
// GetResponseSkewOk returns a tuple with the ResponseSkew field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SAMLConfigParams) GetResponseSkewOk() (*int32, bool) {
if o == nil || IsNil(o.ResponseSkew) {
return nil, false
}
return o.ResponseSkew, true
}
// HasResponseSkew returns a boolean if a field has been set.
func (o *SAMLConfigParams) HasResponseSkew() bool {
if o != nil && !IsNil(o.ResponseSkew) {
return true
}
return false
}
// SetResponseSkew gets a reference to the given int32 and assigns it to the ResponseSkew field.
func (o *SAMLConfigParams) SetResponseSkew(v int32) {
o.ResponseSkew = &v
}
// GetGroupAttr returns the GroupAttr field value if set, zero value otherwise.
func (o *SAMLConfigParams) GetGroupAttr() string {
if o == nil || IsNil(o.GroupAttr) {
var ret string
return ret
}
return *o.GroupAttr
}
// GetGroupAttrOk returns a tuple with the GroupAttr field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SAMLConfigParams) GetGroupAttrOk() (*string, bool) {
if o == nil || IsNil(o.GroupAttr) {
return nil, false
}
return o.GroupAttr, true
}
// HasGroupAttr returns a boolean if a field has been set.
func (o *SAMLConfigParams) HasGroupAttr() bool {
if o != nil && !IsNil(o.GroupAttr) {
return true
}
return false
}
// SetGroupAttr gets a reference to the given string and assigns it to the GroupAttr field.
func (o *SAMLConfigParams) SetGroupAttr(v string) {
o.GroupAttr = &v
}
// GetFirstNameAttr returns the FirstNameAttr field value if set, zero value otherwise.
func (o *SAMLConfigParams) GetFirstNameAttr() string {
if o == nil || IsNil(o.FirstNameAttr) {
var ret string
return ret
}
return *o.FirstNameAttr
}
// GetFirstNameAttrOk returns a tuple with the FirstNameAttr field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SAMLConfigParams) GetFirstNameAttrOk() (*string, bool) {
if o == nil || IsNil(o.FirstNameAttr) {
return nil, false
}
return o.FirstNameAttr, true
}
// HasFirstNameAttr returns a boolean if a field has been set.
func (o *SAMLConfigParams) HasFirstNameAttr() bool {
if o != nil && !IsNil(o.FirstNameAttr) {
return true
}
return false
}
// SetFirstNameAttr gets a reference to the given string and assigns it to the FirstNameAttr field.
func (o *SAMLConfigParams) SetFirstNameAttr(v string) {
o.FirstNameAttr = &v
}
// GetLastNameAttr returns the LastNameAttr field value if set, zero value otherwise.
func (o *SAMLConfigParams) GetLastNameAttr() string {
if o == nil || IsNil(o.LastNameAttr) {
var ret string
return ret
}
return *o.LastNameAttr
}
// GetLastNameAttrOk returns a tuple with the LastNameAttr field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SAMLConfigParams) GetLastNameAttrOk() (*string, bool) {
if o == nil || IsNil(o.LastNameAttr) {
return nil, false
}
return o.LastNameAttr, true
}
// HasLastNameAttr returns a boolean if a field has been set.
func (o *SAMLConfigParams) HasLastNameAttr() bool {
if o != nil && !IsNil(o.LastNameAttr) {
return true
}
return false
}
// SetLastNameAttr gets a reference to the given string and assigns it to the LastNameAttr field.
func (o *SAMLConfigParams) SetLastNameAttr(v string) {
o.LastNameAttr = &v
}
func (o SAMLConfigParams) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SAMLConfigParams) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Enabled) {
toSerialize["enabled"] = o.Enabled
}
if !IsNil(o.AutoCreateUsers) {
toSerialize["auto_create_users"] = o.AutoCreateUsers
}
if !IsNil(o.Metadata) {
toSerialize["metadata"] = o.Metadata
}
if !IsNil(o.EntityId) {
toSerialize["entity_id"] = o.EntityId
}
if !IsNil(o.ResponseSkew) {
toSerialize["response_skew"] = o.ResponseSkew
}
if !IsNil(o.GroupAttr) {
toSerialize["group_attr"] = o.GroupAttr
}
if !IsNil(o.FirstNameAttr) {
toSerialize["first_name_attr"] = o.FirstNameAttr
}
if !IsNil(o.LastNameAttr) {
toSerialize["last_name_attr"] = o.LastNameAttr
}
return toSerialize, nil
}
type NullableSAMLConfigParams struct {
value *SAMLConfigParams
isSet bool
}
func (v NullableSAMLConfigParams) Get() *SAMLConfigParams {
return v.value
}
func (v *NullableSAMLConfigParams) Set(val *SAMLConfigParams) {
v.value = val
v.isSet = true
}
func (v NullableSAMLConfigParams) IsSet() bool {
return v.isSet
}
func (v *NullableSAMLConfigParams) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSAMLConfigParams(val *SAMLConfigParams) *NullableSAMLConfigParams {
return &NullableSAMLConfigParams{value: val, isSet: true}
}
func (v NullableSAMLConfigParams) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSAMLConfigParams) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}