Skip to content

Commit a3e16cc

Browse files
svc-apix-Botgithub-actions[bot]wtrocki
authored
APIBot: SDK update based on recent changes in Atlas API (#628)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: wtrocki <[email protected]>
1 parent 0d02a86 commit a3e16cc

File tree

211 files changed

+12438
-2964
lines changed

Some content is hidden

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

211 files changed

+12438
-2964
lines changed

.mockery.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ filename: "{{ .InterfaceName | snakecase }}.go"
66
mockname: "{{.InterfaceName}}"
77

88
packages:
9-
go.mongodb.org/atlas-sdk/v20250312005/admin:
9+
go.mongodb.org/atlas-sdk/v20250312006/admin:
1010
config:
1111
include-regex: ".*Api"

README.md

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

1414
```terminal
15-
go get go.mongodb.org/atlas-sdk/v20250312005
15+
go get go.mongodb.org/atlas-sdk/v20250312006
1616
```
1717

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

2323
```go
24-
import "go.mongodb.org/atlas-sdk/v20250312005/admin"
24+
import "go.mongodb.org/atlas-sdk/v20250312006/admin"
2525

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

admin/api_alerts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ func (r ListAlertsApiRequest) PageNum(pageNum int) ListAlertsApiRequest {
427427
return r
428428
}
429429

430-
// Status of the alerts to return. Omit to return all alerts in all statuses.
430+
// Status of the alerts to return. Omit this parameter to return all alerts in all statuses. TRACKING indicates the alert condition exists but has not persisted for the minimum notification delay. OPEN indicates the alert condition currently exists. CLOSED indicates the alert condition has been resolved.
431431
func (r ListAlertsApiRequest) Status(status string) ListAlertsApiRequest {
432432
r.status = &status
433433
return r

admin/api_mongo_db_cloud_users.go

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ type MongoDBCloudUsersApi interface {
6666
AddProjectRoleWithParams(ctx context.Context, args *AddProjectRoleApiParams) AddProjectRoleApiRequest
6767

6868
// Method available only for mocking purposes
69-
AddProjectRoleExecute(r AddProjectRoleApiRequest) (*OrgUserResponse, *http.Response, error)
69+
AddProjectRoleExecute(r AddProjectRoleApiRequest) (*GroupUserResponse, *http.Response, error)
7070

7171
/*
7272
AddProjectUser Add One MongoDB Cloud User to One Project
@@ -454,7 +454,7 @@ type MongoDBCloudUsersApi interface {
454454
RemoveProjectRoleWithParams(ctx context.Context, args *RemoveProjectRoleApiParams) RemoveProjectRoleApiRequest
455455

456456
// Method available only for mocking purposes
457-
RemoveProjectRoleExecute(r RemoveProjectRoleApiRequest) (*OrgUserResponse, *http.Response, error)
457+
RemoveProjectRoleExecute(r RemoveProjectRoleApiRequest) (*GroupUserResponse, *http.Response, error)
458458

459459
/*
460460
RemoveProjectUser Remove One MongoDB Cloud User from One Project
@@ -704,7 +704,7 @@ func (a *MongoDBCloudUsersApiService) AddProjectRoleWithParams(ctx context.Conte
704704
}
705705
}
706706

707-
func (r AddProjectRoleApiRequest) Execute() (*OrgUserResponse, *http.Response, error) {
707+
func (r AddProjectRoleApiRequest) Execute() (*GroupUserResponse, *http.Response, error) {
708708
return r.ApiService.AddProjectRoleExecute(r)
709709
}
710710

@@ -732,13 +732,13 @@ func (a *MongoDBCloudUsersApiService) AddProjectRole(ctx context.Context, groupI
732732

733733
// AddProjectRoleExecute executes the request
734734
//
735-
// @return OrgUserResponse
736-
func (a *MongoDBCloudUsersApiService) AddProjectRoleExecute(r AddProjectRoleApiRequest) (*OrgUserResponse, *http.Response, error) {
735+
// @return GroupUserResponse
736+
func (a *MongoDBCloudUsersApiService) AddProjectRoleExecute(r AddProjectRoleApiRequest) (*GroupUserResponse, *http.Response, error) {
737737
var (
738738
localVarHTTPMethod = http.MethodPost
739739
localVarPostBody any
740740
formFiles []formFile
741-
localVarReturnValue *OrgUserResponse
741+
localVarReturnValue *GroupUserResponse
742742
)
743743

744744
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MongoDBCloudUsersApiService.AddProjectRole")
@@ -2232,6 +2232,7 @@ type ListTeamUsersApiRequest struct {
22322232
pageNum *int
22332233
username *string
22342234
orgMembershipStatus *string
2235+
userId *string
22352236
}
22362237

22372238
type ListTeamUsersApiParams struct {
@@ -2241,6 +2242,7 @@ type ListTeamUsersApiParams struct {
22412242
PageNum *int
22422243
Username *string
22432244
OrgMembershipStatus *string
2245+
UserId *string
22442246
}
22452247

22462248
func (a *MongoDBCloudUsersApiService) ListTeamUsersWithParams(ctx context.Context, args *ListTeamUsersApiParams) ListTeamUsersApiRequest {
@@ -2253,6 +2255,7 @@ func (a *MongoDBCloudUsersApiService) ListTeamUsersWithParams(ctx context.Contex
22532255
pageNum: args.PageNum,
22542256
username: args.Username,
22552257
orgMembershipStatus: args.OrgMembershipStatus,
2258+
userId: args.UserId,
22562259
}
22572260
}
22582261

@@ -2280,6 +2283,12 @@ func (r ListTeamUsersApiRequest) OrgMembershipStatus(orgMembershipStatus string)
22802283
return r
22812284
}
22822285

2286+
// Unique 24-hexadecimal digit string to filter users by. Not supported in deprecated versions.
2287+
func (r ListTeamUsersApiRequest) UserId(userId string) ListTeamUsersApiRequest {
2288+
r.userId = &userId
2289+
return r
2290+
}
2291+
22832292
func (r ListTeamUsersApiRequest) Execute() (*PaginatedOrgUser, *http.Response, error) {
22842293
return r.ApiService.ListTeamUsersExecute(r)
22852294
}
@@ -2357,6 +2366,9 @@ func (a *MongoDBCloudUsersApiService) ListTeamUsersExecute(r ListTeamUsersApiReq
23572366
if r.orgMembershipStatus != nil {
23582367
parameterAddToHeaderOrQuery(localVarQueryParams, "orgMembershipStatus", r.orgMembershipStatus, "")
23592368
}
2369+
if r.userId != nil {
2370+
parameterAddToHeaderOrQuery(localVarQueryParams, "userId", r.userId, "")
2371+
}
23602372
// to determine the Content-Type header
23612373
localVarHTTPContentTypes := []string{}
23622374

@@ -2676,7 +2688,7 @@ func (a *MongoDBCloudUsersApiService) RemoveProjectRoleWithParams(ctx context.Co
26762688
}
26772689
}
26782690

2679-
func (r RemoveProjectRoleApiRequest) Execute() (*OrgUserResponse, *http.Response, error) {
2691+
func (r RemoveProjectRoleApiRequest) Execute() (*GroupUserResponse, *http.Response, error) {
26802692
return r.ApiService.RemoveProjectRoleExecute(r)
26812693
}
26822694

@@ -2704,13 +2716,13 @@ func (a *MongoDBCloudUsersApiService) RemoveProjectRole(ctx context.Context, gro
27042716

27052717
// RemoveProjectRoleExecute executes the request
27062718
//
2707-
// @return OrgUserResponse
2708-
func (a *MongoDBCloudUsersApiService) RemoveProjectRoleExecute(r RemoveProjectRoleApiRequest) (*OrgUserResponse, *http.Response, error) {
2719+
// @return GroupUserResponse
2720+
func (a *MongoDBCloudUsersApiService) RemoveProjectRoleExecute(r RemoveProjectRoleApiRequest) (*GroupUserResponse, *http.Response, error) {
27092721
var (
27102722
localVarHTTPMethod = http.MethodPost
27112723
localVarPostBody any
27122724
formFiles []formFile
2713-
localVarReturnValue *OrgUserResponse
2725+
localVarReturnValue *GroupUserResponse
27142726
)
27152727

27162728
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MongoDBCloudUsersApiService.RemoveProjectRole")

0 commit comments

Comments
 (0)