Skip to content

Commit

Permalink
APIBot: SDK update based on recent changes in Atlas API (#491)
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 Dec 4, 2024
1 parent 74bb991 commit 7a3496b
Show file tree
Hide file tree
Showing 161 changed files with 3,406 additions and 891 deletions.
2 changes: 1 addition & 1 deletion .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ filename: "{{ .InterfaceName | snakecase }}.go"
mockname: "{{.InterfaceName}}"

packages:
go.mongodb.org/atlas-sdk/v20241113001/admin:
go.mongodb.org/atlas-sdk/v20241113002/admin:
config:
include-regex: ".*Api"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Note that `atlas-sdk-go` only supports the two most recent major versions of Go.
### Adding Dependency

```terminal
go get go.mongodb.org/atlas-sdk/v20241113001
go get go.mongodb.org/atlas-sdk/v20241113002
```

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

```go
import "go.mongodb.org/atlas-sdk/v20241113001/admin"
import "go.mongodb.org/atlas-sdk/v20241113002/admin"

func example() {
ctx := context.Background()
Expand Down
4 changes: 2 additions & 2 deletions admin/api_clusters.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ type ClustersApi interface {
/*
UpgradeSharedCluster Upgrade One Shared-tier Cluster
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.
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.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@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.
Expand Down Expand Up @@ -2668,7 +2668,7 @@ func (r UpgradeSharedClusterApiRequest) Execute() (*LegacyAtlasCluster, *http.Re
/*
UpgradeSharedCluster Upgrade One Shared-tier Cluster
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.
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.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@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.
Expand Down
44 changes: 22 additions & 22 deletions admin/api_flex_clusters.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ type FlexClustersApi interface {
/*
UpgradeFlexCluster Upgrade One Flex Cluster
Upgrades a flex cluster in the specified project. To use this resource, the requesting API key must have the Project Cluster Manager role.
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.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@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.
@param flexClusterDescription20241113 Details of the flex cluster upgrade in the specified project.
@param atlasTenantClusterUpgradeRequest20240805 Details of the flex cluster upgrade in the specified project.
@return UpgradeFlexClusterApiRequest
*/
UpgradeFlexCluster(ctx context.Context, groupId string, flexClusterDescription20241113 *FlexClusterDescription20241113) UpgradeFlexClusterApiRequest
UpgradeFlexCluster(ctx context.Context, groupId string, atlasTenantClusterUpgradeRequest20240805 *AtlasTenantClusterUpgradeRequest20240805) UpgradeFlexClusterApiRequest
/*
UpgradeFlexCluster Upgrade One Flex Cluster
Expand Down Expand Up @@ -800,23 +800,23 @@ func (a *FlexClustersApiService) UpdateFlexClusterExecute(r UpdateFlexClusterApi
}

type UpgradeFlexClusterApiRequest struct {
ctx context.Context
ApiService FlexClustersApi
groupId string
flexClusterDescription20241113 *FlexClusterDescription20241113
ctx context.Context
ApiService FlexClustersApi
groupId string
atlasTenantClusterUpgradeRequest20240805 *AtlasTenantClusterUpgradeRequest20240805
}

type UpgradeFlexClusterApiParams struct {
GroupId string
FlexClusterDescription20241113 *FlexClusterDescription20241113
GroupId string
AtlasTenantClusterUpgradeRequest20240805 *AtlasTenantClusterUpgradeRequest20240805
}

func (a *FlexClustersApiService) UpgradeFlexClusterWithParams(ctx context.Context, args *UpgradeFlexClusterApiParams) UpgradeFlexClusterApiRequest {
return UpgradeFlexClusterApiRequest{
ApiService: a,
ctx: ctx,
groupId: args.GroupId,
flexClusterDescription20241113: args.FlexClusterDescription20241113,
ApiService: a,
ctx: ctx,
groupId: args.GroupId,
atlasTenantClusterUpgradeRequest20240805: args.AtlasTenantClusterUpgradeRequest20240805,
}
}

Expand All @@ -827,18 +827,18 @@ func (r UpgradeFlexClusterApiRequest) Execute() (*FlexClusterDescription20241113
/*
UpgradeFlexCluster Upgrade One Flex Cluster
Upgrades a flex cluster in the specified project. To use this resource, the requesting API key must have the Project Cluster Manager role.
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.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@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.
@return UpgradeFlexClusterApiRequest
*/
func (a *FlexClustersApiService) UpgradeFlexCluster(ctx context.Context, groupId string, flexClusterDescription20241113 *FlexClusterDescription20241113) UpgradeFlexClusterApiRequest {
func (a *FlexClustersApiService) UpgradeFlexCluster(ctx context.Context, groupId string, atlasTenantClusterUpgradeRequest20240805 *AtlasTenantClusterUpgradeRequest20240805) UpgradeFlexClusterApiRequest {
return UpgradeFlexClusterApiRequest{
ApiService: a,
ctx: ctx,
groupId: groupId,
flexClusterDescription20241113: flexClusterDescription20241113,
ApiService: a,
ctx: ctx,
groupId: groupId,
atlasTenantClusterUpgradeRequest20240805: atlasTenantClusterUpgradeRequest20240805,
}
}

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

// to determine the Content-Type header
Expand All @@ -886,7 +886,7 @@ func (a *FlexClustersApiService) UpgradeFlexClusterExecute(r UpgradeFlexClusterA
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
// body params
localVarPostBody = r.flexClusterDescription20241113
localVarPostBody = r.atlasTenantClusterUpgradeRequest20240805
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil {
return localVarReturnValue, nil, err
Expand Down
8 changes: 4 additions & 4 deletions admin/atlas_client.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package admin // import "go.mongodb.org/atlas-sdk/v20241113001/admin"
package admin // import "go.mongodb.org/atlas-sdk/v20241113002/admin"

import (
"context"
Expand All @@ -7,9 +7,9 @@ import (
"strings"

"github.com/mongodb-forks/digest"
"go.mongodb.org/atlas-sdk/v20241113001/auth"
"go.mongodb.org/atlas-sdk/v20241113001/auth/clientcredentials"
"go.mongodb.org/atlas-sdk/v20241113001/internal/core"
"go.mongodb.org/atlas-sdk/v20241113002/auth"
"go.mongodb.org/atlas-sdk/v20241113002/auth/clientcredentials"
"go.mongodb.org/atlas-sdk/v20241113002/internal/core"
)

const (
Expand Down
Loading

0 comments on commit 7a3496b

Please sign in to comment.