@scaleway/sdk-product-catalog 2.4.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -83,6 +83,7 @@ const api = new ProductCatalog.v1.API(client)
83
83
  ## Support
84
84
 
85
85
  We love feedback! Feel free to reach us on:
86
+
86
87
  - [Scaleway Slack community](https://slack.scaleway.com/) - Join us on [#opensource](https://scaleway-community.slack.com/app_redirect?channel=opensource)
87
88
  - [GitHub Issues](https://github.com/scaleway/scaleway-sdk-js/issues)
88
89
 
@@ -93,4 +94,3 @@ This repository is at its early stage and is still in active development. If you
93
94
  ## License
94
95
 
95
96
  This project is Apache 2.0 licensed. See the [LICENSE](https://github.com/scaleway/scaleway-sdk-js/blob/master/LICENSE) file for details.
96
-
@@ -0,0 +1,11 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __exportAll = (all, no_symbols) => {
3
+ let target = {};
4
+ for (var name in all) __defProp(target, name, {
5
+ get: all[name],
6
+ enumerable: true
7
+ });
8
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
9
+ return target;
10
+ };
11
+ export { __exportAll };
package/dist/index.gen.js CHANGED
@@ -1,4 +1,2 @@
1
- import * as index_gen from "./v2alpha1/index.gen.js";
2
- export {
3
- index_gen as ProductCatalogv2alpha1
4
- };
1
+ import { index_gen_exports } from "./v2alpha1/index.gen.js";
2
+ export { index_gen_exports as ProductCatalogv2alpha1 };
@@ -1,50 +1,39 @@
1
- import { API, urlParams, resolveOneOf, enrichForPagination } from "@scaleway/sdk-client";
2
1
  import { unmarshalListPublicCatalogProductsResponse } from "./marshalling.gen.js";
3
- class PublicCatalogAPI extends API {
4
- pageOfListPublicCatalogProducts = (request = {}) => this.client.fetch(
5
- {
6
- method: "GET",
7
- path: `/product-catalog/v2alpha1/public-catalog/products`,
8
- urlParams: urlParams(
9
- ["page", request.page],
10
- [
11
- "page_size",
12
- request.pageSize ?? this.client.settings.defaultPageSize
13
- ],
14
- ["product_types", request.productTypes],
15
- ["status", request.status],
16
- ...Object.entries(
17
- resolveOneOf([
18
- { param: "global", value: request.global },
19
- {
20
- default: this.client.settings.defaultRegion,
21
- param: "region",
22
- value: request.region
23
- },
24
- {
25
- default: this.client.settings.defaultZone,
26
- param: "zone",
27
- value: request.zone
28
- },
29
- { param: "datacenter", value: request.datacenter }
30
- ])
31
- )
32
- )
33
- },
34
- unmarshalListPublicCatalogProductsResponse
35
- );
36
- /**
37
- * 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.
38
- *
39
- * @param request - The request {@link PublicCatalogApiListPublicCatalogProductsRequest}
40
- * @returns A Promise of ListPublicCatalogProductsResponse
41
- */
42
- listPublicCatalogProducts = (request = {}) => enrichForPagination(
43
- "products",
44
- this.pageOfListPublicCatalogProducts,
45
- request
46
- );
47
- }
48
- export {
49
- PublicCatalogAPI
2
+ import { API, enrichForPagination, resolveOneOf, urlParams } from "@scaleway/sdk-client";
3
+ /**
4
+ * Product Catalog API.
5
+ */
6
+ var PublicCatalogAPI = class extends API {
7
+ pageOfListPublicCatalogProducts = (request = {}) => this.client.fetch({
8
+ method: "GET",
9
+ path: `/product-catalog/v2alpha1/public-catalog/products`,
10
+ urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["product_types", request.productTypes], ["status", request.status], ...Object.entries(resolveOneOf([
11
+ {
12
+ param: "global",
13
+ value: request.global
14
+ },
15
+ {
16
+ default: this.client.settings.defaultRegion,
17
+ param: "region",
18
+ value: request.region
19
+ },
20
+ {
21
+ default: this.client.settings.defaultZone,
22
+ param: "zone",
23
+ value: request.zone
24
+ },
25
+ {
26
+ param: "datacenter",
27
+ value: request.datacenter
28
+ }
29
+ ])))
30
+ }, unmarshalListPublicCatalogProductsResponse);
31
+ /**
32
+ * 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.
33
+ *
34
+ * @param request - The request {@link PublicCatalogApiListPublicCatalogProductsRequest}
35
+ * @returns A Promise of ListPublicCatalogProductsResponse
36
+ */
37
+ listPublicCatalogProducts = (request = {}) => enrichForPagination("products", this.pageOfListPublicCatalogProducts, request);
50
38
  };
39
+ export { PublicCatalogAPI };
@@ -1,4 +1,4 @@
1
- export { PublicCatalogAPI } from './api.gen.js';
1
+ export { PublicCatalogAPI, } from './api.gen.js';
2
2
  export * from './marshalling.gen.js';
3
- 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, PublicCatalogProductPropertiesKubernetes, PublicCatalogProductPropertiesKubernetesKapsuleControlPlaneType, PublicCatalogProductPropertiesKubernetesKosmosControlPlaneType, PublicCatalogProductPropertiesKubernetesKosmosNodeType, PublicCatalogProductPropertiesLoadBalancer, PublicCatalogProductPropertiesManagedInference, PublicCatalogProductPropertiesManagedRedisDatabase, PublicCatalogProductPropertiesObjectStorage, PublicCatalogProductPropertiesObjectStorageClassType, PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass, PublicCatalogProductPropertiesObjectStorageInternetTrafficType, PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType, PublicCatalogProductPropertiesObjectStorageRegionTrafficType, PublicCatalogProductPropertiesObjectStorageRestoreType, PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType, PublicCatalogProductPropertiesSecretManager, PublicCatalogProductStatus, PublicCatalogProductUnitOfMeasure, PublicCatalogProductUnitOfMeasureCountableUnit, } from './types.gen.js';
3
+ 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, PublicCatalogProductPropertiesKubernetes, PublicCatalogProductPropertiesKubernetesKapsuleControlPlaneType, PublicCatalogProductPropertiesKubernetesKosmosControlPlaneType, PublicCatalogProductPropertiesKubernetesKosmosNodeType, PublicCatalogProductPropertiesLoadBalancer, PublicCatalogProductPropertiesManagedInference, PublicCatalogProductPropertiesManagedRedisDatabase, PublicCatalogProductPropertiesManagedRelationalDatabase, PublicCatalogProductPropertiesManagedRelationalDatabaseManagementType, PublicCatalogProductPropertiesManagedRelationalDatabaseMultiAzType, PublicCatalogProductPropertiesManagedRelationalDatabaseNodeType, PublicCatalogProductPropertiesManagedRelationalDatabaseStorageType, PublicCatalogProductPropertiesManagedRelationalDatabaseStorageTypeStorageClass, PublicCatalogProductPropertiesObjectStorage, PublicCatalogProductPropertiesObjectStorageClassType, PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass, PublicCatalogProductPropertiesObjectStorageInternetTrafficType, PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType, PublicCatalogProductPropertiesObjectStorageRegionTrafficType, PublicCatalogProductPropertiesObjectStorageRestoreType, PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType, PublicCatalogProductPropertiesSecretManager, PublicCatalogProductStatus, PublicCatalogProductUnitOfMeasure, PublicCatalogProductUnitOfMeasureCountableUnit, } from './types.gen.js';
4
4
  export * as ValidationRules from './validation-rules.gen.js';
@@ -1,8 +1,10 @@
1
- import { PublicCatalogAPI } from "./api.gen.js";
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
2
  import { unmarshalListPublicCatalogProductsResponse } from "./marshalling.gen.js";
3
- import * as validationRules_gen from "./validation-rules.gen.js";
4
- export {
5
- PublicCatalogAPI,
6
- validationRules_gen as ValidationRules,
7
- unmarshalListPublicCatalogProductsResponse
8
- };
3
+ import { PublicCatalogAPI } from "./api.gen.js";
4
+ import { validation_rules_gen_exports } from "./validation-rules.gen.js";
5
+ var index_gen_exports = /* @__PURE__ */ __exportAll({
6
+ PublicCatalogAPI: () => PublicCatalogAPI,
7
+ ValidationRules: () => validation_rules_gen_exports,
8
+ unmarshalListPublicCatalogProductsResponse: () => unmarshalListPublicCatalogProductsResponse
9
+ });
10
+ export { index_gen_exports };
@@ -1,439 +1,278 @@
1
1
  import { isJSONObject, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney } from "@scaleway/sdk-client";
2
- const unmarshalPublicCatalogProductPropertiesHardwareCPUPhysical = (data) => {
3
- if (!isJSONObject(data)) {
4
- throw new TypeError(
5
- `Unmarshalling the type 'PublicCatalogProductPropertiesHardwareCPUPhysical' failed as data isn't a dictionary.`
6
- );
7
- }
8
- return {
9
- benchmark: data.benchmark,
10
- coresPerSocket: data.cores_per_socket,
11
- frequency: data.frequency,
12
- sockets: data.sockets,
13
- threadsPerCore: data.threads_per_core
14
- };
15
- };
16
- const unmarshalPublicCatalogProductPropertiesHardwareCPUVirtual = (data) => {
17
- if (!isJSONObject(data)) {
18
- throw new TypeError(
19
- `Unmarshalling the type 'PublicCatalogProductPropertiesHardwareCPUVirtual' failed as data isn't a dictionary.`
20
- );
21
- }
22
- return {
23
- count: data.count
24
- };
25
- };
26
- const unmarshalPublicCatalogProductPropertiesHardwareCPU = (data) => {
27
- if (!isJSONObject(data)) {
28
- throw new TypeError(
29
- `Unmarshalling the type 'PublicCatalogProductPropertiesHardwareCPU' failed as data isn't a dictionary.`
30
- );
31
- }
32
- return {
33
- arch: data.arch,
34
- description: data.description,
35
- physical: data.physical ? unmarshalPublicCatalogProductPropertiesHardwareCPUPhysical(
36
- data.physical
37
- ) : void 0,
38
- threads: data.threads,
39
- type: data.type,
40
- virtual: data.virtual ? unmarshalPublicCatalogProductPropertiesHardwareCPUVirtual(data.virtual) : void 0
41
- };
42
- };
43
- const unmarshalPublicCatalogProductPropertiesHardwareGPU = (data) => {
44
- if (!isJSONObject(data)) {
45
- throw new TypeError(
46
- `Unmarshalling the type 'PublicCatalogProductPropertiesHardwareGPU' failed as data isn't a dictionary.`
47
- );
48
- }
49
- return {
50
- count: data.count,
51
- description: data.description,
52
- type: data.type
53
- };
54
- };
55
- const unmarshalPublicCatalogProductPropertiesHardwareNetwork = (data) => {
56
- if (!isJSONObject(data)) {
57
- throw new TypeError(
58
- `Unmarshalling the type 'PublicCatalogProductPropertiesHardwareNetwork' failed as data isn't a dictionary.`
59
- );
60
- }
61
- return {
62
- description: data.description,
63
- internalBandwidth: data.internal_bandwidth,
64
- maxPublicBandwidth: data.max_public_bandwidth,
65
- publicBandwidth: data.public_bandwidth
66
- };
67
- };
68
- const unmarshalPublicCatalogProductPropertiesHardwareRAM = (data) => {
69
- if (!isJSONObject(data)) {
70
- throw new TypeError(
71
- `Unmarshalling the type 'PublicCatalogProductPropertiesHardwareRAM' failed as data isn't a dictionary.`
72
- );
73
- }
74
- return {
75
- description: data.description,
76
- size: data.size,
77
- type: data.type
78
- };
79
- };
80
- const unmarshalPublicCatalogProductPropertiesHardwareStorage = (data) => {
81
- if (!isJSONObject(data)) {
82
- throw new TypeError(
83
- `Unmarshalling the type 'PublicCatalogProductPropertiesHardwareStorage' failed as data isn't a dictionary.`
84
- );
85
- }
86
- return {
87
- description: data.description,
88
- total: data.total
89
- };
90
- };
91
- const unmarshalPublicCatalogProductPropertiesKubernetesKapsuleControlPlaneType = (data) => {
92
- if (!isJSONObject(data)) {
93
- throw new TypeError(
94
- `Unmarshalling the type 'PublicCatalogProductPropertiesKubernetesKapsuleControlPlaneType' failed as data isn't a dictionary.`
95
- );
96
- }
97
- return {};
98
- };
99
- const unmarshalPublicCatalogProductPropertiesKubernetesKosmosControlPlaneType = (data) => {
100
- if (!isJSONObject(data)) {
101
- throw new TypeError(
102
- `Unmarshalling the type 'PublicCatalogProductPropertiesKubernetesKosmosControlPlaneType' failed as data isn't a dictionary.`
103
- );
104
- }
105
- return {};
106
- };
107
- const unmarshalPublicCatalogProductPropertiesKubernetesKosmosNodeType = (data) => {
108
- if (!isJSONObject(data)) {
109
- throw new TypeError(
110
- `Unmarshalling the type 'PublicCatalogProductPropertiesKubernetesKosmosNodeType' failed as data isn't a dictionary.`
111
- );
112
- }
113
- return {};
114
- };
115
- const unmarshalPublicCatalogProductPropertiesObjectStorageClassType = (data) => {
116
- if (!isJSONObject(data)) {
117
- throw new TypeError(
118
- `Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageClassType' failed as data isn't a dictionary.`
119
- );
120
- }
121
- return {
122
- storageClass: data.storage_class
123
- };
124
- };
125
- const unmarshalPublicCatalogProductPropertiesObjectStorageInternetTrafficType = (data) => {
126
- if (!isJSONObject(data)) {
127
- throw new TypeError(
128
- `Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageInternetTrafficType' failed as data isn't a dictionary.`
129
- );
130
- }
131
- return {
132
- trafficType: data.traffic_type
133
- };
134
- };
135
- const unmarshalPublicCatalogProductPropertiesObjectStorageRegionTrafficType = (data) => {
136
- if (!isJSONObject(data)) {
137
- throw new TypeError(
138
- `Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageRegionTrafficType' failed as data isn't a dictionary.`
139
- );
140
- }
141
- return {
142
- regionDestination: data.region_destination
143
- };
144
- };
145
- const unmarshalPublicCatalogProductPropertiesObjectStorageRestoreType = (data) => {
146
- if (!isJSONObject(data)) {
147
- throw new TypeError(
148
- `Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageRestoreType' failed as data isn't a dictionary.`
149
- );
150
- }
151
- return {
152
- restoreType: data.restore_type
153
- };
154
- };
155
- const unmarshalPublicCatalogProductPropertiesAppleSilicon = (data) => {
156
- if (!isJSONObject(data)) {
157
- throw new TypeError(
158
- `Unmarshalling the type 'PublicCatalogProductPropertiesAppleSilicon' failed as data isn't a dictionary.`
159
- );
160
- }
161
- return {
162
- range: data.range,
163
- serverType: data.server_type
164
- };
165
- };
166
- const unmarshalPublicCatalogProductPropertiesBlockStorage = (data) => {
167
- if (!isJSONObject(data)) {
168
- throw new TypeError(
169
- `Unmarshalling the type 'PublicCatalogProductPropertiesBlockStorage' failed as data isn't a dictionary.`
170
- );
171
- }
172
- return {
173
- maxVolumeSize: data.max_volume_size,
174
- minVolumeSize: data.min_volume_size
175
- };
176
- };
177
- const unmarshalPublicCatalogProductPropertiesDedibox = (data) => {
178
- if (!isJSONObject(data)) {
179
- throw new TypeError(
180
- `Unmarshalling the type 'PublicCatalogProductPropertiesDedibox' failed as data isn't a dictionary.`
181
- );
182
- }
183
- return {
184
- offerId: data.offer_id,
185
- range: data.range
186
- };
187
- };
188
- const unmarshalPublicCatalogProductPropertiesElasticMetal = (data) => {
189
- if (!isJSONObject(data)) {
190
- throw new TypeError(
191
- `Unmarshalling the type 'PublicCatalogProductPropertiesElasticMetal' failed as data isn't a dictionary.`
192
- );
193
- }
194
- return {
195
- offerId: data.offer_id,
196
- range: data.range
197
- };
198
- };
199
- const unmarshalPublicCatalogProductPropertiesGenerativeApis = (data) => {
200
- if (!isJSONObject(data)) {
201
- throw new TypeError(
202
- `Unmarshalling the type 'PublicCatalogProductPropertiesGenerativeApis' failed as data isn't a dictionary.`
203
- );
204
- }
205
- return {
206
- consumptionMode: data.consumption_mode,
207
- reasoning: data.reasoning,
208
- supportedApis: data.supported_apis
209
- };
210
- };
211
- const unmarshalPublicCatalogProductPropertiesHardware = (data) => {
212
- if (!isJSONObject(data)) {
213
- throw new TypeError(
214
- `Unmarshalling the type 'PublicCatalogProductPropertiesHardware' failed as data isn't a dictionary.`
215
- );
216
- }
217
- return {
218
- cpu: data.cpu ? unmarshalPublicCatalogProductPropertiesHardwareCPU(data.cpu) : void 0,
219
- gpu: data.gpu ? unmarshalPublicCatalogProductPropertiesHardwareGPU(data.gpu) : void 0,
220
- network: data.network ? unmarshalPublicCatalogProductPropertiesHardwareNetwork(data.network) : void 0,
221
- ram: data.ram ? unmarshalPublicCatalogProductPropertiesHardwareRAM(data.ram) : void 0,
222
- storage: data.storage ? unmarshalPublicCatalogProductPropertiesHardwareStorage(data.storage) : void 0
223
- };
224
- };
225
- const unmarshalPublicCatalogProductPropertiesInstance = (data) => {
226
- if (!isJSONObject(data)) {
227
- throw new TypeError(
228
- `Unmarshalling the type 'PublicCatalogProductPropertiesInstance' failed as data isn't a dictionary.`
229
- );
230
- }
231
- return {
232
- offerId: data.offer_id,
233
- range: data.range,
234
- recommendedReplacementOfferIds: data.recommended_replacement_offer_ids
235
- };
236
- };
237
- const unmarshalPublicCatalogProductPropertiesKeyManager = (data) => {
238
- if (!isJSONObject(data)) {
239
- throw new TypeError(
240
- `Unmarshalling the type 'PublicCatalogProductPropertiesKeyManager' failed as data isn't a dictionary.`
241
- );
242
- }
243
- return {};
244
- };
245
- const unmarshalPublicCatalogProductPropertiesKubernetes = (data) => {
246
- if (!isJSONObject(data)) {
247
- throw new TypeError(
248
- `Unmarshalling the type 'PublicCatalogProductPropertiesKubernetes' failed as data isn't a dictionary.`
249
- );
250
- }
251
- return {
252
- kapsuleControlPlane: data.kapsule_control_plane ? unmarshalPublicCatalogProductPropertiesKubernetesKapsuleControlPlaneType(
253
- data.kapsule_control_plane
254
- ) : void 0,
255
- kosmosControlPlane: data.kosmos_control_plane ? unmarshalPublicCatalogProductPropertiesKubernetesKosmosControlPlaneType(
256
- data.kosmos_control_plane
257
- ) : void 0,
258
- kosmosNode: data.kosmos_node ? unmarshalPublicCatalogProductPropertiesKubernetesKosmosNodeType(
259
- data.kosmos_node
260
- ) : void 0
261
- };
262
- };
263
- const unmarshalPublicCatalogProductPropertiesLoadBalancer = (data) => {
264
- if (!isJSONObject(data)) {
265
- throw new TypeError(
266
- `Unmarshalling the type 'PublicCatalogProductPropertiesLoadBalancer' failed as data isn't a dictionary.`
267
- );
268
- }
269
- return {};
270
- };
271
- const unmarshalPublicCatalogProductPropertiesManagedInference = (data) => {
272
- if (!isJSONObject(data)) {
273
- throw new TypeError(
274
- `Unmarshalling the type 'PublicCatalogProductPropertiesManagedInference' failed as data isn't a dictionary.`
275
- );
276
- }
277
- return {
278
- instanceGpuName: data.instance_gpu_name
279
- };
280
- };
281
- const unmarshalPublicCatalogProductPropertiesManagedRedisDatabase = (data) => {
282
- if (!isJSONObject(data)) {
283
- throw new TypeError(
284
- `Unmarshalling the type 'PublicCatalogProductPropertiesManagedRedisDatabase' failed as data isn't a dictionary.`
285
- );
286
- }
287
- return {};
288
- };
289
- const unmarshalPublicCatalogProductPropertiesObjectStorage = (data) => {
290
- if (!isJSONObject(data)) {
291
- throw new TypeError(
292
- `Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorage' failed as data isn't a dictionary.`
293
- );
294
- }
295
- return {
296
- class: data.class ? unmarshalPublicCatalogProductPropertiesObjectStorageClassType(
297
- data.class
298
- ) : void 0,
299
- internetTraffic: data.internet_traffic ? unmarshalPublicCatalogProductPropertiesObjectStorageInternetTrafficType(
300
- data.internet_traffic
301
- ) : void 0,
302
- regionTraffic: data.region_traffic ? unmarshalPublicCatalogProductPropertiesObjectStorageRegionTrafficType(
303
- data.region_traffic
304
- ) : void 0,
305
- restore: data.restore ? unmarshalPublicCatalogProductPropertiesObjectStorageRestoreType(
306
- data.restore
307
- ) : void 0
308
- };
309
- };
310
- const unmarshalPublicCatalogProductPropertiesSecretManager = (data) => {
311
- if (!isJSONObject(data)) {
312
- throw new TypeError(
313
- `Unmarshalling the type 'PublicCatalogProductPropertiesSecretManager' failed as data isn't a dictionary.`
314
- );
315
- }
316
- return {};
317
- };
318
- const unmarshalPublicCatalogProductEnvironmentalImpactEstimation = (data) => {
319
- if (!isJSONObject(data)) {
320
- throw new TypeError(
321
- `Unmarshalling the type 'PublicCatalogProductEnvironmentalImpactEstimation' failed as data isn't a dictionary.`
322
- );
323
- }
324
- return {
325
- kgCo2Equivalent: data.kg_co2_equivalent,
326
- m3WaterUsage: data.m3_water_usage
327
- };
328
- };
329
- const unmarshalPublicCatalogProductLocality = (data) => {
330
- if (!isJSONObject(data)) {
331
- throw new TypeError(
332
- `Unmarshalling the type 'PublicCatalogProductLocality' failed as data isn't a dictionary.`
333
- );
334
- }
335
- return {
336
- datacenter: data.datacenter,
337
- global: data.global,
338
- region: data.region,
339
- zone: data.zone
340
- };
341
- };
342
- const unmarshalPublicCatalogProductPrice = (data) => {
343
- if (!isJSONObject(data)) {
344
- throw new TypeError(
345
- `Unmarshalling the type 'PublicCatalogProductPrice' failed as data isn't a dictionary.`
346
- );
347
- }
348
- return {
349
- retailPrice: data.retail_price ? unmarshalMoney(data.retail_price) : void 0
350
- };
351
- };
352
- const unmarshalPublicCatalogProductProperties = (data) => {
353
- if (!isJSONObject(data)) {
354
- throw new TypeError(
355
- `Unmarshalling the type 'PublicCatalogProductProperties' failed as data isn't a dictionary.`
356
- );
357
- }
358
- return {
359
- appleSilicon: data.apple_silicon ? unmarshalPublicCatalogProductPropertiesAppleSilicon(data.apple_silicon) : void 0,
360
- blockStorage: data.block_storage ? unmarshalPublicCatalogProductPropertiesBlockStorage(data.block_storage) : void 0,
361
- dedibox: data.dedibox ? unmarshalPublicCatalogProductPropertiesDedibox(data.dedibox) : void 0,
362
- elasticMetal: data.elastic_metal ? unmarshalPublicCatalogProductPropertiesElasticMetal(data.elastic_metal) : void 0,
363
- generativeApis: data.generative_apis ? unmarshalPublicCatalogProductPropertiesGenerativeApis(
364
- data.generative_apis
365
- ) : void 0,
366
- hardware: data.hardware ? unmarshalPublicCatalogProductPropertiesHardware(data.hardware) : void 0,
367
- instance: data.instance ? unmarshalPublicCatalogProductPropertiesInstance(data.instance) : void 0,
368
- keyManager: data.key_manager ? unmarshalPublicCatalogProductPropertiesKeyManager(data.key_manager) : void 0,
369
- kubernetes: data.kubernetes ? unmarshalPublicCatalogProductPropertiesKubernetes(data.kubernetes) : void 0,
370
- loadBalancer: data.load_balancer ? unmarshalPublicCatalogProductPropertiesLoadBalancer(data.load_balancer) : void 0,
371
- managedInference: data.managed_inference ? unmarshalPublicCatalogProductPropertiesManagedInference(
372
- data.managed_inference
373
- ) : void 0,
374
- managedRedisDatabase: data.managed_redis_database ? unmarshalPublicCatalogProductPropertiesManagedRedisDatabase(
375
- data.managed_redis_database
376
- ) : void 0,
377
- objectStorage: data.object_storage ? unmarshalPublicCatalogProductPropertiesObjectStorage(
378
- data.object_storage
379
- ) : void 0,
380
- secretManager: data.secret_manager ? unmarshalPublicCatalogProductPropertiesSecretManager(
381
- data.secret_manager
382
- ) : void 0
383
- };
384
- };
385
- const unmarshalPublicCatalogProductUnitOfMeasure = (data) => {
386
- if (!isJSONObject(data)) {
387
- throw new TypeError(
388
- `Unmarshalling the type 'PublicCatalogProductUnitOfMeasure' failed as data isn't a dictionary.`
389
- );
390
- }
391
- return {
392
- size: data.size,
393
- unit: data.unit
394
- };
395
- };
396
- const unmarshalPublicCatalogProduct = (data) => {
397
- if (!isJSONObject(data)) {
398
- throw new TypeError(
399
- `Unmarshalling the type 'PublicCatalogProduct' failed as data isn't a dictionary.`
400
- );
401
- }
402
- return {
403
- badges: data.badges,
404
- description: data.description,
405
- endOfGrowthAt: unmarshalDate(data.end_of_growth_at),
406
- endOfLifeAt: unmarshalDate(data.end_of_life_at),
407
- endOfSaleAt: unmarshalDate(data.end_of_sale_at),
408
- environmentalImpactEstimation: data.environmental_impact_estimation ? unmarshalPublicCatalogProductEnvironmentalImpactEstimation(
409
- data.environmental_impact_estimation
410
- ) : void 0,
411
- locality: data.locality ? unmarshalPublicCatalogProductLocality(data.locality) : void 0,
412
- price: data.price ? unmarshalPublicCatalogProductPrice(data.price) : void 0,
413
- product: data.product,
414
- productCategory: data.product_category,
415
- properties: data.properties ? unmarshalPublicCatalogProductProperties(data.properties) : void 0,
416
- serviceCategory: data.service_category,
417
- sku: data.sku,
418
- status: data.status,
419
- unitOfMeasure: data.unit_of_measure ? unmarshalPublicCatalogProductUnitOfMeasure(data.unit_of_measure) : void 0,
420
- variant: data.variant
421
- };
2
+ var unmarshalPublicCatalogProductPropertiesHardwareCPUPhysical = (data) => {
3
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardwareCPUPhysical' failed as data isn't a dictionary.`);
4
+ return {
5
+ benchmark: data.benchmark,
6
+ coresPerSocket: data.cores_per_socket,
7
+ frequency: data.frequency,
8
+ sockets: data.sockets,
9
+ threadsPerCore: data.threads_per_core
10
+ };
11
+ };
12
+ var unmarshalPublicCatalogProductPropertiesHardwareCPUVirtual = (data) => {
13
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardwareCPUVirtual' failed as data isn't a dictionary.`);
14
+ return { count: data.count };
15
+ };
16
+ var unmarshalPublicCatalogProductPropertiesHardwareCPU = (data) => {
17
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardwareCPU' failed as data isn't a dictionary.`);
18
+ return {
19
+ arch: data.arch,
20
+ description: data.description,
21
+ physical: data.physical ? unmarshalPublicCatalogProductPropertiesHardwareCPUPhysical(data.physical) : void 0,
22
+ threads: data.threads,
23
+ type: data.type,
24
+ virtual: data.virtual ? unmarshalPublicCatalogProductPropertiesHardwareCPUVirtual(data.virtual) : void 0
25
+ };
26
+ };
27
+ var unmarshalPublicCatalogProductPropertiesHardwareGPU = (data) => {
28
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardwareGPU' failed as data isn't a dictionary.`);
29
+ return {
30
+ count: data.count,
31
+ description: data.description,
32
+ type: data.type
33
+ };
34
+ };
35
+ var unmarshalPublicCatalogProductPropertiesHardwareNetwork = (data) => {
36
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardwareNetwork' failed as data isn't a dictionary.`);
37
+ return {
38
+ description: data.description,
39
+ internalBandwidth: data.internal_bandwidth,
40
+ maxPublicBandwidth: data.max_public_bandwidth,
41
+ publicBandwidth: data.public_bandwidth
42
+ };
43
+ };
44
+ var unmarshalPublicCatalogProductPropertiesHardwareRAM = (data) => {
45
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardwareRAM' failed as data isn't a dictionary.`);
46
+ return {
47
+ description: data.description,
48
+ size: data.size,
49
+ type: data.type
50
+ };
51
+ };
52
+ var unmarshalPublicCatalogProductPropertiesHardwareStorage = (data) => {
53
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardwareStorage' failed as data isn't a dictionary.`);
54
+ return {
55
+ description: data.description,
56
+ total: data.total
57
+ };
58
+ };
59
+ var unmarshalPublicCatalogProductPropertiesKubernetesKapsuleControlPlaneType = (data) => {
60
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesKubernetesKapsuleControlPlaneType' failed as data isn't a dictionary.`);
61
+ return {};
62
+ };
63
+ var unmarshalPublicCatalogProductPropertiesKubernetesKosmosControlPlaneType = (data) => {
64
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesKubernetesKosmosControlPlaneType' failed as data isn't a dictionary.`);
65
+ return {};
66
+ };
67
+ var unmarshalPublicCatalogProductPropertiesKubernetesKosmosNodeType = (data) => {
68
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesKubernetesKosmosNodeType' failed as data isn't a dictionary.`);
69
+ return {};
70
+ };
71
+ var unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseManagementType = (data) => {
72
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedRelationalDatabaseManagementType' failed as data isn't a dictionary.`);
73
+ return {};
74
+ };
75
+ var unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseMultiAzType = (data) => {
76
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedRelationalDatabaseMultiAzType' failed as data isn't a dictionary.`);
77
+ return {};
78
+ };
79
+ var unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseNodeType = (data) => {
80
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedRelationalDatabaseNodeType' failed as data isn't a dictionary.`);
81
+ return {};
82
+ };
83
+ var unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseStorageType = (data) => {
84
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedRelationalDatabaseStorageType' failed as data isn't a dictionary.`);
85
+ return { storageClass: data.storage_class };
86
+ };
87
+ var unmarshalPublicCatalogProductPropertiesObjectStorageClassType = (data) => {
88
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageClassType' failed as data isn't a dictionary.`);
89
+ return { storageClass: data.storage_class };
90
+ };
91
+ var unmarshalPublicCatalogProductPropertiesObjectStorageInternetTrafficType = (data) => {
92
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageInternetTrafficType' failed as data isn't a dictionary.`);
93
+ return { trafficType: data.traffic_type };
94
+ };
95
+ var unmarshalPublicCatalogProductPropertiesObjectStorageRegionTrafficType = (data) => {
96
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageRegionTrafficType' failed as data isn't a dictionary.`);
97
+ return { regionDestination: data.region_destination };
98
+ };
99
+ var unmarshalPublicCatalogProductPropertiesObjectStorageRestoreType = (data) => {
100
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageRestoreType' failed as data isn't a dictionary.`);
101
+ return { restoreType: data.restore_type };
102
+ };
103
+ var unmarshalPublicCatalogProductPropertiesAppleSilicon = (data) => {
104
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesAppleSilicon' failed as data isn't a dictionary.`);
105
+ return {
106
+ range: data.range,
107
+ serverType: data.server_type
108
+ };
109
+ };
110
+ var unmarshalPublicCatalogProductPropertiesBlockStorage = (data) => {
111
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesBlockStorage' failed as data isn't a dictionary.`);
112
+ return {
113
+ maxVolumeSize: data.max_volume_size,
114
+ minVolumeSize: data.min_volume_size
115
+ };
116
+ };
117
+ var unmarshalPublicCatalogProductPropertiesDedibox = (data) => {
118
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesDedibox' failed as data isn't a dictionary.`);
119
+ return {
120
+ offerId: data.offer_id,
121
+ range: data.range
122
+ };
123
+ };
124
+ var unmarshalPublicCatalogProductPropertiesElasticMetal = (data) => {
125
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesElasticMetal' failed as data isn't a dictionary.`);
126
+ return {
127
+ offerId: data.offer_id,
128
+ range: data.range
129
+ };
130
+ };
131
+ var unmarshalPublicCatalogProductPropertiesGenerativeApis = (data) => {
132
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesGenerativeApis' failed as data isn't a dictionary.`);
133
+ return {
134
+ consumptionMode: data.consumption_mode,
135
+ reasoning: data.reasoning,
136
+ supportedApis: data.supported_apis
137
+ };
138
+ };
139
+ var unmarshalPublicCatalogProductPropertiesHardware = (data) => {
140
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardware' failed as data isn't a dictionary.`);
141
+ return {
142
+ cpu: data.cpu ? unmarshalPublicCatalogProductPropertiesHardwareCPU(data.cpu) : void 0,
143
+ gpu: data.gpu ? unmarshalPublicCatalogProductPropertiesHardwareGPU(data.gpu) : void 0,
144
+ network: data.network ? unmarshalPublicCatalogProductPropertiesHardwareNetwork(data.network) : void 0,
145
+ ram: data.ram ? unmarshalPublicCatalogProductPropertiesHardwareRAM(data.ram) : void 0,
146
+ storage: data.storage ? unmarshalPublicCatalogProductPropertiesHardwareStorage(data.storage) : void 0
147
+ };
148
+ };
149
+ var unmarshalPublicCatalogProductPropertiesInstance = (data) => {
150
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesInstance' failed as data isn't a dictionary.`);
151
+ return {
152
+ offerId: data.offer_id,
153
+ range: data.range,
154
+ recommendedReplacementOfferIds: data.recommended_replacement_offer_ids
155
+ };
156
+ };
157
+ var unmarshalPublicCatalogProductPropertiesKeyManager = (data) => {
158
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesKeyManager' failed as data isn't a dictionary.`);
159
+ return {};
160
+ };
161
+ var unmarshalPublicCatalogProductPropertiesKubernetes = (data) => {
162
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesKubernetes' failed as data isn't a dictionary.`);
163
+ return {
164
+ kapsuleControlPlane: data.kapsule_control_plane ? unmarshalPublicCatalogProductPropertiesKubernetesKapsuleControlPlaneType(data.kapsule_control_plane) : void 0,
165
+ kosmosControlPlane: data.kosmos_control_plane ? unmarshalPublicCatalogProductPropertiesKubernetesKosmosControlPlaneType(data.kosmos_control_plane) : void 0,
166
+ kosmosNode: data.kosmos_node ? unmarshalPublicCatalogProductPropertiesKubernetesKosmosNodeType(data.kosmos_node) : void 0
167
+ };
168
+ };
169
+ var unmarshalPublicCatalogProductPropertiesLoadBalancer = (data) => {
170
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesLoadBalancer' failed as data isn't a dictionary.`);
171
+ return {};
172
+ };
173
+ var unmarshalPublicCatalogProductPropertiesManagedInference = (data) => {
174
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedInference' failed as data isn't a dictionary.`);
175
+ return { instanceGpuName: data.instance_gpu_name };
176
+ };
177
+ var unmarshalPublicCatalogProductPropertiesManagedRedisDatabase = (data) => {
178
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedRedisDatabase' failed as data isn't a dictionary.`);
179
+ return {};
180
+ };
181
+ var unmarshalPublicCatalogProductPropertiesManagedRelationalDatabase = (data) => {
182
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedRelationalDatabase' failed as data isn't a dictionary.`);
183
+ return {
184
+ management: data.management ? unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseManagementType(data.management) : void 0,
185
+ multiAz: data.multi_az ? unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseMultiAzType(data.multi_az) : void 0,
186
+ node: data.node ? unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseNodeType(data.node) : void 0,
187
+ storage: data.storage ? unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseStorageType(data.storage) : void 0
188
+ };
189
+ };
190
+ var unmarshalPublicCatalogProductPropertiesObjectStorage = (data) => {
191
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorage' failed as data isn't a dictionary.`);
192
+ return {
193
+ class: data.class ? unmarshalPublicCatalogProductPropertiesObjectStorageClassType(data.class) : void 0,
194
+ internetTraffic: data.internet_traffic ? unmarshalPublicCatalogProductPropertiesObjectStorageInternetTrafficType(data.internet_traffic) : void 0,
195
+ regionTraffic: data.region_traffic ? unmarshalPublicCatalogProductPropertiesObjectStorageRegionTrafficType(data.region_traffic) : void 0,
196
+ restore: data.restore ? unmarshalPublicCatalogProductPropertiesObjectStorageRestoreType(data.restore) : void 0
197
+ };
198
+ };
199
+ var unmarshalPublicCatalogProductPropertiesSecretManager = (data) => {
200
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesSecretManager' failed as data isn't a dictionary.`);
201
+ return {};
202
+ };
203
+ var unmarshalPublicCatalogProductEnvironmentalImpactEstimation = (data) => {
204
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductEnvironmentalImpactEstimation' failed as data isn't a dictionary.`);
205
+ return {
206
+ kgCo2Equivalent: data.kg_co2_equivalent,
207
+ m3WaterUsage: data.m3_water_usage
208
+ };
209
+ };
210
+ var unmarshalPublicCatalogProductLocality = (data) => {
211
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductLocality' failed as data isn't a dictionary.`);
212
+ return {
213
+ datacenter: data.datacenter,
214
+ global: data.global,
215
+ region: data.region,
216
+ zone: data.zone
217
+ };
218
+ };
219
+ var unmarshalPublicCatalogProductPrice = (data) => {
220
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPrice' failed as data isn't a dictionary.`);
221
+ return { retailPrice: data.retail_price ? unmarshalMoney(data.retail_price) : void 0 };
222
+ };
223
+ var unmarshalPublicCatalogProductProperties = (data) => {
224
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductProperties' failed as data isn't a dictionary.`);
225
+ return {
226
+ appleSilicon: data.apple_silicon ? unmarshalPublicCatalogProductPropertiesAppleSilicon(data.apple_silicon) : void 0,
227
+ blockStorage: data.block_storage ? unmarshalPublicCatalogProductPropertiesBlockStorage(data.block_storage) : void 0,
228
+ dedibox: data.dedibox ? unmarshalPublicCatalogProductPropertiesDedibox(data.dedibox) : void 0,
229
+ elasticMetal: data.elastic_metal ? unmarshalPublicCatalogProductPropertiesElasticMetal(data.elastic_metal) : void 0,
230
+ generativeApis: data.generative_apis ? unmarshalPublicCatalogProductPropertiesGenerativeApis(data.generative_apis) : void 0,
231
+ hardware: data.hardware ? unmarshalPublicCatalogProductPropertiesHardware(data.hardware) : void 0,
232
+ instance: data.instance ? unmarshalPublicCatalogProductPropertiesInstance(data.instance) : void 0,
233
+ keyManager: data.key_manager ? unmarshalPublicCatalogProductPropertiesKeyManager(data.key_manager) : void 0,
234
+ kubernetes: data.kubernetes ? unmarshalPublicCatalogProductPropertiesKubernetes(data.kubernetes) : void 0,
235
+ loadBalancer: data.load_balancer ? unmarshalPublicCatalogProductPropertiesLoadBalancer(data.load_balancer) : void 0,
236
+ managedInference: data.managed_inference ? unmarshalPublicCatalogProductPropertiesManagedInference(data.managed_inference) : void 0,
237
+ managedRedisDatabase: data.managed_redis_database ? unmarshalPublicCatalogProductPropertiesManagedRedisDatabase(data.managed_redis_database) : void 0,
238
+ managedRelationalDatabase: data.managed_relational_database ? unmarshalPublicCatalogProductPropertiesManagedRelationalDatabase(data.managed_relational_database) : void 0,
239
+ objectStorage: data.object_storage ? unmarshalPublicCatalogProductPropertiesObjectStorage(data.object_storage) : void 0,
240
+ secretManager: data.secret_manager ? unmarshalPublicCatalogProductPropertiesSecretManager(data.secret_manager) : void 0
241
+ };
242
+ };
243
+ var unmarshalPublicCatalogProductUnitOfMeasure = (data) => {
244
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductUnitOfMeasure' failed as data isn't a dictionary.`);
245
+ return {
246
+ size: data.size,
247
+ unit: data.unit
248
+ };
249
+ };
250
+ var unmarshalPublicCatalogProduct = (data) => {
251
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProduct' failed as data isn't a dictionary.`);
252
+ return {
253
+ badges: data.badges,
254
+ description: data.description,
255
+ endOfGrowthAt: unmarshalDate(data.end_of_growth_at),
256
+ endOfLifeAt: unmarshalDate(data.end_of_life_at),
257
+ endOfSaleAt: unmarshalDate(data.end_of_sale_at),
258
+ environmentalImpactEstimation: data.environmental_impact_estimation ? unmarshalPublicCatalogProductEnvironmentalImpactEstimation(data.environmental_impact_estimation) : void 0,
259
+ locality: data.locality ? unmarshalPublicCatalogProductLocality(data.locality) : void 0,
260
+ price: data.price ? unmarshalPublicCatalogProductPrice(data.price) : void 0,
261
+ product: data.product,
262
+ productCategory: data.product_category,
263
+ properties: data.properties ? unmarshalPublicCatalogProductProperties(data.properties) : void 0,
264
+ serviceCategory: data.service_category,
265
+ sku: data.sku,
266
+ status: data.status,
267
+ unitOfMeasure: data.unit_of_measure ? unmarshalPublicCatalogProductUnitOfMeasure(data.unit_of_measure) : void 0,
268
+ variant: data.variant
269
+ };
422
270
  };
423
271
  const unmarshalListPublicCatalogProductsResponse = (data) => {
424
- if (!isJSONObject(data)) {
425
- throw new TypeError(
426
- `Unmarshalling the type 'ListPublicCatalogProductsResponse' failed as data isn't a dictionary.`
427
- );
428
- }
429
- return {
430
- products: unmarshalArrayOfObject(
431
- data.products,
432
- unmarshalPublicCatalogProduct
433
- ),
434
- totalCount: data.total_count
435
- };
436
- };
437
- export {
438
- unmarshalListPublicCatalogProductsResponse
272
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPublicCatalogProductsResponse' failed as data isn't a dictionary.`);
273
+ return {
274
+ products: unmarshalArrayOfObject(data.products, unmarshalPublicCatalogProduct),
275
+ totalCount: data.total_count
276
+ };
439
277
  };
278
+ export { unmarshalListPublicCatalogProductsResponse };
@@ -1,9 +1,10 @@
1
1
  import type { Money, Region as ScwRegion, Zone as ScwZone } from '@scaleway/sdk-client';
2
- 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' | 'kubernetes';
2
+ 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' | 'kubernetes' | 'managed_relational_database';
3
3
  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';
4
4
  export type PublicCatalogProductProductBadge = 'unknown_product_badge' | 'new_product' | 'best_seller' | 'best_value' | 'popular';
5
5
  export type PublicCatalogProductPropertiesGenerativeApisConsumptionMode = 'unknown_consumption_mode' | 'realtime' | 'batch';
6
6
  export type PublicCatalogProductPropertiesHardwareCPUArch = 'unknown_arch' | 'x64' | 'arm64' | 'riscv' | 'apple_silicon';
7
+ export type PublicCatalogProductPropertiesManagedRelationalDatabaseStorageTypeStorageClass = 'unknown_storage_class' | 'block_ssd' | 'block_ssd_snapshot' | 'local_ssd' | 'sbs_5k' | 'sbs_5k_snapshot' | 'sbs_15k' | 'sbs_15k_snapshot' | 'backup';
7
8
  export type PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass = 'unknown_storage_class' | 'standard' | 'glacier' | 'onezone_ia';
8
9
  export type PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType = 'unknown_traffic_type' | 'ingress' | 'egress';
9
10
  export type PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType = 'unknown_restore_type' | 'standard';
@@ -129,6 +130,18 @@ export interface PublicCatalogProductPropertiesKubernetesKosmosControlPlaneType
129
130
  }
130
131
  export interface PublicCatalogProductPropertiesKubernetesKosmosNodeType {
131
132
  }
133
+ export interface PublicCatalogProductPropertiesManagedRelationalDatabaseManagementType {
134
+ }
135
+ export interface PublicCatalogProductPropertiesManagedRelationalDatabaseMultiAzType {
136
+ }
137
+ export interface PublicCatalogProductPropertiesManagedRelationalDatabaseNodeType {
138
+ }
139
+ export interface PublicCatalogProductPropertiesManagedRelationalDatabaseStorageType {
140
+ /**
141
+ * The type of Storage class.
142
+ */
143
+ storageClass: PublicCatalogProductPropertiesManagedRelationalDatabaseStorageTypeStorageClass;
144
+ }
132
145
  export interface PublicCatalogProductPropertiesObjectStorageClassType {
133
146
  /**
134
147
  * The storage class.
@@ -266,6 +279,32 @@ export interface PublicCatalogProductPropertiesManagedInference {
266
279
  }
267
280
  export interface PublicCatalogProductPropertiesManagedRedisDatabase {
268
281
  }
282
+ export interface PublicCatalogProductPropertiesManagedRelationalDatabase {
283
+ /**
284
+ * The properties related to Relational Database Management type.
285
+ *
286
+ * One-of ('type'): at most one of 'management', 'node', 'storage', 'multiAz' could be set.
287
+ */
288
+ management?: PublicCatalogProductPropertiesManagedRelationalDatabaseManagementType;
289
+ /**
290
+ * The properties related to Relational Database Nodes.
291
+ *
292
+ * One-of ('type'): at most one of 'management', 'node', 'storage', 'multiAz' could be set.
293
+ */
294
+ node?: PublicCatalogProductPropertiesManagedRelationalDatabaseNodeType;
295
+ /**
296
+ * The properties related to Relational Database Storage type.
297
+ *
298
+ * One-of ('type'): at most one of 'management', 'node', 'storage', 'multiAz' could be set.
299
+ */
300
+ storage?: PublicCatalogProductPropertiesManagedRelationalDatabaseStorageType;
301
+ /**
302
+ * The properties related to Relational Database Multi AZ type.
303
+ *
304
+ * One-of ('type'): at most one of 'management', 'node', 'storage', 'multiAz' could be set.
305
+ */
306
+ multiAz?: PublicCatalogProductPropertiesManagedRelationalDatabaseMultiAzType;
307
+ }
269
308
  export interface PublicCatalogProductPropertiesObjectStorage {
270
309
  /**
271
310
  * The properties related to Object Storage class.
@@ -338,79 +377,85 @@ export interface PublicCatalogProductProperties {
338
377
  /**
339
378
  * The properties of Dedibox products.
340
379
  *
341
- * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes' could be set.
380
+ * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes', 'managedRelationalDatabase' could be set.
342
381
  */
343
382
  dedibox?: PublicCatalogProductPropertiesDedibox;
344
383
  /**
345
384
  * The properties of Elastic Metal products.
346
385
  *
347
- * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes' could be set.
386
+ * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes', 'managedRelationalDatabase' could be set.
348
387
  */
349
388
  elasticMetal?: PublicCatalogProductPropertiesElasticMetal;
350
389
  /**
351
390
  * The properties of Apple Silicon products.
352
391
  *
353
- * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes' could be set.
392
+ * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes', 'managedRelationalDatabase' could be set.
354
393
  */
355
394
  appleSilicon?: PublicCatalogProductPropertiesAppleSilicon;
356
395
  /**
357
396
  * The properties of Instance products.
358
397
  *
359
- * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes' could be set.
398
+ * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes', 'managedRelationalDatabase' could be set.
360
399
  */
361
400
  instance?: PublicCatalogProductPropertiesInstance;
362
401
  /**
363
402
  * The properties of Block Storage products.
364
403
  *
365
- * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes' could be set.
404
+ * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes', 'managedRelationalDatabase' could be set.
366
405
  */
367
406
  blockStorage?: PublicCatalogProductPropertiesBlockStorage;
368
407
  /**
369
408
  * The properties of Object Storage products.
370
409
  *
371
- * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes' could be set.
410
+ * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes', 'managedRelationalDatabase' could be set.
372
411
  */
373
412
  objectStorage?: PublicCatalogProductPropertiesObjectStorage;
374
413
  /**
375
414
  * The properties of Managed Inference products.
376
415
  *
377
- * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes' could be set.
416
+ * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes', 'managedRelationalDatabase' could be set.
378
417
  */
379
418
  managedInference?: PublicCatalogProductPropertiesManagedInference;
380
419
  /**
381
420
  * The properties of Generative APIs products.
382
421
  *
383
- * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes' could be set.
422
+ * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes', 'managedRelationalDatabase' could be set.
384
423
  */
385
424
  generativeApis?: PublicCatalogProductPropertiesGenerativeApis;
386
425
  /**
387
426
  * The properties of Load Balancer products.
388
427
  *
389
- * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes' could be set.
428
+ * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes', 'managedRelationalDatabase' could be set.
390
429
  */
391
430
  loadBalancer?: PublicCatalogProductPropertiesLoadBalancer;
392
431
  /**
393
432
  *
394
- * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes' could be set.
433
+ * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes', 'managedRelationalDatabase' could be set.
395
434
  */
396
435
  secretManager?: PublicCatalogProductPropertiesSecretManager;
397
436
  /**
398
437
  * The properties of Managed Redis Database products.
399
438
  *
400
- * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes' could be set.
439
+ * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes', 'managedRelationalDatabase' could be set.
401
440
  */
402
441
  managedRedisDatabase?: PublicCatalogProductPropertiesManagedRedisDatabase;
403
442
  /**
404
443
  *
405
- * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes' could be set.
444
+ * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes', 'managedRelationalDatabase' could be set.
406
445
  */
407
446
  keyManager?: PublicCatalogProductPropertiesKeyManager;
408
447
  /**
409
448
  * The properties of Kubernetes products.
410
449
  *
411
- * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes' could be set.
450
+ * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes', 'managedRelationalDatabase' could be set.
412
451
  */
413
452
  kubernetes?: PublicCatalogProductPropertiesKubernetes;
453
+ /**
454
+ * The properties of Managed Relational Database products.
455
+ *
456
+ * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage', 'objectStorage', 'managedInference', 'generativeApis', 'loadBalancer', 'secretManager', 'managedRedisDatabase', 'keyManager', 'kubernetes', 'managedRelationalDatabase' could be set.
457
+ */
458
+ managedRelationalDatabase?: PublicCatalogProductPropertiesManagedRelationalDatabase;
414
459
  }
415
460
  export interface PublicCatalogProductUnitOfMeasure {
416
461
  unit: PublicCatalogProductUnitOfMeasureCountableUnit;
@@ -1,11 +1,7 @@
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
+ var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({ PublicCatalogApiListPublicCatalogProductsRequest: () => PublicCatalogApiListPublicCatalogProductsRequest });
1
3
  const PublicCatalogApiListPublicCatalogProductsRequest = {
2
- page: {
3
- greaterThanOrEqual: 1
4
- },
5
- pageSize: {
6
- greaterThanOrEqual: 1
7
- }
8
- };
9
- export {
10
- PublicCatalogApiListPublicCatalogProductsRequest
4
+ page: { greaterThanOrEqual: 1 },
5
+ pageSize: { greaterThanOrEqual: 1 }
11
6
  };
7
+ export { validation_rules_gen_exports };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-product-catalog",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "description": "Scaleway SDK product-catalog",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -27,13 +27,13 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@scaleway/random-name": "5.1.2",
30
- "@scaleway/sdk-std": "2.1.0"
30
+ "@scaleway/sdk-std": "2.2.0"
31
31
  },
32
32
  "peerDependencies": {
33
- "@scaleway/sdk-client": "^2.1.0"
33
+ "@scaleway/sdk-client": "^2.2.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@scaleway/sdk-client": "^2.1.0"
36
+ "@scaleway/sdk-client": "^2.2.0"
37
37
  },
38
38
  "scripts": {
39
39
  "package:check": "pnpm publint",