Skip to content

Commit 9181d0f

Browse files
committed
chore: auto update client api apecloud/apecloud@149226e
1 parent 274332c commit 9181d0f

File tree

5 files changed

+49
-25
lines changed

5 files changed

+49
-25
lines changed

.generator/schemas/adminapi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15562,6 +15562,7 @@ components:
1556215562
displayName:
1556315563
description: Display name of cluster.
1556415564
type: string
15565+
nullable: true
1556515566
description: ClusterUpdate is the payload to update a KubeBlocks cluster
1556615567
instanceStorageItem:
1556715568
description: Instance storage information

.generator/schemas/openapi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12963,6 +12963,7 @@ components:
1296312963
displayName:
1296412964
description: Display name of cluster.
1296512965
type: string
12966+
nullable: true
1296612967
description: ClusterUpdate is the payload to update a KubeBlocks cluster
1296712968
instanceStorageItem:
1296812969
description: Instance storage information

apecloud

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 124dc702218759120706056e07fcf149c378184b
1+
Subproject commit 149226e9cde7e71b50ea0a088cccc424dc88e002

api/kbcloud/admin/model_cluster_update.go

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type ClusterUpdate struct {
1111
// The termination policy of cluster.
1212
TerminationPolicy *ClusterTerminationPolicy `json:"terminationPolicy,omitempty"`
1313
// Display name of cluster.
14-
DisplayName *string `json:"displayName,omitempty"`
14+
DisplayName common.NullableString `json:"displayName,omitempty"`
1515
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
1616
UnparsedObject map[string]interface{} `json:"-"`
1717
AdditionalProperties map[string]interface{} `json:"-"`
@@ -66,32 +66,43 @@ func (o *ClusterUpdate) SetTerminationPolicy(v ClusterTerminationPolicy) {
6666
o.TerminationPolicy = &v
6767
}
6868

69-
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
69+
// GetDisplayName returns the DisplayName field value if set, zero value otherwise (both if not set or set to explicit null).
7070
func (o *ClusterUpdate) GetDisplayName() string {
71-
if o == nil || o.DisplayName == nil {
71+
if o == nil || o.DisplayName.Get() == nil {
7272
var ret string
7373
return ret
7474
}
75-
return *o.DisplayName
75+
return *o.DisplayName.Get()
7676
}
7777

7878
// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
7979
// and a boolean to check if the value has been set.
80+
// NOTE: If the value is an explicit nil, `nil, true` will be returned.
8081
func (o *ClusterUpdate) GetDisplayNameOk() (*string, bool) {
81-
if o == nil || o.DisplayName == nil {
82+
if o == nil {
8283
return nil, false
8384
}
84-
return o.DisplayName, true
85+
return o.DisplayName.Get(), o.DisplayName.IsSet()
8586
}
8687

8788
// HasDisplayName returns a boolean if a field has been set.
8889
func (o *ClusterUpdate) HasDisplayName() bool {
89-
return o != nil && o.DisplayName != nil
90+
return o != nil && o.DisplayName.IsSet()
9091
}
9192

92-
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
93+
// SetDisplayName gets a reference to the given common.NullableString and assigns it to the DisplayName field.
9394
func (o *ClusterUpdate) SetDisplayName(v string) {
94-
o.DisplayName = &v
95+
o.DisplayName.Set(&v)
96+
}
97+
98+
// SetDisplayNameNil sets the value for DisplayName to be an explicit nil.
99+
func (o *ClusterUpdate) SetDisplayNameNil() {
100+
o.DisplayName.Set(nil)
101+
}
102+
103+
// UnsetDisplayName ensures that no value is present for DisplayName, not even an explicit nil.
104+
func (o *ClusterUpdate) UnsetDisplayName() {
105+
o.DisplayName.Unset()
95106
}
96107

97108
// MarshalJSON serializes the struct using spec logic.
@@ -103,8 +114,8 @@ func (o ClusterUpdate) MarshalJSON() ([]byte, error) {
103114
if o.TerminationPolicy != nil {
104115
toSerialize["terminationPolicy"] = o.TerminationPolicy
105116
}
106-
if o.DisplayName != nil {
107-
toSerialize["displayName"] = o.DisplayName
117+
if o.DisplayName.IsSet() {
118+
toSerialize["displayName"] = o.DisplayName.Get()
108119
}
109120

110121
for key, value := range o.AdditionalProperties {
@@ -117,7 +128,7 @@ func (o ClusterUpdate) MarshalJSON() ([]byte, error) {
117128
func (o *ClusterUpdate) UnmarshalJSON(bytes []byte) (err error) {
118129
all := struct {
119130
TerminationPolicy *ClusterTerminationPolicy `json:"terminationPolicy,omitempty"`
120-
DisplayName *string `json:"displayName,omitempty"`
131+
DisplayName common.NullableString `json:"displayName,omitempty"`
121132
}{}
122133
if err = common.Unmarshal(bytes, &all); err != nil {
123134
return err

api/kbcloud/model_cluster_update.go

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type ClusterUpdate struct {
1111
// The termination policy of cluster.
1212
TerminationPolicy *ClusterTerminationPolicy `json:"terminationPolicy,omitempty"`
1313
// Display name of cluster.
14-
DisplayName *string `json:"displayName,omitempty"`
14+
DisplayName common.NullableString `json:"displayName,omitempty"`
1515
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
1616
UnparsedObject map[string]interface{} `json:"-"`
1717
AdditionalProperties map[string]interface{} `json:"-"`
@@ -66,32 +66,43 @@ func (o *ClusterUpdate) SetTerminationPolicy(v ClusterTerminationPolicy) {
6666
o.TerminationPolicy = &v
6767
}
6868

69-
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
69+
// GetDisplayName returns the DisplayName field value if set, zero value otherwise (both if not set or set to explicit null).
7070
func (o *ClusterUpdate) GetDisplayName() string {
71-
if o == nil || o.DisplayName == nil {
71+
if o == nil || o.DisplayName.Get() == nil {
7272
var ret string
7373
return ret
7474
}
75-
return *o.DisplayName
75+
return *o.DisplayName.Get()
7676
}
7777

7878
// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
7979
// and a boolean to check if the value has been set.
80+
// NOTE: If the value is an explicit nil, `nil, true` will be returned.
8081
func (o *ClusterUpdate) GetDisplayNameOk() (*string, bool) {
81-
if o == nil || o.DisplayName == nil {
82+
if o == nil {
8283
return nil, false
8384
}
84-
return o.DisplayName, true
85+
return o.DisplayName.Get(), o.DisplayName.IsSet()
8586
}
8687

8788
// HasDisplayName returns a boolean if a field has been set.
8889
func (o *ClusterUpdate) HasDisplayName() bool {
89-
return o != nil && o.DisplayName != nil
90+
return o != nil && o.DisplayName.IsSet()
9091
}
9192

92-
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
93+
// SetDisplayName gets a reference to the given common.NullableString and assigns it to the DisplayName field.
9394
func (o *ClusterUpdate) SetDisplayName(v string) {
94-
o.DisplayName = &v
95+
o.DisplayName.Set(&v)
96+
}
97+
98+
// SetDisplayNameNil sets the value for DisplayName to be an explicit nil.
99+
func (o *ClusterUpdate) SetDisplayNameNil() {
100+
o.DisplayName.Set(nil)
101+
}
102+
103+
// UnsetDisplayName ensures that no value is present for DisplayName, not even an explicit nil.
104+
func (o *ClusterUpdate) UnsetDisplayName() {
105+
o.DisplayName.Unset()
95106
}
96107

97108
// MarshalJSON serializes the struct using spec logic.
@@ -103,8 +114,8 @@ func (o ClusterUpdate) MarshalJSON() ([]byte, error) {
103114
if o.TerminationPolicy != nil {
104115
toSerialize["terminationPolicy"] = o.TerminationPolicy
105116
}
106-
if o.DisplayName != nil {
107-
toSerialize["displayName"] = o.DisplayName
117+
if o.DisplayName.IsSet() {
118+
toSerialize["displayName"] = o.DisplayName.Get()
108119
}
109120

110121
for key, value := range o.AdditionalProperties {
@@ -117,7 +128,7 @@ func (o ClusterUpdate) MarshalJSON() ([]byte, error) {
117128
func (o *ClusterUpdate) UnmarshalJSON(bytes []byte) (err error) {
118129
all := struct {
119130
TerminationPolicy *ClusterTerminationPolicy `json:"terminationPolicy,omitempty"`
120-
DisplayName *string `json:"displayName,omitempty"`
131+
DisplayName common.NullableString `json:"displayName,omitempty"`
121132
}{}
122133
if err = common.Unmarshal(bytes, &all); err != nil {
123134
return err

0 commit comments

Comments
 (0)