@aws-sdk/client-braket 3.310.0 → 3.315.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-cjs/protocols/Aws_restJson1.js +228 -566
- package/dist-es/protocols/Aws_restJson1.js +206 -544
- package/package.json +6 -6
|
@@ -31,9 +31,9 @@ const se_CancelQuantumTaskCommand = async (input, context) => {
|
|
|
31
31
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quantum-task/{quantumTaskArn}/cancel";
|
|
32
32
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "quantumTaskArn", () => input.quantumTaskArn, "{quantumTaskArn}", false);
|
|
33
33
|
let body;
|
|
34
|
-
body = JSON.stringify({
|
|
35
|
-
clientToken:
|
|
36
|
-
});
|
|
34
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
35
|
+
clientToken: (_) => _ ?? (0, uuid_1.v4)(),
|
|
36
|
+
}));
|
|
37
37
|
return new protocol_http_1.HttpRequest({
|
|
38
38
|
protocol,
|
|
39
39
|
hostname,
|
|
@@ -52,28 +52,20 @@ const se_CreateJobCommand = async (input, context) => {
|
|
|
52
52
|
};
|
|
53
53
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/job";
|
|
54
54
|
let body;
|
|
55
|
-
body = JSON.stringify({
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
outputDataConfig: se_JobOutputDataConfig(input.outputDataConfig, context),
|
|
70
|
-
}),
|
|
71
|
-
...(input.roleArn != null && { roleArn: input.roleArn }),
|
|
72
|
-
...(input.stoppingCondition != null && {
|
|
73
|
-
stoppingCondition: se_JobStoppingCondition(input.stoppingCondition, context),
|
|
74
|
-
}),
|
|
75
|
-
...(input.tags != null && { tags: se_TagsMap(input.tags, context) }),
|
|
76
|
-
});
|
|
55
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
56
|
+
algorithmSpecification: (_) => (0, smithy_client_1._json)(_),
|
|
57
|
+
checkpointConfig: (_) => (0, smithy_client_1._json)(_),
|
|
58
|
+
clientToken: (_) => _ ?? (0, uuid_1.v4)(),
|
|
59
|
+
deviceConfig: (_) => (0, smithy_client_1._json)(_),
|
|
60
|
+
hyperParameters: (_) => (0, smithy_client_1._json)(_),
|
|
61
|
+
inputDataConfig: (_) => (0, smithy_client_1._json)(_),
|
|
62
|
+
instanceConfig: (_) => (0, smithy_client_1._json)(_),
|
|
63
|
+
jobName: [],
|
|
64
|
+
outputDataConfig: (_) => (0, smithy_client_1._json)(_),
|
|
65
|
+
roleArn: [],
|
|
66
|
+
stoppingCondition: (_) => (0, smithy_client_1._json)(_),
|
|
67
|
+
tags: (_) => (0, smithy_client_1._json)(_),
|
|
68
|
+
}));
|
|
77
69
|
return new protocol_http_1.HttpRequest({
|
|
78
70
|
protocol,
|
|
79
71
|
hostname,
|
|
@@ -92,17 +84,17 @@ const se_CreateQuantumTaskCommand = async (input, context) => {
|
|
|
92
84
|
};
|
|
93
85
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quantum-task";
|
|
94
86
|
let body;
|
|
95
|
-
body = JSON.stringify({
|
|
96
|
-
|
|
97
|
-
clientToken:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
});
|
|
87
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
88
|
+
action: (_) => smithy_client_1.LazyJsonString.fromObject(_),
|
|
89
|
+
clientToken: (_) => _ ?? (0, uuid_1.v4)(),
|
|
90
|
+
deviceArn: [],
|
|
91
|
+
deviceParameters: (_) => smithy_client_1.LazyJsonString.fromObject(_),
|
|
92
|
+
jobToken: [],
|
|
93
|
+
outputS3Bucket: [],
|
|
94
|
+
outputS3KeyPrefix: [],
|
|
95
|
+
shots: [],
|
|
96
|
+
tags: (_) => (0, smithy_client_1._json)(_),
|
|
97
|
+
}));
|
|
106
98
|
return new protocol_http_1.HttpRequest({
|
|
107
99
|
protocol,
|
|
108
100
|
hostname,
|
|
@@ -189,11 +181,11 @@ const se_SearchDevicesCommand = async (input, context) => {
|
|
|
189
181
|
};
|
|
190
182
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/devices";
|
|
191
183
|
let body;
|
|
192
|
-
body = JSON.stringify({
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
});
|
|
184
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
185
|
+
filters: (_) => (0, smithy_client_1._json)(_),
|
|
186
|
+
maxResults: [],
|
|
187
|
+
nextToken: [],
|
|
188
|
+
}));
|
|
197
189
|
return new protocol_http_1.HttpRequest({
|
|
198
190
|
protocol,
|
|
199
191
|
hostname,
|
|
@@ -212,11 +204,11 @@ const se_SearchJobsCommand = async (input, context) => {
|
|
|
212
204
|
};
|
|
213
205
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobs";
|
|
214
206
|
let body;
|
|
215
|
-
body = JSON.stringify({
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
});
|
|
207
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
208
|
+
filters: (_) => (0, smithy_client_1._json)(_),
|
|
209
|
+
maxResults: [],
|
|
210
|
+
nextToken: [],
|
|
211
|
+
}));
|
|
220
212
|
return new protocol_http_1.HttpRequest({
|
|
221
213
|
protocol,
|
|
222
214
|
hostname,
|
|
@@ -235,11 +227,11 @@ const se_SearchQuantumTasksCommand = async (input, context) => {
|
|
|
235
227
|
};
|
|
236
228
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quantum-tasks";
|
|
237
229
|
let body;
|
|
238
|
-
body = JSON.stringify({
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
});
|
|
230
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
231
|
+
filters: (_) => (0, smithy_client_1._json)(_),
|
|
232
|
+
maxResults: [],
|
|
233
|
+
nextToken: [],
|
|
234
|
+
}));
|
|
243
235
|
return new protocol_http_1.HttpRequest({
|
|
244
236
|
protocol,
|
|
245
237
|
hostname,
|
|
@@ -259,9 +251,9 @@ const se_TagResourceCommand = async (input, context) => {
|
|
|
259
251
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
260
252
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
261
253
|
let body;
|
|
262
|
-
body = JSON.stringify({
|
|
263
|
-
|
|
264
|
-
});
|
|
254
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
255
|
+
tags: (_) => (0, smithy_client_1._json)(_),
|
|
256
|
+
}));
|
|
265
257
|
return new protocol_http_1.HttpRequest({
|
|
266
258
|
protocol,
|
|
267
259
|
hostname,
|
|
@@ -278,7 +270,7 @@ const se_UntagResourceCommand = async (input, context) => {
|
|
|
278
270
|
const headers = {};
|
|
279
271
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
280
272
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
281
|
-
const query = map({
|
|
273
|
+
const query = (0, smithy_client_1.map)({
|
|
282
274
|
tagKeys: [
|
|
283
275
|
(0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
|
|
284
276
|
() => (input.tagKeys || []).map((_entry) => _entry),
|
|
@@ -301,16 +293,15 @@ const de_CancelJobCommand = async (output, context) => {
|
|
|
301
293
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
302
294
|
return de_CancelJobCommandError(output, context);
|
|
303
295
|
}
|
|
304
|
-
const contents = map({
|
|
296
|
+
const contents = (0, smithy_client_1.map)({
|
|
305
297
|
$metadata: deserializeMetadata(output),
|
|
306
298
|
});
|
|
307
299
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
}
|
|
300
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
301
|
+
cancellationStatus: smithy_client_1.expectString,
|
|
302
|
+
jobArn: smithy_client_1.expectString,
|
|
303
|
+
});
|
|
304
|
+
Object.assign(contents, doc);
|
|
314
305
|
return contents;
|
|
315
306
|
};
|
|
316
307
|
exports.de_CancelJobCommand = de_CancelJobCommand;
|
|
@@ -341,10 +332,9 @@ const de_CancelJobCommandError = async (output, context) => {
|
|
|
341
332
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
342
333
|
default:
|
|
343
334
|
const parsedBody = parsedOutput.body;
|
|
344
|
-
|
|
335
|
+
return throwDefaultError({
|
|
345
336
|
output,
|
|
346
337
|
parsedBody,
|
|
347
|
-
exceptionCtor: BraketServiceException_1.BraketServiceException,
|
|
348
338
|
errorCode,
|
|
349
339
|
});
|
|
350
340
|
}
|
|
@@ -353,16 +343,15 @@ const de_CancelQuantumTaskCommand = async (output, context) => {
|
|
|
353
343
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
354
344
|
return de_CancelQuantumTaskCommandError(output, context);
|
|
355
345
|
}
|
|
356
|
-
const contents = map({
|
|
346
|
+
const contents = (0, smithy_client_1.map)({
|
|
357
347
|
$metadata: deserializeMetadata(output),
|
|
358
348
|
});
|
|
359
349
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
}
|
|
350
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
351
|
+
cancellationStatus: smithy_client_1.expectString,
|
|
352
|
+
quantumTaskArn: smithy_client_1.expectString,
|
|
353
|
+
});
|
|
354
|
+
Object.assign(contents, doc);
|
|
366
355
|
return contents;
|
|
367
356
|
};
|
|
368
357
|
exports.de_CancelQuantumTaskCommand = de_CancelQuantumTaskCommand;
|
|
@@ -393,10 +382,9 @@ const de_CancelQuantumTaskCommandError = async (output, context) => {
|
|
|
393
382
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
394
383
|
default:
|
|
395
384
|
const parsedBody = parsedOutput.body;
|
|
396
|
-
|
|
385
|
+
return throwDefaultError({
|
|
397
386
|
output,
|
|
398
387
|
parsedBody,
|
|
399
|
-
exceptionCtor: BraketServiceException_1.BraketServiceException,
|
|
400
388
|
errorCode,
|
|
401
389
|
});
|
|
402
390
|
}
|
|
@@ -405,13 +393,14 @@ const de_CreateJobCommand = async (output, context) => {
|
|
|
405
393
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
406
394
|
return de_CreateJobCommandError(output, context);
|
|
407
395
|
}
|
|
408
|
-
const contents = map({
|
|
396
|
+
const contents = (0, smithy_client_1.map)({
|
|
409
397
|
$metadata: deserializeMetadata(output),
|
|
410
398
|
});
|
|
411
399
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
}
|
|
400
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
401
|
+
jobArn: smithy_client_1.expectString,
|
|
402
|
+
});
|
|
403
|
+
Object.assign(contents, doc);
|
|
415
404
|
return contents;
|
|
416
405
|
};
|
|
417
406
|
exports.de_CreateJobCommand = de_CreateJobCommand;
|
|
@@ -445,10 +434,9 @@ const de_CreateJobCommandError = async (output, context) => {
|
|
|
445
434
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
446
435
|
default:
|
|
447
436
|
const parsedBody = parsedOutput.body;
|
|
448
|
-
|
|
437
|
+
return throwDefaultError({
|
|
449
438
|
output,
|
|
450
439
|
parsedBody,
|
|
451
|
-
exceptionCtor: BraketServiceException_1.BraketServiceException,
|
|
452
440
|
errorCode,
|
|
453
441
|
});
|
|
454
442
|
}
|
|
@@ -457,13 +445,14 @@ const de_CreateQuantumTaskCommand = async (output, context) => {
|
|
|
457
445
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
458
446
|
return de_CreateQuantumTaskCommandError(output, context);
|
|
459
447
|
}
|
|
460
|
-
const contents = map({
|
|
448
|
+
const contents = (0, smithy_client_1.map)({
|
|
461
449
|
$metadata: deserializeMetadata(output),
|
|
462
450
|
});
|
|
463
451
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
}
|
|
452
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
453
|
+
quantumTaskArn: smithy_client_1.expectString,
|
|
454
|
+
});
|
|
455
|
+
Object.assign(contents, doc);
|
|
467
456
|
return contents;
|
|
468
457
|
};
|
|
469
458
|
exports.de_CreateQuantumTaskCommand = de_CreateQuantumTaskCommand;
|
|
@@ -497,10 +486,9 @@ const de_CreateQuantumTaskCommandError = async (output, context) => {
|
|
|
497
486
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
498
487
|
default:
|
|
499
488
|
const parsedBody = parsedOutput.body;
|
|
500
|
-
|
|
489
|
+
return throwDefaultError({
|
|
501
490
|
output,
|
|
502
491
|
parsedBody,
|
|
503
|
-
exceptionCtor: BraketServiceException_1.BraketServiceException,
|
|
504
492
|
errorCode,
|
|
505
493
|
});
|
|
506
494
|
}
|
|
@@ -509,28 +497,19 @@ const de_GetDeviceCommand = async (output, context) => {
|
|
|
509
497
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
510
498
|
return de_GetDeviceCommandError(output, context);
|
|
511
499
|
}
|
|
512
|
-
const contents = map({
|
|
500
|
+
const contents = (0, smithy_client_1.map)({
|
|
513
501
|
$metadata: deserializeMetadata(output),
|
|
514
502
|
});
|
|
515
503
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
if (data.deviceStatus != null) {
|
|
526
|
-
contents.deviceStatus = (0, smithy_client_1.expectString)(data.deviceStatus);
|
|
527
|
-
}
|
|
528
|
-
if (data.deviceType != null) {
|
|
529
|
-
contents.deviceType = (0, smithy_client_1.expectString)(data.deviceType);
|
|
530
|
-
}
|
|
531
|
-
if (data.providerName != null) {
|
|
532
|
-
contents.providerName = (0, smithy_client_1.expectString)(data.providerName);
|
|
533
|
-
}
|
|
504
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
505
|
+
deviceArn: smithy_client_1.expectString,
|
|
506
|
+
deviceCapabilities: (_) => new smithy_client_1.LazyJsonString(_),
|
|
507
|
+
deviceName: smithy_client_1.expectString,
|
|
508
|
+
deviceStatus: smithy_client_1.expectString,
|
|
509
|
+
deviceType: smithy_client_1.expectString,
|
|
510
|
+
providerName: smithy_client_1.expectString,
|
|
511
|
+
});
|
|
512
|
+
Object.assign(contents, doc);
|
|
534
513
|
return contents;
|
|
535
514
|
};
|
|
536
515
|
exports.de_GetDeviceCommand = de_GetDeviceCommand;
|
|
@@ -558,10 +537,9 @@ const de_GetDeviceCommandError = async (output, context) => {
|
|
|
558
537
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
559
538
|
default:
|
|
560
539
|
const parsedBody = parsedOutput.body;
|
|
561
|
-
|
|
540
|
+
return throwDefaultError({
|
|
562
541
|
output,
|
|
563
542
|
parsedBody,
|
|
564
|
-
exceptionCtor: BraketServiceException_1.BraketServiceException,
|
|
565
543
|
errorCode,
|
|
566
544
|
});
|
|
567
545
|
}
|
|
@@ -570,67 +548,32 @@ const de_GetJobCommand = async (output, context) => {
|
|
|
570
548
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
571
549
|
return de_GetJobCommandError(output, context);
|
|
572
550
|
}
|
|
573
|
-
const contents = map({
|
|
551
|
+
const contents = (0, smithy_client_1.map)({
|
|
574
552
|
$metadata: deserializeMetadata(output),
|
|
575
553
|
});
|
|
576
554
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
contents.failureReason = (0, smithy_client_1.expectString)(data.failureReason);
|
|
600
|
-
}
|
|
601
|
-
if (data.hyperParameters != null) {
|
|
602
|
-
contents.hyperParameters = de_HyperParameters(data.hyperParameters, context);
|
|
603
|
-
}
|
|
604
|
-
if (data.inputDataConfig != null) {
|
|
605
|
-
contents.inputDataConfig = de_InputConfigList(data.inputDataConfig, context);
|
|
606
|
-
}
|
|
607
|
-
if (data.instanceConfig != null) {
|
|
608
|
-
contents.instanceConfig = de_InstanceConfig(data.instanceConfig, context);
|
|
609
|
-
}
|
|
610
|
-
if (data.jobArn != null) {
|
|
611
|
-
contents.jobArn = (0, smithy_client_1.expectString)(data.jobArn);
|
|
612
|
-
}
|
|
613
|
-
if (data.jobName != null) {
|
|
614
|
-
contents.jobName = (0, smithy_client_1.expectString)(data.jobName);
|
|
615
|
-
}
|
|
616
|
-
if (data.outputDataConfig != null) {
|
|
617
|
-
contents.outputDataConfig = de_JobOutputDataConfig(data.outputDataConfig, context);
|
|
618
|
-
}
|
|
619
|
-
if (data.roleArn != null) {
|
|
620
|
-
contents.roleArn = (0, smithy_client_1.expectString)(data.roleArn);
|
|
621
|
-
}
|
|
622
|
-
if (data.startedAt != null) {
|
|
623
|
-
contents.startedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.startedAt));
|
|
624
|
-
}
|
|
625
|
-
if (data.status != null) {
|
|
626
|
-
contents.status = (0, smithy_client_1.expectString)(data.status);
|
|
627
|
-
}
|
|
628
|
-
if (data.stoppingCondition != null) {
|
|
629
|
-
contents.stoppingCondition = de_JobStoppingCondition(data.stoppingCondition, context);
|
|
630
|
-
}
|
|
631
|
-
if (data.tags != null) {
|
|
632
|
-
contents.tags = de_TagsMap(data.tags, context);
|
|
633
|
-
}
|
|
555
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
556
|
+
algorithmSpecification: smithy_client_1._json,
|
|
557
|
+
billableDuration: smithy_client_1.expectInt32,
|
|
558
|
+
checkpointConfig: smithy_client_1._json,
|
|
559
|
+
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
560
|
+
deviceConfig: smithy_client_1._json,
|
|
561
|
+
endedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
562
|
+
events: (_) => de_JobEvents(_, context),
|
|
563
|
+
failureReason: smithy_client_1.expectString,
|
|
564
|
+
hyperParameters: smithy_client_1._json,
|
|
565
|
+
inputDataConfig: smithy_client_1._json,
|
|
566
|
+
instanceConfig: smithy_client_1._json,
|
|
567
|
+
jobArn: smithy_client_1.expectString,
|
|
568
|
+
jobName: smithy_client_1.expectString,
|
|
569
|
+
outputDataConfig: smithy_client_1._json,
|
|
570
|
+
roleArn: smithy_client_1.expectString,
|
|
571
|
+
startedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
572
|
+
status: smithy_client_1.expectString,
|
|
573
|
+
stoppingCondition: smithy_client_1._json,
|
|
574
|
+
tags: smithy_client_1._json,
|
|
575
|
+
});
|
|
576
|
+
Object.assign(contents, doc);
|
|
634
577
|
return contents;
|
|
635
578
|
};
|
|
636
579
|
exports.de_GetJobCommand = de_GetJobCommand;
|
|
@@ -658,10 +601,9 @@ const de_GetJobCommandError = async (output, context) => {
|
|
|
658
601
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
659
602
|
default:
|
|
660
603
|
const parsedBody = parsedOutput.body;
|
|
661
|
-
|
|
604
|
+
return throwDefaultError({
|
|
662
605
|
output,
|
|
663
606
|
parsedBody,
|
|
664
|
-
exceptionCtor: BraketServiceException_1.BraketServiceException,
|
|
665
607
|
errorCode,
|
|
666
608
|
});
|
|
667
609
|
}
|
|
@@ -670,46 +612,25 @@ const de_GetQuantumTaskCommand = async (output, context) => {
|
|
|
670
612
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
671
613
|
return de_GetQuantumTaskCommandError(output, context);
|
|
672
614
|
}
|
|
673
|
-
const contents = map({
|
|
615
|
+
const contents = (0, smithy_client_1.map)({
|
|
674
616
|
$metadata: deserializeMetadata(output),
|
|
675
617
|
});
|
|
676
618
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
if (data.jobArn != null) {
|
|
693
|
-
contents.jobArn = (0, smithy_client_1.expectString)(data.jobArn);
|
|
694
|
-
}
|
|
695
|
-
if (data.outputS3Bucket != null) {
|
|
696
|
-
contents.outputS3Bucket = (0, smithy_client_1.expectString)(data.outputS3Bucket);
|
|
697
|
-
}
|
|
698
|
-
if (data.outputS3Directory != null) {
|
|
699
|
-
contents.outputS3Directory = (0, smithy_client_1.expectString)(data.outputS3Directory);
|
|
700
|
-
}
|
|
701
|
-
if (data.quantumTaskArn != null) {
|
|
702
|
-
contents.quantumTaskArn = (0, smithy_client_1.expectString)(data.quantumTaskArn);
|
|
703
|
-
}
|
|
704
|
-
if (data.shots != null) {
|
|
705
|
-
contents.shots = (0, smithy_client_1.expectLong)(data.shots);
|
|
706
|
-
}
|
|
707
|
-
if (data.status != null) {
|
|
708
|
-
contents.status = (0, smithy_client_1.expectString)(data.status);
|
|
709
|
-
}
|
|
710
|
-
if (data.tags != null) {
|
|
711
|
-
contents.tags = de_TagsMap(data.tags, context);
|
|
712
|
-
}
|
|
619
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
620
|
+
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
621
|
+
deviceArn: smithy_client_1.expectString,
|
|
622
|
+
deviceParameters: (_) => new smithy_client_1.LazyJsonString(_),
|
|
623
|
+
endedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
624
|
+
failureReason: smithy_client_1.expectString,
|
|
625
|
+
jobArn: smithy_client_1.expectString,
|
|
626
|
+
outputS3Bucket: smithy_client_1.expectString,
|
|
627
|
+
outputS3Directory: smithy_client_1.expectString,
|
|
628
|
+
quantumTaskArn: smithy_client_1.expectString,
|
|
629
|
+
shots: smithy_client_1.expectLong,
|
|
630
|
+
status: smithy_client_1.expectString,
|
|
631
|
+
tags: smithy_client_1._json,
|
|
632
|
+
});
|
|
633
|
+
Object.assign(contents, doc);
|
|
713
634
|
return contents;
|
|
714
635
|
};
|
|
715
636
|
exports.de_GetQuantumTaskCommand = de_GetQuantumTaskCommand;
|
|
@@ -737,10 +658,9 @@ const de_GetQuantumTaskCommandError = async (output, context) => {
|
|
|
737
658
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
738
659
|
default:
|
|
739
660
|
const parsedBody = parsedOutput.body;
|
|
740
|
-
|
|
661
|
+
return throwDefaultError({
|
|
741
662
|
output,
|
|
742
663
|
parsedBody,
|
|
743
|
-
exceptionCtor: BraketServiceException_1.BraketServiceException,
|
|
744
664
|
errorCode,
|
|
745
665
|
});
|
|
746
666
|
}
|
|
@@ -749,13 +669,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
|
|
|
749
669
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
750
670
|
return de_ListTagsForResourceCommandError(output, context);
|
|
751
671
|
}
|
|
752
|
-
const contents = map({
|
|
672
|
+
const contents = (0, smithy_client_1.map)({
|
|
753
673
|
$metadata: deserializeMetadata(output),
|
|
754
674
|
});
|
|
755
675
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
}
|
|
676
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
677
|
+
tags: smithy_client_1._json,
|
|
678
|
+
});
|
|
679
|
+
Object.assign(contents, doc);
|
|
759
680
|
return contents;
|
|
760
681
|
};
|
|
761
682
|
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
@@ -777,10 +698,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
|
777
698
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
778
699
|
default:
|
|
779
700
|
const parsedBody = parsedOutput.body;
|
|
780
|
-
|
|
701
|
+
return throwDefaultError({
|
|
781
702
|
output,
|
|
782
703
|
parsedBody,
|
|
783
|
-
exceptionCtor: BraketServiceException_1.BraketServiceException,
|
|
784
704
|
errorCode,
|
|
785
705
|
});
|
|
786
706
|
}
|
|
@@ -789,16 +709,15 @@ const de_SearchDevicesCommand = async (output, context) => {
|
|
|
789
709
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
790
710
|
return de_SearchDevicesCommandError(output, context);
|
|
791
711
|
}
|
|
792
|
-
const contents = map({
|
|
712
|
+
const contents = (0, smithy_client_1.map)({
|
|
793
713
|
$metadata: deserializeMetadata(output),
|
|
794
714
|
});
|
|
795
715
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
}
|
|
716
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
717
|
+
devices: smithy_client_1._json,
|
|
718
|
+
nextToken: smithy_client_1.expectString,
|
|
719
|
+
});
|
|
720
|
+
Object.assign(contents, doc);
|
|
802
721
|
return contents;
|
|
803
722
|
};
|
|
804
723
|
exports.de_SearchDevicesCommand = de_SearchDevicesCommand;
|
|
@@ -823,10 +742,9 @@ const de_SearchDevicesCommandError = async (output, context) => {
|
|
|
823
742
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
824
743
|
default:
|
|
825
744
|
const parsedBody = parsedOutput.body;
|
|
826
|
-
|
|
745
|
+
return throwDefaultError({
|
|
827
746
|
output,
|
|
828
747
|
parsedBody,
|
|
829
|
-
exceptionCtor: BraketServiceException_1.BraketServiceException,
|
|
830
748
|
errorCode,
|
|
831
749
|
});
|
|
832
750
|
}
|
|
@@ -835,16 +753,15 @@ const de_SearchJobsCommand = async (output, context) => {
|
|
|
835
753
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
836
754
|
return de_SearchJobsCommandError(output, context);
|
|
837
755
|
}
|
|
838
|
-
const contents = map({
|
|
756
|
+
const contents = (0, smithy_client_1.map)({
|
|
839
757
|
$metadata: deserializeMetadata(output),
|
|
840
758
|
});
|
|
841
759
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
}
|
|
760
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
761
|
+
jobs: (_) => de_JobSummaryList(_, context),
|
|
762
|
+
nextToken: smithy_client_1.expectString,
|
|
763
|
+
});
|
|
764
|
+
Object.assign(contents, doc);
|
|
848
765
|
return contents;
|
|
849
766
|
};
|
|
850
767
|
exports.de_SearchJobsCommand = de_SearchJobsCommand;
|
|
@@ -869,10 +786,9 @@ const de_SearchJobsCommandError = async (output, context) => {
|
|
|
869
786
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
870
787
|
default:
|
|
871
788
|
const parsedBody = parsedOutput.body;
|
|
872
|
-
|
|
789
|
+
return throwDefaultError({
|
|
873
790
|
output,
|
|
874
791
|
parsedBody,
|
|
875
|
-
exceptionCtor: BraketServiceException_1.BraketServiceException,
|
|
876
792
|
errorCode,
|
|
877
793
|
});
|
|
878
794
|
}
|
|
@@ -881,16 +797,15 @@ const de_SearchQuantumTasksCommand = async (output, context) => {
|
|
|
881
797
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
882
798
|
return de_SearchQuantumTasksCommandError(output, context);
|
|
883
799
|
}
|
|
884
|
-
const contents = map({
|
|
800
|
+
const contents = (0, smithy_client_1.map)({
|
|
885
801
|
$metadata: deserializeMetadata(output),
|
|
886
802
|
});
|
|
887
803
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
}
|
|
804
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
805
|
+
nextToken: smithy_client_1.expectString,
|
|
806
|
+
quantumTasks: (_) => de_QuantumTaskSummaryList(_, context),
|
|
807
|
+
});
|
|
808
|
+
Object.assign(contents, doc);
|
|
894
809
|
return contents;
|
|
895
810
|
};
|
|
896
811
|
exports.de_SearchQuantumTasksCommand = de_SearchQuantumTasksCommand;
|
|
@@ -915,10 +830,9 @@ const de_SearchQuantumTasksCommandError = async (output, context) => {
|
|
|
915
830
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
916
831
|
default:
|
|
917
832
|
const parsedBody = parsedOutput.body;
|
|
918
|
-
|
|
833
|
+
return throwDefaultError({
|
|
919
834
|
output,
|
|
920
835
|
parsedBody,
|
|
921
|
-
exceptionCtor: BraketServiceException_1.BraketServiceException,
|
|
922
836
|
errorCode,
|
|
923
837
|
});
|
|
924
838
|
}
|
|
@@ -927,7 +841,7 @@ const de_TagResourceCommand = async (output, context) => {
|
|
|
927
841
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
928
842
|
return de_TagResourceCommandError(output, context);
|
|
929
843
|
}
|
|
930
|
-
const contents = map({
|
|
844
|
+
const contents = (0, smithy_client_1.map)({
|
|
931
845
|
$metadata: deserializeMetadata(output),
|
|
932
846
|
});
|
|
933
847
|
await collectBody(output.body, context);
|
|
@@ -952,10 +866,9 @@ const de_TagResourceCommandError = async (output, context) => {
|
|
|
952
866
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
953
867
|
default:
|
|
954
868
|
const parsedBody = parsedOutput.body;
|
|
955
|
-
|
|
869
|
+
return throwDefaultError({
|
|
956
870
|
output,
|
|
957
871
|
parsedBody,
|
|
958
|
-
exceptionCtor: BraketServiceException_1.BraketServiceException,
|
|
959
872
|
errorCode,
|
|
960
873
|
});
|
|
961
874
|
}
|
|
@@ -964,7 +877,7 @@ const de_UntagResourceCommand = async (output, context) => {
|
|
|
964
877
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
965
878
|
return de_UntagResourceCommandError(output, context);
|
|
966
879
|
}
|
|
967
|
-
const contents = map({
|
|
880
|
+
const contents = (0, smithy_client_1.map)({
|
|
968
881
|
$metadata: deserializeMetadata(output),
|
|
969
882
|
});
|
|
970
883
|
await collectBody(output.body, context);
|
|
@@ -989,21 +902,21 @@ const de_UntagResourceCommandError = async (output, context) => {
|
|
|
989
902
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
990
903
|
default:
|
|
991
904
|
const parsedBody = parsedOutput.body;
|
|
992
|
-
|
|
905
|
+
return throwDefaultError({
|
|
993
906
|
output,
|
|
994
907
|
parsedBody,
|
|
995
|
-
exceptionCtor: BraketServiceException_1.BraketServiceException,
|
|
996
908
|
errorCode,
|
|
997
909
|
});
|
|
998
910
|
}
|
|
999
911
|
};
|
|
1000
|
-
const
|
|
912
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(BraketServiceException_1.BraketServiceException);
|
|
1001
913
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
1002
|
-
const contents = map({});
|
|
914
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1003
915
|
const data = parsedOutput.body;
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
}
|
|
916
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
917
|
+
message: smithy_client_1.expectString,
|
|
918
|
+
});
|
|
919
|
+
Object.assign(contents, doc);
|
|
1007
920
|
const exception = new models_0_1.AccessDeniedException({
|
|
1008
921
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1009
922
|
...contents,
|
|
@@ -1011,11 +924,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
|
1011
924
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1012
925
|
};
|
|
1013
926
|
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1014
|
-
const contents = map({});
|
|
927
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1015
928
|
const data = parsedOutput.body;
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
}
|
|
929
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
930
|
+
message: smithy_client_1.expectString,
|
|
931
|
+
});
|
|
932
|
+
Object.assign(contents, doc);
|
|
1019
933
|
const exception = new models_0_1.ConflictException({
|
|
1020
934
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1021
935
|
...contents,
|
|
@@ -1023,11 +937,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
|
1023
937
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1024
938
|
};
|
|
1025
939
|
const de_DeviceOfflineExceptionRes = async (parsedOutput, context) => {
|
|
1026
|
-
const contents = map({});
|
|
940
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1027
941
|
const data = parsedOutput.body;
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
}
|
|
942
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
943
|
+
message: smithy_client_1.expectString,
|
|
944
|
+
});
|
|
945
|
+
Object.assign(contents, doc);
|
|
1031
946
|
const exception = new models_0_1.DeviceOfflineException({
|
|
1032
947
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1033
948
|
...contents,
|
|
@@ -1035,11 +950,12 @@ const de_DeviceOfflineExceptionRes = async (parsedOutput, context) => {
|
|
|
1035
950
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1036
951
|
};
|
|
1037
952
|
const de_DeviceRetiredExceptionRes = async (parsedOutput, context) => {
|
|
1038
|
-
const contents = map({});
|
|
953
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1039
954
|
const data = parsedOutput.body;
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
}
|
|
955
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
956
|
+
message: smithy_client_1.expectString,
|
|
957
|
+
});
|
|
958
|
+
Object.assign(contents, doc);
|
|
1043
959
|
const exception = new models_0_1.DeviceRetiredException({
|
|
1044
960
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1045
961
|
...contents,
|
|
@@ -1047,11 +963,12 @@ const de_DeviceRetiredExceptionRes = async (parsedOutput, context) => {
|
|
|
1047
963
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1048
964
|
};
|
|
1049
965
|
const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
|
|
1050
|
-
const contents = map({});
|
|
966
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1051
967
|
const data = parsedOutput.body;
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
}
|
|
968
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
969
|
+
message: smithy_client_1.expectString,
|
|
970
|
+
});
|
|
971
|
+
Object.assign(contents, doc);
|
|
1055
972
|
const exception = new models_0_1.InternalServiceException({
|
|
1056
973
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1057
974
|
...contents,
|
|
@@ -1059,11 +976,12 @@ const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
|
|
|
1059
976
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1060
977
|
};
|
|
1061
978
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1062
|
-
const contents = map({});
|
|
979
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1063
980
|
const data = parsedOutput.body;
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
}
|
|
981
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
982
|
+
message: smithy_client_1.expectString,
|
|
983
|
+
});
|
|
984
|
+
Object.assign(contents, doc);
|
|
1067
985
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
1068
986
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1069
987
|
...contents,
|
|
@@ -1071,11 +989,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
1071
989
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1072
990
|
};
|
|
1073
991
|
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
1074
|
-
const contents = map({});
|
|
992
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1075
993
|
const data = parsedOutput.body;
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
}
|
|
994
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
995
|
+
message: smithy_client_1.expectString,
|
|
996
|
+
});
|
|
997
|
+
Object.assign(contents, doc);
|
|
1079
998
|
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
1080
999
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1081
1000
|
...contents,
|
|
@@ -1083,11 +1002,12 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
1083
1002
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1084
1003
|
};
|
|
1085
1004
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
1086
|
-
const contents = map({});
|
|
1005
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1087
1006
|
const data = parsedOutput.body;
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
}
|
|
1007
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1008
|
+
message: smithy_client_1.expectString,
|
|
1009
|
+
});
|
|
1010
|
+
Object.assign(contents, doc);
|
|
1091
1011
|
const exception = new models_0_1.ThrottlingException({
|
|
1092
1012
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1093
1013
|
...contents,
|
|
@@ -1095,332 +1015,74 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
|
1095
1015
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1096
1016
|
};
|
|
1097
1017
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1098
|
-
const contents = map({});
|
|
1018
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1099
1019
|
const data = parsedOutput.body;
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
}
|
|
1020
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1021
|
+
message: smithy_client_1.expectString,
|
|
1022
|
+
});
|
|
1023
|
+
Object.assign(contents, doc);
|
|
1103
1024
|
const exception = new models_0_1.ValidationException({
|
|
1104
1025
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1105
1026
|
...contents,
|
|
1106
1027
|
});
|
|
1107
1028
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1108
1029
|
};
|
|
1109
|
-
const se_AlgorithmSpecification = (input, context) => {
|
|
1110
|
-
return {
|
|
1111
|
-
...(input.containerImage != null && { containerImage: se_ContainerImage(input.containerImage, context) }),
|
|
1112
|
-
...(input.scriptModeConfig != null && { scriptModeConfig: se_ScriptModeConfig(input.scriptModeConfig, context) }),
|
|
1113
|
-
};
|
|
1114
|
-
};
|
|
1115
|
-
const se_ContainerImage = (input, context) => {
|
|
1116
|
-
return {
|
|
1117
|
-
...(input.uri != null && { uri: input.uri }),
|
|
1118
|
-
};
|
|
1119
|
-
};
|
|
1120
|
-
const se_DataSource = (input, context) => {
|
|
1121
|
-
return {
|
|
1122
|
-
...(input.s3DataSource != null && { s3DataSource: se_S3DataSource(input.s3DataSource, context) }),
|
|
1123
|
-
};
|
|
1124
|
-
};
|
|
1125
|
-
const se_DeviceConfig = (input, context) => {
|
|
1126
|
-
return {
|
|
1127
|
-
...(input.device != null && { device: input.device }),
|
|
1128
|
-
};
|
|
1129
|
-
};
|
|
1130
|
-
const se_HyperParameters = (input, context) => {
|
|
1131
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1132
|
-
if (value === null) {
|
|
1133
|
-
return acc;
|
|
1134
|
-
}
|
|
1135
|
-
acc[key] = value;
|
|
1136
|
-
return acc;
|
|
1137
|
-
}, {});
|
|
1138
|
-
};
|
|
1139
|
-
const se_InputConfigList = (input, context) => {
|
|
1140
|
-
return input
|
|
1141
|
-
.filter((e) => e != null)
|
|
1142
|
-
.map((entry) => {
|
|
1143
|
-
return se_InputFileConfig(entry, context);
|
|
1144
|
-
});
|
|
1145
|
-
};
|
|
1146
|
-
const se_InputFileConfig = (input, context) => {
|
|
1147
|
-
return {
|
|
1148
|
-
...(input.channelName != null && { channelName: input.channelName }),
|
|
1149
|
-
...(input.contentType != null && { contentType: input.contentType }),
|
|
1150
|
-
...(input.dataSource != null && { dataSource: se_DataSource(input.dataSource, context) }),
|
|
1151
|
-
};
|
|
1152
|
-
};
|
|
1153
|
-
const se_InstanceConfig = (input, context) => {
|
|
1154
|
-
return {
|
|
1155
|
-
...(input.instanceCount != null && { instanceCount: input.instanceCount }),
|
|
1156
|
-
...(input.instanceType != null && { instanceType: input.instanceType }),
|
|
1157
|
-
...(input.volumeSizeInGb != null && { volumeSizeInGb: input.volumeSizeInGb }),
|
|
1158
|
-
};
|
|
1159
|
-
};
|
|
1160
|
-
const se_JobCheckpointConfig = (input, context) => {
|
|
1161
|
-
return {
|
|
1162
|
-
...(input.localPath != null && { localPath: input.localPath }),
|
|
1163
|
-
...(input.s3Uri != null && { s3Uri: input.s3Uri }),
|
|
1164
|
-
};
|
|
1165
|
-
};
|
|
1166
|
-
const se_JobOutputDataConfig = (input, context) => {
|
|
1167
|
-
return {
|
|
1168
|
-
...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
|
|
1169
|
-
...(input.s3Path != null && { s3Path: input.s3Path }),
|
|
1170
|
-
};
|
|
1171
|
-
};
|
|
1172
|
-
const se_JobStoppingCondition = (input, context) => {
|
|
1173
|
-
return {
|
|
1174
|
-
...(input.maxRuntimeInSeconds != null && { maxRuntimeInSeconds: input.maxRuntimeInSeconds }),
|
|
1175
|
-
};
|
|
1176
|
-
};
|
|
1177
|
-
const se_S3DataSource = (input, context) => {
|
|
1178
|
-
return {
|
|
1179
|
-
...(input.s3Uri != null && { s3Uri: input.s3Uri }),
|
|
1180
|
-
};
|
|
1181
|
-
};
|
|
1182
|
-
const se_ScriptModeConfig = (input, context) => {
|
|
1183
|
-
return {
|
|
1184
|
-
...(input.compressionType != null && { compressionType: input.compressionType }),
|
|
1185
|
-
...(input.entryPoint != null && { entryPoint: input.entryPoint }),
|
|
1186
|
-
...(input.s3Uri != null && { s3Uri: input.s3Uri }),
|
|
1187
|
-
};
|
|
1188
|
-
};
|
|
1189
|
-
const se_SearchDevicesFilter = (input, context) => {
|
|
1190
|
-
return {
|
|
1191
|
-
...(input.name != null && { name: input.name }),
|
|
1192
|
-
...(input.values != null && { values: se_String256List(input.values, context) }),
|
|
1193
|
-
};
|
|
1194
|
-
};
|
|
1195
|
-
const se_SearchDevicesFilterList = (input, context) => {
|
|
1196
|
-
return input
|
|
1197
|
-
.filter((e) => e != null)
|
|
1198
|
-
.map((entry) => {
|
|
1199
|
-
return se_SearchDevicesFilter(entry, context);
|
|
1200
|
-
});
|
|
1201
|
-
};
|
|
1202
|
-
const se_SearchJobsFilter = (input, context) => {
|
|
1203
|
-
return {
|
|
1204
|
-
...(input.name != null && { name: input.name }),
|
|
1205
|
-
...(input.operator != null && { operator: input.operator }),
|
|
1206
|
-
...(input.values != null && { values: se_String256List(input.values, context) }),
|
|
1207
|
-
};
|
|
1208
|
-
};
|
|
1209
|
-
const se_SearchJobsFilterList = (input, context) => {
|
|
1210
|
-
return input
|
|
1211
|
-
.filter((e) => e != null)
|
|
1212
|
-
.map((entry) => {
|
|
1213
|
-
return se_SearchJobsFilter(entry, context);
|
|
1214
|
-
});
|
|
1215
|
-
};
|
|
1216
|
-
const se_SearchQuantumTasksFilter = (input, context) => {
|
|
1217
|
-
return {
|
|
1218
|
-
...(input.name != null && { name: input.name }),
|
|
1219
|
-
...(input.operator != null && { operator: input.operator }),
|
|
1220
|
-
...(input.values != null && { values: se_String256List(input.values, context) }),
|
|
1221
|
-
};
|
|
1222
|
-
};
|
|
1223
|
-
const se_SearchQuantumTasksFilterList = (input, context) => {
|
|
1224
|
-
return input
|
|
1225
|
-
.filter((e) => e != null)
|
|
1226
|
-
.map((entry) => {
|
|
1227
|
-
return se_SearchQuantumTasksFilter(entry, context);
|
|
1228
|
-
});
|
|
1229
|
-
};
|
|
1230
|
-
const se_String256List = (input, context) => {
|
|
1231
|
-
return input
|
|
1232
|
-
.filter((e) => e != null)
|
|
1233
|
-
.map((entry) => {
|
|
1234
|
-
return entry;
|
|
1235
|
-
});
|
|
1236
|
-
};
|
|
1237
|
-
const se_TagsMap = (input, context) => {
|
|
1238
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1239
|
-
if (value === null) {
|
|
1240
|
-
return acc;
|
|
1241
|
-
}
|
|
1242
|
-
acc[key] = value;
|
|
1243
|
-
return acc;
|
|
1244
|
-
}, {});
|
|
1245
|
-
};
|
|
1246
|
-
const de_AlgorithmSpecification = (output, context) => {
|
|
1247
|
-
return {
|
|
1248
|
-
containerImage: output.containerImage != null ? de_ContainerImage(output.containerImage, context) : undefined,
|
|
1249
|
-
scriptModeConfig: output.scriptModeConfig != null ? de_ScriptModeConfig(output.scriptModeConfig, context) : undefined,
|
|
1250
|
-
};
|
|
1251
|
-
};
|
|
1252
|
-
const de_ContainerImage = (output, context) => {
|
|
1253
|
-
return {
|
|
1254
|
-
uri: (0, smithy_client_1.expectString)(output.uri),
|
|
1255
|
-
};
|
|
1256
|
-
};
|
|
1257
|
-
const de_DataSource = (output, context) => {
|
|
1258
|
-
return {
|
|
1259
|
-
s3DataSource: output.s3DataSource != null ? de_S3DataSource(output.s3DataSource, context) : undefined,
|
|
1260
|
-
};
|
|
1261
|
-
};
|
|
1262
|
-
const de_DeviceConfig = (output, context) => {
|
|
1263
|
-
return {
|
|
1264
|
-
device: (0, smithy_client_1.expectString)(output.device),
|
|
1265
|
-
};
|
|
1266
|
-
};
|
|
1267
|
-
const de_DeviceSummary = (output, context) => {
|
|
1268
|
-
return {
|
|
1269
|
-
deviceArn: (0, smithy_client_1.expectString)(output.deviceArn),
|
|
1270
|
-
deviceName: (0, smithy_client_1.expectString)(output.deviceName),
|
|
1271
|
-
deviceStatus: (0, smithy_client_1.expectString)(output.deviceStatus),
|
|
1272
|
-
deviceType: (0, smithy_client_1.expectString)(output.deviceType),
|
|
1273
|
-
providerName: (0, smithy_client_1.expectString)(output.providerName),
|
|
1274
|
-
};
|
|
1275
|
-
};
|
|
1276
|
-
const de_DeviceSummaryList = (output, context) => {
|
|
1277
|
-
const retVal = (output || [])
|
|
1278
|
-
.filter((e) => e != null)
|
|
1279
|
-
.map((entry) => {
|
|
1280
|
-
if (entry === null) {
|
|
1281
|
-
return null;
|
|
1282
|
-
}
|
|
1283
|
-
return de_DeviceSummary(entry, context);
|
|
1284
|
-
});
|
|
1285
|
-
return retVal;
|
|
1286
|
-
};
|
|
1287
|
-
const de_HyperParameters = (output, context) => {
|
|
1288
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1289
|
-
if (value === null) {
|
|
1290
|
-
return acc;
|
|
1291
|
-
}
|
|
1292
|
-
acc[key] = (0, smithy_client_1.expectString)(value);
|
|
1293
|
-
return acc;
|
|
1294
|
-
}, {});
|
|
1295
|
-
};
|
|
1296
|
-
const de_InputConfigList = (output, context) => {
|
|
1297
|
-
const retVal = (output || [])
|
|
1298
|
-
.filter((e) => e != null)
|
|
1299
|
-
.map((entry) => {
|
|
1300
|
-
if (entry === null) {
|
|
1301
|
-
return null;
|
|
1302
|
-
}
|
|
1303
|
-
return de_InputFileConfig(entry, context);
|
|
1304
|
-
});
|
|
1305
|
-
return retVal;
|
|
1306
|
-
};
|
|
1307
|
-
const de_InputFileConfig = (output, context) => {
|
|
1308
|
-
return {
|
|
1309
|
-
channelName: (0, smithy_client_1.expectString)(output.channelName),
|
|
1310
|
-
contentType: (0, smithy_client_1.expectString)(output.contentType),
|
|
1311
|
-
dataSource: output.dataSource != null ? de_DataSource(output.dataSource, context) : undefined,
|
|
1312
|
-
};
|
|
1313
|
-
};
|
|
1314
|
-
const de_InstanceConfig = (output, context) => {
|
|
1315
|
-
return {
|
|
1316
|
-
instanceCount: (0, smithy_client_1.expectInt32)(output.instanceCount),
|
|
1317
|
-
instanceType: (0, smithy_client_1.expectString)(output.instanceType),
|
|
1318
|
-
volumeSizeInGb: (0, smithy_client_1.expectInt32)(output.volumeSizeInGb),
|
|
1319
|
-
};
|
|
1320
|
-
};
|
|
1321
|
-
const de_JobCheckpointConfig = (output, context) => {
|
|
1322
|
-
return {
|
|
1323
|
-
localPath: (0, smithy_client_1.expectString)(output.localPath),
|
|
1324
|
-
s3Uri: (0, smithy_client_1.expectString)(output.s3Uri),
|
|
1325
|
-
};
|
|
1326
|
-
};
|
|
1327
1030
|
const de_JobEventDetails = (output, context) => {
|
|
1328
|
-
return {
|
|
1329
|
-
eventType:
|
|
1330
|
-
message:
|
|
1331
|
-
timeOfEvent:
|
|
1332
|
-
};
|
|
1031
|
+
return (0, smithy_client_1.take)(output, {
|
|
1032
|
+
eventType: smithy_client_1.expectString,
|
|
1033
|
+
message: smithy_client_1.expectString,
|
|
1034
|
+
timeOfEvent: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1035
|
+
});
|
|
1333
1036
|
};
|
|
1334
1037
|
const de_JobEvents = (output, context) => {
|
|
1335
1038
|
const retVal = (output || [])
|
|
1336
1039
|
.filter((e) => e != null)
|
|
1337
1040
|
.map((entry) => {
|
|
1338
|
-
if (entry === null) {
|
|
1339
|
-
return null;
|
|
1340
|
-
}
|
|
1341
1041
|
return de_JobEventDetails(entry, context);
|
|
1342
1042
|
});
|
|
1343
1043
|
return retVal;
|
|
1344
1044
|
};
|
|
1345
|
-
const de_JobOutputDataConfig = (output, context) => {
|
|
1346
|
-
return {
|
|
1347
|
-
kmsKeyId: (0, smithy_client_1.expectString)(output.kmsKeyId),
|
|
1348
|
-
s3Path: (0, smithy_client_1.expectString)(output.s3Path),
|
|
1349
|
-
};
|
|
1350
|
-
};
|
|
1351
|
-
const de_JobStoppingCondition = (output, context) => {
|
|
1352
|
-
return {
|
|
1353
|
-
maxRuntimeInSeconds: (0, smithy_client_1.expectInt32)(output.maxRuntimeInSeconds),
|
|
1354
|
-
};
|
|
1355
|
-
};
|
|
1356
1045
|
const de_JobSummary = (output, context) => {
|
|
1357
|
-
return {
|
|
1358
|
-
createdAt:
|
|
1359
|
-
device:
|
|
1360
|
-
endedAt:
|
|
1361
|
-
jobArn:
|
|
1362
|
-
jobName:
|
|
1363
|
-
startedAt:
|
|
1364
|
-
status:
|
|
1365
|
-
tags:
|
|
1366
|
-
};
|
|
1046
|
+
return (0, smithy_client_1.take)(output, {
|
|
1047
|
+
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1048
|
+
device: smithy_client_1.expectString,
|
|
1049
|
+
endedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1050
|
+
jobArn: smithy_client_1.expectString,
|
|
1051
|
+
jobName: smithy_client_1.expectString,
|
|
1052
|
+
startedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1053
|
+
status: smithy_client_1.expectString,
|
|
1054
|
+
tags: smithy_client_1._json,
|
|
1055
|
+
});
|
|
1367
1056
|
};
|
|
1368
1057
|
const de_JobSummaryList = (output, context) => {
|
|
1369
1058
|
const retVal = (output || [])
|
|
1370
1059
|
.filter((e) => e != null)
|
|
1371
1060
|
.map((entry) => {
|
|
1372
|
-
if (entry === null) {
|
|
1373
|
-
return null;
|
|
1374
|
-
}
|
|
1375
1061
|
return de_JobSummary(entry, context);
|
|
1376
1062
|
});
|
|
1377
1063
|
return retVal;
|
|
1378
1064
|
};
|
|
1379
1065
|
const de_QuantumTaskSummary = (output, context) => {
|
|
1380
|
-
return {
|
|
1381
|
-
createdAt:
|
|
1382
|
-
deviceArn:
|
|
1383
|
-
endedAt:
|
|
1384
|
-
outputS3Bucket:
|
|
1385
|
-
outputS3Directory:
|
|
1386
|
-
quantumTaskArn:
|
|
1387
|
-
shots:
|
|
1388
|
-
status:
|
|
1389
|
-
tags:
|
|
1390
|
-
};
|
|
1066
|
+
return (0, smithy_client_1.take)(output, {
|
|
1067
|
+
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1068
|
+
deviceArn: smithy_client_1.expectString,
|
|
1069
|
+
endedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1070
|
+
outputS3Bucket: smithy_client_1.expectString,
|
|
1071
|
+
outputS3Directory: smithy_client_1.expectString,
|
|
1072
|
+
quantumTaskArn: smithy_client_1.expectString,
|
|
1073
|
+
shots: smithy_client_1.expectLong,
|
|
1074
|
+
status: smithy_client_1.expectString,
|
|
1075
|
+
tags: smithy_client_1._json,
|
|
1076
|
+
});
|
|
1391
1077
|
};
|
|
1392
1078
|
const de_QuantumTaskSummaryList = (output, context) => {
|
|
1393
1079
|
const retVal = (output || [])
|
|
1394
1080
|
.filter((e) => e != null)
|
|
1395
1081
|
.map((entry) => {
|
|
1396
|
-
if (entry === null) {
|
|
1397
|
-
return null;
|
|
1398
|
-
}
|
|
1399
1082
|
return de_QuantumTaskSummary(entry, context);
|
|
1400
1083
|
});
|
|
1401
1084
|
return retVal;
|
|
1402
1085
|
};
|
|
1403
|
-
const de_S3DataSource = (output, context) => {
|
|
1404
|
-
return {
|
|
1405
|
-
s3Uri: (0, smithy_client_1.expectString)(output.s3Uri),
|
|
1406
|
-
};
|
|
1407
|
-
};
|
|
1408
|
-
const de_ScriptModeConfig = (output, context) => {
|
|
1409
|
-
return {
|
|
1410
|
-
compressionType: (0, smithy_client_1.expectString)(output.compressionType),
|
|
1411
|
-
entryPoint: (0, smithy_client_1.expectString)(output.entryPoint),
|
|
1412
|
-
s3Uri: (0, smithy_client_1.expectString)(output.s3Uri),
|
|
1413
|
-
};
|
|
1414
|
-
};
|
|
1415
|
-
const de_TagsMap = (output, context) => {
|
|
1416
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1417
|
-
if (value === null) {
|
|
1418
|
-
return acc;
|
|
1419
|
-
}
|
|
1420
|
-
acc[key] = (0, smithy_client_1.expectString)(value);
|
|
1421
|
-
return acc;
|
|
1422
|
-
}, {});
|
|
1423
|
-
};
|
|
1424
1086
|
const deserializeMetadata = (output) => ({
|
|
1425
1087
|
httpStatusCode: output.statusCode,
|
|
1426
1088
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|