Skip to content

Commit a4fe49d

Browse files
committed
chore: auto update client api apecloud/apecloud@4104b20
1 parent 20379c6 commit a4fe49d

File tree

4 files changed

+89
-3
lines changed

4 files changed

+89
-3
lines changed

.generator/schemas/adminapi.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21346,6 +21346,10 @@ components:
2134621346
$ref: '#/components/schemas/environmentArchitecture'
2134721347
dns:
2134821348
$ref: '#/components/schemas/dns'
21349+
slaEnabled:
21350+
description: whether to enable calculate the cluster SLA for the environment
21351+
type: boolean
21352+
default: false
2134921353
environmentList:
2135021354
description: EnvironmentList is a list of Environments
2135121355
properties:
@@ -21550,6 +21554,10 @@ components:
2155021554
description: Cloud Provider
2155121555
type: string
2155221556
nullable: true
21557+
slaEnabled:
21558+
description: whether to enable calculate the cluster SLA for the environment
21559+
type: boolean
21560+
default: false
2155321561
environmentStatusHistory:
2155421562
description: EventEnvironmentState contains details for the current and previous state of the environment.
2155521563
type: object

apecloud

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 54f0be8e1469629ffebe4bad85b33596203b585c
1+
Subproject commit 4104b2012b0c64d01ccf6c8c5f0b16c352c6271f

