Skip to content

Commit 861d1e4

Browse files
committed
chore: auto update client api apecloud/apecloud@7d3d52b
1 parent 4666213 commit 861d1e4

File tree

5 files changed

+49
-53
lines changed

5 files changed

+49
-53
lines changed

.generator/schemas/adminapi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23767,6 +23767,7 @@ components:
2376723767
- name
2376823768
- title
2376923769
- order
23770+
- version
2377023771
properties:
2377123772
cloudShellType:
2377223773
type: string

.generator/schemas/openapi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18485,6 +18485,7 @@ components:
1848518485
- name
1848618486
- title
1848718487
- order
18488+
- version
1848818489
properties:
1848918490
cloudShellType:
1849018491
type: string

apecloud

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 85affb9f4d38e67ba24c82c189f2eb331c01959a
1+
Subproject commit 7d3d52bcca9b37aff40e760f261c191151dfeb0f

api/kbcloud/admin/model_component_option.go

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ type ComponentOption struct {
1818
// Determine whether the componentDef of kb-cluster belongs to this component type through this matching regularization.
1919
// if not set, componentDef must be equal to component type.
2020
//
21-
MatchRegex *string `json:"matchRegex,omitempty"`
22-
Title LocalizedDescription `json:"title"`
23-
Order int32 `json:"order"`
24-
RoleOrder []string `json:"roleOrder,omitempty"`
25-
DisasterRecoveryRoleOrder []string `json:"disasterRecoveryRoleOrder,omitempty"`
26-
Version *ComponentOptionVersion `json:"version,omitempty"`
21+
MatchRegex *string `json:"matchRegex,omitempty"`
22+
Title LocalizedDescription `json:"title"`
23+
Order int32 `json:"order"`
24+
RoleOrder []string `json:"roleOrder,omitempty"`
25+
DisasterRecoveryRoleOrder []string `json:"disasterRecoveryRoleOrder,omitempty"`
26+
Version ComponentOptionVersion `json:"version"`
2727
// Main component flag
2828
Main *bool `json:"main,omitempty"`
2929
// whether the component supports custom secret
@@ -37,11 +37,12 @@ type ComponentOption struct {
3737
// This constructor will assign default values to properties that have it defined,
3838
// and makes sure properties required by API are set, but the set of arguments
3939
// will change when the set of required properties is changed.
40-
func NewComponentOption(name string, title LocalizedDescription, order int32) *ComponentOption {
40+
func NewComponentOption(name string, title LocalizedDescription, order int32, version ComponentOptionVersion) *ComponentOption {
4141
this := ComponentOption{}
4242
this.Name = name
4343
this.Title = title
4444
this.Order = order
45+
this.Version = version
4546
return &this
4647
}
4748

@@ -234,32 +235,27 @@ func (o *ComponentOption) SetDisasterRecoveryRoleOrder(v []string) {
234235
o.DisasterRecoveryRoleOrder = v
235236
}
236237

237-
// GetVersion returns the Version field value if set, zero value otherwise.
238+
// GetVersion returns the Version field value.
238239
func (o *ComponentOption) GetVersion() ComponentOptionVersion {
239-
if o == nil || o.Version == nil {
240+
if o == nil {
240241
var ret ComponentOptionVersion
241242
return ret
242243
}
243-
return *o.Version
244+
return o.Version
244245
}
245246

246-
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
247+
// GetVersionOk returns a tuple with the Version field value
247248
// and a boolean to check if the value has been set.
248249
func (o *ComponentOption) GetVersionOk() (*ComponentOptionVersion, bool) {
249-
if o == nil || o.Version == nil {
250+
if o == nil {
250251
return nil, false
251252
}
252-
return o.Version, true
253-
}
254-
255-
// HasVersion returns a boolean if a field has been set.
256-
func (o *ComponentOption) HasVersion() bool {
257-
return o != nil && o.Version != nil
253+
return &o.Version, true
258254
}
259255

260-
// SetVersion gets a reference to the given ComponentOptionVersion and assigns it to the Version field.
256+
// SetVersion sets field value.
261257
func (o *ComponentOption) SetVersion(v ComponentOptionVersion) {
262-
o.Version = &v
258+
o.Version = v
263259
}
264260

265261
// GetMain returns the Main field value if set, zero value otherwise.
@@ -339,9 +335,7 @@ func (o ComponentOption) MarshalJSON() ([]byte, error) {
339335
if o.DisasterRecoveryRoleOrder != nil {
340336
toSerialize["disasterRecoveryRoleOrder"] = o.DisasterRecoveryRoleOrder
341337
}
342-
if o.Version != nil {
343-
toSerialize["version"] = o.Version
344-
}
338+
toSerialize["version"] = o.Version
345339
if o.Main != nil {
346340
toSerialize["main"] = o.Main
347341
}
@@ -365,7 +359,7 @@ func (o *ComponentOption) UnmarshalJSON(bytes []byte) (err error) {
365359
Order *int32 `json:"order"`
366360
RoleOrder []string `json:"roleOrder,omitempty"`
367361
DisasterRecoveryRoleOrder []string `json:"disasterRecoveryRoleOrder,omitempty"`
368-
Version *ComponentOptionVersion `json:"version,omitempty"`
362+
Version *ComponentOptionVersion `json:"version"`
369363
Main *bool `json:"main,omitempty"`
370364
CustomSecret *bool `json:"customSecret,omitempty"`
371365
}{}
@@ -381,6 +375,9 @@ func (o *ComponentOption) UnmarshalJSON(bytes []byte) (err error) {
381375
if all.Order == nil {
382376
return fmt.Errorf("required field order missing")
383377
}
378+
if all.Version == nil {
379+
return fmt.Errorf("required field version missing")
380+
}
384381
additionalProperties := make(map[string]interface{})
385382
if err = common.Unmarshal(bytes, &additionalProperties); err == nil {
386383
common.DeleteKeys(additionalProperties, &[]string{"cloudShellType", "name", "matchRegex", "title", "order", "roleOrder", "disasterRecoveryRoleOrder", "version", "main", "customSecret"})
@@ -399,10 +396,10 @@ func (o *ComponentOption) UnmarshalJSON(bytes []byte) (err error) {
399396
o.Order = *all.Order
400397
o.RoleOrder = all.RoleOrder
401398
o.DisasterRecoveryRoleOrder = all.DisasterRecoveryRoleOrder
402-
if all.Version != nil && all.Version.UnparsedObject != nil && o.UnparsedObject == nil {
399+
if all.Version.UnparsedObject != nil && o.UnparsedObject == nil {
403400
hasInvalidField = true
404401
}
405-
o.Version = all.Version
402+
o.Version = *all.Version
406403
o.Main = all.Main
407404
o.CustomSecret = all.CustomSecret
408405

api/kbcloud/model_component_option.go

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ type ComponentOption struct {
1818
// Determine whether the componentDef of kb-cluster belongs to this component type through this matching regularization.
1919
// if not set, componentDef must be equal to component type.
2020
//
21-
MatchRegex *string `json:"matchRegex,omitempty"`
22-
Title LocalizedDescription `json:"title"`
23-
Order int32 `json:"order"`
24-
RoleOrder []string `json:"roleOrder,omitempty"`
25-
DisasterRecoveryRoleOrder []string `json:"disasterRecoveryRoleOrder,omitempty"`
26-
Version *ComponentOptionVersion `json:"version,omitempty"`
21+
MatchRegex *string `json:"matchRegex,omitempty"`
22+
Title LocalizedDescription `json:"title"`
23+
Order int32 `json:"order"`
24+
RoleOrder []string `json:"roleOrder,omitempty"`
25+
DisasterRecoveryRoleOrder []string `json:"disasterRecoveryRoleOrder,omitempty"`
26+
Version ComponentOptionVersion `json:"version"`
2727
// Main component flag
2828
Main *bool `json:"main,omitempty"`
2929
// whether the component supports custom secret
@@ -37,11 +37,12 @@ type ComponentOption struct {
3737
// This constructor will assign default values to properties that have it defined,
3838
// and makes sure properties required by API are set, but the set of arguments
3939
// will change when the set of required properties is changed.
40-
func NewComponentOption(name string, title LocalizedDescription, order int32) *ComponentOption {
40+
func NewComponentOption(name string, title LocalizedDescription, order int32, version ComponentOptionVersion) *ComponentOption {
4141
this := ComponentOption{}
4242
this.Name = name
4343
this.Title = title
4444
this.Order = order
45+
this.Version = version
4546
return &this
4647
}
4748

@@ -234,32 +235,27 @@ func (o *ComponentOption) SetDisasterRecoveryRoleOrder(v []string) {
234235
o.DisasterRecoveryRoleOrder = v
235236
}
236237

237-
// GetVersion returns the Version field value if set, zero value otherwise.
238+
// GetVersion returns the Version field value.
238239
func (o *ComponentOption) GetVersion() ComponentOptionVersion {
239-
if o == nil || o.Version == nil {
240+
if o == nil {
240241
var ret ComponentOptionVersion
241242
return ret
242243
}
243-
return *o.Version
244+
return o.Version
244245
}
245246

246-
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
247+
// GetVersionOk returns a tuple with the Version field value
247248
// and a boolean to check if the value has been set.
248249
func (o *ComponentOption) GetVersionOk() (*ComponentOptionVersion, bool) {
249-
if o == nil || o.Version == nil {
250+
if o == nil {
250251
return nil, false
251252
}
252-
return o.Version, true
253-
}
254-
255-
// HasVersion returns a boolean if a field has been set.
256-
func (o *ComponentOption) HasVersion() bool {
257-
return o != nil && o.Version != nil
253+
return &o.Version, true
258254
}
259255

260-
// SetVersion gets a reference to the given ComponentOptionVersion and assigns it to the Version field.
256+
// SetVersion sets field value.
261257
func (o *ComponentOption) SetVersion(v ComponentOptionVersion) {
262-
o.Version = &v
258+
o.Version = v
263259
}
264260

265261
// GetMain returns the Main field value if set, zero value otherwise.
@@ -339,9 +335,7 @@ func (o ComponentOption) MarshalJSON() ([]byte, error) {
339335
if o.DisasterRecoveryRoleOrder != nil {
340336
toSerialize["disasterRecoveryRoleOrder"] = o.DisasterRecoveryRoleOrder
341337
}
342-
if o.Version != nil {
343-
toSerialize["version"] = o.Version
344-
}
338+
toSerialize["version"] = o.Version
345339
if o.Main != nil {
346340
toSerialize["main"] = o.Main
347341
}
@@ -365,7 +359,7 @@ func (o *ComponentOption) UnmarshalJSON(bytes []byte) (err error) {
365359
Order *int32 `json:"order"`
366360
RoleOrder []string `json:"roleOrder,omitempty"`
367361
DisasterRecoveryRoleOrder []string `json:"disasterRecoveryRoleOrder,omitempty"`
368-
Version *ComponentOptionVersion `json:"version,omitempty"`
362+
Version *ComponentOptionVersion `json:"version"`
369363
Main *bool `json:"main,omitempty"`
370364
CustomSecret *bool `json:"customSecret,omitempty"`
371365
}{}
@@ -381,6 +375,9 @@ func (o *ComponentOption) UnmarshalJSON(bytes []byte) (err error) {
381375
if all.Order == nil {
382376
return fmt.Errorf("required field order missing")
383377
}
378+
if all.Version == nil {
379+
return fmt.Errorf("required field version missing")
380+
}
384381
additionalProperties := make(map[string]interface{})
385382
if err = common.Unmarshal(bytes, &additionalProperties); err == nil {
386383
common.DeleteKeys(additionalProperties, &[]string{"cloudShellType", "name", "matchRegex", "title", "order", "roleOrder", "disasterRecoveryRoleOrder", "version", "main", "customSecret"})
@@ -399,10 +396,10 @@ func (o *ComponentOption) UnmarshalJSON(bytes []byte) (err error) {
399396
o.Order = *all.Order
400397
o.RoleOrder = all.RoleOrder
401398
o.DisasterRecoveryRoleOrder = all.DisasterRecoveryRoleOrder
402-
if all.Version != nil && all.Version.UnparsedObject != nil && o.UnparsedObject == nil {
399+
if all.Version.UnparsedObject != nil && o.UnparsedObject == nil {
403400
hasInvalidField = true
404401
}
405-
o.Version = all.Version
402+
o.Version = *all.Version
406403
o.Main = all.Main
407404
o.CustomSecret = all.CustomSecret
408405

0 commit comments

Comments
 (0)