@aws-sdk/client-braket 3.928.0 → 3.929.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/index.js +756 -754
- package/dist-cjs/runtimeConfig.shared.js +2 -0
- package/dist-es/BraketClient.js +2 -0
- package/dist-es/commands/CancelJobCommand.js +3 -9
- package/dist-es/commands/CancelQuantumTaskCommand.js +3 -9
- package/dist-es/commands/CreateJobCommand.js +3 -9
- package/dist-es/commands/CreateQuantumTaskCommand.js +3 -9
- package/dist-es/commands/GetDeviceCommand.js +3 -9
- package/dist-es/commands/GetJobCommand.js +3 -9
- package/dist-es/commands/GetQuantumTaskCommand.js +3 -9
- package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
- package/dist-es/commands/SearchDevicesCommand.js +3 -9
- package/dist-es/commands/SearchJobsCommand.js +3 -9
- package/dist-es/commands/SearchQuantumTasksCommand.js +3 -9
- package/dist-es/commands/TagResourceCommand.js +3 -9
- package/dist-es/commands/UntagResourceCommand.js +3 -9
- package/dist-es/runtimeConfig.shared.js +2 -0
- package/dist-es/schemas/schemas_0.js +710 -0
- package/dist-types/BraketClient.d.ts +10 -1
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +94 -0
- package/dist-types/ts3.4/BraketClient.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +100 -0
- package/package.json +2 -3
- package/dist-es/protocols/Aws_restJson1.js +0 -639
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -119
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -161
|
@@ -1,639 +0,0 @@
|
|
|
1
|
-
import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
2
|
-
import { requestBuilder as rb } from "@smithy/core";
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
-
import { v4 as generateIdempotencyToken } from "@smithy/uuid";
|
|
5
|
-
import { BraketServiceException as __BaseException } from "../models/BraketServiceException";
|
|
6
|
-
import { AccessDeniedException, ConflictException, DeviceOfflineException, DeviceRetiredException, InternalServiceException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
7
|
-
export const se_CancelJobCommand = async (input, context) => {
|
|
8
|
-
const b = rb(input, context);
|
|
9
|
-
const headers = {};
|
|
10
|
-
b.bp("/job/{jobArn}/cancel");
|
|
11
|
-
b.p("jobArn", () => input.jobArn, "{jobArn}", false);
|
|
12
|
-
let body;
|
|
13
|
-
b.m("PUT").h(headers).b(body);
|
|
14
|
-
return b.build();
|
|
15
|
-
};
|
|
16
|
-
export const se_CancelQuantumTaskCommand = async (input, context) => {
|
|
17
|
-
const b = rb(input, context);
|
|
18
|
-
const headers = {
|
|
19
|
-
"content-type": "application/json",
|
|
20
|
-
};
|
|
21
|
-
b.bp("/quantum-task/{quantumTaskArn}/cancel");
|
|
22
|
-
b.p("quantumTaskArn", () => input.quantumTaskArn, "{quantumTaskArn}", false);
|
|
23
|
-
let body;
|
|
24
|
-
body = JSON.stringify(take(input, {
|
|
25
|
-
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
26
|
-
}));
|
|
27
|
-
b.m("PUT").h(headers).b(body);
|
|
28
|
-
return b.build();
|
|
29
|
-
};
|
|
30
|
-
export const se_CreateJobCommand = async (input, context) => {
|
|
31
|
-
const b = rb(input, context);
|
|
32
|
-
const headers = {
|
|
33
|
-
"content-type": "application/json",
|
|
34
|
-
};
|
|
35
|
-
b.bp("/job");
|
|
36
|
-
let body;
|
|
37
|
-
body = JSON.stringify(take(input, {
|
|
38
|
-
algorithmSpecification: (_) => _json(_),
|
|
39
|
-
associations: (_) => _json(_),
|
|
40
|
-
checkpointConfig: (_) => _json(_),
|
|
41
|
-
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
42
|
-
deviceConfig: (_) => _json(_),
|
|
43
|
-
hyperParameters: (_) => _json(_),
|
|
44
|
-
inputDataConfig: (_) => _json(_),
|
|
45
|
-
instanceConfig: (_) => _json(_),
|
|
46
|
-
jobName: [],
|
|
47
|
-
outputDataConfig: (_) => _json(_),
|
|
48
|
-
roleArn: [],
|
|
49
|
-
stoppingCondition: (_) => _json(_),
|
|
50
|
-
tags: (_) => _json(_),
|
|
51
|
-
}));
|
|
52
|
-
b.m("POST").h(headers).b(body);
|
|
53
|
-
return b.build();
|
|
54
|
-
};
|
|
55
|
-
export const se_CreateQuantumTaskCommand = async (input, context) => {
|
|
56
|
-
const b = rb(input, context);
|
|
57
|
-
const headers = {
|
|
58
|
-
"content-type": "application/json",
|
|
59
|
-
};
|
|
60
|
-
b.bp("/quantum-task");
|
|
61
|
-
let body;
|
|
62
|
-
body = JSON.stringify(take(input, {
|
|
63
|
-
action: (_) => __LazyJsonString.from(_),
|
|
64
|
-
associations: (_) => _json(_),
|
|
65
|
-
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
66
|
-
deviceArn: [],
|
|
67
|
-
deviceParameters: (_) => __LazyJsonString.from(_),
|
|
68
|
-
experimentalCapabilities: (_) => _json(_),
|
|
69
|
-
jobToken: [],
|
|
70
|
-
outputS3Bucket: [],
|
|
71
|
-
outputS3KeyPrefix: [],
|
|
72
|
-
shots: [],
|
|
73
|
-
tags: (_) => _json(_),
|
|
74
|
-
}));
|
|
75
|
-
b.m("POST").h(headers).b(body);
|
|
76
|
-
return b.build();
|
|
77
|
-
};
|
|
78
|
-
export const se_GetDeviceCommand = async (input, context) => {
|
|
79
|
-
const b = rb(input, context);
|
|
80
|
-
const headers = {};
|
|
81
|
-
b.bp("/device/{deviceArn}");
|
|
82
|
-
b.p("deviceArn", () => input.deviceArn, "{deviceArn}", false);
|
|
83
|
-
let body;
|
|
84
|
-
b.m("GET").h(headers).b(body);
|
|
85
|
-
return b.build();
|
|
86
|
-
};
|
|
87
|
-
export const se_GetJobCommand = async (input, context) => {
|
|
88
|
-
const b = rb(input, context);
|
|
89
|
-
const headers = {};
|
|
90
|
-
b.bp("/job/{jobArn}");
|
|
91
|
-
b.p("jobArn", () => input.jobArn, "{jobArn}", false);
|
|
92
|
-
const query = map({
|
|
93
|
-
[_aAN]: [() => input.additionalAttributeNames !== void 0, () => input[_aAN] || []],
|
|
94
|
-
});
|
|
95
|
-
let body;
|
|
96
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
97
|
-
return b.build();
|
|
98
|
-
};
|
|
99
|
-
export const se_GetQuantumTaskCommand = async (input, context) => {
|
|
100
|
-
const b = rb(input, context);
|
|
101
|
-
const headers = {};
|
|
102
|
-
b.bp("/quantum-task/{quantumTaskArn}");
|
|
103
|
-
b.p("quantumTaskArn", () => input.quantumTaskArn, "{quantumTaskArn}", false);
|
|
104
|
-
const query = map({
|
|
105
|
-
[_aAN]: [() => input.additionalAttributeNames !== void 0, () => input[_aAN] || []],
|
|
106
|
-
});
|
|
107
|
-
let body;
|
|
108
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
109
|
-
return b.build();
|
|
110
|
-
};
|
|
111
|
-
export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
112
|
-
const b = rb(input, context);
|
|
113
|
-
const headers = {};
|
|
114
|
-
b.bp("/tags/{resourceArn}");
|
|
115
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
116
|
-
let body;
|
|
117
|
-
b.m("GET").h(headers).b(body);
|
|
118
|
-
return b.build();
|
|
119
|
-
};
|
|
120
|
-
export const se_SearchDevicesCommand = async (input, context) => {
|
|
121
|
-
const b = rb(input, context);
|
|
122
|
-
const headers = {
|
|
123
|
-
"content-type": "application/json",
|
|
124
|
-
};
|
|
125
|
-
b.bp("/devices");
|
|
126
|
-
let body;
|
|
127
|
-
body = JSON.stringify(take(input, {
|
|
128
|
-
filters: (_) => _json(_),
|
|
129
|
-
maxResults: [],
|
|
130
|
-
nextToken: [],
|
|
131
|
-
}));
|
|
132
|
-
b.m("POST").h(headers).b(body);
|
|
133
|
-
return b.build();
|
|
134
|
-
};
|
|
135
|
-
export const se_SearchJobsCommand = async (input, context) => {
|
|
136
|
-
const b = rb(input, context);
|
|
137
|
-
const headers = {
|
|
138
|
-
"content-type": "application/json",
|
|
139
|
-
};
|
|
140
|
-
b.bp("/jobs");
|
|
141
|
-
let body;
|
|
142
|
-
body = JSON.stringify(take(input, {
|
|
143
|
-
filters: (_) => _json(_),
|
|
144
|
-
maxResults: [],
|
|
145
|
-
nextToken: [],
|
|
146
|
-
}));
|
|
147
|
-
b.m("POST").h(headers).b(body);
|
|
148
|
-
return b.build();
|
|
149
|
-
};
|
|
150
|
-
export const se_SearchQuantumTasksCommand = async (input, context) => {
|
|
151
|
-
const b = rb(input, context);
|
|
152
|
-
const headers = {
|
|
153
|
-
"content-type": "application/json",
|
|
154
|
-
};
|
|
155
|
-
b.bp("/quantum-tasks");
|
|
156
|
-
let body;
|
|
157
|
-
body = JSON.stringify(take(input, {
|
|
158
|
-
filters: (_) => _json(_),
|
|
159
|
-
maxResults: [],
|
|
160
|
-
nextToken: [],
|
|
161
|
-
}));
|
|
162
|
-
b.m("POST").h(headers).b(body);
|
|
163
|
-
return b.build();
|
|
164
|
-
};
|
|
165
|
-
export const se_TagResourceCommand = async (input, context) => {
|
|
166
|
-
const b = rb(input, context);
|
|
167
|
-
const headers = {
|
|
168
|
-
"content-type": "application/json",
|
|
169
|
-
};
|
|
170
|
-
b.bp("/tags/{resourceArn}");
|
|
171
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
172
|
-
let body;
|
|
173
|
-
body = JSON.stringify(take(input, {
|
|
174
|
-
tags: (_) => _json(_),
|
|
175
|
-
}));
|
|
176
|
-
b.m("POST").h(headers).b(body);
|
|
177
|
-
return b.build();
|
|
178
|
-
};
|
|
179
|
-
export const se_UntagResourceCommand = async (input, context) => {
|
|
180
|
-
const b = rb(input, context);
|
|
181
|
-
const headers = {};
|
|
182
|
-
b.bp("/tags/{resourceArn}");
|
|
183
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
184
|
-
const query = map({
|
|
185
|
-
[_tK]: [__expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK] || []],
|
|
186
|
-
});
|
|
187
|
-
let body;
|
|
188
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
189
|
-
return b.build();
|
|
190
|
-
};
|
|
191
|
-
export const de_CancelJobCommand = async (output, context) => {
|
|
192
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
193
|
-
return de_CommandError(output, context);
|
|
194
|
-
}
|
|
195
|
-
const contents = map({
|
|
196
|
-
$metadata: deserializeMetadata(output),
|
|
197
|
-
});
|
|
198
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
199
|
-
const doc = take(data, {
|
|
200
|
-
cancellationStatus: __expectString,
|
|
201
|
-
jobArn: __expectString,
|
|
202
|
-
});
|
|
203
|
-
Object.assign(contents, doc);
|
|
204
|
-
return contents;
|
|
205
|
-
};
|
|
206
|
-
export const de_CancelQuantumTaskCommand = async (output, context) => {
|
|
207
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
208
|
-
return de_CommandError(output, context);
|
|
209
|
-
}
|
|
210
|
-
const contents = map({
|
|
211
|
-
$metadata: deserializeMetadata(output),
|
|
212
|
-
});
|
|
213
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
214
|
-
const doc = take(data, {
|
|
215
|
-
cancellationStatus: __expectString,
|
|
216
|
-
quantumTaskArn: __expectString,
|
|
217
|
-
});
|
|
218
|
-
Object.assign(contents, doc);
|
|
219
|
-
return contents;
|
|
220
|
-
};
|
|
221
|
-
export const de_CreateJobCommand = async (output, context) => {
|
|
222
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
223
|
-
return de_CommandError(output, context);
|
|
224
|
-
}
|
|
225
|
-
const contents = map({
|
|
226
|
-
$metadata: deserializeMetadata(output),
|
|
227
|
-
});
|
|
228
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
229
|
-
const doc = take(data, {
|
|
230
|
-
jobArn: __expectString,
|
|
231
|
-
});
|
|
232
|
-
Object.assign(contents, doc);
|
|
233
|
-
return contents;
|
|
234
|
-
};
|
|
235
|
-
export const de_CreateQuantumTaskCommand = async (output, context) => {
|
|
236
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
237
|
-
return de_CommandError(output, context);
|
|
238
|
-
}
|
|
239
|
-
const contents = map({
|
|
240
|
-
$metadata: deserializeMetadata(output),
|
|
241
|
-
});
|
|
242
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
243
|
-
const doc = take(data, {
|
|
244
|
-
quantumTaskArn: __expectString,
|
|
245
|
-
});
|
|
246
|
-
Object.assign(contents, doc);
|
|
247
|
-
return contents;
|
|
248
|
-
};
|
|
249
|
-
export const de_GetDeviceCommand = async (output, context) => {
|
|
250
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
251
|
-
return de_CommandError(output, context);
|
|
252
|
-
}
|
|
253
|
-
const contents = map({
|
|
254
|
-
$metadata: deserializeMetadata(output),
|
|
255
|
-
});
|
|
256
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
257
|
-
const doc = take(data, {
|
|
258
|
-
deviceArn: __expectString,
|
|
259
|
-
deviceCapabilities: __LazyJsonString.from,
|
|
260
|
-
deviceName: __expectString,
|
|
261
|
-
deviceQueueInfo: _json,
|
|
262
|
-
deviceStatus: __expectString,
|
|
263
|
-
deviceType: __expectString,
|
|
264
|
-
providerName: __expectString,
|
|
265
|
-
});
|
|
266
|
-
Object.assign(contents, doc);
|
|
267
|
-
return contents;
|
|
268
|
-
};
|
|
269
|
-
export const de_GetJobCommand = async (output, context) => {
|
|
270
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
271
|
-
return de_CommandError(output, context);
|
|
272
|
-
}
|
|
273
|
-
const contents = map({
|
|
274
|
-
$metadata: deserializeMetadata(output),
|
|
275
|
-
});
|
|
276
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
277
|
-
const doc = take(data, {
|
|
278
|
-
algorithmSpecification: _json,
|
|
279
|
-
associations: _json,
|
|
280
|
-
billableDuration: __expectInt32,
|
|
281
|
-
checkpointConfig: _json,
|
|
282
|
-
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
283
|
-
deviceConfig: _json,
|
|
284
|
-
endedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
285
|
-
events: (_) => de_JobEvents(_, context),
|
|
286
|
-
failureReason: __expectString,
|
|
287
|
-
hyperParameters: _json,
|
|
288
|
-
inputDataConfig: _json,
|
|
289
|
-
instanceConfig: _json,
|
|
290
|
-
jobArn: __expectString,
|
|
291
|
-
jobName: __expectString,
|
|
292
|
-
outputDataConfig: _json,
|
|
293
|
-
queueInfo: _json,
|
|
294
|
-
roleArn: __expectString,
|
|
295
|
-
startedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
296
|
-
status: __expectString,
|
|
297
|
-
stoppingCondition: _json,
|
|
298
|
-
tags: _json,
|
|
299
|
-
});
|
|
300
|
-
Object.assign(contents, doc);
|
|
301
|
-
return contents;
|
|
302
|
-
};
|
|
303
|
-
export const de_GetQuantumTaskCommand = async (output, context) => {
|
|
304
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
305
|
-
return de_CommandError(output, context);
|
|
306
|
-
}
|
|
307
|
-
const contents = map({
|
|
308
|
-
$metadata: deserializeMetadata(output),
|
|
309
|
-
});
|
|
310
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
311
|
-
const doc = take(data, {
|
|
312
|
-
actionMetadata: _json,
|
|
313
|
-
associations: _json,
|
|
314
|
-
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
315
|
-
deviceArn: __expectString,
|
|
316
|
-
deviceParameters: __LazyJsonString.from,
|
|
317
|
-
endedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
318
|
-
experimentalCapabilities: (_) => _json(__expectUnion(_)),
|
|
319
|
-
failureReason: __expectString,
|
|
320
|
-
jobArn: __expectString,
|
|
321
|
-
numSuccessfulShots: __expectLong,
|
|
322
|
-
outputS3Bucket: __expectString,
|
|
323
|
-
outputS3Directory: __expectString,
|
|
324
|
-
quantumTaskArn: __expectString,
|
|
325
|
-
queueInfo: _json,
|
|
326
|
-
shots: __expectLong,
|
|
327
|
-
status: __expectString,
|
|
328
|
-
tags: _json,
|
|
329
|
-
});
|
|
330
|
-
Object.assign(contents, doc);
|
|
331
|
-
return contents;
|
|
332
|
-
};
|
|
333
|
-
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
334
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
335
|
-
return de_CommandError(output, context);
|
|
336
|
-
}
|
|
337
|
-
const contents = map({
|
|
338
|
-
$metadata: deserializeMetadata(output),
|
|
339
|
-
});
|
|
340
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
341
|
-
const doc = take(data, {
|
|
342
|
-
tags: _json,
|
|
343
|
-
});
|
|
344
|
-
Object.assign(contents, doc);
|
|
345
|
-
return contents;
|
|
346
|
-
};
|
|
347
|
-
export const de_SearchDevicesCommand = async (output, context) => {
|
|
348
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
349
|
-
return de_CommandError(output, context);
|
|
350
|
-
}
|
|
351
|
-
const contents = map({
|
|
352
|
-
$metadata: deserializeMetadata(output),
|
|
353
|
-
});
|
|
354
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
355
|
-
const doc = take(data, {
|
|
356
|
-
devices: _json,
|
|
357
|
-
nextToken: __expectString,
|
|
358
|
-
});
|
|
359
|
-
Object.assign(contents, doc);
|
|
360
|
-
return contents;
|
|
361
|
-
};
|
|
362
|
-
export const de_SearchJobsCommand = async (output, context) => {
|
|
363
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
364
|
-
return de_CommandError(output, context);
|
|
365
|
-
}
|
|
366
|
-
const contents = map({
|
|
367
|
-
$metadata: deserializeMetadata(output),
|
|
368
|
-
});
|
|
369
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
370
|
-
const doc = take(data, {
|
|
371
|
-
jobs: (_) => de_JobSummaryList(_, context),
|
|
372
|
-
nextToken: __expectString,
|
|
373
|
-
});
|
|
374
|
-
Object.assign(contents, doc);
|
|
375
|
-
return contents;
|
|
376
|
-
};
|
|
377
|
-
export const de_SearchQuantumTasksCommand = async (output, context) => {
|
|
378
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
379
|
-
return de_CommandError(output, context);
|
|
380
|
-
}
|
|
381
|
-
const contents = map({
|
|
382
|
-
$metadata: deserializeMetadata(output),
|
|
383
|
-
});
|
|
384
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
385
|
-
const doc = take(data, {
|
|
386
|
-
nextToken: __expectString,
|
|
387
|
-
quantumTasks: (_) => de_QuantumTaskSummaryList(_, context),
|
|
388
|
-
});
|
|
389
|
-
Object.assign(contents, doc);
|
|
390
|
-
return contents;
|
|
391
|
-
};
|
|
392
|
-
export const de_TagResourceCommand = async (output, context) => {
|
|
393
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
394
|
-
return de_CommandError(output, context);
|
|
395
|
-
}
|
|
396
|
-
const contents = map({
|
|
397
|
-
$metadata: deserializeMetadata(output),
|
|
398
|
-
});
|
|
399
|
-
await collectBody(output.body, context);
|
|
400
|
-
return contents;
|
|
401
|
-
};
|
|
402
|
-
export const de_UntagResourceCommand = async (output, context) => {
|
|
403
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
404
|
-
return de_CommandError(output, context);
|
|
405
|
-
}
|
|
406
|
-
const contents = map({
|
|
407
|
-
$metadata: deserializeMetadata(output),
|
|
408
|
-
});
|
|
409
|
-
await collectBody(output.body, context);
|
|
410
|
-
return contents;
|
|
411
|
-
};
|
|
412
|
-
const de_CommandError = async (output, context) => {
|
|
413
|
-
const parsedOutput = {
|
|
414
|
-
...output,
|
|
415
|
-
body: await parseErrorBody(output.body, context),
|
|
416
|
-
};
|
|
417
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
418
|
-
switch (errorCode) {
|
|
419
|
-
case "AccessDeniedException":
|
|
420
|
-
case "com.amazonaws.braket#AccessDeniedException":
|
|
421
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
422
|
-
case "ConflictException":
|
|
423
|
-
case "com.amazonaws.braket#ConflictException":
|
|
424
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
425
|
-
case "InternalServiceException":
|
|
426
|
-
case "com.amazonaws.braket#InternalServiceException":
|
|
427
|
-
throw await de_InternalServiceExceptionRes(parsedOutput, context);
|
|
428
|
-
case "ResourceNotFoundException":
|
|
429
|
-
case "com.amazonaws.braket#ResourceNotFoundException":
|
|
430
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
431
|
-
case "ThrottlingException":
|
|
432
|
-
case "com.amazonaws.braket#ThrottlingException":
|
|
433
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
434
|
-
case "ValidationException":
|
|
435
|
-
case "com.amazonaws.braket#ValidationException":
|
|
436
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
437
|
-
case "DeviceOfflineException":
|
|
438
|
-
case "com.amazonaws.braket#DeviceOfflineException":
|
|
439
|
-
throw await de_DeviceOfflineExceptionRes(parsedOutput, context);
|
|
440
|
-
case "DeviceRetiredException":
|
|
441
|
-
case "com.amazonaws.braket#DeviceRetiredException":
|
|
442
|
-
throw await de_DeviceRetiredExceptionRes(parsedOutput, context);
|
|
443
|
-
case "ServiceQuotaExceededException":
|
|
444
|
-
case "com.amazonaws.braket#ServiceQuotaExceededException":
|
|
445
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
446
|
-
default:
|
|
447
|
-
const parsedBody = parsedOutput.body;
|
|
448
|
-
return throwDefaultError({
|
|
449
|
-
output,
|
|
450
|
-
parsedBody,
|
|
451
|
-
errorCode,
|
|
452
|
-
});
|
|
453
|
-
}
|
|
454
|
-
};
|
|
455
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
456
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
457
|
-
const contents = map({});
|
|
458
|
-
const data = parsedOutput.body;
|
|
459
|
-
const doc = take(data, {
|
|
460
|
-
message: __expectString,
|
|
461
|
-
});
|
|
462
|
-
Object.assign(contents, doc);
|
|
463
|
-
const exception = new AccessDeniedException({
|
|
464
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
465
|
-
...contents,
|
|
466
|
-
});
|
|
467
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
468
|
-
};
|
|
469
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
470
|
-
const contents = map({});
|
|
471
|
-
const data = parsedOutput.body;
|
|
472
|
-
const doc = take(data, {
|
|
473
|
-
message: __expectString,
|
|
474
|
-
});
|
|
475
|
-
Object.assign(contents, doc);
|
|
476
|
-
const exception = new ConflictException({
|
|
477
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
478
|
-
...contents,
|
|
479
|
-
});
|
|
480
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
481
|
-
};
|
|
482
|
-
const de_DeviceOfflineExceptionRes = async (parsedOutput, context) => {
|
|
483
|
-
const contents = map({});
|
|
484
|
-
const data = parsedOutput.body;
|
|
485
|
-
const doc = take(data, {
|
|
486
|
-
message: __expectString,
|
|
487
|
-
});
|
|
488
|
-
Object.assign(contents, doc);
|
|
489
|
-
const exception = new DeviceOfflineException({
|
|
490
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
491
|
-
...contents,
|
|
492
|
-
});
|
|
493
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
494
|
-
};
|
|
495
|
-
const de_DeviceRetiredExceptionRes = async (parsedOutput, context) => {
|
|
496
|
-
const contents = map({});
|
|
497
|
-
const data = parsedOutput.body;
|
|
498
|
-
const doc = take(data, {
|
|
499
|
-
message: __expectString,
|
|
500
|
-
});
|
|
501
|
-
Object.assign(contents, doc);
|
|
502
|
-
const exception = new DeviceRetiredException({
|
|
503
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
504
|
-
...contents,
|
|
505
|
-
});
|
|
506
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
507
|
-
};
|
|
508
|
-
const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
|
|
509
|
-
const contents = map({});
|
|
510
|
-
const data = parsedOutput.body;
|
|
511
|
-
const doc = take(data, {
|
|
512
|
-
message: __expectString,
|
|
513
|
-
});
|
|
514
|
-
Object.assign(contents, doc);
|
|
515
|
-
const exception = new InternalServiceException({
|
|
516
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
517
|
-
...contents,
|
|
518
|
-
});
|
|
519
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
520
|
-
};
|
|
521
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
522
|
-
const contents = map({});
|
|
523
|
-
const data = parsedOutput.body;
|
|
524
|
-
const doc = take(data, {
|
|
525
|
-
message: __expectString,
|
|
526
|
-
});
|
|
527
|
-
Object.assign(contents, doc);
|
|
528
|
-
const exception = new ResourceNotFoundException({
|
|
529
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
530
|
-
...contents,
|
|
531
|
-
});
|
|
532
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
533
|
-
};
|
|
534
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
535
|
-
const contents = map({});
|
|
536
|
-
const data = parsedOutput.body;
|
|
537
|
-
const doc = take(data, {
|
|
538
|
-
message: __expectString,
|
|
539
|
-
});
|
|
540
|
-
Object.assign(contents, doc);
|
|
541
|
-
const exception = new ServiceQuotaExceededException({
|
|
542
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
543
|
-
...contents,
|
|
544
|
-
});
|
|
545
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
546
|
-
};
|
|
547
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
548
|
-
const contents = map({});
|
|
549
|
-
const data = parsedOutput.body;
|
|
550
|
-
const doc = take(data, {
|
|
551
|
-
message: __expectString,
|
|
552
|
-
});
|
|
553
|
-
Object.assign(contents, doc);
|
|
554
|
-
const exception = new ThrottlingException({
|
|
555
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
556
|
-
...contents,
|
|
557
|
-
});
|
|
558
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
559
|
-
};
|
|
560
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
561
|
-
const contents = map({});
|
|
562
|
-
const data = parsedOutput.body;
|
|
563
|
-
const doc = take(data, {
|
|
564
|
-
message: __expectString,
|
|
565
|
-
programSetValidationFailures: _json,
|
|
566
|
-
reason: __expectString,
|
|
567
|
-
});
|
|
568
|
-
Object.assign(contents, doc);
|
|
569
|
-
const exception = new ValidationException({
|
|
570
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
571
|
-
...contents,
|
|
572
|
-
});
|
|
573
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
574
|
-
};
|
|
575
|
-
const de_JobEventDetails = (output, context) => {
|
|
576
|
-
return take(output, {
|
|
577
|
-
eventType: __expectString,
|
|
578
|
-
message: __expectString,
|
|
579
|
-
timeOfEvent: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
580
|
-
});
|
|
581
|
-
};
|
|
582
|
-
const de_JobEvents = (output, context) => {
|
|
583
|
-
const retVal = (output || [])
|
|
584
|
-
.filter((e) => e != null)
|
|
585
|
-
.map((entry) => {
|
|
586
|
-
return de_JobEventDetails(entry, context);
|
|
587
|
-
});
|
|
588
|
-
return retVal;
|
|
589
|
-
};
|
|
590
|
-
const de_JobSummary = (output, context) => {
|
|
591
|
-
return take(output, {
|
|
592
|
-
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
593
|
-
device: __expectString,
|
|
594
|
-
endedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
595
|
-
jobArn: __expectString,
|
|
596
|
-
jobName: __expectString,
|
|
597
|
-
startedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
598
|
-
status: __expectString,
|
|
599
|
-
tags: _json,
|
|
600
|
-
});
|
|
601
|
-
};
|
|
602
|
-
const de_JobSummaryList = (output, context) => {
|
|
603
|
-
const retVal = (output || [])
|
|
604
|
-
.filter((e) => e != null)
|
|
605
|
-
.map((entry) => {
|
|
606
|
-
return de_JobSummary(entry, context);
|
|
607
|
-
});
|
|
608
|
-
return retVal;
|
|
609
|
-
};
|
|
610
|
-
const de_QuantumTaskSummary = (output, context) => {
|
|
611
|
-
return take(output, {
|
|
612
|
-
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
613
|
-
deviceArn: __expectString,
|
|
614
|
-
endedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
615
|
-
outputS3Bucket: __expectString,
|
|
616
|
-
outputS3Directory: __expectString,
|
|
617
|
-
quantumTaskArn: __expectString,
|
|
618
|
-
shots: __expectLong,
|
|
619
|
-
status: __expectString,
|
|
620
|
-
tags: _json,
|
|
621
|
-
});
|
|
622
|
-
};
|
|
623
|
-
const de_QuantumTaskSummaryList = (output, context) => {
|
|
624
|
-
const retVal = (output || [])
|
|
625
|
-
.filter((e) => e != null)
|
|
626
|
-
.map((entry) => {
|
|
627
|
-
return de_QuantumTaskSummary(entry, context);
|
|
628
|
-
});
|
|
629
|
-
return retVal;
|
|
630
|
-
};
|
|
631
|
-
const deserializeMetadata = (output) => ({
|
|
632
|
-
httpStatusCode: output.statusCode,
|
|
633
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
634
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
635
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
636
|
-
});
|
|
637
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
638
|
-
const _aAN = "additionalAttributeNames";
|
|
639
|
-
const _tK = "tagKeys";
|