Skip to content

Commit

Permalink
chore: auto update client api apecloud/apecloud@4631eb5
Browse files Browse the repository at this point in the history
  • Loading branch information
apecloud-bot committed Dec 19, 2024
1 parent ddb393c commit e9c0562
Show file tree
Hide file tree
Showing 7 changed files with 190 additions and 114 deletions.
215 changes: 109 additions & 106 deletions .generator/schemas/adminapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4535,7 +4535,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/opsRequestName'
$ref: '#/components/schemas/clusterTask'
description: Accepted
'401':
$ref: '#/components/responses/401'
Expand Down Expand Up @@ -15113,6 +15113,114 @@ components:
hints:
kind: interface
type: object
clusterTaskProgress:
description: clusterTaskProgressDetail is the information of the task progress
properties:
name:
description: conponent name
type: string
group:
description: group name
type: string
objectKey:
description: the instance name
type: string
message:
description: message of the task progress
type: string
status:
description: status of the task progress
type: string
startTime:
description: start time of the task progress
format: date-time
type: string
endTime:
description: end time of the task progress
format: date-time
type: string
type: object
clusterTaskProgresses:
description: clusterTaskProgresses is a list of task progress detail
properties:
items:
description: Items is the list of task progress detail in the list
items:
$ref: '#/components/schemas/clusterTaskProgress'
type: array
type: object
clusterTaskDetail:
type: object
description: taskCondition is the information of the task condition
properties:
reason:
description: reason of the task condition
type: string
type:
description: type of the task condition
type: string
status:
description: status of the task condition
type: string
message:
description: message of the task condition
type: string
lastTransitionTime:
description: last transition time of the task condition
format: date-time
type: string
clusterTaskDetails:
description: taskConditions is a list of task condition
properties:
items:
description: Items is the list of task condition in the list
items:
$ref: '#/components/schemas/clusterTaskDetail'
type: array
type: object
clusterTask:
type: object
description: task is the information of the operation
required:
- name
- namespace
- status
- taskType
- progress
properties:
id:
description: ID of the task
type: string
name:
description: Name of the task
type: string
namespace:
description: Namespace of the task
type: string
status:
description: status of the task
type: string
taskType:
description: task type
type: string
progress:
description: progress of the task
type: string
taskProgresses:
$ref: '#/components/schemas/clusterTaskProgresses'
taskDetails:
$ref: '#/components/schemas/clusterTaskDetails'
opsLog:
description: pod log of the custom task
type: string
startTime:
type: string
format: date-time
description: Time when the task started
completionTime:
type: string
format: date-time
description: Time when the task completed or failed
opsStatus:
type: object
x-go-name: OpsRequestStatus
Expand Down Expand Up @@ -21155,111 +21263,6 @@ components:
- Failed
- Aborted
type: string
clusterTaskProgress:
description: clusterTaskProgressDetail is the information of the task progress
properties:
name:
description: conponent name
type: string
group:
description: group name
type: string
objectKey:
description: the instance name
type: string
message:
description: message of the task progress
type: string
status:
description: status of the task progress
type: string
startTime:
description: start time of the task progress
format: date-time
type: string
endTime:
description: end time of the task progress
format: date-time
type: string
type: object
clusterTaskProgresses:
description: clusterTaskProgresses is a list of task progress detail
properties:
items:
description: Items is the list of task progress detail in the list
items:
$ref: '#/components/schemas/clusterTaskProgress'
type: array
type: object
clusterTaskDetail:
type: object
description: taskCondition is the information of the task condition
properties:
reason:
description: reason of the task condition
type: string
type:
description: type of the task condition
type: string
status:
description: status of the task condition
type: string
message:
description: message of the task condition
type: string
lastTransitionTime:
description: last transition time of the task condition
format: date-time
type: string
clusterTaskDetails:
description: taskConditions is a list of task condition
properties:
items:
description: Items is the list of task condition in the list
items:
$ref: '#/components/schemas/clusterTaskDetail'
type: array
type: object
clusterTask:
type: object
description: task is the information of the operation
required:
- name
- namespace
- status
- taskType
- progress
properties:
id:
description: ID of the task
type: string
name:
description: Name of the task
type: string
namespace:
description: Namespace of the task
type: string
status:
description: status of the task
type: string
taskType:
description: task type
type: string
progress:
description: progress of the task
type: string
taskProgresses:
$ref: '#/components/schemas/clusterTaskProgresses'
taskDetails:
$ref: '#/components/schemas/clusterTaskDetails'
startTime:
type: string
format: date-time
description: Time when the task started
completionTime:
type: string
format: date-time
description: Time when the task completed or failed
clusterTaskList:
description: TaskList is a list of operation task objects
properties:
Expand Down
5 changes: 4 additions & 1 deletion .generator/schemas/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3242,7 +3242,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/opsRequestName'
$ref: '#/components/schemas/clusterTask'
description: Accepted
'401':
$ref: '#/components/responses/401'
Expand Down Expand Up @@ -12007,6 +12007,9 @@ components:
$ref: '#/components/schemas/clusterTaskProgresses'
taskDetails:
$ref: '#/components/schemas/clusterTaskDetails'
opsLog:
description: pod log of the custom task
type: string
startTime:
type: string
format: date-time
Expand Down
2 changes: 1 addition & 1 deletion apecloud
Submodule apecloud updated from 944b98 to 4631eb
4 changes: 2 additions & 2 deletions api/kbcloud/admin/api_opsrequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@ func (a *OpsrequestApi) ClusterVolumeExpand(ctx _context.Context, orgName string
}

