diff --git a/packages/clients/src/api/instance/v1/index.gen.ts b/packages/clients/src/api/instance/v1/index.gen.ts index 8d6c9153e..360570189 100644 --- a/packages/clients/src/api/instance/v1/index.gen.ts +++ b/packages/clients/src/api/instance/v1/index.gen.ts @@ -137,6 +137,7 @@ export type { ServerSummary, ServerType, ServerTypeCapabilities, + ServerTypeGPUInfo, ServerTypeNetwork, ServerTypeNetworkInterface, ServerTypeVolumeConstraintSizes, diff --git a/packages/clients/src/api/instance/v1/marshalling.gen.ts b/packages/clients/src/api/instance/v1/marshalling.gen.ts index c462f2d09..25142c037 100644 --- a/packages/clients/src/api/instance/v1/marshalling.gen.ts +++ b/packages/clients/src/api/instance/v1/marshalling.gen.ts @@ -87,6 +87,7 @@ import type { ServerSummary, ServerType, ServerTypeCapabilities, + ServerTypeGPUInfo, ServerTypeNetwork, ServerTypeNetworkInterface, ServerTypeVolumeConstraintSizes, @@ -1156,6 +1157,20 @@ const unmarshalServerTypeCapabilities = ( } as ServerTypeCapabilities } +const unmarshalServerTypeGPUInfo = (data: unknown): ServerTypeGPUInfo => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'ServerTypeGPUInfo' failed as data isn't a dictionary.`, + ) + } + + return { + gpuManufacturer: data.gpu_manufacturer, + gpuMemory: data.gpu_memory, + gpuName: data.gpu_name, + } as ServerTypeGPUInfo +} + const unmarshalServerTypeNetwork = (data: unknown): ServerTypeNetwork => { if (!isJSONObject(data)) { throw new TypeError( @@ -1207,6 +1222,9 @@ const unmarshalServerType = (data: unknown): ServerType => { : undefined, endOfService: data.end_of_service, gpu: data.gpu, + gpuInfo: data.gpu_info + ? unmarshalServerTypeGPUInfo(data.gpu_info) + : undefined, hourlyPrice: data.hourly_price, monthlyPrice: data.monthly_price, ncpus: data.ncpus, diff --git a/packages/clients/src/api/instance/v1/types.gen.ts b/packages/clients/src/api/instance/v1/types.gen.ts index a357ddee2..6d8e01486 100644 --- a/packages/clients/src/api/instance/v1/types.gen.ts +++ b/packages/clients/src/api/instance/v1/types.gen.ts @@ -349,6 +349,15 @@ export interface ServerTypeCapabilities { bootTypes: BootType[] } +export interface ServerTypeGPUInfo { + /** GPU manufacturer. */ + gpuManufacturer: string + /** GPU model name. */ + gpuName: string + /** RAM of a single GPU, in bytes. */ + gpuMemory: number +} + export interface ServerTypeNetwork { /** List of available network interfaces. */ interfaces: ServerTypeNetworkInterface[] @@ -681,6 +690,8 @@ export interface ServerType { gpu?: number /** Available RAM in bytes. */ ram: number + /** GPU information. */ + gpuInfo?: ServerTypeGPUInfo /** CPU architecture. */ arch: Arch /** True if it is a baremetal Instance. */