@@ -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.
164194func (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