Skip to content

Commit 3fab993

Browse files
APIBot: SDK update based on recent changes in Atlas API (#219)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: wtrocki <[email protected]> Co-authored-by: Wojciech Trocki <[email protected]>
1 parent 2301658 commit 3fab993

File tree

126 files changed

+3911
-1156
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+3911
-1156
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Note that `atlas-sdk-go` only supports the two most recent major versions of Go.
1111
### Adding Dependency
1212

1313
```terminal
14-
go get go.mongodb.org/atlas-sdk/v20230201008
14+
go get go.mongodb.org/atlas-sdk/v20231001001
1515
```
1616

1717
### Using in the code
@@ -20,7 +20,7 @@ Construct a new Atlas SDK client, then use the various services on the client to
2020
access different parts of the Atlas API. For example:
2121

2222
```go
23-
import "go.mongodb.org/atlas-sdk/v20230201008/admin"
23+
import "go.mongodb.org/atlas-sdk/v20231001001/admin"
2424

2525
func example() {
2626
ctx := context.Background()

admin/api_cloud_backups.go

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ type CloudBackupsApi interface {
310310
/*
311311
GetDataProtectionSettings Return the Backup Compliance Policy settings
312312
313-
Returns the Backup Compliance Policy settings with the specified project. To use this resource, the requesting API Key must have the Project Owner role.
313+
Returns the Backup Compliance Policy settings with the specified project. To use this resource, the requesting API Key must have the Project Owner role. Deprecated versions: v2-{2023-01-01}
314314
315315
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
316316
@param groupId Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access. **NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
@@ -328,7 +328,7 @@ type CloudBackupsApi interface {
328328
GetDataProtectionSettingsWithParams(ctx context.Context, args *GetDataProtectionSettingsApiParams) GetDataProtectionSettingsApiRequest
329329

330330
// Interface only available internally
331-
getDataProtectionSettingsExecute(r GetDataProtectionSettingsApiRequest) (*DataProtectionSettings, *http.Response, error)
331+
getDataProtectionSettingsExecute(r GetDataProtectionSettingsApiRequest) (*DataProtectionSettings20231001, *http.Response, error)
332332

333333
/*
334334
GetExportBucket Return One AWS S3 Bucket Used for Cloud Backup Snapshot Exports
@@ -674,13 +674,13 @@ type CloudBackupsApi interface {
674674
/*
675675
UpdateDataProtectionSettings Update or enable the Backup Compliance Policy settings
676676
677-
Updates the Backup Compliance Policy settings for the specified project. To use this resource, the requesting API Key must have the Project Owner role.
677+
Updates the Backup Compliance Policy settings for the specified project. To use this resource, the requesting API Key must have the Project Owner role. Deprecated versions: v2-{2023-01-01}
678678
679679
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
680680
@param groupId Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access. **NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
681681
@return UpdateDataProtectionSettingsApiRequest
682682
*/
683-
UpdateDataProtectionSettings(ctx context.Context, groupId string, dataProtectionSettings *DataProtectionSettings) UpdateDataProtectionSettingsApiRequest
683+
UpdateDataProtectionSettings(ctx context.Context, groupId string, dataProtectionSettings20231001 *DataProtectionSettings20231001) UpdateDataProtectionSettingsApiRequest
684684
/*
685685
UpdateDataProtectionSettings Update or enable the Backup Compliance Policy settings
686686
@@ -692,7 +692,7 @@ type CloudBackupsApi interface {
692692
UpdateDataProtectionSettingsWithParams(ctx context.Context, args *UpdateDataProtectionSettingsApiParams) UpdateDataProtectionSettingsApiRequest
693693

694694
// Interface only available internally
695-
updateDataProtectionSettingsExecute(r UpdateDataProtectionSettingsApiRequest) (*DataProtectionSettings, *http.Response, error)
695+
updateDataProtectionSettingsExecute(r UpdateDataProtectionSettingsApiRequest) (*DataProtectionSettings20231001, *http.Response, error)
696696

697697
/*
698698
UpdateSnapshotRetention Change Expiration Date for One Cloud Backup
@@ -2525,14 +2525,14 @@ func (a *CloudBackupsApiService) GetDataProtectionSettingsWithParams(ctx context
25252525
}
25262526
}
25272527

2528-
func (r GetDataProtectionSettingsApiRequest) Execute() (*DataProtectionSettings, *http.Response, error) {
2528+
func (r GetDataProtectionSettingsApiRequest) Execute() (*DataProtectionSettings20231001, *http.Response, error) {
25292529
return r.ApiService.getDataProtectionSettingsExecute(r)
25302530
}
25312531

25322532
/*
25332533
GetDataProtectionSettings Return the Backup Compliance Policy settings
25342534
2535-
Returns the Backup Compliance Policy settings with the specified project. To use this resource, the requesting API Key must have the Project Owner role.
2535+
Returns the Backup Compliance Policy settings with the specified project. To use this resource, the requesting API Key must have the Project Owner role. Deprecated versions: v2-{2023-01-01}
25362536
25372537
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
25382538
@param groupId Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access. **NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
@@ -2548,13 +2548,13 @@ func (a *CloudBackupsApiService) GetDataProtectionSettings(ctx context.Context,
25482548

25492549
// Execute executes the request
25502550
//
2551-
// @return DataProtectionSettings
2552-
func (a *CloudBackupsApiService) getDataProtectionSettingsExecute(r GetDataProtectionSettingsApiRequest) (*DataProtectionSettings, *http.Response, error) {
2551+
// @return DataProtectionSettings20231001
2552+
func (a *CloudBackupsApiService) getDataProtectionSettingsExecute(r GetDataProtectionSettingsApiRequest) (*DataProtectionSettings20231001, *http.Response, error) {
25532553
var (
25542554
localVarHTTPMethod = http.MethodGet
25552555
localVarPostBody interface{}
25562556
formFiles []formFile
2557-
localVarReturnValue *DataProtectionSettings
2557+
localVarReturnValue *DataProtectionSettings20231001
25582558
)
25592559

25602560
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CloudBackupsApiService.GetDataProtectionSettings")
@@ -2585,7 +2585,7 @@ func (a *CloudBackupsApiService) getDataProtectionSettingsExecute(r GetDataProte
25852585
}
25862586

25872587
// to determine the Accept header
2588-
localVarHTTPHeaderAccepts := []string{"application/vnd.atlas.2023-01-01+json", "application/json"}
2588+
localVarHTTPHeaderAccepts := []string{"application/vnd.atlas.2023-10-01+json", "application/json"}
25892589

25902590
// set Accept header
25912591
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
@@ -4970,57 +4970,57 @@ func (a *CloudBackupsApiService) updateBackupScheduleExecute(r UpdateBackupSched
49704970
}
49714971

49724972
type UpdateDataProtectionSettingsApiRequest struct {
4973-
ctx context.Context
4974-
ApiService CloudBackupsApi
4975-
groupId string
4976-
dataProtectionSettings *DataProtectionSettings
4973+
ctx context.Context
4974+
ApiService CloudBackupsApi
4975+
groupId string
4976+
dataProtectionSettings20231001 *DataProtectionSettings20231001
49774977
}
49784978

49794979
type UpdateDataProtectionSettingsApiParams struct {
4980-
GroupId string
4981-
DataProtectionSettings *DataProtectionSettings
4980+
GroupId string
4981+
DataProtectionSettings20231001 *DataProtectionSettings20231001
49824982
}
49834983

49844984
func (a *CloudBackupsApiService) UpdateDataProtectionSettingsWithParams(ctx context.Context, args *UpdateDataProtectionSettingsApiParams) UpdateDataProtectionSettingsApiRequest {
49854985
return UpdateDataProtectionSettingsApiRequest{
4986-
ApiService: a,
4987-
ctx: ctx,
4988-
groupId: args.GroupId,
4989-
dataProtectionSettings: args.DataProtectionSettings,
4986+
ApiService: a,
4987+
ctx: ctx,
4988+
groupId: args.GroupId,
4989+
dataProtectionSettings20231001: args.DataProtectionSettings20231001,
49904990
}
49914991
}
49924992

4993-
func (r UpdateDataProtectionSettingsApiRequest) Execute() (*DataProtectionSettings, *http.Response, error) {
4993+
func (r UpdateDataProtectionSettingsApiRequest) Execute() (*DataProtectionSettings20231001, *http.Response, error) {
49944994
return r.ApiService.updateDataProtectionSettingsExecute(r)
49954995
}
49964996

49974997
/*
49984998
UpdateDataProtectionSettings Update or enable the Backup Compliance Policy settings
49994999
5000-
Updates the Backup Compliance Policy settings for the specified project. To use this resource, the requesting API Key must have the Project Owner role.
5000+
Updates the Backup Compliance Policy settings for the specified project. To use this resource, the requesting API Key must have the Project Owner role. Deprecated versions: v2-{2023-01-01}
50015001
50025002
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
50035003
@param groupId Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access. **NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
50045004
@return UpdateDataProtectionSettingsApiRequest
50055005
*/
5006-
func (a *CloudBackupsApiService) UpdateDataProtectionSettings(ctx context.Context, groupId string, dataProtectionSettings *DataProtectionSettings) UpdateDataProtectionSettingsApiRequest {
5006+
func (a *CloudBackupsApiService) UpdateDataProtectionSettings(ctx context.Context, groupId string, dataProtectionSettings20231001 *DataProtectionSettings20231001) UpdateDataProtectionSettingsApiRequest {
50075007
return UpdateDataProtectionSettingsApiRequest{
5008-
ApiService: a,
5009-
ctx: ctx,
5010-
groupId: groupId,
5011-
dataProtectionSettings: dataProtectionSettings,
5008+
ApiService: a,
5009+
ctx: ctx,
5010+
groupId: groupId,
5011+
dataProtectionSettings20231001: dataProtectionSettings20231001,
50125012
}
50135013
}
50145014

50155015
// Execute executes the request
50165016
//
5017-
// @return DataProtectionSettings
5018-
func (a *CloudBackupsApiService) updateDataProtectionSettingsExecute(r UpdateDataProtectionSettingsApiRequest) (*DataProtectionSettings, *http.Response, error) {
5017+
// @return DataProtectionSettings20231001
5018+
func (a *CloudBackupsApiService) updateDataProtectionSettingsExecute(r UpdateDataProtectionSettingsApiRequest) (*DataProtectionSettings20231001, *http.Response, error) {
50195019
var (
50205020
localVarHTTPMethod = http.MethodPut
50215021
localVarPostBody interface{}
50225022
formFiles []formFile
5023-
localVarReturnValue *DataProtectionSettings
5023+
localVarReturnValue *DataProtectionSettings20231001
50245024
)
50255025

50265026
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CloudBackupsApiService.UpdateDataProtectionSettings")
@@ -5040,12 +5040,12 @@ func (a *CloudBackupsApiService) updateDataProtectionSettingsExecute(r UpdateDat
50405040
if strlen(r.groupId) > 24 {
50415041
return localVarReturnValue, nil, reportError("groupId must have less than 24 elements")
50425042
}
5043-
if r.dataProtectionSettings == nil {
5044-
return localVarReturnValue, nil, reportError("dataProtectionSettings is required and must be specified")
5043+
if r.dataProtectionSettings20231001 == nil {
5044+
return localVarReturnValue, nil, reportError("dataProtectionSettings20231001 is required and must be specified")
50455045
}
50465046

50475047
// to determine the Content-Type header
5048-
localVarHTTPContentTypes := []string{"application/vnd.atlas.2023-01-01+json"}
5048+
localVarHTTPContentTypes := []string{"application/vnd.atlas.2023-10-01+json"}
50495049

50505050
// set Content-Type header
50515051
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
@@ -5054,15 +5054,15 @@ func (a *CloudBackupsApiService) updateDataProtectionSettingsExecute(r UpdateDat
50545054
}
50555055

50565056
// to determine the Accept header
5057-
localVarHTTPHeaderAccepts := []string{"application/vnd.atlas.2023-01-01+json", "application/json"}
5057+
localVarHTTPHeaderAccepts := []string{"application/vnd.atlas.2023-10-01+json", "application/json"}
50585058

50595059
// set Accept header
50605060
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
50615061
if localVarHTTPHeaderAccept != "" {
50625062
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
50635063
}
50645064
// body params
5065-
localVarPostBody = r.dataProtectionSettings
5065+
localVarPostBody = r.dataProtectionSettings20231001
50665066
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
50675067
if err != nil {
50685068
return localVarReturnValue, nil, err

admin/api_global_clusters.go

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type GlobalClustersApi interface {
2323
@param clusterName Human-readable label that identifies this advanced cluster.
2424
@return CreateCustomZoneMappingApiRequest
2525
*/
26-
CreateCustomZoneMapping(ctx context.Context, groupId string, clusterName string, geoSharding *GeoSharding) CreateCustomZoneMappingApiRequest
26+
CreateCustomZoneMapping(ctx context.Context, groupId string, clusterName string, customZoneMappings *CustomZoneMappings) CreateCustomZoneMappingApiRequest
2727
/*
2828
CreateCustomZoneMapping Add One Entry to One Custom Zone Mapping
2929
@@ -138,26 +138,26 @@ type GlobalClustersApi interface {
138138
type GlobalClustersApiService service
139139

140140
type CreateCustomZoneMappingApiRequest struct {
141-
ctx context.Context
142-
ApiService GlobalClustersApi
143-
groupId string
144-
clusterName string
145-
geoSharding *GeoSharding
141+
ctx context.Context
142+
ApiService GlobalClustersApi
143+
groupId string
144+
clusterName string
145+
customZoneMappings *CustomZoneMappings
146146
}
147147

148148
type CreateCustomZoneMappingApiParams struct {
149-
GroupId string
150-
ClusterName string
151-
GeoSharding *GeoSharding
149+
GroupId string
150+
ClusterName string
151+
CustomZoneMappings *CustomZoneMappings
152152
}
153153

154154
func (a *GlobalClustersApiService) CreateCustomZoneMappingWithParams(ctx context.Context, args *CreateCustomZoneMappingApiParams) CreateCustomZoneMappingApiRequest {
155155
return CreateCustomZoneMappingApiRequest{
156-
ApiService: a,
157-
ctx: ctx,
158-
groupId: args.GroupId,
159-
clusterName: args.ClusterName,
160-
geoSharding: args.GeoSharding,
156+
ApiService: a,
157+
ctx: ctx,
158+
groupId: args.GroupId,
159+
clusterName: args.ClusterName,
160+
customZoneMappings: args.CustomZoneMappings,
161161
}
162162
}
163163

@@ -175,13 +175,13 @@ CreateCustomZoneMapping Add One Entry to One Custom Zone Mapping
175175
@param clusterName Human-readable label that identifies this advanced cluster.
176176
@return CreateCustomZoneMappingApiRequest
177177
*/
178-
func (a *GlobalClustersApiService) CreateCustomZoneMapping(ctx context.Context, groupId string, clusterName string, geoSharding *GeoSharding) CreateCustomZoneMappingApiRequest {
178+
func (a *GlobalClustersApiService) CreateCustomZoneMapping(ctx context.Context, groupId string, clusterName string, customZoneMappings *CustomZoneMappings) CreateCustomZoneMappingApiRequest {
179179
return CreateCustomZoneMappingApiRequest{
180-
ApiService: a,
181-
ctx: ctx,
182-
groupId: groupId,
183-
clusterName: clusterName,
184-
geoSharding: geoSharding,
180+
ApiService: a,
181+
ctx: ctx,
182+
groupId: groupId,
183+
clusterName: clusterName,
184+
customZoneMappings: customZoneMappings,
185185
}
186186
}
187187

@@ -220,8 +220,8 @@ func (a *GlobalClustersApiService) createCustomZoneMappingExecute(r CreateCustom
220220
if strlen(r.clusterName) > 64 {
221221
return localVarReturnValue, nil, reportError("clusterName must have less than 64 elements")
222222
}
223-
if r.geoSharding == nil {
224-
return localVarReturnValue, nil, reportError("geoSharding is required and must be specified")
223+
if r.customZoneMappings == nil {
224+
return localVarReturnValue, nil, reportError("customZoneMappings is required and must be specified")
225225
}
226226

227227
// to determine the Content-Type header
@@ -242,7 +242,7 @@ func (a *GlobalClustersApiService) createCustomZoneMappingExecute(r CreateCustom
242242
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
243243
}
244244
// body params
245-
localVarPostBody = r.geoSharding
245+
localVarPostBody = r.customZoneMappings
246246
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
247247
if err != nil {
248248
return localVarReturnValue, nil, err

0 commit comments

Comments
 (0)