Skip to content

Commit 8e358c2

Browse files
committed
chore: auto update client api apecloud/apecloud@fc15540
1 parent 0d7b663 commit 8e358c2

File tree

10 files changed

+407
-93
lines changed

10 files changed

+407
-93
lines changed

.generator/schemas/adminapi.yaml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16689,6 +16689,9 @@ components:
1668916689
type: string
1669016690
format: date-time
1669116691
description: The time the organization was created.
16692+
description:
16693+
type: string
16694+
description: The description of the organization.
1669216695
organizationList:
1669316696
description: Organization list.
1669416697
type: object
@@ -16903,6 +16906,15 @@ components:
1690316906
required:
1690416907
- items
1690516908
type: object
16909+
localizedDescription:
16910+
type: object
16911+
properties:
16912+
zh-CN:
16913+
type: string
16914+
x-nullable: true
16915+
en-US:
16916+
type: string
16917+
x-nullable: true
1690616918
role:
1690716919
description: Role information
1690816920
type: object
@@ -16914,8 +16926,7 @@ components:
1691416926
description: The type of the role
1691516927
type: string
1691616928
description:
16917-
description: The description of the role
16918-
type: string
16929+
$ref: '#/components/schemas/localizedDescription'
1691916930
createdAt:
1692016931
description: The time when the role was created. Read-Only
1692116932
format: date-time
@@ -16924,6 +16935,8 @@ components:
1692416935
description: The time when the role was updated. Read-Only
1692516936
format: date-time
1692616937
type: string
16938+
displayName:
16939+
$ref: '#/components/schemas/localizedDescription'
1692716940
roleList:
1692816941
description: RoleList is a list of Roles
1692916942
properties:
@@ -16942,27 +16955,20 @@ components:
1694216955
name:
1694316956
description: The name of the role
1694416957
type: string
16958+
displayName:
16959+
$ref: '#/components/schemas/localizedDescription'
1694516960
description:
16946-
description: The description of the role
16947-
type: string
16961+
$ref: '#/components/schemas/localizedDescription'
1694816962
required:
1694916963
- name
1695016964
roleUpdate:
1695116965
description: Role update
1695216966
type: object
1695316967
properties:
16968+
displayName:
16969+
$ref: '#/components/schemas/localizedDescription'
1695416970
description:
16955-
description: The description of the role
16956-
type: string
16957-
localizedDescription:
16958-
type: object
16959-
properties:
16960-
zh-CN:
16961-
type: string
16962-
x-nullable: true
16963-
en-US:
16964-
type: string
16965-
x-nullable: true
16971+
$ref: '#/components/schemas/localizedDescription'
1696616972
orgParameter:
1696716973
description: org parameter item
1696816974
type: object

.generator/schemas/openapi.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20765,8 +20765,7 @@ components:
2076520765
description: The type of the role
2076620766
type: string
2076720767
description:
20768-
description: The description of the role
20769-
type: string
20768+
$ref: '#/components/schemas/localizedDescription'
2077020769
createdAt:
2077120770
description: The time when the role was created. Read-Only
2077220771
format: date-time
@@ -20775,6 +20774,8 @@ components:
2077520774
description: The time when the role was updated. Read-Only
2077620775
format: date-time
2077720776
type: string
20777+
displayName:
20778+
$ref: '#/components/schemas/localizedDescription'
2077820779
roleList:
2077920780
description: RoleList is a list of Roles
2078020781
properties:
@@ -20793,18 +20794,20 @@ components:
2079320794
name:
2079420795
description: The name of the role
2079520796
type: string
20797+
displayName:
20798+
$ref: '#/components/schemas/localizedDescription'
2079620799
description:
20797-
description: The description of the role
20798-
type: string
20800+
$ref: '#/components/schemas/localizedDescription'
2079920801
required:
2080020802
- name
2080120803
roleUpdate:
2080220804
description: Role update
2080320805
type: object
2080420806
properties:
20807+
displayName:
20808+
$ref: '#/components/schemas/localizedDescription'
2080520809
description:
20806-
description: The description of the role
20807-
type: string
20810+
$ref: '#/components/schemas/localizedDescription'
2080820811
class:
2080920812
type: object
2081020813
required:

apecloud

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 215b8b9c5baf7e71fc2abe1a8daf6404edfa33e8
1+
Subproject commit fc15540fdb3feb47489f5c2ccbb00d902c4765b0

