-
Notifications
You must be signed in to change notification settings - Fork 5
/
model_cloud_cluster.go
436 lines (364 loc) · 12.4 KB
/
model_cloud_cluster.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
// Code based on the AtlasAPI V2 OpenAPI file
package admin
import (
"encoding/json"
)
// CloudCluster Settings that describe the clusters in each project that the API key is authorized to view.
type CloudCluster struct {
// Whole number that indicates the quantity of alerts open on the cluster.
// Read only field.
AlertCount *int `json:"alertCount,omitempty"`
// Flag that indicates whether authentication is required to access the nodes in this cluster.
// Read only field.
AuthEnabled *bool `json:"authEnabled,omitempty"`
// Term that expresses how many nodes of the cluster can be accessed when MongoDB Cloud receives this request. This parameter returns `available` when all nodes are accessible, `warning` only when some nodes in the cluster can be accessed, `unavailable` when the cluster can't be accessed, or `dead` when the cluster has been deactivated.
// Read only field.
Availability *string `json:"availability,omitempty"`
// Flag that indicates whether the cluster can perform backups. If set to `true`, the cluster can perform backups. You must set this value to `true` for NVMe clusters. Backup uses Cloud Backups for dedicated clusters and Shared Cluster Backups for tenant clusters. If set to `false`, the cluster doesn't use MongoDB Cloud backups.
// Read only field.
BackupEnabled *bool `json:"backupEnabled,omitempty"`
// Unique 24-hexadecimal character string that identifies the cluster.
// Read only field.
ClusterId *string `json:"clusterId,omitempty"`
// Total size of the data stored on each node in the cluster. The resource expresses this value in bytes.
// Read only field.
DataSizeBytes *int64 `json:"dataSizeBytes,omitempty"`
// Human-readable label that identifies the cluster.
// Read only field.
Name *string `json:"name,omitempty"`
// Whole number that indicates the quantity of nodes that comprise the cluster.
// Read only field.
NodeCount *int `json:"nodeCount,omitempty"`
// Flag that indicates whether TLS authentication is required to access the nodes in this cluster.
// Read only field.
SslEnabled *bool `json:"sslEnabled,omitempty"`
// Human-readable label that indicates the cluster type.
// Read only field.
Type *string `json:"type,omitempty"`
// List that contains the versions of MongoDB that each node in the cluster runs.
// Read only field.
Versions *[]string `json:"versions,omitempty"`
}
// NewCloudCluster instantiates a new CloudCluster 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 NewCloudCluster() *CloudCluster {
this := CloudCluster{}
return &this
}
// NewCloudClusterWithDefaults instantiates a new CloudCluster 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 NewCloudClusterWithDefaults() *CloudCluster {
this := CloudCluster{}
return &this
}
// GetAlertCount returns the AlertCount field value if set, zero value otherwise
func (o *CloudCluster) GetAlertCount() int {
if o == nil || IsNil(o.AlertCount) {
var ret int
return ret
}
return *o.AlertCount
}
// GetAlertCountOk returns a tuple with the AlertCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CloudCluster) GetAlertCountOk() (*int, bool) {
if o == nil || IsNil(o.AlertCount) {
return nil, false
}
return o.AlertCount, true
}
// HasAlertCount returns a boolean if a field has been set.
func (o *CloudCluster) HasAlertCount() bool {
if o != nil && !IsNil(o.AlertCount) {
return true
}
return false
}
// SetAlertCount gets a reference to the given int and assigns it to the AlertCount field.
func (o *CloudCluster) SetAlertCount(v int) {
o.AlertCount = &v
}
// GetAuthEnabled returns the AuthEnabled field value if set, zero value otherwise
func (o *CloudCluster) GetAuthEnabled() bool {
if o == nil || IsNil(o.AuthEnabled) {
var ret bool
return ret
}
return *o.AuthEnabled
}
// GetAuthEnabledOk returns a tuple with the AuthEnabled field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CloudCluster) GetAuthEnabledOk() (*bool, bool) {
if o == nil || IsNil(o.AuthEnabled) {
return nil, false
}
return o.AuthEnabled, true
}
// HasAuthEnabled returns a boolean if a field has been set.
func (o *CloudCluster) HasAuthEnabled() bool {
if o != nil && !IsNil(o.AuthEnabled) {
return true
}
return false
}
// SetAuthEnabled gets a reference to the given bool and assigns it to the AuthEnabled field.
func (o *CloudCluster) SetAuthEnabled(v bool) {
o.AuthEnabled = &v
}
// GetAvailability returns the Availability field value if set, zero value otherwise
func (o *CloudCluster) GetAvailability() string {
if o == nil || IsNil(o.Availability) {
var ret string
return ret
}
return *o.Availability
}
// GetAvailabilityOk returns a tuple with the Availability field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CloudCluster) GetAvailabilityOk() (*string, bool) {
if o == nil || IsNil(o.Availability) {
return nil, false
}
return o.Availability, true
}
// HasAvailability returns a boolean if a field has been set.
func (o *CloudCluster) HasAvailability() bool {
if o != nil && !IsNil(o.Availability) {
return true
}
return false
}
// SetAvailability gets a reference to the given string and assigns it to the Availability field.
func (o *CloudCluster) SetAvailability(v string) {
o.Availability = &v
}
// GetBackupEnabled returns the BackupEnabled field value if set, zero value otherwise
func (o *CloudCluster) GetBackupEnabled() bool {
if o == nil || IsNil(o.BackupEnabled) {
var ret bool
return ret
}
return *o.BackupEnabled
}
// GetBackupEnabledOk returns a tuple with the BackupEnabled field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CloudCluster) GetBackupEnabledOk() (*bool, bool) {
if o == nil || IsNil(o.BackupEnabled) {
return nil, false
}
return o.BackupEnabled, true
}
// HasBackupEnabled returns a boolean if a field has been set.
func (o *CloudCluster) HasBackupEnabled() bool {
if o != nil && !IsNil(o.BackupEnabled) {
return true
}
return false
}
// SetBackupEnabled gets a reference to the given bool and assigns it to the BackupEnabled field.
func (o *CloudCluster) SetBackupEnabled(v bool) {
o.BackupEnabled = &v
}
// GetClusterId returns the ClusterId field value if set, zero value otherwise
func (o *CloudCluster) GetClusterId() string {
if o == nil || IsNil(o.ClusterId) {
var ret string
return ret
}
return *o.ClusterId
}
// GetClusterIdOk returns a tuple with the ClusterId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CloudCluster) GetClusterIdOk() (*string, bool) {
if o == nil || IsNil(o.ClusterId) {
return nil, false
}
return o.ClusterId, true
}
// HasClusterId returns a boolean if a field has been set.
func (o *CloudCluster) HasClusterId() bool {
if o != nil && !IsNil(o.ClusterId) {
return true
}
return false
}
// SetClusterId gets a reference to the given string and assigns it to the ClusterId field.
func (o *CloudCluster) SetClusterId(v string) {
o.ClusterId = &v
}
// GetDataSizeBytes returns the DataSizeBytes field value if set, zero value otherwise
func (o *CloudCluster) GetDataSizeBytes() int64 {
if o == nil || IsNil(o.DataSizeBytes) {
var ret int64
return ret
}
return *o.DataSizeBytes
}
// GetDataSizeBytesOk returns a tuple with the DataSizeBytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CloudCluster) GetDataSizeBytesOk() (*int64, bool) {
if o == nil || IsNil(o.DataSizeBytes) {
return nil, false
}
return o.DataSizeBytes, true
}
// HasDataSizeBytes returns a boolean if a field has been set.
func (o *CloudCluster) HasDataSizeBytes() bool {
if o != nil && !IsNil(o.DataSizeBytes) {
return true
}
return false
}
// SetDataSizeBytes gets a reference to the given int64 and assigns it to the DataSizeBytes field.
func (o *CloudCluster) SetDataSizeBytes(v int64) {
o.DataSizeBytes = &v
}
// GetName returns the Name field value if set, zero value otherwise
func (o *CloudCluster) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CloudCluster) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *CloudCluster) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *CloudCluster) SetName(v string) {
o.Name = &v
}
// GetNodeCount returns the NodeCount field value if set, zero value otherwise
func (o *CloudCluster) GetNodeCount() int {
if o == nil || IsNil(o.NodeCount) {
var ret int
return ret
}
return *o.NodeCount
}
// GetNodeCountOk returns a tuple with the NodeCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CloudCluster) GetNodeCountOk() (*int, bool) {
if o == nil || IsNil(o.NodeCount) {
return nil, false
}
return o.NodeCount, true
}
// HasNodeCount returns a boolean if a field has been set.
func (o *CloudCluster) HasNodeCount() bool {
if o != nil && !IsNil(o.NodeCount) {
return true
}
return false
}
// SetNodeCount gets a reference to the given int and assigns it to the NodeCount field.
func (o *CloudCluster) SetNodeCount(v int) {
o.NodeCount = &v
}
// GetSslEnabled returns the SslEnabled field value if set, zero value otherwise
func (o *CloudCluster) GetSslEnabled() bool {
if o == nil || IsNil(o.SslEnabled) {
var ret bool
return ret
}
return *o.SslEnabled
}
// GetSslEnabledOk returns a tuple with the SslEnabled field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CloudCluster) GetSslEnabledOk() (*bool, bool) {
if o == nil || IsNil(o.SslEnabled) {
return nil, false
}
return o.SslEnabled, true
}
// HasSslEnabled returns a boolean if a field has been set.
func (o *CloudCluster) HasSslEnabled() bool {
if o != nil && !IsNil(o.SslEnabled) {
return true
}
return false
}
// SetSslEnabled gets a reference to the given bool and assigns it to the SslEnabled field.
func (o *CloudCluster) SetSslEnabled(v bool) {
o.SslEnabled = &v
}
// GetType returns the Type field value if set, zero value otherwise
func (o *CloudCluster) GetType() string {
if o == nil || IsNil(o.Type) {
var ret string
return ret
}
return *o.Type
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CloudCluster) GetTypeOk() (*string, bool) {
if o == nil || IsNil(o.Type) {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *CloudCluster) HasType() bool {
if o != nil && !IsNil(o.Type) {
return true
}
return false
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *CloudCluster) SetType(v string) {
o.Type = &v
}
// GetVersions returns the Versions field value if set, zero value otherwise
func (o *CloudCluster) GetVersions() []string {
if o == nil || IsNil(o.Versions) {
var ret []string
return ret
}
return *o.Versions
}
// GetVersionsOk returns a tuple with the Versions field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CloudCluster) GetVersionsOk() (*[]string, bool) {
if o == nil || IsNil(o.Versions) {
return nil, false
}
return o.Versions, true
}
// HasVersions returns a boolean if a field has been set.
func (o *CloudCluster) HasVersions() bool {
if o != nil && !IsNil(o.Versions) {
return true
}
return false
}
// SetVersions gets a reference to the given []string and assigns it to the Versions field.
func (o *CloudCluster) SetVersions(v []string) {
o.Versions = &v
}
func (o CloudCluster) MarshalJSONWithoutReadOnly() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CloudCluster) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
return toSerialize, nil
}