Skip to content

Commit 93ce52b

Browse files
committed
chore: auto update client api apecloud/apecloud@67def5e
1 parent 05b0b36 commit 93ce52b

File tree

8 files changed

+79
-431
lines changed

8 files changed

+79
-431
lines changed

.generator/schemas/adminapi.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22851,8 +22851,6 @@ components:
2285122851
- backupMethod
2285222852
- backupPolicyName
2285322853
- backupType
22854-
- cloudProvider
22855-
- cloudRegion
2285622854
- creationTimestamp
2285722855
- engine
2285822856
- environmentName

.generator/schemas/openapi.yaml

Lines changed: 0 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -5847,76 +5847,6 @@ paths:
58475847
$ref: '#/components/responses/403'
58485848
'404':
58495849
$ref: '#/components/responses/404'
5850-
/api/v1/organizations/{orgName}/alerts/rules/config:
5851-
get:
5852-
tags:
5853-
- alertRule
5854-
summary: Download organization-specific alert rule configuration file
5855-
description: Downloads the current alert rule configuration for a specific organization as a YAML file.
5856-
operationId: downloadOrgAlertRuleFile
5857-
parameters:
5858-
- name: orgName
5859-
in: path
5860-
required: true
5861-
description: The name of the organization.
5862-
schema:
5863-
type: string
5864-
responses:
5865-
'200':
5866-
description: Successful download of the organization-specific alert rule configuration file.
5867-
content:
5868-
application/x-yaml:
5869-
schema:
5870-
type: string
5871-
format: binary
5872-
description: YAML file content containing the new alert rule configuration
5873-
application/json:
5874-
schema:
5875-
type: string
5876-
format: binary
5877-
description: JSON file content containing the new alert rule configuration
5878-
'400':
5879-
$ref: '#/components/responses/400'
5880-
'401':
5881-
$ref: '#/components/responses/401'
5882-
'403':
5883-
$ref: '#/components/responses/403'
5884-
'404':
5885-
$ref: '#/components/responses/404'
5886-
'500':
5887-
$ref: '#/components/responses/500'
5888-
put:
5889-
tags:
5890-
- alertRule
5891-
summary: Update alert rule configuration via YAML upload
5892-
description: Replaces the entire alert rule configuration with the content of the uploaded YAML file.
5893-
operationId: updateRuleConfig
5894-
parameters:
5895-
- name: orgName
5896-
in: path
5897-
required: true
5898-
description: The name of the organization.
5899-
schema:
5900-
type: string
5901-
requestBody:
5902-
required: true
5903-
content:
5904-
multipart/form-data:
5905-
schema:
5906-
$ref: '#/components/schemas/alertRuleConfig'
5907-
responses:
5908-
'204':
5909-
description: Alert rule configuration updated successfully.
5910-
'400':
5911-
description: Invalid YAML format or content.
5912-
$ref: '#/components/responses/400'
5913-
'401':
5914-
$ref: '#/components/responses/401'
5915-
'403':
5916-
$ref: '#/components/responses/403'
5917-
'500':
5918-
description: Internal server error during update.
5919-
$ref: '#/components/responses/500'
59205850
/api/v1/organizations/{orgName}/alerts/rules/config/restore:
59215851
post:
59225852
tags:
@@ -17190,8 +17120,6 @@ components:
1719017120
- backupMethod
1719117121
- backupPolicyName
1719217122
- backupType
17193-
- cloudProvider
17194-
- cloudRegion
1719517123
- creationTimestamp
1719617124
- engine
1719717125
- environmentName
@@ -18372,13 +18300,6 @@ components:
1837218300
pageResult:
1837318301
$ref: '#/components/schemas/pageResult'
1837418302
description: AlertInhibitList is a list of alert inhibit
18375-
alertRuleConfig:
18376-
type: object
18377-
properties:
18378-
content:
18379-
type: string
18380-
format: binary
18381-
description: YAML file content containing the new alert rule configuration
1838218303
engineTypeItem:
1838318304
type: object
1838418305
properties:

