-
Notifications
You must be signed in to change notification settings - Fork 5
/
model_cluster_provider_settings.go
378 lines (320 loc) · 13.6 KB
/
model_cluster_provider_settings.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
// Code based on the AtlasAPI V2 OpenAPI file
package admin
import (
"encoding/json"
)
// ClusterProviderSettings Group of cloud provider settings that configure the provisioned MongoDB hosts.
type ClusterProviderSettings struct {
ProviderName string `json:"providerName"`
AutoScaling *ClusterFreeAutoScaling `json:"autoScaling,omitempty"`
// Maximum Disk Input/Output Operations per Second (IOPS) that the database host can perform.
DiskIOPS *int `json:"diskIOPS,omitempty"`
// Flag that indicates whether the Amazon Elastic Block Store (EBS) encryption feature encrypts the host's root volume for both data at rest within the volume and for data moving between the volume and the cluster. Clusters always have this setting enabled.
// Deprecated
EncryptEBSVolume *bool `json:"encryptEBSVolume,omitempty"`
// Cluster tier, with a default storage and memory capacity, that applies to all the data-bearing hosts in your cluster. Alternatively: Cluster tier, with a default storage and memory capacity, that applies to all the data-bearing hosts in your cluster. You must set **providerSettings.providerName** to `TENANT` and specify the cloud service provider in **providerSettings.backingProviderName**.
InstanceSizeName *string `json:"instanceSizeName,omitempty"`
// Physical location where MongoDB Cloud deploys your AWS-hosted MongoDB cluster nodes. The region you choose can affect network latency for clients accessing your databases. When MongoDB Cloud deploys a dedicated cluster, it checks if a VPC or VPC connection exists for that provider and region. If not, MongoDB Cloud creates them as part of the deployment. MongoDB Cloud assigns the VPC a CIDR block. To limit a new VPC peering connection to one CIDR block and region, create the connection first. Deploy the cluster after the connection starts. Alternatively: Microsoft Azure Regions. Alternatively: Google Compute Regions. Alternatively: Human-readable label that identifies the geographic location of your MongoDB cluster. The region you choose can affect network latency for clients accessing your databases. For a complete list of region names, see [AWS](https://docs.atlas.mongodb.com/reference/amazon-aws/#std-label-amazon-aws), [GCP](https://docs.atlas.mongodb.com/reference/google-gcp/), and [Azure](https://docs.atlas.mongodb.com/reference/microsoft-azure/). For multi-region clusters, see **replicationSpec.{region}**.
RegionName *string `json:"regionName,omitempty"`
// Disk Input/Output Operations per Second (IOPS) setting for Amazon Web Services (AWS) storage that you configure only for abbr title=\"Amazon Web Services\">AWS</abbr>. Specify whether Disk Input/Output Operations per Second (IOPS) must not exceed the default Input/Output Operations per Second (IOPS) rate for the selected volume size (`STANDARD`), or must fall within the allowable Input/Output Operations per Second (IOPS) range for the selected volume size (`PROVISIONED`). You must set this value to (`PROVISIONED`) for NVMe clusters.
VolumeType *string `json:"volumeType,omitempty"`
// Disk type that corresponds to the host's root volume for Azure instances. If omitted, the default disk type for the selected **providerSettings.instanceSizeName** applies.
DiskTypeName *string `json:"diskTypeName,omitempty"`
// Cloud service provider on which MongoDB Cloud provisioned the multi-tenant host. The resource returns this parameter when **providerSettings.providerName** is `TENANT` and **providerSetting.instanceSizeName** is `M0`, `M2` or `M5`.
BackingProviderName *string `json:"backingProviderName,omitempty"`
}
// NewClusterProviderSettings instantiates a new ClusterProviderSettings 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 NewClusterProviderSettings(providerName string) *ClusterProviderSettings {
this := ClusterProviderSettings{}
this.ProviderName = providerName
var encryptEBSVolume bool = true
this.EncryptEBSVolume = &encryptEBSVolume
return &this
}
// NewClusterProviderSettingsWithDefaults instantiates a new ClusterProviderSettings 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 NewClusterProviderSettingsWithDefaults() *ClusterProviderSettings {
this := ClusterProviderSettings{}
var encryptEBSVolume bool = true
this.EncryptEBSVolume = &encryptEBSVolume
return &this
}
// GetProviderName returns the ProviderName field value
func (o *ClusterProviderSettings) GetProviderName() string {
if o == nil {
var ret string
return ret
}
return o.ProviderName
}
// GetProviderNameOk returns a tuple with the ProviderName field value
// and a boolean to check if the value has been set.
func (o *ClusterProviderSettings) GetProviderNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ProviderName, true
}
// SetProviderName sets field value
func (o *ClusterProviderSettings) SetProviderName(v string) {
o.ProviderName = v
}
// GetAutoScaling returns the AutoScaling field value if set, zero value otherwise
func (o *ClusterProviderSettings) GetAutoScaling() ClusterFreeAutoScaling {
if o == nil || IsNil(o.AutoScaling) {
var ret ClusterFreeAutoScaling
return ret
}
return *o.AutoScaling
}
// GetAutoScalingOk returns a tuple with the AutoScaling field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ClusterProviderSettings) GetAutoScalingOk() (*ClusterFreeAutoScaling, bool) {
if o == nil || IsNil(o.AutoScaling) {
return nil, false
}
return o.AutoScaling, true
}
// HasAutoScaling returns a boolean if a field has been set.
func (o *ClusterProviderSettings) HasAutoScaling() bool {
if o != nil && !IsNil(o.AutoScaling) {
return true
}
return false
}
// SetAutoScaling gets a reference to the given ClusterFreeAutoScaling and assigns it to the AutoScaling field.
func (o *ClusterProviderSettings) SetAutoScaling(v ClusterFreeAutoScaling) {
o.AutoScaling = &v
}
// GetDiskIOPS returns the DiskIOPS field value if set, zero value otherwise
func (o *ClusterProviderSettings) GetDiskIOPS() int {
if o == nil || IsNil(o.DiskIOPS) {
var ret int
return ret
}
return *o.DiskIOPS
}
// GetDiskIOPSOk returns a tuple with the DiskIOPS field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ClusterProviderSettings) GetDiskIOPSOk() (*int, bool) {
if o == nil || IsNil(o.DiskIOPS) {
return nil, false
}
return o.DiskIOPS, true
}
// HasDiskIOPS returns a boolean if a field has been set.
func (o *ClusterProviderSettings) HasDiskIOPS() bool {
if o != nil && !IsNil(o.DiskIOPS) {
return true
}
return false
}
// SetDiskIOPS gets a reference to the given int and assigns it to the DiskIOPS field.
func (o *ClusterProviderSettings) SetDiskIOPS(v int) {
o.DiskIOPS = &v
}
// GetEncryptEBSVolume returns the EncryptEBSVolume field value if set, zero value otherwise
// Deprecated
func (o *ClusterProviderSettings) GetEncryptEBSVolume() bool {
if o == nil || IsNil(o.EncryptEBSVolume) {
var ret bool
return ret
}
return *o.EncryptEBSVolume
}
// GetEncryptEBSVolumeOk returns a tuple with the EncryptEBSVolume field value if set, nil otherwise
// and a boolean to check if the value has been set.
// Deprecated
func (o *ClusterProviderSettings) GetEncryptEBSVolumeOk() (*bool, bool) {
if o == nil || IsNil(o.EncryptEBSVolume) {
return nil, false
}
return o.EncryptEBSVolume, true
}
// HasEncryptEBSVolume returns a boolean if a field has been set.
func (o *ClusterProviderSettings) HasEncryptEBSVolume() bool {
if o != nil && !IsNil(o.EncryptEBSVolume) {
return true
}
return false
}
// SetEncryptEBSVolume gets a reference to the given bool and assigns it to the EncryptEBSVolume field.
// Deprecated
func (o *ClusterProviderSettings) SetEncryptEBSVolume(v bool) {
o.EncryptEBSVolume = &v
}
// GetInstanceSizeName returns the InstanceSizeName field value if set, zero value otherwise
func (o *ClusterProviderSettings) GetInstanceSizeName() string {
if o == nil || IsNil(o.InstanceSizeName) {
var ret string
return ret
}
return *o.InstanceSizeName
}
// GetInstanceSizeNameOk returns a tuple with the InstanceSizeName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ClusterProviderSettings) GetInstanceSizeNameOk() (*string, bool) {
if o == nil || IsNil(o.InstanceSizeName) {
return nil, false
}
return o.InstanceSizeName, true
}
// HasInstanceSizeName returns a boolean if a field has been set.
func (o *ClusterProviderSettings) HasInstanceSizeName() bool {
if o != nil && !IsNil(o.InstanceSizeName) {
return true
}
return false
}
// SetInstanceSizeName gets a reference to the given string and assigns it to the InstanceSizeName field.
func (o *ClusterProviderSettings) SetInstanceSizeName(v string) {
o.InstanceSizeName = &v
}
// GetRegionName returns the RegionName field value if set, zero value otherwise
func (o *ClusterProviderSettings) GetRegionName() string {
if o == nil || IsNil(o.RegionName) {
var ret string
return ret
}
return *o.RegionName
}
// GetRegionNameOk returns a tuple with the RegionName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ClusterProviderSettings) GetRegionNameOk() (*string, bool) {
if o == nil || IsNil(o.RegionName) {
return nil, false
}
return o.RegionName, true
}
// HasRegionName returns a boolean if a field has been set.
func (o *ClusterProviderSettings) HasRegionName() bool {
if o != nil && !IsNil(o.RegionName) {
return true
}
return false
}
// SetRegionName gets a reference to the given string and assigns it to the RegionName field.
func (o *ClusterProviderSettings) SetRegionName(v string) {
o.RegionName = &v
}
// GetVolumeType returns the VolumeType field value if set, zero value otherwise
func (o *ClusterProviderSettings) GetVolumeType() string {
if o == nil || IsNil(o.VolumeType) {
var ret string
return ret
}
return *o.VolumeType
}
// GetVolumeTypeOk returns a tuple with the VolumeType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ClusterProviderSettings) GetVolumeTypeOk() (*string, bool) {
if o == nil || IsNil(o.VolumeType) {
return nil, false
}
return o.VolumeType, true
}
// HasVolumeType returns a boolean if a field has been set.
func (o *ClusterProviderSettings) HasVolumeType() bool {
if o != nil && !IsNil(o.VolumeType) {
return true
}
return false
}
// SetVolumeType gets a reference to the given string and assigns it to the VolumeType field.
func (o *ClusterProviderSettings) SetVolumeType(v string) {
o.VolumeType = &v
}
// GetDiskTypeName returns the DiskTypeName field value if set, zero value otherwise
func (o *ClusterProviderSettings) GetDiskTypeName() string {
if o == nil || IsNil(o.DiskTypeName) {
var ret string
return ret
}
return *o.DiskTypeName
}
// GetDiskTypeNameOk returns a tuple with the DiskTypeName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ClusterProviderSettings) GetDiskTypeNameOk() (*string, bool) {
if o == nil || IsNil(o.DiskTypeName) {
return nil, false
}
return o.DiskTypeName, true
}
// HasDiskTypeName returns a boolean if a field has been set.
func (o *ClusterProviderSettings) HasDiskTypeName() bool {
if o != nil && !IsNil(o.DiskTypeName) {
return true
}
return false
}
// SetDiskTypeName gets a reference to the given string and assigns it to the DiskTypeName field.
func (o *ClusterProviderSettings) SetDiskTypeName(v string) {
o.DiskTypeName = &v
}
// GetBackingProviderName returns the BackingProviderName field value if set, zero value otherwise
func (o *ClusterProviderSettings) GetBackingProviderName() string {
if o == nil || IsNil(o.BackingProviderName) {
var ret string
return ret
}
return *o.BackingProviderName
}
// GetBackingProviderNameOk returns a tuple with the BackingProviderName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ClusterProviderSettings) GetBackingProviderNameOk() (*string, bool) {
if o == nil || IsNil(o.BackingProviderName) {
return nil, false
}
return o.BackingProviderName, true
}
// HasBackingProviderName returns a boolean if a field has been set.
func (o *ClusterProviderSettings) HasBackingProviderName() bool {
if o != nil && !IsNil(o.BackingProviderName) {
return true
}
return false
}
// SetBackingProviderName gets a reference to the given string and assigns it to the BackingProviderName field.
func (o *ClusterProviderSettings) SetBackingProviderName(v string) {
o.BackingProviderName = &v
}
func (o ClusterProviderSettings) MarshalJSONWithoutReadOnly() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ClusterProviderSettings) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["providerName"] = o.ProviderName
if !IsNil(o.AutoScaling) {
toSerialize["autoScaling"] = o.AutoScaling
}
if !IsNil(o.DiskIOPS) {
toSerialize["diskIOPS"] = o.DiskIOPS
}
if !IsNil(o.EncryptEBSVolume) {
toSerialize["encryptEBSVolume"] = o.EncryptEBSVolume
}
if !IsNil(o.InstanceSizeName) {
toSerialize["instanceSizeName"] = o.InstanceSizeName
}
if !IsNil(o.RegionName) {
toSerialize["regionName"] = o.RegionName
}
if !IsNil(o.VolumeType) {
toSerialize["volumeType"] = o.VolumeType
}
if !IsNil(o.DiskTypeName) {
toSerialize["diskTypeName"] = o.DiskTypeName
}
if !IsNil(o.BackingProviderName) {
toSerialize["backingProviderName"] = o.BackingProviderName
}
return toSerialize, nil
}