@@ -14,6 +14,7 @@ import (
1414type OpsExpose struct {
1515 Component string `json:"component"`
1616 Enable bool `json:"enable"`
17+ Readonly * bool `json:"readonly,omitempty"`
1718 // Specifies the type of exposure for the KubeBlocks cluster.
1819 Type OpsExposeType `json:"type"`
1920 // Specifies the type of service for the KubeBlocks cluster.
@@ -94,6 +95,34 @@ func (o *OpsExpose) SetEnable(v bool) {
9495 o .Enable = v
9596}
9697
98+ // GetReadonly returns the Readonly field value if set, zero value otherwise.
99+ func (o * OpsExpose ) GetReadonly () bool {
100+ if o == nil || o .Readonly == nil {
101+ var ret bool
102+ return ret
103+ }
104+ return * o .Readonly
105+ }
106+
107+ // GetReadonlyOk returns a tuple with the Readonly field value if set, nil otherwise
108+ // and a boolean to check if the value has been set.
109+ func (o * OpsExpose ) GetReadonlyOk () (* bool , bool ) {
110+ if o == nil || o .Readonly == nil {
111+ return nil , false
112+ }
113+ return o .Readonly , true
114+ }
115+
116+ // HasReadonly returns a boolean if a field has been set.
117+ func (o * OpsExpose ) HasReadonly () bool {
118+ return o != nil && o .Readonly != nil
119+ }
120+
121+ // SetReadonly gets a reference to the given bool and assigns it to the Readonly field.
122+ func (o * OpsExpose ) SetReadonly (v bool ) {
123+ o .Readonly = & v
124+ }
125+
97126// GetType returns the Type field value.
98127func (o * OpsExpose ) GetType () OpsExposeType {
99128 if o == nil {
@@ -181,6 +210,9 @@ func (o OpsExpose) MarshalJSON() ([]byte, error) {
181210 }
182211 toSerialize ["component" ] = o .Component
183212 toSerialize ["enable" ] = o .Enable
213+ if o .Readonly != nil {
214+ toSerialize ["readonly" ] = o .Readonly
215+ }
184216 toSerialize ["type" ] = o .Type
185217 if o .VpcServiceType != nil {
186218 toSerialize ["vpcServiceType" ] = o .VpcServiceType
@@ -200,6 +232,7 @@ func (o *OpsExpose) UnmarshalJSON(bytes []byte) (err error) {
200232 all := struct {
201233 Component * string `json:"component"`
202234 Enable * bool `json:"enable"`
235+ Readonly * bool `json:"readonly,omitempty"`
203236 Type * OpsExposeType `json:"type"`
204237 VpcServiceType * OpsExposeVPCServiceType `json:"vpcServiceType,omitempty"`
205238 PortsMapping []OpsExposePortsMappingItem `json:"portsMapping,omitempty"`
@@ -218,14 +251,15 @@ func (o *OpsExpose) UnmarshalJSON(bytes []byte) (err error) {
218251 }
219252 additionalProperties := make (map [string ]interface {})
220253 if err = common .Unmarshal (bytes , & additionalProperties ); err == nil {
221- common .DeleteKeys (additionalProperties , & []string {"component" , "enable" , "type" , "vpcServiceType" , "portsMapping" })
254+ common .DeleteKeys (additionalProperties , & []string {"component" , "enable" , "readonly" , " type" , "vpcServiceType" , "portsMapping" })
222255 } else {
223256 return err
224257 }
225258
226259 hasInvalidField := false
227260 o .Component = * all .Component
228261 o .Enable = * all .Enable
262+ o .Readonly = all .Readonly
229263 if ! all .Type .IsValid () {
230264 hasInvalidField = true
231265 } else {
0 commit comments