@scaleway/sdk-product-catalog 2.18.0 → 2.20.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.
@@ -1,411 +0,0 @@
1
- import { isJSONObject, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney } from "@scaleway/sdk-client";
2
- //#region src/v2alpha1/marshalling.gen.ts
3
- const unmarshalPublicCatalogProductPropertiesHardwareCPUPhysical = (data) => {
4
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardwareCPUPhysical' failed as data isn't a dictionary.`);
5
- return {
6
- benchmark: data.benchmark,
7
- coresPerSocket: data.cores_per_socket,
8
- frequency: data.frequency,
9
- sockets: data.sockets,
10
- threadsPerCore: data.threads_per_core
11
- };
12
- };
13
- const unmarshalPublicCatalogProductPropertiesHardwareCPUVirtual = (data) => {
14
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardwareCPUVirtual' failed as data isn't a dictionary.`);
15
- return { count: data.count };
16
- };
17
- const unmarshalPublicCatalogProductPropertiesHardwareCPU = (data) => {
18
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardwareCPU' failed as data isn't a dictionary.`);
19
- return {
20
- arch: data.arch,
21
- description: data.description,
22
- physical: data.physical ? unmarshalPublicCatalogProductPropertiesHardwareCPUPhysical(data.physical) : void 0,
23
- shared: data.shared,
24
- threads: data.threads,
25
- type: data.type,
26
- virtual: data.virtual ? unmarshalPublicCatalogProductPropertiesHardwareCPUVirtual(data.virtual) : void 0
27
- };
28
- };
29
- const unmarshalPublicCatalogProductPropertiesHardwareGPU = (data) => {
30
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardwareGPU' failed as data isn't a dictionary.`);
31
- return {
32
- count: data.count,
33
- description: data.description,
34
- type: data.type
35
- };
36
- };
37
- const unmarshalPublicCatalogProductPropertiesHardwareNetwork = (data) => {
38
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardwareNetwork' failed as data isn't a dictionary.`);
39
- return {
40
- description: data.description,
41
- internalBandwidth: data.internal_bandwidth,
42
- maxPublicBandwidth: data.max_public_bandwidth,
43
- publicBandwidth: data.public_bandwidth
44
- };
45
- };
46
- const unmarshalPublicCatalogProductPropertiesHardwareRAM = (data) => {
47
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardwareRAM' failed as data isn't a dictionary.`);
48
- return {
49
- description: data.description,
50
- eccType: data.ecc_type ? data.ecc_type : void 0,
51
- size: data.size,
52
- type: data.type
53
- };
54
- };
55
- const unmarshalPublicCatalogProductPropertiesHardwareStorage = (data) => {
56
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardwareStorage' failed as data isn't a dictionary.`);
57
- return {
58
- description: data.description,
59
- total: data.total
60
- };
61
- };
62
- const unmarshalPublicCatalogProductPropertiesKubernetesKapsuleControlPlaneType = (data) => {
63
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesKubernetesKapsuleControlPlaneType' failed as data isn't a dictionary.`);
64
- return {};
65
- };
66
- const unmarshalPublicCatalogProductPropertiesKubernetesKosmosControlPlaneType = (data) => {
67
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesKubernetesKosmosControlPlaneType' failed as data isn't a dictionary.`);
68
- return {};
69
- };
70
- const unmarshalPublicCatalogProductPropertiesKubernetesKosmosNodeType = (data) => {
71
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesKubernetesKosmosNodeType' failed as data isn't a dictionary.`);
72
- return {};
73
- };
74
- const unmarshalPublicCatalogProductPropertiesLoadBalancerIPV4Type = (data) => {
75
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesLoadBalancerIPV4Type' failed as data isn't a dictionary.`);
76
- return {};
77
- };
78
- const unmarshalPublicCatalogProductPropertiesLoadBalancerNodeType = (data) => {
79
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesLoadBalancerNodeType' failed as data isn't a dictionary.`);
80
- return {
81
- bandwidth: data.bandwidth,
82
- multiCloudProvider: data.multi_cloud_provider,
83
- offerId: data.offer_id
84
- };
85
- };
86
- const unmarshalPublicCatalogProductPropertiesManagedInferenceManagedInferenceCustomModelStorage = (data) => {
87
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedInferenceManagedInferenceCustomModelStorage' failed as data isn't a dictionary.`);
88
- return {};
89
- };
90
- const unmarshalPublicCatalogProductPropertiesManagedInferenceManagedInferenceDeployment = (data) => {
91
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedInferenceManagedInferenceDeployment' failed as data isn't a dictionary.`);
92
- return { instanceGpuName: data.instance_gpu_name };
93
- };
94
- const unmarshalPublicCatalogProductPropertiesManagedMongoDBManagementType = (data) => {
95
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedMongoDBManagementType' failed as data isn't a dictionary.`);
96
- return {};
97
- };
98
- const unmarshalPublicCatalogProductPropertiesManagedMongoDBNodeType = (data) => {
99
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedMongoDBNodeType' failed as data isn't a dictionary.`);
100
- return {};
101
- };
102
- const unmarshalPublicCatalogProductPropertiesManagedMongoDBStorageType = (data) => {
103
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedMongoDBStorageType' failed as data isn't a dictionary.`);
104
- return { storageClass: data.storage_class };
105
- };
106
- const unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseManagementType = (data) => {
107
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedRelationalDatabaseManagementType' failed as data isn't a dictionary.`);
108
- return {};
109
- };
110
- const unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseMultiAzType = (data) => {
111
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedRelationalDatabaseMultiAzType' failed as data isn't a dictionary.`);
112
- return {};
113
- };
114
- const unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseNodeType = (data) => {
115
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedRelationalDatabaseNodeType' failed as data isn't a dictionary.`);
116
- return {};
117
- };
118
- const unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseStorageType = (data) => {
119
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedRelationalDatabaseStorageType' failed as data isn't a dictionary.`);
120
- return { storageClass: data.storage_class };
121
- };
122
- const unmarshalPublicCatalogProductPropertiesObjectStorageClassType = (data) => {
123
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageClassType' failed as data isn't a dictionary.`);
124
- return { storageClass: data.storage_class };
125
- };
126
- const unmarshalPublicCatalogProductPropertiesObjectStorageInternetTrafficType = (data) => {
127
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageInternetTrafficType' failed as data isn't a dictionary.`);
128
- return { trafficType: data.traffic_type };
129
- };
130
- const unmarshalPublicCatalogProductPropertiesObjectStorageRegionTrafficType = (data) => {
131
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageRegionTrafficType' failed as data isn't a dictionary.`);
132
- return { regionDestination: data.region_destination };
133
- };
134
- const unmarshalPublicCatalogProductPropertiesObjectStorageRestoreType = (data) => {
135
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageRestoreType' failed as data isn't a dictionary.`);
136
- return { restoreType: data.restore_type };
137
- };
138
- const unmarshalPublicCatalogProductPropertiesServerlessContainersCPUType = (data) => {
139
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesServerlessContainersCPUType' failed as data isn't a dictionary.`);
140
- return { mvcpuCounts: data.mvcpu_counts };
141
- };
142
- const unmarshalPublicCatalogProductPropertiesServerlessContainersMemoryType = (data) => {
143
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesServerlessContainersMemoryType' failed as data isn't a dictionary.`);
144
- return { sizes: data.sizes };
145
- };
146
- const unmarshalPublicCatalogProductPropertiesServerlessFunctionsConsumptionType = (data) => {
147
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesServerlessFunctionsConsumptionType' failed as data isn't a dictionary.`);
148
- return {};
149
- };
150
- const unmarshalPublicCatalogProductPropertiesServerlessFunctionsFreeTierType = (data) => {
151
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesServerlessFunctionsFreeTierType' failed as data isn't a dictionary.`);
152
- return {};
153
- };
154
- const unmarshalPublicCatalogProductPropertiesServerlessFunctionsProvisionType = (data) => {
155
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesServerlessFunctionsProvisionType' failed as data isn't a dictionary.`);
156
- return {};
157
- };
158
- const unmarshalPublicCatalogProductPropertiesServerlessFunctionsRequestType = (data) => {
159
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesServerlessFunctionsRequestType' failed as data isn't a dictionary.`);
160
- return {};
161
- };
162
- const unmarshalPublicCatalogProductPropertiesServerlessFunctionsRuntimeResource = (data) => {
163
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesServerlessFunctionsRuntimeResource' failed as data isn't a dictionary.`);
164
- return {
165
- memorySize: data.memory_size,
166
- mvcpuCount: data.mvcpu_count
167
- };
168
- };
169
- const unmarshalPublicCatalogProductPropertiesServerlessJobsCPUType = (data) => {
170
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesServerlessJobsCPUType' failed as data isn't a dictionary.`);
171
- return { mvcpuCounts: data.mvcpu_counts };
172
- };
173
- const unmarshalPublicCatalogProductPropertiesServerlessJobsMemoryType = (data) => {
174
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesServerlessJobsMemoryType' failed as data isn't a dictionary.`);
175
- return { sizes: data.sizes };
176
- };
177
- const unmarshalPublicCatalogProductPropertiesApacheKafka = (data) => {
178
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesApacheKafka' failed as data isn't a dictionary.`);
179
- return {};
180
- };
181
- const unmarshalPublicCatalogProductPropertiesAppleSilicon = (data) => {
182
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesAppleSilicon' failed as data isn't a dictionary.`);
183
- return {
184
- range: data.range,
185
- serverType: data.server_type
186
- };
187
- };
188
- const unmarshalPublicCatalogProductPropertiesBlockStorage = (data) => {
189
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesBlockStorage' failed as data isn't a dictionary.`);
190
- return {
191
- maxVolumeSize: data.max_volume_size,
192
- minVolumeSize: data.min_volume_size
193
- };
194
- };
195
- const unmarshalPublicCatalogProductPropertiesDedibox = (data) => {
196
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesDedibox' failed as data isn't a dictionary.`);
197
- return {
198
- offerId: data.offer_id,
199
- range: data.range
200
- };
201
- };
202
- const unmarshalPublicCatalogProductPropertiesElasticMetal = (data) => {
203
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesElasticMetal' failed as data isn't a dictionary.`);
204
- return {
205
- offerId: data.offer_id,
206
- range: data.range
207
- };
208
- };
209
- const unmarshalPublicCatalogProductPropertiesGenerativeApis = (data) => {
210
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesGenerativeApis' failed as data isn't a dictionary.`);
211
- return {
212
- consumptionMode: data.consumption_mode,
213
- defaultReasoningValue: data.default_reasoning_value,
214
- providerName: data.provider_name,
215
- reasoning: data.reasoning,
216
- supportedApis: data.supported_apis,
217
- supportedReasoningValues: data.supported_reasoning_values,
218
- tasks: data.tasks,
219
- tokenType: data.token_type
220
- };
221
- };
222
- const unmarshalPublicCatalogProductPropertiesHardware = (data) => {
223
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardware' failed as data isn't a dictionary.`);
224
- return {
225
- cpu: data.cpu ? unmarshalPublicCatalogProductPropertiesHardwareCPU(data.cpu) : void 0,
226
- gpu: data.gpu ? unmarshalPublicCatalogProductPropertiesHardwareGPU(data.gpu) : void 0,
227
- network: data.network ? unmarshalPublicCatalogProductPropertiesHardwareNetwork(data.network) : void 0,
228
- ram: data.ram ? unmarshalPublicCatalogProductPropertiesHardwareRAM(data.ram) : void 0,
229
- storage: data.storage ? unmarshalPublicCatalogProductPropertiesHardwareStorage(data.storage) : void 0
230
- };
231
- };
232
- const unmarshalPublicCatalogProductPropertiesInstance = (data) => {
233
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesInstance' failed as data isn't a dictionary.`);
234
- return {
235
- offerId: data.offer_id,
236
- range: data.range,
237
- recommendedReplacementOfferIds: data.recommended_replacement_offer_ids
238
- };
239
- };
240
- const unmarshalPublicCatalogProductPropertiesKeyManager = (data) => {
241
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesKeyManager' failed as data isn't a dictionary.`);
242
- return {};
243
- };
244
- const unmarshalPublicCatalogProductPropertiesKubernetes = (data) => {
245
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesKubernetes' failed as data isn't a dictionary.`);
246
- return {
247
- kapsuleControlPlane: data.kapsule_control_plane ? unmarshalPublicCatalogProductPropertiesKubernetesKapsuleControlPlaneType(data.kapsule_control_plane) : void 0,
248
- kosmosControlPlane: data.kosmos_control_plane ? unmarshalPublicCatalogProductPropertiesKubernetesKosmosControlPlaneType(data.kosmos_control_plane) : void 0,
249
- kosmosNode: data.kosmos_node ? unmarshalPublicCatalogProductPropertiesKubernetesKosmosNodeType(data.kosmos_node) : void 0
250
- };
251
- };
252
- const unmarshalPublicCatalogProductPropertiesLoadBalancer = (data) => {
253
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesLoadBalancer' failed as data isn't a dictionary.`);
254
- return {
255
- ipv4: data.ipv4 ? unmarshalPublicCatalogProductPropertiesLoadBalancerIPV4Type(data.ipv4) : void 0,
256
- node: data.node ? unmarshalPublicCatalogProductPropertiesLoadBalancerNodeType(data.node) : void 0
257
- };
258
- };
259
- const unmarshalPublicCatalogProductPropertiesManagedInference = (data) => {
260
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedInference' failed as data isn't a dictionary.`);
261
- return {
262
- customModelStorage: data.custom_model_storage ? unmarshalPublicCatalogProductPropertiesManagedInferenceManagedInferenceCustomModelStorage(data.custom_model_storage) : void 0,
263
- deployment: data.deployment ? unmarshalPublicCatalogProductPropertiesManagedInferenceManagedInferenceDeployment(data.deployment) : void 0,
264
- instanceGpuName: data.instance_gpu_name
265
- };
266
- };
267
- const unmarshalPublicCatalogProductPropertiesManagedMongoDB = (data) => {
268
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedMongoDB' failed as data isn't a dictionary.`);
269
- return {
270
- management: data.management ? unmarshalPublicCatalogProductPropertiesManagedMongoDBManagementType(data.management) : void 0,
271
- node: data.node ? unmarshalPublicCatalogProductPropertiesManagedMongoDBNodeType(data.node) : void 0,
272
- storage: data.storage ? unmarshalPublicCatalogProductPropertiesManagedMongoDBStorageType(data.storage) : void 0
273
- };
274
- };
275
- const unmarshalPublicCatalogProductPropertiesManagedRedisDatabase = (data) => {
276
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedRedisDatabase' failed as data isn't a dictionary.`);
277
- return {};
278
- };
279
- const unmarshalPublicCatalogProductPropertiesManagedRelationalDatabase = (data) => {
280
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedRelationalDatabase' failed as data isn't a dictionary.`);
281
- return {
282
- management: data.management ? unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseManagementType(data.management) : void 0,
283
- multiAz: data.multi_az ? unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseMultiAzType(data.multi_az) : void 0,
284
- node: data.node ? unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseNodeType(data.node) : void 0,
285
- storage: data.storage ? unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseStorageType(data.storage) : void 0
286
- };
287
- };
288
- const unmarshalPublicCatalogProductPropertiesObjectStorage = (data) => {
289
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorage' failed as data isn't a dictionary.`);
290
- return {
291
- class: data.class ? unmarshalPublicCatalogProductPropertiesObjectStorageClassType(data.class) : void 0,
292
- internetTraffic: data.internet_traffic ? unmarshalPublicCatalogProductPropertiesObjectStorageInternetTrafficType(data.internet_traffic) : void 0,
293
- regionTraffic: data.region_traffic ? unmarshalPublicCatalogProductPropertiesObjectStorageRegionTrafficType(data.region_traffic) : void 0,
294
- restore: data.restore ? unmarshalPublicCatalogProductPropertiesObjectStorageRestoreType(data.restore) : void 0
295
- };
296
- };
297
- const unmarshalPublicCatalogProductPropertiesOpenSearch = (data) => {
298
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesOpenSearch' failed as data isn't a dictionary.`);
299
- return {};
300
- };
301
- const unmarshalPublicCatalogProductPropertiesSecretManager = (data) => {
302
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesSecretManager' failed as data isn't a dictionary.`);
303
- return {};
304
- };
305
- const unmarshalPublicCatalogProductPropertiesServerlessContainers = (data) => {
306
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesServerlessContainers' failed as data isn't a dictionary.`);
307
- return {
308
- cpu: data.cpu ? unmarshalPublicCatalogProductPropertiesServerlessContainersCPUType(data.cpu) : void 0,
309
- memory: data.memory ? unmarshalPublicCatalogProductPropertiesServerlessContainersMemoryType(data.memory) : void 0
310
- };
311
- };
312
- const unmarshalPublicCatalogProductPropertiesServerlessFunctions = (data) => {
313
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesServerlessFunctions' failed as data isn't a dictionary.`);
314
- return {
315
- consumption: data.consumption ? unmarshalPublicCatalogProductPropertiesServerlessFunctionsConsumptionType(data.consumption) : void 0,
316
- freeTier: data.free_tier ? unmarshalPublicCatalogProductPropertiesServerlessFunctionsFreeTierType(data.free_tier) : void 0,
317
- provision: data.provision ? unmarshalPublicCatalogProductPropertiesServerlessFunctionsProvisionType(data.provision) : void 0,
318
- request: data.request ? unmarshalPublicCatalogProductPropertiesServerlessFunctionsRequestType(data.request) : void 0,
319
- resources: unmarshalArrayOfObject(data.resources, unmarshalPublicCatalogProductPropertiesServerlessFunctionsRuntimeResource)
320
- };
321
- };
322
- const unmarshalPublicCatalogProductPropertiesServerlessJobs = (data) => {
323
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesServerlessJobs' failed as data isn't a dictionary.`);
324
- return {
325
- cpu: data.cpu ? unmarshalPublicCatalogProductPropertiesServerlessJobsCPUType(data.cpu) : void 0,
326
- memory: data.memory ? unmarshalPublicCatalogProductPropertiesServerlessJobsMemoryType(data.memory) : void 0
327
- };
328
- };
329
- const unmarshalPublicCatalogProductEnvironmentalImpactEstimation = (data) => {
330
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductEnvironmentalImpactEstimation' failed as data isn't a dictionary.`);
331
- return {
332
- kgCo2Equivalent: data.kg_co2_equivalent,
333
- m3WaterUsage: data.m3_water_usage
334
- };
335
- };
336
- const unmarshalPublicCatalogProductLocality = (data) => {
337
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductLocality' failed as data isn't a dictionary.`);
338
- return {
339
- datacenter: data.datacenter,
340
- global: data.global,
341
- region: data.region,
342
- zone: data.zone
343
- };
344
- };
345
- const unmarshalPublicCatalogProductPrice = (data) => {
346
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPrice' failed as data isn't a dictionary.`);
347
- return { retailPrice: data.retail_price ? unmarshalMoney(data.retail_price) : void 0 };
348
- };
349
- const unmarshalPublicCatalogProductProperties = (data) => {
350
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductProperties' failed as data isn't a dictionary.`);
351
- return {
352
- apacheKafka: data.apache_kafka ? unmarshalPublicCatalogProductPropertiesApacheKafka(data.apache_kafka) : void 0,
353
- appleSilicon: data.apple_silicon ? unmarshalPublicCatalogProductPropertiesAppleSilicon(data.apple_silicon) : void 0,
354
- blockStorage: data.block_storage ? unmarshalPublicCatalogProductPropertiesBlockStorage(data.block_storage) : void 0,
355
- dedibox: data.dedibox ? unmarshalPublicCatalogProductPropertiesDedibox(data.dedibox) : void 0,
356
- elasticMetal: data.elastic_metal ? unmarshalPublicCatalogProductPropertiesElasticMetal(data.elastic_metal) : void 0,
357
- generativeApis: data.generative_apis ? unmarshalPublicCatalogProductPropertiesGenerativeApis(data.generative_apis) : void 0,
358
- hardware: data.hardware ? unmarshalPublicCatalogProductPropertiesHardware(data.hardware) : void 0,
359
- instance: data.instance ? unmarshalPublicCatalogProductPropertiesInstance(data.instance) : void 0,
360
- keyManager: data.key_manager ? unmarshalPublicCatalogProductPropertiesKeyManager(data.key_manager) : void 0,
361
- kubernetes: data.kubernetes ? unmarshalPublicCatalogProductPropertiesKubernetes(data.kubernetes) : void 0,
362
- loadBalancer: data.load_balancer ? unmarshalPublicCatalogProductPropertiesLoadBalancer(data.load_balancer) : void 0,
363
- managedInference: data.managed_inference ? unmarshalPublicCatalogProductPropertiesManagedInference(data.managed_inference) : void 0,
364
- managedMongodb: data.managed_mongodb ? unmarshalPublicCatalogProductPropertiesManagedMongoDB(data.managed_mongodb) : void 0,
365
- managedRedisDatabase: data.managed_redis_database ? unmarshalPublicCatalogProductPropertiesManagedRedisDatabase(data.managed_redis_database) : void 0,
366
- managedRelationalDatabase: data.managed_relational_database ? unmarshalPublicCatalogProductPropertiesManagedRelationalDatabase(data.managed_relational_database) : void 0,
367
- objectStorage: data.object_storage ? unmarshalPublicCatalogProductPropertiesObjectStorage(data.object_storage) : void 0,
368
- openSearch: data.open_search ? unmarshalPublicCatalogProductPropertiesOpenSearch(data.open_search) : void 0,
369
- secretManager: data.secret_manager ? unmarshalPublicCatalogProductPropertiesSecretManager(data.secret_manager) : void 0,
370
- serverlessContainers: data.serverless_containers ? unmarshalPublicCatalogProductPropertiesServerlessContainers(data.serverless_containers) : void 0,
371
- serverlessFunctions: data.serverless_functions ? unmarshalPublicCatalogProductPropertiesServerlessFunctions(data.serverless_functions) : void 0,
372
- serverlessJobs: data.serverless_jobs ? unmarshalPublicCatalogProductPropertiesServerlessJobs(data.serverless_jobs) : void 0
373
- };
374
- };
375
- const unmarshalPublicCatalogProductUnitOfMeasure = (data) => {
376
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductUnitOfMeasure' failed as data isn't a dictionary.`);
377
- return {
378
- size: data.size,
379
- unit: data.unit
380
- };
381
- };
382
- const unmarshalPublicCatalogProduct = (data) => {
383
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProduct' failed as data isn't a dictionary.`);
384
- return {
385
- badges: data.badges,
386
- description: data.description,
387
- endOfGrowthAt: unmarshalDate(data.end_of_growth_at),
388
- endOfLifeAt: unmarshalDate(data.end_of_life_at),
389
- endOfSaleAt: unmarshalDate(data.end_of_sale_at),
390
- environmentalImpactEstimation: data.environmental_impact_estimation ? unmarshalPublicCatalogProductEnvironmentalImpactEstimation(data.environmental_impact_estimation) : void 0,
391
- locality: data.locality ? unmarshalPublicCatalogProductLocality(data.locality) : void 0,
392
- price: data.price ? unmarshalPublicCatalogProductPrice(data.price) : void 0,
393
- product: data.product,
394
- productCategory: data.product_category,
395
- properties: data.properties ? unmarshalPublicCatalogProductProperties(data.properties) : void 0,
396
- serviceCategory: data.service_category,
397
- sku: data.sku,
398
- status: data.status,
399
- unitOfMeasure: data.unit_of_measure ? unmarshalPublicCatalogProductUnitOfMeasure(data.unit_of_measure) : void 0,
400
- variant: data.variant
401
- };
402
- };
403
- const unmarshalListPublicCatalogProductsResponse = (data) => {
404
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPublicCatalogProductsResponse' failed as data isn't a dictionary.`);
405
- return {
406
- products: unmarshalArrayOfObject(data.products, unmarshalPublicCatalogProduct),
407
- totalCount: data.total_count
408
- };
409
- };
410
- //#endregion
411
- export { unmarshalListPublicCatalogProductsResponse };
@@ -1,21 +0,0 @@
1
- export declare const queriesMetadata: {
2
- readonly namespace: 'product_catalog';
3
- readonly version: 'v2alpha1';
4
- readonly folderName: 'productCatalogv2alpha1';
5
- readonly services: readonly [{
6
- readonly apiClass: 'PublicCatalogAPI';
7
- readonly methods: readonly [{
8
- readonly methodName: 'listPublicCatalogProducts';
9
- readonly protoName: 'ListPublicCatalogProducts';
10
- readonly paramsType: 'PublicCatalogApiListPublicCatalogProductsRequest';
11
- readonly returnType: 'ListPublicCatalogProductsResponse';
12
- readonly isList: true;
13
- readonly paginationType: 'offset';
14
- readonly pageParamKey: 'page';
15
- readonly listItemType: 'PublicCatalogProduct';
16
- readonly isPrivate: false;
17
- readonly description: '"';
18
- }];
19
- }];
20
- };
21
- export type QueriesMetadata = typeof queriesMetadata;
@@ -1,23 +0,0 @@
1
- //#region src/v2alpha1/metadata.gen.ts
2
- const queriesMetadata = {
3
- namespace: "product_catalog",
4
- version: "v2alpha1",
5
- folderName: "productCatalogv2alpha1",
6
- services: [{
7
- apiClass: "PublicCatalogAPI",
8
- methods: [{
9
- methodName: "listPublicCatalogProducts",
10
- protoName: "ListPublicCatalogProducts",
11
- paramsType: "PublicCatalogApiListPublicCatalogProductsRequest",
12
- returnType: "ListPublicCatalogProductsResponse",
13
- isList: true,
14
- paginationType: "offset",
15
- pageParamKey: "page",
16
- listItemType: "PublicCatalogProduct",
17
- isPrivate: false,
18
- description: "\""
19
- }]
20
- }]
21
- };
22
- //#endregion
23
- export { queriesMetadata };