Skip to content

Commit 6558809

Browse files
committed
chore: auto update client api apecloud/apecloud@8da11b4
1 parent 7a9cbd5 commit 6558809

File tree

4 files changed

+55
-19
lines changed

4 files changed

+55
-19
lines changed

.generator/schemas/adminapi.yaml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2201,6 +2201,7 @@ paths:
22012201
name: resourceId
22022202
schema:
22032203
type: integer
2204+
format: int64
22042205
- description: resource type
22052206
in: query
22062207
name: resourceType
@@ -2216,16 +2217,19 @@ paths:
22162217
name: operatorId
22172218
schema:
22182219
type: integer
2220+
format: int64
22192221
- description: the pageNumber of the query
22202222
in: query
22212223
name: pageNumber
22222224
schema:
22232225
type: integer
2226+
format: int64
22242227
- description: the pageSize of the query
22252228
in: query
22262229
name: pageSize
22272230
schema:
22282231
type: integer
2232+
format: int64
22292233
- $ref: '#/components/parameters/startTime'
22302234
- $ref: '#/components/parameters/endTime'
22312235
- $ref: '#/components/parameters/orderBy'
@@ -9757,28 +9761,33 @@ paths:
97579761
schema:
97589762
type: string
97599763
requestBody:
9760-
description: enable,disable and upgrade engine version
9764+
description: Request body for engine operations
97619765
content:
97629766
application/json:
97639767
schema:
97649768
type: object
97659769
properties:
97669770
version:
97679771
type: string
9768-
description: enable,disable and upgrade version
9772+
description: Version of the engine, required for upgrade/enable/disable action
97699773
action:
97709774
$ref: '#/components/schemas/engineActionType'
97719775
id:
97729776
type: string
9773-
description: the engine id to action
9774-
required: true
9777+
description: The engine id to action
9778+
required:
9779+
- action
97759780
responses:
97769781
'200':
9777-
description: A successful response.
9782+
description: Operation completed successfully
97789783
content:
97799784
application/json:
97809785
schema:
9781-
type: boolean
9786+
type: string
9787+
example: enable succeeded
9788+
description: Success message indicating the operation result
9789+
'400':
9790+
$ref: '#/components/responses/400'
97829791
'401':
97839792
$ref: '#/components/responses/401'
97849793
'403':

apecloud

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 2d9d45d3ae682cd069e299f3c6d0339cfb7cdfed
1+
Subproject commit 8da11b46cc9d817e7a4d774683ba7d109afd6338

api/kbcloud/admin/api_engine.go

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,14 +304,39 @@ func (a *EngineApi) DeleteEngineVersion(ctx _context.Context, o ...DeleteEngineV
304304
return localVarHTTPResponse, nil
305305
}
306306

