Skip to content

Commit cbe297e

Browse files
wtrockigithub-actions[bot]
authored andcommitted
temp: client update
1 parent 77f5bac commit cbe297e

File tree

87 files changed

+1957
-159
lines changed

Some content is hidden

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

87 files changed

+1957
-159
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/v20250312008/admin:
9+
github.com/mongodb/atlas-sdk-go/admin:
1010
config:
1111
include-regex: ".*Api"

admin/api_clusters.go

Lines changed: 58 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -649,11 +649,13 @@ type CreateClusterApiRequest struct {
649649
ApiService ClustersApi
650650
groupId string
651651
clusterDescription20240805 *ClusterDescription20240805
652+
useEffectiveInstanceFields *bool
652653
}
653654

654655
type CreateClusterApiParams struct {
655656
GroupId string
656657
ClusterDescription20240805 *ClusterDescription20240805
658+
UseEffectiveInstanceFields *bool
657659
}
658660

659661
func (a *ClustersApiService) CreateClusterWithParams(ctx context.Context, args *CreateClusterApiParams) CreateClusterApiRequest {
@@ -662,9 +664,16 @@ func (a *ClustersApiService) CreateClusterWithParams(ctx context.Context, args *
662664
ctx: ctx,
663665
groupId: args.GroupId,
664666
clusterDescription20240805: args.ClusterDescription20240805,
667+
useEffectiveInstanceFields: args.UseEffectiveInstanceFields,
665668
}
666669
}
667670

