@scaleway/sdk-qaas 2.2.1 → 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 -592
- package/dist/v1alpha1/content.gen.js +15 -19
- package/dist/v1alpha1/index.gen.js +38 -36
- package/dist/v1alpha1/marshalling.gen.js +247 -369
- package/dist/v1alpha1/validation-rules.gen.js +8 -14
- package/package.json +4 -4
|
@@ -1,424 +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(data.applications, unmarshalApplication),
|
|
202
|
-
totalCount: data.total_count
|
|
203
|
-
};
|
|
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
|
+
};
|
|
204
160
|
};
|
|
205
161
|
const unmarshalListBookingsResponse = (data) => {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
return {
|
|
212
|
-
bookings: unmarshalArrayOfObject(data.bookings, unmarshalBooking),
|
|
213
|
-
totalCount: data.total_count
|
|
214
|
-
};
|
|
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
|
+
};
|
|
215
167
|
};
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
jobId: data.job_id,
|
|
225
|
-
result: data.result,
|
|
226
|
-
url: data.url
|
|
227
|
-
};
|
|
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
|
+
};
|
|
228
176
|
};
|
|
229
177
|
const unmarshalListJobResultsResponse = (data) => {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
return {
|
|
236
|
-
jobResults: unmarshalArrayOfObject(data.job_results, unmarshalJobResult),
|
|
237
|
-
totalCount: data.total_count
|
|
238
|
-
};
|
|
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
|
+
};
|
|
239
183
|
};
|
|
240
184
|
const unmarshalListJobsResponse = (data) => {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
return {
|
|
247
|
-
jobs: unmarshalArrayOfObject(data.jobs, unmarshalJob),
|
|
248
|
-
totalCount: data.total_count
|
|
249
|
-
};
|
|
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
|
+
};
|
|
250
190
|
};
|
|
251
191
|
const unmarshalListModelsResponse = (data) => {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
return {
|
|
258
|
-
models: unmarshalArrayOfObject(data.models, unmarshalModel),
|
|
259
|
-
totalCount: data.total_count
|
|
260
|
-
};
|
|
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
|
+
};
|
|
261
197
|
};
|
|
262
198
|
const unmarshalListPlatformsResponse = (data) => {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
return {
|
|
269
|
-
platforms: unmarshalArrayOfObject(data.platforms, unmarshalPlatform),
|
|
270
|
-
totalCount: data.total_count
|
|
271
|
-
};
|
|
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
|
+
};
|
|
272
204
|
};
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
createdAt: unmarshalDate(data.created_at),
|
|
281
|
-
processId: data.process_id,
|
|
282
|
-
result: data.result
|
|
283
|
-
};
|
|
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
|
+
};
|
|
284
212
|
};
|
|
285
213
|
const unmarshalListProcessResultsResponse = (data) => {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
return {
|
|
292
|
-
processResults: unmarshalArrayOfObject(data.process_results, unmarshalProcessResult),
|
|
293
|
-
totalCount: data.total_count
|
|
294
|
-
};
|
|
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
|
+
};
|
|
295
219
|
};
|
|
296
220
|
const unmarshalListProcessesResponse = (data) => {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
return {
|
|
303
|
-
processes: unmarshalArrayOfObject(data.processes, unmarshalProcess),
|
|
304
|
-
totalCount: data.total_count
|
|
305
|
-
};
|
|
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
|
+
};
|
|
306
226
|
};
|
|
307
227
|
const unmarshalListSessionACLsResponse = (data) => {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
return {
|
|
314
|
-
acls: data.acls,
|
|
315
|
-
totalCount: data.total_count
|
|
316
|
-
};
|
|
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
|
+
};
|
|
317
233
|
};
|
|
318
234
|
const unmarshalListSessionsResponse = (data) => {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
return {
|
|
325
|
-
sessions: unmarshalArrayOfObject(data.sessions, unmarshalSession),
|
|
326
|
-
totalCount: data.total_count
|
|
327
|
-
};
|
|
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
|
+
};
|
|
328
240
|
};
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
param: "qiskit_circuit",
|
|
337
|
-
value: request.qiskitCircuit
|
|
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
|
-
});
|
|
380
|
-
const marshalUpdateBookingRequest = (request, defaults) => ({
|
|
381
|
-
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
|
|
382
286
|
});
|
|
287
|
+
const marshalUpdateBookingRequest = (request, defaults) => ({ description: request.description });
|
|
383
288
|
const marshalUpdateJobRequest = (request, defaults) => ({
|
|
384
|
-
|
|
385
|
-
|
|
289
|
+
name: request.name,
|
|
290
|
+
tags: request.tags
|
|
386
291
|
});
|
|
387
292
|
const marshalUpdateProcessRequest = (request, defaults) => ({
|
|
388
|
-
|
|
389
|
-
|
|
293
|
+
name: request.name,
|
|
294
|
+
tags: request.tags
|
|
390
295
|
});
|
|
391
296
|
const marshalUpdateSessionRequest = (request, defaults) => ({
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
297
|
+
max_duration: request.maxDuration,
|
|
298
|
+
max_idle_duration: request.maxIdleDuration,
|
|
299
|
+
name: request.name,
|
|
300
|
+
tags: request.tags
|
|
396
301
|
});
|
|
397
|
-
export {
|
|
398
|
-
marshalCreateJobRequest,
|
|
399
|
-
marshalCreateModelRequest,
|
|
400
|
-
marshalCreateProcessRequest,
|
|
401
|
-
marshalCreateSessionRequest,
|
|
402
|
-
marshalUpdateBookingRequest,
|
|
403
|
-
marshalUpdateJobRequest,
|
|
404
|
-
marshalUpdateProcessRequest,
|
|
405
|
-
marshalUpdateSessionRequest,
|
|
406
|
-
unmarshalApplication,
|
|
407
|
-
unmarshalBooking,
|
|
408
|
-
unmarshalJob,
|
|
409
|
-
unmarshalJobCircuit,
|
|
410
|
-
unmarshalListApplicationsResponse,
|
|
411
|
-
unmarshalListBookingsResponse,
|
|
412
|
-
unmarshalListJobResultsResponse,
|
|
413
|
-
unmarshalListJobsResponse,
|
|
414
|
-
unmarshalListModelsResponse,
|
|
415
|
-
unmarshalListPlatformsResponse,
|
|
416
|
-
unmarshalListProcessResultsResponse,
|
|
417
|
-
unmarshalListProcessesResponse,
|
|
418
|
-
unmarshalListSessionACLsResponse,
|
|
419
|
-
unmarshalListSessionsResponse,
|
|
420
|
-
unmarshalModel,
|
|
421
|
-
unmarshalPlatform,
|
|
422
|
-
unmarshalProcess,
|
|
423
|
-
unmarshalSession
|
|
424
|
-
};
|
|
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 };
|