Skip to content

Commit

Permalink
APIBot: SDK update based on recent changes in Atlas API (#391)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: wtrocki <[email protected]>
  • Loading branch information
3 people authored Oct 1, 2024
1 parent aeffa33 commit 8e2c9c7
Show file tree
Hide file tree
Showing 9 changed files with 556 additions and 6 deletions.
80 changes: 79 additions & 1 deletion admin/model_cluster_description20240805.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ type ClusterDescription20240805 struct {
BackupEnabled *bool `json:"backupEnabled,omitempty"`
BiConnector *BiConnector `json:"biConnector,omitempty"`
// Configuration of nodes that comprise the cluster.
ClusterType *string `json:"clusterType,omitempty"`
ClusterType *string `json:"clusterType,omitempty"`
// 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.
ConfigServerManagementMode *string `json:"configServerManagementMode,omitempty"`
// Describes a sharded cluster's config server type.
// Read only field.
ConfigServerType *string `json:"configServerType,omitempty"`
ConnectionStrings *ClusterConnectionStrings `json:"connectionStrings,omitempty"`
// Date and time when MongoDB Cloud created this cluster. This parameter expresses its value in ISO 8601 format in UTC.
// Read only field.
Expand Down Expand Up @@ -81,6 +86,8 @@ func NewClusterDescription20240805() *ClusterDescription20240805 {
this := ClusterDescription20240805{}
var backupEnabled bool = false
this.BackupEnabled = &backupEnabled
var configServerManagementMode string = "ATLAS_MANAGED"
this.ConfigServerManagementMode = &configServerManagementMode
var diskWarmingMode string = "FULLY_WARMED"
this.DiskWarmingMode = &diskWarmingMode
var replicaSetScalingStrategy string = "WORKLOAD_TYPE"
Expand All @@ -101,6 +108,8 @@ func NewClusterDescription20240805WithDefaults() *ClusterDescription20240805 {
this := ClusterDescription20240805{}
var backupEnabled bool = false
this.BackupEnabled = &backupEnabled
var configServerManagementMode string = "ATLAS_MANAGED"
this.ConfigServerManagementMode = &configServerManagementMode
var diskWarmingMode string = "FULLY_WARMED"
this.DiskWarmingMode = &diskWarmingMode
var replicaSetScalingStrategy string = "WORKLOAD_TYPE"
Expand Down Expand Up @@ -246,6 +255,72 @@ func (o *ClusterDescription20240805) SetClusterType(v string) {
o.ClusterType = &v
}

// GetConfigServerManagementMode returns the ConfigServerManagementMode field value if set, zero value otherwise
func (o *ClusterDescription20240805) GetConfigServerManagementMode() string {
if o == nil || IsNil(o.ConfigServerManagementMode) {
var ret string
return ret
}
return *o.ConfigServerManagementMode
}

// GetConfigServerManagementModeOk returns a tuple with the ConfigServerManagementMode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ClusterDescription20240805) GetConfigServerManagementModeOk() (*string, bool) {
if o == nil || IsNil(o.ConfigServerManagementMode) {
return nil, false
}

return o.ConfigServerManagementMode, true
}

// HasConfigServerManagementMode returns a boolean if a field has been set.
func (o *ClusterDescription20240805) HasConfigServerManagementMode() bool {
if o != nil && !IsNil(o.ConfigServerManagementMode) {
return true
}

return false
}

// SetConfigServerManagementMode gets a reference to the given string and assigns it to the ConfigServerManagementMode field.
func (o *ClusterDescription20240805) SetConfigServerManagementMode(v string) {
o.ConfigServerManagementMode = &v
}

// GetConfigServerType returns the ConfigServerType field value if set, zero value otherwise
func (o *ClusterDescription20240805) GetConfigServerType() string {
if o == nil || IsNil(o.ConfigServerType) {
var ret string
return ret
}
return *o.ConfigServerType
}

// GetConfigServerTypeOk returns a tuple with the ConfigServerType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ClusterDescription20240805) GetConfigServerTypeOk() (*string, bool) {
if o == nil || IsNil(o.ConfigServerType) {
return nil, false
}

return o.ConfigServerType, true
}

// HasConfigServerType returns a boolean if a field has been set.
func (o *ClusterDescription20240805) HasConfigServerType() bool {
if o != nil && !IsNil(o.ConfigServerType) {
return true
}

return false
}

// SetConfigServerType gets a reference to the given string and assigns it to the ConfigServerType field.
func (o *ClusterDescription20240805) SetConfigServerType(v string) {
o.ConfigServerType = &v
}

// GetConnectionStrings returns the ConnectionStrings field value if set, zero value otherwise
func (o *ClusterDescription20240805) GetConnectionStrings() ClusterConnectionStrings {
if o == nil || IsNil(o.ConnectionStrings) {
Expand Down Expand Up @@ -1062,6 +1137,9 @@ func (o ClusterDescription20240805) ToMap() (map[string]interface{}, error) {
if !IsNil(o.ClusterType) {
toSerialize["clusterType"] = o.ClusterType
}
if !IsNil(o.ConfigServerManagementMode) {
toSerialize["configServerManagementMode"] = o.ConfigServerManagementMode
}
if !IsNil(o.ConnectionStrings) {
toSerialize["connectionStrings"] = o.ConnectionStrings
}
Expand Down
80 changes: 79 additions & 1 deletion admin/model_legacy_atlas_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ type LegacyAtlasCluster struct {
BackupEnabled *bool `json:"backupEnabled,omitempty"`
BiConnector *BiConnector `json:"biConnector,omitempty"`
// Configuration of nodes that comprise the cluster.
ClusterType *string `json:"clusterType,omitempty"`
ClusterType *string `json:"clusterType,omitempty"`
// 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.
ConfigServerManagementMode *string `json:"configServerManagementMode,omitempty"`
// Describes a sharded cluster's config server type.
// Read only field.
ConfigServerType *string `json:"configServerType,omitempty"`
ConnectionStrings *ClusterConnectionStrings `json:"connectionStrings,omitempty"`
// Date and time when MongoDB Cloud created this serverless instance. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
// Read only field.
Expand Down Expand Up @@ -103,6 +108,8 @@ type LegacyAtlasCluster struct {
// will change when the set of required properties is changed
func NewLegacyAtlasCluster() *LegacyAtlasCluster {
this := LegacyAtlasCluster{}
var configServerManagementMode string = "ATLAS_MANAGED"
this.ConfigServerManagementMode = &configServerManagementMode
var diskWarmingMode string = "FULLY_WARMED"
this.DiskWarmingMode = &diskWarmingMode
var numShards int = 1
Expand All @@ -125,6 +132,8 @@ func NewLegacyAtlasCluster() *LegacyAtlasCluster {
// but it doesn't guarantee that properties required by API are set
func NewLegacyAtlasClusterWithDefaults() *LegacyAtlasCluster {
this := LegacyAtlasCluster{}
var configServerManagementMode string = "ATLAS_MANAGED"
this.ConfigServerManagementMode = &configServerManagementMode
var diskWarmingMode string = "FULLY_WARMED"
this.DiskWarmingMode = &diskWarmingMode
var numShards int = 1
Expand Down Expand Up @@ -307,6 +316,72 @@ func (o *LegacyAtlasCluster) SetClusterType(v string) {
o.ClusterType = &v
}

// GetConfigServerManagementMode returns the ConfigServerManagementMode field value if set, zero value otherwise
func (o *LegacyAtlasCluster) GetConfigServerManagementMode() string {
if o == nil || IsNil(o.ConfigServerManagementMode) {
var ret string
return ret
}
return *o.ConfigServerManagementMode
}

// GetConfigServerManagementModeOk returns a tuple with the ConfigServerManagementMode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LegacyAtlasCluster) GetConfigServerManagementModeOk() (*string, bool) {
if o == nil || IsNil(o.ConfigServerManagementMode) {
return nil, false
}

return o.ConfigServerManagementMode, true
}

// HasConfigServerManagementMode returns a boolean if a field has been set.
func (o *LegacyAtlasCluster) HasConfigServerManagementMode() bool {
if o != nil && !IsNil(o.ConfigServerManagementMode) {
return true
}

return false
}

// SetConfigServerManagementMode gets a reference to the given string and assigns it to the ConfigServerManagementMode field.
func (o *LegacyAtlasCluster) SetConfigServerManagementMode(v string) {
o.ConfigServerManagementMode = &v
}

// GetConfigServerType returns the ConfigServerType field value if set, zero value otherwise
func (o *LegacyAtlasCluster) GetConfigServerType() string {
if o == nil || IsNil(o.ConfigServerType) {
var ret string
return ret
}
return *o.ConfigServerType
}

// GetConfigServerTypeOk returns a tuple with the ConfigServerType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LegacyAtlasCluster) GetConfigServerTypeOk() (*string, bool) {
if o == nil || IsNil(o.ConfigServerType) {
return nil, false
}

return o.ConfigServerType, true
}

// HasConfigServerType returns a boolean if a field has been set.
func (o *LegacyAtlasCluster) HasConfigServerType() bool {
if o != nil && !IsNil(o.ConfigServerType) {
return true
}

return false
}

// SetConfigServerType gets a reference to the given string and assigns it to the ConfigServerType field.
func (o *LegacyAtlasCluster) SetConfigServerType(v string) {
o.ConfigServerType = &v
}

// GetConnectionStrings returns the ConnectionStrings field value if set, zero value otherwise
func (o *LegacyAtlasCluster) GetConnectionStrings() ClusterConnectionStrings {
if o == nil || IsNil(o.ConnectionStrings) {
Expand Down Expand Up @@ -1459,6 +1534,9 @@ func (o LegacyAtlasCluster) ToMap() (map[string]interface{}, error) {
if !IsNil(o.ClusterType) {
toSerialize["clusterType"] = o.ClusterType
}
if !IsNil(o.ConfigServerManagementMode) {
toSerialize["configServerManagementMode"] = o.ConfigServerManagementMode
}
if !IsNil(o.ConnectionStrings) {
toSerialize["connectionStrings"] = o.ConnectionStrings
}
Expand Down
80 changes: 79 additions & 1 deletion admin/model_legacy_atlas_tenant_cluster_upgrade_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ type LegacyAtlasTenantClusterUpgradeRequest struct {
BackupEnabled *bool `json:"backupEnabled,omitempty"`
BiConnector *BiConnector `json:"biConnector,omitempty"`
// Configuration of nodes that comprise the cluster.
ClusterType *string `json:"clusterType,omitempty"`
ClusterType *string `json:"clusterType,omitempty"`
// 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.
ConfigServerManagementMode *string `json:"configServerManagementMode,omitempty"`
// Describes a sharded cluster's config server type.
// Read only field.
ConfigServerType *string `json:"configServerType,omitempty"`
ConnectionStrings *ClusterConnectionStrings `json:"connectionStrings,omitempty"`
// Date and time when MongoDB Cloud created this serverless instance. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
// Read only field.
Expand Down Expand Up @@ -103,6 +108,8 @@ type LegacyAtlasTenantClusterUpgradeRequest struct {
// will change when the set of required properties is changed
func NewLegacyAtlasTenantClusterUpgradeRequest(name string) *LegacyAtlasTenantClusterUpgradeRequest {
this := LegacyAtlasTenantClusterUpgradeRequest{}
var configServerManagementMode string = "ATLAS_MANAGED"
this.ConfigServerManagementMode = &configServerManagementMode
var diskWarmingMode string = "FULLY_WARMED"
this.DiskWarmingMode = &diskWarmingMode
this.Name = name
Expand All @@ -126,6 +133,8 @@ func NewLegacyAtlasTenantClusterUpgradeRequest(name string) *LegacyAtlasTenantCl
// but it doesn't guarantee that properties required by API are set
func NewLegacyAtlasTenantClusterUpgradeRequestWithDefaults() *LegacyAtlasTenantClusterUpgradeRequest {
this := LegacyAtlasTenantClusterUpgradeRequest{}
var configServerManagementMode string = "ATLAS_MANAGED"
this.ConfigServerManagementMode = &configServerManagementMode
var diskWarmingMode string = "FULLY_WARMED"
this.DiskWarmingMode = &diskWarmingMode
var numShards int = 1
Expand Down Expand Up @@ -308,6 +317,72 @@ func (o *LegacyAtlasTenantClusterUpgradeRequest) SetClusterType(v string) {
o.ClusterType = &v
}

// GetConfigServerManagementMode returns the ConfigServerManagementMode field value if set, zero value otherwise
func (o *LegacyAtlasTenantClusterUpgradeRequest) GetConfigServerManagementMode() string {
if o == nil || IsNil(o.ConfigServerManagementMode) {
var ret string
return ret
}
return *o.ConfigServerManagementMode
}

// GetConfigServerManagementModeOk returns a tuple with the ConfigServerManagementMode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LegacyAtlasTenantClusterUpgradeRequest) GetConfigServerManagementModeOk() (*string, bool) {
if o == nil || IsNil(o.ConfigServerManagementMode) {
return nil, false
}

return o.ConfigServerManagementMode, true
}

// HasConfigServerManagementMode returns a boolean if a field has been set.
func (o *LegacyAtlasTenantClusterUpgradeRequest) HasConfigServerManagementMode() bool {
if o != nil && !IsNil(o.ConfigServerManagementMode) {
return true
}

return false
}

// SetConfigServerManagementMode gets a reference to the given string and assigns it to the ConfigServerManagementMode field.
func (o *LegacyAtlasTenantClusterUpgradeRequest) SetConfigServerManagementMode(v string) {
o.ConfigServerManagementMode = &v
}

// GetConfigServerType returns the ConfigServerType field value if set, zero value otherwise
func (o *LegacyAtlasTenantClusterUpgradeRequest) GetConfigServerType() string {
if o == nil || IsNil(o.ConfigServerType) {
var ret string
return ret
}
return *o.ConfigServerType
}

// GetConfigServerTypeOk returns a tuple with the ConfigServerType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LegacyAtlasTenantClusterUpgradeRequest) GetConfigServerTypeOk() (*string, bool) {
if o == nil || IsNil(o.ConfigServerType) {
return nil, false
}

return o.ConfigServerType, true
}

// HasConfigServerType returns a boolean if a field has been set.
func (o *LegacyAtlasTenantClusterUpgradeRequest) HasConfigServerType() bool {
if o != nil && !IsNil(o.ConfigServerType) {
return true
}

return false
}

// SetConfigServerType gets a reference to the given string and assigns it to the ConfigServerType field.
func (o *LegacyAtlasTenantClusterUpgradeRequest) SetConfigServerType(v string) {
o.ConfigServerType = &v
}

// GetConnectionStrings returns the ConnectionStrings field value if set, zero value otherwise
func (o *LegacyAtlasTenantClusterUpgradeRequest) GetConnectionStrings() ClusterConnectionStrings {
if o == nil || IsNil(o.ConnectionStrings) {
Expand Down Expand Up @@ -1451,6 +1526,9 @@ func (o LegacyAtlasTenantClusterUpgradeRequest) ToMap() (map[string]interface{},
if !IsNil(o.ClusterType) {
toSerialize["clusterType"] = o.ClusterType
}
if !IsNil(o.ConfigServerManagementMode) {
toSerialize["configServerManagementMode"] = o.ConfigServerManagementMode
}
if !IsNil(o.ConnectionStrings) {
toSerialize["connectionStrings"] = o.ConnectionStrings
}
Expand Down
Loading

0 comments on commit 8e2c9c7

Please sign in to comment.