Skip to content

Commit 0d2102d

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

9 files changed

+357
-30
lines changed

admin/model_cluster_description20240805.go

+42
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ type ClusterDescription20240805 struct {
4949
Paused *bool `json:"paused,omitempty"`
5050
// Flag that indicates whether the cluster uses continuous cloud backups.
5151
PitEnabled *bool `json:"pitEnabled,omitempty"`
52+
// Set this field to configure the replica set scaling mode for your cluster. By default, Atlas scales under WORKLOAD_TYPE. This mode allows Atlas to scale your analytics nodes in parallel to your operational nodes. When configured as SEQUENTIAL, Atlas scales all nodes sequentially. This mode is intended for steady-state workloads and applications performing latency-sensitive secondary reads. When configured as NODE_TYPE, Atlas scales your electable nodes in parallel with your read-only and analytics nodes. This mode is intended for large, dynamic workloads requiring frequent and timely cluster tier scaling. This is the fastest scaling strategy, but it might impact latency of workloads when performing extensive secondary reads.
53+
ReplicaSetScalingStrategy *string `json:"replicaSetScalingStrategy,omitempty"`
5254
// List of settings that configure your cluster regions. This array has one object per shard representing node configurations in each shard. For replica sets there is only one object representing node configurations.
5355
ReplicationSpecs *[]ReplicationSpec20240805 `json:"replicationSpecs,omitempty"`
5456
// Root Certificate Authority that MongoDB Cloud cluster uses. MongoDB Cloud supports Internet Security Research Group.
@@ -74,6 +76,8 @@ func NewClusterDescription20240805() *ClusterDescription20240805 {
7476
this.BackupEnabled = &backupEnabled
7577
var diskWarmingMode string = "FULLY_WARMED"
7678
this.DiskWarmingMode = &diskWarmingMode
79+
var replicaSetScalingStrategy string = "WORKLOAD_TYPE"
80+
this.ReplicaSetScalingStrategy = &replicaSetScalingStrategy
7781
var rootCertType string = "ISRGROOTX1"
7882
this.RootCertType = &rootCertType
7983
var terminationProtectionEnabled bool = false
@@ -92,6 +96,8 @@ func NewClusterDescription20240805WithDefaults() *ClusterDescription20240805 {
9296
this.BackupEnabled = &backupEnabled
9397
var diskWarmingMode string = "FULLY_WARMED"
9498
this.DiskWarmingMode = &diskWarmingMode
99+
var replicaSetScalingStrategy string = "WORKLOAD_TYPE"
100+
this.ReplicaSetScalingStrategy = &replicaSetScalingStrategy
95101
var rootCertType string = "ISRGROOTX1"
96102
this.RootCertType = &rootCertType
97103
var terminationProtectionEnabled bool = false
@@ -698,6 +704,39 @@ func (o *ClusterDescription20240805) SetPitEnabled(v bool) {
698704
o.PitEnabled = &v
699705
}
700706

707+
// GetReplicaSetScalingStrategy returns the ReplicaSetScalingStrategy field value if set, zero value otherwise
708+
func (o *ClusterDescription20240805) GetReplicaSetScalingStrategy() string {
709+
if o == nil || IsNil(o.ReplicaSetScalingStrategy) {
710+
var ret string
711+
return ret
712+
}
713+
return *o.ReplicaSetScalingStrategy
714+
}
715+
716+
// GetReplicaSetScalingStrategyOk returns a tuple with the ReplicaSetScalingStrategy field value if set, nil otherwise
717+
// and a boolean to check if the value has been set.
718+
func (o *ClusterDescription20240805) GetReplicaSetScalingStrategyOk() (*string, bool) {
719+
if o == nil || IsNil(o.ReplicaSetScalingStrategy) {
720+
return nil, false
721+
}
722+
723+
return o.ReplicaSetScalingStrategy, true
724+
}
725+
726+
// HasReplicaSetScalingStrategy returns a boolean if a field has been set.
727+
func (o *ClusterDescription20240805) HasReplicaSetScalingStrategy() bool {
728+
if o != nil && !IsNil(o.ReplicaSetScalingStrategy) {
729+
return true
730+
}
731+
732+
return false
733+
}
734+
735+
// SetReplicaSetScalingStrategy gets a reference to the given string and assigns it to the ReplicaSetScalingStrategy field.
736+
func (o *ClusterDescription20240805) SetReplicaSetScalingStrategy(v string) {
737+
o.ReplicaSetScalingStrategy = &v
738+
}
739+
701740
// GetReplicationSpecs returns the ReplicationSpecs field value if set, zero value otherwise
702741
func (o *ClusterDescription20240805) GetReplicationSpecs() []ReplicationSpec20240805 {
703742
if o == nil || IsNil(o.ReplicationSpecs) {
@@ -944,6 +983,9 @@ func (o ClusterDescription20240805) ToMap() (map[string]interface{}, error) {
944983
if !IsNil(o.PitEnabled) {
945984
toSerialize["pitEnabled"] = o.PitEnabled
946985
}
986+
if !IsNil(o.ReplicaSetScalingStrategy) {
987+
toSerialize["replicaSetScalingStrategy"] = o.ReplicaSetScalingStrategy
988+
}
947989
if !IsNil(o.ReplicationSpecs) {
948990
toSerialize["replicationSpecs"] = o.ReplicationSpecs
949991
}

admin/model_legacy_atlas_cluster.go

+42
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ type LegacyAtlasCluster struct {
6565
// Flag that indicates whether the M10 or higher cluster can perform Cloud Backups. If set to `true`, the cluster can perform backups. If this and **backupEnabled** are set to `false`, the cluster doesn't use MongoDB Cloud backups.
6666
ProviderBackupEnabled *bool `json:"providerBackupEnabled,omitempty"`
6767
ProviderSettings *ClusterProviderSettings `json:"providerSettings,omitempty"`
68+
// Set this field to configure the replica set scaling mode for your cluster. By default, Atlas scales under WORKLOAD_TYPE. This mode allows Atlas to scale your analytics nodes in parallel to your operational nodes. When configured as SEQUENTIAL, Atlas scales all nodes sequentially. This mode is intended for steady-state workloads and applications performing latency-sensitive secondary reads. When configured as NODE_TYPE, Atlas scales your electable nodes in parallel with your read-only and analytics nodes. This mode is intended for large, dynamic workloads requiring frequent and timely cluster tier scaling. This is the fastest scaling strategy, but it might impact latency of workloads when performing extensive secondary reads.
69+
ReplicaSetScalingStrategy *string `json:"replicaSetScalingStrategy,omitempty"`
6870
// Number of members that belong to the replica set. Each member retains a copy of your databases, providing high availability and data redundancy. Use **replicationSpecs** instead.
6971
// Deprecated
7072
ReplicationFactor *int `json:"replicationFactor,omitempty"`
@@ -98,6 +100,8 @@ func NewLegacyAtlasCluster() *LegacyAtlasCluster {
98100
this.DiskWarmingMode = &diskWarmingMode
99101
var numShards int = 1
100102
this.NumShards = &numShards
103+
var replicaSetScalingStrategy string = "WORKLOAD_TYPE"
104+
this.ReplicaSetScalingStrategy = &replicaSetScalingStrategy
101105
var replicationFactor int = 3
102106
this.ReplicationFactor = &replicationFactor
103107
var rootCertType string = "ISRGROOTX1"
@@ -118,6 +122,8 @@ func NewLegacyAtlasClusterWithDefaults() *LegacyAtlasCluster {
118122
this.DiskWarmingMode = &diskWarmingMode
119123
var numShards int = 1
120124
this.NumShards = &numShards
125+
var replicaSetScalingStrategy string = "WORKLOAD_TYPE"
126+
this.ReplicaSetScalingStrategy = &replicaSetScalingStrategy
121127
var replicationFactor int = 3
122128
this.ReplicationFactor = &replicationFactor
123129
var rootCertType string = "ISRGROOTX1"
@@ -990,6 +996,39 @@ func (o *LegacyAtlasCluster) SetProviderSettings(v ClusterProviderSettings) {
990996
o.ProviderSettings = &v
991997
}
992998

999+
// GetReplicaSetScalingStrategy returns the ReplicaSetScalingStrategy field value if set, zero value otherwise
1000+
func (o *LegacyAtlasCluster) GetReplicaSetScalingStrategy() string {
1001+
if o == nil || IsNil(o.ReplicaSetScalingStrategy) {
1002+
var ret string
1003+
return ret
1004+
}
1005+
return *o.ReplicaSetScalingStrategy
1006+
}
1007+
1008+
// GetReplicaSetScalingStrategyOk returns a tuple with the ReplicaSetScalingStrategy field value if set, nil otherwise
1009+
// and a boolean to check if the value has been set.
1010+
func (o *LegacyAtlasCluster) GetReplicaSetScalingStrategyOk() (*string, bool) {
1011+
if o == nil || IsNil(o.ReplicaSetScalingStrategy) {
1012+
return nil, false
1013+
}
1014+
1015+
return o.ReplicaSetScalingStrategy, true
1016+
}
1017+
1018+
// HasReplicaSetScalingStrategy returns a boolean if a field has been set.
1019+
func (o *LegacyAtlasCluster) HasReplicaSetScalingStrategy() bool {
1020+
if o != nil && !IsNil(o.ReplicaSetScalingStrategy) {
1021+
return true
1022+
}
1023+
1024+
return false
1025+
}
1026+
1027+
// SetReplicaSetScalingStrategy gets a reference to the given string and assigns it to the ReplicaSetScalingStrategy field.
1028+
func (o *LegacyAtlasCluster) SetReplicaSetScalingStrategy(v string) {
1029+
o.ReplicaSetScalingStrategy = &v
1030+
}
1031+
9931032
// GetReplicationFactor returns the ReplicationFactor field value if set, zero value otherwise
9941033
// Deprecated
9951034
func (o *LegacyAtlasCluster) GetReplicationFactor() int {
@@ -1356,6 +1395,9 @@ func (o LegacyAtlasCluster) ToMap() (map[string]interface{}, error) {
13561395
if !IsNil(o.ProviderSettings) {
13571396
toSerialize["providerSettings"] = o.ProviderSettings
13581397
}
1398+
if !IsNil(o.ReplicaSetScalingStrategy) {
1399+
toSerialize["replicaSetScalingStrategy"] = o.ReplicaSetScalingStrategy
1400+
}
13591401
if !IsNil(o.ReplicationFactor) {
13601402
toSerialize["replicationFactor"] = o.ReplicationFactor
13611403
}

admin/model_legacy_atlas_tenant_cluster_upgrade_request.go

+42
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ type LegacyAtlasTenantClusterUpgradeRequest struct {
6565
// Flag that indicates whether the M10 or higher cluster can perform Cloud Backups. If set to `true`, the cluster can perform backups. If this and **backupEnabled** are set to `false`, the cluster doesn't use MongoDB Cloud backups.
6666
ProviderBackupEnabled *bool `json:"providerBackupEnabled,omitempty"`
6767
ProviderSettings *ClusterProviderSettings `json:"providerSettings,omitempty"`
68+
// Set this field to configure the replica set scaling mode for your cluster. By default, Atlas scales under WORKLOAD_TYPE. This mode allows Atlas to scale your analytics nodes in parallel to your operational nodes. When configured as SEQUENTIAL, Atlas scales all nodes sequentially. This mode is intended for steady-state workloads and applications performing latency-sensitive secondary reads. When configured as NODE_TYPE, Atlas scales your electable nodes in parallel with your read-only and analytics nodes. This mode is intended for large, dynamic workloads requiring frequent and timely cluster tier scaling. This is the fastest scaling strategy, but it might impact latency of workloads when performing extensive secondary reads.
69+
ReplicaSetScalingStrategy *string `json:"replicaSetScalingStrategy,omitempty"`
6870
// Number of members that belong to the replica set. Each member retains a copy of your databases, providing high availability and data redundancy. Use **replicationSpecs** instead.
6971
// Deprecated
7072
ReplicationFactor *int `json:"replicationFactor,omitempty"`
@@ -99,6 +101,8 @@ func NewLegacyAtlasTenantClusterUpgradeRequest(name string) *LegacyAtlasTenantCl
99101
this.Name = name
100102
var numShards int = 1
101103
this.NumShards = &numShards
104+
var replicaSetScalingStrategy string = "WORKLOAD_TYPE"
105+
this.ReplicaSetScalingStrategy = &replicaSetScalingStrategy
102106
var replicationFactor int = 3
103107
this.ReplicationFactor = &replicationFactor
104108
var rootCertType string = "ISRGROOTX1"
@@ -119,6 +123,8 @@ func NewLegacyAtlasTenantClusterUpgradeRequestWithDefaults() *LegacyAtlasTenantC
119123
this.DiskWarmingMode = &diskWarmingMode
120124
var numShards int = 1
121125
this.NumShards = &numShards
126+
var replicaSetScalingStrategy string = "WORKLOAD_TYPE"
127+
this.ReplicaSetScalingStrategy = &replicaSetScalingStrategy
122128
var replicationFactor int = 3
123129
this.ReplicationFactor = &replicationFactor
124130
var rootCertType string = "ISRGROOTX1"
@@ -982,6 +988,39 @@ func (o *LegacyAtlasTenantClusterUpgradeRequest) SetProviderSettings(v ClusterPr
982988
o.ProviderSettings = &v
983989
}
984990

991+
// GetReplicaSetScalingStrategy returns the ReplicaSetScalingStrategy field value if set, zero value otherwise
992+
func (o *LegacyAtlasTenantClusterUpgradeRequest) GetReplicaSetScalingStrategy() string {
993+
if o == nil || IsNil(o.ReplicaSetScalingStrategy) {
994+
var ret string
995+
return ret
996+
}
997+
return *o.ReplicaSetScalingStrategy
998+
}
999+
1000+
// GetReplicaSetScalingStrategyOk returns a tuple with the ReplicaSetScalingStrategy field value if set, nil otherwise
1001+
// and a boolean to check if the value has been set.
1002+
func (o *LegacyAtlasTenantClusterUpgradeRequest) GetReplicaSetScalingStrategyOk() (*string, bool) {
1003+
if o == nil || IsNil(o.ReplicaSetScalingStrategy) {
1004+
return nil, false
1005+
}
1006+
1007+
return o.ReplicaSetScalingStrategy, true
1008+
}
1009+
1010+
// HasReplicaSetScalingStrategy returns a boolean if a field has been set.
1011+
func (o *LegacyAtlasTenantClusterUpgradeRequest) HasReplicaSetScalingStrategy() bool {
1012+
if o != nil && !IsNil(o.ReplicaSetScalingStrategy) {
1013+
return true
1014+
}
1015+
1016+
return false
1017+
}
1018+
1019+
// SetReplicaSetScalingStrategy gets a reference to the given string and assigns it to the ReplicaSetScalingStrategy field.
1020+
func (o *LegacyAtlasTenantClusterUpgradeRequest) SetReplicaSetScalingStrategy(v string) {
1021+
o.ReplicaSetScalingStrategy = &v
1022+
}
1023+
9851024
// GetReplicationFactor returns the ReplicationFactor field value if set, zero value otherwise
9861025
// Deprecated
9871026
func (o *LegacyAtlasTenantClusterUpgradeRequest) GetReplicationFactor() int {
@@ -1346,6 +1385,9 @@ func (o LegacyAtlasTenantClusterUpgradeRequest) ToMap() (map[string]interface{},
13461385
if !IsNil(o.ProviderSettings) {
13471386
toSerialize["providerSettings"] = o.ProviderSettings
13481387
}
1388+
if !IsNil(o.ReplicaSetScalingStrategy) {
1389+
toSerialize["replicaSetScalingStrategy"] = o.ReplicaSetScalingStrategy
1390+
}
13491391
if !IsNil(o.ReplicationFactor) {
13501392
toSerialize["replicationFactor"] = o.ReplicationFactor
13511393
}

docs/docs/ClusterDescription20240805.md

+25
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Name | Type | Description | Notes
2222
**Name** | Pointer to **string** | Human-readable label that identifies the cluster. | [optional]
2323
**Paused** | Pointer to **bool** | Flag that indicates whether the cluster is paused. | [optional]
2424
**PitEnabled** | Pointer to **bool** | Flag that indicates whether the cluster uses continuous cloud backups. | [optional]
25+
**ReplicaSetScalingStrategy** | Pointer to **string** | Set this field to configure the replica set scaling mode for your cluster. By default, Atlas scales under WORKLOAD_TYPE. This mode allows Atlas to scale your analytics nodes in parallel to your operational nodes. When configured as SEQUENTIAL, Atlas scales all nodes sequentially. This mode is intended for steady-state workloads and applications performing latency-sensitive secondary reads. When configured as NODE_TYPE, Atlas scales your electable nodes in parallel with your read-only and analytics nodes. This mode is intended for large, dynamic workloads requiring frequent and timely cluster tier scaling. This is the fastest scaling strategy, but it might impact latency of workloads when performing extensive secondary reads. | [optional] [default to "WORKLOAD_TYPE"]
2526
**ReplicationSpecs** | Pointer to [**[]ReplicationSpec20240805**](ReplicationSpec20240805.md) | List of settings that configure your cluster regions. This array has one object per shard representing node configurations in each shard. For replica sets there is only one object representing node configurations. | [optional]
2627
**RootCertType** | Pointer to **string** | Root Certificate Authority that MongoDB Cloud cluster uses. MongoDB Cloud supports Internet Security Research Group. | [optional] [default to "ISRGROOTX1"]
2728
**StateName** | Pointer to **string** | Human-readable label that indicates the current operating condition of this cluster. | [optional] [readonly]
@@ -480,6 +481,30 @@ SetPitEnabled sets PitEnabled field to given value.
480481
`func (o *ClusterDescription20240805) HasPitEnabled() bool`
481482

482483
HasPitEnabled returns a boolean if a field has been set.
484+
### GetReplicaSetScalingStrategy
485+
486+
`func (o *ClusterDescription20240805) GetReplicaSetScalingStrategy() string`
487+
488+
GetReplicaSetScalingStrategy returns the ReplicaSetScalingStrategy field if non-nil, zero value otherwise.
489+
490+
### GetReplicaSetScalingStrategyOk
491+
492+
`func (o *ClusterDescription20240805) GetReplicaSetScalingStrategyOk() (*string, bool)`
493+
494+
GetReplicaSetScalingStrategyOk returns a tuple with the ReplicaSetScalingStrategy field if it's non-nil, zero value otherwise
495+
and a boolean to check if the value has been set.
496+
497+
### SetReplicaSetScalingStrategy
498+
499+
`func (o *ClusterDescription20240805) SetReplicaSetScalingStrategy(v string)`
500+
501+
SetReplicaSetScalingStrategy sets ReplicaSetScalingStrategy field to given value.
502+
503+
### HasReplicaSetScalingStrategy
504+
505+
`func (o *ClusterDescription20240805) HasReplicaSetScalingStrategy() bool`
506+
507+
HasReplicaSetScalingStrategy returns a boolean if a field has been set.
483508
### GetReplicationSpecs
484509

485510
`func (o *ClusterDescription20240805) GetReplicationSpecs() []ReplicationSpec20240805`

docs/docs/LegacyAtlasCluster.md

+25
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Name | Type | Description | Notes
3030
**PitEnabled** | Pointer to **bool** | Flag that indicates whether the cluster uses continuous cloud backups. | [optional]
3131
**ProviderBackupEnabled** | Pointer to **bool** | Flag that indicates whether the M10 or higher cluster can perform Cloud Backups. If set to &#x60;true&#x60;, the cluster can perform backups. If this and **backupEnabled** are set to &#x60;false&#x60;, the cluster doesn&#39;t use MongoDB Cloud backups. | [optional]
3232
**ProviderSettings** | Pointer to [**ClusterProviderSettings**](ClusterProviderSettings.md) | | [optional]
33+
**ReplicaSetScalingStrategy** | Pointer to **string** | Set this field to configure the replica set scaling mode for your cluster. By default, Atlas scales under WORKLOAD_TYPE. This mode allows Atlas to scale your analytics nodes in parallel to your operational nodes. When configured as SEQUENTIAL, Atlas scales all nodes sequentially. This mode is intended for steady-state workloads and applications performing latency-sensitive secondary reads. When configured as NODE_TYPE, Atlas scales your electable nodes in parallel with your read-only and analytics nodes. This mode is intended for large, dynamic workloads requiring frequent and timely cluster tier scaling. This is the fastest scaling strategy, but it might impact latency of workloads when performing extensive secondary reads. | [optional] [default to "WORKLOAD_TYPE"]
3334
**ReplicationFactor** | Pointer to **int** | Number of members that belong to the replica set. Each member retains a copy of your databases, providing high availability and data redundancy. Use **replicationSpecs** instead. | [optional] [default to 3]
3435
**ReplicationSpec** | Pointer to [**map[string]RegionSpec**](RegionSpec.md) | Physical location where MongoDB Cloud provisions cluster nodes. | [optional]
3536
**ReplicationSpecs** | Pointer to [**[]LegacyReplicationSpec**](LegacyReplicationSpec.md) | List of settings that configure your cluster regions. - For Global Clusters, each object in the array represents one zone where MongoDB Cloud deploys your clusters nodes. - For non-Global sharded clusters and replica sets, the single object represents where MongoDB Cloud deploys your clusters nodes. | [optional]
@@ -683,6 +684,30 @@ SetProviderSettings sets ProviderSettings field to given value.
683684
`func (o *LegacyAtlasCluster) HasProviderSettings() bool`
684685

685686
HasProviderSettings returns a boolean if a field has been set.
687+
### GetReplicaSetScalingStrategy
688+
689+
`func (o *LegacyAtlasCluster) GetReplicaSetScalingStrategy() string`
690+
691+
GetReplicaSetScalingStrategy returns the ReplicaSetScalingStrategy field if non-nil, zero value otherwise.
692+
693+
### GetReplicaSetScalingStrategyOk
694+
695+
`func (o *LegacyAtlasCluster) GetReplicaSetScalingStrategyOk() (*string, bool)`
696+
697+
GetReplicaSetScalingStrategyOk returns a tuple with the ReplicaSetScalingStrategy field if it's non-nil, zero value otherwise
698+
and a boolean to check if the value has been set.
699+
700+
### SetReplicaSetScalingStrategy
701+
702+
`func (o *LegacyAtlasCluster) SetReplicaSetScalingStrategy(v string)`
703+
704+
SetReplicaSetScalingStrategy sets ReplicaSetScalingStrategy field to given value.
705+
706+
### HasReplicaSetScalingStrategy
707+
708+
`func (o *LegacyAtlasCluster) HasReplicaSetScalingStrategy() bool`
709+
710+
HasReplicaSetScalingStrategy returns a boolean if a field has been set.
686711
### GetReplicationFactor
687712

688713
`func (o *LegacyAtlasCluster) GetReplicationFactor() int`

0 commit comments

Comments
 (0)