Skip to content

Commit 50f2fbf

Browse files
svc-apix-Botgithub-actions[bot]wtrocki
authored
APIBot: SDK update based on recent changes in Atlas API (#621)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: wtrocki <981838+wtrocki@users.noreply.github.com>
1 parent 813fb50 commit 50f2fbf

File tree

175 files changed

+3499
-4225
lines changed

Some content is hidden

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

175 files changed

+3499
-4225
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/v20250312004/admin:
9+
go.mongodb.org/atlas-sdk/v20250312005/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/v20250312004
15+
go get go.mongodb.org/atlas-sdk/v20250312005
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/v20250312004/admin"
24+
import "go.mongodb.org/atlas-sdk/v20250312005/admin"
2525

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

admin/api_organizations.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ type OrganizationsApi interface {
178178
/*
179179
GetOrganizationSettings Return Settings for One Organization
180180
181-
Returns details about the specified organization's settings. To use this resource, the requesting Service Account or API Key must have the Organization Owner role.
181+
Returns details about the specified organization's settings. To use this resource, the requesting Service Account or API Key must have the Organization Member role.
182182
183183
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
184184
@param orgId Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [/orgs](#tag/Organizations/operation/listOrganizations) endpoint to retrieve all organizations to which the authenticated user has access.
@@ -1145,7 +1145,7 @@ func (r GetOrganizationSettingsApiRequest) Execute() (*OrganizationSettings, *ht
11451145
/*
11461146
GetOrganizationSettings Return Settings for One Organization
11471147
1148-
Returns details about the specified organization's settings. To use this resource, the requesting Service Account or API Key must have the Organization Owner role.
1148+
Returns details about the specified organization's settings. To use this resource, the requesting Service Account or API Key must have the Organization Member role.
11491149
11501150
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
11511151
@param orgId Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [/orgs](#tag/Organizations/operation/listOrganizations) endpoint to retrieve all organizations to which the authenticated user has access.

admin/api_resource_policies.go

Lines changed: 171 additions & 171 deletions
Large diffs are not rendered by default.

admin/api_teams.go

Lines changed: 150 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
type TeamsApi interface {
1414

1515
/*
16-
AddAllTeamsToProject Add Teams to One Project
16+
AddAllTeamsToProject Add One Team to One Project
1717
1818
Adds one team to the specified project. All members of the team share the same project access. MongoDB Cloud limits the number of users to a maximum of 100 teams per project and a maximum of 250 teams per organization. To use this resource, the requesting Service Account or API Key must have the Project Owner role.
1919
@@ -24,7 +24,7 @@ type TeamsApi interface {
2424
*/
2525
AddAllTeamsToProject(ctx context.Context, groupId string, teamRole *[]TeamRole) AddAllTeamsToProjectApiRequest
2626
/*
27-
AddAllTeamsToProject Add Teams to One Project
27+
AddAllTeamsToProject Add One Team to One Project
2828
2929
3030
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -115,6 +115,30 @@ type TeamsApi interface {
115115
// Method available only for mocking purposes
116116
DeleteTeamExecute(r DeleteTeamApiRequest) (*http.Response, error)
117117

118+
/*
119+
GetProjectTeam Return One Team in One Project
120+
121+
Returns one team to which the authenticated user has access in the project specified using its unique 24-hexadecimal digit identifier. All members of the team share the same project access. To use this resource, the requesting Service Account or API Key must have the Project Read Only role.
122+
123+
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
124+
@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.
125+
@param teamId Unique 24-hexadecimal digit string that identifies the team for which you want to get.
126+
@return GetProjectTeamApiRequest
127+
*/
128+
GetProjectTeam(ctx context.Context, groupId string, teamId string) GetProjectTeamApiRequest
129+
/*
130+
GetProjectTeam Return One Team in One Project
131+
132+
133+
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
134+
@param GetProjectTeamApiParams - Parameters for the request
135+
@return GetProjectTeamApiRequest
136+
*/
137+
GetProjectTeamWithParams(ctx context.Context, args *GetProjectTeamApiParams) GetProjectTeamApiRequest
138+
139+
// Method available only for mocking purposes
140+
GetProjectTeamExecute(r GetProjectTeamApiRequest) (*TeamRole, *http.Response, error)
141+
118142
/*
119143
GetTeamById Return One Team by ID
120144
@@ -344,7 +368,7 @@ func (r AddAllTeamsToProjectApiRequest) Execute() (*PaginatedTeamRole, *http.Res
344368
}
345369

346370
/*
347-
AddAllTeamsToProject Add Teams to One Project
371+
AddAllTeamsToProject Add One Team to One Project
348372
349373
Adds one team to the specified project. All members of the team share the same project access. MongoDB Cloud limits the number of users to a maximum of 100 teams per project and a maximum of 250 teams per organization. To use this resource, the requesting Service Account or API Key must have the Project Owner role.
350374
@@ -808,6 +832,129 @@ func (a *TeamsApiService) DeleteTeamExecute(r DeleteTeamApiRequest) (*http.Respo
808832
return localVarHTTPResponse, nil
809833
}
810834

835+
type GetProjectTeamApiRequest struct {
836+
ctx context.Context
837+
ApiService TeamsApi
838+
groupId string
839+
teamId string
840+
}
841+
842+
type GetProjectTeamApiParams struct {
843+
GroupId string
844+
TeamId string
845+
}
846+
847+
func (a *TeamsApiService) GetProjectTeamWithParams(ctx context.Context, args *GetProjectTeamApiParams) GetProjectTeamApiRequest {
848+
return GetProjectTeamApiRequest{
849+
ApiService: a,
850+
ctx: ctx,
851+
groupId: args.GroupId,
852+
teamId: args.TeamId,
853+
}
854+
}
855+
856+
func (r GetProjectTeamApiRequest) Execute() (*TeamRole, *http.Response, error) {
857+
return r.ApiService.GetProjectTeamExecute(r)
858+
}
859+
860+
/*
861+
GetProjectTeam Return One Team in One Project
862+
863+
Returns one team to which the authenticated user has access in the project specified using its unique 24-hexadecimal digit identifier. All members of the team share the same project access. To use this resource, the requesting Service Account or API Key must have the Project Read Only role.
864+
865+
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
866+
@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.
867+
@param teamId Unique 24-hexadecimal digit string that identifies the team for which you want to get.
868+
@return GetProjectTeamApiRequest
869+
*/
870+
func (a *TeamsApiService) GetProjectTeam(ctx context.Context, groupId string, teamId string) GetProjectTeamApiRequest {
871+
return GetProjectTeamApiRequest{
872+
ApiService: a,
873+
ctx: ctx,
874+
groupId: groupId,
875+
teamId: teamId,
876+
}
877+
}
878+
879+
// GetProjectTeamExecute executes the request
880+
//
881+
// @return TeamRole
882+
func (a *TeamsApiService) GetProjectTeamExecute(r GetProjectTeamApiRequest) (*TeamRole, *http.Response, error) {
883+
var (
884+
localVarHTTPMethod = http.MethodGet
885+
localVarPostBody any
886+
formFiles []formFile
887+
localVarReturnValue *TeamRole
888+
)
889+
890+
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamsApiService.GetProjectTeam")
891+
if err != nil {
892+
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
893+
}
894+
895+
localVarPath := localBasePath + "/api/atlas/v2/groups/{groupId}/teams/{teamId}"
896+
if r.groupId == "" {
897+
return localVarReturnValue, nil, reportError("groupId is empty and must be specified")
898+
}
899+
localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", url.PathEscape(r.groupId), -1)
900+
if r.teamId == "" {
901+
return localVarReturnValue, nil, reportError("teamId is empty and must be specified")
902+
}
903+
localVarPath = strings.Replace(localVarPath, "{"+"teamId"+"}", url.PathEscape(r.teamId), -1)
904+
905+
localVarHeaderParams := make(map[string]string)
906+
localVarQueryParams := url.Values{}
907+
localVarFormParams := url.Values{}
908+
909+
// to determine the Content-Type header
910+
localVarHTTPContentTypes := []string{}
911+
912+
// set Content-Type header
913+
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
914+
if localVarHTTPContentType != "" {
915+
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
916+
}
917+
918+
// to determine the Accept header (only first one)
919+
localVarHTTPHeaderAccepts := []string{"application/vnd.atlas.2023-01-01+json"}
920+
921+
// set Accept header
922+
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
923+
if localVarHTTPHeaderAccept != "" {
924+
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
925+
}
926+
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
927+
if err != nil {
928+
return localVarReturnValue, nil, err
929+
}
930+
931+
localVarHTTPResponse, err := a.client.callAPI(req)
932+
if err != nil || localVarHTTPResponse == nil {
933+
return localVarReturnValue, localVarHTTPResponse, err
934+
}
935+
936+
if localVarHTTPResponse.StatusCode >= 300 {
937+
newErr := a.client.makeApiError(localVarHTTPResponse, localVarHTTPMethod, localVarPath)
938+
return localVarReturnValue, localVarHTTPResponse, newErr
939+
}
940+
941+
err = a.client.decode(&localVarReturnValue, localVarHTTPResponse.Body, localVarHTTPResponse.Header.Get("Content-Type"))
942+
if err != nil {
943+
defer localVarHTTPResponse.Body.Close()
944+
buf, readErr := io.ReadAll(localVarHTTPResponse.Body)
945+
if readErr != nil {
946+
err = readErr
947+
}
948+
newErr := &GenericOpenAPIError{
949+
body: buf,
950+
error: err.Error(),
951+
}
952+
return localVarReturnValue, localVarHTTPResponse, newErr
953+
}
954+
955+
return localVarReturnValue, localVarHTTPResponse, nil
956+
}
957+
811958
type GetTeamByIdApiRequest struct {
812959
ctx context.Context
813960
ApiService TeamsApi

admin/atlas_client.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package admin // import "go.mongodb.org/atlas-sdk/v20250312004/admin"
1+
package admin // import "go.mongodb.org/atlas-sdk/v20250312005/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/v20250312004/auth"
11-
"go.mongodb.org/atlas-sdk/v20250312004/auth/clientcredentials"
12-
"go.mongodb.org/atlas-sdk/v20250312004/internal/core"
10+
"go.mongodb.org/atlas-sdk/v20250312005/auth"
11+
"go.mongodb.org/atlas-sdk/v20250312005/auth/clientcredentials"
12+
"go.mongodb.org/atlas-sdk/v20250312005/internal/core"
1313
)
1414

1515
const (

admin/model_collation.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type Collation struct {
1010
Backwards *bool `json:"backwards,omitempty"`
1111
// Method to handle sort order of case differences during tertiary level comparisons. `\"upper\"` sorts Uppercase before lowercase. `\"lower\"` sorts Lowercase before uppercase. `\"off\"` is similar to \"lower\" with slight differences.
1212
CaseFirst *string `json:"caseFirst,omitempty"`
13-
// Flag that indicates whether to include case comparison when `\"strength\" : 1` or `\"strength\" : 2`. | Value | Compare case at level 1 or 2? | Strength Level | Comparisons Include | |---|---|---|---| | true | Yes | 1 | Base characters and case. | | | | 2 | Base characters, diacritics (and possible other secondary differences), and case. | | false | No | | |
13+
// Flag that indicates whether to include case comparison when `\"strength\" : 1` or `\"strength\" : 2`. - `true` - Include casing in comparison - Strength Level: 1 - Base characters and case. - Strength Level: 2 - Base characters, diacritics (and possible other secondary differences), and case. - `false` - Case is NOT included in comparison.
1414
CaseLevel *bool `json:"caseLevel,omitempty"`
1515
// International Components for Unicode (ICU) code that represents a localized language. To specify simple binary comparison, set `\"locale\" : \"simple\"`.
1616
Locale string `json:"locale"`
@@ -20,7 +20,7 @@ type Collation struct {
2020
Normalization *bool `json:"normalization,omitempty"`
2121
// Flag that indicates whether to compare sequences of digits as numbers or as strings. `true` will compare as numbers, this results in `10 > 2`. `false` will Compare as strings. This results in `\"10\" < \"2\"`.
2222
NumericOrdering *bool `json:"numericOrdering,omitempty"`
23-
// Degree of comparison to perform when sorting words. MongoDB Cloud accepts the following values: | Value | Comparison Level | Comparison Method | |---|---|---| | 1 | Primary | Compares the base characters only, ignoring other differences such as diacritics and case. | | 2 | Secondary | Compares base characters (primary) and diacritics (secondary). Primary differences take precedence over secondary differences. | | 3 | Tertiary | Compares base characters (primary), diacritics (secondary), and case and variants (tertiary). Differences between base characters takes precedence over secondary differences which take precedence over tertiary differences. | | 4 | Quaternary | Compares for the specific use case to consider punctuation when levels 1 through 3 ignore punctuation or for processing Japanese text. | | 5 | Identical | Compares for the specific use case of tie breaker. |
23+
// Degree of comparison to perform when sorting words. MongoDB Cloud accepts the following _numeric values_ that correspond to the _comparison level_ and what that _comparison method_ is. - `1` - \"Primary\" - Compares the base characters only, ignoring other differences such as diacritics and case. - `2` - \"Secondary\" - Compares base characters (primary) and diacritics (secondary). Primary differences take precedence over secondary differences. - `3` - \"Tertiary\" - Compares base characters (primary), diacritics (secondary), and case and variants (tertiary). Differences between base characters takes precedence over secondary differences which take precedence over tertiary differences. - `4` - \"Quaternary\" - Compares for the specific use case to consider punctuation when levels 1 through 3 ignore punctuation or for processing Japanese text. - `5` - \"Identical\" - Compares for the specific use case of tie breaker.
2424
Strength *int `json:"strength,omitempty"`
2525
}
2626

admin/model_google_cloud_kms.go

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ type GoogleCloudKMS struct {
88
Enabled *bool `json:"enabled,omitempty"`
99
// Resource path that displays the key version resource ID for your Google Cloud KMS.
1010
KeyVersionResourceID *string `json:"keyVersionResourceID,omitempty"`
11+
// Unique 24-hexadecimal digit string that identifies the Google Cloud Provider Access Role that MongoDB Cloud uses to access the Google Cloud KMS.
12+
RoleId *string `json:"roleId,omitempty"`
1113
// JavaScript Object Notation (JSON) object that contains the Google Cloud Key Management Service (KMS). Format the JSON as a string and not as an object.
1214
// Write only field.
1315
ServiceAccountKey *string `json:"serviceAccountKey,omitempty"`
@@ -99,6 +101,39 @@ func (o *GoogleCloudKMS) SetKeyVersionResourceID(v string) {
99101
o.KeyVersionResourceID = &v
100102
}
101103

104+
// GetRoleId returns the RoleId field value if set, zero value otherwise
105+
func (o *GoogleCloudKMS) GetRoleId() string {
106+
if o == nil || IsNil(o.RoleId) {
107+
var ret string
108+
return ret
109+
}
110+
return *o.RoleId
111+
}
112+
113+
// GetRoleIdOk returns a tuple with the RoleId field value if set, nil otherwise
114+
// and a boolean to check if the value has been set.
115+
func (o *GoogleCloudKMS) GetRoleIdOk() (*string, bool) {
116+
if o == nil || IsNil(o.RoleId) {
117+
return nil, false
118+
}
119+
120+
return o.RoleId, true
121+
}
122+
123+
// HasRoleId returns a boolean if a field has been set.
124+
func (o *GoogleCloudKMS) HasRoleId() bool {
125+
if o != nil && !IsNil(o.RoleId) {
126+
return true
127+
}
128+
129+
return false
130+
}
131+
132+
// SetRoleId gets a reference to the given string and assigns it to the RoleId field.
133+
func (o *GoogleCloudKMS) SetRoleId(v string) {
134+
o.RoleId = &v
135+
}
136+
102137
// GetServiceAccountKey returns the ServiceAccountKey field value if set, zero value otherwise
103138
func (o *GoogleCloudKMS) GetServiceAccountKey() string {
104139
if o == nil || IsNil(o.ServiceAccountKey) {

admin/model_organization_settings.go

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ type OrganizationSettings struct {
1616
RestrictEmployeeAccess *bool `json:"restrictEmployeeAccess,omitempty"`
1717
// String that specifies a single email address for the specified organization to receive security-related notifications. Specifying a security contact does not grant them authorization or access to Atlas for security decisions or approvals. An empty string is valid and clears the existing security contact (if any).
1818
SecurityContact *string `json:"securityContact,omitempty"`
19+
// Flag that indicates whether a group's Atlas Stream Processing instances in this organization can create connections to other group's clusters in the same organization.
20+
StreamsCrossGroupEnabled *bool `json:"streamsCrossGroupEnabled,omitempty"`
1921
}
2022

2123
// NewOrganizationSettings instantiates a new OrganizationSettings object
@@ -236,3 +238,36 @@ func (o *OrganizationSettings) HasSecurityContact() bool {
236238
func (o *OrganizationSettings) SetSecurityContact(v string) {
237239
o.SecurityContact = &v
238240
}
241+
242+
// GetStreamsCrossGroupEnabled returns the StreamsCrossGroupEnabled field value if set, zero value otherwise
243+
func (o *OrganizationSettings) GetStreamsCrossGroupEnabled() bool {
244+
if o == nil || IsNil(o.StreamsCrossGroupEnabled) {
245+
var ret bool
246+
return ret
247+
}
248+
return *o.StreamsCrossGroupEnabled
249+
}
250+
251+
// GetStreamsCrossGroupEnabledOk returns a tuple with the StreamsCrossGroupEnabled field value if set, nil otherwise
252+
// and a boolean to check if the value has been set.
253+
func (o *OrganizationSettings) GetStreamsCrossGroupEnabledOk() (*bool, bool) {
254+
if o == nil || IsNil(o.StreamsCrossGroupEnabled) {
255+
return nil, false
256+
}
257+
258+
return o.StreamsCrossGroupEnabled, true
259+
}
260+
261+
// HasStreamsCrossGroupEnabled returns a boolean if a field has been set.
262+
func (o *OrganizationSettings) HasStreamsCrossGroupEnabled() bool {
263+
if o != nil && !IsNil(o.StreamsCrossGroupEnabled) {
264+
return true
265+
}
266+
267+
return false
268+
}
269+
270+
// SetStreamsCrossGroupEnabled gets a reference to the given bool and assigns it to the StreamsCrossGroupEnabled field.
271+
func (o *OrganizationSettings) SetStreamsCrossGroupEnabled(v bool) {
272+
o.StreamsCrossGroupEnabled = &v
273+
}

admin/model_streams_kafka_networking.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
package admin
44

5-
// StreamsKafkaNetworking Networking Access Type can either be 'PUBLIC' (default) or VPC. VPC type is in public preview, please file a support ticket to enable VPC Network Access.
5+
// StreamsKafkaNetworking Networking configuration for Streams connections.
66
type StreamsKafkaNetworking struct {
77
Access *StreamsKafkaNetworkingAccess `json:"access,omitempty"`
88
// List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. RFC 5988 outlines these relationships.

0 commit comments

Comments
 (0)