api/kbcloud/admin/model_organization_item.go

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ type OrganizationItem struct {
2525
ClusterTotal int32 `json:"clusterTotal"`
2626
// The time the organization was created.
2727
CreatedAt time.Time `json:"createdAt"`
28+
// The description of the organization.
29+
Description *string `json:"description,omitempty"`
2830
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
2931
UnparsedObject map[string]interface{} `json:"-"`
3032
AdditionalProperties map[string]interface{} `json:"-"`
@@ -199,6 +201,34 @@ func (o *OrganizationItem) SetCreatedAt(v time.Time) {
199201
o.CreatedAt = v
200202
}
201203

204+
// GetDescription returns the Description field value if set, zero value otherwise.
205+
func (o *OrganizationItem) GetDescription() string {
206+
if o == nil || o.Description == nil {
207+
var ret string
208+
return ret
209+
}
210+
return *o.Description
211+
}
212+
213+
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
214+
// and a boolean to check if the value has been set.
215+
func (o *OrganizationItem) GetDescriptionOk() (*string, bool) {
216+
if o == nil || o.Description == nil {
217+
return nil, false
218+
}
219+
return o.Description, true
220+
}
221+
222+
// HasDescription returns a boolean if a field has been set.
223+
func (o *OrganizationItem) HasDescription() bool {
224+
return o != nil && o.Description != nil
225+
}
226+
227+
// SetDescription gets a reference to the given string and assigns it to the Description field.
228+
func (o *OrganizationItem) SetDescription(v string) {
229+
o.Description = &v
230+
}
231+
202232
// MarshalJSON serializes the struct using spec logic.
203233
func (o OrganizationItem) MarshalJSON() ([]byte, error) {
204234
toSerialize := map[string]interface{}{}
@@ -219,6 +249,9 @@ func (o OrganizationItem) MarshalJSON() ([]byte, error) {
219249
} else {
220250
toSerialize["createdAt"] = o.CreatedAt.Format("2006-01-02T15:04:05.000Z07:00")
221251
}
252+
if o.Description != nil {
253+
toSerialize["description"] = o.Description
254+
}
222255

223256
for key, value := range o.AdditionalProperties {
224257
toSerialize[key] = value
@@ -235,6 +268,7 @@ func (o *OrganizationItem) UnmarshalJSON(bytes []byte) (err error) {
235268
CreatorId *string `json:"creatorID,omitempty"`
236269
ClusterTotal *int32 `json:"clusterTotal"`
237270
CreatedAt *time.Time `json:"createdAt"`
271+
Description *string `json:"description,omitempty"`
238272
}{}
239273
if err = common.Unmarshal(bytes, &all); err != nil {
240274
return err
@@ -253,7 +287,7 @@ func (o *OrganizationItem) UnmarshalJSON(bytes []byte) (err error) {
253287
}
254288
additionalProperties := make(map[string]interface{})
255289
if err = common.Unmarshal(bytes, &additionalProperties); err == nil {
256-
common.DeleteKeys(additionalProperties, &[]string{"name", "displayName", "creator", "creatorID", "clusterTotal", "createdAt"})
290+
common.DeleteKeys(additionalProperties, &[]string{"name", "displayName", "creator", "creatorID", "clusterTotal", "createdAt", "description"})
257291
} else {
258292
return err
259293
}
@@ -263,6 +297,7 @@ func (o *OrganizationItem) UnmarshalJSON(bytes []byte) (err error) {
263297
o.CreatorId = all.CreatorId
264298
o.ClusterTotal = *all.ClusterTotal
265299
o.CreatedAt = *all.CreatedAt
300+
o.Description = all.Description
266301

267302
if len(additionalProperties) > 0 {
268303
o.AdditionalProperties = additionalProperties

api/kbcloud/admin/model_role.go

Lines changed: 60 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ type Role struct {
1515
// The name of the role
1616
Name *string `json:"name,omitempty"`
1717
// The type of the role
18-
Type *string `json:"type,omitempty"`
19-
// The description of the role
20-
Description *string `json:"description,omitempty"`
18+
Type *string `json:"type,omitempty"`
19+
Description *LocalizedDescription `json:"description,omitempty"`
2120
// The time when the role was created. Read-Only
2221
CreatedAt *time.Time `json:"createdAt,omitempty"`
2322
// The time when the role was updated. Read-Only
24-
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
23+
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
24+
DisplayName *LocalizedDescription `json:"displayName,omitempty"`
2525
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
2626
UnparsedObject map[string]interface{} `json:"-"`
2727
AdditionalProperties map[string]interface{} `json:"-"`
@@ -101,17 +101,17 @@ func (o *Role) SetType(v string) {
101101
}
102102

103103
// GetDescription returns the Description field value if set, zero value otherwise.
104-
func (o *Role) GetDescription() string {
104+
func (o *Role) GetDescription() LocalizedDescription {
105105
if o == nil || o.Description == nil {
106-
var ret string
106+
var ret LocalizedDescription
107107
return ret
108108
}
109109
return *o.Description
110110
}
111111

112112
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
113113
// and a boolean to check if the value has been set.
114-
func (o *Role) GetDescriptionOk() (*string, bool) {
114+
func (o *Role) GetDescriptionOk() (*LocalizedDescription, bool) {
115115
if o == nil || o.Description == nil {
116116
return nil, false
117117
}
@@ -123,8 +123,8 @@ func (o *Role) HasDescription() bool {
123123
return o != nil && o.Description != nil
124124
}
125125

126-
// SetDescription gets a reference to the given string and assigns it to the Description field.
127-
func (o *Role) SetDescription(v string) {
126+
// SetDescription gets a reference to the given LocalizedDescription and assigns it to the Description field.
127+
func (o *Role) SetDescription(v LocalizedDescription) {
128128
o.Description = &v
129129
}
130130

@@ -184,6 +184,34 @@ func (o *Role) SetUpdatedAt(v time.Time) {
184184
o.UpdatedAt = &v
185185
}
186186

187+
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
188+
func (o *Role) GetDisplayName() LocalizedDescription {
189+
if o == nil || o.DisplayName == nil {
190+
var ret LocalizedDescription
191+
return ret
192+
}
193+
return *o.DisplayName
194+
}
195+
196+
// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
197+
// and a boolean to check if the value has been set.
198+
func (o *Role) GetDisplayNameOk() (*LocalizedDescription, bool) {
199+
if o == nil || o.DisplayName == nil {
200+
return nil, false
201+
}
202+
return o.DisplayName, true
203+
}
204+
205+
// HasDisplayName returns a boolean if a field has been set.
206+
func (o *Role) HasDisplayName() bool {
207+
return o != nil && o.DisplayName != nil
208+
}
209+
210+
// SetDisplayName gets a reference to the given LocalizedDescription and assigns it to the DisplayName field.
211+
func (o *Role) SetDisplayName(v LocalizedDescription) {
212+
o.DisplayName = &v
213+
}
214+
187215
// MarshalJSON serializes the struct using spec logic.
188216
func (o Role) MarshalJSON() ([]byte, error) {
189217
toSerialize := map[string]interface{}{}
@@ -213,6 +241,9 @@ func (o Role) MarshalJSON() ([]byte, error) {
213241
toSerialize["updatedAt"] = o.UpdatedAt.Format("2006-01-02T15:04:05.000Z07:00")
214242
}
215243
}
244+
if o.DisplayName != nil {
245+
toSerialize["displayName"] = o.DisplayName
246+
}
216247

217248
for key, value := range o.AdditionalProperties {
218249
toSerialize[key] = value
@@ -223,30 +254,44 @@ func (o Role) MarshalJSON() ([]byte, error) {
223254
// UnmarshalJSON deserializes the given payload.
224255
func (o *Role) UnmarshalJSON(bytes []byte) (err error) {
225256
all := struct {
226-
Name *string `json:"name,omitempty"`
227-
Type *string `json:"type,omitempty"`
228-
Description *string `json:"description,omitempty"`
229-
CreatedAt *time.Time `json:"createdAt,omitempty"`
230-
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
257+
Name *string `json:"name,omitempty"`
258+
Type *string `json:"type,omitempty"`
259+
Description *LocalizedDescription `json:"description,omitempty"`
260+
CreatedAt *time.Time `json:"createdAt,omitempty"`
261+
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
262+
DisplayName *LocalizedDescription `json:"displayName,omitempty"`
231263
}{}
232264
if err = common.Unmarshal(bytes, &all); err != nil {
233265
return err
234266
}
235267
additionalProperties := make(map[string]interface{})
236268
if err = common.Unmarshal(bytes, &additionalProperties); err == nil {
237-
common.DeleteKeys(additionalProperties, &[]string{"name", "type", "description", "createdAt", "updatedAt"})
269+
common.DeleteKeys(additionalProperties, &[]string{"name", "type", "description", "createdAt", "updatedAt", "displayName"})
238270
} else {
239271
return err
240272
}
273+
274+
hasInvalidField := false
241275
o.Name = all.Name
242276
o.Type = all.Type
277+
if all.Description != nil && all.Description.UnparsedObject != nil && o.UnparsedObject == nil {
278+
hasInvalidField = true
279+
}
243280
o.Description = all.Description
244281
o.CreatedAt = all.CreatedAt
245282
o.UpdatedAt = all.UpdatedAt
283+
if all.DisplayName != nil && all.DisplayName.UnparsedObject != nil && o.UnparsedObject == nil {
284+
hasInvalidField = true
285+
}
286+
o.DisplayName = all.DisplayName
246287

247288
if len(additionalProperties) > 0 {
248289
o.AdditionalProperties = additionalProperties
249290
}
250291

292+
if hasInvalidField {
293+
return common.Unmarshal(bytes, &o.UnparsedObject)
294+
}
295+
251296
return nil
252297
}

0 commit comments

Comments
 (0)