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 @@ -35,6 +35,13 @@ export type {
PublicCatalogProductPropertiesLoadBalancer,
PublicCatalogProductPropertiesManagedInference,
PublicCatalogProductPropertiesObjectStorage,
PublicCatalogProductPropertiesObjectStorageClassType,
PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass,
PublicCatalogProductPropertiesObjectStorageInternetTrafficType,
PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType,
PublicCatalogProductPropertiesObjectStorageRegionTrafficType,
PublicCatalogProductPropertiesObjectStorageRestoreType,
PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType,
PublicCatalogProductPropertiesSecretManager,
PublicCatalogProductStatus,
PublicCatalogProductUnitOfMeasure,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import type {
PublicCatalogProductPropertiesHardwareNetwork,
PublicCatalogProductPropertiesHardwareRAM,
PublicCatalogProductPropertiesHardwareStorage,
PublicCatalogProductPropertiesObjectStorageClassType,
PublicCatalogProductPropertiesObjectStorageInternetTrafficType,
PublicCatalogProductPropertiesObjectStorageRegionTrafficType,
PublicCatalogProductPropertiesObjectStorageRestoreType,
PublicCatalogProductPropertiesAppleSilicon,
PublicCatalogProductPropertiesBlockStorage,
PublicCatalogProductPropertiesDedibox,
Expand Down Expand Up @@ -130,6 +134,54 @@ const unmarshalPublicCatalogProductPropertiesHardwareStorage = (data: unknown):
} as PublicCatalogProductPropertiesHardwareStorage
}

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

return {
storageClass: data.storage_class,
} as PublicCatalogProductPropertiesObjectStorageClassType
}

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

return {
trafficType: data.traffic_type,
} as PublicCatalogProductPropertiesObjectStorageInternetTrafficType
}

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

return {
regionDestination: data.region_destination,
} as PublicCatalogProductPropertiesObjectStorageRegionTrafficType
}

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

return {
restoreType: data.restore_type,
} as PublicCatalogProductPropertiesObjectStorageRestoreType
}

const unmarshalPublicCatalogProductPropertiesAppleSilicon = (data: unknown): PublicCatalogProductPropertiesAppleSilicon => {
if (!isJSONObject(data)) {
throw new TypeError(
Expand Down Expand Up @@ -268,6 +320,10 @@ const unmarshalPublicCatalogProductPropertiesObjectStorage = (data: unknown): Pu
}

return {
class: data.class ? unmarshalPublicCatalogProductPropertiesObjectStorageClassType(data.class) : undefined,
internetTraffic: data.internet_traffic ? unmarshalPublicCatalogProductPropertiesObjectStorageInternetTrafficType(data.internet_traffic) : undefined,
regionTraffic: data.region_traffic ? unmarshalPublicCatalogProductPropertiesObjectStorageRegionTrafficType(data.region_traffic) : undefined,
restore: data.restore ? unmarshalPublicCatalogProductPropertiesObjectStorageRestoreType(data.restore) : undefined,
} as PublicCatalogProductPropertiesObjectStorage
}

Expand Down
76 changes: 76 additions & 0 deletions packages_generated/product_catalog/src/v2alpha1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,22 @@ export type PublicCatalogProductPropertiesHardwareCPUArch =
| 'riscv'
| 'apple_silicon'

export type PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass =
| 'unknown_storage_class'
| 'standard'
| 'glacier'
| 'onezone_ia'

export type PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType =
| 'unknown_traffic_type'
| 'ingress'
| 'egress'
| 'alliance'

export type PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType =
| 'unknown_restore_type'
| 'standard'

export type PublicCatalogProductStatus =
| 'unknown_status'
| 'public_beta'
Expand Down Expand Up @@ -222,6 +238,38 @@ export interface PublicCatalogProductPropertiesHardwareStorage {
}


export interface PublicCatalogProductPropertiesObjectStorageClassType {
/**
* The storage class.
*/
storageClass: PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass
}


export interface PublicCatalogProductPropertiesObjectStorageInternetTrafficType {
/**
* The type of internet traffic.
*/
trafficType: PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType
}


export interface PublicCatalogProductPropertiesObjectStorageRegionTrafficType {
/**
* The destination region for the region traffic.
*/
regionDestination: string
}


export interface PublicCatalogProductPropertiesObjectStorageRestoreType {
/**
* The type of restore.
*/
restoreType: PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType
}


export interface PublicCatalogProductPropertiesAppleSilicon {
/**
* The range of the Apple Silicon server.
Expand Down Expand Up @@ -334,6 +382,34 @@ export interface PublicCatalogProductPropertiesManagedInference {


export interface PublicCatalogProductPropertiesObjectStorage {
/**
* The properties related to Object Storage class.
*
* One-of ('type'): at most one of 'class', 'restore', 'internetTraffic', 'regionTraffic' could be set.
*/
class?: PublicCatalogProductPropertiesObjectStorageClassType
/**
* The properties related to Object Storage restore operations.
*
* One-of ('type'): at most one of 'class', 'restore', 'internetTraffic', 'regionTraffic' could be set.
*/
restore?: PublicCatalogProductPropertiesObjectStorageRestoreType
/**
* The properties related to Object Storage internet traffic.
*
* One-of ('type'): at most one of 'class', 'restore', 'internetTraffic', 'regionTraffic' could be set.
*/
internetTraffic?: PublicCatalogProductPropertiesObjectStorageInternetTrafficType
/**
* The properties related to Object Storage region traffic.
*
* One-of ('type'): at most one of 'class', 'restore', 'internetTraffic', 'regionTraffic' could be set.
*/
regionTraffic?: PublicCatalogProductPropertiesObjectStorageRegionTrafficType
}


export interface PublicCatalogProductPropertiesSecretManager {
}


Expand Down
Loading