Skip to content

Commit 0872272

Browse files
committed
chore: auto update client api apecloud/apecloud@3c90723
1 parent 10800ec commit 0872272

File tree

11 files changed

+570
-5
lines changed

11 files changed

+570
-5
lines changed

.generator/schemas/adminapi.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15261,6 +15261,9 @@ components:
1526115261
default: false
1526215262
description: PITREnabled or not
1526315263
type: boolean
15264+
continuousBackupMethod:
15265+
description: continuous backup method for pitr
15266+
type: string
1526415267
autoBackup:
1526515268
default: false
1526615269
description: autoBackup or not
@@ -20073,6 +20076,9 @@ components:
2007320076
description: specify whether to enable point-in-time recovery
2007420077
default: false
2007520078
type: boolean
20079+
continuousBackupMethod:
20080+
description: continuous backup method for pitr
20081+
type: string
2007620082
cronExpression:
2007720083
description: the crop expression for schedule
2007820084
type: string

.generator/schemas/openapi.yaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3921,6 +3921,58 @@ paths:
39213921
$ref: '#/components/responses/409'
39223922
tags:
39233923
- analyze
3924+
/api/v1/organizations/{orgName}/{engineName}/clusterBackupMethod:
3925+
get:
3926+
operationId: getBackupMethod
3927+
summary: get backup method
3928+
parameters:
3929+
- name: orgName
3930+
in: path
3931+
description: name of the org
3932+
required: true
3933+
schema:
3934+
type: string
3935+
- name: engineName
3936+
in: path
3937+
description: engine name
3938+
required: true
3939+
schema:
3940+
type: string
3941+
- description: clusterID is required when you want to get the backup method of a existing cluster
3942+
in: query
3943+
name: clusterID
3944+
schema:
3945+
type: string
3946+
- name: enablePITR
3947+
in: query
3948+
description: define whether to enable PITR (Point-In-Time Recovery). This setting is required when clusterId is not empty.
3949+
schema:
3950+
type: boolean
3951+
- name: withRebuildInstance
3952+
in: query
3953+
description: defined whether to search for rebuilding instance.
3954+
schema:
3955+
type: boolean
3956+
- name: component
3957+
in: query
3958+
description: The component type is required when withRebuildInstance is true.
3959+
schema:
3960+
type: string
3961+
responses:
3962+
'200':
3963+
content:
3964+
'*/*':
3965+
schema:
3966+
$ref: '#/components/schemas/clusterBackupMethod'
3967+
description: A successful response.
3968+
'401':
3969+
$ref: '#/components/responses/401'
3970+
'403':
3971+
$ref: '#/components/responses/403'
3972+
'404':
3973+
$ref: '#/components/responses/404'
3974+
tags:
3975+
- backupMethod
39243976
/api/v1/organizations/{orgName}/clusters/{clusterName}/backups:
39253977
post:
39263978
operationId: createClusterBackup
@@ -4078,6 +4130,11 @@ paths:
40784130
description: type of the backup
40794131
schema:
40804132
type: string
4133+
- name: withRebuildInstance
4134+
in: query
4135+
description: defined whether to search for rebuilding instance.
4136+
schema:
4137+
type: boolean
40814138
- name: componentName
40824139
in: query
40834140
description: get the backups belong to the component
@@ -12933,6 +12990,9 @@ components:
1293312990
default: false
1293412991
description: PITREnabled or not
1293512992
type: boolean
12993+
continuousBackupMethod:
12994+
description: continuous backup method for pitr
12995+
type: string
1293612996
autoBackup:
1293712997
default: false
1293812998
description: autoBackup or not
@@ -14267,6 +14327,19 @@ components:
1426714327
description: Enable TLS or not
1426814328
type: boolean
1426914329
type: object
14330+
clusterBackupMethod:
14331+
description: the backup method for cluster
14332+
properties:
14333+
full:
14334+
description: full backup method
14335+
type: string
14336+
incremental:
14337+
description: incremental backup method
14338+
type: string
14339+
continuous:
14340+
description: continuous backup method
14341+
type: string
14342+
type: object
1427014343
backupType:
1427114344
enum:
1427214345
- Full
@@ -14435,6 +14508,9 @@ components:
1443514508
description: specify whether to enable point-in-time recovery
1443614509
default: false
1443714510
type: boolean
14511+
continuousBackupMethod:
14512+
description: continuous backup method for pitr
14513+
type: string
1443814514
cronExpression:
1443914515
description: the crop expression for schedule
1444014516
type: string

