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 @@ -25,6 +25,7 @@ export type {
PublicCatalogProductPropertiesHardwareRAM,
PublicCatalogProductPropertiesHardwareStorage,
PublicCatalogProductPropertiesInstance,
PublicCatalogProductPropertiesObjectStorage,
PublicCatalogProductStatus,
PublicCatalogProductUnitOfMeasure,
PublicCatalogProductUnitOfMeasureCountableUnit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import type {
PublicCatalogProductPropertiesHardwareRAM,
PublicCatalogProductPropertiesHardwareStorage,
PublicCatalogProductPropertiesInstance,
PublicCatalogProductPropertiesObjectStorage,
PublicCatalogProductUnitOfMeasure,
} from './types.gen'

Expand Down Expand Up @@ -251,6 +252,18 @@ const unmarshalPublicCatalogProductPropertiesInstance = (
} as PublicCatalogProductPropertiesInstance
}

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

return {} as PublicCatalogProductPropertiesObjectStorage
}

const unmarshalPublicCatalogProductEnvironmentalImpactEstimation = (
data: unknown,
): PublicCatalogProductEnvironmentalImpactEstimation => {
Expand Down Expand Up @@ -327,6 +340,11 @@ const unmarshalPublicCatalogProductProperties = (
instance: data.instance
? unmarshalPublicCatalogProductPropertiesInstance(data.instance)
: undefined,
objectStorage: data.object_storage
? unmarshalPublicCatalogProductPropertiesObjectStorage(
data.object_storage,
)
: undefined,
} as PublicCatalogProductProperties
}

Expand Down
27 changes: 18 additions & 9 deletions packages_generated/product_catalog/src/v2alpha1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export type ListPublicCatalogProductsRequestProductType =
| 'elastic_metal'
| 'dedibox'
| 'block_storage'
| 'object_storage'

export type PublicCatalogProductPropertiesHardwareCPUArch =
| 'unknown_arch'
Expand Down Expand Up @@ -188,13 +189,13 @@ export interface PublicCatalogProductPropertiesAppleSilicon {

export interface PublicCatalogProductPropertiesBlockStorage {
/**
* The minimum size of storage volume for this product in bytes.
* @deprecated The minimum size of storage volume for this product in bytes. Deprecated.
*/
minVolumeSize: number
minVolumeSize?: number
/**
* The maximum size of storage volume for this product in bytes.
* @deprecated The maximum size of storage volume for this product in bytes. Deprecated.
*/
maxVolumeSize: number
maxVolumeSize?: number
}

export interface PublicCatalogProductPropertiesDedibox {
Expand Down Expand Up @@ -249,6 +250,8 @@ export interface PublicCatalogProductPropertiesInstance {
recommendedReplacementOfferIds: string[]
}

export interface PublicCatalogProductPropertiesObjectStorage {}

export interface PublicCatalogProductEnvironmentalImpactEstimation {
kgCo2Equivalent?: number
m3WaterUsage?: number
Expand Down Expand Up @@ -296,33 +299,39 @@ export interface PublicCatalogProductProperties {
/**
* The properties of Dedibox products.
*
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage' could be set.
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage' could be set.
*/
dedibox?: PublicCatalogProductPropertiesDedibox
/**
* The properties of Elastic Metal products.
*
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage' could be set.
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage' could be set.
*/
elasticMetal?: PublicCatalogProductPropertiesElasticMetal
/**
* The properties of Apple Silicon products.
*
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage' could be set.
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage' could be set.
*/
appleSilicon?: PublicCatalogProductPropertiesAppleSilicon
/**
* The properties of Instance products.
*
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage' could be set.
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage' could be set.
*/
instance?: PublicCatalogProductPropertiesInstance
/**
* The properties of Block Storage products.
*
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage' could be set.
* One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage' 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.
*/
objectStorage?: PublicCatalogProductPropertiesObjectStorage
}

export interface PublicCatalogProductUnitOfMeasure {
Expand Down
Loading