-
Notifications
You must be signed in to change notification settings - Fork 5
/
model_organization_invitation.go
435 lines (365 loc) · 12.4 KB
/
model_organization_invitation.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
// Code based on the AtlasAPI V2 OpenAPI file
package admin
import (
"encoding/json"
"time"
)
// OrganizationInvitation struct for OrganizationInvitation
type OrganizationInvitation struct {
// Date and time when MongoDB Cloud sent the invitation. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
// Read only field.
CreatedAt *time.Time `json:"createdAt,omitempty"`
// Date and time when the invitation from MongoDB Cloud expires. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
// Read only field.
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
// List of projects that the user will be added to when they accept their invitation to the organization.
GroupRoleAssignments *[]GroupRole `json:"groupRoleAssignments,omitempty"`
// Unique 24-hexadecimal digit string that identifies this invitation.
// Read only field.
Id *string `json:"id,omitempty"`
// Email address of the MongoDB Cloud user who sent the invitation to join the organization.
// Read only field.
InviterUsername *string `json:"inviterUsername,omitempty"`
// List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. RFC 5988 outlines these relationships.
// Read only field.
Links *[]Link `json:"links,omitempty"`
// Unique 24-hexadecimal digit string that identifies the organization.
// Read only field.
OrgId *string `json:"orgId,omitempty"`
// Human-readable label that identifies this organization.
OrgName string `json:"orgName"`
// One or more organization level roles to assign to the MongoDB Cloud user.
Roles *[]string `json:"roles,omitempty"`
// List of unique 24-hexadecimal digit strings that identifies each team.
// Read only field.
TeamIds *[]string `json:"teamIds,omitempty"`
// Email address of the MongoDB Cloud user invited to join the organization.
Username *string `json:"username,omitempty"`
}
// NewOrganizationInvitation instantiates a new OrganizationInvitation 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 NewOrganizationInvitation(orgName string) *OrganizationInvitation {
this := OrganizationInvitation{}
this.OrgName = orgName
return &this
}
// NewOrganizationInvitationWithDefaults instantiates a new OrganizationInvitation 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 NewOrganizationInvitationWithDefaults() *OrganizationInvitation {
this := OrganizationInvitation{}
return &this
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise
func (o *OrganizationInvitation) GetCreatedAt() time.Time {
if o == nil || IsNil(o.CreatedAt) {
var ret time.Time
return ret
}
return *o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrganizationInvitation) GetCreatedAtOk() (*time.Time, bool) {
if o == nil || IsNil(o.CreatedAt) {
return nil, false
}
return o.CreatedAt, true
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *OrganizationInvitation) HasCreatedAt() bool {
if o != nil && !IsNil(o.CreatedAt) {
return true
}
return false
}
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
func (o *OrganizationInvitation) SetCreatedAt(v time.Time) {
o.CreatedAt = &v
}
// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise
func (o *OrganizationInvitation) GetExpiresAt() time.Time {
if o == nil || IsNil(o.ExpiresAt) {
var ret time.Time
return ret
}
return *o.ExpiresAt
}
// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrganizationInvitation) GetExpiresAtOk() (*time.Time, bool) {
if o == nil || IsNil(o.ExpiresAt) {
return nil, false
}
return o.ExpiresAt, true
}
// HasExpiresAt returns a boolean if a field has been set.
func (o *OrganizationInvitation) HasExpiresAt() bool {
if o != nil && !IsNil(o.ExpiresAt) {
return true
}
return false
}
// SetExpiresAt gets a reference to the given time.Time and assigns it to the ExpiresAt field.
func (o *OrganizationInvitation) SetExpiresAt(v time.Time) {
o.ExpiresAt = &v
}
// GetGroupRoleAssignments returns the GroupRoleAssignments field value if set, zero value otherwise
func (o *OrganizationInvitation) GetGroupRoleAssignments() []GroupRole {
if o == nil || IsNil(o.GroupRoleAssignments) {
var ret []GroupRole
return ret
}
return *o.GroupRoleAssignments
}
// GetGroupRoleAssignmentsOk returns a tuple with the GroupRoleAssignments field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrganizationInvitation) GetGroupRoleAssignmentsOk() (*[]GroupRole, bool) {
if o == nil || IsNil(o.GroupRoleAssignments) {
return nil, false
}
return o.GroupRoleAssignments, true
}
// HasGroupRoleAssignments returns a boolean if a field has been set.
func (o *OrganizationInvitation) HasGroupRoleAssignments() bool {
if o != nil && !IsNil(o.GroupRoleAssignments) {
return true
}
return false
}
// SetGroupRoleAssignments gets a reference to the given []GroupRole and assigns it to the GroupRoleAssignments field.
func (o *OrganizationInvitation) SetGroupRoleAssignments(v []GroupRole) {
o.GroupRoleAssignments = &v
}
// GetId returns the Id field value if set, zero value otherwise
func (o *OrganizationInvitation) GetId() string {
if o == nil || IsNil(o.Id) {
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 *OrganizationInvitation) GetIdOk() (*string, 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 *OrganizationInvitation) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *OrganizationInvitation) SetId(v string) {
o.Id = &v
}
// GetInviterUsername returns the InviterUsername field value if set, zero value otherwise
func (o *OrganizationInvitation) GetInviterUsername() string {
if o == nil || IsNil(o.InviterUsername) {
var ret string
return ret
}
return *o.InviterUsername
}
// GetInviterUsernameOk returns a tuple with the InviterUsername field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrganizationInvitation) GetInviterUsernameOk() (*string, bool) {
if o == nil || IsNil(o.InviterUsername) {
return nil, false
}
return o.InviterUsername, true
}
// HasInviterUsername returns a boolean if a field has been set.
func (o *OrganizationInvitation) HasInviterUsername() bool {
if o != nil && !IsNil(o.InviterUsername) {
return true
}
return false
}
// SetInviterUsername gets a reference to the given string and assigns it to the InviterUsername field.
func (o *OrganizationInvitation) SetInviterUsername(v string) {
o.InviterUsername = &v
}
// GetLinks returns the Links field value if set, zero value otherwise
func (o *OrganizationInvitation) GetLinks() []Link {
if o == nil || IsNil(o.Links) {
var ret []Link
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 *OrganizationInvitation) GetLinksOk() (*[]Link, bool) {
if o == nil || IsNil(o.Links) {
return nil, false
}
return o.Links, true
}
// HasLinks returns a boolean if a field has been set.
func (o *OrganizationInvitation) HasLinks() bool {
if o != nil && !IsNil(o.Links) {
return true
}
return false
}
// SetLinks gets a reference to the given []Link and assigns it to the Links field.
func (o *OrganizationInvitation) SetLinks(v []Link) {
o.Links = &v
}
// GetOrgId returns the OrgId field value if set, zero value otherwise
func (o *OrganizationInvitation) GetOrgId() string {
if o == nil || IsNil(o.OrgId) {
var ret string
return ret
}
return *o.OrgId
}
// GetOrgIdOk returns a tuple with the OrgId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrganizationInvitation) GetOrgIdOk() (*string, bool) {
if o == nil || IsNil(o.OrgId) {
return nil, false
}
return o.OrgId, true
}
// HasOrgId returns a boolean if a field has been set.
func (o *OrganizationInvitation) HasOrgId() bool {
if o != nil && !IsNil(o.OrgId) {
return true
}
return false
}
// SetOrgId gets a reference to the given string and assigns it to the OrgId field.
func (o *OrganizationInvitation) SetOrgId(v string) {
o.OrgId = &v
}
// GetOrgName returns the OrgName field value
func (o *OrganizationInvitation) GetOrgName() string {
if o == nil {
var ret string
return ret
}
return o.OrgName
}
// GetOrgNameOk returns a tuple with the OrgName field value
// and a boolean to check if the value has been set.
func (o *OrganizationInvitation) GetOrgNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.OrgName, true
}
// SetOrgName sets field value
func (o *OrganizationInvitation) SetOrgName(v string) {
o.OrgName = v
}
// GetRoles returns the Roles field value if set, zero value otherwise
func (o *OrganizationInvitation) GetRoles() []string {
if o == nil || IsNil(o.Roles) {
var ret []string
return ret
}
return *o.Roles
}
// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrganizationInvitation) GetRolesOk() (*[]string, bool) {
if o == nil || IsNil(o.Roles) {
return nil, false
}
return o.Roles, true
}
// HasRoles returns a boolean if a field has been set.
func (o *OrganizationInvitation) HasRoles() bool {
if o != nil && !IsNil(o.Roles) {
return true
}
return false
}
// SetRoles gets a reference to the given []string and assigns it to the Roles field.
func (o *OrganizationInvitation) SetRoles(v []string) {
o.Roles = &v
}
// GetTeamIds returns the TeamIds field value if set, zero value otherwise
func (o *OrganizationInvitation) GetTeamIds() []string {
if o == nil || IsNil(o.TeamIds) {
var ret []string
return ret
}
return *o.TeamIds
}
// GetTeamIdsOk returns a tuple with the TeamIds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrganizationInvitation) GetTeamIdsOk() (*[]string, bool) {
if o == nil || IsNil(o.TeamIds) {
return nil, false
}
return o.TeamIds, true
}
// HasTeamIds returns a boolean if a field has been set.
func (o *OrganizationInvitation) HasTeamIds() bool {
if o != nil && !IsNil(o.TeamIds) {
return true
}
return false
}
// SetTeamIds gets a reference to the given []string and assigns it to the TeamIds field.
func (o *OrganizationInvitation) SetTeamIds(v []string) {
o.TeamIds = &v
}
// GetUsername returns the Username field value if set, zero value otherwise
func (o *OrganizationInvitation) 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 *OrganizationInvitation) 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 *OrganizationInvitation) 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 *OrganizationInvitation) SetUsername(v string) {
o.Username = &v
}
func (o OrganizationInvitation) MarshalJSONWithoutReadOnly() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o OrganizationInvitation) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.GroupRoleAssignments) {
toSerialize["groupRoleAssignments"] = o.GroupRoleAssignments
}
toSerialize["orgName"] = o.OrgName
if !IsNil(o.Roles) {
toSerialize["roles"] = o.Roles
}
if !IsNil(o.Username) {
toSerialize["username"] = o.Username
}
return toSerialize, nil
}