// CustomOps Create custom OpsRequest.
func (a *OpsrequestApi) CustomOps(ctx _context.Context, orgName string, clusterName string, body OpsCustom) (OpsRequestName, *_nethttp.Response, error) {
func (a *OpsrequestApi) CustomOps(ctx _context.Context, orgName string, clusterName string, body OpsCustom) (ClusterTask, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
localVarReturnValue OpsRequestName
localVarReturnValue ClusterTask
)

localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, ".OpsrequestApi.CustomOps")
Expand Down
37 changes: 36 additions & 1 deletion api/kbcloud/admin/model_cluster_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ type ClusterTask struct {
TaskProgresses *ClusterTaskProgresses `json:"taskProgresses,omitempty"`
// taskConditions is a list of task condition
TaskDetails *ClusterTaskDetails `json:"taskDetails,omitempty"`
// pod log of the custom task
OpsLog *string `json:"opsLog,omitempty"`
// Time when the task started
StartTime *time.Time `json:"startTime,omitempty"`
// Time when the task completed or failed
Expand Down Expand Up @@ -259,6 +261,34 @@ func (o *ClusterTask) SetTaskDetails(v ClusterTaskDetails) {
o.TaskDetails = &v
}

// GetOpsLog returns the OpsLog field value if set, zero value otherwise.
func (o *ClusterTask) GetOpsLog() string {
if o == nil || o.OpsLog == nil {
var ret string
return ret
}
return *o.OpsLog
}

// GetOpsLogOk returns a tuple with the OpsLog field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ClusterTask) GetOpsLogOk() (*string, bool) {
if o == nil || o.OpsLog == nil {
return nil, false
}
return o.OpsLog, true
}

// HasOpsLog returns a boolean if a field has been set.
func (o *ClusterTask) HasOpsLog() bool {
return o != nil && o.OpsLog != nil
}

// SetOpsLog gets a reference to the given string and assigns it to the OpsLog field.
func (o *ClusterTask) SetOpsLog(v string) {
o.OpsLog = &v
}

// GetStartTime returns the StartTime field value if set, zero value otherwise.
func (o *ClusterTask) GetStartTime() time.Time {
if o == nil || o.StartTime == nil {
Expand Down Expand Up @@ -335,6 +365,9 @@ func (o ClusterTask) MarshalJSON() ([]byte, error) {
if o.TaskDetails != nil {
toSerialize["taskDetails"] = o.TaskDetails
}
if o.OpsLog != nil {
toSerialize["opsLog"] = o.OpsLog
}
if o.StartTime != nil {
if o.StartTime.Nanosecond() == 0 {
toSerialize["startTime"] = o.StartTime.Format("2006-01-02T15:04:05Z07:00")
Expand Down Expand Up @@ -367,6 +400,7 @@ func (o *ClusterTask) UnmarshalJSON(bytes []byte) (err error) {
Progress *string `json:"progress"`
TaskProgresses *ClusterTaskProgresses `json:"taskProgresses,omitempty"`
TaskDetails *ClusterTaskDetails `json:"taskDetails,omitempty"`
OpsLog *string `json:"opsLog,omitempty"`
StartTime *time.Time `json:"startTime,omitempty"`
CompletionTime *time.Time `json:"completionTime,omitempty"`
}{}
Expand All @@ -390,7 +424,7 @@ func (o *ClusterTask) UnmarshalJSON(bytes []byte) (err error) {
}
additionalProperties := make(map[string]interface{})
if err = common.Unmarshal(bytes, &additionalProperties); err == nil {
common.DeleteKeys(additionalProperties, &[]string{"id", "name", "namespace", "status", "taskType", "progress", "taskProgresses", "taskDetails", "startTime", "completionTime"})
common.DeleteKeys(additionalProperties, &[]string{"id", "name", "namespace", "status", "taskType", "progress", "taskProgresses", "taskDetails", "opsLog", "startTime", "completionTime"})
} else {
return err
}
Expand All @@ -410,6 +444,7 @@ func (o *ClusterTask) UnmarshalJSON(bytes []byte) (err error) {
hasInvalidField = true
}
o.TaskDetails = all.TaskDetails
o.OpsLog = all.OpsLog
o.StartTime = all.StartTime
o.CompletionTime = all.CompletionTime

Expand Down
4 changes: 2 additions & 2 deletions api/kbcloud/api_opsrequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@ func (a *OpsrequestApi) ClusterVolumeExpand(ctx _context.Context, orgName string
}

// CustomOps Create custom OpsRequest.
func (a *OpsrequestApi) CustomOps(ctx _context.Context, orgName string, clusterName string, body OpsCustom) (OpsRequestName, *_nethttp.Response, error) {
func (a *OpsrequestApi) CustomOps(ctx _context.Context, orgName string, clusterName string, body OpsCustom) (ClusterTask, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
localVarReturnValue OpsRequestName
localVarReturnValue ClusterTask
)

localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, ".OpsrequestApi.CustomOps")
Expand Down
Loading

0 comments on commit e9c0562

Please sign in to comment.