-
Notifications
You must be signed in to change notification settings - Fork 5
/
model_connected_org_config.go
324 lines (274 loc) · 10.9 KB
/
model_connected_org_config.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
// Code based on the AtlasAPI V2 OpenAPI file
package admin
import (
"encoding/json"
)
// ConnectedOrgConfig struct for ConnectedOrgConfig
type ConnectedOrgConfig struct {
// The collection of unique ids representing the identity providers that can be used for data access in this organization.
DataAccessIdentityProviderIds *[]string `json:"dataAccessIdentityProviderIds,omitempty"`
// Approved domains that restrict users who can join the organization based on their email address.
DomainAllowList *[]string `json:"domainAllowList,omitempty"`
// Value that indicates whether domain restriction is enabled for this connected org.
DomainRestrictionEnabled bool `json:"domainRestrictionEnabled"`
// Legacy 20-hexadecimal digit string that identifies the UI access identity provider that this connected org config is associated with. This id can be found within the Federation Management Console > Identity Providers tab by clicking the info icon in the IdP ID row of a configured identity provider.
IdentityProviderId *string `json:"identityProviderId,omitempty"`
// Unique 24-hexadecimal digit string that identifies the connected organization configuration.
// Read only field.
OrgId string `json:"orgId"`
// Atlas roles that are granted to a user in this organization after authenticating. Roles are a human-readable label that identifies the collection of privileges that MongoDB Cloud grants a specific MongoDB Cloud user. These roles can only be organization specific roles.
PostAuthRoleGrants *[]string `json:"postAuthRoleGrants,omitempty"`
// Role mappings that are configured in this organization.
RoleMappings *[]AuthFederationRoleMapping `json:"roleMappings,omitempty"`
// List that contains the users who have an email address that doesn't match any domain on the allowed list.
UserConflicts *[]FederatedUser `json:"userConflicts,omitempty"`
}
// NewConnectedOrgConfig instantiates a new ConnectedOrgConfig 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 NewConnectedOrgConfig(domainRestrictionEnabled bool, orgId string) *ConnectedOrgConfig {
this := ConnectedOrgConfig{}
this.DomainRestrictionEnabled = domainRestrictionEnabled
this.OrgId = orgId
return &this
}
// NewConnectedOrgConfigWithDefaults instantiates a new ConnectedOrgConfig 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 NewConnectedOrgConfigWithDefaults() *ConnectedOrgConfig {
this := ConnectedOrgConfig{}
return &this
}
// GetDataAccessIdentityProviderIds returns the DataAccessIdentityProviderIds field value if set, zero value otherwise
func (o *ConnectedOrgConfig) GetDataAccessIdentityProviderIds() []string {
if o == nil || IsNil(o.DataAccessIdentityProviderIds) {
var ret []string
return ret
}
return *o.DataAccessIdentityProviderIds
}
// GetDataAccessIdentityProviderIdsOk returns a tuple with the DataAccessIdentityProviderIds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ConnectedOrgConfig) GetDataAccessIdentityProviderIdsOk() (*[]string, bool) {
if o == nil || IsNil(o.DataAccessIdentityProviderIds) {
return nil, false
}
return o.DataAccessIdentityProviderIds, true
}
// HasDataAccessIdentityProviderIds returns a boolean if a field has been set.
func (o *ConnectedOrgConfig) HasDataAccessIdentityProviderIds() bool {
if o != nil && !IsNil(o.DataAccessIdentityProviderIds) {
return true
}
return false
}
// SetDataAccessIdentityProviderIds gets a reference to the given []string and assigns it to the DataAccessIdentityProviderIds field.
func (o *ConnectedOrgConfig) SetDataAccessIdentityProviderIds(v []string) {
o.DataAccessIdentityProviderIds = &v
}
// GetDomainAllowList returns the DomainAllowList field value if set, zero value otherwise
func (o *ConnectedOrgConfig) GetDomainAllowList() []string {
if o == nil || IsNil(o.DomainAllowList) {
var ret []string
return ret
}
return *o.DomainAllowList
}
// GetDomainAllowListOk returns a tuple with the DomainAllowList field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ConnectedOrgConfig) GetDomainAllowListOk() (*[]string, bool) {
if o == nil || IsNil(o.DomainAllowList) {
return nil, false
}
return o.DomainAllowList, true
}
// HasDomainAllowList returns a boolean if a field has been set.
func (o *ConnectedOrgConfig) HasDomainAllowList() bool {
if o != nil && !IsNil(o.DomainAllowList) {
return true
}
return false
}
// SetDomainAllowList gets a reference to the given []string and assigns it to the DomainAllowList field.
func (o *ConnectedOrgConfig) SetDomainAllowList(v []string) {
o.DomainAllowList = &v
}
// GetDomainRestrictionEnabled returns the DomainRestrictionEnabled field value
func (o *ConnectedOrgConfig) GetDomainRestrictionEnabled() bool {
if o == nil {
var ret bool
return ret
}
return o.DomainRestrictionEnabled
}
// GetDomainRestrictionEnabledOk returns a tuple with the DomainRestrictionEnabled field value
// and a boolean to check if the value has been set.
func (o *ConnectedOrgConfig) GetDomainRestrictionEnabledOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.DomainRestrictionEnabled, true
}
// SetDomainRestrictionEnabled sets field value
func (o *ConnectedOrgConfig) SetDomainRestrictionEnabled(v bool) {
o.DomainRestrictionEnabled = v
}
// GetIdentityProviderId returns the IdentityProviderId field value if set, zero value otherwise
func (o *ConnectedOrgConfig) GetIdentityProviderId() string {
if o == nil || IsNil(o.IdentityProviderId) {
var ret string
return ret
}
return *o.IdentityProviderId
}
// GetIdentityProviderIdOk returns a tuple with the IdentityProviderId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ConnectedOrgConfig) GetIdentityProviderIdOk() (*string, bool) {
if o == nil || IsNil(o.IdentityProviderId) {
return nil, false
}
return o.IdentityProviderId, true
}
// HasIdentityProviderId returns a boolean if a field has been set.
func (o *ConnectedOrgConfig) HasIdentityProviderId() bool {
if o != nil && !IsNil(o.IdentityProviderId) {
return true
}
return false
}
// SetIdentityProviderId gets a reference to the given string and assigns it to the IdentityProviderId field.
func (o *ConnectedOrgConfig) SetIdentityProviderId(v string) {
o.IdentityProviderId = &v
}
// GetOrgId returns the OrgId field value
func (o *ConnectedOrgConfig) GetOrgId() string {
if o == nil {
var ret string
return ret
}
return o.OrgId
}
// GetOrgIdOk returns a tuple with the OrgId field value
// and a boolean to check if the value has been set.
func (o *ConnectedOrgConfig) GetOrgIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.OrgId, true
}
// SetOrgId sets field value
func (o *ConnectedOrgConfig) SetOrgId(v string) {
o.OrgId = v
}
// GetPostAuthRoleGrants returns the PostAuthRoleGrants field value if set, zero value otherwise
func (o *ConnectedOrgConfig) GetPostAuthRoleGrants() []string {
if o == nil || IsNil(o.PostAuthRoleGrants) {
var ret []string
return ret
}
return *o.PostAuthRoleGrants
}
// GetPostAuthRoleGrantsOk returns a tuple with the PostAuthRoleGrants field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ConnectedOrgConfig) GetPostAuthRoleGrantsOk() (*[]string, bool) {
if o == nil || IsNil(o.PostAuthRoleGrants) {
return nil, false
}
return o.PostAuthRoleGrants, true
}
// HasPostAuthRoleGrants returns a boolean if a field has been set.
func (o *ConnectedOrgConfig) HasPostAuthRoleGrants() bool {
if o != nil && !IsNil(o.PostAuthRoleGrants) {
return true
}
return false
}
// SetPostAuthRoleGrants gets a reference to the given []string and assigns it to the PostAuthRoleGrants field.
func (o *ConnectedOrgConfig) SetPostAuthRoleGrants(v []string) {
o.PostAuthRoleGrants = &v
}
// GetRoleMappings returns the RoleMappings field value if set, zero value otherwise
func (o *ConnectedOrgConfig) GetRoleMappings() []AuthFederationRoleMapping {
if o == nil || IsNil(o.RoleMappings) {
var ret []AuthFederationRoleMapping
return ret
}
return *o.RoleMappings
}
// GetRoleMappingsOk returns a tuple with the RoleMappings field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ConnectedOrgConfig) GetRoleMappingsOk() (*[]AuthFederationRoleMapping, bool) {
if o == nil || IsNil(o.RoleMappings) {
return nil, false
}
return o.RoleMappings, true
}
// HasRoleMappings returns a boolean if a field has been set.
func (o *ConnectedOrgConfig) HasRoleMappings() bool {
if o != nil && !IsNil(o.RoleMappings) {
return true
}
return false
}
// SetRoleMappings gets a reference to the given []AuthFederationRoleMapping and assigns it to the RoleMappings field.
func (o *ConnectedOrgConfig) SetRoleMappings(v []AuthFederationRoleMapping) {
o.RoleMappings = &v
}
// GetUserConflicts returns the UserConflicts field value if set, zero value otherwise
func (o *ConnectedOrgConfig) GetUserConflicts() []FederatedUser {
if o == nil || IsNil(o.UserConflicts) {
var ret []FederatedUser
return ret
}
return *o.UserConflicts
}
// GetUserConflictsOk returns a tuple with the UserConflicts field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ConnectedOrgConfig) GetUserConflictsOk() (*[]FederatedUser, bool) {
if o == nil || IsNil(o.UserConflicts) {
return nil, false
}
return o.UserConflicts, true
}
// HasUserConflicts returns a boolean if a field has been set.
func (o *ConnectedOrgConfig) HasUserConflicts() bool {
if o != nil && !IsNil(o.UserConflicts) {
return true
}
return false
}
// SetUserConflicts gets a reference to the given []FederatedUser and assigns it to the UserConflicts field.
func (o *ConnectedOrgConfig) SetUserConflicts(v []FederatedUser) {
o.UserConflicts = &v
}
func (o ConnectedOrgConfig) MarshalJSONWithoutReadOnly() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ConnectedOrgConfig) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.DataAccessIdentityProviderIds) {
toSerialize["dataAccessIdentityProviderIds"] = o.DataAccessIdentityProviderIds
}
if !IsNil(o.DomainAllowList) {
toSerialize["domainAllowList"] = o.DomainAllowList
}
toSerialize["domainRestrictionEnabled"] = o.DomainRestrictionEnabled
if !IsNil(o.IdentityProviderId) {
toSerialize["identityProviderId"] = o.IdentityProviderId
}
if !IsNil(o.PostAuthRoleGrants) {
toSerialize["postAuthRoleGrants"] = o.PostAuthRoleGrants
}
if !IsNil(o.RoleMappings) {
toSerialize["roleMappings"] = o.RoleMappings
}
if !IsNil(o.UserConflicts) {
toSerialize["userConflicts"] = o.UserConflicts
}
return toSerialize, nil
}