api/kbcloud/admin/model_environment.go

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ type Environment struct {
5656
// Architecture of the environment data plane nodes (arm64, amd64, or multiarch for multiple architectures)
5757
Architecture *EnvironmentArchitecture `json:"architecture,omitempty"`
5858
Dns *Dns `json:"dns,omitempty"`
59+
// whether to enable calculate the cluster SLA for the environment
60+
SlaEnabled *bool `json:"slaEnabled,omitempty"`
5961
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
6062
UnparsedObject map[string]interface{} `json:"-"`
6163
AdditionalProperties map[string]interface{} `json:"-"`
@@ -83,6 +85,8 @@ func NewEnvironment(provider string, region string, availabilityZones []string,
8385
this.DeletePolicy = &deletePolicy
8486
var clusterValidationPolicy ClusterValidationPolicy = ClusterValidationPolicyValidateOnly
8587
this.ClusterValidationPolicy = &clusterValidationPolicy
88+
var slaEnabled bool = false
89+
this.SlaEnabled = &slaEnabled
8690
return &this
8791
}
8892

@@ -95,6 +99,8 @@ func NewEnvironmentWithDefaults() *Environment {
9599
this.DeletePolicy = &deletePolicy
96100
var clusterValidationPolicy ClusterValidationPolicy = ClusterValidationPolicyValidateOnly
97101
this.ClusterValidationPolicy = &clusterValidationPolicy
102+
var slaEnabled bool = false
103+
this.SlaEnabled = &slaEnabled
98104
return &this
99105
}
100106

@@ -654,6 +660,34 @@ func (o *Environment) SetDns(v Dns) {
654660
o.Dns = &v
655661
}
656662

663+
// GetSlaEnabled returns the SlaEnabled field value if set, zero value otherwise.
664+
func (o *Environment) GetSlaEnabled() bool {
665+
if o == nil || o.SlaEnabled == nil {
666+
var ret bool
667+
return ret
668+
}
669+
return *o.SlaEnabled
670+
}
671+
672+
// GetSlaEnabledOk returns a tuple with the SlaEnabled field value if set, nil otherwise
673+
// and a boolean to check if the value has been set.
674+
func (o *Environment) GetSlaEnabledOk() (*bool, bool) {
675+
if o == nil || o.SlaEnabled == nil {
676+
return nil, false
677+
}
678+
return o.SlaEnabled, true
679+
}
680+
681+
// HasSlaEnabled returns a boolean if a field has been set.
682+
func (o *Environment) HasSlaEnabled() bool {
683+
return o != nil && o.SlaEnabled != nil
684+
}
685+
686+
// SetSlaEnabled gets a reference to the given bool and assigns it to the SlaEnabled field.
687+
func (o *Environment) SetSlaEnabled(v bool) {
688+
o.SlaEnabled = &v
689+
}
690+
657691
// MarshalJSON serializes the struct using spec logic.
658692
func (o Environment) MarshalJSON() ([]byte, error) {
659693
toSerialize := map[string]interface{}{}
@@ -710,6 +744,9 @@ func (o Environment) MarshalJSON() ([]byte, error) {
710744
if o.Dns != nil {
711745
toSerialize["dns"] = o.Dns
712746
}
747+
if o.SlaEnabled != nil {
748+
toSerialize["slaEnabled"] = o.SlaEnabled
749+
}
713750

714751
for key, value := range o.AdditionalProperties {
715752
toSerialize[key] = value
@@ -742,6 +779,7 @@ func (o *Environment) UnmarshalJSON(bytes []byte) (err error) {
742779
ClusterValidationPolicy *ClusterValidationPolicy `json:"clusterValidationPolicy,omitempty"`
743780
Architecture *EnvironmentArchitecture `json:"architecture,omitempty"`
744781
Dns *Dns `json:"dns,omitempty"`
782+
SlaEnabled *bool `json:"slaEnabled,omitempty"`
745783
}{}
746784
if err = common.Unmarshal(bytes, &all); err != nil {
747785
return err
@@ -784,7 +822,7 @@ func (o *Environment) UnmarshalJSON(bytes []byte) (err error) {
784822
}
785823
additionalProperties := make(map[string]interface{})
786824
if err = common.Unmarshal(bytes, &additionalProperties); err == nil {
787-
common.DeleteKeys(additionalProperties, &[]string{"provider", "region", "availabilityZones", "schedulingConfig", "networkConfig", "description", "displayName", "id", "name", "organizations", "metricsMonitorEnabled", "state", "type", "provisionConfig", "autohealingConfig", "createdAt", "updatedAt", "extraInfo", "deletePolicy", "clusterValidationPolicy", "architecture", "dns"})
825+
common.DeleteKeys(additionalProperties, &[]string{"provider", "region", "availabilityZones", "schedulingConfig", "networkConfig", "description", "displayName", "id", "name", "organizations", "metricsMonitorEnabled", "state", "type", "provisionConfig", "autohealingConfig", "createdAt", "updatedAt", "extraInfo", "deletePolicy", "clusterValidationPolicy", "architecture", "dns", "slaEnabled"})
788826
} else {
789827
return err
790828
}
@@ -847,6 +885,7 @@ func (o *Environment) UnmarshalJSON(bytes []byte) (err error) {
847885
hasInvalidField = true
848886
}
849887
o.Dns = all.Dns
888+
o.SlaEnabled = all.SlaEnabled
850889

851890
if len(additionalProperties) > 0 {
852891
o.AdditionalProperties = additionalProperties

api/kbcloud/admin/model_environment_update.go

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ type EnvironmentUpdate struct {
4646
ClusterValidationPolicy *ClusterValidationPolicy `json:"clusterValidationPolicy,omitempty"`
4747
// Cloud Provider
4848
Provider common.NullableString `json:"provider,omitempty"`
49+
// whether to enable calculate the cluster SLA for the environment
50+
SlaEnabled *bool `json:"slaEnabled,omitempty"`
4951
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
5052
UnparsedObject map[string]interface{} `json:"-"`
5153
AdditionalProperties map[string]interface{} `json:"-"`
@@ -69,6 +71,8 @@ func NewEnvironmentUpdate() *EnvironmentUpdate {
6971
this.DeletePolicy = &deletePolicy
7072
var clusterValidationPolicy ClusterValidationPolicy = ClusterValidationPolicyValidateOnly
7173
this.ClusterValidationPolicy = &clusterValidationPolicy
74+
var slaEnabled bool = false
75+
this.SlaEnabled = &slaEnabled
7276
return &this
7377
}
7478

@@ -89,6 +93,8 @@ func NewEnvironmentUpdateWithDefaults() *EnvironmentUpdate {
8993
this.DeletePolicy = &deletePolicy
9094
var clusterValidationPolicy ClusterValidationPolicy = ClusterValidationPolicyValidateOnly
9195
this.ClusterValidationPolicy = &clusterValidationPolicy
96+
var slaEnabled bool = false
97+
this.SlaEnabled = &slaEnabled
9298
return &this
9399
}
94100

@@ -695,6 +701,34 @@ func (o *EnvironmentUpdate) UnsetProvider() {
695701
o.Provider.Unset()
696702
}
697703

704+
// GetSlaEnabled returns the SlaEnabled field value if set, zero value otherwise.
705+
func (o *EnvironmentUpdate) GetSlaEnabled() bool {
706+
if o == nil || o.SlaEnabled == nil {
707+
var ret bool
708+
return ret
709+
}
710+
return *o.SlaEnabled
711+
}
712+
713+
// GetSlaEnabledOk returns a tuple with the SlaEnabled field value if set, nil otherwise
714+
// and a boolean to check if the value has been set.
715+
func (o *EnvironmentUpdate) GetSlaEnabledOk() (*bool, bool) {
716+
if o == nil || o.SlaEnabled == nil {
717+
return nil, false
718+
}
719+
return o.SlaEnabled, true
720+
}
721+
722+
// HasSlaEnabled returns a boolean if a field has been set.
723+
func (o *EnvironmentUpdate) HasSlaEnabled() bool {
724+
return o != nil && o.SlaEnabled != nil
725+
}
726+
727+
// SetSlaEnabled gets a reference to the given bool and assigns it to the SlaEnabled field.
728+
func (o *EnvironmentUpdate) SetSlaEnabled(v bool) {
729+
o.SlaEnabled = &v
730+
}
731+
698732
// MarshalJSON serializes the struct using spec logic.
699733
func (o EnvironmentUpdate) MarshalJSON() ([]byte, error) {
700734
toSerialize := map[string]interface{}{}
@@ -755,6 +789,9 @@ func (o EnvironmentUpdate) MarshalJSON() ([]byte, error) {
755789
if o.Provider.IsSet() {
756790
toSerialize["provider"] = o.Provider.Get()
757791
}
792+
if o.SlaEnabled != nil {
793+
toSerialize["slaEnabled"] = o.SlaEnabled
794+
}
758795

759796
for key, value := range o.AdditionalProperties {
760797
toSerialize[key] = value
@@ -783,13 +820,14 @@ func (o *EnvironmentUpdate) UnmarshalJSON(bytes []byte) (err error) {
783820
DeletePolicy *EnvironmentDeletePolicy `json:"deletePolicy,omitempty"`
784821
ClusterValidationPolicy *ClusterValidationPolicy `json:"clusterValidationPolicy,omitempty"`
785822
Provider common.NullableString `json:"provider,omitempty"`
823+
SlaEnabled *bool `json:"slaEnabled,omitempty"`
786824
}{}
787825
if err = common.Unmarshal(bytes, &all); err != nil {
788826
return err
789827
}
790828
additionalProperties := make(map[string]interface{})
791829
if err = common.Unmarshal(bytes, &additionalProperties); err == nil {
792-
common.DeleteKeys(additionalProperties, &[]string{"description", "displayName", "type", "organizations", "namespaces", "cpuOverCommitRatio", "memoryOverCommitRatio", "autohealingConfig", "defaultStorageClass", "podAntiAffinityEnabled", "imageRegistry", "nodePortEnabled", "lbEnabled", "internetLBEnabled", "networkModes", "deletePolicy", "clusterValidationPolicy", "provider"})
830+
common.DeleteKeys(additionalProperties, &[]string{"description", "displayName", "type", "organizations", "namespaces", "cpuOverCommitRatio", "memoryOverCommitRatio", "autohealingConfig", "defaultStorageClass", "podAntiAffinityEnabled", "imageRegistry", "nodePortEnabled", "lbEnabled", "internetLBEnabled", "networkModes", "deletePolicy", "clusterValidationPolicy", "provider", "slaEnabled"})
793831
} else {
794832
return err
795833
}
@@ -828,6 +866,7 @@ func (o *EnvironmentUpdate) UnmarshalJSON(bytes []byte) (err error) {
828866
o.ClusterValidationPolicy = all.ClusterValidationPolicy
829867
}
830868
o.Provider = all.Provider
869+
o.SlaEnabled = all.SlaEnabled
831870

832871
if len(additionalProperties) > 0 {
833872
o.AdditionalProperties = additionalProperties

0 commit comments

Comments
 (0)