generated from delphix/.github
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmodel_account.go
534 lines (453 loc) · 14.4 KB
/
model_account.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
529
530
531
532
/*
Delphix DCT API
Delphix DCT API
API version: 3.9.0
Contact: support@delphix.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package delphix_dct_api
import (
"encoding/json"
"time"
)
// checks if the Account type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Account{}
// Account struct for Account
type Account struct {
// Numeric ID of the Account.
Id *int64 `json:"id,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. 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"`
// 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"`
// last time this account made a (successful or failed) API call. Note that updates to this property are asynchronous and make take some time to be reflected.
LastAccessTime *time.Time `json:"last_access_time,omitempty"`
// Creation time of this Account. This value is null for accounts created prior to version 9.0.0 of the product.
CreationTime *time.Time `json:"creation_time,omitempty"`
// Access group scopes associated with this account.
EffectiveScopes []EffectiveScope `json:"effective_scopes,omitempty"`
// The tags to be created for this Account.
Tags []Tag `json:"tags,omitempty"`
// Whether this account can be used to make API calls.
Enabled *bool `json:"enabled,omitempty"`
}
// NewAccount instantiates a new Account 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 NewAccount() *Account {
this := Account{}
return &this
}
// NewAccountWithDefaults instantiates a new Account 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 NewAccountWithDefaults() *Account {
this := Account{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *Account) GetId() int64 {
if o == nil || IsNil(o.Id) {
var ret int64
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 *Account) GetIdOk() (*int64, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *Account) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given int64 and assigns it to the Id field.
func (o *Account) SetId(v int64) {
o.Id = &v
}
// GetApiClientId returns the ApiClientId field value if set, zero value otherwise.
func (o *Account) 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 *Account) 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 *Account) 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 *Account) SetApiClientId(v string) {
o.ApiClientId = &v
}
// GetFirstName returns the FirstName field value if set, zero value otherwise.
func (o *Account) 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 *Account) 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 *Account) 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 *Account) SetFirstName(v string) {
o.FirstName = &v
}
// GetLastName returns the LastName field value if set, zero value otherwise.
func (o *Account) 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 *Account) 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 *Account) 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 *Account) SetLastName(v string) {
o.LastName = &v
}
// GetEmail returns the Email field value if set, zero value otherwise.
func (o *Account) 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 *Account) 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 *Account) 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 *Account) SetEmail(v string) {
o.Email = &v
}
// GetUsername returns the Username field value if set, zero value otherwise.
func (o *Account) 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 *Account) 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 *Account) 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 *Account) SetUsername(v string) {
o.Username = &v
}
// GetLdapPrincipal returns the LdapPrincipal field value if set, zero value otherwise.
func (o *Account) 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 *Account) 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 *Account) 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 *Account) SetLdapPrincipal(v string) {
o.LdapPrincipal = &v
}
// GetLastAccessTime returns the LastAccessTime field value if set, zero value otherwise.
func (o *Account) GetLastAccessTime() time.Time {
if o == nil || IsNil(o.LastAccessTime) {
var ret time.Time
return ret
}
return *o.LastAccessTime
}
// GetLastAccessTimeOk returns a tuple with the LastAccessTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Account) GetLastAccessTimeOk() (*time.Time, bool) {
if o == nil || IsNil(o.LastAccessTime) {
return nil, false
}
return o.LastAccessTime, true
}
// HasLastAccessTime returns a boolean if a field has been set.
func (o *Account) HasLastAccessTime() bool {
if o != nil && !IsNil(o.LastAccessTime) {
return true
}
return false
}
// SetLastAccessTime gets a reference to the given time.Time and assigns it to the LastAccessTime field.
func (o *Account) SetLastAccessTime(v time.Time) {
o.LastAccessTime = &v
}
// GetCreationTime returns the CreationTime field value if set, zero value otherwise.
func (o *Account) GetCreationTime() time.Time {
if o == nil || IsNil(o.CreationTime) {
var ret time.Time
return ret
}
return *o.CreationTime
}
// GetCreationTimeOk returns a tuple with the CreationTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Account) GetCreationTimeOk() (*time.Time, bool) {
if o == nil || IsNil(o.CreationTime) {
return nil, false
}
return o.CreationTime, true
}
// HasCreationTime returns a boolean if a field has been set.
func (o *Account) HasCreationTime() bool {
if o != nil && !IsNil(o.CreationTime) {
return true
}
return false
}
// SetCreationTime gets a reference to the given time.Time and assigns it to the CreationTime field.
func (o *Account) SetCreationTime(v time.Time) {
o.CreationTime = &v
}
// GetEffectiveScopes returns the EffectiveScopes field value if set, zero value otherwise.
func (o *Account) GetEffectiveScopes() []EffectiveScope {
if o == nil || IsNil(o.EffectiveScopes) {
var ret []EffectiveScope
return ret
}
return o.EffectiveScopes
}
// GetEffectiveScopesOk returns a tuple with the EffectiveScopes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Account) GetEffectiveScopesOk() ([]EffectiveScope, bool) {
if o == nil || IsNil(o.EffectiveScopes) {
return nil, false
}
return o.EffectiveScopes, true
}
// HasEffectiveScopes returns a boolean if a field has been set.
func (o *Account) HasEffectiveScopes() bool {
if o != nil && !IsNil(o.EffectiveScopes) {
return true
}
return false
}
// SetEffectiveScopes gets a reference to the given []EffectiveScope and assigns it to the EffectiveScopes field.
func (o *Account) SetEffectiveScopes(v []EffectiveScope) {
o.EffectiveScopes = v
}
// GetTags returns the Tags field value if set, zero value otherwise.
func (o *Account) 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 *Account) 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 *Account) 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 *Account) SetTags(v []Tag) {
o.Tags = v
}
// GetEnabled returns the Enabled field value if set, zero value otherwise.
func (o *Account) 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 *Account) 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 *Account) 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 *Account) SetEnabled(v bool) {
o.Enabled = &v
}
func (o Account) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Account) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
// skip: id is readOnly
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.LdapPrincipal) {
toSerialize["ldap_principal"] = o.LdapPrincipal
}
if !IsNil(o.LastAccessTime) {
toSerialize["last_access_time"] = o.LastAccessTime
}
if !IsNil(o.CreationTime) {
toSerialize["creation_time"] = o.CreationTime
}
if !IsNil(o.EffectiveScopes) {
toSerialize["effective_scopes"] = o.EffectiveScopes
}
if !IsNil(o.Tags) {
toSerialize["tags"] = o.Tags
}
if !IsNil(o.Enabled) {
toSerialize["enabled"] = o.Enabled
}
return toSerialize, nil
}
type NullableAccount struct {
value *Account
isSet bool
}
func (v NullableAccount) Get() *Account {
return v.value
}
func (v *NullableAccount) Set(val *Account) {
v.value = val
v.isSet = true
}
func (v NullableAccount) IsSet() bool {
return v.isSet
}
func (v *NullableAccount) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAccount(val *Account) *NullableAccount {
return &NullableAccount{value: val, isSet: true}
}
func (v NullableAccount) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAccount) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}