-
Notifications
You must be signed in to change notification settings - Fork 5
/
model_available_clusters_deployment.go
388 lines (328 loc) · 11.2 KB
/
model_available_clusters_deployment.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
// Code based on the AtlasAPI V2 OpenAPI file
package admin
import (
"encoding/json"
)
// AvailableClustersDeployment Deployments that can be migrated to MongoDB Atlas.
type AvailableClustersDeployment struct {
// Version of MongoDB Agent that monitors/manages the cluster.
// Read only field.
AgentVersion *string `json:"agentVersion,omitempty"`
// Unique 24-hexadecimal digit string that identifies the cluster.
// Read only field.
ClusterId *string `json:"clusterId,omitempty"`
// Size of this database on disk at the time of the request expressed in bytes.
// Read only field.
DbSizeBytes *int64 `json:"dbSizeBytes,omitempty"`
// Version of MongoDB [features](https://docs.mongodb.com/manual/reference/command/setFeatureCompatibilityVersion) that this cluster supports.
// Read only field.
FeatureCompatibilityVersion string `json:"featureCompatibilityVersion"`
// Flag that indicates whether Automation manages this cluster.
// Read only field.
Managed bool `json:"managed"`
// Version of MongoDB that this cluster runs.
// Read only field.
MongoDBVersion string `json:"mongoDBVersion"`
// Human-readable label that identifies this cluster.
// Read only field.
Name string `json:"name"`
// Size of the Oplog on disk at the time of the request expressed in MB.
// Read only field.
OplogSizeMB *int `json:"oplogSizeMB,omitempty"`
// Flag that indicates whether someone configured this cluster as a sharded cluster. - If `true`, this cluster serves as a sharded cluster. - If `false`, this cluster serves as a replica set.
// Read only field.
Sharded bool `json:"sharded"`
// Number of shards that comprise this cluster.
// Read only field.
ShardsSize *int `json:"shardsSize,omitempty"`
// Flag that indicates whether someone enabled TLS for this cluster.
// Read only field.
TlsEnabled bool `json:"tlsEnabled"`
}
// NewAvailableClustersDeployment instantiates a new AvailableClustersDeployment 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 NewAvailableClustersDeployment(featureCompatibilityVersion string, managed bool, mongoDBVersion string, name string, sharded bool, tlsEnabled bool) *AvailableClustersDeployment {
this := AvailableClustersDeployment{}
this.FeatureCompatibilityVersion = featureCompatibilityVersion
this.Managed = managed
this.MongoDBVersion = mongoDBVersion
this.Name = name
this.Sharded = sharded
this.TlsEnabled = tlsEnabled
return &this
}
// NewAvailableClustersDeploymentWithDefaults instantiates a new AvailableClustersDeployment 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 NewAvailableClustersDeploymentWithDefaults() *AvailableClustersDeployment {
this := AvailableClustersDeployment{}
return &this
}
// GetAgentVersion returns the AgentVersion field value if set, zero value otherwise
func (o *AvailableClustersDeployment) GetAgentVersion() string {
if o == nil || IsNil(o.AgentVersion) {
var ret string
return ret
}
return *o.AgentVersion
}
// GetAgentVersionOk returns a tuple with the AgentVersion field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AvailableClustersDeployment) GetAgentVersionOk() (*string, bool) {
if o == nil || IsNil(o.AgentVersion) {
return nil, false
}
return o.AgentVersion, true
}
// HasAgentVersion returns a boolean if a field has been set.
func (o *AvailableClustersDeployment) HasAgentVersion() bool {
if o != nil && !IsNil(o.AgentVersion) {
return true
}
return false
}
// SetAgentVersion gets a reference to the given string and assigns it to the AgentVersion field.
func (o *AvailableClustersDeployment) SetAgentVersion(v string) {
o.AgentVersion = &v
}
// GetClusterId returns the ClusterId field value if set, zero value otherwise
func (o *AvailableClustersDeployment) 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 *AvailableClustersDeployment) 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 *AvailableClustersDeployment) 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 *AvailableClustersDeployment) SetClusterId(v string) {
o.ClusterId = &v
}
// GetDbSizeBytes returns the DbSizeBytes field value if set, zero value otherwise
func (o *AvailableClustersDeployment) GetDbSizeBytes() int64 {
if o == nil || IsNil(o.DbSizeBytes) {
var ret int64
return ret
}
return *o.DbSizeBytes
}
// GetDbSizeBytesOk returns a tuple with the DbSizeBytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AvailableClustersDeployment) GetDbSizeBytesOk() (*int64, bool) {
if o == nil || IsNil(o.DbSizeBytes) {
return nil, false
}
return o.DbSizeBytes, true
}
// HasDbSizeBytes returns a boolean if a field has been set.
func (o *AvailableClustersDeployment) HasDbSizeBytes() bool {
if o != nil && !IsNil(o.DbSizeBytes) {
return true
}
return false
}
// SetDbSizeBytes gets a reference to the given int64 and assigns it to the DbSizeBytes field.
func (o *AvailableClustersDeployment) SetDbSizeBytes(v int64) {
o.DbSizeBytes = &v
}
// GetFeatureCompatibilityVersion returns the FeatureCompatibilityVersion field value
func (o *AvailableClustersDeployment) GetFeatureCompatibilityVersion() string {
if o == nil {
var ret string
return ret
}
return o.FeatureCompatibilityVersion
}
// GetFeatureCompatibilityVersionOk returns a tuple with the FeatureCompatibilityVersion field value
// and a boolean to check if the value has been set.
func (o *AvailableClustersDeployment) GetFeatureCompatibilityVersionOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.FeatureCompatibilityVersion, true
}
// SetFeatureCompatibilityVersion sets field value
func (o *AvailableClustersDeployment) SetFeatureCompatibilityVersion(v string) {
o.FeatureCompatibilityVersion = v
}
// GetManaged returns the Managed field value
func (o *AvailableClustersDeployment) GetManaged() bool {
if o == nil {
var ret bool
return ret
}
return o.Managed
}
// GetManagedOk returns a tuple with the Managed field value
// and a boolean to check if the value has been set.
func (o *AvailableClustersDeployment) GetManagedOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Managed, true
}
// SetManaged sets field value
func (o *AvailableClustersDeployment) SetManaged(v bool) {
o.Managed = v
}
// GetMongoDBVersion returns the MongoDBVersion field value
func (o *AvailableClustersDeployment) GetMongoDBVersion() string {
if o == nil {
var ret string
return ret
}
return o.MongoDBVersion
}
// GetMongoDBVersionOk returns a tuple with the MongoDBVersion field value
// and a boolean to check if the value has been set.
func (o *AvailableClustersDeployment) GetMongoDBVersionOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.MongoDBVersion, true
}
// SetMongoDBVersion sets field value
func (o *AvailableClustersDeployment) SetMongoDBVersion(v string) {
o.MongoDBVersion = v
}
// GetName returns the Name field value
func (o *AvailableClustersDeployment) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *AvailableClustersDeployment) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *AvailableClustersDeployment) SetName(v string) {
o.Name = v
}
// GetOplogSizeMB returns the OplogSizeMB field value if set, zero value otherwise
func (o *AvailableClustersDeployment) GetOplogSizeMB() int {
if o == nil || IsNil(o.OplogSizeMB) {
var ret int
return ret
}
return *o.OplogSizeMB
}
// GetOplogSizeMBOk returns a tuple with the OplogSizeMB field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AvailableClustersDeployment) GetOplogSizeMBOk() (*int, bool) {
if o == nil || IsNil(o.OplogSizeMB) {
return nil, false
}
return o.OplogSizeMB, true
}
// HasOplogSizeMB returns a boolean if a field has been set.
func (o *AvailableClustersDeployment) HasOplogSizeMB() bool {
if o != nil && !IsNil(o.OplogSizeMB) {
return true
}
return false
}
// SetOplogSizeMB gets a reference to the given int and assigns it to the OplogSizeMB field.
func (o *AvailableClustersDeployment) SetOplogSizeMB(v int) {
o.OplogSizeMB = &v
}
// GetSharded returns the Sharded field value
func (o *AvailableClustersDeployment) GetSharded() bool {
if o == nil {
var ret bool
return ret
}
return o.Sharded
}
// GetShardedOk returns a tuple with the Sharded field value
// and a boolean to check if the value has been set.
func (o *AvailableClustersDeployment) GetShardedOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Sharded, true
}
// SetSharded sets field value
func (o *AvailableClustersDeployment) SetSharded(v bool) {
o.Sharded = v
}
// GetShardsSize returns the ShardsSize field value if set, zero value otherwise
func (o *AvailableClustersDeployment) GetShardsSize() int {
if o == nil || IsNil(o.ShardsSize) {
var ret int
return ret
}
return *o.ShardsSize
}
// GetShardsSizeOk returns a tuple with the ShardsSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AvailableClustersDeployment) GetShardsSizeOk() (*int, bool) {
if o == nil || IsNil(o.ShardsSize) {
return nil, false
}
return o.ShardsSize, true
}
// HasShardsSize returns a boolean if a field has been set.
func (o *AvailableClustersDeployment) HasShardsSize() bool {
if o != nil && !IsNil(o.ShardsSize) {
return true
}
return false
}
// SetShardsSize gets a reference to the given int and assigns it to the ShardsSize field.
func (o *AvailableClustersDeployment) SetShardsSize(v int) {
o.ShardsSize = &v
}
// GetTlsEnabled returns the TlsEnabled field value
func (o *AvailableClustersDeployment) GetTlsEnabled() bool {
if o == nil {
var ret bool
return ret
}
return o.TlsEnabled
}
// GetTlsEnabledOk returns a tuple with the TlsEnabled field value
// and a boolean to check if the value has been set.
func (o *AvailableClustersDeployment) GetTlsEnabledOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.TlsEnabled, true
}
// SetTlsEnabled sets field value
func (o *AvailableClustersDeployment) SetTlsEnabled(v bool) {
o.TlsEnabled = v
}
func (o AvailableClustersDeployment) MarshalJSONWithoutReadOnly() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AvailableClustersDeployment) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
return toSerialize, nil
}