diff --git a/packages/clients/src/api/instance/v1/marshalling.gen.ts b/packages/clients/src/api/instance/v1/marshalling.gen.ts index e1878ba4a..7970a4710 100644 --- a/packages/clients/src/api/instance/v1/marshalling.gen.ts +++ b/packages/clients/src/api/instance/v1/marshalling.gen.ts @@ -79,6 +79,7 @@ import type { ServerMaintenance, ServerSummary, ServerType, + ServerTypeCapabilities, ServerTypeNetwork, ServerTypeNetworkInterface, ServerTypeVolumeConstraintSizes, @@ -354,6 +355,19 @@ const unmarshalServerMaintenance = (data: unknown) => { return {} as ServerMaintenance } +const unmarshalServerTypeCapabilities = (data: unknown) => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'ServerTypeCapabilities' failed as data isn't a dictionary.`, + ) + } + + return { + blockStorage: data.block_storage, + bootTypes: data.boot_types, + } as ServerTypeCapabilities +} + const unmarshalServerTypeNetwork = (data: unknown) => { if (!isJSONObject(data)) { throw new TypeError( @@ -624,6 +638,9 @@ const unmarshalServerType = (data: unknown) => { altNames: data.alt_names, arch: data.arch, baremetal: data.baremetal, + capabilities: data.capabilities + ? unmarshalServerTypeCapabilities(data.capabilities) + : undefined, gpu: data.gpu, hourlyPrice: data.hourly_price, monthlyPrice: data.monthly_price, diff --git a/packages/clients/src/api/instance/v1/types.gen.ts b/packages/clients/src/api/instance/v1/types.gen.ts index d9c93d746..2088a157e 100644 --- a/packages/clients/src/api/instance/v1/types.gen.ts +++ b/packages/clients/src/api/instance/v1/types.gen.ts @@ -607,6 +607,16 @@ export interface ServerType { baremetal: boolean /** Network available for the instance */ network?: ServerTypeNetwork + /** Capabilities */ + capabilities?: ServerTypeCapabilities +} + +/** Server type. capabilities */ +export interface ServerTypeCapabilities { + /** True if server supports block storage */ + blockStorage?: boolean + /** List of supported boot types */ + bootTypes: Array } /** Server type. network */