@scaleway/sdk-qaas 2.2.0 → 2.3.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 +1 -1
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/index.gen.js +2 -4
- package/dist/v1alpha1/api.gen.js +403 -634
- package/dist/v1alpha1/content.gen.js +15 -19
- package/dist/v1alpha1/index.gen.d.ts +1 -1
- package/dist/v1alpha1/index.gen.js +38 -36
- package/dist/v1alpha1/marshalling.gen.js +247 -371
- package/dist/v1alpha1/validation-rules.gen.js +8 -14
- package/package.json +4 -4
|
@@ -1,426 +1,302 @@
|
|
|
1
|
-
import { resolveOneOf,
|
|
1
|
+
import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney } from "@scaleway/sdk-client";
|
|
2
2
|
const unmarshalJobCircuit = (data) => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return {
|
|
9
|
-
percevalCircuit: data.perceval_circuit,
|
|
10
|
-
qiskitCircuit: data.qiskit_circuit
|
|
11
|
-
};
|
|
3
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'JobCircuit' failed as data isn't a dictionary.`);
|
|
4
|
+
return {
|
|
5
|
+
percevalCircuit: data.perceval_circuit,
|
|
6
|
+
qiskitCircuit: data.qiskit_circuit
|
|
7
|
+
};
|
|
12
8
|
};
|
|
13
9
|
const unmarshalApplication = (data) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
inputTemplate: data.input_template,
|
|
23
|
-
name: data.name,
|
|
24
|
-
type: data.type
|
|
25
|
-
};
|
|
10
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Application' failed as data isn't a dictionary.`);
|
|
11
|
+
return {
|
|
12
|
+
compatiblePlatformIds: data.compatible_platform_ids,
|
|
13
|
+
id: data.id,
|
|
14
|
+
inputTemplate: data.input_template,
|
|
15
|
+
name: data.name,
|
|
16
|
+
type: data.type
|
|
17
|
+
};
|
|
26
18
|
};
|
|
27
19
|
const unmarshalBooking = (data) => {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
status: data.status,
|
|
41
|
-
timeZone: data.time_zone,
|
|
42
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
43
|
-
};
|
|
20
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Booking' failed as data isn't a dictionary.`);
|
|
21
|
+
return {
|
|
22
|
+
createdAt: unmarshalDate(data.created_at),
|
|
23
|
+
description: data.description,
|
|
24
|
+
finishedAt: unmarshalDate(data.finished_at),
|
|
25
|
+
id: data.id,
|
|
26
|
+
progressMessage: data.progress_message,
|
|
27
|
+
startedAt: unmarshalDate(data.started_at),
|
|
28
|
+
status: data.status,
|
|
29
|
+
timeZone: data.time_zone,
|
|
30
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
31
|
+
};
|
|
44
32
|
};
|
|
45
33
|
const unmarshalJob = (data) => {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
status: data.status,
|
|
63
|
-
tags: data.tags,
|
|
64
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
65
|
-
};
|
|
34
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Job' failed as data isn't a dictionary.`);
|
|
35
|
+
return {
|
|
36
|
+
createdAt: unmarshalDate(data.created_at),
|
|
37
|
+
id: data.id,
|
|
38
|
+
jobDuration: data.job_duration,
|
|
39
|
+
modelId: data.model_id,
|
|
40
|
+
name: data.name,
|
|
41
|
+
parameters: data.parameters,
|
|
42
|
+
progressMessage: data.progress_message,
|
|
43
|
+
resultDistribution: data.result_distribution,
|
|
44
|
+
sessionId: data.session_id,
|
|
45
|
+
startedAt: unmarshalDate(data.started_at),
|
|
46
|
+
status: data.status,
|
|
47
|
+
tags: data.tags,
|
|
48
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
49
|
+
};
|
|
66
50
|
};
|
|
67
51
|
const unmarshalModel = (data) => {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
id: data.id,
|
|
76
|
-
projectId: data.project_id,
|
|
77
|
-
url: data.url
|
|
78
|
-
};
|
|
52
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Model' failed as data isn't a dictionary.`);
|
|
53
|
+
return {
|
|
54
|
+
createdAt: unmarshalDate(data.created_at),
|
|
55
|
+
id: data.id,
|
|
56
|
+
projectId: data.project_id,
|
|
57
|
+
url: data.url
|
|
58
|
+
};
|
|
79
59
|
};
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
maxPlanificationDuration: data.max_planification_duration,
|
|
92
|
-
minDuration: data.min_duration,
|
|
93
|
-
minPlanificationDuration: data.min_planification_duration
|
|
94
|
-
};
|
|
60
|
+
var unmarshalPlatformBookingRequirement = (data) => {
|
|
61
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PlatformBookingRequirement' failed as data isn't a dictionary.`);
|
|
62
|
+
return {
|
|
63
|
+
maxBookingPerDay: data.max_booking_per_day,
|
|
64
|
+
maxBookingPerWeek: data.max_booking_per_week,
|
|
65
|
+
maxCancellationDuration: data.max_cancellation_duration,
|
|
66
|
+
maxDuration: data.max_duration,
|
|
67
|
+
maxPlanificationDuration: data.max_planification_duration,
|
|
68
|
+
minDuration: data.min_duration,
|
|
69
|
+
minPlanificationDuration: data.min_planification_duration
|
|
70
|
+
};
|
|
95
71
|
};
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
ram: data.ram,
|
|
107
|
-
vcpus: data.vcpus,
|
|
108
|
-
vram: data.vram
|
|
109
|
-
};
|
|
72
|
+
var unmarshalPlatformHardware = (data) => {
|
|
73
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PlatformHardware' failed as data isn't a dictionary.`);
|
|
74
|
+
return {
|
|
75
|
+
gpus: data.gpus,
|
|
76
|
+
gpusNetwork: data.gpus_network,
|
|
77
|
+
name: data.name,
|
|
78
|
+
ram: data.ram,
|
|
79
|
+
vcpus: data.vcpus,
|
|
80
|
+
vram: data.vram
|
|
81
|
+
};
|
|
110
82
|
};
|
|
111
83
|
const unmarshalPlatform = (data) => {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
technology: data.technology,
|
|
136
|
-
type: data.type,
|
|
137
|
-
version: data.version
|
|
138
|
-
};
|
|
84
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Platform' failed as data isn't a dictionary.`);
|
|
85
|
+
return {
|
|
86
|
+
availability: data.availability,
|
|
87
|
+
backendName: data.backend_name,
|
|
88
|
+
bookingRequirement: data.booking_requirement ? unmarshalPlatformBookingRequirement(data.booking_requirement) : void 0,
|
|
89
|
+
description: data.description,
|
|
90
|
+
documentationUrl: data.documentation_url,
|
|
91
|
+
hardware: data.hardware ? unmarshalPlatformHardware(data.hardware) : void 0,
|
|
92
|
+
id: data.id,
|
|
93
|
+
isBookable: data.is_bookable,
|
|
94
|
+
maxCircuitCount: data.max_circuit_count,
|
|
95
|
+
maxQubitCount: data.max_qubit_count,
|
|
96
|
+
maxShotCount: data.max_shot_count,
|
|
97
|
+
metadata: data.metadata,
|
|
98
|
+
name: data.name,
|
|
99
|
+
pricePerCircuit: data.price_per_circuit ? unmarshalMoney(data.price_per_circuit) : void 0,
|
|
100
|
+
pricePerHour: data.price_per_hour ? unmarshalMoney(data.price_per_hour) : void 0,
|
|
101
|
+
pricePerShot: data.price_per_shot ? unmarshalMoney(data.price_per_shot) : void 0,
|
|
102
|
+
providerName: data.provider_name,
|
|
103
|
+
technology: data.technology,
|
|
104
|
+
type: data.type,
|
|
105
|
+
version: data.version
|
|
106
|
+
};
|
|
139
107
|
};
|
|
140
108
|
const unmarshalProcess = (data) => {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
status: data.status,
|
|
160
|
-
tags: data.tags,
|
|
161
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
162
|
-
};
|
|
109
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Process' failed as data isn't a dictionary.`);
|
|
110
|
+
return {
|
|
111
|
+
applicationId: data.application_id,
|
|
112
|
+
attachedSessionIds: data.attached_session_ids,
|
|
113
|
+
createdAt: unmarshalDate(data.created_at),
|
|
114
|
+
finishedAt: unmarshalDate(data.finished_at),
|
|
115
|
+
id: data.id,
|
|
116
|
+
input: data.input,
|
|
117
|
+
name: data.name,
|
|
118
|
+
platformId: data.platform_id,
|
|
119
|
+
progress: data.progress,
|
|
120
|
+
progressMessage: data.progress_message,
|
|
121
|
+
projectId: data.project_id,
|
|
122
|
+
startedAt: unmarshalDate(data.started_at),
|
|
123
|
+
status: data.status,
|
|
124
|
+
tags: data.tags,
|
|
125
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
126
|
+
};
|
|
163
127
|
};
|
|
164
128
|
const unmarshalSession = (data) => {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
terminatedAt: unmarshalDate(data.terminated_at),
|
|
190
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
191
|
-
waitingJobCount: data.waiting_job_count
|
|
192
|
-
};
|
|
129
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Session' failed as data isn't a dictionary.`);
|
|
130
|
+
return {
|
|
131
|
+
bookingId: data.booking_id,
|
|
132
|
+
createdAt: unmarshalDate(data.created_at),
|
|
133
|
+
deduplicationId: data.deduplication_id,
|
|
134
|
+
finishedJobCount: data.finished_job_count,
|
|
135
|
+
id: data.id,
|
|
136
|
+
maxDuration: data.max_duration,
|
|
137
|
+
maxIdleDuration: data.max_idle_duration,
|
|
138
|
+
modelId: data.model_id,
|
|
139
|
+
name: data.name,
|
|
140
|
+
originId: data.origin_id,
|
|
141
|
+
originType: data.origin_type,
|
|
142
|
+
parameters: data.parameters,
|
|
143
|
+
platformId: data.platform_id,
|
|
144
|
+
progressMessage: data.progress_message,
|
|
145
|
+
projectId: data.project_id,
|
|
146
|
+
startedAt: unmarshalDate(data.started_at),
|
|
147
|
+
status: data.status,
|
|
148
|
+
tags: data.tags,
|
|
149
|
+
terminatedAt: unmarshalDate(data.terminated_at),
|
|
150
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
151
|
+
waitingJobCount: data.waiting_job_count
|
|
152
|
+
};
|
|
193
153
|
};
|
|
194
154
|
const unmarshalListApplicationsResponse = (data) => {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
return {
|
|
201
|
-
applications: unmarshalArrayOfObject(
|
|
202
|
-
data.applications,
|
|
203
|
-
unmarshalApplication
|
|
204
|
-
),
|
|
205
|
-
totalCount: data.total_count
|
|
206
|
-
};
|
|
155
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListApplicationsResponse' failed as data isn't a dictionary.`);
|
|
156
|
+
return {
|
|
157
|
+
applications: unmarshalArrayOfObject(data.applications, unmarshalApplication),
|
|
158
|
+
totalCount: data.total_count
|
|
159
|
+
};
|
|
207
160
|
};
|
|
208
161
|
const unmarshalListBookingsResponse = (data) => {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
return {
|
|
215
|
-
bookings: unmarshalArrayOfObject(data.bookings, unmarshalBooking),
|
|
216
|
-
totalCount: data.total_count
|
|
217
|
-
};
|
|
162
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListBookingsResponse' failed as data isn't a dictionary.`);
|
|
163
|
+
return {
|
|
164
|
+
bookings: unmarshalArrayOfObject(data.bookings, unmarshalBooking),
|
|
165
|
+
totalCount: data.total_count
|
|
166
|
+
};
|
|
218
167
|
};
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
jobId: data.job_id,
|
|
228
|
-
result: data.result,
|
|
229
|
-
url: data.url
|
|
230
|
-
};
|
|
168
|
+
var unmarshalJobResult = (data) => {
|
|
169
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'JobResult' failed as data isn't a dictionary.`);
|
|
170
|
+
return {
|
|
171
|
+
createdAt: unmarshalDate(data.created_at),
|
|
172
|
+
jobId: data.job_id,
|
|
173
|
+
result: data.result,
|
|
174
|
+
url: data.url
|
|
175
|
+
};
|
|
231
176
|
};
|
|
232
177
|
const unmarshalListJobResultsResponse = (data) => {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
return {
|
|
239
|
-
jobResults: unmarshalArrayOfObject(data.job_results, unmarshalJobResult),
|
|
240
|
-
totalCount: data.total_count
|
|
241
|
-
};
|
|
178
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListJobResultsResponse' failed as data isn't a dictionary.`);
|
|
179
|
+
return {
|
|
180
|
+
jobResults: unmarshalArrayOfObject(data.job_results, unmarshalJobResult),
|
|
181
|
+
totalCount: data.total_count
|
|
182
|
+
};
|
|
242
183
|
};
|
|
243
184
|
const unmarshalListJobsResponse = (data) => {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
return {
|
|
250
|
-
jobs: unmarshalArrayOfObject(data.jobs, unmarshalJob),
|
|
251
|
-
totalCount: data.total_count
|
|
252
|
-
};
|
|
185
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListJobsResponse' failed as data isn't a dictionary.`);
|
|
186
|
+
return {
|
|
187
|
+
jobs: unmarshalArrayOfObject(data.jobs, unmarshalJob),
|
|
188
|
+
totalCount: data.total_count
|
|
189
|
+
};
|
|
253
190
|
};
|
|
254
191
|
const unmarshalListModelsResponse = (data) => {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
return {
|
|
261
|
-
models: unmarshalArrayOfObject(data.models, unmarshalModel),
|
|
262
|
-
totalCount: data.total_count
|
|
263
|
-
};
|
|
192
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListModelsResponse' failed as data isn't a dictionary.`);
|
|
193
|
+
return {
|
|
194
|
+
models: unmarshalArrayOfObject(data.models, unmarshalModel),
|
|
195
|
+
totalCount: data.total_count
|
|
196
|
+
};
|
|
264
197
|
};
|
|
265
198
|
const unmarshalListPlatformsResponse = (data) => {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
return {
|
|
272
|
-
platforms: unmarshalArrayOfObject(data.platforms, unmarshalPlatform),
|
|
273
|
-
totalCount: data.total_count
|
|
274
|
-
};
|
|
199
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPlatformsResponse' failed as data isn't a dictionary.`);
|
|
200
|
+
return {
|
|
201
|
+
platforms: unmarshalArrayOfObject(data.platforms, unmarshalPlatform),
|
|
202
|
+
totalCount: data.total_count
|
|
203
|
+
};
|
|
275
204
|
};
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
createdAt: unmarshalDate(data.created_at),
|
|
284
|
-
processId: data.process_id,
|
|
285
|
-
result: data.result
|
|
286
|
-
};
|
|
205
|
+
var unmarshalProcessResult = (data) => {
|
|
206
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ProcessResult' failed as data isn't a dictionary.`);
|
|
207
|
+
return {
|
|
208
|
+
createdAt: unmarshalDate(data.created_at),
|
|
209
|
+
processId: data.process_id,
|
|
210
|
+
result: data.result
|
|
211
|
+
};
|
|
287
212
|
};
|
|
288
213
|
const unmarshalListProcessResultsResponse = (data) => {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
return {
|
|
295
|
-
processResults: unmarshalArrayOfObject(
|
|
296
|
-
data.process_results,
|
|
297
|
-
unmarshalProcessResult
|
|
298
|
-
),
|
|
299
|
-
totalCount: data.total_count
|
|
300
|
-
};
|
|
214
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListProcessResultsResponse' failed as data isn't a dictionary.`);
|
|
215
|
+
return {
|
|
216
|
+
processResults: unmarshalArrayOfObject(data.process_results, unmarshalProcessResult),
|
|
217
|
+
totalCount: data.total_count
|
|
218
|
+
};
|
|
301
219
|
};
|
|
302
220
|
const unmarshalListProcessesResponse = (data) => {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
return {
|
|
309
|
-
processes: unmarshalArrayOfObject(data.processes, unmarshalProcess),
|
|
310
|
-
totalCount: data.total_count
|
|
311
|
-
};
|
|
221
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListProcessesResponse' failed as data isn't a dictionary.`);
|
|
222
|
+
return {
|
|
223
|
+
processes: unmarshalArrayOfObject(data.processes, unmarshalProcess),
|
|
224
|
+
totalCount: data.total_count
|
|
225
|
+
};
|
|
312
226
|
};
|
|
313
227
|
const unmarshalListSessionACLsResponse = (data) => {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
return {
|
|
320
|
-
acls: data.acls,
|
|
321
|
-
totalCount: data.total_count
|
|
322
|
-
};
|
|
228
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSessionACLsResponse' failed as data isn't a dictionary.`);
|
|
229
|
+
return {
|
|
230
|
+
acls: data.acls,
|
|
231
|
+
totalCount: data.total_count
|
|
232
|
+
};
|
|
323
233
|
};
|
|
324
234
|
const unmarshalListSessionsResponse = (data) => {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
return {
|
|
331
|
-
sessions: unmarshalArrayOfObject(data.sessions, unmarshalSession),
|
|
332
|
-
totalCount: data.total_count
|
|
333
|
-
};
|
|
235
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSessionsResponse' failed as data isn't a dictionary.`);
|
|
236
|
+
return {
|
|
237
|
+
sessions: unmarshalArrayOfObject(data.sessions, unmarshalSession),
|
|
238
|
+
totalCount: data.total_count
|
|
239
|
+
};
|
|
334
240
|
};
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
241
|
+
var marshalJobCircuit = (request, defaults) => ({ ...resolveOneOf([{
|
|
242
|
+
param: "perceval_circuit",
|
|
243
|
+
value: request.percevalCircuit
|
|
244
|
+
}, {
|
|
245
|
+
param: "qiskit_circuit",
|
|
246
|
+
value: request.qiskitCircuit
|
|
247
|
+
}]) });
|
|
341
248
|
const marshalCreateJobRequest = (request, defaults) => ({
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
249
|
+
circuit: marshalJobCircuit(request.circuit, defaults),
|
|
250
|
+
max_duration: request.maxDuration,
|
|
251
|
+
model_id: request.modelId,
|
|
252
|
+
name: request.name,
|
|
253
|
+
parameters: request.parameters,
|
|
254
|
+
session_id: request.sessionId,
|
|
255
|
+
tags: request.tags
|
|
349
256
|
});
|
|
350
257
|
const marshalCreateModelRequest = (request, defaults) => ({
|
|
351
|
-
|
|
352
|
-
|
|
258
|
+
payload: request.payload,
|
|
259
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
353
260
|
});
|
|
354
261
|
const marshalCreateProcessRequest = (request, defaults) => ({
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
262
|
+
application_id: request.applicationId,
|
|
263
|
+
input: request.input,
|
|
264
|
+
name: request.name,
|
|
265
|
+
platform_id: request.platformId,
|
|
266
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
267
|
+
tags: request.tags
|
|
361
268
|
});
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
269
|
+
var marshalCreateSessionRequestBookingDemand = (request, defaults) => ({
|
|
270
|
+
description: request.description,
|
|
271
|
+
finished_at: request.finishedAt,
|
|
272
|
+
started_at: request.startedAt,
|
|
273
|
+
time_zone: request.timeZone
|
|
367
274
|
});
|
|
368
275
|
const marshalCreateSessionRequest = (request, defaults) => ({
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
380
|
-
tags: request.tags
|
|
381
|
-
});
|
|
382
|
-
const marshalUpdateBookingRequest = (request, defaults) => ({
|
|
383
|
-
description: request.description
|
|
276
|
+
booking_demand: request.bookingDemand !== void 0 ? marshalCreateSessionRequestBookingDemand(request.bookingDemand, defaults) : void 0,
|
|
277
|
+
deduplication_id: request.deduplicationId,
|
|
278
|
+
max_duration: request.maxDuration,
|
|
279
|
+
max_idle_duration: request.maxIdleDuration,
|
|
280
|
+
model_id: request.modelId,
|
|
281
|
+
name: request.name,
|
|
282
|
+
parameters: request.parameters,
|
|
283
|
+
platform_id: request.platformId,
|
|
284
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
285
|
+
tags: request.tags
|
|
384
286
|
});
|
|
287
|
+
const marshalUpdateBookingRequest = (request, defaults) => ({ description: request.description });
|
|
385
288
|
const marshalUpdateJobRequest = (request, defaults) => ({
|
|
386
|
-
|
|
387
|
-
|
|
289
|
+
name: request.name,
|
|
290
|
+
tags: request.tags
|
|
388
291
|
});
|
|
389
292
|
const marshalUpdateProcessRequest = (request, defaults) => ({
|
|
390
|
-
|
|
391
|
-
|
|
293
|
+
name: request.name,
|
|
294
|
+
tags: request.tags
|
|
392
295
|
});
|
|
393
296
|
const marshalUpdateSessionRequest = (request, defaults) => ({
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
297
|
+
max_duration: request.maxDuration,
|
|
298
|
+
max_idle_duration: request.maxIdleDuration,
|
|
299
|
+
name: request.name,
|
|
300
|
+
tags: request.tags
|
|
398
301
|
});
|
|
399
|
-
export {
|
|
400
|
-
marshalCreateJobRequest,
|
|
401
|
-
marshalCreateModelRequest,
|
|
402
|
-
marshalCreateProcessRequest,
|
|
403
|
-
marshalCreateSessionRequest,
|
|
404
|
-
marshalUpdateBookingRequest,
|
|
405
|
-
marshalUpdateJobRequest,
|
|
406
|
-
marshalUpdateProcessRequest,
|
|
407
|
-
marshalUpdateSessionRequest,
|
|
408
|
-
unmarshalApplication,
|
|
409
|
-
unmarshalBooking,
|
|
410
|
-
unmarshalJob,
|
|
411
|
-
unmarshalJobCircuit,
|
|
412
|
-
unmarshalListApplicationsResponse,
|
|
413
|
-
unmarshalListBookingsResponse,
|
|
414
|
-
unmarshalListJobResultsResponse,
|
|
415
|
-
unmarshalListJobsResponse,
|
|
416
|
-
unmarshalListModelsResponse,
|
|
417
|
-
unmarshalListPlatformsResponse,
|
|
418
|
-
unmarshalListProcessResultsResponse,
|
|
419
|
-
unmarshalListProcessesResponse,
|
|
420
|
-
unmarshalListSessionACLsResponse,
|
|
421
|
-
unmarshalListSessionsResponse,
|
|
422
|
-
unmarshalModel,
|
|
423
|
-
unmarshalPlatform,
|
|
424
|
-
unmarshalProcess,
|
|
425
|
-
unmarshalSession
|
|
426
|
-
};
|
|
302
|
+
export { marshalCreateJobRequest, marshalCreateModelRequest, marshalCreateProcessRequest, marshalCreateSessionRequest, marshalUpdateBookingRequest, marshalUpdateJobRequest, marshalUpdateProcessRequest, marshalUpdateSessionRequest, unmarshalApplication, unmarshalBooking, unmarshalJob, unmarshalJobCircuit, unmarshalListApplicationsResponse, unmarshalListBookingsResponse, unmarshalListJobResultsResponse, unmarshalListJobsResponse, unmarshalListModelsResponse, unmarshalListPlatformsResponse, unmarshalListProcessResultsResponse, unmarshalListProcessesResponse, unmarshalListSessionACLsResponse, unmarshalListSessionsResponse, unmarshalModel, unmarshalPlatform, unmarshalProcess, unmarshalSession };
|