File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed
packages/clients/src/api/rdb/v1 Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,7 @@ export type {
126
126
SetPrivilegeRequest ,
127
127
Snapshot ,
128
128
SnapshotStatus ,
129
+ SnapshotVolumeType ,
129
130
StorageClass ,
130
131
UpdateDatabaseBackupRequest ,
131
132
UpdateInstanceRequest ,
Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ import type {
82
82
SetInstanceSettingsResponse ,
83
83
SetPrivilegeRequest ,
84
84
Snapshot ,
85
+ SnapshotVolumeType ,
85
86
UpdateDatabaseBackupRequest ,
86
87
UpdateInstanceRequest ,
87
88
UpdateSnapshotRequest ,
@@ -381,6 +382,19 @@ export const unmarshalPrivilege = (data: unknown): Privilege => {
381
382
} as Privilege
382
383
}
383
384
385
+ const unmarshalSnapshotVolumeType = ( data : unknown ) : SnapshotVolumeType => {
386
+ if ( ! isJSONObject ( data ) ) {
387
+ throw new TypeError (
388
+ `Unmarshalling the type 'SnapshotVolumeType' failed as data isn't a dictionary.` ,
389
+ )
390
+ }
391
+
392
+ return {
393
+ class : data . class ,
394
+ type : data . type ,
395
+ } as SnapshotVolumeType
396
+ }
397
+
384
398
export const unmarshalSnapshot = ( data : unknown ) : Snapshot => {
385
399
if ( ! isJSONObject ( data ) ) {
386
400
throw new TypeError (
@@ -400,6 +414,9 @@ export const unmarshalSnapshot = (data: unknown): Snapshot => {
400
414
size : data . size ,
401
415
status : data . status ,
402
416
updatedAt : unmarshalDate ( data . updated_at ) ,
417
+ volumeType : data . volume_type
418
+ ? unmarshalSnapshotVolumeType ( data . volume_type )
419
+ : undefined ,
403
420
} as Snapshot
404
421
}
405
422
Original file line number Diff line number Diff line change @@ -361,6 +361,11 @@ export interface NodeTypeVolumeType {
361
361
class : StorageClass
362
362
}
363
363
364
+ export interface SnapshotVolumeType {
365
+ type : VolumeType
366
+ class : StorageClass
367
+ }
368
+
364
369
export interface ACLRuleRequest {
365
370
ip : string
366
371
description : string
@@ -599,6 +604,8 @@ export interface Snapshot {
599
604
instanceName : string
600
605
/** Source node type. */
601
606
nodeType : string
607
+ /** Type of volume where data is stored (lssd, bssd or sbs). */
608
+ volumeType ?: SnapshotVolumeType
602
609
/** Region of this snapshot. */
603
610
region : Region
604
611
}
You can’t perform that action at this time.
0 commit comments