Skip to content

Commit c74ba10

Browse files
committed
chore: auto update client api apecloud/apecloud@ee36483
1 parent f4b06bc commit c74ba10

7 files changed

Lines changed: 161 additions & 5 deletions

File tree

.generator/schemas/adminapi.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20716,6 +20716,9 @@ components:
2071620716
encryptionConfig:
2071720717
description: encryption config for cluster
2071820718
properties:
20719+
enabled:
20720+
type: boolean
20721+
description: whether enable enc
2071920722
secretKeyRef:
2072020723
type: string
2072120724
description: the secret ref for encryption
@@ -25685,6 +25688,11 @@ components:
2568525688
$ref: '#/components/schemas/encryptionAlgorithm'
2568625689
keyUsage:
2568725690
$ref: '#/components/schemas/encryptionKeyUsage'
25691+
clusters:
25692+
type: array
25693+
items:
25694+
type: string
25695+
description: the clusters which use the key
2568825696
createdAt:
2568925697
type: string
2569025698
format: date-time

.generator/schemas/openapi.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14793,6 +14793,9 @@ components:
1479314793
encryptionConfig:
1479414794
description: encryption config for cluster
1479514795
properties:
14796+
enabled:
14797+
type: boolean
14798+
description: whether enable enc
1479614799
secretKeyRef:
1479714800
type: string
1479814801
description: the secret ref for encryption
@@ -19611,6 +19614,11 @@ components:
1961119614
$ref: '#/components/schemas/encryptionAlgorithm'
1961219615
keyUsage:
1961319616
$ref: '#/components/schemas/encryptionKeyUsage'
19617+
clusters:
19618+
type: array
19619+
items:
19620+
type: string
19621+
description: the clusters which use the key
1961419622
createdAt:
1961519623
type: string
1961619624
format: date-time

apecloud

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 2b82841cdc08fa9ca78b73686cad2a4d7b63c14a
1+
Subproject commit ee36483b809dbc2926bfc2551c1a3639b5d8c8b1

api/kbcloud/admin/model_encryption_config.go

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import "github.com/apecloud/kb-cloud-client-go/api/common"
88