apecloud

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 54844ffb8ec09b5017741ccd22fa9ff0ebe2d539
1+
Subproject commit 3c9072359adac9122688486947082cae92f41fbf

api/kbcloud/admin/model_backup_policy.go

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ type BackupPolicy struct {
1818
AutoBackupMethod *string `json:"autoBackupMethod,omitempty"`
1919
// specify whether to enable point-in-time recovery
2020
PitrEnabled *bool `json:"pitrEnabled,omitempty"`
21+
// continuous backup method for pitr
22+
ContinuousBackupMethod *string `json:"continuousBackupMethod,omitempty"`
2123
// the crop expression for schedule
2224
CronExpression *string `json:"cronExpression,omitempty"`
2325
// specify whether to enable incremental backup
@@ -150,6 +152,34 @@ func (o *BackupPolicy) SetPitrEnabled(v bool) {
150152
o.PitrEnabled = &v
151153
}
152154

155+
// GetContinuousBackupMethod returns the ContinuousBackupMethod field value if set, zero value otherwise.
156+
func (o *BackupPolicy) GetContinuousBackupMethod() string {
157+
if o == nil || o.ContinuousBackupMethod == nil {
158+
var ret string
159+
return ret
160+
}
161+
return *o.ContinuousBackupMethod
162+
}
163+
164+
// GetContinuousBackupMethodOk returns a tuple with the ContinuousBackupMethod field value if set, nil otherwise
165+
// and a boolean to check if the value has been set.
166+
func (o *BackupPolicy) GetContinuousBackupMethodOk() (*string, bool) {
167+
if o == nil || o.ContinuousBackupMethod == nil {
168+
return nil, false
169+
}
170+
return o.ContinuousBackupMethod, true
171+
}
172+
173+
// HasContinuousBackupMethod returns a boolean if a field has been set.
174+
func (o *BackupPolicy) HasContinuousBackupMethod() bool {
175+
return o != nil && o.ContinuousBackupMethod != nil
176+
}
177+
178+
// SetContinuousBackupMethod gets a reference to the given string and assigns it to the ContinuousBackupMethod field.
179+
func (o *BackupPolicy) SetContinuousBackupMethod(v string) {
180+
o.ContinuousBackupMethod = &v
181+
}
182+
153183
// GetCronExpression returns the CronExpression field value if set, zero value otherwise.
154184
func (o *BackupPolicy) GetCronExpression() string {
155185
if o == nil || o.CronExpression == nil {
@@ -372,6 +402,9 @@ func (o BackupPolicy) MarshalJSON() ([]byte, error) {
372402
if o.PitrEnabled != nil {
373403
toSerialize["pitrEnabled"] = o.PitrEnabled
374404
}
405+
if o.ContinuousBackupMethod != nil {
406+
toSerialize["continuousBackupMethod"] = o.ContinuousBackupMethod
407+
}
375408
if o.CronExpression != nil {
376409
toSerialize["cronExpression"] = o.CronExpression
377410
}
@@ -406,6 +439,7 @@ func (o *BackupPolicy) UnmarshalJSON(bytes []byte) (err error) {
406439
AutoBackup *bool `json:"autoBackup,omitempty"`
407440
AutoBackupMethod *string `json:"autoBackupMethod,omitempty"`
408441
PitrEnabled *bool `json:"pitrEnabled,omitempty"`
442+
ContinuousBackupMethod *string `json:"continuousBackupMethod,omitempty"`
409443
CronExpression *string `json:"cronExpression,omitempty"`
410444
IncrementalBackupEnabled *bool `json:"incrementalBackupEnabled,omitempty"`
411445
IncrementalCronExpression *string `json:"incrementalCronExpression,omitempty"`
@@ -419,7 +453,7 @@ func (o *BackupPolicy) UnmarshalJSON(bytes []byte) (err error) {
419453
}
420454
additionalProperties := make(map[string]interface{})
421455
if err = common.Unmarshal(bytes, &additionalProperties); err == nil {
422-
common.DeleteKeys(additionalProperties, &[]string{"autoBackup", "autoBackupMethod", "pitrEnabled", "cronExpression", "incrementalBackupEnabled", "incrementalCronExpression", "retentionPeriod", "backupRepo", "retentionPolicy", "nextBackupTime"})
456+
common.DeleteKeys(additionalProperties, &[]string{"autoBackup", "autoBackupMethod", "pitrEnabled", "continuousBackupMethod", "cronExpression", "incrementalBackupEnabled", "incrementalCronExpression", "retentionPeriod", "backupRepo", "retentionPolicy", "nextBackupTime"})
423457
} else {
424458
return err
425459
}
@@ -428,6 +462,7 @@ func (o *BackupPolicy) UnmarshalJSON(bytes []byte) (err error) {
428462
o.AutoBackup = all.AutoBackup
429463
o.AutoBackupMethod = all.AutoBackupMethod
430464
o.PitrEnabled = all.PitrEnabled
465+
o.ContinuousBackupMethod = all.ContinuousBackupMethod
431466
o.CronExpression = all.CronExpression
432467
o.IncrementalBackupEnabled = all.IncrementalBackupEnabled
433468
o.IncrementalCronExpression = all.IncrementalCronExpression

api/kbcloud/admin/model_cluster_backup.go

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import "github.com/apecloud/kb-cloud-client-go/api/common"
1010
type ClusterBackup struct {
1111
// PITREnabled or not
1212
PitrEnabled *bool `json:"pitrEnabled,omitempty"`
13+
// continuous backup method for pitr
14+
ContinuousBackupMethod *string `json:"continuousBackupMethod,omitempty"`
1315
// autoBackup or not
1416
AutoBackup *bool `json:"autoBackup,omitempty"`
1517
// name of the backup method
@@ -90,6 +92,34 @@ func (o *ClusterBackup) SetPitrEnabled(v bool) {
9092
o.PitrEnabled = &v
9193
}
9294

95+
// GetContinuousBackupMethod returns the ContinuousBackupMethod field value if set, zero value otherwise.
96+
func (o *ClusterBackup) GetContinuousBackupMethod() string {
97+
if o == nil || o.ContinuousBackupMethod == nil {
98+
var ret string
99+
return ret
100+
}
101+
return *o.ContinuousBackupMethod
102+
}
103+
104+
// GetContinuousBackupMethodOk returns a tuple with the ContinuousBackupMethod field value if set, nil otherwise
105+
// and a boolean to check if the value has been set.
106+
func (o *ClusterBackup) GetContinuousBackupMethodOk() (*string, bool) {
107+
if o == nil || o.ContinuousBackupMethod == nil {
108+
return nil, false
109+
}
110+
return o.ContinuousBackupMethod, true
111+
}
112+
113+
// HasContinuousBackupMethod returns a boolean if a field has been set.
114+
func (o *ClusterBackup) HasContinuousBackupMethod() bool {
115+
return o != nil && o.ContinuousBackupMethod != nil
116+
}
117+
118+
// SetContinuousBackupMethod gets a reference to the given string and assigns it to the ContinuousBackupMethod field.
119+
func (o *ClusterBackup) SetContinuousBackupMethod(v string) {
120+
o.ContinuousBackupMethod = &v
121+
}
122+
93123
// GetAutoBackup returns the AutoBackup field value if set, zero value otherwise.
94124
func (o *ClusterBackup) GetAutoBackup() bool {
95125
if o == nil || o.AutoBackup == nil {
@@ -362,6 +392,9 @@ func (o ClusterBackup) MarshalJSON() ([]byte, error) {
362392
if o.PitrEnabled != nil {
363393
toSerialize["pitrEnabled"] = o.PitrEnabled
364394
}
395+
if o.ContinuousBackupMethod != nil {
396+
toSerialize["continuousBackupMethod"] = o.ContinuousBackupMethod
397+
}
365398
if o.AutoBackup != nil {
366399
toSerialize["autoBackup"] = o.AutoBackup
367400
}
@@ -400,6 +433,7 @@ func (o ClusterBackup) MarshalJSON() ([]byte, error) {
400433
func (o *ClusterBackup) UnmarshalJSON(bytes []byte) (err error) {
401434
all := struct {
402435
PitrEnabled *bool `json:"pitrEnabled,omitempty"`
436+
ContinuousBackupMethod *string `json:"continuousBackupMethod,omitempty"`
403437
AutoBackup *bool `json:"autoBackup,omitempty"`
404438
AutoBackupMethod *string `json:"autoBackupMethod,omitempty"`
405439
BackupRepo *string `json:"backupRepo,omitempty"`
@@ -415,13 +449,14 @@ func (o *ClusterBackup) UnmarshalJSON(bytes []byte) (err error) {
415449
}
416450
additionalProperties := make(map[string]interface{})
417451
if err = common.Unmarshal(bytes, &additionalProperties); err == nil {
418-
common.DeleteKeys(additionalProperties, &[]string{"pitrEnabled", "autoBackup", "autoBackupMethod", "backupRepo", "cronExpression", "retentionPeriod", "retentionPolicy", "snapshotVolumes", "incrementalBackupEnabled", "incrementalCronExpression"})
452+
common.DeleteKeys(additionalProperties, &[]string{"pitrEnabled", "continuousBackupMethod", "autoBackup", "autoBackupMethod", "backupRepo", "cronExpression", "retentionPeriod", "retentionPolicy", "snapshotVolumes", "incrementalBackupEnabled", "incrementalCronExpression"})
419453
} else {
420454
return err
421455
}
422456

423457
hasInvalidField := false
424458
o.PitrEnabled = all.PitrEnabled
459+
o.ContinuousBackupMethod = all.ContinuousBackupMethod
425460
o.AutoBackup = all.AutoBackup
426461
o.AutoBackupMethod = all.AutoBackupMethod
427462
o.BackupRepo = all.BackupRepo

api/kbcloud/api_backup.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@ type ListBackupsOptionalParameters struct {
623623
FetchWithDeletedCluster *bool
624624
WithDeletedBackups *bool
625625
BackupType *string
626+
WithRebuildInstance *bool
626627
ComponentName *string
627628
Page *int32
628629
PageSize *int32
@@ -670,6 +671,12 @@ func (r *ListBackupsOptionalParameters) WithBackupType(backupType string) *ListB
670671
return r
671672
}
672673

674+
// WithWithRebuildInstance sets the corresponding parameter name and returns the struct.
675+
func (r *ListBackupsOptionalParameters) WithWithRebuildInstance(withRebuildInstance bool) *ListBackupsOptionalParameters {
676+
r.WithRebuildInstance = &withRebuildInstance
677+
return r
678+
}
679+
673680
// WithComponentName sets the corresponding parameter name and returns the struct.
674681
func (r *ListBackupsOptionalParameters) WithComponentName(componentName string) *ListBackupsOptionalParameters {
675682
r.ComponentName = &componentName
@@ -742,6 +749,9 @@ func (a *BackupApi) ListBackups(ctx _context.Context, orgName string, o ...ListB
742749
if optionalParams.BackupType != nil {
743750
localVarQueryParams.Add("backupType", common.ParameterToString(*optionalParams.BackupType, ""))
744751
}
752+
if optionalParams.WithRebuildInstance != nil {
753+
localVarQueryParams.Add("withRebuildInstance", common.ParameterToString(*optionalParams.WithRebuildInstance, ""))
754+
}
745755
if optionalParams.ComponentName != nil {
746756
localVarQueryParams.Add("componentName", common.ParameterToString(*optionalParams.ComponentName, ""))
747757
}

0 commit comments

Comments
 (0)