Skip to content

Commit 8e2c9c7

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

9 files changed

+556
-6
lines changed

admin/model_cluster_description20240805.go

+79-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ type ClusterDescription20240805 struct {
1515
BackupEnabled *bool `json:"backupEnabled,omitempty"`
1616
BiConnector *BiConnector `json:"biConnector,omitempty"`
1717
// Configuration of nodes that comprise the cluster.
18-
ClusterType *string `json:"clusterType,omitempty"`
18+
ClusterType *string `json:"clusterType,omitempty"`
19+
// Config Server Management Mode for creating or updating a sharded cluster. When configured as ATLAS_MANAGED, atlas may automatically switch the cluster's config server type for optimal performance and savings. When configured as FIXED_TO_DEDICATED, the cluster will always use a dedicated config server.
20+
ConfigServerManagementMode *string `json:"configServerManagementMode,omitempty"`
21+
// Describes a sharded cluster's config server type.
22+
// Read only field.
23+
ConfigServerType *string `json:"configServerType,omitempty"`
1924
ConnectionStrings *ClusterConnectionStrings `json:"connectionStrings,omitempty"`
2025
// Date and time when MongoDB Cloud created this cluster. This parameter expresses its value in ISO 8601 format in UTC.
2126
// Read only field.
@@ -81,6 +86,8 @@ func NewClusterDescription20240805() *ClusterDescription20240805 {
8186
this := ClusterDescription20240805{}
8287
var backupEnabled bool = false
8388
this.BackupEnabled = &backupEnabled
89+
var configServerManagementMode string = "ATLAS_MANAGED"
90+
this.ConfigServerManagementMode = &configServerManagementMode
8491
var diskWarmingMode string = "FULLY_WARMED"
8592
this.DiskWarmingMode = &diskWarmingMode
8693
var replicaSetScalingStrategy string = "WORKLOAD_TYPE"
@@ -101,6 +108,8 @@ func NewClusterDescription20240805WithDefaults() *ClusterDescription20240805 {
101108
this := ClusterDescription20240805{}
102109
var backupEnabled bool = false
103110
this.BackupEnabled = &backupEnabled
111+
var configServerManagementMode string = "ATLAS_MANAGED"
112+
this.ConfigServerManagementMode = &configServerManagementMode
104113
var diskWarmingMode string = "FULLY_WARMED"
105114
this.DiskWarmingMode = &diskWarmingMode
106115
var replicaSetScalingStrategy string = "WORKLOAD_TYPE"
@@ -246,6 +255,72 @@ func (o *ClusterDescription20240805) SetClusterType(v string) {
246255
o.ClusterType = &v
247256
}
248257

258+
// GetConfigServerManagementMode returns the ConfigServerManagementMode field value if set, zero value otherwise
259+
func (o *ClusterDescription20240805) GetConfigServerManagementMode() string {
260+
if o == nil || IsNil(o.ConfigServerManagementMode) {
261+
var ret string
262+
return ret
263+
}
264+
return *o.ConfigServerManagementMode
265+
}
266+
267+
// GetConfigServerManagementModeOk returns a tuple with the ConfigServerManagementMode field value if set, nil otherwise
268+
// and a boolean to check if the value has been set.
269+
func (o *ClusterDescription20240805) GetConfigServerManagementModeOk() (*string, bool) {
270+
if o == nil || IsNil(o.ConfigServerManagementMode) {
271+
return nil, false
272+
}
273+
274+
return o.ConfigServerManagementMode, true
275+
}
276+
277+
// HasConfigServerManagementMode returns a boolean if a field has been set.
278+
func (o *ClusterDescription20240805) HasConfigServerManagementMode() bool {
279+
if o != nil && !IsNil(o.ConfigServerManagementMode) {
280+
return true
281+
}
282+
283+
return false
284+
}
285+
286+
// SetConfigServerManagementMode gets a reference to the given string and assigns it to the ConfigServerManagementMode field.
287+
func (o *ClusterDescription20240805) SetConfigServerManagementMode(v string) {
288+
o.ConfigServerManagementMode = &v
289+
}
290+
291+
// GetConfigServerType returns the ConfigServerType field value if set, zero value otherwise
292+
func (o *ClusterDescription20240805) GetConfigServerType() string {
293+
if o == nil || IsNil(o.ConfigServerType) {
294+
var ret string
295+
return ret
296+
}
297+
return *o.ConfigServerType
298+
}
299+
300+
// GetConfigServerTypeOk returns a tuple with the ConfigServerType field value if set, nil otherwise
301+
// and a boolean to check if the value has been set.
302+
func (o *ClusterDescription20240805) GetConfigServerTypeOk() (*string, bool) {
303+
if o == nil || IsNil(o.ConfigServerType) {
304+
return nil, false
305+
}
306+
307+
return o.ConfigServerType, true
308+
}
309+
310+
// HasConfigServerType returns a boolean if a field has been set.
311+
func (o *ClusterDescription20240805) HasConfigServerType() bool {
312+
if o != nil && !IsNil(o.ConfigServerType) {
313+
return true
314+
}
315+
316+
return false
317+
}
318+
319+
// SetConfigServerType gets a reference to the given string and assigns it to the ConfigServerType field.
320+
func (o *ClusterDescription20240805) SetConfigServerType(v string) {
321+
o.ConfigServerType = &v
322+
}
323+
249324
// GetConnectionStrings returns the ConnectionStrings field value if set, zero value otherwise
250325
func (o *ClusterDescription20240805) GetConnectionStrings() ClusterConnectionStrings {
251326
if o == nil || IsNil(o.ConnectionStrings) {
@@ -1062,6 +1137,9 @@ func (o ClusterDescription20240805) ToMap() (map[string]interface{}, error) {
10621137
if !IsNil(o.ClusterType) {
10631138
toSerialize["clusterType"] = o.ClusterType
10641139
}
1140+
if !IsNil(o.ConfigServerManagementMode) {
1141+
toSerialize["configServerManagementMode"] = o.ConfigServerManagementMode
1142+
}
10651143
if !IsNil(o.ConnectionStrings) {
10661144
toSerialize["connectionStrings"] = o.ConnectionStrings
10671145
}

admin/model_legacy_atlas_cluster.go

+79-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ type LegacyAtlasCluster struct {
1616
BackupEnabled *bool `json:"backupEnabled,omitempty"`
1717
BiConnector *BiConnector `json:"biConnector,omitempty"`
1818
// Configuration of nodes that comprise the cluster.
19-
ClusterType *string `json:"clusterType,omitempty"`
19+
ClusterType *string `json:"clusterType,omitempty"`
20+
// Config Server Management Mode for creating or updating a sharded cluster. When configured as ATLAS_MANAGED, atlas may automatically switch the cluster's config server type for optimal performance and savings. When configured as FIXED_TO_DEDICATED, the cluster will always use a dedicated config server.
21+
ConfigServerManagementMode *string `json:"configServerManagementMode,omitempty"`
22+
// Describes a sharded cluster's config server type.
23+
// Read only field.
24+
ConfigServerType *string `json:"configServerType,omitempty"`
2025
ConnectionStrings *ClusterConnectionStrings `json:"connectionStrings,omitempty"`
2126
// Date and time when MongoDB Cloud created this serverless instance. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
2227
// Read only field.
@@ -103,6 +108,8 @@ type LegacyAtlasCluster struct {
103108
// will change when the set of required properties is changed
104109
func NewLegacyAtlasCluster() *LegacyAtlasCluster {
105110
this := LegacyAtlasCluster{}
111+
var configServerManagementMode string = "ATLAS_MANAGED"
112+
this.ConfigServerManagementMode = &configServerManagementMode
106113
var diskWarmingMode string = "FULLY_WARMED"
107114
this.DiskWarmingMode = &diskWarmingMode
108115
var numShards int = 1
@@ -125,6 +132,8 @@ func NewLegacyAtlasCluster() *LegacyAtlasCluster {
125132
// but it doesn't guarantee that properties required by API are set
126133
func NewLegacyAtlasClusterWithDefaults() *LegacyAtlasCluster {
127134
this := LegacyAtlasCluster{}
135+
var configServerManagementMode string = "ATLAS_MANAGED"
136+
this.ConfigServerManagementMode = &configServerManagementMode
128137
var diskWarmingMode string = "FULLY_WARMED"
129138
this.DiskWarmingMode = &diskWarmingMode
130139
var numShards int = 1
@@ -307,6 +316,72 @@ func (o *LegacyAtlasCluster) SetClusterType(v string) {
307316
o.ClusterType = &v
308317
}
309318

319+
// GetConfigServerManagementMode returns the ConfigServerManagementMode field value if set, zero value otherwise
320+
func (o *LegacyAtlasCluster) GetConfigServerManagementMode() string {
321+
if o == nil || IsNil(o.ConfigServerManagementMode) {
322+
var ret string
323+
return ret
324+
}
325+
return *o.ConfigServerManagementMode
326+
}
327+
328+
// GetConfigServerManagementModeOk returns a tuple with the ConfigServerManagementMode field value if set, nil otherwise
329+
// and a boolean to check if the value has been set.
330+
func (o *LegacyAtlasCluster) GetConfigServerManagementModeOk() (*string, bool) {
331+
if o == nil || IsNil(o.ConfigServerManagementMode) {
332+
return nil, false
333+
}
334+
335+
return o.ConfigServerManagementMode, true
336+
}
337+
338+
// HasConfigServerManagementMode returns a boolean if a field has been set.
339+
func (o *LegacyAtlasCluster) HasConfigServerManagementMode() bool {
340+
if o != nil && !IsNil(o.ConfigServerManagementMode) {
341+
return true
342+
}
343+
344+
return false
345+
}
346+
347+
// SetConfigServerManagementMode gets a reference to the given string and assigns it to the ConfigServerManagementMode field.
348+
func (o *LegacyAtlasCluster) SetConfigServerManagementMode(v string) {
349+
o.ConfigServerManagementMode = &v
350+
}
351+
352+
// GetConfigServerType returns the ConfigServerType field value if set, zero value otherwise
353+
func (o *LegacyAtlasCluster) GetConfigServerType() string {
354+
if o == nil || IsNil(o.ConfigServerType) {
355+
var ret string
356+
return ret
357+
}
358+
return *o.ConfigServerType
359+
}
360+
361+
// GetConfigServerTypeOk returns a tuple with the ConfigServerType field value if set, nil otherwise
362+
// and a boolean to check if the value has been set.
363+
func (o *LegacyAtlasCluster) GetConfigServerTypeOk() (*string, bool) {
364+
if o == nil || IsNil(o.ConfigServerType) {
365+
return nil, false
366+
}
367+
368+
return o.ConfigServerType, true
369+
}
370+
371+
// HasConfigServerType returns a boolean if a field has been set.
372+
func (o *LegacyAtlasCluster) HasConfigServerType() bool {
373+
if o != nil && !IsNil(o.ConfigServerType) {
374+
return true
375+
}
376+
377+
return false
378+
}
379+
380+
// SetConfigServerType gets a reference to the given string and assigns it to the ConfigServerType field.
381+
func (o *LegacyAtlasCluster) SetConfigServerType(v string) {
382+
o.ConfigServerType = &v
383+
}
384+
310385
// GetConnectionStrings returns the ConnectionStrings field value if set, zero value otherwise
311386
func (o *LegacyAtlasCluster) GetConnectionStrings() ClusterConnectionStrings {
312387
if o == nil || IsNil(o.ConnectionStrings) {
@@ -1459,6 +1534,9 @@ func (o LegacyAtlasCluster) ToMap() (map[string]interface{}, error) {
14591534
if !IsNil(o.ClusterType) {
14601535
toSerialize["clusterType"] = o.ClusterType
14611536
}
1537+
if !IsNil(o.ConfigServerManagementMode) {
1538+
toSerialize["configServerManagementMode"] = o.ConfigServerManagementMode
1539+
}
14621540
if !IsNil(o.ConnectionStrings) {
14631541
toSerialize["connectionStrings"] = o.ConnectionStrings
14641542
}

admin/model_legacy_atlas_tenant_cluster_upgrade_request.go

+79-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ type LegacyAtlasTenantClusterUpgradeRequest struct {
1616
BackupEnabled *bool `json:"backupEnabled,omitempty"`
1717
BiConnector *BiConnector `json:"biConnector,omitempty"`
1818
// Configuration of nodes that comprise the cluster.
19-
ClusterType *string `json:"clusterType,omitempty"`
19+
ClusterType *string `json:"clusterType,omitempty"`
20+
// Config Server Management Mode for creating or updating a sharded cluster. When configured as ATLAS_MANAGED, atlas may automatically switch the cluster's config server type for optimal performance and savings. When configured as FIXED_TO_DEDICATED, the cluster will always use a dedicated config server.
21+
ConfigServerManagementMode *string `json:"configServerManagementMode,omitempty"`
22+
// Describes a sharded cluster's config server type.
23+
// Read only field.
24+
ConfigServerType *string `json:"configServerType,omitempty"`
2025
ConnectionStrings *ClusterConnectionStrings `json:"connectionStrings,omitempty"`
2126
// Date and time when MongoDB Cloud created this serverless instance. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
2227
// Read only field.
@@ -103,6 +108,8 @@ type LegacyAtlasTenantClusterUpgradeRequest struct {
103108
// will change when the set of required properties is changed
104109
func NewLegacyAtlasTenantClusterUpgradeRequest(name string) *LegacyAtlasTenantClusterUpgradeRequest {
105110
this := LegacyAtlasTenantClusterUpgradeRequest{}
111+
var configServerManagementMode string = "ATLAS_MANAGED"
112+
this.ConfigServerManagementMode = &configServerManagementMode
106113
var diskWarmingMode string = "FULLY_WARMED"
107114
this.DiskWarmingMode = &diskWarmingMode
108115
this.Name = name
@@ -126,6 +133,8 @@ func NewLegacyAtlasTenantClusterUpgradeRequest(name string) *LegacyAtlasTenantCl
126133
// but it doesn't guarantee that properties required by API are set
127134
func NewLegacyAtlasTenantClusterUpgradeRequestWithDefaults() *LegacyAtlasTenantClusterUpgradeRequest {
128135
this := LegacyAtlasTenantClusterUpgradeRequest{}
136+
var configServerManagementMode string = "ATLAS_MANAGED"
137+
this.ConfigServerManagementMode = &configServerManagementMode
129138
var diskWarmingMode string = "FULLY_WARMED"
130139
this.DiskWarmingMode = &diskWarmingMode
131140
var numShards int = 1
@@ -308,6 +317,72 @@ func (o *LegacyAtlasTenantClusterUpgradeRequest) SetClusterType(v string) {
308317
o.ClusterType = &v
309318
}
310319

320+
// GetConfigServerManagementMode returns the ConfigServerManagementMode field value if set, zero value otherwise
321+
func (o *LegacyAtlasTenantClusterUpgradeRequest) GetConfigServerManagementMode() string {
322+
if o == nil || IsNil(o.ConfigServerManagementMode) {
323+
var ret string
324+
return ret
325+
}
326+
return *o.ConfigServerManagementMode
327+
}
328+
329+
// GetConfigServerManagementModeOk returns a tuple with the ConfigServerManagementMode field value if set, nil otherwise
330+
// and a boolean to check if the value has been set.
331+
func (o *LegacyAtlasTenantClusterUpgradeRequest) GetConfigServerManagementModeOk() (*string, bool) {
332+
if o == nil || IsNil(o.ConfigServerManagementMode) {
333+
return nil, false
334+
}
335+
336+
return o.ConfigServerManagementMode, true
337+
}
338+
339+
// HasConfigServerManagementMode returns a boolean if a field has been set.
340+
func (o *LegacyAtlasTenantClusterUpgradeRequest) HasConfigServerManagementMode() bool {
341+
if o != nil && !IsNil(o.ConfigServerManagementMode) {
342+
return true
343+
}
344+
345+
return false
346+
}
347+
348+
// SetConfigServerManagementMode gets a reference to the given string and assigns it to the ConfigServerManagementMode field.
349+
func (o *LegacyAtlasTenantClusterUpgradeRequest) SetConfigServerManagementMode(v string) {
350+
o.ConfigServerManagementMode = &v
351+
}
352+
353+
// GetConfigServerType returns the ConfigServerType field value if set, zero value otherwise
354+
func (o *LegacyAtlasTenantClusterUpgradeRequest) GetConfigServerType() string {
355+
if o == nil || IsNil(o.ConfigServerType) {
356+
var ret string
357+
return ret
358+
}
359+
return *o.ConfigServerType
360+
}
361+
362+
// GetConfigServerTypeOk returns a tuple with the ConfigServerType field value if set, nil otherwise
363+
// and a boolean to check if the value has been set.
364+
func (o *LegacyAtlasTenantClusterUpgradeRequest) GetConfigServerTypeOk() (*string, bool) {
365+
if o == nil || IsNil(o.ConfigServerType) {
366+
return nil, false
367+
}
368+
369+
return o.ConfigServerType, true
370+
}
371+
372+
// HasConfigServerType returns a boolean if a field has been set.
373+
func (o *LegacyAtlasTenantClusterUpgradeRequest) HasConfigServerType() bool {
374+
if o != nil && !IsNil(o.ConfigServerType) {
375+
return true
376+
}
377+
378+
return false
379+
}
380+
381+
// SetConfigServerType gets a reference to the given string and assigns it to the ConfigServerType field.
382+
func (o *LegacyAtlasTenantClusterUpgradeRequest) SetConfigServerType(v string) {
383+
o.ConfigServerType = &v
384+
}
385+
311386
// GetConnectionStrings returns the ConnectionStrings field value if set, zero value otherwise
312387
func (o *LegacyAtlasTenantClusterUpgradeRequest) GetConnectionStrings() ClusterConnectionStrings {
313388
if o == nil || IsNil(o.ConnectionStrings) {
@@ -1451,6 +1526,9 @@ func (o LegacyAtlasTenantClusterUpgradeRequest) ToMap() (map[string]interface{},
14511526
if !IsNil(o.ClusterType) {
14521527
toSerialize["clusterType"] = o.ClusterType
14531528
}
1529+
if !IsNil(o.ConfigServerManagementMode) {
1530+
toSerialize["configServerManagementMode"] = o.ConfigServerManagementMode
1531+
}
14541532
if !IsNil(o.ConnectionStrings) {
14551533
toSerialize["connectionStrings"] = o.ConnectionStrings
14561534
}

0 commit comments

Comments
 (0)