Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export type {
PublicCatalogProductPropertiesHardwareRAM,
PublicCatalogProductPropertiesHardwareStorage,
PublicCatalogProductPropertiesInstance,
PublicCatalogProductPropertiesManagedInference,
PublicCatalogProductPropertiesObjectStorage,
PublicCatalogProductStatus,
PublicCatalogProductUnitOfMeasure,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import type {
PublicCatalogProductPropertiesHardwareRAM,
PublicCatalogProductPropertiesHardwareStorage,
PublicCatalogProductPropertiesInstance,
PublicCatalogProductPropertiesManagedInference,
PublicCatalogProductPropertiesObjectStorage,
PublicCatalogProductUnitOfMeasure,
} from './types.gen.js'
Expand Down Expand Up @@ -255,6 +256,20 @@ const unmarshalPublicCatalogProductPropertiesInstance = (
} as PublicCatalogProductPropertiesInstance
}

const unmarshalPublicCatalogProductPropertiesManagedInference = (
data: unknown,
): PublicCatalogProductPropertiesManagedInference => {
if (!isJSONObject(data)) {
throw new TypeError(
`Unmarshalling the type 'PublicCatalogProductPropertiesManagedInference' failed as data isn't a dictionary.`,
)
}

return {
instanceGpuName: data.instance_gpu_name,
} as PublicCatalogProductPropertiesManagedInference
}

const unmarshalPublicCatalogProductPropertiesObjectStorage = (
data: unknown,
): PublicCatalogProductPropertiesObjectStorage => {
Expand Down Expand Up @@ -343,6 +358,11 @@ const unmarshalPublicCatalogProductProperties = (
instance: data.instance
? unmarshalPublicCatalogProductPropertiesInstance(data.instance)
: undefined,
managedInference: data.managed_inference
? unmarshalPublicCatalogProductPropertiesManagedInference(
data.managed_inference,
)
: undefined,
objectStorage: data.object_storage
? unmarshalPublicCatalogProductPropertiesObjectStorage(
data.object_storage,
Expand Down
26 changes: 20 additions & 6 deletions packages_generated/product_catalog/src/v2alpha1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export type ListPublicCatalogProductsRequestProductType =
| 'dedibox'
| 'block_storage'
| 'object_storage'
| 'managed_inference'

export type ListPublicCatalogProductsRequestStatus =
| 'unknown_status'
Expand Down Expand Up @@ -279,6 +280,13 @@ export interface PublicCatalogProductPropertiesInstance {
recommendedReplacementOfferIds: string[]
}

export interface PublicCatalogProductPropertiesManagedInference {
/**
* The name of the associated instance GPU to this node type.
*/
instanceGpuName: string
}

export interface PublicCatalogProductPropertiesObjectStorage {}

export interface PublicCatalogProductEnvironmentalImpactEstimation {
Expand Down Expand Up @@ -328,39 +336,45 @@ export interface PublicCatalogProductProperties {
/**
* The properties of Dedibox products.
*
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage' could be set.
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference' could be set.
*/
dedibox?: PublicCatalogProductPropertiesDedibox
/**
* The properties of Elastic Metal products.
*
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage' could be set.
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference' could be set.
*/
elasticMetal?: PublicCatalogProductPropertiesElasticMetal
/**
* The properties of Apple Silicon products.
*
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage' could be set.
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference' could be set.
*/
appleSilicon?: PublicCatalogProductPropertiesAppleSilicon
/**
* The properties of Instance products.
*
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage' could be set.
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference' could be set.
*/
instance?: PublicCatalogProductPropertiesInstance
/**
* The properties of Block Storage products.
*
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage' could be set.
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference' could be set.
*/
blockStorage?: PublicCatalogProductPropertiesBlockStorage
/**
* The properties of Object Storage products.
*
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage' could be set.
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference' could be set.
*/
objectStorage?: PublicCatalogProductPropertiesObjectStorage
/**
* The properties of Managed Inference products.
*
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference' could be set.
*/
managedInference?: PublicCatalogProductPropertiesManagedInference
}

export interface PublicCatalogProductUnitOfMeasure {
Expand Down
Loading