Skip to content

Commit 7a3496b

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

File tree

161 files changed

+3406
-891
lines changed

Some content is hidden

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

161 files changed

+3406
-891
lines changed

.mockery.yaml

+1-1
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/v20241113001/admin:
9+
go.mongodb.org/atlas-sdk/v20241113002/admin:
1010
config:
1111
include-regex: ".*Api"

README.md

+2-2
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/v20241113001
15+
go get go.mongodb.org/atlas-sdk/v20241113002
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/v20241113001/admin"
24+
import "go.mongodb.org/atlas-sdk/v20241113002/admin"
2525

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

admin/api_clusters.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ type ClustersApi interface {
424424
/*
425425
UpgradeSharedCluster Upgrade One Shared-tier Cluster
426426
427-
Upgrades a shared-tier cluster in the specified project. To use this resource, the requesting API key must have the Project Cluster Manager role. Each project supports up to 25 clusters.
427+
Upgrades a shared-tier cluster to a dedicated cluster (M10+) in the specified project. To use this resource, the requesting API key must have the Project Cluster Manager role. Each project supports up to 25 clusters.
428428
429429
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
430430
@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.
@@ -2668,7 +2668,7 @@ func (r UpgradeSharedClusterApiRequest) Execute() (*LegacyAtlasCluster, *http.Re
26682668
/*
26692669
UpgradeSharedCluster Upgrade One Shared-tier Cluster
26702670
2671-
Upgrades a shared-tier cluster in the specified project. To use this resource, the requesting API key must have the Project Cluster Manager role. Each project supports up to 25 clusters.
2671+
Upgrades a shared-tier cluster to a dedicated cluster (M10+) in the specified project. To use this resource, the requesting API key must have the Project Cluster Manager role. Each project supports up to 25 clusters.
26722672
26732673
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
26742674
@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.

admin/api_flex_clusters.go

+22-22
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,14 @@ type FlexClustersApi interface {
135135
/*
136136
UpgradeFlexCluster Upgrade One Flex Cluster
137137
138-
Upgrades a flex cluster in the specified project. To use this resource, the requesting API key must have the Project Cluster Manager role.
138+
Upgrades a flex cluster to a dedicated cluster (M10+) in the specified project. To use this resource, the requesting API key must have the Project Cluster Manager role.
139139
140140
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
141141
@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.
142-
@param flexClusterDescription20241113 Details of the flex cluster upgrade in the specified project.
142+
@param atlasTenantClusterUpgradeRequest20240805 Details of the flex cluster upgrade in the specified project.
143143
@return UpgradeFlexClusterApiRequest
144144
*/
145-
UpgradeFlexCluster(ctx context.Context, groupId string, flexClusterDescription20241113 *FlexClusterDescription20241113) UpgradeFlexClusterApiRequest
145+
UpgradeFlexCluster(ctx context.Context, groupId string, atlasTenantClusterUpgradeRequest20240805 *AtlasTenantClusterUpgradeRequest20240805) UpgradeFlexClusterApiRequest
146146
/*
147147
UpgradeFlexCluster Upgrade One Flex Cluster
148148
@@ -800,23 +800,23 @@ func (a *FlexClustersApiService) UpdateFlexClusterExecute(r UpdateFlexClusterApi
800800
}
801801

802802
type UpgradeFlexClusterApiRequest struct {
803-
ctx context.Context
804-
ApiService FlexClustersApi
805-
groupId string
806-
flexClusterDescription20241113 *FlexClusterDescription20241113
803+
ctx context.Context
804+
ApiService FlexClustersApi
805+
groupId string
806+
atlasTenantClusterUpgradeRequest20240805 *AtlasTenantClusterUpgradeRequest20240805
807807
}
808808

809809
type UpgradeFlexClusterApiParams struct {
810-
GroupId string
811-
FlexClusterDescription20241113 *FlexClusterDescription20241113
810+
GroupId string
811+
AtlasTenantClusterUpgradeRequest20240805 *AtlasTenantClusterUpgradeRequest20240805
812812
}
813813

814814
func (a *FlexClustersApiService) UpgradeFlexClusterWithParams(ctx context.Context, args *UpgradeFlexClusterApiParams) UpgradeFlexClusterApiRequest {
815815
return UpgradeFlexClusterApiRequest{
816-
ApiService: a,
817-
ctx: ctx,
818-
groupId: args.GroupId,
819-
flexClusterDescription20241113: args.FlexClusterDescription20241113,
816+
ApiService: a,
817+
ctx: ctx,
818+
groupId: args.GroupId,
819+
atlasTenantClusterUpgradeRequest20240805: args.AtlasTenantClusterUpgradeRequest20240805,
820820
}
821821
}
822822

@@ -827,18 +827,18 @@ func (r UpgradeFlexClusterApiRequest) Execute() (*FlexClusterDescription20241113
827827
/*
828828
UpgradeFlexCluster Upgrade One Flex Cluster
829829
830-
Upgrades a flex cluster in the specified project. To use this resource, the requesting API key must have the Project Cluster Manager role.
830+
Upgrades a flex cluster to a dedicated cluster (M10+) in the specified project. To use this resource, the requesting API key must have the Project Cluster Manager role.
831831
832832
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
833833
@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.
834834
@return UpgradeFlexClusterApiRequest
835835
*/
836-
func (a *FlexClustersApiService) UpgradeFlexCluster(ctx context.Context, groupId string, flexClusterDescription20241113 *FlexClusterDescription20241113) UpgradeFlexClusterApiRequest {
836+
func (a *FlexClustersApiService) UpgradeFlexCluster(ctx context.Context, groupId string, atlasTenantClusterUpgradeRequest20240805 *AtlasTenantClusterUpgradeRequest20240805) UpgradeFlexClusterApiRequest {
837837
return UpgradeFlexClusterApiRequest{
838-
ApiService: a,
839-
ctx: ctx,
840-
groupId: groupId,
841-
flexClusterDescription20241113: flexClusterDescription20241113,
838+
ApiService: a,
839+
ctx: ctx,
840+
groupId: groupId,
841+
atlasTenantClusterUpgradeRequest20240805: atlasTenantClusterUpgradeRequest20240805,
842842
}
843843
}
844844

@@ -864,8 +864,8 @@ func (a *FlexClustersApiService) UpgradeFlexClusterExecute(r UpgradeFlexClusterA
864864
localVarHeaderParams := make(map[string]string)
865865
localVarQueryParams := url.Values{}
866866
localVarFormParams := url.Values{}
867-
if r.flexClusterDescription20241113 == nil {
868-
return localVarReturnValue, nil, reportError("flexClusterDescription20241113 is required and must be specified")
867+
if r.atlasTenantClusterUpgradeRequest20240805 == nil {
868+
return localVarReturnValue, nil, reportError("atlasTenantClusterUpgradeRequest20240805 is required and must be specified")
869869
}
870870

871871
// to determine the Content-Type header
@@ -886,7 +886,7 @@ func (a *FlexClustersApiService) UpgradeFlexClusterExecute(r UpgradeFlexClusterA
886886
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
887887
}
888888
// body params
889-
localVarPostBody = r.flexClusterDescription20241113
889+
localVarPostBody = r.atlasTenantClusterUpgradeRequest20240805
890890
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
891891
if err != nil {
892892
return localVarReturnValue, nil, err

admin/atlas_client.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package admin // import "go.mongodb.org/atlas-sdk/v20241113001/admin"
1+
package admin // import "go.mongodb.org/atlas-sdk/v20241113002/admin"
22

33
import (
44
"context"
@@ -7,9 +7,9 @@ import (
77
"strings"
88

99
"github.com/mongodb-forks/digest"
10-
"go.mongodb.org/atlas-sdk/v20241113001/auth"
11-
"go.mongodb.org/atlas-sdk/v20241113001/auth/clientcredentials"
12-
"go.mongodb.org/atlas-sdk/v20241113001/internal/core"
10+
"go.mongodb.org/atlas-sdk/v20241113002/auth"
11+
"go.mongodb.org/atlas-sdk/v20241113002/auth/clientcredentials"
12+
"go.mongodb.org/atlas-sdk/v20241113002/internal/core"
1313
)
1414

1515
const (

0 commit comments

Comments
 (0)