apecloud

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit d2d8e87719e76084cbdbbe36d8431b8ca3ba810f
1+
Subproject commit 67def5e60eba99fd6cbf2bb6df541427407a9f9c

api/kbcloud/admin/model_backup.go

Lines changed: 39 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ type Backup struct {
6262
// the id of cluster that backup belong to
6363
ClusterId *string `json:"clusterId,omitempty"`
6464
// the cloud provider
65-
CloudProvider string `json:"cloudProvider"`
65+
CloudProvider *string `json:"cloudProvider,omitempty"`
6666
// the cloud region
67-
CloudRegion string `json:"cloudRegion"`
67+
CloudRegion *string `json:"cloudRegion,omitempty"`
6868
// the environment name
6969
EnvironmentName string `json:"environmentName"`
7070
// the cluster engine
@@ -84,7 +84,7 @@ type Backup struct {
8484
// This constructor will assign default values to properties that have it defined,
8585
// and makes sure properties required by API are set, but the set of arguments
8686
// will change when the set of required properties is changed.
87-
func NewBackup(autoBackup bool, backupMethod string, backupPolicyName string, backupType BackupType, creationTimestamp time.Time, name string, orgName string, snapshotVolumes bool, sourceCluster string, status BackupStatus, totalSize string, retentionPeriod string, cloudProvider string, cloudRegion string, environmentName string, engine string) *Backup {
87+
func NewBackup(autoBackup bool, backupMethod string, backupPolicyName string, backupType BackupType, creationTimestamp time.Time, name string, orgName string, snapshotVolumes bool, sourceCluster string, status BackupStatus, totalSize string, retentionPeriod string, environmentName string, engine string) *Backup {
8888
this := Backup{}
8989
this.AutoBackup = autoBackup
9090
this.BackupMethod = backupMethod
@@ -98,8 +98,6 @@ func NewBackup(autoBackup bool, backupMethod string, backupPolicyName string, ba
9898
this.Status = status
9999
this.TotalSize = totalSize
100100
this.RetentionPeriod = retentionPeriod
101-
this.CloudProvider = cloudProvider
102-
this.CloudRegion = cloudRegion
103101
this.EnvironmentName = environmentName
104102
this.Engine = engine
105103
return &this
@@ -808,50 +806,60 @@ func (o *Backup) SetClusterId(v string) {
808806
o.ClusterId = &v
809807
}
810808

811-
// GetCloudProvider returns the CloudProvider field value.
809+
// GetCloudProvider returns the CloudProvider field value if set, zero value otherwise.
812810
func (o *Backup) GetCloudProvider() string {
813-
if o == nil {
811+
if o == nil || o.CloudProvider == nil {
814812
var ret string
815813
return ret
816814
}
817-
return o.CloudProvider
815+
return *o.CloudProvider
818816
}
819817

820-
// GetCloudProviderOk returns a tuple with the CloudProvider field value
818+
// GetCloudProviderOk returns a tuple with the CloudProvider field value if set, nil otherwise
821819
// and a boolean to check if the value has been set.
822820
func (o *Backup) GetCloudProviderOk() (*string, bool) {
823-
if o == nil {
821+
if o == nil || o.CloudProvider == nil {
824822
return nil, false
825823
}
826-
return &o.CloudProvider, true
824+
return o.CloudProvider, true
825+
}
826+
827+
// HasCloudProvider returns a boolean if a field has been set.
828+
func (o *Backup) HasCloudProvider() bool {
829+
return o != nil && o.CloudProvider != nil
827830
}
828831

829-
// SetCloudProvider sets field value.
832+
// SetCloudProvider gets a reference to the given string and assigns it to the CloudProvider field.
830833
func (o *Backup) SetCloudProvider(v string) {
831-
o.CloudProvider = v
834+
o.CloudProvider = &v
832835
}
833836

834-
// GetCloudRegion returns the CloudRegion field value.
837+
// GetCloudRegion returns the CloudRegion field value if set, zero value otherwise.
835838
func (o *Backup) GetCloudRegion() string {
836-
if o == nil {
839+
if o == nil || o.CloudRegion == nil {
837840
var ret string
838841
return ret
839842
}
840-
return o.CloudRegion
843+
return *o.CloudRegion
841844
}
842845

843-
// GetCloudRegionOk returns a tuple with the CloudRegion field value
846+
// GetCloudRegionOk returns a tuple with the CloudRegion field value if set, nil otherwise
844847
// and a boolean to check if the value has been set.
845848
func (o *Backup) GetCloudRegionOk() (*string, bool) {
846-
if o == nil {
849+
if o == nil || o.CloudRegion == nil {
847850
return nil, false
848851
}
849-
return &o.CloudRegion, true
852+
return o.CloudRegion, true
850853
}
851854

852-
// SetCloudRegion sets field value.
855+
// HasCloudRegion returns a boolean if a field has been set.
856+
func (o *Backup) HasCloudRegion() bool {
857+
return o != nil && o.CloudRegion != nil
858+
}
859+
860+
// SetCloudRegion gets a reference to the given string and assigns it to the CloudRegion field.
853861
func (o *Backup) SetCloudRegion(v string) {
854-
o.CloudRegion = v
862+
o.CloudRegion = &v
855863
}
856864

857865
// GetEnvironmentName returns the EnvironmentName field value.
@@ -1045,8 +1053,12 @@ func (o Backup) MarshalJSON() ([]byte, error) {
10451053
if o.ClusterId != nil {
10461054
toSerialize["clusterId"] = o.ClusterId
10471055
}
1048-
toSerialize["cloudProvider"] = o.CloudProvider
1049-
toSerialize["cloudRegion"] = o.CloudRegion
1056+
if o.CloudProvider != nil {
1057+
toSerialize["cloudProvider"] = o.CloudProvider
1058+
}
1059+
if o.CloudRegion != nil {
1060+
toSerialize["cloudRegion"] = o.CloudRegion
1061+
}
10501062
toSerialize["environmentName"] = o.EnvironmentName
10511063
toSerialize["engine"] = o.Engine
10521064
if o.ParentBackupName != nil {
@@ -1093,8 +1105,8 @@ func (o *Backup) UnmarshalJSON(bytes []byte) (err error) {
10931105
Expiration common.NullableTime `json:"expiration,omitempty"`
10941106
Id *string `json:"id,omitempty"`
10951107
ClusterId *string `json:"clusterId,omitempty"`
1096-
CloudProvider *string `json:"cloudProvider"`
1097-
CloudRegion *string `json:"cloudRegion"`
1108+
CloudProvider *string `json:"cloudProvider,omitempty"`
1109+
CloudRegion *string `json:"cloudRegion,omitempty"`
10981110
EnvironmentName *string `json:"environmentName"`
10991111
Engine *string `json:"engine"`
11001112
ParentBackupName *string `json:"parentBackupName,omitempty"`
@@ -1140,12 +1152,6 @@ func (o *Backup) UnmarshalJSON(bytes []byte) (err error) {
11401152
if all.RetentionPeriod == nil {
11411153
return fmt.Errorf("required field retentionPeriod missing")
11421154
}
1143-
if all.CloudProvider == nil {
1144-
return fmt.Errorf("required field cloudProvider missing")
1145-
}
1146-
if all.CloudRegion == nil {
1147-
return fmt.Errorf("required field cloudRegion missing")
1148-
}
11491155
if all.EnvironmentName == nil {
11501156
return fmt.Errorf("required field environmentName missing")
11511157
}
@@ -1193,8 +1199,8 @@ func (o *Backup) UnmarshalJSON(bytes []byte) (err error) {
11931199
o.Expiration = all.Expiration
11941200
o.Id = all.Id
11951201
o.ClusterId = all.ClusterId
1196-
o.CloudProvider = *all.CloudProvider
1197-
o.CloudRegion = *all.CloudRegion
1202+
o.CloudProvider = all.CloudProvider
1203+
o.CloudRegion = all.CloudRegion
11981204
o.EnvironmentName = *all.EnvironmentName
11991205
o.Engine = *all.Engine
12001206
o.ParentBackupName = all.ParentBackupName

0 commit comments

Comments
 (0)