Skip to content

Commit 8c01c4a

Browse files
svc-apix-Botgithub-actions[bot]lantoli
authored
APIBot: SDK update based on recent changes in Atlas API (#600)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: lantoli <430982+lantoli@users.noreply.github.com>
1 parent c4628b2 commit 8c01c4a

File tree

237 files changed

+6799
-1871
lines changed

Some content is hidden

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

237 files changed

+6799
-1871
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/v20250312002/admin:
9+
go.mongodb.org/atlas-sdk/v20250312003/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/v20250312002
15+
go get go.mongodb.org/atlas-sdk/v20250312003
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/v20250312002/admin"
24+
import "go.mongodb.org/atlas-sdk/v20250312003/admin"
2525

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

admin/api_cloud_backups.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ type CloudBackupsApi interface {
9292
/*
9393
CreateExportBucket Create One Snapshot Export Bucket
9494
95-
Creates a Snapshot Export Bucket for an AWS S3 Bucket or Azure Blob Storage Container. Once created, an snapshots can be exported to the Export Bucket and its referenced AWS S3 Bucket or Azure Blob Storage Container. To use this resource, the requesting Service Account or API Key must have the Project Owner role. Deprecated versions: v2-{2023-01-01}
95+
Creates a Snapshot Export Bucket for an AWS S3 Bucket, Azure Blob Storage Container, or Google Cloud Storage Bucket. Once created, an snapshots can be exported to the Export Bucket and its referenced AWS S3 Bucket, Azure Blob Storage Container, or Google Cloud Storage Bucket. To use this resource, the requesting Service Account or API Key must have the Project Owner role. Deprecated versions: v2-{2023-01-01}
9696
9797
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
9898
@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.
99-
@param diskBackupSnapshotExportBucketRequest Specifies the role and AWS S3 Bucket or Azure Blob Storage Container that the Export Bucket should reference.
99+
@param diskBackupSnapshotExportBucketRequest Specifies the role and AWS S3 Bucket, Azure Blob Storage Container, or Google Cloud Storage Bucket that the Export Bucket should reference.
100100
@return CreateExportBucketApiRequest
101101
*/
102102
CreateExportBucket(ctx context.Context, groupId string, diskBackupSnapshotExportBucketRequest *DiskBackupSnapshotExportBucketRequest) CreateExportBucketApiRequest
@@ -1151,7 +1151,7 @@ func (r CreateExportBucketApiRequest) Execute() (*DiskBackupSnapshotExportBucket
11511151
/*
11521152
CreateExportBucket Create One Snapshot Export Bucket
11531153
1154-
Creates a Snapshot Export Bucket for an AWS S3 Bucket or Azure Blob Storage Container. Once created, an snapshots can be exported to the Export Bucket and its referenced AWS S3 Bucket or Azure Blob Storage Container. To use this resource, the requesting Service Account or API Key must have the Project Owner role. Deprecated versions: v2-{2023-01-01}
1154+
Creates a Snapshot Export Bucket for an AWS S3 Bucket, Azure Blob Storage Container, or Google Cloud Storage Bucket. Once created, an snapshots can be exported to the Export Bucket and its referenced AWS S3 Bucket, Azure Blob Storage Container, or Google Cloud Storage Bucket. To use this resource, the requesting Service Account or API Key must have the Project Owner role. Deprecated versions: v2-{2023-01-01}
11551155
11561156
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
11571157
@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_performance_advisor.go

Lines changed: 70 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,35 +1102,44 @@ func (a *PerformanceAdvisorApiService) ListSchemaAdviceExecute(r ListSchemaAdvic
11021102
}
11031103

11041104
type ListSlowQueriesApiRequest struct {
1105-
ctx context.Context
1106-
ApiService PerformanceAdvisorApi
1107-
groupId string
1108-
processId string
1109-
duration *int64
1110-
namespaces *[]string
1111-
nLogs *int64
1112-
since *int64
1105+
ctx context.Context
1106+
ApiService PerformanceAdvisorApi
1107+
groupId string
1108+
processId string
1109+
duration *int64
1110+
namespaces *[]string
1111+
nLogs *int64
1112+
since *int64
1113+
includeMetrics *bool
1114+
includeReplicaState *bool
1115+
includeOpType *bool
11131116
}
11141117

11151118
type ListSlowQueriesApiParams struct {
1116-
GroupId string
1117-
ProcessId string
1118-
Duration *int64
1119-
Namespaces *[]string
1120-
NLogs *int64
1121-
Since *int64
1119+
GroupId string
1120+
ProcessId string
1121+
Duration *int64
1122+
Namespaces *[]string
1123+
NLogs *int64
1124+
Since *int64
1125+
IncludeMetrics *bool
1126+
IncludeReplicaState *bool
1127+
IncludeOpType *bool
11221128
}
11231129

11241130
func (a *PerformanceAdvisorApiService) ListSlowQueriesWithParams(ctx context.Context, args *ListSlowQueriesApiParams) ListSlowQueriesApiRequest {
11251131
return ListSlowQueriesApiRequest{
1126-
ApiService: a,
1127-
ctx: ctx,
1128-
groupId: args.GroupId,
1129-
processId: args.ProcessId,
1130-
duration: args.Duration,
1131-
namespaces: args.Namespaces,
1132-
nLogs: args.NLogs,
1133-
since: args.Since,
1132+
ApiService: a,
1133+
ctx: ctx,
1134+
groupId: args.GroupId,
1135+
processId: args.ProcessId,
1136+
duration: args.Duration,
1137+
namespaces: args.Namespaces,
1138+
nLogs: args.NLogs,
1139+
since: args.Since,
1140+
includeMetrics: args.IncludeMetrics,
1141+
includeReplicaState: args.IncludeReplicaState,
1142+
includeOpType: args.IncludeOpType,
11341143
}
11351144
}
11361145

@@ -1158,6 +1167,24 @@ func (r ListSlowQueriesApiRequest) Since(since int64) ListSlowQueriesApiRequest
11581167
return r
11591168
}
11601169

1170+
// Whether or not to include metrics extracted from the slow query log as separate fields.
1171+
func (r ListSlowQueriesApiRequest) IncludeMetrics(includeMetrics bool) ListSlowQueriesApiRequest {
1172+
r.includeMetrics = &includeMetrics
1173+
return r
1174+
}
1175+
1176+
// Whether or not to include the replica state of the host when the slow query log was generated as a separate field.
1177+
func (r ListSlowQueriesApiRequest) IncludeReplicaState(includeReplicaState bool) ListSlowQueriesApiRequest {
1178+
r.includeReplicaState = &includeReplicaState
1179+
return r
1180+
}
1181+
1182+
// Whether or not to include the operation type (read/write/command) extracted from the slow query log as a separate field.
1183+
func (r ListSlowQueriesApiRequest) IncludeOpType(includeOpType bool) ListSlowQueriesApiRequest {
1184+
r.includeOpType = &includeOpType
1185+
return r
1186+
}
1187+
11611188
func (r ListSlowQueriesApiRequest) Execute() (*PerformanceAdvisorSlowQueryList, *http.Response, error) {
11621189
return r.ApiService.ListSlowQueriesExecute(r)
11631190
}
@@ -1225,6 +1252,27 @@ func (a *PerformanceAdvisorApiService) ListSlowQueriesExecute(r ListSlowQueriesA
12251252
if r.since != nil {
12261253
parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "")
12271254
}
1255+
if r.includeMetrics != nil {
1256+
parameterAddToHeaderOrQuery(localVarQueryParams, "includeMetrics", r.includeMetrics, "")
1257+
} else {
1258+
var defaultValue bool = false
1259+
r.includeMetrics = &defaultValue
1260+
parameterAddToHeaderOrQuery(localVarQueryParams, "includeMetrics", r.includeMetrics, "")
1261+
}
1262+
if r.includeReplicaState != nil {
1263+
parameterAddToHeaderOrQuery(localVarQueryParams, "includeReplicaState", r.includeReplicaState, "")
1264+
} else {
1265+
var defaultValue bool = false
1266+
r.includeReplicaState = &defaultValue
1267+
parameterAddToHeaderOrQuery(localVarQueryParams, "includeReplicaState", r.includeReplicaState, "")
1268+
}
1269+
if r.includeOpType != nil {
1270+
parameterAddToHeaderOrQuery(localVarQueryParams, "includeOpType", r.includeOpType, "")
1271+
} else {
1272+
var defaultValue bool = false
1273+
r.includeOpType = &defaultValue
1274+
parameterAddToHeaderOrQuery(localVarQueryParams, "includeOpType", r.includeOpType, "")
1275+
}
12281276
// to determine the Content-Type header
12291277
localVarHTTPContentTypes := []string{}
12301278

0 commit comments

Comments
 (0)