99
// EncryptionConfig encryption config for cluster
1010
type EncryptionConfig struct {
11+
// whether enable enc
12+
Enabled *bool `json:"enabled,omitempty"`
1113
// the secret ref for encryption
1214
SecretKeyRef *string `json:"secretKeyRef,omitempty"`
1315
// the key name used for encryption
@@ -34,6 +36,34 @@ func NewEncryptionConfigWithDefaults() *EncryptionConfig {
3436
return &this
3537
}
3638

39+
// GetEnabled returns the Enabled field value if set, zero value otherwise.
40+
func (o *EncryptionConfig) GetEnabled() bool {
41+
if o == nil || o.Enabled == nil {
42+
var ret bool
43+
return ret
44+
}
45+
return *o.Enabled
46+
}
47+
48+
// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise
49+
// and a boolean to check if the value has been set.
50+
func (o *EncryptionConfig) GetEnabledOk() (*bool, bool) {
51+
if o == nil || o.Enabled == nil {
52+
return nil, false
53+
}
54+
return o.Enabled, true
55+
}
56+
57+
// HasEnabled returns a boolean if a field has been set.
58+
func (o *EncryptionConfig) HasEnabled() bool {
59+
return o != nil && o.Enabled != nil
60+
}
61+
62+
// SetEnabled gets a reference to the given bool and assigns it to the Enabled field.
63+
func (o *EncryptionConfig) SetEnabled(v bool) {
64+
o.Enabled = &v
65+
}
66+
3767
// GetSecretKeyRef returns the SecretKeyRef field value if set, zero value otherwise.
3868
func (o *EncryptionConfig) GetSecretKeyRef() string {
3969
if o == nil || o.SecretKeyRef == nil {
@@ -96,6 +126,9 @@ func (o EncryptionConfig) MarshalJSON() ([]byte, error) {
96126
if o.UnparsedObject != nil {
97127
return common.Marshal(o.UnparsedObject)
98128
}
129+
if o.Enabled != nil {
130+
toSerialize["enabled"] = o.Enabled
131+
}
99132
if o.SecretKeyRef != nil {
100133
toSerialize["secretKeyRef"] = o.SecretKeyRef
101134
}
@@ -112,6 +145,7 @@ func (o EncryptionConfig) MarshalJSON() ([]byte, error) {
112145
// UnmarshalJSON deserializes the given payload.
113146
func (o *EncryptionConfig) UnmarshalJSON(bytes []byte) (err error) {
114147
all := struct {
148+
Enabled *bool `json:"enabled,omitempty"`
115149
SecretKeyRef *string `json:"secretKeyRef,omitempty"`
116150
Key *string `json:"key,omitempty"`
117151
}{}
@@ -120,10 +154,11 @@ func (o *EncryptionConfig) UnmarshalJSON(bytes []byte) (err error) {
120154
}
121155
additionalProperties := make(map[string]interface{})
122156
if err = common.Unmarshal(bytes, &additionalProperties); err == nil {
123-
common.DeleteKeys(additionalProperties, &[]string{"secretKeyRef", "key"})
157+
common.DeleteKeys(additionalProperties, &[]string{"enabled", "secretKeyRef", "key"})
124158
} else {
125159
return err
126160
}
161+
o.Enabled = all.Enabled
127162
o.SecretKeyRef = all.SecretKeyRef
128163
o.Key = all.Key
129164

api/kbcloud/admin/model_key.go

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ type Key struct {
2020
Algorithm *EncryptionAlgorithm `json:"algorithm,omitempty"`
2121
// The intended usage of the key.
2222
KeyUsage *EncryptionKeyUsage `json:"keyUsage,omitempty"`
23+
// the clusters which use the key
24+
Clusters []string `json:"clusters,omitempty"`
2325
// The creation timestamp of the key.
2426
CreatedAt *time.Time `json:"createdAt,omitempty"`
2527
// The last update timestamp of the key.
@@ -160,6 +162,34 @@ func (o *Key) SetKeyUsage(v EncryptionKeyUsage) {
160162
o.KeyUsage = &v
161163
}
162164

165+
// GetClusters returns the Clusters field value if set, zero value otherwise.
166+
func (o *Key) GetClusters() []string {
167+
if o == nil || o.Clusters == nil {
168+
var ret []string
169+
return ret
170+
}
171+
return o.Clusters
172+
}
173+
174+
// GetClustersOk returns a tuple with the Clusters field value if set, nil otherwise
175+
// and a boolean to check if the value has been set.
176+
func (o *Key) GetClustersOk() (*[]string, bool) {
177+
if o == nil || o.Clusters == nil {
178+
return nil, false
179+
}
180+
return &o.Clusters, true
181+
}
182+
183+
// HasClusters returns a boolean if a field has been set.
184+
func (o *Key) HasClusters() bool {
185+
return o != nil && o.Clusters != nil
186+
}
187+
188+
// SetClusters gets a reference to the given []string and assigns it to the Clusters field.
189+
func (o *Key) SetClusters(v []string) {
190+
o.Clusters = v
191+
}
192+
163193
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
164194
func (o *Key) GetCreatedAt() time.Time {
165195
if o == nil || o.CreatedAt == nil {
@@ -262,6 +292,9 @@ func (o Key) MarshalJSON() ([]byte, error) {
262292
if o.KeyUsage != nil {
263293
toSerialize["keyUsage"] = o.KeyUsage
264294
}
295+
if o.Clusters != nil {
296+
toSerialize["clusters"] = o.Clusters
297+
}
265298
if o.CreatedAt != nil {
266299
if o.CreatedAt.Nanosecond() == 0 {
267300
toSerialize["createdAt"] = o.CreatedAt.Format("2006-01-02T15:04:05Z07:00")
@@ -293,6 +326,7 @@ func (o *Key) UnmarshalJSON(bytes []byte) (err error) {
293326
Name *string `json:"name,omitempty"`
294327
Algorithm *EncryptionAlgorithm `json:"algorithm,omitempty"`
295328
KeyUsage *EncryptionKeyUsage `json:"keyUsage,omitempty"`
329+
Clusters []string `json:"clusters,omitempty"`
296330
CreatedAt *time.Time `json:"createdAt,omitempty"`
297331
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
298332
Metadata map[string]string `json:"metadata,omitempty"`
@@ -302,7 +336,7 @@ func (o *Key) UnmarshalJSON(bytes []byte) (err error) {
302336
}
303337
additionalProperties := make(map[string]interface{})
304338
if err = common.Unmarshal(bytes, &additionalProperties); err == nil {
305-
common.DeleteKeys(additionalProperties, &[]string{"id", "name", "algorithm", "keyUsage", "createdAt", "updatedAt", "metadata"})
339+
common.DeleteKeys(additionalProperties, &[]string{"id", "name", "algorithm", "keyUsage", "clusters", "createdAt", "updatedAt", "metadata"})
306340
} else {
307341
return err
308342
}
@@ -320,6 +354,7 @@ func (o *Key) UnmarshalJSON(bytes []byte) (err error) {
320354
} else {
321355
o.KeyUsage = all.KeyUsage
322356
}
357+
o.Clusters = all.Clusters
323358
o.CreatedAt = all.CreatedAt
324359
o.UpdatedAt = all.UpdatedAt
325360
o.Metadata = all.Metadata

api/kbcloud/model_encryption_config.go

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import "github.com/apecloud/kb-cloud-client-go/api/common"
88

99
// EncryptionConfig encryption config for cluster
1010
type EncryptionConfig struct {
11+
// whether enable enc
12+
Enabled *bool `json:"enabled,omitempty"`
1113
// the secret ref for encryption
1214
SecretKeyRef *string `json:"secretKeyRef,omitempty"`
1315
// the key name used for encryption
@@ -34,6 +36,34 @@ func NewEncryptionConfigWithDefaults() *EncryptionConfig {
3436
return &this
3537
}
3638

39+
// GetEnabled returns the Enabled field value if set, zero value otherwise.
40+
func (o *EncryptionConfig) GetEnabled() bool {
41+
if o == nil || o.Enabled == nil {
42+
var ret bool
43+
return ret
44+
}
45+
return *o.Enabled
46+
}
47+
48+
// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise
49+
// and a boolean to check if the value has been set.
50+
func (o *EncryptionConfig) GetEnabledOk() (*bool, bool) {
51+
if o == nil || o.Enabled == nil {
52+
return nil, false
53+
}
54+
return o.Enabled, true
55+
}
56+
57+
// HasEnabled returns a boolean if a field has been set.
58+
func (o *EncryptionConfig) HasEnabled() bool {
59+
return o != nil && o.Enabled != nil
60+
}
61+
62+
// SetEnabled gets a reference to the given bool and assigns it to the Enabled field.
63+
func (o *EncryptionConfig) SetEnabled(v bool) {
64+
o.Enabled = &v
65+
}
66+
3767
// GetSecretKeyRef returns the SecretKeyRef field value if set, zero value otherwise.
3868
func (o *EncryptionConfig) GetSecretKeyRef() string {
3969
if o == nil || o.SecretKeyRef == nil {
@@ -96,6 +126,9 @@ func (o EncryptionConfig) MarshalJSON() ([]byte, error) {
96126
if o.UnparsedObject != nil {
97127
return common.Marshal(o.UnparsedObject)
98128
}
129+
if o.Enabled != nil {
130+
toSerialize["enabled"] = o.Enabled
131+
}
99132
if o.SecretKeyRef != nil {
100133
toSerialize["secretKeyRef"] = o.SecretKeyRef
101134
}
@@ -112,6 +145,7 @@ func (o EncryptionConfig) MarshalJSON() ([]byte, error) {
112145
// UnmarshalJSON deserializes the given payload.
113146
func (o *EncryptionConfig) UnmarshalJSON(bytes []byte) (err error) {
114147
all := struct {
148+
Enabled *bool `json:"enabled,omitempty"`
115149
SecretKeyRef *string `json:"secretKeyRef,omitempty"`
116150
Key *string `json:"key,omitempty"`
117151
}{}
@@ -120,10 +154,11 @@ func (o *EncryptionConfig) UnmarshalJSON(bytes []byte) (err error) {
120154
}
121155
additionalProperties := make(map[string]interface{})
122156
if err = common.Unmarshal(bytes, &additionalProperties); err == nil {
123-
common.DeleteKeys(additionalProperties, &[]string{"secretKeyRef", "key"})
157+
common.DeleteKeys(additionalProperties, &[]string{"enabled", "secretKeyRef", "key"})
124158
} else {
125159
return err
126160
}
161+
o.Enabled = all.Enabled
127162
o.SecretKeyRef = all.SecretKeyRef
128163
o.Key = all.Key
129164

api/kbcloud/model_key.go

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ type Key struct {
2020
Algorithm *EncryptionAlgorithm `json:"algorithm,omitempty"`
2121
// The intended usage of the key.
2222
KeyUsage *EncryptionKeyUsage `json:"keyUsage,omitempty"`
23+
// the clusters which use the key
24+
Clusters []string `json:"clusters,omitempty"`
2325
// The creation timestamp of the key.
2426
CreatedAt *time.Time `json:"createdAt,omitempty"`
2527
// The last update timestamp of the key.
@@ -160,6 +162,34 @@ func (o *Key) SetKeyUsage(v EncryptionKeyUsage) {
160162
o.KeyUsage = &v
161163
}
162164

165+
// GetClusters returns the Clusters field value if set, zero value otherwise.
166+
func (o *Key) GetClusters() []string {
167+
if o == nil || o.Clusters == nil {
168+
var ret []string
169+
return ret
170+
}
171+
return o.Clusters
172+
}
173+
174+
// GetClustersOk returns a tuple with the Clusters field value if set, nil otherwise
175+
// and a boolean to check if the value has been set.
176+
func (o *Key) GetClustersOk() (*[]string, bool) {
177+
if o == nil || o.Clusters == nil {
178+
return nil, false
179+
}
180+
return &o.Clusters, true
181+
}
182+
183+
// HasClusters returns a boolean if a field has been set.
184+
func (o *Key) HasClusters() bool {
185+
return o != nil && o.Clusters != nil
186+
}
187+
188+
// SetClusters gets a reference to the given []string and assigns it to the Clusters field.
189+
func (o *Key) SetClusters(v []string) {
190+
o.Clusters = v
191+
}
192+
163193
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
164194
func (o *Key) GetCreatedAt() time.Time {
165195
if o == nil || o.CreatedAt == nil {
@@ -262,6 +292,9 @@ func (o Key) MarshalJSON() ([]byte, error) {
262292
if o.KeyUsage != nil {
263293
toSerialize["keyUsage"] = o.KeyUsage
264294
}
295+
if o.Clusters != nil {
296+
toSerialize["clusters"] = o.Clusters
297+
}
265298
if o.CreatedAt != nil {
266299
if o.CreatedAt.Nanosecond() == 0 {
267300
toSerialize["createdAt"] = o.CreatedAt.Format("2006-01-02T15:04:05Z07:00")
@@ -293,6 +326,7 @@ func (o *Key) UnmarshalJSON(bytes []byte) (err error) {
293326
Name *string `json:"name,omitempty"`
294327
Algorithm *EncryptionAlgorithm `json:"algorithm,omitempty"`
295328
KeyUsage *EncryptionKeyUsage `json:"keyUsage,omitempty"`
329+
Clusters []string `json:"clusters,omitempty"`
296330
CreatedAt *time.Time `json:"createdAt,omitempty"`
297331
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
298332
Metadata map[string]string `json:"metadata,omitempty"`
@@ -302,7 +336,7 @@ func (o *Key) UnmarshalJSON(bytes []byte) (err error) {
302336
}
303337
additionalProperties := make(map[string]interface{})
304338
if err = common.Unmarshal(bytes, &additionalProperties); err == nil {
305-
common.DeleteKeys(additionalProperties, &[]string{"id", "name", "algorithm", "keyUsage", "createdAt", "updatedAt", "metadata"})
339+
common.DeleteKeys(additionalProperties, &[]string{"id", "name", "algorithm", "keyUsage", "clusters", "createdAt", "updatedAt", "metadata"})
306340
} else {
307341
return err
308342
}
@@ -320,6 +354,7 @@ func (o *Key) UnmarshalJSON(bytes []byte) (err error) {
320354
} else {
321355
o.KeyUsage = all.KeyUsage
322356
}
357+
o.Clusters = all.Clusters
323358
o.CreatedAt = all.CreatedAt
324359
o.UpdatedAt = all.UpdatedAt
325360
o.Metadata = all.Metadata

0 commit comments

Comments
 (0)