307+
// EngineActionOptionalParameters holds optional parameters for EngineAction.
308+
type EngineActionOptionalParameters struct {
309+
ActionInfo *interface{}
310+
}
311+
312+
// NewEngineActionOptionalParameters creates an empty struct for parameters.
313+
func NewEngineActionOptionalParameters() *EngineActionOptionalParameters {
314+
this := EngineActionOptionalParameters{}
315+
return &this
316+
}
317+
318+
// WithActionInfo sets the corresponding parameter name and returns the struct.
319+
func (r *EngineActionOptionalParameters) WithActionInfo(actionInfo interface{}) *EngineActionOptionalParameters {
320+
r.ActionInfo = &actionInfo
321+
return r
322+
}
323+
307324
// EngineAction Manage engine in environment.
308-
func (a *EngineApi) EngineAction(ctx _context.Context, environmentName string, engineName string, actionInfo interface{}) (bool, *_nethttp.Response, error) {
325+
func (a *EngineApi) EngineAction(ctx _context.Context, environmentName string, engineName string, o ...EngineActionOptionalParameters) (string, *_nethttp.Response, error) {
309326
var (
310327
localVarHTTPMethod = _nethttp.MethodPost
311328
localVarPostBody interface{}
312-
localVarReturnValue bool
329+
localVarReturnValue string
330+
optionalParams EngineActionOptionalParameters
313331
)
314332

333+
if len(o) > 1 {
334+
return localVarReturnValue, nil, common.ReportError("only one argument of type EngineActionOptionalParameters is allowed")
335+
}
336+
if len(o) == 1 {
337+
optionalParams = o[0]
338+
}
339+
315340
// Add api info to context
316341
apiInfo := common.APIInfo{
317342
Tag: "engine",
@@ -337,7 +362,9 @@ func (a *EngineApi) EngineAction(ctx _context.Context, environmentName string, e
337362
localVarHeaderParams["Accept"] = "application/json"
338363

339364
// body params
340-
localVarPostBody = &actionInfo
365+
if optionalParams.Body != nil {
366+
localVarPostBody = &optionalParams.ActionInfo
367+
}
341368
common.SetAuthKeys(
342369
ctx,
343370
&localVarHeaderParams,
@@ -363,7 +390,7 @@ func (a *EngineApi) EngineAction(ctx _context.Context, environmentName string, e
363390
ErrorBody: localVarBody,
364391
ErrorMessage: localVarHTTPResponse.Status,
365392
}
366-
if localVarHTTPResponse.StatusCode == 401 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 {
393+
if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 401 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 {
367394
var v APIErrorResponse
368395
err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
369396
if err != nil {

api/kbcloud/admin/api_event.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ func (a *EventApi) GetEvent(ctx _context.Context, eventId string) (Event, *_neth
9999
// ListEventsOptionalParameters holds optional parameters for ListEvents.
100100
type ListEventsOptionalParameters struct {
101101
OrgName *string
102-
ResourceId *int32
102+
ResourceId *int64
103103
ResourceType *string
104104
EventName *string
105-
OperatorId *int32
106-
PageNumber *int32
107-
PageSize *int32
105+
OperatorId *int64
106+
PageNumber *int64
107+
PageSize *int64
108108
OrderBy *string
109109
}
110110

@@ -121,7 +121,7 @@ func (r *ListEventsOptionalParameters) WithOrgName(orgName string) *ListEventsOp
121121
}
122122

123123
// WithResourceId sets the corresponding parameter name and returns the struct.
124-
func (r *ListEventsOptionalParameters) WithResourceId(resourceId int32) *ListEventsOptionalParameters {
124+
func (r *ListEventsOptionalParameters) WithResourceId(resourceId int64) *ListEventsOptionalParameters {
125125
r.ResourceId = &resourceId
126126
return r
127127
}
@@ -139,19 +139,19 @@ func (r *ListEventsOptionalParameters) WithEventName(eventName string) *ListEven
139139
}
140140

141141
// WithOperatorId sets the corresponding parameter name and returns the struct.
142-
func (r *ListEventsOptionalParameters) WithOperatorId(operatorId int32) *ListEventsOptionalParameters {
142+
func (r *ListEventsOptionalParameters) WithOperatorId(operatorId int64) *ListEventsOptionalParameters {
143143
r.OperatorId = &operatorId
144144
return r
145145
}
146146

147147
// WithPageNumber sets the corresponding parameter name and returns the struct.
148-
func (r *ListEventsOptionalParameters) WithPageNumber(pageNumber int32) *ListEventsOptionalParameters {
148+
func (r *ListEventsOptionalParameters) WithPageNumber(pageNumber int64) *ListEventsOptionalParameters {
149149
r.PageNumber = &pageNumber
150150
return r
151151
}
152152

153153
// WithPageSize sets the corresponding parameter name and returns the struct.
154-
func (r *ListEventsOptionalParameters) WithPageSize(pageSize int32) *ListEventsOptionalParameters {
154+
func (r *ListEventsOptionalParameters) WithPageSize(pageSize int64) *ListEventsOptionalParameters {
155155
r.PageSize = &pageSize
156156
return r
157157
}

0 commit comments

Comments
 (0)