44
55package kbcloud
66
7- import "github.com/apecloud/kb-cloud-client-go/api/common"
7+ import (
8+ "github.com/apecloud/kb-cloud-client-go/api/common"
9+ )
810
911type KubeblocksEndpoint struct {
10- EnvironmentId * string `json:"environmentID,omitempty"`
11- EnvironmentName * string `json:"environmentName,omitempty"`
12- ClusterId * string `json:"clusterID,omitempty"`
13- ClusterName * string `json:"clusterName,omitempty"`
12+ EnvironmentId * string `json:"environmentID,omitempty"`
13+ EnvironmentName * string `json:"environmentName,omitempty"`
14+ ClusterId * string `json:"clusterID,omitempty"`
15+ ClusterName * string `json:"clusterName,omitempty"`
16+ DisplayName common.NullableString `json:"displayName,omitempty"`
1417 // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
1518 UnparsedObject map [string ]interface {} `json:"-"`
1619 AdditionalProperties map [string ]interface {} `json:"-"`
@@ -145,6 +148,45 @@ func (o *KubeblocksEndpoint) SetClusterName(v string) {
145148 o .ClusterName = & v
146149}
147150
151+ // GetDisplayName returns the DisplayName field value if set, zero value otherwise (both if not set or set to explicit null).
152+ func (o * KubeblocksEndpoint ) GetDisplayName () string {
153+ if o == nil || o .DisplayName .Get () == nil {
154+ var ret string
155+ return ret
156+ }
157+ return * o .DisplayName .Get ()
158+ }
159+
160+ // GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
161+ // and a boolean to check if the value has been set.
162+ // NOTE: If the value is an explicit nil, `nil, true` will be returned.
163+ func (o * KubeblocksEndpoint ) GetDisplayNameOk () (* string , bool ) {
164+ if o == nil {
165+ return nil , false
166+ }
167+ return o .DisplayName .Get (), o .DisplayName .IsSet ()
168+ }
169+
170+ // HasDisplayName returns a boolean if a field has been set.
171+ func (o * KubeblocksEndpoint ) HasDisplayName () bool {
172+ return o != nil && o .DisplayName .IsSet ()
173+ }
174+
175+ // SetDisplayName gets a reference to the given common.NullableString and assigns it to the DisplayName field.
176+ func (o * KubeblocksEndpoint ) SetDisplayName (v string ) {
177+ o .DisplayName .Set (& v )
178+ }
179+
180+ // SetDisplayNameNil sets the value for DisplayName to be an explicit nil.
181+ func (o * KubeblocksEndpoint ) SetDisplayNameNil () {
182+ o .DisplayName .Set (nil )
183+ }
184+
185+ // UnsetDisplayName ensures that no value is present for DisplayName, not even an explicit nil.
186+ func (o * KubeblocksEndpoint ) UnsetDisplayName () {
187+ o .DisplayName .Unset ()
188+ }
189+
148190// MarshalJSON serializes the struct using spec logic.
149191func (o KubeblocksEndpoint ) MarshalJSON () ([]byte , error ) {
150192 toSerialize := map [string ]interface {}{}
@@ -163,6 +205,9 @@ func (o KubeblocksEndpoint) MarshalJSON() ([]byte, error) {
163205 if o .ClusterName != nil {
164206 toSerialize ["clusterName" ] = o .ClusterName
165207 }
208+ if o .DisplayName .IsSet () {
209+ toSerialize ["displayName" ] = o .DisplayName .Get ()
210+ }
166211
167212 for key , value := range o .AdditionalProperties {
168213 toSerialize [key ] = value
@@ -173,24 +218,26 @@ func (o KubeblocksEndpoint) MarshalJSON() ([]byte, error) {
173218// UnmarshalJSON deserializes the given payload.
174219func (o * KubeblocksEndpoint ) UnmarshalJSON (bytes []byte ) (err error ) {
175220 all := struct {
176- EnvironmentId * string `json:"environmentID,omitempty"`
177- EnvironmentName * string `json:"environmentName,omitempty"`
178- ClusterId * string `json:"clusterID,omitempty"`
179- ClusterName * string `json:"clusterName,omitempty"`
221+ EnvironmentId * string `json:"environmentID,omitempty"`
222+ EnvironmentName * string `json:"environmentName,omitempty"`
223+ ClusterId * string `json:"clusterID,omitempty"`
224+ ClusterName * string `json:"clusterName,omitempty"`
225+ DisplayName common.NullableString `json:"displayName,omitempty"`
180226 }{}
181227 if err = common .Unmarshal (bytes , & all ); err != nil {
182228 return err
183229 }
184230 additionalProperties := make (map [string ]interface {})
185231 if err = common .Unmarshal (bytes , & additionalProperties ); err == nil {
186- common .DeleteKeys (additionalProperties , & []string {"environmentID" , "environmentName" , "clusterID" , "clusterName" })
232+ common .DeleteKeys (additionalProperties , & []string {"environmentID" , "environmentName" , "clusterID" , "clusterName" , "displayName" })
187233 } else {
188234 return err
189235 }
190236 o .EnvironmentId = all .EnvironmentId
191237 o .EnvironmentName = all .EnvironmentName
192238 o .ClusterId = all .ClusterId
193239 o .ClusterName = all .ClusterName
240+ o .DisplayName = all .DisplayName
194241
195242 if len (additionalProperties ) > 0 {
196243 o .AdditionalProperties = additionalProperties
0 commit comments