@@ -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) .
7070func (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.
8081func (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.
8889func (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.
9394func (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) {
117128func (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