@scaleway/sdk-qaas 1.1.5 → 1.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/dist/v1alpha1/api.gen.cjs +129 -4
- package/dist/v1alpha1/api.gen.d.ts +64 -6
- package/dist/v1alpha1/api.gen.js +131 -6
- package/dist/v1alpha1/content.gen.cjs +6 -0
- package/dist/v1alpha1/content.gen.d.ts +3 -1
- package/dist/v1alpha1/content.gen.js +6 -0
- package/dist/v1alpha1/index.gen.cjs +7 -0
- package/dist/v1alpha1/index.gen.d.ts +1 -1
- package/dist/v1alpha1/index.gen.js +9 -2
- package/dist/v1alpha1/marshalling.gen.cjs +99 -0
- package/dist/v1alpha1/marshalling.gen.d.ts +7 -1
- package/dist/v1alpha1/marshalling.gen.js +99 -0
- package/dist/v1alpha1/types.gen.d.ts +228 -2
- package/package.json +6 -6
|
@@ -26,6 +26,23 @@ const unmarshalApplication = (data) => {
|
|
|
26
26
|
type: data.type
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
+
const unmarshalBooking = (data) => {
|
|
30
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
31
|
+
throw new TypeError(
|
|
32
|
+
`Unmarshalling the type 'Booking' failed as data isn't a dictionary.`
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
createdAt: sdkClient.unmarshalDate(data.created_at),
|
|
37
|
+
description: data.description,
|
|
38
|
+
finishedAt: sdkClient.unmarshalDate(data.finished_at),
|
|
39
|
+
id: data.id,
|
|
40
|
+
progressMessage: data.progress_message,
|
|
41
|
+
startedAt: sdkClient.unmarshalDate(data.started_at),
|
|
42
|
+
status: data.status,
|
|
43
|
+
updatedAt: sdkClient.unmarshalDate(data.updated_at)
|
|
44
|
+
};
|
|
45
|
+
};
|
|
29
46
|
const unmarshalJob = (data) => {
|
|
30
47
|
if (!sdkClient.isJSONObject(data)) {
|
|
31
48
|
throw new TypeError(
|
|
@@ -36,7 +53,9 @@ const unmarshalJob = (data) => {
|
|
|
36
53
|
createdAt: sdkClient.unmarshalDate(data.created_at),
|
|
37
54
|
id: data.id,
|
|
38
55
|
jobDuration: data.job_duration,
|
|
56
|
+
modelId: data.model_id,
|
|
39
57
|
name: data.name,
|
|
58
|
+
parameters: data.parameters,
|
|
40
59
|
progressMessage: data.progress_message,
|
|
41
60
|
resultDistribution: data.result_distribution,
|
|
42
61
|
sessionId: data.session_id,
|
|
@@ -46,6 +65,32 @@ const unmarshalJob = (data) => {
|
|
|
46
65
|
updatedAt: sdkClient.unmarshalDate(data.updated_at)
|
|
47
66
|
};
|
|
48
67
|
};
|
|
68
|
+
const unmarshalModel = (data) => {
|
|
69
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
70
|
+
throw new TypeError(
|
|
71
|
+
`Unmarshalling the type 'Model' failed as data isn't a dictionary.`
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
createdAt: sdkClient.unmarshalDate(data.created_at),
|
|
76
|
+
id: data.id,
|
|
77
|
+
projectId: data.project_id,
|
|
78
|
+
url: data.url
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
const unmarshalPlatformBookingRequirement = (data) => {
|
|
82
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
83
|
+
throw new TypeError(
|
|
84
|
+
`Unmarshalling the type 'PlatformBookingRequirement' failed as data isn't a dictionary.`
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
maxCancellationDuration: data.max_cancellation_duration,
|
|
89
|
+
maxDuration: data.max_duration,
|
|
90
|
+
maxPlanificationDuration: data.max_planification_duration,
|
|
91
|
+
minDuration: data.min_duration
|
|
92
|
+
};
|
|
93
|
+
};
|
|
49
94
|
const unmarshalPlatformHardware = (data) => {
|
|
50
95
|
if (!sdkClient.isJSONObject(data)) {
|
|
51
96
|
throw new TypeError(
|
|
@@ -70,8 +115,12 @@ const unmarshalPlatform = (data) => {
|
|
|
70
115
|
return {
|
|
71
116
|
availability: data.availability,
|
|
72
117
|
backendName: data.backend_name,
|
|
118
|
+
bookingRequirement: data.booking_requirement ? unmarshalPlatformBookingRequirement(data.booking_requirement) : void 0,
|
|
119
|
+
description: data.description,
|
|
120
|
+
documentationUrl: data.documentation_url,
|
|
73
121
|
hardware: data.hardware ? unmarshalPlatformHardware(data.hardware) : void 0,
|
|
74
122
|
id: data.id,
|
|
123
|
+
isBookable: data.is_bookable,
|
|
75
124
|
maxCircuitCount: data.max_circuit_count,
|
|
76
125
|
maxQubitCount: data.max_qubit_count,
|
|
77
126
|
maxShotCount: data.max_shot_count,
|
|
@@ -117,15 +166,18 @@ const unmarshalSession = (data) => {
|
|
|
117
166
|
);
|
|
118
167
|
}
|
|
119
168
|
return {
|
|
169
|
+
bookingId: data.booking_id,
|
|
120
170
|
createdAt: sdkClient.unmarshalDate(data.created_at),
|
|
121
171
|
deduplicationId: data.deduplication_id,
|
|
122
172
|
finishedJobCount: data.finished_job_count,
|
|
123
173
|
id: data.id,
|
|
124
174
|
maxDuration: data.max_duration,
|
|
125
175
|
maxIdleDuration: data.max_idle_duration,
|
|
176
|
+
modelId: data.model_id,
|
|
126
177
|
name: data.name,
|
|
127
178
|
originId: data.origin_id,
|
|
128
179
|
originType: data.origin_type,
|
|
180
|
+
parameters: data.parameters,
|
|
129
181
|
platformId: data.platform_id,
|
|
130
182
|
progressMessage: data.progress_message,
|
|
131
183
|
projectId: data.project_id,
|
|
@@ -151,6 +203,17 @@ const unmarshalListApplicationsResponse = (data) => {
|
|
|
151
203
|
totalCount: data.total_count
|
|
152
204
|
};
|
|
153
205
|
};
|
|
206
|
+
const unmarshalListBookingsResponse = (data) => {
|
|
207
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
208
|
+
throw new TypeError(
|
|
209
|
+
`Unmarshalling the type 'ListBookingsResponse' failed as data isn't a dictionary.`
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
return {
|
|
213
|
+
bookings: sdkClient.unmarshalArrayOfObject(data.bookings, unmarshalBooking),
|
|
214
|
+
totalCount: data.total_count
|
|
215
|
+
};
|
|
216
|
+
};
|
|
154
217
|
const unmarshalJobResult = (data) => {
|
|
155
218
|
if (!sdkClient.isJSONObject(data)) {
|
|
156
219
|
throw new TypeError(
|
|
@@ -186,6 +249,17 @@ const unmarshalListJobsResponse = (data) => {
|
|
|
186
249
|
totalCount: data.total_count
|
|
187
250
|
};
|
|
188
251
|
};
|
|
252
|
+
const unmarshalListModelsResponse = (data) => {
|
|
253
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
254
|
+
throw new TypeError(
|
|
255
|
+
`Unmarshalling the type 'ListModelsResponse' failed as data isn't a dictionary.`
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
return {
|
|
259
|
+
models: sdkClient.unmarshalArrayOfObject(data.models, unmarshalModel),
|
|
260
|
+
totalCount: data.total_count
|
|
261
|
+
};
|
|
262
|
+
};
|
|
189
263
|
const unmarshalListPlatformsResponse = (data) => {
|
|
190
264
|
if (!sdkClient.isJSONObject(data)) {
|
|
191
265
|
throw new TypeError(
|
|
@@ -265,10 +339,16 @@ const marshalJobCircuit = (request, defaults) => ({
|
|
|
265
339
|
const marshalCreateJobRequest = (request, defaults) => ({
|
|
266
340
|
circuit: marshalJobCircuit(request.circuit),
|
|
267
341
|
max_duration: request.maxDuration,
|
|
342
|
+
model_id: request.modelId,
|
|
268
343
|
name: request.name,
|
|
344
|
+
parameters: request.parameters,
|
|
269
345
|
session_id: request.sessionId,
|
|
270
346
|
tags: request.tags
|
|
271
347
|
});
|
|
348
|
+
const marshalCreateModelRequest = (request, defaults) => ({
|
|
349
|
+
payload: request.payload,
|
|
350
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
351
|
+
});
|
|
272
352
|
const marshalCreateProcessRequest = (request, defaults) => ({
|
|
273
353
|
application_id: request.applicationId,
|
|
274
354
|
input: request.input,
|
|
@@ -277,15 +357,28 @@ const marshalCreateProcessRequest = (request, defaults) => ({
|
|
|
277
357
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
278
358
|
tags: request.tags
|
|
279
359
|
});
|
|
360
|
+
const marshalCreateSessionRequestBookingDemand = (request, defaults) => ({
|
|
361
|
+
description: request.description,
|
|
362
|
+
finished_at: request.finishedAt,
|
|
363
|
+
started_at: request.startedAt
|
|
364
|
+
});
|
|
280
365
|
const marshalCreateSessionRequest = (request, defaults) => ({
|
|
366
|
+
booking_demand: request.bookingDemand !== void 0 ? marshalCreateSessionRequestBookingDemand(
|
|
367
|
+
request.bookingDemand
|
|
368
|
+
) : void 0,
|
|
281
369
|
deduplication_id: request.deduplicationId,
|
|
282
370
|
max_duration: request.maxDuration,
|
|
283
371
|
max_idle_duration: request.maxIdleDuration,
|
|
372
|
+
model_id: request.modelId,
|
|
284
373
|
name: request.name,
|
|
374
|
+
parameters: request.parameters,
|
|
285
375
|
platform_id: request.platformId,
|
|
286
376
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
287
377
|
tags: request.tags
|
|
288
378
|
});
|
|
379
|
+
const marshalUpdateBookingRequest = (request, defaults) => ({
|
|
380
|
+
description: request.description
|
|
381
|
+
});
|
|
289
382
|
const marshalUpdateJobRequest = (request, defaults) => ({
|
|
290
383
|
name: request.name,
|
|
291
384
|
tags: request.tags
|
|
@@ -301,22 +394,28 @@ const marshalUpdateSessionRequest = (request, defaults) => ({
|
|
|
301
394
|
tags: request.tags
|
|
302
395
|
});
|
|
303
396
|
exports.marshalCreateJobRequest = marshalCreateJobRequest;
|
|
397
|
+
exports.marshalCreateModelRequest = marshalCreateModelRequest;
|
|
304
398
|
exports.marshalCreateProcessRequest = marshalCreateProcessRequest;
|
|
305
399
|
exports.marshalCreateSessionRequest = marshalCreateSessionRequest;
|
|
400
|
+
exports.marshalUpdateBookingRequest = marshalUpdateBookingRequest;
|
|
306
401
|
exports.marshalUpdateJobRequest = marshalUpdateJobRequest;
|
|
307
402
|
exports.marshalUpdateProcessRequest = marshalUpdateProcessRequest;
|
|
308
403
|
exports.marshalUpdateSessionRequest = marshalUpdateSessionRequest;
|
|
309
404
|
exports.unmarshalApplication = unmarshalApplication;
|
|
405
|
+
exports.unmarshalBooking = unmarshalBooking;
|
|
310
406
|
exports.unmarshalJob = unmarshalJob;
|
|
311
407
|
exports.unmarshalJobCircuit = unmarshalJobCircuit;
|
|
312
408
|
exports.unmarshalListApplicationsResponse = unmarshalListApplicationsResponse;
|
|
409
|
+
exports.unmarshalListBookingsResponse = unmarshalListBookingsResponse;
|
|
313
410
|
exports.unmarshalListJobResultsResponse = unmarshalListJobResultsResponse;
|
|
314
411
|
exports.unmarshalListJobsResponse = unmarshalListJobsResponse;
|
|
412
|
+
exports.unmarshalListModelsResponse = unmarshalListModelsResponse;
|
|
315
413
|
exports.unmarshalListPlatformsResponse = unmarshalListPlatformsResponse;
|
|
316
414
|
exports.unmarshalListProcessResultsResponse = unmarshalListProcessResultsResponse;
|
|
317
415
|
exports.unmarshalListProcessesResponse = unmarshalListProcessesResponse;
|
|
318
416
|
exports.unmarshalListSessionACLsResponse = unmarshalListSessionACLsResponse;
|
|
319
417
|
exports.unmarshalListSessionsResponse = unmarshalListSessionsResponse;
|
|
418
|
+
exports.unmarshalModel = unmarshalModel;
|
|
320
419
|
exports.unmarshalPlatform = unmarshalPlatform;
|
|
321
420
|
exports.unmarshalProcess = unmarshalProcess;
|
|
322
421
|
exports.unmarshalSession = unmarshalSession;
|
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
import type { DefaultValues } from '@scaleway/sdk-client';
|
|
2
|
-
import type { Application, CreateJobRequest, CreateProcessRequest, CreateSessionRequest, Job, JobCircuit, ListApplicationsResponse, ListJobResultsResponse, ListJobsResponse,
|
|
2
|
+
import type { Application, Booking, CreateJobRequest, CreateModelRequest, CreateProcessRequest, CreateSessionRequest, Job, JobCircuit, ListApplicationsResponse, ListBookingsResponse, ListJobResultsResponse, ListJobsResponse, ListModelsResponse, ListPlatformsResponse, ListProcessesResponse, ListProcessResultsResponse, ListSessionACLsResponse, ListSessionsResponse, Model, Platform, Process, Session, UpdateBookingRequest, UpdateJobRequest, UpdateProcessRequest, UpdateSessionRequest } from './types.gen';
|
|
3
3
|
export declare const unmarshalJobCircuit: (data: unknown) => JobCircuit;
|
|
4
4
|
export declare const unmarshalApplication: (data: unknown) => Application;
|
|
5
|
+
export declare const unmarshalBooking: (data: unknown) => Booking;
|
|
5
6
|
export declare const unmarshalJob: (data: unknown) => Job;
|
|
7
|
+
export declare const unmarshalModel: (data: unknown) => Model;
|
|
6
8
|
export declare const unmarshalPlatform: (data: unknown) => Platform;
|
|
7
9
|
export declare const unmarshalProcess: (data: unknown) => Process;
|
|
8
10
|
export declare const unmarshalSession: (data: unknown) => Session;
|
|
9
11
|
export declare const unmarshalListApplicationsResponse: (data: unknown) => ListApplicationsResponse;
|
|
12
|
+
export declare const unmarshalListBookingsResponse: (data: unknown) => ListBookingsResponse;
|
|
10
13
|
export declare const unmarshalListJobResultsResponse: (data: unknown) => ListJobResultsResponse;
|
|
11
14
|
export declare const unmarshalListJobsResponse: (data: unknown) => ListJobsResponse;
|
|
15
|
+
export declare const unmarshalListModelsResponse: (data: unknown) => ListModelsResponse;
|
|
12
16
|
export declare const unmarshalListPlatformsResponse: (data: unknown) => ListPlatformsResponse;
|
|
13
17
|
export declare const unmarshalListProcessResultsResponse: (data: unknown) => ListProcessResultsResponse;
|
|
14
18
|
export declare const unmarshalListProcessesResponse: (data: unknown) => ListProcessesResponse;
|
|
15
19
|
export declare const unmarshalListSessionACLsResponse: (data: unknown) => ListSessionACLsResponse;
|
|
16
20
|
export declare const unmarshalListSessionsResponse: (data: unknown) => ListSessionsResponse;
|
|
17
21
|
export declare const marshalCreateJobRequest: (request: CreateJobRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
22
|
+
export declare const marshalCreateModelRequest: (request: CreateModelRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
18
23
|
export declare const marshalCreateProcessRequest: (request: CreateProcessRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
19
24
|
export declare const marshalCreateSessionRequest: (request: CreateSessionRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
25
|
+
export declare const marshalUpdateBookingRequest: (request: UpdateBookingRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
20
26
|
export declare const marshalUpdateJobRequest: (request: UpdateJobRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
21
27
|
export declare const marshalUpdateProcessRequest: (request: UpdateProcessRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
22
28
|
export declare const marshalUpdateSessionRequest: (request: UpdateSessionRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -24,6 +24,23 @@ const unmarshalApplication = (data) => {
|
|
|
24
24
|
type: data.type
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
+
const unmarshalBooking = (data) => {
|
|
28
|
+
if (!isJSONObject(data)) {
|
|
29
|
+
throw new TypeError(
|
|
30
|
+
`Unmarshalling the type 'Booking' failed as data isn't a dictionary.`
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
createdAt: unmarshalDate(data.created_at),
|
|
35
|
+
description: data.description,
|
|
36
|
+
finishedAt: unmarshalDate(data.finished_at),
|
|
37
|
+
id: data.id,
|
|
38
|
+
progressMessage: data.progress_message,
|
|
39
|
+
startedAt: unmarshalDate(data.started_at),
|
|
40
|
+
status: data.status,
|
|
41
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
42
|
+
};
|
|
43
|
+
};
|
|
27
44
|
const unmarshalJob = (data) => {
|
|
28
45
|
if (!isJSONObject(data)) {
|
|
29
46
|
throw new TypeError(
|
|
@@ -34,7 +51,9 @@ const unmarshalJob = (data) => {
|
|
|
34
51
|
createdAt: unmarshalDate(data.created_at),
|
|
35
52
|
id: data.id,
|
|
36
53
|
jobDuration: data.job_duration,
|
|
54
|
+
modelId: data.model_id,
|
|
37
55
|
name: data.name,
|
|
56
|
+
parameters: data.parameters,
|
|
38
57
|
progressMessage: data.progress_message,
|
|
39
58
|
resultDistribution: data.result_distribution,
|
|
40
59
|
sessionId: data.session_id,
|
|
@@ -44,6 +63,32 @@ const unmarshalJob = (data) => {
|
|
|
44
63
|
updatedAt: unmarshalDate(data.updated_at)
|
|
45
64
|
};
|
|
46
65
|
};
|
|
66
|
+
const unmarshalModel = (data) => {
|
|
67
|
+
if (!isJSONObject(data)) {
|
|
68
|
+
throw new TypeError(
|
|
69
|
+
`Unmarshalling the type 'Model' failed as data isn't a dictionary.`
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
createdAt: unmarshalDate(data.created_at),
|
|
74
|
+
id: data.id,
|
|
75
|
+
projectId: data.project_id,
|
|
76
|
+
url: data.url
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
const unmarshalPlatformBookingRequirement = (data) => {
|
|
80
|
+
if (!isJSONObject(data)) {
|
|
81
|
+
throw new TypeError(
|
|
82
|
+
`Unmarshalling the type 'PlatformBookingRequirement' failed as data isn't a dictionary.`
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
maxCancellationDuration: data.max_cancellation_duration,
|
|
87
|
+
maxDuration: data.max_duration,
|
|
88
|
+
maxPlanificationDuration: data.max_planification_duration,
|
|
89
|
+
minDuration: data.min_duration
|
|
90
|
+
};
|
|
91
|
+
};
|
|
47
92
|
const unmarshalPlatformHardware = (data) => {
|
|
48
93
|
if (!isJSONObject(data)) {
|
|
49
94
|
throw new TypeError(
|
|
@@ -68,8 +113,12 @@ const unmarshalPlatform = (data) => {
|
|
|
68
113
|
return {
|
|
69
114
|
availability: data.availability,
|
|
70
115
|
backendName: data.backend_name,
|
|
116
|
+
bookingRequirement: data.booking_requirement ? unmarshalPlatformBookingRequirement(data.booking_requirement) : void 0,
|
|
117
|
+
description: data.description,
|
|
118
|
+
documentationUrl: data.documentation_url,
|
|
71
119
|
hardware: data.hardware ? unmarshalPlatformHardware(data.hardware) : void 0,
|
|
72
120
|
id: data.id,
|
|
121
|
+
isBookable: data.is_bookable,
|
|
73
122
|
maxCircuitCount: data.max_circuit_count,
|
|
74
123
|
maxQubitCount: data.max_qubit_count,
|
|
75
124
|
maxShotCount: data.max_shot_count,
|
|
@@ -115,15 +164,18 @@ const unmarshalSession = (data) => {
|
|
|
115
164
|
);
|
|
116
165
|
}
|
|
117
166
|
return {
|
|
167
|
+
bookingId: data.booking_id,
|
|
118
168
|
createdAt: unmarshalDate(data.created_at),
|
|
119
169
|
deduplicationId: data.deduplication_id,
|
|
120
170
|
finishedJobCount: data.finished_job_count,
|
|
121
171
|
id: data.id,
|
|
122
172
|
maxDuration: data.max_duration,
|
|
123
173
|
maxIdleDuration: data.max_idle_duration,
|
|
174
|
+
modelId: data.model_id,
|
|
124
175
|
name: data.name,
|
|
125
176
|
originId: data.origin_id,
|
|
126
177
|
originType: data.origin_type,
|
|
178
|
+
parameters: data.parameters,
|
|
127
179
|
platformId: data.platform_id,
|
|
128
180
|
progressMessage: data.progress_message,
|
|
129
181
|
projectId: data.project_id,
|
|
@@ -149,6 +201,17 @@ const unmarshalListApplicationsResponse = (data) => {
|
|
|
149
201
|
totalCount: data.total_count
|
|
150
202
|
};
|
|
151
203
|
};
|
|
204
|
+
const unmarshalListBookingsResponse = (data) => {
|
|
205
|
+
if (!isJSONObject(data)) {
|
|
206
|
+
throw new TypeError(
|
|
207
|
+
`Unmarshalling the type 'ListBookingsResponse' failed as data isn't a dictionary.`
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
return {
|
|
211
|
+
bookings: unmarshalArrayOfObject(data.bookings, unmarshalBooking),
|
|
212
|
+
totalCount: data.total_count
|
|
213
|
+
};
|
|
214
|
+
};
|
|
152
215
|
const unmarshalJobResult = (data) => {
|
|
153
216
|
if (!isJSONObject(data)) {
|
|
154
217
|
throw new TypeError(
|
|
@@ -184,6 +247,17 @@ const unmarshalListJobsResponse = (data) => {
|
|
|
184
247
|
totalCount: data.total_count
|
|
185
248
|
};
|
|
186
249
|
};
|
|
250
|
+
const unmarshalListModelsResponse = (data) => {
|
|
251
|
+
if (!isJSONObject(data)) {
|
|
252
|
+
throw new TypeError(
|
|
253
|
+
`Unmarshalling the type 'ListModelsResponse' failed as data isn't a dictionary.`
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
return {
|
|
257
|
+
models: unmarshalArrayOfObject(data.models, unmarshalModel),
|
|
258
|
+
totalCount: data.total_count
|
|
259
|
+
};
|
|
260
|
+
};
|
|
187
261
|
const unmarshalListPlatformsResponse = (data) => {
|
|
188
262
|
if (!isJSONObject(data)) {
|
|
189
263
|
throw new TypeError(
|
|
@@ -263,10 +337,16 @@ const marshalJobCircuit = (request, defaults) => ({
|
|
|
263
337
|
const marshalCreateJobRequest = (request, defaults) => ({
|
|
264
338
|
circuit: marshalJobCircuit(request.circuit),
|
|
265
339
|
max_duration: request.maxDuration,
|
|
340
|
+
model_id: request.modelId,
|
|
266
341
|
name: request.name,
|
|
342
|
+
parameters: request.parameters,
|
|
267
343
|
session_id: request.sessionId,
|
|
268
344
|
tags: request.tags
|
|
269
345
|
});
|
|
346
|
+
const marshalCreateModelRequest = (request, defaults) => ({
|
|
347
|
+
payload: request.payload,
|
|
348
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
349
|
+
});
|
|
270
350
|
const marshalCreateProcessRequest = (request, defaults) => ({
|
|
271
351
|
application_id: request.applicationId,
|
|
272
352
|
input: request.input,
|
|
@@ -275,15 +355,28 @@ const marshalCreateProcessRequest = (request, defaults) => ({
|
|
|
275
355
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
276
356
|
tags: request.tags
|
|
277
357
|
});
|
|
358
|
+
const marshalCreateSessionRequestBookingDemand = (request, defaults) => ({
|
|
359
|
+
description: request.description,
|
|
360
|
+
finished_at: request.finishedAt,
|
|
361
|
+
started_at: request.startedAt
|
|
362
|
+
});
|
|
278
363
|
const marshalCreateSessionRequest = (request, defaults) => ({
|
|
364
|
+
booking_demand: request.bookingDemand !== void 0 ? marshalCreateSessionRequestBookingDemand(
|
|
365
|
+
request.bookingDemand
|
|
366
|
+
) : void 0,
|
|
279
367
|
deduplication_id: request.deduplicationId,
|
|
280
368
|
max_duration: request.maxDuration,
|
|
281
369
|
max_idle_duration: request.maxIdleDuration,
|
|
370
|
+
model_id: request.modelId,
|
|
282
371
|
name: request.name,
|
|
372
|
+
parameters: request.parameters,
|
|
283
373
|
platform_id: request.platformId,
|
|
284
374
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
285
375
|
tags: request.tags
|
|
286
376
|
});
|
|
377
|
+
const marshalUpdateBookingRequest = (request, defaults) => ({
|
|
378
|
+
description: request.description
|
|
379
|
+
});
|
|
287
380
|
const marshalUpdateJobRequest = (request, defaults) => ({
|
|
288
381
|
name: request.name,
|
|
289
382
|
tags: request.tags
|
|
@@ -300,22 +393,28 @@ const marshalUpdateSessionRequest = (request, defaults) => ({
|
|
|
300
393
|
});
|
|
301
394
|
export {
|
|
302
395
|
marshalCreateJobRequest,
|
|
396
|
+
marshalCreateModelRequest,
|
|
303
397
|
marshalCreateProcessRequest,
|
|
304
398
|
marshalCreateSessionRequest,
|
|
399
|
+
marshalUpdateBookingRequest,
|
|
305
400
|
marshalUpdateJobRequest,
|
|
306
401
|
marshalUpdateProcessRequest,
|
|
307
402
|
marshalUpdateSessionRequest,
|
|
308
403
|
unmarshalApplication,
|
|
404
|
+
unmarshalBooking,
|
|
309
405
|
unmarshalJob,
|
|
310
406
|
unmarshalJobCircuit,
|
|
311
407
|
unmarshalListApplicationsResponse,
|
|
408
|
+
unmarshalListBookingsResponse,
|
|
312
409
|
unmarshalListJobResultsResponse,
|
|
313
410
|
unmarshalListJobsResponse,
|
|
411
|
+
unmarshalListModelsResponse,
|
|
314
412
|
unmarshalListPlatformsResponse,
|
|
315
413
|
unmarshalListProcessResultsResponse,
|
|
316
414
|
unmarshalListProcessesResponse,
|
|
317
415
|
unmarshalListSessionACLsResponse,
|
|
318
416
|
unmarshalListSessionsResponse,
|
|
417
|
+
unmarshalModel,
|
|
319
418
|
unmarshalPlatform,
|
|
320
419
|
unmarshalProcess,
|
|
321
420
|
unmarshalSession
|