671+
// For autoscaling compatibility, defines hardware spec fields as client-owned, returning the last value set by a client. For current instance values see effective hardware specs fields. Usage of this header with autoscaling causes instance field changes to be ignored during PATCH.
672+
func (r CreateClusterApiRequest) UseEffectiveInstanceFields(useEffectiveInstanceFields bool) CreateClusterApiRequest {
673+
r.useEffectiveInstanceFields = &useEffectiveInstanceFields
674+
return r
675+
}
676+
668677
func (r CreateClusterApiRequest) Execute() (*ClusterDescription20240805, *http.Response, error) {
669678
return r.ApiService.CreateClusterExecute(r)
670679
}
@@ -735,6 +744,9 @@ func (a *ClustersApiService) CreateClusterExecute(r CreateClusterApiRequest) (*C
735744
if localVarHTTPHeaderAccept != "" {
736745
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
737746
}
747+
if r.useEffectiveInstanceFields != nil {
748+
parameterAddToHeaderOrQuery(localVarHeaderParams, "Use-Effective-Instance-Fields", r.useEffectiveInstanceFields, "")
749+
}
738750
// body params
739751
localVarPostBody = r.clusterDescription20240805
740752
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
@@ -890,26 +902,35 @@ func (a *ClustersApiService) DeleteClusterExecute(r DeleteClusterApiRequest) (*h
890902
}
891903

892904
type GetClusterApiRequest struct {
893-
ctx context.Context
894-
ApiService ClustersApi
895-
groupId string
896-
clusterName string
905+
ctx context.Context
906+
ApiService ClustersApi
907+
groupId string
908+
clusterName string
909+
useEffectiveInstanceFields *bool
897910
}
898911

899912
type GetClusterApiParams struct {
900-
GroupId string
901-
ClusterName string
913+
GroupId string
914+
ClusterName string
915+
UseEffectiveInstanceFields *bool
902916
}
903917

904918
func (a *ClustersApiService) GetClusterWithParams(ctx context.Context, args *GetClusterApiParams) GetClusterApiRequest {
905919
return GetClusterApiRequest{
906-
ApiService: a,
907-
ctx: ctx,
908-
groupId: args.GroupId,
909-
clusterName: args.ClusterName,
920+
ApiService: a,
921+
ctx: ctx,
922+
groupId: args.GroupId,
923+
clusterName: args.ClusterName,
924+
useEffectiveInstanceFields: args.UseEffectiveInstanceFields,
910925
}
911926
}
912927

928+
// For autoscaling compatibility, defines hardware spec fields as client-owned, returning the last value set by a client. For current instance values see effective hardware specs fields. Usage of this header with autoscaling causes instance field changes to be ignored during PATCH.
929+
func (r GetClusterApiRequest) UseEffectiveInstanceFields(useEffectiveInstanceFields bool) GetClusterApiRequest {
930+
r.useEffectiveInstanceFields = &useEffectiveInstanceFields
931+
return r
932+
}
933+
913934
func (r GetClusterApiRequest) Execute() (*ClusterDescription20240805, *http.Response, error) {
914935
return r.ApiService.GetClusterExecute(r)
915936
}
@@ -982,6 +1003,9 @@ func (a *ClustersApiService) GetClusterExecute(r GetClusterApiRequest) (*Cluster
9821003
if localVarHTTPHeaderAccept != "" {
9831004
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
9841005
}
1006+
if r.useEffectiveInstanceFields != nil {
1007+
parameterAddToHeaderOrQuery(localVarHeaderParams, "Use-Effective-Instance-Fields", r.useEffectiveInstanceFields, "")
1008+
}
9851009
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
9861010
if err != nil {
9871011
return localVarReturnValue, nil, err
@@ -1849,6 +1873,7 @@ type ListClustersApiRequest struct {
18491873
itemsPerPage *int
18501874
pageNum *int
18511875
includeDeletedWithRetainedBackups *bool
1876+
useEffectiveInstanceFields *bool
18521877
}
18531878

18541879
type ListClustersApiParams struct {
@@ -1857,6 +1882,7 @@ type ListClustersApiParams struct {
18571882
ItemsPerPage *int
18581883
PageNum *int
18591884
IncludeDeletedWithRetainedBackups *bool
1885+
UseEffectiveInstanceFields *bool
18601886
}
18611887

18621888
func (a *ClustersApiService) ListClustersWithParams(ctx context.Context, args *ListClustersApiParams) ListClustersApiRequest {
@@ -1868,6 +1894,7 @@ func (a *ClustersApiService) ListClustersWithParams(ctx context.Context, args *L
18681894
itemsPerPage: args.ItemsPerPage,
18691895
pageNum: args.PageNum,
18701896
includeDeletedWithRetainedBackups: args.IncludeDeletedWithRetainedBackups,
1897+
useEffectiveInstanceFields: args.UseEffectiveInstanceFields,
18711898
}
18721899
}
18731900

@@ -1895,6 +1922,12 @@ func (r ListClustersApiRequest) IncludeDeletedWithRetainedBackups(includeDeleted
18951922
return r
18961923
}
18971924

1925+
// For autoscaling compatibility, defines hardware spec fields as client-owned, returning the last value set by a client. For current instance values see effective hardware specs fields. Usage of this header with autoscaling causes instance field changes to be ignored during PATCH.
1926+
func (r ListClustersApiRequest) UseEffectiveInstanceFields(useEffectiveInstanceFields bool) ListClustersApiRequest {
1927+
r.useEffectiveInstanceFields = &useEffectiveInstanceFields
1928+
return r
1929+
}
1930+
18981931
func (r ListClustersApiRequest) Execute() (*PaginatedClusterDescription20240805, *http.Response, error) {
18991932
return r.ApiService.ListClustersExecute(r)
19001933
}
@@ -1989,6 +2022,9 @@ func (a *ClustersApiService) ListClustersExecute(r ListClustersApiRequest) (*Pag
19892022
if localVarHTTPHeaderAccept != "" {
19902023
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
19912024
}
2025+
if r.useEffectiveInstanceFields != nil {
2026+
parameterAddToHeaderOrQuery(localVarHeaderParams, "Use-Effective-Instance-Fields", r.useEffectiveInstanceFields, "")
2027+
}
19922028
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
19932029
if err != nil {
19942030
return localVarReturnValue, nil, err
@@ -2580,12 +2616,14 @@ type UpdateClusterApiRequest struct {
25802616
groupId string
25812617
clusterName string
25822618
clusterDescription20240805 *ClusterDescription20240805
2619+
useEffectiveInstanceFields *bool
25832620
}
25842621

25852622
type UpdateClusterApiParams struct {
25862623
GroupId string
25872624
ClusterName string
25882625
ClusterDescription20240805 *ClusterDescription20240805
2626+
UseEffectiveInstanceFields *bool
25892627
}
25902628

25912629
func (a *ClustersApiService) UpdateClusterWithParams(ctx context.Context, args *UpdateClusterApiParams) UpdateClusterApiRequest {
@@ -2595,9 +2633,16 @@ func (a *ClustersApiService) UpdateClusterWithParams(ctx context.Context, args *
25952633
groupId: args.GroupId,
25962634
clusterName: args.ClusterName,
25972635
clusterDescription20240805: args.ClusterDescription20240805,
2636+
useEffectiveInstanceFields: args.UseEffectiveInstanceFields,
25982637
}
25992638
}
26002639

2640+
// For autoscaling compatibility, defines hardware spec fields as client-owned, returning the last value set by a client. For current instance values see effective hardware specs fields. Usage of this header with autoscaling causes instance field changes to be ignored during PATCH.
2641+
func (r UpdateClusterApiRequest) UseEffectiveInstanceFields(useEffectiveInstanceFields bool) UpdateClusterApiRequest {
2642+
r.useEffectiveInstanceFields = &useEffectiveInstanceFields
2643+
return r
2644+
}
2645+
26012646
func (r UpdateClusterApiRequest) Execute() (*ClusterDescription20240805, *http.Response, error) {
26022647
return r.ApiService.UpdateClusterExecute(r)
26032648
}
@@ -2672,6 +2717,9 @@ func (a *ClustersApiService) UpdateClusterExecute(r UpdateClusterApiRequest) (*C
26722717
if localVarHTTPHeaderAccept != "" {
26732718
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
26742719
}
2720+
if r.useEffectiveInstanceFields != nil {
2721+
parameterAddToHeaderOrQuery(localVarHeaderParams, "Use-Effective-Instance-Fields", r.useEffectiveInstanceFields, "")
2722+
}
26752723
// body params
26762724
localVarPostBody = r.clusterDescription20240805
26772725
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)

0 commit comments

Comments
 (0)