Skip to content

Commit 7bc68c5

Browse files
CLOUDP-132967: add the ability to use yaml file for advance cluster (#307)
1 parent 25681b6 commit 7bc68c5

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

mongodbatlas/advanced_clusters.go

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -43,66 +43,66 @@ var _ AdvancedClustersService = &AdvancedClustersServiceOp{}
4343

4444
// AdvancedCluster represents MongoDB cluster.
4545
type AdvancedCluster struct {
46-
BackupEnabled *bool `json:"backupEnabled,omitempty"`
47-
BiConnector *BiConnector `json:"biConnector,omitempty"`
48-
ClusterType string `json:"clusterType,omitempty"`
49-
ConnectionStrings *ConnectionStrings `json:"connectionStrings,omitempty"`
50-
DiskSizeGB *float64 `json:"diskSizeGB,omitempty"`
51-
EncryptionAtRestProvider string `json:"encryptionAtRestProvider,omitempty"`
52-
GroupID string `json:"groupId,omitempty"`
53-
ID string `json:"id,omitempty"`
54-
Labels []Label `json:"labels,omitempty"`
55-
MongoDBMajorVersion string `json:"mongoDBMajorVersion,omitempty"`
56-
MongoDBVersion string `json:"mongoDBVersion,omitempty"`
57-
Name string `json:"name,omitempty"`
58-
Paused *bool `json:"paused,omitempty"`
59-
PitEnabled *bool `json:"pitEnabled,omitempty"`
60-
StateName string `json:"stateName,omitempty"`
61-
ReplicationSpecs []*AdvancedReplicationSpec `json:"replicationSpecs,omitempty"`
62-
CreateDate string `json:"createDate,omitempty"`
63-
RootCertType string `json:"rootCertType,omitempty"`
64-
VersionReleaseSystem string `json:"versionReleaseSystem,omitempty"`
46+
BackupEnabled *bool `yaml:"backupEnabled,omitempty" json:"backupEnabled,omitempty"`
47+
BiConnector *BiConnector `yaml:"biConnector,omitempty" json:"biConnector,omitempty"`
48+
ClusterType string `yaml:"clusterType,omitempty" json:"clusterType,omitempty"`
49+
ConnectionStrings *ConnectionStrings `yaml:"connectionStrings,omitempty" json:"connectionStrings,omitempty"`
50+
DiskSizeGB *float64 `yaml:"diskSizeGB,omitempty" json:"diskSizeGB,omitempty"`
51+
EncryptionAtRestProvider string `yaml:"encryptionAtRestProvider,omitempty" json:"encryptionAtRestProvider,omitempty"`
52+
GroupID string `yaml:"groupId,omitempty" json:"groupId,omitempty"`
53+
ID string `yaml:"id,omitempty" json:"id,omitempty"`
54+
Labels []Label `yaml:"labels,omitempty" json:"labels,omitempty"`
55+
MongoDBMajorVersion string `yaml:"mongoDBMajorVersion,omitempty" json:"mongoDBMajorVersion,omitempty"`
56+
MongoDBVersion string `yaml:"mongoDBVersion,omitempty" json:"mongoDBVersion,omitempty"`
57+
Name string `yaml:"name,omitempty" json:"name,omitempty"`
58+
Paused *bool `yaml:"paused,omitempty" json:"paused,omitempty"`
59+
PitEnabled *bool `yaml:"pitEnabled,omitempty" json:"pitEnabled,omitempty"`
60+
StateName string `yaml:"stateName,omitempty" json:"stateName,omitempty"`
61+
ReplicationSpecs []*AdvancedReplicationSpec `yaml:"replicationSpecs,omitempty" json:"replicationSpecs,omitempty"`
62+
CreateDate string `yaml:"createDate,omitempty" json:"createDate,omitempty"`
63+
RootCertType string `yaml:"rootCertType,omitempty" json:"rootCertType,omitempty"`
64+
VersionReleaseSystem string `yaml:"versionReleaseSystem,omitempty" json:"versionReleaseSystem,omitempty"`
6565
}
6666

6767
type AdvancedReplicationSpec struct {
68-
NumShards int `json:"numShards,omitempty"`
69-
ID string `json:"id,omitempty"`
70-
ZoneName string `json:"zoneName,omitempty"`
71-
RegionConfigs []*AdvancedRegionConfig `json:"regionConfigs,omitempty"`
68+
NumShards int `yaml:"numShards,omitempty" json:"numShards,omitempty"`
69+
ID string `yaml:"id,omitempty" json:"id,omitempty"`
70+
ZoneName string `yaml:"zoneName,omitempty" json:"zoneName,omitempty"`
71+
RegionConfigs []*AdvancedRegionConfig `yaml:"regionConfigs,omitempty" json:"regionConfigs,omitempty"`
7272
}
7373

7474
type AdvancedRegionConfig struct {
75-
AnalyticsSpecs *Specs `json:"analyticsSpecs,omitempty"`
76-
ElectableSpecs *Specs `json:"electableSpecs,omitempty"`
77-
ReadOnlySpecs *Specs `json:"readOnlySpecs,omitempty"`
78-
AutoScaling *AdvancedAutoScaling `json:"autoScaling,omitempty"`
79-
BackingProviderName string `json:"backingProviderName,omitempty"`
80-
Priority *int `json:"priority,omitempty"`
81-
ProviderName string `json:"providerName,omitempty"`
82-
RegionName string `json:"regionName,omitempty"`
75+
AnalyticsSpecs *Specs `yaml:"analyticsSpecs,omitempty" json:"analyticsSpecs,omitempty"`
76+
ElectableSpecs *Specs `yaml:"electableSpecs,omitempty" json:"electableSpecs,omitempty"`
77+
ReadOnlySpecs *Specs `yaml:"readOnlySpecs,omitempty" json:"readOnlySpecs,omitempty"`
78+
AutoScaling *AdvancedAutoScaling `yaml:"autoScaling,omitempty" json:"autoScaling,omitempty"`
79+
BackingProviderName string `yaml:"backingProviderName,omitempty" json:"backingProviderName,omitempty"`
80+
Priority *int `yaml:"priority,omitempty" json:"priority,omitempty"`
81+
ProviderName string `yaml:"providerName,omitempty" json:"providerName,omitempty"`
82+
RegionName string `yaml:"regionName,omitempty" json:"regionName,omitempty"`
8383
}
8484

8585
type AdvancedAutoScaling struct {
86-
DiskGB *DiskGB `json:"diskGB,omitempty"`
87-
Compute *Compute `json:"compute,omitempty"`
86+
DiskGB *DiskGB `yaml:"diskGB,omitempty" json:"diskGB,omitempty"`
87+
Compute *Compute `yaml:"compute,omitempty" json:"compute,omitempty"`
8888
}
8989

9090
type DiskGB struct {
91-
Enabled *bool `json:"enabled,omitempty"`
91+
Enabled *bool `yaml:"enabled,omitempty" json:"enabled,omitempty"`
9292
}
9393

9494
type Specs struct {
95-
DiskIOPS *int64 `json:"diskIOPS,omitempty"`
96-
EbsVolumeType string `json:"ebsVolumeType,omitempty"`
97-
InstanceSize string `json:"instanceSize,omitempty"`
98-
NodeCount *int `json:"nodeCount,omitempty"`
95+
DiskIOPS *int64 `yaml:"diskIOPS,omitempty" json:"diskIOPS,omitempty"`
96+
EbsVolumeType string `yaml:"ebsVolumeType,omitempty" json:"ebsVolumeType,omitempty"`
97+
InstanceSize string `yaml:"instanceSize,omitempty" json:"instanceSize,omitempty"`
98+
NodeCount *int `yaml:"nodeCount,omitempty" json:"nodeCount,omitempty"`
9999
}
100100

101101
// AdvancedClustersResponse is the response from the AdvancedClustersService.List.
102102
type AdvancedClustersResponse struct {
103-
Links []*Link `json:"links,omitempty"`
104-
Results []*AdvancedCluster `json:"results,omitempty"`
105-
TotalCount int `json:"totalCount,omitempty"`
103+
Links []*Link `yaml:"links,omitempty" json:"links,omitempty"`
104+
Results []*AdvancedCluster `yaml:"results,omitempty" json:"results,omitempty"`
105+
TotalCount int `yaml:"totalCount,omitempty" json:"totalCount,omitempty"`
106106
}
107107

108108
// List all clusters in the project associated to {GROUP-ID}.

0 commit comments

Comments
 (0)