Skip to content

Commit e790a42

Browse files
APIBot: SDK update based on recent changes in Atlas API (#258)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: wtrocki <[email protected]>
1 parent 984f330 commit e790a42

10 files changed

+259
-3
lines changed

admin/model_advanced_cluster_description.go

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ type AdvancedClusterDescription struct {
2222
CreateDate *time.Time `json:"createDate,omitempty"`
2323
// Storage capacity that the host's root volume possesses expressed in gigabytes. Increase this number to add capacity. MongoDB Cloud requires this parameter if you set **replicationSpecs**. If you specify a disk size below the minimum (10 GB), this parameter defaults to the minimum disk size value. Storage charge calculations depend on whether you choose the default value or a custom value. The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require more storage space, consider upgrading your cluster to a higher tier.
2424
DiskSizeGB *float64 `json:"diskSizeGB,omitempty"`
25+
// Disk warming mode selection.
26+
DiskWarmingMode *string `json:"diskWarmingMode,omitempty"`
2527
// Cloud service provider that manages your customer keys to provide an additional layer of encryption at rest for the cluster. To enable customer key management for encryption at rest, the cluster **replicationSpecs[n].regionConfigs[m].{type}Specs.instanceSize** setting must be `M10` or higher and `\"backupEnabled\" : false` or omitted entirely.
2628
EncryptionAtRestProvider *string `json:"encryptionAtRestProvider,omitempty"`
2729
// Unique 24-hexadecimal character string that identifies the project.
@@ -70,6 +72,8 @@ func NewAdvancedClusterDescription() *AdvancedClusterDescription {
7072
this := AdvancedClusterDescription{}
7173
var backupEnabled bool = false
7274
this.BackupEnabled = &backupEnabled
75+
var diskWarmingMode string = "FULLY_WARMED"
76+
this.DiskWarmingMode = &diskWarmingMode
7377
var mongoDBMajorVersion string = "6.0"
7478
this.MongoDBMajorVersion = &mongoDBMajorVersion
7579
var rootCertType string = "ISRGROOTX1"
@@ -88,6 +92,8 @@ func NewAdvancedClusterDescriptionWithDefaults() *AdvancedClusterDescription {
8892
this := AdvancedClusterDescription{}
8993
var backupEnabled bool = false
9094
this.BackupEnabled = &backupEnabled
95+
var diskWarmingMode string = "FULLY_WARMED"
96+
this.DiskWarmingMode = &diskWarmingMode
9197
var mongoDBMajorVersion string = "6.0"
9298
this.MongoDBMajorVersion = &mongoDBMajorVersion
9399
var rootCertType string = "ISRGROOTX1"
@@ -330,6 +336,39 @@ func (o *AdvancedClusterDescription) SetDiskSizeGB(v float64) {
330336
o.DiskSizeGB = &v
331337
}
332338

339+
// GetDiskWarmingMode returns the DiskWarmingMode field value if set, zero value otherwise
340+
func (o *AdvancedClusterDescription) GetDiskWarmingMode() string {
341+
if o == nil || IsNil(o.DiskWarmingMode) {
342+
var ret string
343+
return ret
344+
}
345+
return *o.DiskWarmingMode
346+
}
347+
348+
// GetDiskWarmingModeOk returns a tuple with the DiskWarmingMode field value if set, nil otherwise
349+
// and a boolean to check if the value has been set.
350+
func (o *AdvancedClusterDescription) GetDiskWarmingModeOk() (*string, bool) {
351+
if o == nil || IsNil(o.DiskWarmingMode) {
352+
return nil, false
353+
}
354+
355+
return o.DiskWarmingMode, true
356+
}
357+
358+
// HasDiskWarmingMode returns a boolean if a field has been set.
359+
func (o *AdvancedClusterDescription) HasDiskWarmingMode() bool {
360+
if o != nil && !IsNil(o.DiskWarmingMode) {
361+
return true
362+
}
363+
364+
return false
365+
}
366+
367+
// SetDiskWarmingMode gets a reference to the given string and assigns it to the DiskWarmingMode field.
368+
func (o *AdvancedClusterDescription) SetDiskWarmingMode(v string) {
369+
o.DiskWarmingMode = &v
370+
}
371+
333372
// GetEncryptionAtRestProvider returns the EncryptionAtRestProvider field value if set, zero value otherwise
334373
func (o *AdvancedClusterDescription) GetEncryptionAtRestProvider() string {
335374
if o == nil || IsNil(o.EncryptionAtRestProvider) {
@@ -888,6 +927,9 @@ func (o AdvancedClusterDescription) ToMap() (map[string]interface{}, error) {
888927
if !IsNil(o.DiskSizeGB) {
889928
toSerialize["diskSizeGB"] = o.DiskSizeGB
890929
}
930+
if !IsNil(o.DiskWarmingMode) {
931+
toSerialize["diskWarmingMode"] = o.DiskWarmingMode
932+
}
891933
if !IsNil(o.EncryptionAtRestProvider) {
892934
toSerialize["encryptionAtRestProvider"] = o.EncryptionAtRestProvider
893935
}

admin/model_legacy_atlas_cluster.go

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ type LegacyAtlasCluster struct {
2323
CreateDate *time.Time `json:"createDate,omitempty"`
2424
// Storage capacity that the host's root volume possesses expressed in gigabytes. Increase this number to add capacity. MongoDB Cloud requires this parameter if you set **replicationSpecs**. If you specify a disk size below the minimum (10 GB), this parameter defaults to the minimum disk size value. Storage charge calculations depend on whether you choose the default value or a custom value. The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require more storage space, consider upgrading your cluster to a higher tier.
2525
DiskSizeGB *float64 `json:"diskSizeGB,omitempty"`
26+
// Disk warming mode selection.
27+
DiskWarmingMode *string `json:"diskWarmingMode,omitempty"`
2628
// Cloud service provider that manages your customer keys to provide an additional layer of Encryption at Rest for the cluster.
2729
EncryptionAtRestProvider *string `json:"encryptionAtRestProvider,omitempty"`
2830
// Unique 24-hexadecimal character string that identifies the project.
@@ -90,6 +92,8 @@ type LegacyAtlasCluster struct {
9092
// will change when the set of required properties is changed
9193
func NewLegacyAtlasCluster() *LegacyAtlasCluster {
9294
this := LegacyAtlasCluster{}
95+
var diskWarmingMode string = "FULLY_WARMED"
96+
this.DiskWarmingMode = &diskWarmingMode
9397
var mongoDBMajorVersion string = "6.0"
9498
this.MongoDBMajorVersion = &mongoDBMajorVersion
9599
var numShards int = 1
@@ -110,6 +114,8 @@ func NewLegacyAtlasCluster() *LegacyAtlasCluster {
110114
// but it doesn't guarantee that properties required by API are set
111115
func NewLegacyAtlasClusterWithDefaults() *LegacyAtlasCluster {
112116
this := LegacyAtlasCluster{}
117+
var diskWarmingMode string = "FULLY_WARMED"
118+
this.DiskWarmingMode = &diskWarmingMode
113119
var mongoDBMajorVersion string = "6.0"
114120
this.MongoDBMajorVersion = &mongoDBMajorVersion
115121
var numShards int = 1
@@ -389,6 +395,39 @@ func (o *LegacyAtlasCluster) SetDiskSizeGB(v float64) {
389395
o.DiskSizeGB = &v
390396
}
391397

398+
// GetDiskWarmingMode returns the DiskWarmingMode field value if set, zero value otherwise
399+
func (o *LegacyAtlasCluster) GetDiskWarmingMode() string {
400+
if o == nil || IsNil(o.DiskWarmingMode) {
401+
var ret string
402+
return ret
403+
}
404+
return *o.DiskWarmingMode
405+
}
406+
407+
// GetDiskWarmingModeOk returns a tuple with the DiskWarmingMode field value if set, nil otherwise
408+
// and a boolean to check if the value has been set.
409+
func (o *LegacyAtlasCluster) GetDiskWarmingModeOk() (*string, bool) {
410+
if o == nil || IsNil(o.DiskWarmingMode) {
411+
return nil, false
412+
}
413+
414+
return o.DiskWarmingMode, true
415+
}
416+
417+
// HasDiskWarmingMode returns a boolean if a field has been set.
418+
func (o *LegacyAtlasCluster) HasDiskWarmingMode() bool {
419+
if o != nil && !IsNil(o.DiskWarmingMode) {
420+
return true
421+
}
422+
423+
return false
424+
}
425+
426+
// SetDiskWarmingMode gets a reference to the given string and assigns it to the DiskWarmingMode field.
427+
func (o *LegacyAtlasCluster) SetDiskWarmingMode(v string) {
428+
o.DiskWarmingMode = &v
429+
}
430+
392431
// GetEncryptionAtRestProvider returns the EncryptionAtRestProvider field value if set, zero value otherwise
393432
func (o *LegacyAtlasCluster) GetEncryptionAtRestProvider() string {
394433
if o == nil || IsNil(o.EncryptionAtRestProvider) {
@@ -1250,6 +1289,9 @@ func (o LegacyAtlasCluster) ToMap() (map[string]interface{}, error) {
12501289
if !IsNil(o.DiskSizeGB) {
12511290
toSerialize["diskSizeGB"] = o.DiskSizeGB
12521291
}
1292+
if !IsNil(o.DiskWarmingMode) {
1293+
toSerialize["diskWarmingMode"] = o.DiskWarmingMode
1294+
}
12531295
if !IsNil(o.EncryptionAtRestProvider) {
12541296
toSerialize["encryptionAtRestProvider"] = o.EncryptionAtRestProvider
12551297
}

admin/model_legacy_atlas_tenant_cluster_upgrade_request.go

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ type LegacyAtlasTenantClusterUpgradeRequest struct {
2323
CreateDate *time.Time `json:"createDate,omitempty"`
2424
// Storage capacity that the host's root volume possesses expressed in gigabytes. Increase this number to add capacity. MongoDB Cloud requires this parameter if you set **replicationSpecs**. If you specify a disk size below the minimum (10 GB), this parameter defaults to the minimum disk size value. Storage charge calculations depend on whether you choose the default value or a custom value. The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require more storage space, consider upgrading your cluster to a higher tier.
2525
DiskSizeGB *float64 `json:"diskSizeGB,omitempty"`
26+
// Disk warming mode selection.
27+
DiskWarmingMode *string `json:"diskWarmingMode,omitempty"`
2628
// Cloud service provider that manages your customer keys to provide an additional layer of Encryption at Rest for the cluster.
2729
EncryptionAtRestProvider *string `json:"encryptionAtRestProvider,omitempty"`
2830
// Unique 24-hexadecimal character string that identifies the project.
@@ -90,6 +92,8 @@ type LegacyAtlasTenantClusterUpgradeRequest struct {
9092
// will change when the set of required properties is changed
9193
func NewLegacyAtlasTenantClusterUpgradeRequest(name string) *LegacyAtlasTenantClusterUpgradeRequest {
9294
this := LegacyAtlasTenantClusterUpgradeRequest{}
95+
var diskWarmingMode string = "FULLY_WARMED"
96+
this.DiskWarmingMode = &diskWarmingMode
9397
var mongoDBMajorVersion string = "6.0"
9498
this.MongoDBMajorVersion = &mongoDBMajorVersion
9599
this.Name = name
@@ -111,6 +115,8 @@ func NewLegacyAtlasTenantClusterUpgradeRequest(name string) *LegacyAtlasTenantCl
111115
// but it doesn't guarantee that properties required by API are set
112116
func NewLegacyAtlasTenantClusterUpgradeRequestWithDefaults() *LegacyAtlasTenantClusterUpgradeRequest {
113117
this := LegacyAtlasTenantClusterUpgradeRequest{}
118+
var diskWarmingMode string = "FULLY_WARMED"
119+
this.DiskWarmingMode = &diskWarmingMode
114120
var mongoDBMajorVersion string = "6.0"
115121
this.MongoDBMajorVersion = &mongoDBMajorVersion
116122
var numShards int = 1
@@ -390,6 +396,39 @@ func (o *LegacyAtlasTenantClusterUpgradeRequest) SetDiskSizeGB(v float64) {
390396
o.DiskSizeGB = &v
391397
}
392398

399+
// GetDiskWarmingMode returns the DiskWarmingMode field value if set, zero value otherwise
400+
func (o *LegacyAtlasTenantClusterUpgradeRequest) GetDiskWarmingMode() string {
401+
if o == nil || IsNil(o.DiskWarmingMode) {
402+
var ret string
403+
return ret
404+
}
405+
return *o.DiskWarmingMode
406+
}
407+
408+
// GetDiskWarmingModeOk returns a tuple with the DiskWarmingMode field value if set, nil otherwise
409+
// and a boolean to check if the value has been set.
410+
func (o *LegacyAtlasTenantClusterUpgradeRequest) GetDiskWarmingModeOk() (*string, bool) {
411+
if o == nil || IsNil(o.DiskWarmingMode) {
412+
return nil, false
413+
}
414+
415+
return o.DiskWarmingMode, true
416+
}
417+
418+
// HasDiskWarmingMode returns a boolean if a field has been set.
419+
func (o *LegacyAtlasTenantClusterUpgradeRequest) HasDiskWarmingMode() bool {
420+
if o != nil && !IsNil(o.DiskWarmingMode) {
421+
return true
422+
}
423+
424+
return false
425+
}
426+
427+
// SetDiskWarmingMode gets a reference to the given string and assigns it to the DiskWarmingMode field.
428+
func (o *LegacyAtlasTenantClusterUpgradeRequest) SetDiskWarmingMode(v string) {
429+
o.DiskWarmingMode = &v
430+
}
431+
393432
// GetEncryptionAtRestProvider returns the EncryptionAtRestProvider field value if set, zero value otherwise
394433
func (o *LegacyAtlasTenantClusterUpgradeRequest) GetEncryptionAtRestProvider() string {
395434
if o == nil || IsNil(o.EncryptionAtRestProvider) {
@@ -1242,6 +1281,9 @@ func (o LegacyAtlasTenantClusterUpgradeRequest) ToMap() (map[string]interface{},
12421281
if !IsNil(o.DiskSizeGB) {
12431282
toSerialize["diskSizeGB"] = o.DiskSizeGB
12441283
}
1284+
if !IsNil(o.DiskWarmingMode) {
1285+
toSerialize["diskWarmingMode"] = o.DiskWarmingMode
1286+
}
12451287
if !IsNil(o.EncryptionAtRestProvider) {
12461288
toSerialize["encryptionAtRestProvider"] = o.EncryptionAtRestProvider
12471289
}

docs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
* [Using Getters Instead of Direct Field Access](./doc_5_best_practices.md#using-getters-instead-of-direct-field-access)
3535
* [Check for Empty Strings for String Pointers](./doc_5_best_practices.md#check-for-empty-strings-for-string-pointers)
3636
* [Working with Date Fields](./doc_5_best_practices.md#working-with-date-fields)
37+
* [Working with Pointers](./doc_5_best_practices.md#working-with-pointers)
38+
* [Working with Arrays](./doc_5_best_practices.md#working-with-arrays)
3739
* [Working with Binary Responses](./doc_5_best_practices.md#working-with-binary-responses)
3840
* [Use Method for Creating Models](./doc_5_best_practices.md#use-method-for-creating-models)
3941
* [Use golangci-lint Validators](./doc_5_best_practices.md#use-golangci-lint-validators)

docs/docs/AdvancedClusterDescription.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Name | Type | Description | Notes
1111
**ConnectionStrings** | Pointer to [**ClusterConnectionStrings**](ClusterConnectionStrings.md) | | [optional]
1212
**CreateDate** | Pointer to **time.Time** | Date and time when MongoDB Cloud created this cluster. This parameter expresses its value in ISO 8601 format in UTC. | [optional] [readonly]
1313
**DiskSizeGB** | Pointer to **float64** | Storage capacity that the host&#39;s root volume possesses expressed in gigabytes. Increase this number to add capacity. MongoDB Cloud requires this parameter if you set **replicationSpecs**. If you specify a disk size below the minimum (10 GB), this parameter defaults to the minimum disk size value. Storage charge calculations depend on whether you choose the default value or a custom value. The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require more storage space, consider upgrading your cluster to a higher tier. | [optional]
14+
**DiskWarmingMode** | Pointer to **string** | Disk warming mode selection. | [optional] [default to "FULLY_WARMED"]
1415
**EncryptionAtRestProvider** | Pointer to **string** | Cloud service provider that manages your customer keys to provide an additional layer of encryption at rest for the cluster. To enable customer key management for encryption at rest, the cluster **replicationSpecs[n].regionConfigs[m].{type}Specs.instanceSize** setting must be &#x60;M10&#x60; or higher and &#x60;\&quot;backupEnabled\&quot; : false&#x60; or omitted entirely. | [optional]
1516
**GroupId** | Pointer to **string** | Unique 24-hexadecimal character string that identifies the project. | [optional] [readonly]
1617
**Id** | Pointer to **string** | Unique 24-hexadecimal digit string that identifies the replication object for a zone in a Global Cluster. If you include existing zones in the request, you must specify this parameter. If you add a new zone to an existing Global Cluster, you may specify this parameter. The request deletes any existing zones in a Global Cluster that you exclude from the request. | [optional] [readonly]
@@ -215,6 +216,30 @@ SetDiskSizeGB sets DiskSizeGB field to given value.
215216
`func (o *AdvancedClusterDescription) HasDiskSizeGB() bool`
216217

217218
HasDiskSizeGB returns a boolean if a field has been set.
219+
### GetDiskWarmingMode
220+
221+
`func (o *AdvancedClusterDescription) GetDiskWarmingMode() string`
222+
223+
GetDiskWarmingMode returns the DiskWarmingMode field if non-nil, zero value otherwise.
224+
225+
### GetDiskWarmingModeOk
226+
227+
`func (o *AdvancedClusterDescription) GetDiskWarmingModeOk() (*string, bool)`
228+
229+
GetDiskWarmingModeOk returns a tuple with the DiskWarmingMode field if it's non-nil, zero value otherwise
230+
and a boolean to check if the value has been set.
231+
232+
### SetDiskWarmingMode
233+
234+
`func (o *AdvancedClusterDescription) SetDiskWarmingMode(v string)`
235+
236+
SetDiskWarmingMode sets DiskWarmingMode field to given value.
237+
238+
### HasDiskWarmingMode
239+
240+
`func (o *AdvancedClusterDescription) HasDiskWarmingMode() bool`
241+
242+
HasDiskWarmingMode returns a boolean if a field has been set.
218243
### GetEncryptionAtRestProvider
219244

220245
`func (o *AdvancedClusterDescription) GetEncryptionAtRestProvider() string`

docs/docs/LegacyAtlasCluster.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
1212
**ConnectionStrings** | Pointer to [**ClusterConnectionStrings**](ClusterConnectionStrings.md) | | [optional]
1313
**CreateDate** | Pointer to **time.Time** | Date and time when MongoDB Cloud created this serverless instance. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC. | [optional] [readonly]
1414
**DiskSizeGB** | Pointer to **float64** | Storage capacity that the host&#39;s root volume possesses expressed in gigabytes. Increase this number to add capacity. MongoDB Cloud requires this parameter if you set **replicationSpecs**. If you specify a disk size below the minimum (10 GB), this parameter defaults to the minimum disk size value. Storage charge calculations depend on whether you choose the default value or a custom value. The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require more storage space, consider upgrading your cluster to a higher tier. | [optional]
15+
**DiskWarmingMode** | Pointer to **string** | Disk warming mode selection. | [optional] [default to "FULLY_WARMED"]
1516
**EncryptionAtRestProvider** | Pointer to **string** | Cloud service provider that manages your customer keys to provide an additional layer of Encryption at Rest for the cluster. | [optional]
1617
**GroupId** | Pointer to **string** | Unique 24-hexadecimal character string that identifies the project. | [optional] [readonly]
1718
**Id** | Pointer to **string** | Unique 24-hexadecimal digit string that identifies the cluster. | [optional] [readonly]
@@ -249,6 +250,30 @@ SetDiskSizeGB sets DiskSizeGB field to given value.
249250
`func (o *LegacyAtlasCluster) HasDiskSizeGB() bool`
250251

251252
HasDiskSizeGB returns a boolean if a field has been set.
253+
### GetDiskWarmingMode
254+
255+
`func (o *LegacyAtlasCluster) GetDiskWarmingMode() string`
256+
257+
GetDiskWarmingMode returns the DiskWarmingMode field if non-nil, zero value otherwise.
258+
259+
### GetDiskWarmingModeOk
260+
261+
`func (o *LegacyAtlasCluster) GetDiskWarmingModeOk() (*string, bool)`
262+
263+
GetDiskWarmingModeOk returns a tuple with the DiskWarmingMode field if it's non-nil, zero value otherwise
264+
and a boolean to check if the value has been set.
265+
266+
### SetDiskWarmingMode
267+
268+
`func (o *LegacyAtlasCluster) SetDiskWarmingMode(v string)`
269+
270+
SetDiskWarmingMode sets DiskWarmingMode field to given value.
271+
272+
### HasDiskWarmingMode
273+
274+
`func (o *LegacyAtlasCluster) HasDiskWarmingMode() bool`
275+
276+
HasDiskWarmingMode returns a boolean if a field has been set.
252277
### GetEncryptionAtRestProvider
253278

254279
`func (o *LegacyAtlasCluster) GetEncryptionAtRestProvider() string`

0 commit comments

Comments
 (0)