Skip to content

Commit 03181f7

Browse files
committed
chore: auto update client api apecloud/apecloud@fa937cf
1 parent bb7b405 commit 03181f7

File tree

8 files changed

+59
-408
lines changed

8 files changed

+59
-408
lines changed

.generator/schemas/adminapi.yaml

Lines changed: 2 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -8858,63 +8858,6 @@ paths:
88588858
$ref: '#/components/responses/403'
88598859
'404':
88608860
$ref: '#/components/responses/404'
8861-
/admin/v1/alerts/rules/download:
8862-
get:
8863-
tags:
8864-
- alertRule
8865-
summary: Download organization-specific alert rule configuration file
8866-
description: Downloads the current alert rule configuration for a specific organization as a YAML file.
8867-
operationId: downloadOrgAlertRuleFile
8868-
responses:
8869-
'200':
8870-
description: Successful download of the organization-specific alert rule configuration file.
8871-
content:
8872-
application/x-yaml:
8873-
schema:
8874-
type: string
8875-
format: binary
8876-
description: YAML file content containing the new alert rule configuration
8877-
application/json:
8878-
schema:
8879-
type: string
8880-
format: binary
8881-
description: JSON file content containing the new alert rule configuration
8882-
'400':
8883-
$ref: '#/components/responses/400'
8884-
'401':
8885-
$ref: '#/components/responses/401'
8886-
'403':
8887-
$ref: '#/components/responses/403'
8888-
'404':
8889-
$ref: '#/components/responses/404'
8890-
'500':
8891-
$ref: '#/components/responses/500'
8892-
/admin/v1/alerts/rules/upload:
8893-
put:
8894-
tags:
8895-
- alertRule
8896-
summary: Update alert rule configuration via YAML upload
8897-
description: Replaces the entire alert rule configuration with the content of the uploaded YAML file.
8898-
operationId: updateRuleConfig
8899-
requestBody:
8900-
required: true
8901-
content:
8902-
multipart/form-data:
8903-
schema:
8904-
$ref: '#/components/schemas/alertRuleConfig'
8905-
responses:
8906-
'204':
8907-
description: Alert rule configuration updated successfully.
8908-
'400':
8909-
description: Invalid YAML format or content.
8910-
$ref: '#/components/responses/400'
8911-
'401':
8912-
$ref: '#/components/responses/401'
8913-
'403':
8914-
$ref: '#/components/responses/403'
8915-
'500':
8916-
description: Internal server error during update.
8917-
$ref: '#/components/responses/500'
89188861
/admin/v1/alerts/rules/reset:
89198862
post:
89208863
tags:
@@ -23382,13 +23325,6 @@ components:
2338223325
pageResult:
2338323326
$ref: '#/components/schemas/pageResult'
2338423327
description: AlertRuleList is a list of alert rules
23385-
alertRuleConfig:
23386-
type: object
23387-
properties:
23388-
content:
23389-
type: string
23390-
format: binary
23391-
description: YAML file content containing the new alert rule configuration
2339223328
alertStatus:
2339323329
enum:
2339423330
- resolved
@@ -27486,13 +27422,11 @@ components:
2748627422
inputs:
2748727423
type: object
2748827424
description: Input parameters for the step
27489-
additionalProperties:
27490-
type: string
27425+
additionalProperties: true
2749127426
outputs:
2749227427
type: object
2749327428
description: Output parameters from the step
27494-
additionalProperties:
27495-
type: string
27429+
additionalProperties: true
2749627430
retryLimit:
2749727431
type: integer
2749827432
description: Number of times to retry the step in case of failure

.generator/schemas/openapi.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20611,13 +20611,11 @@ components:
2061120611
inputs:
2061220612
type: object
2061320613
description: Input parameters for the step
20614-
additionalProperties:
20615-
type: string
20614+
additionalProperties: true
2061620615
outputs:
2061720616
type: object
2061820617
description: Output parameters from the step
20619-
additionalProperties:
20620-
type: string
20618+
additionalProperties: true
2062120619
retryLimit:
2062220620
type: integer
2062320621
description: Number of times to retry the step in case of failure

apecloud

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 995dae4657526cbb8dfbd6b27adbbd2f682bb0df
1+
Subproject commit fa937cfcba8510f37ab544f9ebd8d89125263624

api/kbcloud/admin/api_alert_rule.go

