generated from delphix/.github
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmodel_account_create_parameter.go
469 lines (398 loc) · 13.6 KB
/
model_account_create_parameter.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
/*
Delphix DCT API
Delphix DCT API
API version: 3.9.0
Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package delphix_dct_api
import (
"encoding/json"
)
// checks if the AccountCreateParameter type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AccountCreateParameter{}
// AccountCreateParameter struct for AccountCreateParameter
type AccountCreateParameter struct {
// Whether the created account must be granted to admin role.
IsAdmin *bool `json:"is_admin,omitempty"`
// Whether an API key must be generated for this Account. This must be set if the Account will be used for API key based authentication, and unset otherwise.
GenerateApiKey *bool `json:"generate_api_key,omitempty"`
// The unique ID which is used to identify the identity of an API request. The web server (nginx) configuration must be configured so as to include the external ID as the value of the X_CLIENT_ID HTTP request header when requests are proxied. If this value isn't set, the application will automatically generate one. For OAuth2/JWT based authentication, this typically corresponds to a value extracted from the JWT, uniquely identifying the Account.
ApiClientId *string `json:"api_client_id,omitempty"`
// An optional first name for the Account.
FirstName *string `json:"first_name,omitempty"`
// An optional last name for the Account.
LastName *string `json:"last_name,omitempty"`
// An optional email for the Account.
Email *string `json:"email,omitempty"`
// The username for username/password authentication. This can also be used to provide an optional logical name for the Account.
Username *string `json:"username,omitempty"`
// The password for username/password authentication.
Password *string `json:"password,omitempty"`
// This value will be used for linking this account to an LDAP user when authenticated with the same LDAP principal. When accounts authenticate with LDAP, an LDAP principal value is calculated based on the username, msad_domain_name, search_base and username_pattern.
LdapPrincipal *string `json:"ldap_principal,omitempty"`
// The tags to be created for this Account.
Tags []Tag `json:"tags,omitempty"`
}
// NewAccountCreateParameter instantiates a new AccountCreateParameter 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 NewAccountCreateParameter() *AccountCreateParameter {
this := AccountCreateParameter{}
var isAdmin bool = false
this.IsAdmin = &isAdmin
var generateApiKey bool = false
this.GenerateApiKey = &generateApiKey
return &this
}
// NewAccountCreateParameterWithDefaults instantiates a new AccountCreateParameter 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 NewAccountCreateParameterWithDefaults() *AccountCreateParameter {
this := AccountCreateParameter{}
var isAdmin bool = false
this.IsAdmin = &isAdmin
var generateApiKey bool = false
this.GenerateApiKey = &generateApiKey
return &this
}
// GetIsAdmin returns the IsAdmin field value if set, zero value otherwise.
func (o *AccountCreateParameter) GetIsAdmin() bool {
if o == nil || IsNil(o.IsAdmin) {
var ret bool
return ret
}
return *o.IsAdmin
}
// GetIsAdminOk returns a tuple with the IsAdmin field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccountCreateParameter) GetIsAdminOk() (*bool, bool) {
if o == nil || IsNil(o.IsAdmin) {
return nil, false
}
return o.IsAdmin, true
}
// HasIsAdmin returns a boolean if a field has been set.
func (o *AccountCreateParameter) HasIsAdmin() bool {
if o != nil && !IsNil(o.IsAdmin) {
return true
}
return false
}
// SetIsAdmin gets a reference to the given bool and assigns it to the IsAdmin field.
func (o *AccountCreateParameter) SetIsAdmin(v bool) {
o.IsAdmin = &v
}
// GetGenerateApiKey returns the GenerateApiKey field value if set, zero value otherwise.
func (o *AccountCreateParameter) GetGenerateApiKey() bool {
if o == nil || IsNil(o.GenerateApiKey) {
var ret bool
return ret
}
return *o.GenerateApiKey
}
// GetGenerateApiKeyOk returns a tuple with the GenerateApiKey field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccountCreateParameter) GetGenerateApiKeyOk() (*bool, bool) {
if o == nil || IsNil(o.GenerateApiKey) {
return nil, false
}
return o.GenerateApiKey, true
}
// HasGenerateApiKey returns a boolean if a field has been set.
func (o *AccountCreateParameter) HasGenerateApiKey() bool {
if o != nil && !IsNil(o.GenerateApiKey) {
return true
}
return false
}
// SetGenerateApiKey gets a reference to the given bool and assigns it to the GenerateApiKey field.
func (o *AccountCreateParameter) SetGenerateApiKey(v bool) {
o.GenerateApiKey = &v
}
// GetApiClientId returns the ApiClientId field value if set, zero value otherwise.
func (o *AccountCreateParameter) GetApiClientId() string {
if o == nil || IsNil(o.ApiClientId) {
var ret string
return ret
}
return *o.ApiClientId
}
// GetApiClientIdOk returns a tuple with the ApiClientId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccountCreateParameter) GetApiClientIdOk() (*string, bool) {
if o == nil || IsNil(o.ApiClientId) {
return nil, false
}
return o.ApiClientId, true
}
// HasApiClientId returns a boolean if a field has been set.
func (o *AccountCreateParameter) HasApiClientId() bool {
if o != nil && !IsNil(o.ApiClientId) {
return true
}
return false
}
// SetApiClientId gets a reference to the given string and assigns it to the ApiClientId field.
func (o *AccountCreateParameter) SetApiClientId(v string) {
o.ApiClientId = &v
}
// GetFirstName returns the FirstName field value if set, zero value otherwise.
func (o *AccountCreateParameter) GetFirstName() string {
if o == nil || IsNil(o.FirstName) {
var ret string
return ret
}
return *o.FirstName
}
// GetFirstNameOk returns a tuple with the FirstName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccountCreateParameter) GetFirstNameOk() (*string, bool) {
if o == nil || IsNil(o.FirstName) {
return nil, false
}
return o.FirstName, true
}
// HasFirstName returns a boolean if a field has been set.
func (o *AccountCreateParameter) HasFirstName() bool {
if o != nil && !IsNil(o.FirstName) {
return true
}
return false
}
// SetFirstName gets a reference to the given string and assigns it to the FirstName field.
func (o *AccountCreateParameter) SetFirstName(v string) {
o.FirstName = &v
}
// GetLastName returns the LastName field value if set, zero value otherwise.
func (o *AccountCreateParameter) GetLastName() string {
if o == nil || IsNil(o.LastName) {
var ret string
return ret
}
return *o.LastName
}
// GetLastNameOk returns a tuple with the LastName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccountCreateParameter) GetLastNameOk() (*string, bool) {
if o == nil || IsNil(o.LastName) {
return nil, false
}
return o.LastName, true
}
// HasLastName returns a boolean if a field has been set.
func (o *AccountCreateParameter) HasLastName() bool {
if o != nil && !IsNil(o.LastName) {
return true
}
return false
}
// SetLastName gets a reference to the given string and assigns it to the LastName field.
func (o *AccountCreateParameter) SetLastName(v string) {
o.LastName = &v
}
// GetEmail returns the Email field value if set, zero value otherwise.
func (o *AccountCreateParameter) GetEmail() string {
if o == nil || IsNil(o.Email) {
var ret string
return ret
}
return *o.Email
}
// GetEmailOk returns a tuple with the Email field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccountCreateParameter) GetEmailOk() (*string, bool) {
if o == nil || IsNil(o.Email) {
return nil, false
}
return o.Email, true
}
// HasEmail returns a boolean if a field has been set.
func (o *AccountCreateParameter) HasEmail() bool {
if o != nil && !IsNil(o.Email) {
return true
}
return false
}
// SetEmail gets a reference to the given string and assigns it to the Email field.
func (o *AccountCreateParameter) SetEmail(v string) {
o.Email = &v
}
// GetUsername returns the Username field value if set, zero value otherwise.
func (o *AccountCreateParameter) GetUsername() string {
if o == nil || IsNil(o.Username) {
var ret string
return ret
}
return *o.Username
}
// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccountCreateParameter) GetUsernameOk() (*string, bool) {
if o == nil || IsNil(o.Username) {
return nil, false
}
return o.Username, true
}
// HasUsername returns a boolean if a field has been set.
func (o *AccountCreateParameter) HasUsername() bool {
if o != nil && !IsNil(o.Username) {
return true
}
return false
}
// SetUsername gets a reference to the given string and assigns it to the Username field.
func (o *AccountCreateParameter) SetUsername(v string) {
o.Username = &v
}
// GetPassword returns the Password field value if set, zero value otherwise.
func (o *AccountCreateParameter) GetPassword() string {
if o == nil || IsNil(o.Password) {
var ret string
return ret
}
return *o.Password
}
// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccountCreateParameter) GetPasswordOk() (*string, bool) {
if o == nil || IsNil(o.Password) {
return nil, false
}
return o.Password, true
}
// HasPassword returns a boolean if a field has been set.
func (o *AccountCreateParameter) HasPassword() bool {
if o != nil && !IsNil(o.Password) {
return true
}
return false
}
// SetPassword gets a reference to the given string and assigns it to the Password field.
func (o *AccountCreateParameter) SetPassword(v string) {
o.Password = &v
}
// GetLdapPrincipal returns the LdapPrincipal field value if set, zero value otherwise.
func (o *AccountCreateParameter) GetLdapPrincipal() string {
if o == nil || IsNil(o.LdapPrincipal) {
var ret string
return ret
}
return *o.LdapPrincipal
}
// GetLdapPrincipalOk returns a tuple with the LdapPrincipal field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccountCreateParameter) GetLdapPrincipalOk() (*string, bool) {
if o == nil || IsNil(o.LdapPrincipal) {
return nil, false
}
return o.LdapPrincipal, true
}
// HasLdapPrincipal returns a boolean if a field has been set.
func (o *AccountCreateParameter) HasLdapPrincipal() bool {
if o != nil && !IsNil(o.LdapPrincipal) {
return true
}
return false
}
// SetLdapPrincipal gets a reference to the given string and assigns it to the LdapPrincipal field.
func (o *AccountCreateParameter) SetLdapPrincipal(v string) {
o.LdapPrincipal = &v
}
// GetTags returns the Tags field value if set, zero value otherwise.
func (o *AccountCreateParameter) GetTags() []Tag {
if o == nil || IsNil(o.Tags) {
var ret []Tag
return ret
}
return o.Tags
}
// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccountCreateParameter) GetTagsOk() ([]Tag, bool) {
if o == nil || IsNil(o.Tags) {
return nil, false
}
return o.Tags, true
}
// HasTags returns a boolean if a field has been set.
func (o *AccountCreateParameter) HasTags() bool {
if o != nil && !IsNil(o.Tags) {
return true
}
return false
}
// SetTags gets a reference to the given []Tag and assigns it to the Tags field.
func (o *AccountCreateParameter) SetTags(v []Tag) {
o.Tags = v
}
func (o AccountCreateParameter) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AccountCreateParameter) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.IsAdmin) {
toSerialize["is_admin"] = o.IsAdmin
}
if !IsNil(o.GenerateApiKey) {
toSerialize["generate_api_key"] = o.GenerateApiKey
}
if !IsNil(o.ApiClientId) {
toSerialize["api_client_id"] = o.ApiClientId
}
if !IsNil(o.FirstName) {
toSerialize["first_name"] = o.FirstName
}
if !IsNil(o.LastName) {
toSerialize["last_name"] = o.LastName
}
if !IsNil(o.Email) {
toSerialize["email"] = o.Email
}
if !IsNil(o.Username) {
toSerialize["username"] = o.Username
}
if !IsNil(o.Password) {
toSerialize["password"] = o.Password
}
if !IsNil(o.LdapPrincipal) {
toSerialize["ldap_principal"] = o.LdapPrincipal
}
if !IsNil(o.Tags) {
toSerialize["tags"] = o.Tags
}
return toSerialize, nil
}
type NullableAccountCreateParameter struct {
value *AccountCreateParameter
isSet bool
}
func (v NullableAccountCreateParameter) Get() *AccountCreateParameter {
return v.value
}
func (v *NullableAccountCreateParameter) Set(val *AccountCreateParameter) {
v.value = val
v.isSet = true
}
func (v NullableAccountCreateParameter) IsSet() bool {
return v.isSet
}
func (v *NullableAccountCreateParameter) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAccountCreateParameter(val *AccountCreateParameter) *NullableAccountCreateParameter {
return &NullableAccountCreateParameter{value: val, isSet: true}
}
func (v NullableAccountCreateParameter) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAccountCreateParameter) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}