From eaf71b19e922ed5f0a8cab6a5683a42ccde12df0 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Thu, 18 Dec 2025 15:28:06 +0000 Subject: [PATCH] feat: update generated APIs --- .../product_catalog/src/v2alpha1/api.gen.ts | 109 +- .../product_catalog/src/v2alpha1/index.gen.ts | 88 +- .../src/v2alpha1/marshalling.gen.ts | 943 ++++++--------- .../product_catalog/src/v2alpha1/types.gen.ts | 1074 +++++++++-------- .../src/v2alpha1/validation-rules.gen.ts | 12 +- 5 files changed, 1052 insertions(+), 1174 deletions(-) diff --git a/packages_generated/product_catalog/src/v2alpha1/api.gen.ts b/packages_generated/product_catalog/src/v2alpha1/api.gen.ts index c10fdf6cf..a0852aea8 100644 --- a/packages_generated/product_catalog/src/v2alpha1/api.gen.ts +++ b/packages_generated/product_catalog/src/v2alpha1/api.gen.ts @@ -1,73 +1,62 @@ // This file was automatically generated. DO NOT EDIT. // If you have any remark or suggestion do not hesitate to open an issue. import { - API as ParentAPI, - enrichForPagination, - resolveOneOf, - urlParams, + API as ParentAPI, + enrichForPagination, + resolveOneOf, + urlParams, } from '@scaleway/sdk-client' +import type { Zone as ScwZone, Region as ScwRegion, } from '@scaleway/sdk-client' +import { + unmarshalListPublicCatalogProductsResponse, +} from './marshalling.gen.js' import type { - Zone as ScwZone, - Region as ScwRegion, -} from '@scaleway/sdk-client' -import { unmarshalListPublicCatalogProductsResponse } from './marshalling.gen.js' -import type { - ListPublicCatalogProductsResponse, - PublicCatalogApiListPublicCatalogProductsRequest, + ListPublicCatalogProductsResponse, + PublicCatalogApiListPublicCatalogProductsRequest, } from './types.gen.js' /** * Product Catalog API. */ export class PublicCatalogAPI extends ParentAPI { - protected pageOfListPublicCatalogProducts = ( - request: Readonly = {}, - ) => - this.client.fetch( - { - method: 'GET', - path: `/product-catalog/v2alpha1/public-catalog/products`, - urlParams: urlParams( - ['page', request.page], - [ - 'page_size', - request.pageSize ?? this.client.settings.defaultPageSize, - ], - ['product_types', request.productTypes], - ['status', request.status], - ...Object.entries( - resolveOneOf([ - { param: 'global', value: request.global }, - { - default: this.client.settings.defaultRegion, - param: 'region', - value: request.region, - }, - { - default: this.client.settings.defaultZone, - param: 'zone', - value: request.zone, - }, - { param: 'datacenter', value: request.datacenter }, - ]), - ), - ), - }, - unmarshalListPublicCatalogProductsResponse, - ) + protected pageOfListPublicCatalogProducts = (request: Readonly = {}) => + this.client.fetch( + { + method: 'GET', + path: `/product-catalog/v2alpha1/public-catalog/products`, + urlParams: urlParams( + ['page', request.page], + ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], + ['product_types', request.productTypes], + ['status', request.status], + ...Object.entries(resolveOneOf([ + {param: 'global', + value: request.global, + }, + {default: this.client.settings.defaultRegion,param: 'region', + value: request.region, + }, + {default: this.client.settings.defaultZone,param: 'zone', + value: request.zone, + }, + {param: 'datacenter', + value: request.datacenter, + }, + ])), + ), + }, + unmarshalListPublicCatalogProductsResponse, + ) + + /** + * List all available products. List all available products in the Scaleway catalog. Returns a complete list of products with their corresponding description, locations, prices and properties. You can define the `page` number and `page_size` for your query in the request. + * + * @param request - The request {@link PublicCatalogApiListPublicCatalogProductsRequest} + * @returns A Promise of ListPublicCatalogProductsResponse + */ + listPublicCatalogProducts = (request: Readonly = {}) => + enrichForPagination('products', this.pageOfListPublicCatalogProducts, request) - /** - * List all available products. List all available products in the Scaleway catalog. Returns a complete list of products with their corresponding description, locations, prices and properties. You can define the `page` number and `page_size` for your query in the request. - * - * @param request - The request {@link PublicCatalogApiListPublicCatalogProductsRequest} - * @returns A Promise of ListPublicCatalogProductsResponse - */ - listPublicCatalogProducts = ( - request: Readonly = {}, - ) => - enrichForPagination( - 'products', - this.pageOfListPublicCatalogProducts, - request, - ) + } + diff --git a/packages_generated/product_catalog/src/v2alpha1/index.gen.ts b/packages_generated/product_catalog/src/v2alpha1/index.gen.ts index a0d525460..1ef2f71a3 100644 --- a/packages_generated/product_catalog/src/v2alpha1/index.gen.ts +++ b/packages_generated/product_catalog/src/v2alpha1/index.gen.ts @@ -1,49 +1,51 @@ // This file was automatically generated. DO NOT EDIT. // If you have any remark or suggestion do not hesitate to open an issue. -export { PublicCatalogAPI } from './api.gen.js' +export { + PublicCatalogAPI, +} from './api.gen.js' export * from './marshalling.gen.js' export type { - ListPublicCatalogProductsRequestProductType, - ListPublicCatalogProductsRequestStatus, - ListPublicCatalogProductsResponse, - PublicCatalogApiListPublicCatalogProductsRequest, - PublicCatalogProduct, - PublicCatalogProductEnvironmentalImpactEstimation, - PublicCatalogProductLocality, - PublicCatalogProductPrice, - PublicCatalogProductProductBadge, - PublicCatalogProductProperties, - PublicCatalogProductPropertiesAppleSilicon, - PublicCatalogProductPropertiesBlockStorage, - PublicCatalogProductPropertiesDedibox, - PublicCatalogProductPropertiesElasticMetal, - PublicCatalogProductPropertiesGenerativeApis, - PublicCatalogProductPropertiesGenerativeApisConsumptionMode, - PublicCatalogProductPropertiesHardware, - PublicCatalogProductPropertiesHardwareCPU, - PublicCatalogProductPropertiesHardwareCPUArch, - PublicCatalogProductPropertiesHardwareCPUPhysical, - PublicCatalogProductPropertiesHardwareCPUVirtual, - PublicCatalogProductPropertiesHardwareGPU, - PublicCatalogProductPropertiesHardwareNetwork, - PublicCatalogProductPropertiesHardwareRAM, - PublicCatalogProductPropertiesHardwareStorage, - PublicCatalogProductPropertiesInstance, - PublicCatalogProductPropertiesKeyManager, - PublicCatalogProductPropertiesLoadBalancer, - PublicCatalogProductPropertiesManagedInference, - PublicCatalogProductPropertiesManagedRedisDatabase, - PublicCatalogProductPropertiesObjectStorage, - PublicCatalogProductPropertiesObjectStorageClassType, - PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass, - PublicCatalogProductPropertiesObjectStorageInternetTrafficType, - PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType, - PublicCatalogProductPropertiesObjectStorageRegionTrafficType, - PublicCatalogProductPropertiesObjectStorageRestoreType, - PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType, - PublicCatalogProductPropertiesSecretManager, - PublicCatalogProductStatus, - PublicCatalogProductUnitOfMeasure, - PublicCatalogProductUnitOfMeasureCountableUnit, + ListPublicCatalogProductsRequestProductType, + ListPublicCatalogProductsRequestStatus, + ListPublicCatalogProductsResponse, + PublicCatalogApiListPublicCatalogProductsRequest, + PublicCatalogProduct, + PublicCatalogProductEnvironmentalImpactEstimation, + PublicCatalogProductLocality, + PublicCatalogProductPrice, + PublicCatalogProductProductBadge, + PublicCatalogProductProperties, + PublicCatalogProductPropertiesAppleSilicon, + PublicCatalogProductPropertiesBlockStorage, + PublicCatalogProductPropertiesDedibox, + PublicCatalogProductPropertiesElasticMetal, + PublicCatalogProductPropertiesGenerativeApis, + PublicCatalogProductPropertiesGenerativeApisConsumptionMode, + PublicCatalogProductPropertiesHardware, + PublicCatalogProductPropertiesHardwareCPU, + PublicCatalogProductPropertiesHardwareCPUArch, + PublicCatalogProductPropertiesHardwareCPUPhysical, + PublicCatalogProductPropertiesHardwareCPUVirtual, + PublicCatalogProductPropertiesHardwareGPU, + PublicCatalogProductPropertiesHardwareNetwork, + PublicCatalogProductPropertiesHardwareRAM, + PublicCatalogProductPropertiesHardwareStorage, + PublicCatalogProductPropertiesInstance, + PublicCatalogProductPropertiesKeyManager, + PublicCatalogProductPropertiesLoadBalancer, + PublicCatalogProductPropertiesManagedInference, + PublicCatalogProductPropertiesManagedRedisDatabase, + PublicCatalogProductPropertiesObjectStorage, + PublicCatalogProductPropertiesObjectStorageClassType, + PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass, + PublicCatalogProductPropertiesObjectStorageInternetTrafficType, + PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType, + PublicCatalogProductPropertiesObjectStorageRegionTrafficType, + PublicCatalogProductPropertiesObjectStorageRestoreType, + PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType, + PublicCatalogProductPropertiesSecretManager, + PublicCatalogProductStatus, + PublicCatalogProductUnitOfMeasure, + PublicCatalogProductUnitOfMeasureCountableUnit, } from './types.gen.js' export * as ValidationRules from './validation-rules.gen.js' diff --git a/packages_generated/product_catalog/src/v2alpha1/marshalling.gen.ts b/packages_generated/product_catalog/src/v2alpha1/marshalling.gen.ts index 2a79f3361..bbdf3b5e5 100644 --- a/packages_generated/product_catalog/src/v2alpha1/marshalling.gen.ts +++ b/packages_generated/product_catalog/src/v2alpha1/marshalling.gen.ts @@ -1,613 +1,466 @@ -import { - isJSONObject, - unmarshalArrayOfObject, - unmarshalDate, - unmarshalMoney, -} from '@scaleway/sdk-client' +import { isJSONObject, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney, } from '@scaleway/sdk-client' import type { - PublicCatalogProductPropertiesHardwareCPUPhysical, - PublicCatalogProductPropertiesHardwareCPUVirtual, - PublicCatalogProductPropertiesHardwareCPU, - PublicCatalogProductPropertiesHardwareGPU, - PublicCatalogProductPropertiesHardwareNetwork, - PublicCatalogProductPropertiesHardwareRAM, - PublicCatalogProductPropertiesHardwareStorage, - PublicCatalogProductPropertiesObjectStorageClassType, - PublicCatalogProductPropertiesObjectStorageInternetTrafficType, - PublicCatalogProductPropertiesObjectStorageRegionTrafficType, - PublicCatalogProductPropertiesObjectStorageRestoreType, - PublicCatalogProductPropertiesAppleSilicon, - PublicCatalogProductPropertiesBlockStorage, - PublicCatalogProductPropertiesDedibox, - PublicCatalogProductPropertiesElasticMetal, - PublicCatalogProductPropertiesGenerativeApis, - PublicCatalogProductPropertiesHardware, - PublicCatalogProductPropertiesInstance, - PublicCatalogProductPropertiesKeyManager, - PublicCatalogProductPropertiesLoadBalancer, - PublicCatalogProductPropertiesManagedInference, - PublicCatalogProductPropertiesManagedRedisDatabase, - PublicCatalogProductPropertiesObjectStorage, - PublicCatalogProductPropertiesSecretManager, - PublicCatalogProductEnvironmentalImpactEstimation, - PublicCatalogProductLocality, - PublicCatalogProductPrice, - PublicCatalogProductProperties, - PublicCatalogProductUnitOfMeasure, - PublicCatalogProduct, - ListPublicCatalogProductsResponse, + PublicCatalogProductPropertiesHardwareCPUPhysical, + PublicCatalogProductPropertiesHardwareCPUVirtual, + PublicCatalogProductPropertiesHardwareCPU, + PublicCatalogProductPropertiesHardwareGPU, + PublicCatalogProductPropertiesHardwareNetwork, + PublicCatalogProductPropertiesHardwareRAM, + PublicCatalogProductPropertiesHardwareStorage, + PublicCatalogProductPropertiesObjectStorageClassType, + PublicCatalogProductPropertiesObjectStorageInternetTrafficType, + PublicCatalogProductPropertiesObjectStorageRegionTrafficType, + PublicCatalogProductPropertiesObjectStorageRestoreType, + PublicCatalogProductPropertiesAppleSilicon, + PublicCatalogProductPropertiesBlockStorage, + PublicCatalogProductPropertiesDedibox, + PublicCatalogProductPropertiesElasticMetal, + PublicCatalogProductPropertiesGenerativeApis, + PublicCatalogProductPropertiesHardware, + PublicCatalogProductPropertiesInstance, + PublicCatalogProductPropertiesKeyManager, + PublicCatalogProductPropertiesLoadBalancer, + PublicCatalogProductPropertiesManagedInference, + PublicCatalogProductPropertiesManagedRedisDatabase, + PublicCatalogProductPropertiesObjectStorage, + PublicCatalogProductPropertiesSecretManager, + PublicCatalogProductEnvironmentalImpactEstimation, + PublicCatalogProductLocality, + PublicCatalogProductPrice, + PublicCatalogProductProperties, + PublicCatalogProductUnitOfMeasure, + PublicCatalogProduct, + ListPublicCatalogProductsResponse, } from './types.gen.js' -const unmarshalPublicCatalogProductPropertiesHardwareCPUPhysical = ( - data: unknown, -): PublicCatalogProductPropertiesHardwareCPUPhysical => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductPropertiesHardwareCPUPhysical' failed as data isn't a dictionary.`, - ) - } - - return { - benchmark: data.benchmark, - coresPerSocket: data.cores_per_socket, - frequency: data.frequency, - sockets: data.sockets, - threadsPerCore: data.threads_per_core, - } as PublicCatalogProductPropertiesHardwareCPUPhysical +const unmarshalPublicCatalogProductPropertiesHardwareCPUPhysical = (data: unknown): PublicCatalogProductPropertiesHardwareCPUPhysical => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductPropertiesHardwareCPUPhysical' failed as data isn't a dictionary.`, + ) + } + + return { + benchmark: data.benchmark, + coresPerSocket: data.cores_per_socket, + frequency: data.frequency, + sockets: data.sockets, + threadsPerCore: data.threads_per_core, + } as PublicCatalogProductPropertiesHardwareCPUPhysical } -const unmarshalPublicCatalogProductPropertiesHardwareCPUVirtual = ( - data: unknown, -): PublicCatalogProductPropertiesHardwareCPUVirtual => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductPropertiesHardwareCPUVirtual' failed as data isn't a dictionary.`, - ) - } - - return { - count: data.count, - } as PublicCatalogProductPropertiesHardwareCPUVirtual +const unmarshalPublicCatalogProductPropertiesHardwareCPUVirtual = (data: unknown): PublicCatalogProductPropertiesHardwareCPUVirtual => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductPropertiesHardwareCPUVirtual' failed as data isn't a dictionary.`, + ) + } + + return { + count: data.count, + } as PublicCatalogProductPropertiesHardwareCPUVirtual } -const unmarshalPublicCatalogProductPropertiesHardwareCPU = ( - data: unknown, -): PublicCatalogProductPropertiesHardwareCPU => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductPropertiesHardwareCPU' failed as data isn't a dictionary.`, - ) - } - - return { - arch: data.arch, - description: data.description, - physical: data.physical - ? unmarshalPublicCatalogProductPropertiesHardwareCPUPhysical( - data.physical, - ) - : undefined, - threads: data.threads, - type: data.type, - virtual: data.virtual - ? unmarshalPublicCatalogProductPropertiesHardwareCPUVirtual(data.virtual) - : undefined, - } as PublicCatalogProductPropertiesHardwareCPU +const unmarshalPublicCatalogProductPropertiesHardwareCPU = (data: unknown): PublicCatalogProductPropertiesHardwareCPU => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductPropertiesHardwareCPU' failed as data isn't a dictionary.`, + ) + } + + return { + arch: data.arch, + description: data.description, + physical: data.physical ? unmarshalPublicCatalogProductPropertiesHardwareCPUPhysical(data.physical) : undefined, + threads: data.threads, + type: data.type, + virtual: data.virtual ? unmarshalPublicCatalogProductPropertiesHardwareCPUVirtual(data.virtual) : undefined, + } as PublicCatalogProductPropertiesHardwareCPU } -const unmarshalPublicCatalogProductPropertiesHardwareGPU = ( - data: unknown, -): PublicCatalogProductPropertiesHardwareGPU => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductPropertiesHardwareGPU' failed as data isn't a dictionary.`, - ) - } - - return { - count: data.count, - description: data.description, - type: data.type, - } as PublicCatalogProductPropertiesHardwareGPU +const unmarshalPublicCatalogProductPropertiesHardwareGPU = (data: unknown): PublicCatalogProductPropertiesHardwareGPU => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductPropertiesHardwareGPU' failed as data isn't a dictionary.`, + ) + } + + return { + count: data.count, + description: data.description, + type: data.type, + } as PublicCatalogProductPropertiesHardwareGPU } -const unmarshalPublicCatalogProductPropertiesHardwareNetwork = ( - data: unknown, -): PublicCatalogProductPropertiesHardwareNetwork => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductPropertiesHardwareNetwork' failed as data isn't a dictionary.`, - ) - } - - return { - description: data.description, - internalBandwidth: data.internal_bandwidth, - maxPublicBandwidth: data.max_public_bandwidth, - publicBandwidth: data.public_bandwidth, - } as PublicCatalogProductPropertiesHardwareNetwork +const unmarshalPublicCatalogProductPropertiesHardwareNetwork = (data: unknown): PublicCatalogProductPropertiesHardwareNetwork => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductPropertiesHardwareNetwork' failed as data isn't a dictionary.`, + ) + } + + return { + description: data.description, + internalBandwidth: data.internal_bandwidth, + maxPublicBandwidth: data.max_public_bandwidth, + publicBandwidth: data.public_bandwidth, + } as PublicCatalogProductPropertiesHardwareNetwork } -const unmarshalPublicCatalogProductPropertiesHardwareRAM = ( - data: unknown, -): PublicCatalogProductPropertiesHardwareRAM => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductPropertiesHardwareRAM' failed as data isn't a dictionary.`, - ) - } - - return { - description: data.description, - size: data.size, - type: data.type, - } as PublicCatalogProductPropertiesHardwareRAM +const unmarshalPublicCatalogProductPropertiesHardwareRAM = (data: unknown): PublicCatalogProductPropertiesHardwareRAM => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductPropertiesHardwareRAM' failed as data isn't a dictionary.`, + ) + } + + return { + description: data.description, + size: data.size, + type: data.type, + } as PublicCatalogProductPropertiesHardwareRAM } -const unmarshalPublicCatalogProductPropertiesHardwareStorage = ( - data: unknown, -): PublicCatalogProductPropertiesHardwareStorage => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductPropertiesHardwareStorage' failed as data isn't a dictionary.`, - ) - } - - return { - description: data.description, - total: data.total, - } as PublicCatalogProductPropertiesHardwareStorage +const unmarshalPublicCatalogProductPropertiesHardwareStorage = (data: unknown): PublicCatalogProductPropertiesHardwareStorage => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductPropertiesHardwareStorage' failed as data isn't a dictionary.`, + ) + } + + return { + description: data.description, + total: data.total, + } 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 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 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 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 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 unmarshalPublicCatalogProductPropertiesAppleSilicon = ( - data: unknown, -): PublicCatalogProductPropertiesAppleSilicon => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductPropertiesAppleSilicon' failed as data isn't a dictionary.`, - ) - } - - return { - range: data.range, - serverType: data.server_type, - } as PublicCatalogProductPropertiesAppleSilicon +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 unmarshalPublicCatalogProductPropertiesBlockStorage = ( - data: unknown, -): PublicCatalogProductPropertiesBlockStorage => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductPropertiesBlockStorage' failed as data isn't a dictionary.`, - ) - } - - return { - maxVolumeSize: data.max_volume_size, - minVolumeSize: data.min_volume_size, - } as PublicCatalogProductPropertiesBlockStorage +const unmarshalPublicCatalogProductPropertiesAppleSilicon = (data: unknown): PublicCatalogProductPropertiesAppleSilicon => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductPropertiesAppleSilicon' failed as data isn't a dictionary.`, + ) + } + + return { + range: data.range, + serverType: data.server_type, + } as PublicCatalogProductPropertiesAppleSilicon } -const unmarshalPublicCatalogProductPropertiesDedibox = ( - data: unknown, -): PublicCatalogProductPropertiesDedibox => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductPropertiesDedibox' failed as data isn't a dictionary.`, - ) - } - - return { - offerId: data.offer_id, - range: data.range, - } as PublicCatalogProductPropertiesDedibox +const unmarshalPublicCatalogProductPropertiesBlockStorage = (data: unknown): PublicCatalogProductPropertiesBlockStorage => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductPropertiesBlockStorage' failed as data isn't a dictionary.`, + ) + } + + return { + maxVolumeSize: data.max_volume_size, + minVolumeSize: data.min_volume_size, + } as PublicCatalogProductPropertiesBlockStorage } -const unmarshalPublicCatalogProductPropertiesElasticMetal = ( - data: unknown, -): PublicCatalogProductPropertiesElasticMetal => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductPropertiesElasticMetal' failed as data isn't a dictionary.`, - ) - } - - return { - offerId: data.offer_id, - range: data.range, - } as PublicCatalogProductPropertiesElasticMetal +const unmarshalPublicCatalogProductPropertiesDedibox = (data: unknown): PublicCatalogProductPropertiesDedibox => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductPropertiesDedibox' failed as data isn't a dictionary.`, + ) + } + + return { + offerId: data.offer_id, + range: data.range, + } as PublicCatalogProductPropertiesDedibox } -const unmarshalPublicCatalogProductPropertiesGenerativeApis = ( - data: unknown, -): PublicCatalogProductPropertiesGenerativeApis => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductPropertiesGenerativeApis' failed as data isn't a dictionary.`, - ) - } - - return { - consumptionMode: data.consumption_mode, - reasoning: data.reasoning, - supportedApis: data.supported_apis, - } as PublicCatalogProductPropertiesGenerativeApis +const unmarshalPublicCatalogProductPropertiesElasticMetal = (data: unknown): PublicCatalogProductPropertiesElasticMetal => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductPropertiesElasticMetal' failed as data isn't a dictionary.`, + ) + } + + return { + offerId: data.offer_id, + range: data.range, + } as PublicCatalogProductPropertiesElasticMetal } -const unmarshalPublicCatalogProductPropertiesHardware = ( - data: unknown, -): PublicCatalogProductPropertiesHardware => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductPropertiesHardware' failed as data isn't a dictionary.`, - ) - } - - return { - cpu: data.cpu - ? unmarshalPublicCatalogProductPropertiesHardwareCPU(data.cpu) - : undefined, - gpu: data.gpu - ? unmarshalPublicCatalogProductPropertiesHardwareGPU(data.gpu) - : undefined, - network: data.network - ? unmarshalPublicCatalogProductPropertiesHardwareNetwork(data.network) - : undefined, - ram: data.ram - ? unmarshalPublicCatalogProductPropertiesHardwareRAM(data.ram) - : undefined, - storage: data.storage - ? unmarshalPublicCatalogProductPropertiesHardwareStorage(data.storage) - : undefined, - } as PublicCatalogProductPropertiesHardware +const unmarshalPublicCatalogProductPropertiesGenerativeApis = (data: unknown): PublicCatalogProductPropertiesGenerativeApis => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductPropertiesGenerativeApis' failed as data isn't a dictionary.`, + ) + } + + return { + consumptionMode: data.consumption_mode, + reasoning: data.reasoning, + supportedApis: data.supported_apis, + } as PublicCatalogProductPropertiesGenerativeApis } -const unmarshalPublicCatalogProductPropertiesInstance = ( - data: unknown, -): PublicCatalogProductPropertiesInstance => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductPropertiesInstance' failed as data isn't a dictionary.`, - ) - } - - return { - offerId: data.offer_id, - range: data.range, - recommendedReplacementOfferIds: data.recommended_replacement_offer_ids, - } as PublicCatalogProductPropertiesInstance +const unmarshalPublicCatalogProductPropertiesHardware = (data: unknown): PublicCatalogProductPropertiesHardware => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductPropertiesHardware' failed as data isn't a dictionary.`, + ) + } + + return { + cpu: data.cpu ? unmarshalPublicCatalogProductPropertiesHardwareCPU(data.cpu) : undefined, + gpu: data.gpu ? unmarshalPublicCatalogProductPropertiesHardwareGPU(data.gpu) : undefined, + network: data.network ? unmarshalPublicCatalogProductPropertiesHardwareNetwork(data.network) : undefined, + ram: data.ram ? unmarshalPublicCatalogProductPropertiesHardwareRAM(data.ram) : undefined, + storage: data.storage ? unmarshalPublicCatalogProductPropertiesHardwareStorage(data.storage) : undefined, + } as PublicCatalogProductPropertiesHardware } -const unmarshalPublicCatalogProductPropertiesKeyManager = ( - data: unknown, -): PublicCatalogProductPropertiesKeyManager => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductPropertiesKeyManager' failed as data isn't a dictionary.`, - ) - } +const unmarshalPublicCatalogProductPropertiesInstance = (data: unknown): PublicCatalogProductPropertiesInstance => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductPropertiesInstance' failed as data isn't a dictionary.`, + ) + } + + return { + offerId: data.offer_id, + range: data.range, + recommendedReplacementOfferIds: data.recommended_replacement_offer_ids, + } as PublicCatalogProductPropertiesInstance +} + +const unmarshalPublicCatalogProductPropertiesKeyManager = (data: unknown): PublicCatalogProductPropertiesKeyManager => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductPropertiesKeyManager' failed as data isn't a dictionary.`, + ) + } - return {} as PublicCatalogProductPropertiesKeyManager + return { + } as PublicCatalogProductPropertiesKeyManager } -const unmarshalPublicCatalogProductPropertiesLoadBalancer = ( - data: unknown, -): PublicCatalogProductPropertiesLoadBalancer => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductPropertiesLoadBalancer' failed as data isn't a dictionary.`, - ) - } +const unmarshalPublicCatalogProductPropertiesLoadBalancer = (data: unknown): PublicCatalogProductPropertiesLoadBalancer => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductPropertiesLoadBalancer' failed as data isn't a dictionary.`, + ) + } - return {} as PublicCatalogProductPropertiesLoadBalancer + return { + } as PublicCatalogProductPropertiesLoadBalancer } -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 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 unmarshalPublicCatalogProductPropertiesManagedRedisDatabase = ( - data: unknown, -): PublicCatalogProductPropertiesManagedRedisDatabase => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductPropertiesManagedRedisDatabase' failed as data isn't a dictionary.`, - ) - } +const unmarshalPublicCatalogProductPropertiesManagedRedisDatabase = (data: unknown): PublicCatalogProductPropertiesManagedRedisDatabase => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductPropertiesManagedRedisDatabase' failed as data isn't a dictionary.`, + ) + } - return {} as PublicCatalogProductPropertiesManagedRedisDatabase + return { + } as PublicCatalogProductPropertiesManagedRedisDatabase } -const unmarshalPublicCatalogProductPropertiesObjectStorage = ( - data: unknown, -): PublicCatalogProductPropertiesObjectStorage => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorage' failed as data isn't a dictionary.`, - ) - } - - 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 +const unmarshalPublicCatalogProductPropertiesObjectStorage = (data: unknown): PublicCatalogProductPropertiesObjectStorage => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorage' failed as data isn't a dictionary.`, + ) + } + + 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 } -const unmarshalPublicCatalogProductPropertiesSecretManager = ( - data: unknown, -): PublicCatalogProductPropertiesSecretManager => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductPropertiesSecretManager' failed as data isn't a dictionary.`, - ) - } +const unmarshalPublicCatalogProductPropertiesSecretManager = (data: unknown): PublicCatalogProductPropertiesSecretManager => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductPropertiesSecretManager' failed as data isn't a dictionary.`, + ) + } - return {} as PublicCatalogProductPropertiesSecretManager + return { + } as PublicCatalogProductPropertiesSecretManager } -const unmarshalPublicCatalogProductEnvironmentalImpactEstimation = ( - data: unknown, -): PublicCatalogProductEnvironmentalImpactEstimation => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductEnvironmentalImpactEstimation' failed as data isn't a dictionary.`, - ) - } - - return { - kgCo2Equivalent: data.kg_co2_equivalent, - m3WaterUsage: data.m3_water_usage, - } as PublicCatalogProductEnvironmentalImpactEstimation +const unmarshalPublicCatalogProductEnvironmentalImpactEstimation = (data: unknown): PublicCatalogProductEnvironmentalImpactEstimation => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductEnvironmentalImpactEstimation' failed as data isn't a dictionary.`, + ) + } + + return { + kgCo2Equivalent: data.kg_co2_equivalent, + m3WaterUsage: data.m3_water_usage, + } as PublicCatalogProductEnvironmentalImpactEstimation } -const unmarshalPublicCatalogProductLocality = ( - data: unknown, -): PublicCatalogProductLocality => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductLocality' failed as data isn't a dictionary.`, - ) - } - - return { - datacenter: data.datacenter, - global: data.global, - region: data.region, - zone: data.zone, - } as PublicCatalogProductLocality +const unmarshalPublicCatalogProductLocality = (data: unknown): PublicCatalogProductLocality => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductLocality' failed as data isn't a dictionary.`, + ) + } + + return { + datacenter: data.datacenter, + global: data.global, + region: data.region, + zone: data.zone, + } as PublicCatalogProductLocality } -const unmarshalPublicCatalogProductPrice = ( - data: unknown, -): PublicCatalogProductPrice => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductPrice' failed as data isn't a dictionary.`, - ) - } - - return { - retailPrice: data.retail_price - ? unmarshalMoney(data.retail_price) - : undefined, - } as PublicCatalogProductPrice +const unmarshalPublicCatalogProductPrice = (data: unknown): PublicCatalogProductPrice => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductPrice' failed as data isn't a dictionary.`, + ) + } + + return { + retailPrice: data.retail_price ? unmarshalMoney(data.retail_price) : undefined, + } as PublicCatalogProductPrice } -const unmarshalPublicCatalogProductProperties = ( - data: unknown, -): PublicCatalogProductProperties => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductProperties' failed as data isn't a dictionary.`, - ) - } - - return { - appleSilicon: data.apple_silicon - ? unmarshalPublicCatalogProductPropertiesAppleSilicon(data.apple_silicon) - : undefined, - blockStorage: data.block_storage - ? unmarshalPublicCatalogProductPropertiesBlockStorage(data.block_storage) - : undefined, - dedibox: data.dedibox - ? unmarshalPublicCatalogProductPropertiesDedibox(data.dedibox) - : undefined, - elasticMetal: data.elastic_metal - ? unmarshalPublicCatalogProductPropertiesElasticMetal(data.elastic_metal) - : undefined, - generativeApis: data.generative_apis - ? unmarshalPublicCatalogProductPropertiesGenerativeApis( - data.generative_apis, - ) - : undefined, - hardware: data.hardware - ? unmarshalPublicCatalogProductPropertiesHardware(data.hardware) - : undefined, - instance: data.instance - ? unmarshalPublicCatalogProductPropertiesInstance(data.instance) - : undefined, - keyManager: data.key_manager - ? unmarshalPublicCatalogProductPropertiesKeyManager(data.key_manager) - : undefined, - loadBalancer: data.load_balancer - ? unmarshalPublicCatalogProductPropertiesLoadBalancer(data.load_balancer) - : undefined, - managedInference: data.managed_inference - ? unmarshalPublicCatalogProductPropertiesManagedInference( - data.managed_inference, - ) - : undefined, - managedRedisDatabase: data.managed_redis_database - ? unmarshalPublicCatalogProductPropertiesManagedRedisDatabase( - data.managed_redis_database, - ) - : undefined, - objectStorage: data.object_storage - ? unmarshalPublicCatalogProductPropertiesObjectStorage( - data.object_storage, - ) - : undefined, - secretManager: data.secret_manager - ? unmarshalPublicCatalogProductPropertiesSecretManager( - data.secret_manager, - ) - : undefined, - } as PublicCatalogProductProperties +const unmarshalPublicCatalogProductProperties = (data: unknown): PublicCatalogProductProperties => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductProperties' failed as data isn't a dictionary.`, + ) + } + + return { + appleSilicon: data.apple_silicon ? unmarshalPublicCatalogProductPropertiesAppleSilicon(data.apple_silicon) : undefined, + blockStorage: data.block_storage ? unmarshalPublicCatalogProductPropertiesBlockStorage(data.block_storage) : undefined, + dedibox: data.dedibox ? unmarshalPublicCatalogProductPropertiesDedibox(data.dedibox) : undefined, + elasticMetal: data.elastic_metal ? unmarshalPublicCatalogProductPropertiesElasticMetal(data.elastic_metal) : undefined, + generativeApis: data.generative_apis ? unmarshalPublicCatalogProductPropertiesGenerativeApis(data.generative_apis) : undefined, + hardware: data.hardware ? unmarshalPublicCatalogProductPropertiesHardware(data.hardware) : undefined, + instance: data.instance ? unmarshalPublicCatalogProductPropertiesInstance(data.instance) : undefined, + keyManager: data.key_manager ? unmarshalPublicCatalogProductPropertiesKeyManager(data.key_manager) : undefined, + loadBalancer: data.load_balancer ? unmarshalPublicCatalogProductPropertiesLoadBalancer(data.load_balancer) : undefined, + managedInference: data.managed_inference ? unmarshalPublicCatalogProductPropertiesManagedInference(data.managed_inference) : undefined, + managedRedisDatabase: data.managed_redis_database ? unmarshalPublicCatalogProductPropertiesManagedRedisDatabase(data.managed_redis_database) : undefined, + objectStorage: data.object_storage ? unmarshalPublicCatalogProductPropertiesObjectStorage(data.object_storage) : undefined, + secretManager: data.secret_manager ? unmarshalPublicCatalogProductPropertiesSecretManager(data.secret_manager) : undefined, + } as PublicCatalogProductProperties } -const unmarshalPublicCatalogProductUnitOfMeasure = ( - data: unknown, -): PublicCatalogProductUnitOfMeasure => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProductUnitOfMeasure' failed as data isn't a dictionary.`, - ) - } - - return { - size: data.size, - unit: data.unit, - } as PublicCatalogProductUnitOfMeasure +const unmarshalPublicCatalogProductUnitOfMeasure = (data: unknown): PublicCatalogProductUnitOfMeasure => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductUnitOfMeasure' failed as data isn't a dictionary.`, + ) + } + + return { + size: data.size, + unit: data.unit, + } as PublicCatalogProductUnitOfMeasure } const unmarshalPublicCatalogProduct = (data: unknown): PublicCatalogProduct => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'PublicCatalogProduct' failed as data isn't a dictionary.`, - ) - } - - return { - badges: data.badges, - description: data.description, - endOfLifeAt: unmarshalDate(data.end_of_life_at), - environmentalImpactEstimation: data.environmental_impact_estimation - ? unmarshalPublicCatalogProductEnvironmentalImpactEstimation( - data.environmental_impact_estimation, - ) - : undefined, - locality: data.locality - ? unmarshalPublicCatalogProductLocality(data.locality) - : undefined, - price: data.price - ? unmarshalPublicCatalogProductPrice(data.price) - : undefined, - product: data.product, - productCategory: data.product_category, - properties: data.properties - ? unmarshalPublicCatalogProductProperties(data.properties) - : undefined, - serviceCategory: data.service_category, - sku: data.sku, - status: data.status, - unitOfMeasure: data.unit_of_measure - ? unmarshalPublicCatalogProductUnitOfMeasure(data.unit_of_measure) - : undefined, - variant: data.variant, - } as PublicCatalogProduct + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProduct' failed as data isn't a dictionary.`, + ) + } + + return { + badges: data.badges, + description: data.description, + endOfLifeAt: unmarshalDate(data.end_of_life_at), + environmentalImpactEstimation: data.environmental_impact_estimation ? unmarshalPublicCatalogProductEnvironmentalImpactEstimation(data.environmental_impact_estimation) : undefined, + locality: data.locality ? unmarshalPublicCatalogProductLocality(data.locality) : undefined, + price: data.price ? unmarshalPublicCatalogProductPrice(data.price) : undefined, + product: data.product, + productCategory: data.product_category, + properties: data.properties ? unmarshalPublicCatalogProductProperties(data.properties) : undefined, + serviceCategory: data.service_category, + sku: data.sku, + status: data.status, + unitOfMeasure: data.unit_of_measure ? unmarshalPublicCatalogProductUnitOfMeasure(data.unit_of_measure) : undefined, + variant: data.variant, + } as PublicCatalogProduct } -export const unmarshalListPublicCatalogProductsResponse = ( - data: unknown, -): ListPublicCatalogProductsResponse => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'ListPublicCatalogProductsResponse' failed as data isn't a dictionary.`, - ) - } - - return { - products: unmarshalArrayOfObject( - data.products, - unmarshalPublicCatalogProduct, - ), - totalCount: data.total_count, - } as ListPublicCatalogProductsResponse +export const unmarshalListPublicCatalogProductsResponse = (data: unknown): ListPublicCatalogProductsResponse => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'ListPublicCatalogProductsResponse' failed as data isn't a dictionary.`, + ) + } + + return { + products: unmarshalArrayOfObject(data.products, unmarshalPublicCatalogProduct), + totalCount: data.total_count, + } as ListPublicCatalogProductsResponse } diff --git a/packages_generated/product_catalog/src/v2alpha1/types.gen.ts b/packages_generated/product_catalog/src/v2alpha1/types.gen.ts index fcfa8cad2..b209ea1fb 100644 --- a/packages_generated/product_catalog/src/v2alpha1/types.gen.ts +++ b/packages_generated/product_catalog/src/v2alpha1/types.gen.ts @@ -1,628 +1,662 @@ // This file was automatically generated. DO NOT EDIT. // If you have any remark or suggestion do not hesitate to open an issue. -import type { - Money, - Region as ScwRegion, - Zone as ScwZone, -} from '@scaleway/sdk-client' +import type { Money, Region as ScwRegion, Zone as ScwZone} from '@scaleway/sdk-client' + export type ListPublicCatalogProductsRequestProductType = - | 'unknown_product_type' - | 'instance' - | 'apple_silicon' - | 'elastic_metal' - | 'dedibox' - | 'block_storage' - | 'object_storage' - | 'managed_inference' - | 'generative_apis' - | 'load_balancer' - | 'secret_manager' - | 'key_manager' - | 'managed_redis_database' + | 'unknown_product_type' + | 'instance' + | 'apple_silicon' + | 'elastic_metal' + | 'dedibox' + | 'block_storage' + | 'object_storage' + | 'managed_inference' + | 'generative_apis' + | 'load_balancer' + | 'secret_manager' + | 'key_manager' + | 'managed_redis_database' export type ListPublicCatalogProductsRequestStatus = - | 'unknown_status' - | 'public_beta' - | 'preview' - | 'general_availability' - | 'end_of_new_features' - | 'end_of_growth' - | 'end_of_deployment' - | 'end_of_support' - | 'end_of_sale' - | 'end_of_life' - | 'retired' + | 'unknown_status' + | 'public_beta' + | 'preview' + | 'general_availability' + | 'end_of_new_features' + | 'end_of_growth' + | 'end_of_deployment' + | 'end_of_support' + | 'end_of_sale' + | 'end_of_life' + | 'retired' export type PublicCatalogProductProductBadge = - | 'unknown_product_badge' - | 'new_product' - | 'best_seller' - | 'best_value' - | 'popular' + | 'unknown_product_badge' + | 'new_product' + | 'best_seller' + | 'best_value' + | 'popular' export type PublicCatalogProductPropertiesGenerativeApisConsumptionMode = - | 'unknown_consumption_mode' - | 'realtime' - | 'batch' + | 'unknown_consumption_mode' + | 'realtime' + | 'batch' export type PublicCatalogProductPropertiesHardwareCPUArch = - | 'unknown_arch' - | 'x64' - | 'arm64' - | 'riscv' - | 'apple_silicon' + | 'unknown_arch' + | 'x64' + | 'arm64' + | 'riscv' + | 'apple_silicon' export type PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass = - | 'unknown_storage_class' - | 'standard' - | 'glacier' - | 'onezone_ia' + | 'unknown_storage_class' + | 'standard' + | 'glacier' + | 'onezone_ia' export type PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType = - | 'unknown_traffic_type' - | 'ingress' - | 'egress' - | 'alliance' + | 'unknown_traffic_type' + | 'ingress' + | 'egress' + | 'alliance' export type PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType = - | 'unknown_restore_type' - | 'standard' + | 'unknown_restore_type' + | 'standard' export type PublicCatalogProductStatus = - | 'unknown_status' - | 'public_beta' - | 'preview' - | 'general_availability' - | 'end_of_new_features' - | 'end_of_growth' - | 'end_of_deployment' - | 'end_of_support' - | 'end_of_sale' - | 'end_of_life' - | 'retired' + | 'unknown_status' + | 'public_beta' + | 'preview' + | 'general_availability' + | 'end_of_new_features' + | 'end_of_growth' + | 'end_of_deployment' + | 'end_of_support' + | 'end_of_sale' + | 'end_of_life' + | 'retired' export type PublicCatalogProductUnitOfMeasureCountableUnit = - | 'unknown_countable_unit' - | 'chunk' - | 'core' - | 'currency' - | 'device' - | 'domain' - | 'email' - | 'gb_s' - | 'gigabyte' - | 'hour' - | 'iops_gigabyte' - | 'ip' - | 'month' - | 'node' - | 'plan' - | 'query' - | 'request' - | 'session' - | 'vcpu_s' - | 'version' - | 'year' - | 'key' - | 'token' - | 'minute' - | 'setup' - | 'day' - | 'second' - | 'sample_day' - | 'gigabyte_day' - | 'mvcpu' + | 'unknown_countable_unit' + | 'chunk' + | 'core' + | 'currency' + | 'device' + | 'domain' + | 'email' + | 'gb_s' + | 'gigabyte' + | 'hour' + | 'iops_gigabyte' + | 'ip' + | 'month' + | 'node' + | 'plan' + | 'query' + | 'request' + | 'session' + | 'vcpu_s' + | 'version' + | 'year' + | 'key' + | 'token' + | 'minute' + | 'setup' + | 'day' + | 'second' + | 'sample_day' + | 'gigabyte_day' + | 'mvcpu' export interface PublicCatalogProductPropertiesHardwareCPUPhysical { - /** - * The number of sockets of the CPU. - */ - sockets: number - /** - * The number of cores per socket. - */ - coresPerSocket: number - /** - * The number of threads per core. - */ - threadsPerCore: number - /** - * The frequency of the CPU in Hertz. - */ - frequency: number - /** - * The benchmark score of the CPU. - */ - benchmark: number + /** + * The number of sockets of the CPU. + */ + sockets: number + /** + * The number of cores per socket. + */ + coresPerSocket: number + /** + * The number of threads per core. + */ + threadsPerCore: number + /** + * The frequency of the CPU in Hertz. + */ + frequency: number + /** + * The benchmark score of the CPU. + */ + benchmark: number } + export interface PublicCatalogProductPropertiesHardwareCPUVirtual { - /** - * The number of vCPUs. - */ - count: number + /** + * The number of vCPUs. + */ + count: number } + export interface PublicCatalogProductPropertiesHardwareCPU { - /** - * A human readable description of the CPU. - */ - description: string - /** - * The architecture of the CPU. - */ - arch: PublicCatalogProductPropertiesHardwareCPUArch - /** - * The type of the CPU. - */ - type: string - /** - * Properties if the CPU is virtual. - * - * One-of ('computeUnit'): at most one of 'virtual', 'physical' could be set. - */ - virtual?: PublicCatalogProductPropertiesHardwareCPUVirtual - /** - * Properties if the CPU is physical. - * - * One-of ('computeUnit'): at most one of 'virtual', 'physical' could be set. - */ - physical?: PublicCatalogProductPropertiesHardwareCPUPhysical - /** - * The total number of threads. - */ - threads: number + /** + * A human readable description of the CPU. + */ + description: string + /** + * The architecture of the CPU. + */ + arch: PublicCatalogProductPropertiesHardwareCPUArch + /** + * The type of the CPU. + */ + type: string + /** + * Properties if the CPU is virtual. + * + * One-of ('computeUnit'): at most one of 'virtual', 'physical' could be set. + */ + virtual?: PublicCatalogProductPropertiesHardwareCPUVirtual + /** + * Properties if the CPU is physical. + * + * One-of ('computeUnit'): at most one of 'virtual', 'physical' could be set. + */ + physical?: PublicCatalogProductPropertiesHardwareCPUPhysical + /** + * The total number of threads. + */ + threads: number } + export interface PublicCatalogProductPropertiesHardwareGPU { - /** - * A human-readable description of the GPU. - */ - description: string - /** - * The number of GPUs. - */ - count: number - /** - * The type of the GPU. - */ - type: string + /** + * A human-readable description of the GPU. + */ + description: string + /** + * The number of GPUs. + */ + count: number + /** + * The type of the GPU. + */ + type: string } + export interface PublicCatalogProductPropertiesHardwareNetwork { - /** - * A human-readable description of the network. - */ - description: string - /** - * The internal bandwidth in bits per second. - */ - internalBandwidth: number - /** - * The default public bandwidth in bits per second. - */ - publicBandwidth: number - /** - * The maximum public bandwidth in bits per second (may require subscription to options). - */ - maxPublicBandwidth: number + /** + * A human-readable description of the network. + */ + description: string + /** + * The internal bandwidth in bits per second. + */ + internalBandwidth: number + /** + * The default public bandwidth in bits per second. + */ + publicBandwidth: number + /** + * The maximum public bandwidth in bits per second (may require subscription to options). + */ + maxPublicBandwidth: number } + export interface PublicCatalogProductPropertiesHardwareRAM { - /** - * A human-readable description of the RAM. - */ - description: string - /** - * The size of the RAM in bytes. - */ - size: number - /** - * The type of the RAM. - */ - type: string + /** + * A human-readable description of the RAM. + */ + description: string + /** + * The size of the RAM in bytes. + */ + size: number + /** + * The type of the RAM. + */ + type: string } + export interface PublicCatalogProductPropertiesHardwareStorage { - /** - * A human-readable description of the storage. - */ - description: string - /** - * The total size of the storage in bytes. - */ - total: number + /** + * A human-readable description of the storage. + */ + description: string + /** + * The total size of the storage in bytes. + */ + total: number } + export interface PublicCatalogProductPropertiesObjectStorageClassType { - /** - * The storage class. - */ - storageClass: PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass + /** + * The storage class. + */ + storageClass: PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass } + export interface PublicCatalogProductPropertiesObjectStorageInternetTrafficType { - /** - * The type of internet traffic. - */ - trafficType: PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType + /** + * The type of internet traffic. + */ + trafficType: PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType } + export interface PublicCatalogProductPropertiesObjectStorageRegionTrafficType { - /** - * The destination region for the region traffic. - */ - regionDestination: string + /** + * The destination region for the region traffic. + */ + regionDestination: string } + export interface PublicCatalogProductPropertiesObjectStorageRestoreType { - /** - * The type of restore. - */ - restoreType: PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType + /** + * The type of restore. + */ + restoreType: PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType } + export interface PublicCatalogProductPropertiesAppleSilicon { - /** - * The range of the Apple Silicon server. - */ - range: string - /** - * The server type of the Apple Silicon server. - */ - serverType: string + /** + * The range of the Apple Silicon server. + */ + range: string + /** + * The server type of the Apple Silicon server. + */ + serverType: string } + export interface PublicCatalogProductPropertiesBlockStorage { - /** - * @deprecated The minimum size of storage volume for this product in bytes. Deprecated. - */ - minVolumeSize?: number - /** - * @deprecated The maximum size of storage volume for this product in bytes. Deprecated. - */ - maxVolumeSize?: number + /** + * @deprecated The minimum size of storage volume for this product in bytes. Deprecated. + */ + minVolumeSize?: number + /** + * @deprecated The maximum size of storage volume for this product in bytes. Deprecated. + */ + maxVolumeSize?: number } + export interface PublicCatalogProductPropertiesDedibox { - /** - * The range of the Dedibox server. - */ - range: string - /** - * The offer ID of the Dedibox server. - */ - offerId: number + /** + * The range of the Dedibox server. + */ + range: string + /** + * The offer ID of the Dedibox server. + */ + offerId: number } + export interface PublicCatalogProductPropertiesElasticMetal { - /** - * The range of the Elastic Metal server. - */ - range: string - /** - * The offer ID of the Elastic Metal server. - */ - offerId: string + /** + * The range of the Elastic Metal server. + */ + range: string + /** + * The offer ID of the Elastic Metal server. + */ + offerId: string } + export interface PublicCatalogProductPropertiesGenerativeApis { - reasoning: boolean - supportedApis: string[] - consumptionMode: PublicCatalogProductPropertiesGenerativeApisConsumptionMode + reasoning: boolean + supportedApis: string[] + consumptionMode: PublicCatalogProductPropertiesGenerativeApisConsumptionMode } + export interface PublicCatalogProductPropertiesHardware { - /** - * The CPU hardware properties. - */ - cpu?: PublicCatalogProductPropertiesHardwareCPU - /** - * The RAM hardware properties. - */ - ram?: PublicCatalogProductPropertiesHardwareRAM - /** - * The storage hardware properties. - */ - storage?: PublicCatalogProductPropertiesHardwareStorage - /** - * The network hardware properties. - */ - network?: PublicCatalogProductPropertiesHardwareNetwork - /** - * The GPU hardware properties. - */ - gpu?: PublicCatalogProductPropertiesHardwareGPU + /** + * The CPU hardware properties. + */ + cpu?: PublicCatalogProductPropertiesHardwareCPU + /** + * The RAM hardware properties. + */ + ram?: PublicCatalogProductPropertiesHardwareRAM + /** + * The storage hardware properties. + */ + storage?: PublicCatalogProductPropertiesHardwareStorage + /** + * The network hardware properties. + */ + network?: PublicCatalogProductPropertiesHardwareNetwork + /** + * The GPU hardware properties. + */ + gpu?: PublicCatalogProductPropertiesHardwareGPU } + export interface PublicCatalogProductPropertiesInstance { - /** - * The range of the Instance server. - */ - range: string - /** - * The offer ID of the Instance server. - */ - offerId: string - /** - * The recommended replacement offer IDs of the Instance server. - */ - recommendedReplacementOfferIds: string[] + /** + * The range of the Instance server. + */ + range: string + /** + * The offer ID of the Instance server. + */ + offerId: string + /** + * The recommended replacement offer IDs of the Instance server. + */ + recommendedReplacementOfferIds: string[] +} + + +export interface PublicCatalogProductPropertiesKeyManager { } -export interface PublicCatalogProductPropertiesKeyManager {} -export interface PublicCatalogProductPropertiesLoadBalancer {} +export interface PublicCatalogProductPropertiesLoadBalancer { +} + export interface PublicCatalogProductPropertiesManagedInference { - /** - * The name of the associated instance GPU to this node type. - */ - instanceGpuName: string + /** + * The name of the associated instance GPU to this node type. + */ + instanceGpuName: string +} + + +export interface PublicCatalogProductPropertiesManagedRedisDatabase { } -export interface PublicCatalogProductPropertiesManagedRedisDatabase {} 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 {} + /** + * 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 { +} + export interface PublicCatalogProductEnvironmentalImpactEstimation { - kgCo2Equivalent?: number - m3WaterUsage?: number + kgCo2Equivalent?: number + m3WaterUsage?: number } + export interface PublicCatalogProductLocality { - /** - * Whether or not the product is global. - * - * One-of ('locality'): at most one of 'global', 'region', 'zone', 'datacenter' could be set. - */ - global?: boolean - /** - * The region of the product. - * - * One-of ('locality'): at most one of 'global', 'region', 'zone', 'datacenter' could be set. - */ - region?: ScwRegion - /** - * The zone of the product. - * - * One-of ('locality'): at most one of 'global', 'region', 'zone', 'datacenter' could be set. - */ - zone?: ScwZone - /** - * The datacenter of the product. - * - * One-of ('locality'): at most one of 'global', 'region', 'zone', 'datacenter' could be set. - */ - datacenter?: string + /** + * Whether or not the product is global. + * + * One-of ('locality'): at most one of 'global', 'region', 'zone', 'datacenter' could be set. + */ + global?: boolean + /** + * The region of the product. + * + * One-of ('locality'): at most one of 'global', 'region', 'zone', 'datacenter' could be set. + */ + region?: ScwRegion + /** + * The zone of the product. + * + * One-of ('locality'): at most one of 'global', 'region', 'zone', 'datacenter' could be set. + */ + zone?: ScwZone + /** + * The datacenter of the product. + * + * One-of ('locality'): at most one of 'global', 'region', 'zone', 'datacenter' could be set. + */ + datacenter?: string } + export interface PublicCatalogProductPrice { - /** - * The retail price of the product. - */ - retailPrice?: Money + /** + * The retail price of the product. + */ + retailPrice?: Money } + export interface PublicCatalogProductProperties { - /** - * The hardware properties of the product (if supported). - */ - hardware?: PublicCatalogProductPropertiesHardware - /** - * The properties of Dedibox products. - * - * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. - */ - dedibox?: PublicCatalogProductPropertiesDedibox - /** - * The properties of Elastic Metal products. - * - * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. - */ - elasticMetal?: PublicCatalogProductPropertiesElasticMetal - /** - * The properties of Apple Silicon products. - * - * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. - */ - appleSilicon?: PublicCatalogProductPropertiesAppleSilicon - /** - * The properties of Instance products. - * - * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. - */ - instance?: PublicCatalogProductPropertiesInstance - /** - * The properties of Block Storage products. - * - * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. - */ - blockStorage?: PublicCatalogProductPropertiesBlockStorage - /** - * The properties of Object Storage products. - * - * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' 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', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. - */ - managedInference?: PublicCatalogProductPropertiesManagedInference - /** - * The properties of Generative APIs products. - * - * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. - */ - generativeApis?: PublicCatalogProductPropertiesGenerativeApis - /** - * The properties of Load Balancer products. - * - * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. - */ - loadBalancer?: PublicCatalogProductPropertiesLoadBalancer - /** - * - * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. - */ - secretManager?: PublicCatalogProductPropertiesSecretManager - /** - * The properties of Managed Redis Database products. - * - * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. - */ - managedRedisDatabase?: PublicCatalogProductPropertiesManagedRedisDatabase - /** - * - * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. - */ - keyManager?: PublicCatalogProductPropertiesKeyManager + /** + * The hardware properties of the product (if supported). + */ + hardware?: PublicCatalogProductPropertiesHardware + /** + * The properties of Dedibox products. + * + * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. + */ + dedibox?: PublicCatalogProductPropertiesDedibox + /** + * The properties of Elastic Metal products. + * + * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. + */ + elasticMetal?: PublicCatalogProductPropertiesElasticMetal + /** + * The properties of Apple Silicon products. + * + * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. + */ + appleSilicon?: PublicCatalogProductPropertiesAppleSilicon + /** + * The properties of Instance products. + * + * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. + */ + instance?: PublicCatalogProductPropertiesInstance + /** + * The properties of Block Storage products. + * + * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. + */ + blockStorage?: PublicCatalogProductPropertiesBlockStorage + /** + * The properties of Object Storage products. + * + * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' 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', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. + */ + managedInference?: PublicCatalogProductPropertiesManagedInference + /** + * The properties of Generative APIs products. + * + * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. + */ + generativeApis?: PublicCatalogProductPropertiesGenerativeApis + /** + * The properties of Load Balancer products. + * + * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. + */ + loadBalancer?: PublicCatalogProductPropertiesLoadBalancer + /** + * + * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. + */ + secretManager?: PublicCatalogProductPropertiesSecretManager + /** + * The properties of Managed Redis Database products. + * + * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. + */ + managedRedisDatabase?: PublicCatalogProductPropertiesManagedRedisDatabase + /** + * + * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager' could be set. + */ + keyManager?: PublicCatalogProductPropertiesKeyManager } + export interface PublicCatalogProductUnitOfMeasure { - unit: PublicCatalogProductUnitOfMeasureCountableUnit - size: number + unit: PublicCatalogProductUnitOfMeasureCountableUnit + size: number } + export interface PublicCatalogProduct { - /** - * The unique identifier of the product. - */ - sku: string - /** - * The category of the product. - */ - serviceCategory: string - /** - * The product category of the product. - */ - productCategory: string - /** - * The product name. - */ - product: string - /** - * The product variant. - */ - variant: string - /** - * The product description. - */ - description: string - /** - * The locality of the product. - */ - locality?: PublicCatalogProductLocality - /** - * The price of the product. - */ - price?: PublicCatalogProductPrice - /** - * The properties of the product. - */ - properties?: PublicCatalogProductProperties - /** - * The environmental impact estimation of the product. - */ - environmentalImpactEstimation?: PublicCatalogProductEnvironmentalImpactEstimation - /** - * The unit of measure of the product. - */ - unitOfMeasure?: PublicCatalogProductUnitOfMeasure - /** - * The status of the product. - */ - status: PublicCatalogProductStatus - /** - * The end of life date of the product. - */ - endOfLifeAt?: Date - /** - * Different badges that can be associated with the product. - */ - badges: PublicCatalogProductProductBadge[] + /** + * The unique identifier of the product. + */ + sku: string + /** + * The category of the product. + */ + serviceCategory: string + /** + * The product category of the product. + */ + productCategory: string + /** + * The product name. + */ + product: string + /** + * The product variant. + */ + variant: string + /** + * The product description. + */ + description: string + /** + * The locality of the product. + */ + locality?: PublicCatalogProductLocality + /** + * The price of the product. + */ + price?: PublicCatalogProductPrice + /** + * The properties of the product. + */ + properties?: PublicCatalogProductProperties + /** + * The environmental impact estimation of the product. + */ + environmentalImpactEstimation?: PublicCatalogProductEnvironmentalImpactEstimation + /** + * The unit of measure of the product. + */ + unitOfMeasure?: PublicCatalogProductUnitOfMeasure + /** + * The status of the product. + */ + status: PublicCatalogProductStatus + /** + * The end of life date of the product. + */ + endOfLifeAt?: Date + /** + * Different badges that can be associated with the product. + */ + badges: PublicCatalogProductProductBadge[] } + export interface ListPublicCatalogProductsResponse { - /** - * The list of products. - */ - products: PublicCatalogProduct[] - /** - * The total number of products in the catalog. - */ - totalCount: number + /** + * The list of products. + */ + products: PublicCatalogProduct[] + /** + * The total number of products in the catalog. + */ + totalCount: number } + export type PublicCatalogApiListPublicCatalogProductsRequest = { - /** - * Number of the page. Value must be greater or equal to 1. - */ - page?: number - /** - * The number of products per page. Value must be greater or equal to 1. - */ - pageSize?: number - /** - * The list of filtered product categories. - */ - productTypes?: ListPublicCatalogProductsRequestProductType[] - /** - * Filter global products. - * - * One-of ('locality'): at most one of 'global', 'region', 'zone', 'datacenter' could be set. - */ - global?: boolean - /** - * Filter products by region. - * - * One-of ('locality'): at most one of 'global', 'region', 'zone', 'datacenter' could be set. - */ - region?: ScwRegion - /** - * Filter products by zone. - * - * One-of ('locality'): at most one of 'global', 'region', 'zone', 'datacenter' could be set. - */ - zone?: ScwZone - /** - * Filter products by datacenter. - * - * One-of ('locality'): at most one of 'global', 'region', 'zone', 'datacenter' could be set. - */ - datacenter?: string - /** - * The lists of filtered product status, if empty only products with status public_beta, general_availability, preview, end_of_new_features, end_of_growth, end_of_deployment, end_of_support, end_of_sale, end_of_life or retired will be returned. - */ - status?: ListPublicCatalogProductsRequestStatus[] + /** + * Number of the page. Value must be greater or equal to 1. + */ + page?: number + /** + * The number of products per page. Value must be greater or equal to 1. + */ + pageSize?: number + /** + * The list of filtered product categories. + */ + productTypes?: ListPublicCatalogProductsRequestProductType[] + /** + * Filter global products. + * + * One-of ('locality'): at most one of 'global', 'region', 'zone', 'datacenter' could be set. + */ + global?: boolean + /** + * Filter products by region. + * + * One-of ('locality'): at most one of 'global', 'region', 'zone', 'datacenter' could be set. + */ + region?: ScwRegion + /** + * Filter products by zone. + * + * One-of ('locality'): at most one of 'global', 'region', 'zone', 'datacenter' could be set. + */ + zone?: ScwZone + /** + * Filter products by datacenter. + * + * One-of ('locality'): at most one of 'global', 'region', 'zone', 'datacenter' could be set. + */ + datacenter?: string + /** + * The lists of filtered product status, if empty only products with status public_beta, general_availability, preview, end_of_new_features, end_of_growth, end_of_deployment, end_of_support, end_of_sale, end_of_life or retired will be returned. + */ + status?: ListPublicCatalogProductsRequestStatus[] } + + diff --git a/packages_generated/product_catalog/src/v2alpha1/validation-rules.gen.ts b/packages_generated/product_catalog/src/v2alpha1/validation-rules.gen.ts index d8c50e1b2..d537011c8 100644 --- a/packages_generated/product_catalog/src/v2alpha1/validation-rules.gen.ts +++ b/packages_generated/product_catalog/src/v2alpha1/validation-rules.gen.ts @@ -2,10 +2,10 @@ // If you have any remark or suggestion do not hesitate to open an issue. export const PublicCatalogApiListPublicCatalogProductsRequest = { - page: { - greaterThanOrEqual: 1, - }, - pageSize: { - greaterThanOrEqual: 1, - }, + page: { + greaterThanOrEqual: 1, + }, + pageSize: { + greaterThanOrEqual: 1, + }, }