Lines changed: 0 additions & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ package admin
77
import (
88
"context"
99
_context "context"
10-
_io "io"
1110
_nethttp "net/http"
1211
_neturl "net/url"
1312
"strings"
@@ -194,76 +193,6 @@ func (a *AlertRuleApi) DeleteAlertRule(ctx _context.Context, alertName string) (
194193
return localVarHTTPResponse, nil
195194
}
196195

197-
// DownloadOrgAlertRuleFile Download organization-specific alert rule configuration file.
198-
// Downloads the current alert rule configuration for a specific organization as a YAML file.
199-
func (a *AlertRuleApi) DownloadOrgAlertRuleFile(ctx _context.Context) (_io.Reader, *_nethttp.Response, error) {
200-
var (
201-
localVarHTTPMethod = _nethttp.MethodGet
202-
localVarPostBody interface{}
203-
localVarReturnValue _io.Reader
204-
)
205-
206-
// Add api info to context
207-
apiInfo := common.APIInfo{
208-
Tag: "alertRule",
209-
OperationID: "downloadOrgAlertRuleFile",
210-
Path: "/admin/v1/alerts/rules/download",
211-
Version: "",
212-
}
213-
ctx = context.WithValue(ctx, common.APIInfoCtxKey, apiInfo)
214-
215-
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, ".AlertRuleApi.DownloadOrgAlertRuleFile")
216-
if err != nil {
217-
return localVarReturnValue, nil, common.GenericOpenAPIError{ErrorMessage: err.Error()}
218-
}
219-
220-
localVarPath := localBasePath + "/admin/v1/alerts/rules/download"
221-
222-
localVarHeaderParams := make(map[string]string)
223-
localVarQueryParams := _neturl.Values{}
224-
localVarFormParams := _neturl.Values{}
225-
localVarHeaderParams["Accept"] = "application/json"
226-
227-
common.SetAuthKeys(
228-
ctx,
229-
&localVarHeaderParams,
230-
[2]string{"BearerToken", "authorization"},
231-
)
232-
req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil)
233-
if err != nil {
234-
return localVarReturnValue, nil, err
235-
}
236-
237-
localVarHTTPResponse, err := a.Client.CallAPI(req)
238-
if err != nil || localVarHTTPResponse == nil {
239-
return localVarReturnValue, localVarHTTPResponse, err
240-
}
241-
242-
if localVarHTTPResponse.StatusCode >= 300 {
243-
244-
localVarBody, err := common.ReadBody(localVarHTTPResponse)
245-
if err != nil {
246-
return localVarReturnValue, localVarHTTPResponse, err
247-
}
248-
newErr := common.GenericOpenAPIError{
249-
ErrorBody: localVarBody,
250-
ErrorMessage: localVarHTTPResponse.Status,
251-
}
252-
if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 401 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 500 {
253-
var v APIErrorResponse
254-
err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
255-
if err != nil {
256-
return localVarReturnValue, localVarHTTPResponse, newErr
257-
}
258-
newErr.ErrorModel = v
259-
}
260-
return localVarReturnValue, localVarHTTPResponse, newErr
261-
}
262-
localVarReturnValue = localVarHTTPResponse.Body
263-
264-
return localVarReturnValue, localVarHTTPResponse, nil
265-
}
266-
267196
// GetAlertRule Get alert rule.
268197
func (a *AlertRuleApi) GetAlertRule(ctx _context.Context, alertName string) (AlertRule, *_nethttp.Response, error) {
269198
var (
@@ -605,111 +534,6 @@ func (a *AlertRuleApi) UpdateAlertRule(ctx _context.Context, body AlertRule) (Al
605534
return localVarReturnValue, localVarHTTPResponse, nil
606535
}
607536

608-
// UpdateRuleConfigOptionalParameters holds optional parameters for UpdateRuleConfig.
609-
type UpdateRuleConfigOptionalParameters struct {
610-
Content *_io.Reader
611-
}
612-
613-
// NewUpdateRuleConfigOptionalParameters creates an empty struct for parameters.
614-
func NewUpdateRuleConfigOptionalParameters() *UpdateRuleConfigOptionalParameters {
615-
this := UpdateRuleConfigOptionalParameters{}
616-
return &this
617-
}
618-
619-
// WithContent sets the corresponding parameter name and returns the struct.
620-
func (r *UpdateRuleConfigOptionalParameters) WithContent(content _io.Reader) *UpdateRuleConfigOptionalParameters {
621-
r.Content = &content
622-
return r
623-
}
624-
625-
// UpdateRuleConfig Update alert rule configuration via YAML upload.
626-
// Replaces the entire alert rule configuration with the content of the uploaded YAML file.
627-
func (a *AlertRuleApi) UpdateRuleConfig(ctx _context.Context, o ...UpdateRuleConfigOptionalParameters) (*_nethttp.Response, error) {
628-
var (
629-
localVarHTTPMethod = _nethttp.MethodPut
630-
localVarPostBody interface{}
631-
optionalParams UpdateRuleConfigOptionalParameters
632-
)
633-
634-
if len(o) > 1 {
635-
return nil, common.ReportError("only one argument of type UpdateRuleConfigOptionalParameters is allowed")
636-
}
637-
if len(o) == 1 {
638-
optionalParams = o[0]
639-
}
640-
641-
// Add api info to context
642-
apiInfo := common.APIInfo{
643-
Tag: "alertRule",
644-
OperationID: "updateRuleConfig",
645-
Path: "/admin/v1/alerts/rules/upload",
646-
Version: "",
647-
}
648-
ctx = context.WithValue(ctx, common.APIInfoCtxKey, apiInfo)
649-
650-
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, ".AlertRuleApi.UpdateRuleConfig")
651-
if err != nil {
652-
return nil, common.GenericOpenAPIError{ErrorMessage: err.Error()}
653-
}
654-
655-
localVarPath := localBasePath + "/admin/v1/alerts/rules/upload"
656-
657-
localVarHeaderParams := make(map[string]string)
658-
localVarQueryParams := _neturl.Values{}
659-
localVarFormParams := _neturl.Values{}
660-
localVarHeaderParams["Content-Type"] = "multipart/form-data"
661-
localVarHeaderParams["Accept"] = "*/*"
662-
663-
formFile := common.FormFile{}
664-
formFile.FormFileName = "content"
665-
var localVarFile _io.Reader
666-
if optionalParams.Content != nil {
667-
localVarFile = *optionalParams.Content
668-
}
669-
if localVarFile != nil {
670-
fbs, _ := _io.ReadAll(localVarFile)
671-
formFile.FileBytes = fbs
672-
}
673-
674-
common.SetAuthKeys(
675-
ctx,
676-
&localVarHeaderParams,
677-
[2]string{"BearerToken", "authorization"},
678-
)
679-
req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, &formFile)
680-
if err != nil {
681-
return nil, err
682-
}
683-
684-
localVarHTTPResponse, err := a.Client.CallAPI(req)
685-
if err != nil || localVarHTTPResponse == nil {
686-
return localVarHTTPResponse, err
687-
}
688-
689-
localVarBody, err := common.ReadBody(localVarHTTPResponse)
690-
if err != nil {
691-
return localVarHTTPResponse, err
692-
}
693-
694-
if localVarHTTPResponse.StatusCode >= 300 {
695-
newErr := common.GenericOpenAPIError{
696-
ErrorBody: localVarBody,
697-
ErrorMessage: localVarHTTPResponse.Status,
698-
}
699-
if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 401 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 500 {
700-
var v APIErrorResponse
701-
err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
702-
if err != nil {
703-
return localVarHTTPResponse, newErr
704-
}
705-
newErr.ErrorModel = v
706-
}
707-
return localVarHTTPResponse, newErr
708-
}
709-
710-
return localVarHTTPResponse, nil
711-
}
712-
713537
// NewAlertRuleApi Returns NewAlertRuleApi.
714538
func NewAlertRuleApi(client *common.APIClient) *AlertRuleApi {
715539
return &AlertRuleApi{

api/kbcloud/admin/doc.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,10 @@
6060
// - [alertReceiverApi.updateAlertReceiver]
6161
// - [alertRuleApi.createAlertRule]
6262
// - [alertRuleApi.deleteAlertRule]
63-
// - [alertRuleApi.downloadOrgAlertRuleFile]
6463
// - [alertRuleApi.getAlertRule]
6564
// - [alertRuleApi.listAlertRules]
6665
// - [alertRuleApi.restoreOrgAlertRuleToDefault]
6766
// - [alertRuleApi.updateAlertRule]
68-
// - [alertRuleApi.updateRuleConfig]
6967
// - [alertSMTPConfigApi.getAlertSMTPConfig]
7068
// - [alertSMTPConfigApi.updateAlertSMTPConfig]
7169
// - [alertStrategyApi.createAlertStrategy]

0 commit comments

Comments
 (0)