@aws-sdk/client-braket 3.186.0 → 3.188.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/CHANGELOG.md +8 -0
- package/dist-es/Braket.js +54 -61
- package/dist-es/BraketClient.js +22 -28
- package/dist-es/commands/CancelJobCommand.js +21 -28
- package/dist-es/commands/CancelQuantumTaskCommand.js +21 -28
- package/dist-es/commands/CreateJobCommand.js +21 -28
- package/dist-es/commands/CreateQuantumTaskCommand.js +21 -28
- package/dist-es/commands/GetDeviceCommand.js +21 -28
- package/dist-es/commands/GetJobCommand.js +21 -28
- package/dist-es/commands/GetQuantumTaskCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/SearchDevicesCommand.js +21 -28
- package/dist-es/commands/SearchJobsCommand.js +21 -28
- package/dist-es/commands/SearchQuantumTasksCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/BraketServiceException.js +5 -10
- package/dist-es/models/models_0.js +231 -144
- package/dist-es/pagination/SearchDevicesPaginator.js +25 -68
- package/dist-es/pagination/SearchJobsPaginator.js +25 -68
- package/dist-es/pagination/SearchQuantumTasksPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +1220 -1581
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,1582 +1,1237 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, map as __map, parseRfc3339DateTime as __parseRfc3339DateTime, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
4
|
import { BraketServiceException as __BaseException } from "../models/BraketServiceException";
|
|
6
5
|
import { AccessDeniedException, ConflictException, DeviceOfflineException, DeviceRetiredException, InternalServiceException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
method: "PUT",
|
|
22
|
-
headers: headers,
|
|
23
|
-
path: resolvedPath,
|
|
24
|
-
body: body,
|
|
25
|
-
})];
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
}); };
|
|
29
|
-
export var serializeAws_restJson1CancelQuantumTaskCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
30
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
31
|
-
var _c;
|
|
32
|
-
return __generator(this, function (_d) {
|
|
33
|
-
switch (_d.label) {
|
|
34
|
-
case 0: return [4, context.endpoint()];
|
|
35
|
-
case 1:
|
|
36
|
-
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
37
|
-
headers = {
|
|
38
|
-
"content-type": "application/json",
|
|
39
|
-
};
|
|
40
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/quantum-task/{quantumTaskArn}/cancel";
|
|
41
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "quantumTaskArn", function () { return input.quantumTaskArn; }, "{quantumTaskArn}", false);
|
|
42
|
-
body = JSON.stringify({
|
|
43
|
-
clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken(),
|
|
44
|
-
});
|
|
45
|
-
return [2, new __HttpRequest({
|
|
46
|
-
protocol: protocol,
|
|
47
|
-
hostname: hostname,
|
|
48
|
-
port: port,
|
|
49
|
-
method: "PUT",
|
|
50
|
-
headers: headers,
|
|
51
|
-
path: resolvedPath,
|
|
52
|
-
body: body,
|
|
53
|
-
})];
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
}); };
|
|
57
|
-
export var serializeAws_restJson1CreateJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
58
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
59
|
-
var _c;
|
|
60
|
-
return __generator(this, function (_d) {
|
|
61
|
-
switch (_d.label) {
|
|
62
|
-
case 0: return [4, context.endpoint()];
|
|
63
|
-
case 1:
|
|
64
|
-
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
65
|
-
headers = {
|
|
66
|
-
"content-type": "application/json",
|
|
67
|
-
};
|
|
68
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/job";
|
|
69
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.algorithmSpecification != null && {
|
|
70
|
-
algorithmSpecification: serializeAws_restJson1AlgorithmSpecification(input.algorithmSpecification, context),
|
|
71
|
-
})), (input.checkpointConfig != null && {
|
|
72
|
-
checkpointConfig: serializeAws_restJson1JobCheckpointConfig(input.checkpointConfig, context),
|
|
73
|
-
})), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.deviceConfig != null && {
|
|
74
|
-
deviceConfig: serializeAws_restJson1DeviceConfig(input.deviceConfig, context),
|
|
75
|
-
})), (input.hyperParameters != null && {
|
|
76
|
-
hyperParameters: serializeAws_restJson1HyperParameters(input.hyperParameters, context),
|
|
77
|
-
})), (input.inputDataConfig != null && {
|
|
78
|
-
inputDataConfig: serializeAws_restJson1InputConfigList(input.inputDataConfig, context),
|
|
79
|
-
})), (input.instanceConfig != null && {
|
|
80
|
-
instanceConfig: serializeAws_restJson1InstanceConfig(input.instanceConfig, context),
|
|
81
|
-
})), (input.jobName != null && { jobName: input.jobName })), (input.outputDataConfig != null && {
|
|
82
|
-
outputDataConfig: serializeAws_restJson1JobOutputDataConfig(input.outputDataConfig, context),
|
|
83
|
-
})), (input.roleArn != null && { roleArn: input.roleArn })), (input.stoppingCondition != null && {
|
|
84
|
-
stoppingCondition: serializeAws_restJson1JobStoppingCondition(input.stoppingCondition, context),
|
|
85
|
-
})), (input.tags != null && { tags: serializeAws_restJson1TagsMap(input.tags, context) })));
|
|
86
|
-
return [2, new __HttpRequest({
|
|
87
|
-
protocol: protocol,
|
|
88
|
-
hostname: hostname,
|
|
89
|
-
port: port,
|
|
90
|
-
method: "POST",
|
|
91
|
-
headers: headers,
|
|
92
|
-
path: resolvedPath,
|
|
93
|
-
body: body,
|
|
94
|
-
})];
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
}); };
|
|
98
|
-
export var serializeAws_restJson1CreateQuantumTaskCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
99
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
100
|
-
var _c;
|
|
101
|
-
return __generator(this, function (_d) {
|
|
102
|
-
switch (_d.label) {
|
|
103
|
-
case 0: return [4, context.endpoint()];
|
|
104
|
-
case 1:
|
|
105
|
-
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
106
|
-
headers = {
|
|
107
|
-
"content-type": "application/json",
|
|
108
|
-
};
|
|
109
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/quantum-task";
|
|
110
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.action != null && { action: __LazyJsonString.fromObject(input.action) })), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.deviceArn != null && { deviceArn: input.deviceArn })), (input.deviceParameters != null && { deviceParameters: __LazyJsonString.fromObject(input.deviceParameters) })), (input.jobToken != null && { jobToken: input.jobToken })), (input.outputS3Bucket != null && { outputS3Bucket: input.outputS3Bucket })), (input.outputS3KeyPrefix != null && { outputS3KeyPrefix: input.outputS3KeyPrefix })), (input.shots != null && { shots: input.shots })), (input.tags != null && { tags: serializeAws_restJson1TagsMap(input.tags, context) })));
|
|
111
|
-
return [2, new __HttpRequest({
|
|
112
|
-
protocol: protocol,
|
|
113
|
-
hostname: hostname,
|
|
114
|
-
port: port,
|
|
115
|
-
method: "POST",
|
|
116
|
-
headers: headers,
|
|
117
|
-
path: resolvedPath,
|
|
118
|
-
body: body,
|
|
119
|
-
})];
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
}); };
|
|
123
|
-
export var serializeAws_restJson1GetDeviceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
124
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
125
|
-
return __generator(this, function (_c) {
|
|
126
|
-
switch (_c.label) {
|
|
127
|
-
case 0: return [4, context.endpoint()];
|
|
128
|
-
case 1:
|
|
129
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
130
|
-
headers = {};
|
|
131
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/device/{deviceArn}";
|
|
132
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "deviceArn", function () { return input.deviceArn; }, "{deviceArn}", false);
|
|
133
|
-
return [2, new __HttpRequest({
|
|
134
|
-
protocol: protocol,
|
|
135
|
-
hostname: hostname,
|
|
136
|
-
port: port,
|
|
137
|
-
method: "GET",
|
|
138
|
-
headers: headers,
|
|
139
|
-
path: resolvedPath,
|
|
140
|
-
body: body,
|
|
141
|
-
})];
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
}); };
|
|
145
|
-
export var serializeAws_restJson1GetJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
146
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
147
|
-
return __generator(this, function (_c) {
|
|
148
|
-
switch (_c.label) {
|
|
149
|
-
case 0: return [4, context.endpoint()];
|
|
150
|
-
case 1:
|
|
151
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
152
|
-
headers = {};
|
|
153
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/job/{jobArn}";
|
|
154
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "jobArn", function () { return input.jobArn; }, "{jobArn}", false);
|
|
155
|
-
return [2, new __HttpRequest({
|
|
156
|
-
protocol: protocol,
|
|
157
|
-
hostname: hostname,
|
|
158
|
-
port: port,
|
|
159
|
-
method: "GET",
|
|
160
|
-
headers: headers,
|
|
161
|
-
path: resolvedPath,
|
|
162
|
-
body: body,
|
|
163
|
-
})];
|
|
164
|
-
}
|
|
6
|
+
export const serializeAws_restJson1CancelJobCommand = async (input, context) => {
|
|
7
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
|
+
const headers = {};
|
|
9
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/job/{jobArn}/cancel";
|
|
10
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "jobArn", () => input.jobArn, "{jobArn}", false);
|
|
11
|
+
let body;
|
|
12
|
+
return new __HttpRequest({
|
|
13
|
+
protocol,
|
|
14
|
+
hostname,
|
|
15
|
+
port,
|
|
16
|
+
method: "PUT",
|
|
17
|
+
headers,
|
|
18
|
+
path: resolvedPath,
|
|
19
|
+
body,
|
|
165
20
|
});
|
|
166
|
-
}
|
|
167
|
-
export
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
return [2, new __HttpRequest({
|
|
178
|
-
protocol: protocol,
|
|
179
|
-
hostname: hostname,
|
|
180
|
-
port: port,
|
|
181
|
-
method: "GET",
|
|
182
|
-
headers: headers,
|
|
183
|
-
path: resolvedPath,
|
|
184
|
-
body: body,
|
|
185
|
-
})];
|
|
186
|
-
}
|
|
21
|
+
};
|
|
22
|
+
export const serializeAws_restJson1CancelQuantumTaskCommand = async (input, context) => {
|
|
23
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
24
|
+
const headers = {
|
|
25
|
+
"content-type": "application/json",
|
|
26
|
+
};
|
|
27
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quantum-task/{quantumTaskArn}/cancel";
|
|
28
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "quantumTaskArn", () => input.quantumTaskArn, "{quantumTaskArn}", false);
|
|
29
|
+
let body;
|
|
30
|
+
body = JSON.stringify({
|
|
31
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
187
32
|
});
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
headers = {};
|
|
197
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
|
|
198
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
|
|
199
|
-
return [2, new __HttpRequest({
|
|
200
|
-
protocol: protocol,
|
|
201
|
-
hostname: hostname,
|
|
202
|
-
port: port,
|
|
203
|
-
method: "GET",
|
|
204
|
-
headers: headers,
|
|
205
|
-
path: resolvedPath,
|
|
206
|
-
body: body,
|
|
207
|
-
})];
|
|
208
|
-
}
|
|
33
|
+
return new __HttpRequest({
|
|
34
|
+
protocol,
|
|
35
|
+
hostname,
|
|
36
|
+
port,
|
|
37
|
+
method: "PUT",
|
|
38
|
+
headers,
|
|
39
|
+
path: resolvedPath,
|
|
40
|
+
body,
|
|
209
41
|
});
|
|
210
|
-
}
|
|
211
|
-
export
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
42
|
+
};
|
|
43
|
+
export const serializeAws_restJson1CreateJobCommand = async (input, context) => {
|
|
44
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
45
|
+
const headers = {
|
|
46
|
+
"content-type": "application/json",
|
|
47
|
+
};
|
|
48
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/job";
|
|
49
|
+
let body;
|
|
50
|
+
body = JSON.stringify({
|
|
51
|
+
...(input.algorithmSpecification != null && {
|
|
52
|
+
algorithmSpecification: serializeAws_restJson1AlgorithmSpecification(input.algorithmSpecification, context),
|
|
53
|
+
}),
|
|
54
|
+
...(input.checkpointConfig != null && {
|
|
55
|
+
checkpointConfig: serializeAws_restJson1JobCheckpointConfig(input.checkpointConfig, context),
|
|
56
|
+
}),
|
|
57
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
58
|
+
...(input.deviceConfig != null && {
|
|
59
|
+
deviceConfig: serializeAws_restJson1DeviceConfig(input.deviceConfig, context),
|
|
60
|
+
}),
|
|
61
|
+
...(input.hyperParameters != null && {
|
|
62
|
+
hyperParameters: serializeAws_restJson1HyperParameters(input.hyperParameters, context),
|
|
63
|
+
}),
|
|
64
|
+
...(input.inputDataConfig != null && {
|
|
65
|
+
inputDataConfig: serializeAws_restJson1InputConfigList(input.inputDataConfig, context),
|
|
66
|
+
}),
|
|
67
|
+
...(input.instanceConfig != null && {
|
|
68
|
+
instanceConfig: serializeAws_restJson1InstanceConfig(input.instanceConfig, context),
|
|
69
|
+
}),
|
|
70
|
+
...(input.jobName != null && { jobName: input.jobName }),
|
|
71
|
+
...(input.outputDataConfig != null && {
|
|
72
|
+
outputDataConfig: serializeAws_restJson1JobOutputDataConfig(input.outputDataConfig, context),
|
|
73
|
+
}),
|
|
74
|
+
...(input.roleArn != null && { roleArn: input.roleArn }),
|
|
75
|
+
...(input.stoppingCondition != null && {
|
|
76
|
+
stoppingCondition: serializeAws_restJson1JobStoppingCondition(input.stoppingCondition, context),
|
|
77
|
+
}),
|
|
78
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagsMap(input.tags, context) }),
|
|
233
79
|
});
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
headers = {
|
|
243
|
-
"content-type": "application/json",
|
|
244
|
-
};
|
|
245
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/jobs";
|
|
246
|
-
body = JSON.stringify(__assign(__assign(__assign({}, (input.filters != null && { filters: serializeAws_restJson1SearchJobsFilterList(input.filters, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })));
|
|
247
|
-
return [2, new __HttpRequest({
|
|
248
|
-
protocol: protocol,
|
|
249
|
-
hostname: hostname,
|
|
250
|
-
port: port,
|
|
251
|
-
method: "POST",
|
|
252
|
-
headers: headers,
|
|
253
|
-
path: resolvedPath,
|
|
254
|
-
body: body,
|
|
255
|
-
})];
|
|
256
|
-
}
|
|
80
|
+
return new __HttpRequest({
|
|
81
|
+
protocol,
|
|
82
|
+
hostname,
|
|
83
|
+
port,
|
|
84
|
+
method: "POST",
|
|
85
|
+
headers,
|
|
86
|
+
path: resolvedPath,
|
|
87
|
+
body,
|
|
257
88
|
});
|
|
258
|
-
}
|
|
259
|
-
export
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
port: port,
|
|
277
|
-
method: "POST",
|
|
278
|
-
headers: headers,
|
|
279
|
-
path: resolvedPath,
|
|
280
|
-
body: body,
|
|
281
|
-
})];
|
|
282
|
-
}
|
|
89
|
+
};
|
|
90
|
+
export const serializeAws_restJson1CreateQuantumTaskCommand = async (input, context) => {
|
|
91
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
92
|
+
const headers = {
|
|
93
|
+
"content-type": "application/json",
|
|
94
|
+
};
|
|
95
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quantum-task";
|
|
96
|
+
let body;
|
|
97
|
+
body = JSON.stringify({
|
|
98
|
+
...(input.action != null && { action: __LazyJsonString.fromObject(input.action) }),
|
|
99
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
100
|
+
...(input.deviceArn != null && { deviceArn: input.deviceArn }),
|
|
101
|
+
...(input.deviceParameters != null && { deviceParameters: __LazyJsonString.fromObject(input.deviceParameters) }),
|
|
102
|
+
...(input.jobToken != null && { jobToken: input.jobToken }),
|
|
103
|
+
...(input.outputS3Bucket != null && { outputS3Bucket: input.outputS3Bucket }),
|
|
104
|
+
...(input.outputS3KeyPrefix != null && { outputS3KeyPrefix: input.outputS3KeyPrefix }),
|
|
105
|
+
...(input.shots != null && { shots: input.shots }),
|
|
106
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagsMap(input.tags, context) }),
|
|
283
107
|
});
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
headers = {
|
|
293
|
-
"content-type": "application/json",
|
|
294
|
-
};
|
|
295
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
|
|
296
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
|
|
297
|
-
body = JSON.stringify(__assign({}, (input.tags != null && { tags: serializeAws_restJson1TagsMap(input.tags, context) })));
|
|
298
|
-
return [2, new __HttpRequest({
|
|
299
|
-
protocol: protocol,
|
|
300
|
-
hostname: hostname,
|
|
301
|
-
port: port,
|
|
302
|
-
method: "POST",
|
|
303
|
-
headers: headers,
|
|
304
|
-
path: resolvedPath,
|
|
305
|
-
body: body,
|
|
306
|
-
})];
|
|
307
|
-
}
|
|
108
|
+
return new __HttpRequest({
|
|
109
|
+
protocol,
|
|
110
|
+
hostname,
|
|
111
|
+
port,
|
|
112
|
+
method: "POST",
|
|
113
|
+
headers,
|
|
114
|
+
path: resolvedPath,
|
|
115
|
+
body,
|
|
308
116
|
});
|
|
309
|
-
}
|
|
310
|
-
export
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
protocol: protocol,
|
|
325
|
-
hostname: hostname,
|
|
326
|
-
port: port,
|
|
327
|
-
method: "DELETE",
|
|
328
|
-
headers: headers,
|
|
329
|
-
path: resolvedPath,
|
|
330
|
-
query: query,
|
|
331
|
-
body: body,
|
|
332
|
-
})];
|
|
333
|
-
}
|
|
117
|
+
};
|
|
118
|
+
export const serializeAws_restJson1GetDeviceCommand = async (input, context) => {
|
|
119
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
120
|
+
const headers = {};
|
|
121
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/device/{deviceArn}";
|
|
122
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "deviceArn", () => input.deviceArn, "{deviceArn}", false);
|
|
123
|
+
let body;
|
|
124
|
+
return new __HttpRequest({
|
|
125
|
+
protocol,
|
|
126
|
+
hostname,
|
|
127
|
+
port,
|
|
128
|
+
method: "GET",
|
|
129
|
+
headers,
|
|
130
|
+
path: resolvedPath,
|
|
131
|
+
body,
|
|
334
132
|
});
|
|
335
|
-
}
|
|
336
|
-
export
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
case 1:
|
|
351
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
352
|
-
if (data.cancellationStatus != null) {
|
|
353
|
-
contents.cancellationStatus = __expectString(data.cancellationStatus);
|
|
354
|
-
}
|
|
355
|
-
if (data.jobArn != null) {
|
|
356
|
-
contents.jobArn = __expectString(data.jobArn);
|
|
357
|
-
}
|
|
358
|
-
return [2, contents];
|
|
359
|
-
}
|
|
133
|
+
};
|
|
134
|
+
export const serializeAws_restJson1GetJobCommand = async (input, context) => {
|
|
135
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
136
|
+
const headers = {};
|
|
137
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/job/{jobArn}";
|
|
138
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "jobArn", () => input.jobArn, "{jobArn}", false);
|
|
139
|
+
let body;
|
|
140
|
+
return new __HttpRequest({
|
|
141
|
+
protocol,
|
|
142
|
+
hostname,
|
|
143
|
+
port,
|
|
144
|
+
method: "GET",
|
|
145
|
+
headers,
|
|
146
|
+
path: resolvedPath,
|
|
147
|
+
body,
|
|
360
148
|
});
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
case "AccessDeniedException": return [3, 2];
|
|
377
|
-
case "com.amazonaws.braket#AccessDeniedException": return [3, 2];
|
|
378
|
-
case "ConflictException": return [3, 4];
|
|
379
|
-
case "com.amazonaws.braket#ConflictException": return [3, 4];
|
|
380
|
-
case "InternalServiceException": return [3, 6];
|
|
381
|
-
case "com.amazonaws.braket#InternalServiceException": return [3, 6];
|
|
382
|
-
case "ResourceNotFoundException": return [3, 8];
|
|
383
|
-
case "com.amazonaws.braket#ResourceNotFoundException": return [3, 8];
|
|
384
|
-
case "ThrottlingException": return [3, 10];
|
|
385
|
-
case "com.amazonaws.braket#ThrottlingException": return [3, 10];
|
|
386
|
-
case "ValidationException": return [3, 12];
|
|
387
|
-
case "com.amazonaws.braket#ValidationException": return [3, 12];
|
|
388
|
-
}
|
|
389
|
-
return [3, 14];
|
|
390
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
391
|
-
case 3: throw _d.sent();
|
|
392
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
393
|
-
case 5: throw _d.sent();
|
|
394
|
-
case 6: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
395
|
-
case 7: throw _d.sent();
|
|
396
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
397
|
-
case 9: throw _d.sent();
|
|
398
|
-
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
399
|
-
case 11: throw _d.sent();
|
|
400
|
-
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
401
|
-
case 13: throw _d.sent();
|
|
402
|
-
case 14:
|
|
403
|
-
parsedBody = parsedOutput.body;
|
|
404
|
-
throwDefaultError({
|
|
405
|
-
output: output,
|
|
406
|
-
parsedBody: parsedBody,
|
|
407
|
-
exceptionCtor: __BaseException,
|
|
408
|
-
errorCode: errorCode,
|
|
409
|
-
});
|
|
410
|
-
_d.label = 15;
|
|
411
|
-
case 15: return [2];
|
|
412
|
-
}
|
|
149
|
+
};
|
|
150
|
+
export const serializeAws_restJson1GetQuantumTaskCommand = async (input, context) => {
|
|
151
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
152
|
+
const headers = {};
|
|
153
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quantum-task/{quantumTaskArn}";
|
|
154
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "quantumTaskArn", () => input.quantumTaskArn, "{quantumTaskArn}", false);
|
|
155
|
+
let body;
|
|
156
|
+
return new __HttpRequest({
|
|
157
|
+
protocol,
|
|
158
|
+
hostname,
|
|
159
|
+
port,
|
|
160
|
+
method: "GET",
|
|
161
|
+
headers,
|
|
162
|
+
path: resolvedPath,
|
|
163
|
+
body,
|
|
413
164
|
});
|
|
414
|
-
}
|
|
415
|
-
export
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
case 1:
|
|
430
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
431
|
-
if (data.cancellationStatus != null) {
|
|
432
|
-
contents.cancellationStatus = __expectString(data.cancellationStatus);
|
|
433
|
-
}
|
|
434
|
-
if (data.quantumTaskArn != null) {
|
|
435
|
-
contents.quantumTaskArn = __expectString(data.quantumTaskArn);
|
|
436
|
-
}
|
|
437
|
-
return [2, contents];
|
|
438
|
-
}
|
|
165
|
+
};
|
|
166
|
+
export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
167
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
168
|
+
const headers = {};
|
|
169
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
170
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
171
|
+
let body;
|
|
172
|
+
return new __HttpRequest({
|
|
173
|
+
protocol,
|
|
174
|
+
hostname,
|
|
175
|
+
port,
|
|
176
|
+
method: "GET",
|
|
177
|
+
headers,
|
|
178
|
+
path: resolvedPath,
|
|
179
|
+
body,
|
|
439
180
|
});
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
453
|
-
_b = errorCode;
|
|
454
|
-
switch (_b) {
|
|
455
|
-
case "AccessDeniedException": return [3, 2];
|
|
456
|
-
case "com.amazonaws.braket#AccessDeniedException": return [3, 2];
|
|
457
|
-
case "ConflictException": return [3, 4];
|
|
458
|
-
case "com.amazonaws.braket#ConflictException": return [3, 4];
|
|
459
|
-
case "InternalServiceException": return [3, 6];
|
|
460
|
-
case "com.amazonaws.braket#InternalServiceException": return [3, 6];
|
|
461
|
-
case "ResourceNotFoundException": return [3, 8];
|
|
462
|
-
case "com.amazonaws.braket#ResourceNotFoundException": return [3, 8];
|
|
463
|
-
case "ThrottlingException": return [3, 10];
|
|
464
|
-
case "com.amazonaws.braket#ThrottlingException": return [3, 10];
|
|
465
|
-
case "ValidationException": return [3, 12];
|
|
466
|
-
case "com.amazonaws.braket#ValidationException": return [3, 12];
|
|
467
|
-
}
|
|
468
|
-
return [3, 14];
|
|
469
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
470
|
-
case 3: throw _d.sent();
|
|
471
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
472
|
-
case 5: throw _d.sent();
|
|
473
|
-
case 6: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
474
|
-
case 7: throw _d.sent();
|
|
475
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
476
|
-
case 9: throw _d.sent();
|
|
477
|
-
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
478
|
-
case 11: throw _d.sent();
|
|
479
|
-
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
480
|
-
case 13: throw _d.sent();
|
|
481
|
-
case 14:
|
|
482
|
-
parsedBody = parsedOutput.body;
|
|
483
|
-
throwDefaultError({
|
|
484
|
-
output: output,
|
|
485
|
-
parsedBody: parsedBody,
|
|
486
|
-
exceptionCtor: __BaseException,
|
|
487
|
-
errorCode: errorCode,
|
|
488
|
-
});
|
|
489
|
-
_d.label = 15;
|
|
490
|
-
case 15: return [2];
|
|
491
|
-
}
|
|
181
|
+
};
|
|
182
|
+
export const serializeAws_restJson1SearchDevicesCommand = async (input, context) => {
|
|
183
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
184
|
+
const headers = {
|
|
185
|
+
"content-type": "application/json",
|
|
186
|
+
};
|
|
187
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/devices";
|
|
188
|
+
let body;
|
|
189
|
+
body = JSON.stringify({
|
|
190
|
+
...(input.filters != null && { filters: serializeAws_restJson1SearchDevicesFilterList(input.filters, context) }),
|
|
191
|
+
...(input.maxResults != null && { maxResults: input.maxResults }),
|
|
192
|
+
...(input.nextToken != null && { nextToken: input.nextToken }),
|
|
492
193
|
});
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
}
|
|
502
|
-
contents = map({
|
|
503
|
-
$metadata: deserializeMetadata(output),
|
|
504
|
-
});
|
|
505
|
-
_a = __expectNonNull;
|
|
506
|
-
_b = __expectObject;
|
|
507
|
-
return [4, parseBody(output.body, context)];
|
|
508
|
-
case 1:
|
|
509
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
510
|
-
if (data.jobArn != null) {
|
|
511
|
-
contents.jobArn = __expectString(data.jobArn);
|
|
512
|
-
}
|
|
513
|
-
return [2, contents];
|
|
514
|
-
}
|
|
194
|
+
return new __HttpRequest({
|
|
195
|
+
protocol,
|
|
196
|
+
hostname,
|
|
197
|
+
port,
|
|
198
|
+
method: "POST",
|
|
199
|
+
headers,
|
|
200
|
+
path: resolvedPath,
|
|
201
|
+
body,
|
|
515
202
|
});
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
529
|
-
_b = errorCode;
|
|
530
|
-
switch (_b) {
|
|
531
|
-
case "AccessDeniedException": return [3, 2];
|
|
532
|
-
case "com.amazonaws.braket#AccessDeniedException": return [3, 2];
|
|
533
|
-
case "ConflictException": return [3, 4];
|
|
534
|
-
case "com.amazonaws.braket#ConflictException": return [3, 4];
|
|
535
|
-
case "DeviceRetiredException": return [3, 6];
|
|
536
|
-
case "com.amazonaws.braket#DeviceRetiredException": return [3, 6];
|
|
537
|
-
case "InternalServiceException": return [3, 8];
|
|
538
|
-
case "com.amazonaws.braket#InternalServiceException": return [3, 8];
|
|
539
|
-
case "ServiceQuotaExceededException": return [3, 10];
|
|
540
|
-
case "com.amazonaws.braket#ServiceQuotaExceededException": return [3, 10];
|
|
541
|
-
case "ThrottlingException": return [3, 12];
|
|
542
|
-
case "com.amazonaws.braket#ThrottlingException": return [3, 12];
|
|
543
|
-
case "ValidationException": return [3, 14];
|
|
544
|
-
case "com.amazonaws.braket#ValidationException": return [3, 14];
|
|
545
|
-
}
|
|
546
|
-
return [3, 16];
|
|
547
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
548
|
-
case 3: throw _d.sent();
|
|
549
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
550
|
-
case 5: throw _d.sent();
|
|
551
|
-
case 6: return [4, deserializeAws_restJson1DeviceRetiredExceptionResponse(parsedOutput, context)];
|
|
552
|
-
case 7: throw _d.sent();
|
|
553
|
-
case 8: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
554
|
-
case 9: throw _d.sent();
|
|
555
|
-
case 10: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
556
|
-
case 11: throw _d.sent();
|
|
557
|
-
case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
558
|
-
case 13: throw _d.sent();
|
|
559
|
-
case 14: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
560
|
-
case 15: throw _d.sent();
|
|
561
|
-
case 16:
|
|
562
|
-
parsedBody = parsedOutput.body;
|
|
563
|
-
throwDefaultError({
|
|
564
|
-
output: output,
|
|
565
|
-
parsedBody: parsedBody,
|
|
566
|
-
exceptionCtor: __BaseException,
|
|
567
|
-
errorCode: errorCode,
|
|
568
|
-
});
|
|
569
|
-
_d.label = 17;
|
|
570
|
-
case 17: return [2];
|
|
571
|
-
}
|
|
203
|
+
};
|
|
204
|
+
export const serializeAws_restJson1SearchJobsCommand = async (input, context) => {
|
|
205
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
206
|
+
const headers = {
|
|
207
|
+
"content-type": "application/json",
|
|
208
|
+
};
|
|
209
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobs";
|
|
210
|
+
let body;
|
|
211
|
+
body = JSON.stringify({
|
|
212
|
+
...(input.filters != null && { filters: serializeAws_restJson1SearchJobsFilterList(input.filters, context) }),
|
|
213
|
+
...(input.maxResults != null && { maxResults: input.maxResults }),
|
|
214
|
+
...(input.nextToken != null && { nextToken: input.nextToken }),
|
|
572
215
|
});
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
}
|
|
582
|
-
contents = map({
|
|
583
|
-
$metadata: deserializeMetadata(output),
|
|
584
|
-
});
|
|
585
|
-
_a = __expectNonNull;
|
|
586
|
-
_b = __expectObject;
|
|
587
|
-
return [4, parseBody(output.body, context)];
|
|
588
|
-
case 1:
|
|
589
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
590
|
-
if (data.quantumTaskArn != null) {
|
|
591
|
-
contents.quantumTaskArn = __expectString(data.quantumTaskArn);
|
|
592
|
-
}
|
|
593
|
-
return [2, contents];
|
|
594
|
-
}
|
|
216
|
+
return new __HttpRequest({
|
|
217
|
+
protocol,
|
|
218
|
+
hostname,
|
|
219
|
+
port,
|
|
220
|
+
method: "POST",
|
|
221
|
+
headers,
|
|
222
|
+
path: resolvedPath,
|
|
223
|
+
body,
|
|
595
224
|
});
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
switch (_b) {
|
|
611
|
-
case "AccessDeniedException": return [3, 2];
|
|
612
|
-
case "com.amazonaws.braket#AccessDeniedException": return [3, 2];
|
|
613
|
-
case "DeviceOfflineException": return [3, 4];
|
|
614
|
-
case "com.amazonaws.braket#DeviceOfflineException": return [3, 4];
|
|
615
|
-
case "DeviceRetiredException": return [3, 6];
|
|
616
|
-
case "com.amazonaws.braket#DeviceRetiredException": return [3, 6];
|
|
617
|
-
case "InternalServiceException": return [3, 8];
|
|
618
|
-
case "com.amazonaws.braket#InternalServiceException": return [3, 8];
|
|
619
|
-
case "ServiceQuotaExceededException": return [3, 10];
|
|
620
|
-
case "com.amazonaws.braket#ServiceQuotaExceededException": return [3, 10];
|
|
621
|
-
case "ThrottlingException": return [3, 12];
|
|
622
|
-
case "com.amazonaws.braket#ThrottlingException": return [3, 12];
|
|
623
|
-
case "ValidationException": return [3, 14];
|
|
624
|
-
case "com.amazonaws.braket#ValidationException": return [3, 14];
|
|
625
|
-
}
|
|
626
|
-
return [3, 16];
|
|
627
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
628
|
-
case 3: throw _d.sent();
|
|
629
|
-
case 4: return [4, deserializeAws_restJson1DeviceOfflineExceptionResponse(parsedOutput, context)];
|
|
630
|
-
case 5: throw _d.sent();
|
|
631
|
-
case 6: return [4, deserializeAws_restJson1DeviceRetiredExceptionResponse(parsedOutput, context)];
|
|
632
|
-
case 7: throw _d.sent();
|
|
633
|
-
case 8: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
634
|
-
case 9: throw _d.sent();
|
|
635
|
-
case 10: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
636
|
-
case 11: throw _d.sent();
|
|
637
|
-
case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
638
|
-
case 13: throw _d.sent();
|
|
639
|
-
case 14: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
640
|
-
case 15: throw _d.sent();
|
|
641
|
-
case 16:
|
|
642
|
-
parsedBody = parsedOutput.body;
|
|
643
|
-
throwDefaultError({
|
|
644
|
-
output: output,
|
|
645
|
-
parsedBody: parsedBody,
|
|
646
|
-
exceptionCtor: __BaseException,
|
|
647
|
-
errorCode: errorCode,
|
|
648
|
-
});
|
|
649
|
-
_d.label = 17;
|
|
650
|
-
case 17: return [2];
|
|
651
|
-
}
|
|
225
|
+
};
|
|
226
|
+
export const serializeAws_restJson1SearchQuantumTasksCommand = async (input, context) => {
|
|
227
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
228
|
+
const headers = {
|
|
229
|
+
"content-type": "application/json",
|
|
230
|
+
};
|
|
231
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quantum-tasks";
|
|
232
|
+
let body;
|
|
233
|
+
body = JSON.stringify({
|
|
234
|
+
...(input.filters != null && {
|
|
235
|
+
filters: serializeAws_restJson1SearchQuantumTasksFilterList(input.filters, context),
|
|
236
|
+
}),
|
|
237
|
+
...(input.maxResults != null && { maxResults: input.maxResults }),
|
|
238
|
+
...(input.nextToken != null && { nextToken: input.nextToken }),
|
|
652
239
|
});
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
}
|
|
662
|
-
contents = map({
|
|
663
|
-
$metadata: deserializeMetadata(output),
|
|
664
|
-
});
|
|
665
|
-
_a = __expectNonNull;
|
|
666
|
-
_b = __expectObject;
|
|
667
|
-
return [4, parseBody(output.body, context)];
|
|
668
|
-
case 1:
|
|
669
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
670
|
-
if (data.deviceArn != null) {
|
|
671
|
-
contents.deviceArn = __expectString(data.deviceArn);
|
|
672
|
-
}
|
|
673
|
-
if (data.deviceCapabilities != null) {
|
|
674
|
-
contents.deviceCapabilities = new __LazyJsonString(data.deviceCapabilities);
|
|
675
|
-
}
|
|
676
|
-
if (data.deviceName != null) {
|
|
677
|
-
contents.deviceName = __expectString(data.deviceName);
|
|
678
|
-
}
|
|
679
|
-
if (data.deviceStatus != null) {
|
|
680
|
-
contents.deviceStatus = __expectString(data.deviceStatus);
|
|
681
|
-
}
|
|
682
|
-
if (data.deviceType != null) {
|
|
683
|
-
contents.deviceType = __expectString(data.deviceType);
|
|
684
|
-
}
|
|
685
|
-
if (data.providerName != null) {
|
|
686
|
-
contents.providerName = __expectString(data.providerName);
|
|
687
|
-
}
|
|
688
|
-
return [2, contents];
|
|
689
|
-
}
|
|
240
|
+
return new __HttpRequest({
|
|
241
|
+
protocol,
|
|
242
|
+
hostname,
|
|
243
|
+
port,
|
|
244
|
+
method: "POST",
|
|
245
|
+
headers,
|
|
246
|
+
path: resolvedPath,
|
|
247
|
+
body,
|
|
690
248
|
});
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
703
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
704
|
-
_b = errorCode;
|
|
705
|
-
switch (_b) {
|
|
706
|
-
case "AccessDeniedException": return [3, 2];
|
|
707
|
-
case "com.amazonaws.braket#AccessDeniedException": return [3, 2];
|
|
708
|
-
case "InternalServiceException": return [3, 4];
|
|
709
|
-
case "com.amazonaws.braket#InternalServiceException": return [3, 4];
|
|
710
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
711
|
-
case "com.amazonaws.braket#ResourceNotFoundException": return [3, 6];
|
|
712
|
-
case "ThrottlingException": return [3, 8];
|
|
713
|
-
case "com.amazonaws.braket#ThrottlingException": return [3, 8];
|
|
714
|
-
case "ValidationException": return [3, 10];
|
|
715
|
-
case "com.amazonaws.braket#ValidationException": return [3, 10];
|
|
716
|
-
}
|
|
717
|
-
return [3, 12];
|
|
718
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
719
|
-
case 3: throw _d.sent();
|
|
720
|
-
case 4: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
721
|
-
case 5: throw _d.sent();
|
|
722
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
723
|
-
case 7: throw _d.sent();
|
|
724
|
-
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
725
|
-
case 9: throw _d.sent();
|
|
726
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
727
|
-
case 11: throw _d.sent();
|
|
728
|
-
case 12:
|
|
729
|
-
parsedBody = parsedOutput.body;
|
|
730
|
-
throwDefaultError({
|
|
731
|
-
output: output,
|
|
732
|
-
parsedBody: parsedBody,
|
|
733
|
-
exceptionCtor: __BaseException,
|
|
734
|
-
errorCode: errorCode,
|
|
735
|
-
});
|
|
736
|
-
_d.label = 13;
|
|
737
|
-
case 13: return [2];
|
|
738
|
-
}
|
|
249
|
+
};
|
|
250
|
+
export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
251
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
252
|
+
const headers = {
|
|
253
|
+
"content-type": "application/json",
|
|
254
|
+
};
|
|
255
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
256
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
257
|
+
let body;
|
|
258
|
+
body = JSON.stringify({
|
|
259
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagsMap(input.tags, context) }),
|
|
739
260
|
});
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
}
|
|
749
|
-
contents = map({
|
|
750
|
-
$metadata: deserializeMetadata(output),
|
|
751
|
-
});
|
|
752
|
-
_a = __expectNonNull;
|
|
753
|
-
_b = __expectObject;
|
|
754
|
-
return [4, parseBody(output.body, context)];
|
|
755
|
-
case 1:
|
|
756
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
757
|
-
if (data.algorithmSpecification != null) {
|
|
758
|
-
contents.algorithmSpecification = deserializeAws_restJson1AlgorithmSpecification(data.algorithmSpecification, context);
|
|
759
|
-
}
|
|
760
|
-
if (data.billableDuration != null) {
|
|
761
|
-
contents.billableDuration = __expectInt32(data.billableDuration);
|
|
762
|
-
}
|
|
763
|
-
if (data.checkpointConfig != null) {
|
|
764
|
-
contents.checkpointConfig = deserializeAws_restJson1JobCheckpointConfig(data.checkpointConfig, context);
|
|
765
|
-
}
|
|
766
|
-
if (data.createdAt != null) {
|
|
767
|
-
contents.createdAt = __expectNonNull(__parseRfc3339DateTime(data.createdAt));
|
|
768
|
-
}
|
|
769
|
-
if (data.deviceConfig != null) {
|
|
770
|
-
contents.deviceConfig = deserializeAws_restJson1DeviceConfig(data.deviceConfig, context);
|
|
771
|
-
}
|
|
772
|
-
if (data.endedAt != null) {
|
|
773
|
-
contents.endedAt = __expectNonNull(__parseRfc3339DateTime(data.endedAt));
|
|
774
|
-
}
|
|
775
|
-
if (data.events != null) {
|
|
776
|
-
contents.events = deserializeAws_restJson1JobEvents(data.events, context);
|
|
777
|
-
}
|
|
778
|
-
if (data.failureReason != null) {
|
|
779
|
-
contents.failureReason = __expectString(data.failureReason);
|
|
780
|
-
}
|
|
781
|
-
if (data.hyperParameters != null) {
|
|
782
|
-
contents.hyperParameters = deserializeAws_restJson1HyperParameters(data.hyperParameters, context);
|
|
783
|
-
}
|
|
784
|
-
if (data.inputDataConfig != null) {
|
|
785
|
-
contents.inputDataConfig = deserializeAws_restJson1InputConfigList(data.inputDataConfig, context);
|
|
786
|
-
}
|
|
787
|
-
if (data.instanceConfig != null) {
|
|
788
|
-
contents.instanceConfig = deserializeAws_restJson1InstanceConfig(data.instanceConfig, context);
|
|
789
|
-
}
|
|
790
|
-
if (data.jobArn != null) {
|
|
791
|
-
contents.jobArn = __expectString(data.jobArn);
|
|
792
|
-
}
|
|
793
|
-
if (data.jobName != null) {
|
|
794
|
-
contents.jobName = __expectString(data.jobName);
|
|
795
|
-
}
|
|
796
|
-
if (data.outputDataConfig != null) {
|
|
797
|
-
contents.outputDataConfig = deserializeAws_restJson1JobOutputDataConfig(data.outputDataConfig, context);
|
|
798
|
-
}
|
|
799
|
-
if (data.roleArn != null) {
|
|
800
|
-
contents.roleArn = __expectString(data.roleArn);
|
|
801
|
-
}
|
|
802
|
-
if (data.startedAt != null) {
|
|
803
|
-
contents.startedAt = __expectNonNull(__parseRfc3339DateTime(data.startedAt));
|
|
804
|
-
}
|
|
805
|
-
if (data.status != null) {
|
|
806
|
-
contents.status = __expectString(data.status);
|
|
807
|
-
}
|
|
808
|
-
if (data.stoppingCondition != null) {
|
|
809
|
-
contents.stoppingCondition = deserializeAws_restJson1JobStoppingCondition(data.stoppingCondition, context);
|
|
810
|
-
}
|
|
811
|
-
if (data.tags != null) {
|
|
812
|
-
contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
|
|
813
|
-
}
|
|
814
|
-
return [2, contents];
|
|
815
|
-
}
|
|
261
|
+
return new __HttpRequest({
|
|
262
|
+
protocol,
|
|
263
|
+
hostname,
|
|
264
|
+
port,
|
|
265
|
+
method: "POST",
|
|
266
|
+
headers,
|
|
267
|
+
path: resolvedPath,
|
|
268
|
+
body,
|
|
816
269
|
});
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
_c = {};
|
|
826
|
-
return [4, parseErrorBody(output.body, context)];
|
|
827
|
-
case 1:
|
|
828
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
829
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
830
|
-
_b = errorCode;
|
|
831
|
-
switch (_b) {
|
|
832
|
-
case "AccessDeniedException": return [3, 2];
|
|
833
|
-
case "com.amazonaws.braket#AccessDeniedException": return [3, 2];
|
|
834
|
-
case "InternalServiceException": return [3, 4];
|
|
835
|
-
case "com.amazonaws.braket#InternalServiceException": return [3, 4];
|
|
836
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
837
|
-
case "com.amazonaws.braket#ResourceNotFoundException": return [3, 6];
|
|
838
|
-
case "ThrottlingException": return [3, 8];
|
|
839
|
-
case "com.amazonaws.braket#ThrottlingException": return [3, 8];
|
|
840
|
-
case "ValidationException": return [3, 10];
|
|
841
|
-
case "com.amazonaws.braket#ValidationException": return [3, 10];
|
|
842
|
-
}
|
|
843
|
-
return [3, 12];
|
|
844
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
845
|
-
case 3: throw _d.sent();
|
|
846
|
-
case 4: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
847
|
-
case 5: throw _d.sent();
|
|
848
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
849
|
-
case 7: throw _d.sent();
|
|
850
|
-
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
851
|
-
case 9: throw _d.sent();
|
|
852
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
853
|
-
case 11: throw _d.sent();
|
|
854
|
-
case 12:
|
|
855
|
-
parsedBody = parsedOutput.body;
|
|
856
|
-
throwDefaultError({
|
|
857
|
-
output: output,
|
|
858
|
-
parsedBody: parsedBody,
|
|
859
|
-
exceptionCtor: __BaseException,
|
|
860
|
-
errorCode: errorCode,
|
|
861
|
-
});
|
|
862
|
-
_d.label = 13;
|
|
863
|
-
case 13: return [2];
|
|
864
|
-
}
|
|
270
|
+
};
|
|
271
|
+
export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
272
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
273
|
+
const headers = {};
|
|
274
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
275
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
276
|
+
const query = map({
|
|
277
|
+
tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
|
|
865
278
|
});
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
$metadata: deserializeMetadata(output),
|
|
877
|
-
});
|
|
878
|
-
_a = __expectNonNull;
|
|
879
|
-
_b = __expectObject;
|
|
880
|
-
return [4, parseBody(output.body, context)];
|
|
881
|
-
case 1:
|
|
882
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
883
|
-
if (data.createdAt != null) {
|
|
884
|
-
contents.createdAt = __expectNonNull(__parseRfc3339DateTime(data.createdAt));
|
|
885
|
-
}
|
|
886
|
-
if (data.deviceArn != null) {
|
|
887
|
-
contents.deviceArn = __expectString(data.deviceArn);
|
|
888
|
-
}
|
|
889
|
-
if (data.deviceParameters != null) {
|
|
890
|
-
contents.deviceParameters = new __LazyJsonString(data.deviceParameters);
|
|
891
|
-
}
|
|
892
|
-
if (data.endedAt != null) {
|
|
893
|
-
contents.endedAt = __expectNonNull(__parseRfc3339DateTime(data.endedAt));
|
|
894
|
-
}
|
|
895
|
-
if (data.failureReason != null) {
|
|
896
|
-
contents.failureReason = __expectString(data.failureReason);
|
|
897
|
-
}
|
|
898
|
-
if (data.jobArn != null) {
|
|
899
|
-
contents.jobArn = __expectString(data.jobArn);
|
|
900
|
-
}
|
|
901
|
-
if (data.outputS3Bucket != null) {
|
|
902
|
-
contents.outputS3Bucket = __expectString(data.outputS3Bucket);
|
|
903
|
-
}
|
|
904
|
-
if (data.outputS3Directory != null) {
|
|
905
|
-
contents.outputS3Directory = __expectString(data.outputS3Directory);
|
|
906
|
-
}
|
|
907
|
-
if (data.quantumTaskArn != null) {
|
|
908
|
-
contents.quantumTaskArn = __expectString(data.quantumTaskArn);
|
|
909
|
-
}
|
|
910
|
-
if (data.shots != null) {
|
|
911
|
-
contents.shots = __expectLong(data.shots);
|
|
912
|
-
}
|
|
913
|
-
if (data.status != null) {
|
|
914
|
-
contents.status = __expectString(data.status);
|
|
915
|
-
}
|
|
916
|
-
if (data.tags != null) {
|
|
917
|
-
contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
|
|
918
|
-
}
|
|
919
|
-
return [2, contents];
|
|
920
|
-
}
|
|
279
|
+
let body;
|
|
280
|
+
return new __HttpRequest({
|
|
281
|
+
protocol,
|
|
282
|
+
hostname,
|
|
283
|
+
port,
|
|
284
|
+
method: "DELETE",
|
|
285
|
+
headers,
|
|
286
|
+
path: resolvedPath,
|
|
287
|
+
query,
|
|
288
|
+
body,
|
|
921
289
|
});
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
_a = [__assign({}, output)];
|
|
930
|
-
_c = {};
|
|
931
|
-
return [4, parseErrorBody(output.body, context)];
|
|
932
|
-
case 1:
|
|
933
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
934
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
935
|
-
_b = errorCode;
|
|
936
|
-
switch (_b) {
|
|
937
|
-
case "AccessDeniedException": return [3, 2];
|
|
938
|
-
case "com.amazonaws.braket#AccessDeniedException": return [3, 2];
|
|
939
|
-
case "InternalServiceException": return [3, 4];
|
|
940
|
-
case "com.amazonaws.braket#InternalServiceException": return [3, 4];
|
|
941
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
942
|
-
case "com.amazonaws.braket#ResourceNotFoundException": return [3, 6];
|
|
943
|
-
case "ThrottlingException": return [3, 8];
|
|
944
|
-
case "com.amazonaws.braket#ThrottlingException": return [3, 8];
|
|
945
|
-
case "ValidationException": return [3, 10];
|
|
946
|
-
case "com.amazonaws.braket#ValidationException": return [3, 10];
|
|
947
|
-
}
|
|
948
|
-
return [3, 12];
|
|
949
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
950
|
-
case 3: throw _d.sent();
|
|
951
|
-
case 4: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
952
|
-
case 5: throw _d.sent();
|
|
953
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
954
|
-
case 7: throw _d.sent();
|
|
955
|
-
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
956
|
-
case 9: throw _d.sent();
|
|
957
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
958
|
-
case 11: throw _d.sent();
|
|
959
|
-
case 12:
|
|
960
|
-
parsedBody = parsedOutput.body;
|
|
961
|
-
throwDefaultError({
|
|
962
|
-
output: output,
|
|
963
|
-
parsedBody: parsedBody,
|
|
964
|
-
exceptionCtor: __BaseException,
|
|
965
|
-
errorCode: errorCode,
|
|
966
|
-
});
|
|
967
|
-
_d.label = 13;
|
|
968
|
-
case 13: return [2];
|
|
969
|
-
}
|
|
290
|
+
};
|
|
291
|
+
export const deserializeAws_restJson1CancelJobCommand = async (output, context) => {
|
|
292
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
293
|
+
return deserializeAws_restJson1CancelJobCommandError(output, context);
|
|
294
|
+
}
|
|
295
|
+
const contents = map({
|
|
296
|
+
$metadata: deserializeMetadata(output),
|
|
970
297
|
});
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
298
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
299
|
+
if (data.cancellationStatus != null) {
|
|
300
|
+
contents.cancellationStatus = __expectString(data.cancellationStatus);
|
|
301
|
+
}
|
|
302
|
+
if (data.jobArn != null) {
|
|
303
|
+
contents.jobArn = __expectString(data.jobArn);
|
|
304
|
+
}
|
|
305
|
+
return contents;
|
|
306
|
+
};
|
|
307
|
+
const deserializeAws_restJson1CancelJobCommandError = async (output, context) => {
|
|
308
|
+
const parsedOutput = {
|
|
309
|
+
...output,
|
|
310
|
+
body: await parseErrorBody(output.body, context),
|
|
311
|
+
};
|
|
312
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
313
|
+
switch (errorCode) {
|
|
314
|
+
case "AccessDeniedException":
|
|
315
|
+
case "com.amazonaws.braket#AccessDeniedException":
|
|
316
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
317
|
+
case "ConflictException":
|
|
318
|
+
case "com.amazonaws.braket#ConflictException":
|
|
319
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
320
|
+
case "InternalServiceException":
|
|
321
|
+
case "com.amazonaws.braket#InternalServiceException":
|
|
322
|
+
throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context);
|
|
323
|
+
case "ResourceNotFoundException":
|
|
324
|
+
case "com.amazonaws.braket#ResourceNotFoundException":
|
|
325
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
326
|
+
case "ThrottlingException":
|
|
327
|
+
case "com.amazonaws.braket#ThrottlingException":
|
|
328
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
329
|
+
case "ValidationException":
|
|
330
|
+
case "com.amazonaws.braket#ValidationException":
|
|
331
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
332
|
+
default:
|
|
333
|
+
const parsedBody = parsedOutput.body;
|
|
334
|
+
throwDefaultError({
|
|
335
|
+
output,
|
|
336
|
+
parsedBody,
|
|
337
|
+
exceptionCtor: __BaseException,
|
|
338
|
+
errorCode,
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
export const deserializeAws_restJson1CancelQuantumTaskCommand = async (output, context) => {
|
|
343
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
344
|
+
return deserializeAws_restJson1CancelQuantumTaskCommandError(output, context);
|
|
345
|
+
}
|
|
346
|
+
const contents = map({
|
|
347
|
+
$metadata: deserializeMetadata(output),
|
|
993
348
|
});
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
349
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
350
|
+
if (data.cancellationStatus != null) {
|
|
351
|
+
contents.cancellationStatus = __expectString(data.cancellationStatus);
|
|
352
|
+
}
|
|
353
|
+
if (data.quantumTaskArn != null) {
|
|
354
|
+
contents.quantumTaskArn = __expectString(data.quantumTaskArn);
|
|
355
|
+
}
|
|
356
|
+
return contents;
|
|
357
|
+
};
|
|
358
|
+
const deserializeAws_restJson1CancelQuantumTaskCommandError = async (output, context) => {
|
|
359
|
+
const parsedOutput = {
|
|
360
|
+
...output,
|
|
361
|
+
body: await parseErrorBody(output.body, context),
|
|
362
|
+
};
|
|
363
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
364
|
+
switch (errorCode) {
|
|
365
|
+
case "AccessDeniedException":
|
|
366
|
+
case "com.amazonaws.braket#AccessDeniedException":
|
|
367
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
368
|
+
case "ConflictException":
|
|
369
|
+
case "com.amazonaws.braket#ConflictException":
|
|
370
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
371
|
+
case "InternalServiceException":
|
|
372
|
+
case "com.amazonaws.braket#InternalServiceException":
|
|
373
|
+
throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context);
|
|
374
|
+
case "ResourceNotFoundException":
|
|
375
|
+
case "com.amazonaws.braket#ResourceNotFoundException":
|
|
376
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
377
|
+
case "ThrottlingException":
|
|
378
|
+
case "com.amazonaws.braket#ThrottlingException":
|
|
379
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
380
|
+
case "ValidationException":
|
|
381
|
+
case "com.amazonaws.braket#ValidationException":
|
|
382
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
383
|
+
default:
|
|
384
|
+
const parsedBody = parsedOutput.body;
|
|
385
|
+
throwDefaultError({
|
|
386
|
+
output,
|
|
387
|
+
parsedBody,
|
|
388
|
+
exceptionCtor: __BaseException,
|
|
389
|
+
errorCode,
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
};
|
|
393
|
+
export const deserializeAws_restJson1CreateJobCommand = async (output, context) => {
|
|
394
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
395
|
+
return deserializeAws_restJson1CreateJobCommandError(output, context);
|
|
396
|
+
}
|
|
397
|
+
const contents = map({
|
|
398
|
+
$metadata: deserializeMetadata(output),
|
|
1034
399
|
});
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
400
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
401
|
+
if (data.jobArn != null) {
|
|
402
|
+
contents.jobArn = __expectString(data.jobArn);
|
|
403
|
+
}
|
|
404
|
+
return contents;
|
|
405
|
+
};
|
|
406
|
+
const deserializeAws_restJson1CreateJobCommandError = async (output, context) => {
|
|
407
|
+
const parsedOutput = {
|
|
408
|
+
...output,
|
|
409
|
+
body: await parseErrorBody(output.body, context),
|
|
410
|
+
};
|
|
411
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
412
|
+
switch (errorCode) {
|
|
413
|
+
case "AccessDeniedException":
|
|
414
|
+
case "com.amazonaws.braket#AccessDeniedException":
|
|
415
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
416
|
+
case "ConflictException":
|
|
417
|
+
case "com.amazonaws.braket#ConflictException":
|
|
418
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
419
|
+
case "DeviceRetiredException":
|
|
420
|
+
case "com.amazonaws.braket#DeviceRetiredException":
|
|
421
|
+
throw await deserializeAws_restJson1DeviceRetiredExceptionResponse(parsedOutput, context);
|
|
422
|
+
case "InternalServiceException":
|
|
423
|
+
case "com.amazonaws.braket#InternalServiceException":
|
|
424
|
+
throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context);
|
|
425
|
+
case "ServiceQuotaExceededException":
|
|
426
|
+
case "com.amazonaws.braket#ServiceQuotaExceededException":
|
|
427
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
428
|
+
case "ThrottlingException":
|
|
429
|
+
case "com.amazonaws.braket#ThrottlingException":
|
|
430
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
431
|
+
case "ValidationException":
|
|
432
|
+
case "com.amazonaws.braket#ValidationException":
|
|
433
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
434
|
+
default:
|
|
435
|
+
const parsedBody = parsedOutput.body;
|
|
436
|
+
throwDefaultError({
|
|
437
|
+
output,
|
|
438
|
+
parsedBody,
|
|
439
|
+
exceptionCtor: __BaseException,
|
|
440
|
+
errorCode,
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
};
|
|
444
|
+
export const deserializeAws_restJson1CreateQuantumTaskCommand = async (output, context) => {
|
|
445
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
446
|
+
return deserializeAws_restJson1CreateQuantumTaskCommandError(output, context);
|
|
447
|
+
}
|
|
448
|
+
const contents = map({
|
|
449
|
+
$metadata: deserializeMetadata(output),
|
|
1060
450
|
});
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
return
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
451
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
452
|
+
if (data.quantumTaskArn != null) {
|
|
453
|
+
contents.quantumTaskArn = __expectString(data.quantumTaskArn);
|
|
454
|
+
}
|
|
455
|
+
return contents;
|
|
456
|
+
};
|
|
457
|
+
const deserializeAws_restJson1CreateQuantumTaskCommandError = async (output, context) => {
|
|
458
|
+
const parsedOutput = {
|
|
459
|
+
...output,
|
|
460
|
+
body: await parseErrorBody(output.body, context),
|
|
461
|
+
};
|
|
462
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
463
|
+
switch (errorCode) {
|
|
464
|
+
case "AccessDeniedException":
|
|
465
|
+
case "com.amazonaws.braket#AccessDeniedException":
|
|
466
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
467
|
+
case "DeviceOfflineException":
|
|
468
|
+
case "com.amazonaws.braket#DeviceOfflineException":
|
|
469
|
+
throw await deserializeAws_restJson1DeviceOfflineExceptionResponse(parsedOutput, context);
|
|
470
|
+
case "DeviceRetiredException":
|
|
471
|
+
case "com.amazonaws.braket#DeviceRetiredException":
|
|
472
|
+
throw await deserializeAws_restJson1DeviceRetiredExceptionResponse(parsedOutput, context);
|
|
473
|
+
case "InternalServiceException":
|
|
474
|
+
case "com.amazonaws.braket#InternalServiceException":
|
|
475
|
+
throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context);
|
|
476
|
+
case "ServiceQuotaExceededException":
|
|
477
|
+
case "com.amazonaws.braket#ServiceQuotaExceededException":
|
|
478
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
479
|
+
case "ThrottlingException":
|
|
480
|
+
case "com.amazonaws.braket#ThrottlingException":
|
|
481
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
482
|
+
case "ValidationException":
|
|
483
|
+
case "com.amazonaws.braket#ValidationException":
|
|
484
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
485
|
+
default:
|
|
486
|
+
const parsedBody = parsedOutput.body;
|
|
487
|
+
throwDefaultError({
|
|
488
|
+
output,
|
|
489
|
+
parsedBody,
|
|
490
|
+
exceptionCtor: __BaseException,
|
|
491
|
+
errorCode,
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
};
|
|
495
|
+
export const deserializeAws_restJson1GetDeviceCommand = async (output, context) => {
|
|
496
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
497
|
+
return deserializeAws_restJson1GetDeviceCommandError(output, context);
|
|
498
|
+
}
|
|
499
|
+
const contents = map({
|
|
500
|
+
$metadata: deserializeMetadata(output),
|
|
1105
501
|
});
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
502
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
503
|
+
if (data.deviceArn != null) {
|
|
504
|
+
contents.deviceArn = __expectString(data.deviceArn);
|
|
505
|
+
}
|
|
506
|
+
if (data.deviceCapabilities != null) {
|
|
507
|
+
contents.deviceCapabilities = new __LazyJsonString(data.deviceCapabilities);
|
|
508
|
+
}
|
|
509
|
+
if (data.deviceName != null) {
|
|
510
|
+
contents.deviceName = __expectString(data.deviceName);
|
|
511
|
+
}
|
|
512
|
+
if (data.deviceStatus != null) {
|
|
513
|
+
contents.deviceStatus = __expectString(data.deviceStatus);
|
|
514
|
+
}
|
|
515
|
+
if (data.deviceType != null) {
|
|
516
|
+
contents.deviceType = __expectString(data.deviceType);
|
|
517
|
+
}
|
|
518
|
+
if (data.providerName != null) {
|
|
519
|
+
contents.providerName = __expectString(data.providerName);
|
|
520
|
+
}
|
|
521
|
+
return contents;
|
|
522
|
+
};
|
|
523
|
+
const deserializeAws_restJson1GetDeviceCommandError = async (output, context) => {
|
|
524
|
+
const parsedOutput = {
|
|
525
|
+
...output,
|
|
526
|
+
body: await parseErrorBody(output.body, context),
|
|
527
|
+
};
|
|
528
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
529
|
+
switch (errorCode) {
|
|
530
|
+
case "AccessDeniedException":
|
|
531
|
+
case "com.amazonaws.braket#AccessDeniedException":
|
|
532
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
533
|
+
case "InternalServiceException":
|
|
534
|
+
case "com.amazonaws.braket#InternalServiceException":
|
|
535
|
+
throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context);
|
|
536
|
+
case "ResourceNotFoundException":
|
|
537
|
+
case "com.amazonaws.braket#ResourceNotFoundException":
|
|
538
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
539
|
+
case "ThrottlingException":
|
|
540
|
+
case "com.amazonaws.braket#ThrottlingException":
|
|
541
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
542
|
+
case "ValidationException":
|
|
543
|
+
case "com.amazonaws.braket#ValidationException":
|
|
544
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
545
|
+
default:
|
|
546
|
+
const parsedBody = parsedOutput.body;
|
|
547
|
+
throwDefaultError({
|
|
548
|
+
output,
|
|
549
|
+
parsedBody,
|
|
550
|
+
exceptionCtor: __BaseException,
|
|
551
|
+
errorCode,
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
};
|
|
555
|
+
export const deserializeAws_restJson1GetJobCommand = async (output, context) => {
|
|
556
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
557
|
+
return deserializeAws_restJson1GetJobCommandError(output, context);
|
|
558
|
+
}
|
|
559
|
+
const contents = map({
|
|
560
|
+
$metadata: deserializeMetadata(output),
|
|
1131
561
|
});
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
562
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
563
|
+
if (data.algorithmSpecification != null) {
|
|
564
|
+
contents.algorithmSpecification = deserializeAws_restJson1AlgorithmSpecification(data.algorithmSpecification, context);
|
|
565
|
+
}
|
|
566
|
+
if (data.billableDuration != null) {
|
|
567
|
+
contents.billableDuration = __expectInt32(data.billableDuration);
|
|
568
|
+
}
|
|
569
|
+
if (data.checkpointConfig != null) {
|
|
570
|
+
contents.checkpointConfig = deserializeAws_restJson1JobCheckpointConfig(data.checkpointConfig, context);
|
|
571
|
+
}
|
|
572
|
+
if (data.createdAt != null) {
|
|
573
|
+
contents.createdAt = __expectNonNull(__parseRfc3339DateTime(data.createdAt));
|
|
574
|
+
}
|
|
575
|
+
if (data.deviceConfig != null) {
|
|
576
|
+
contents.deviceConfig = deserializeAws_restJson1DeviceConfig(data.deviceConfig, context);
|
|
577
|
+
}
|
|
578
|
+
if (data.endedAt != null) {
|
|
579
|
+
contents.endedAt = __expectNonNull(__parseRfc3339DateTime(data.endedAt));
|
|
580
|
+
}
|
|
581
|
+
if (data.events != null) {
|
|
582
|
+
contents.events = deserializeAws_restJson1JobEvents(data.events, context);
|
|
583
|
+
}
|
|
584
|
+
if (data.failureReason != null) {
|
|
585
|
+
contents.failureReason = __expectString(data.failureReason);
|
|
586
|
+
}
|
|
587
|
+
if (data.hyperParameters != null) {
|
|
588
|
+
contents.hyperParameters = deserializeAws_restJson1HyperParameters(data.hyperParameters, context);
|
|
589
|
+
}
|
|
590
|
+
if (data.inputDataConfig != null) {
|
|
591
|
+
contents.inputDataConfig = deserializeAws_restJson1InputConfigList(data.inputDataConfig, context);
|
|
592
|
+
}
|
|
593
|
+
if (data.instanceConfig != null) {
|
|
594
|
+
contents.instanceConfig = deserializeAws_restJson1InstanceConfig(data.instanceConfig, context);
|
|
595
|
+
}
|
|
596
|
+
if (data.jobArn != null) {
|
|
597
|
+
contents.jobArn = __expectString(data.jobArn);
|
|
598
|
+
}
|
|
599
|
+
if (data.jobName != null) {
|
|
600
|
+
contents.jobName = __expectString(data.jobName);
|
|
601
|
+
}
|
|
602
|
+
if (data.outputDataConfig != null) {
|
|
603
|
+
contents.outputDataConfig = deserializeAws_restJson1JobOutputDataConfig(data.outputDataConfig, context);
|
|
604
|
+
}
|
|
605
|
+
if (data.roleArn != null) {
|
|
606
|
+
contents.roleArn = __expectString(data.roleArn);
|
|
607
|
+
}
|
|
608
|
+
if (data.startedAt != null) {
|
|
609
|
+
contents.startedAt = __expectNonNull(__parseRfc3339DateTime(data.startedAt));
|
|
610
|
+
}
|
|
611
|
+
if (data.status != null) {
|
|
612
|
+
contents.status = __expectString(data.status);
|
|
613
|
+
}
|
|
614
|
+
if (data.stoppingCondition != null) {
|
|
615
|
+
contents.stoppingCondition = deserializeAws_restJson1JobStoppingCondition(data.stoppingCondition, context);
|
|
616
|
+
}
|
|
617
|
+
if (data.tags != null) {
|
|
618
|
+
contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
|
|
619
|
+
}
|
|
620
|
+
return contents;
|
|
621
|
+
};
|
|
622
|
+
const deserializeAws_restJson1GetJobCommandError = async (output, context) => {
|
|
623
|
+
const parsedOutput = {
|
|
624
|
+
...output,
|
|
625
|
+
body: await parseErrorBody(output.body, context),
|
|
626
|
+
};
|
|
627
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
628
|
+
switch (errorCode) {
|
|
629
|
+
case "AccessDeniedException":
|
|
630
|
+
case "com.amazonaws.braket#AccessDeniedException":
|
|
631
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
632
|
+
case "InternalServiceException":
|
|
633
|
+
case "com.amazonaws.braket#InternalServiceException":
|
|
634
|
+
throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context);
|
|
635
|
+
case "ResourceNotFoundException":
|
|
636
|
+
case "com.amazonaws.braket#ResourceNotFoundException":
|
|
637
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
638
|
+
case "ThrottlingException":
|
|
639
|
+
case "com.amazonaws.braket#ThrottlingException":
|
|
640
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
641
|
+
case "ValidationException":
|
|
642
|
+
case "com.amazonaws.braket#ValidationException":
|
|
643
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
644
|
+
default:
|
|
645
|
+
const parsedBody = parsedOutput.body;
|
|
646
|
+
throwDefaultError({
|
|
647
|
+
output,
|
|
648
|
+
parsedBody,
|
|
649
|
+
exceptionCtor: __BaseException,
|
|
650
|
+
errorCode,
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
};
|
|
654
|
+
export const deserializeAws_restJson1GetQuantumTaskCommand = async (output, context) => {
|
|
655
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
656
|
+
return deserializeAws_restJson1GetQuantumTaskCommandError(output, context);
|
|
657
|
+
}
|
|
658
|
+
const contents = map({
|
|
659
|
+
$metadata: deserializeMetadata(output),
|
|
1176
660
|
});
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
661
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
662
|
+
if (data.createdAt != null) {
|
|
663
|
+
contents.createdAt = __expectNonNull(__parseRfc3339DateTime(data.createdAt));
|
|
664
|
+
}
|
|
665
|
+
if (data.deviceArn != null) {
|
|
666
|
+
contents.deviceArn = __expectString(data.deviceArn);
|
|
667
|
+
}
|
|
668
|
+
if (data.deviceParameters != null) {
|
|
669
|
+
contents.deviceParameters = new __LazyJsonString(data.deviceParameters);
|
|
670
|
+
}
|
|
671
|
+
if (data.endedAt != null) {
|
|
672
|
+
contents.endedAt = __expectNonNull(__parseRfc3339DateTime(data.endedAt));
|
|
673
|
+
}
|
|
674
|
+
if (data.failureReason != null) {
|
|
675
|
+
contents.failureReason = __expectString(data.failureReason);
|
|
676
|
+
}
|
|
677
|
+
if (data.jobArn != null) {
|
|
678
|
+
contents.jobArn = __expectString(data.jobArn);
|
|
679
|
+
}
|
|
680
|
+
if (data.outputS3Bucket != null) {
|
|
681
|
+
contents.outputS3Bucket = __expectString(data.outputS3Bucket);
|
|
682
|
+
}
|
|
683
|
+
if (data.outputS3Directory != null) {
|
|
684
|
+
contents.outputS3Directory = __expectString(data.outputS3Directory);
|
|
685
|
+
}
|
|
686
|
+
if (data.quantumTaskArn != null) {
|
|
687
|
+
contents.quantumTaskArn = __expectString(data.quantumTaskArn);
|
|
688
|
+
}
|
|
689
|
+
if (data.shots != null) {
|
|
690
|
+
contents.shots = __expectLong(data.shots);
|
|
691
|
+
}
|
|
692
|
+
if (data.status != null) {
|
|
693
|
+
contents.status = __expectString(data.status);
|
|
694
|
+
}
|
|
695
|
+
if (data.tags != null) {
|
|
696
|
+
contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
|
|
697
|
+
}
|
|
698
|
+
return contents;
|
|
699
|
+
};
|
|
700
|
+
const deserializeAws_restJson1GetQuantumTaskCommandError = async (output, context) => {
|
|
701
|
+
const parsedOutput = {
|
|
702
|
+
...output,
|
|
703
|
+
body: await parseErrorBody(output.body, context),
|
|
704
|
+
};
|
|
705
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
706
|
+
switch (errorCode) {
|
|
707
|
+
case "AccessDeniedException":
|
|
708
|
+
case "com.amazonaws.braket#AccessDeniedException":
|
|
709
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
710
|
+
case "InternalServiceException":
|
|
711
|
+
case "com.amazonaws.braket#InternalServiceException":
|
|
712
|
+
throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context);
|
|
713
|
+
case "ResourceNotFoundException":
|
|
714
|
+
case "com.amazonaws.braket#ResourceNotFoundException":
|
|
715
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
716
|
+
case "ThrottlingException":
|
|
717
|
+
case "com.amazonaws.braket#ThrottlingException":
|
|
718
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
719
|
+
case "ValidationException":
|
|
720
|
+
case "com.amazonaws.braket#ValidationException":
|
|
721
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
722
|
+
default:
|
|
723
|
+
const parsedBody = parsedOutput.body;
|
|
724
|
+
throwDefaultError({
|
|
725
|
+
output,
|
|
726
|
+
parsedBody,
|
|
727
|
+
exceptionCtor: __BaseException,
|
|
728
|
+
errorCode,
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
};
|
|
732
|
+
export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
733
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
734
|
+
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
735
|
+
}
|
|
736
|
+
const contents = map({
|
|
737
|
+
$metadata: deserializeMetadata(output),
|
|
1202
738
|
});
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
return
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
exceptionCtor: __BaseException,
|
|
1242
|
-
errorCode: errorCode,
|
|
1243
|
-
});
|
|
1244
|
-
_d.label = 11;
|
|
1245
|
-
case 11: return [2];
|
|
1246
|
-
}
|
|
739
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
740
|
+
if (data.tags != null) {
|
|
741
|
+
contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
|
|
742
|
+
}
|
|
743
|
+
return contents;
|
|
744
|
+
};
|
|
745
|
+
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
746
|
+
const parsedOutput = {
|
|
747
|
+
...output,
|
|
748
|
+
body: await parseErrorBody(output.body, context),
|
|
749
|
+
};
|
|
750
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
751
|
+
switch (errorCode) {
|
|
752
|
+
case "InternalServiceException":
|
|
753
|
+
case "com.amazonaws.braket#InternalServiceException":
|
|
754
|
+
throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context);
|
|
755
|
+
case "ResourceNotFoundException":
|
|
756
|
+
case "com.amazonaws.braket#ResourceNotFoundException":
|
|
757
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
758
|
+
case "ValidationException":
|
|
759
|
+
case "com.amazonaws.braket#ValidationException":
|
|
760
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
761
|
+
default:
|
|
762
|
+
const parsedBody = parsedOutput.body;
|
|
763
|
+
throwDefaultError({
|
|
764
|
+
output,
|
|
765
|
+
parsedBody,
|
|
766
|
+
exceptionCtor: __BaseException,
|
|
767
|
+
errorCode,
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
};
|
|
771
|
+
export const deserializeAws_restJson1SearchDevicesCommand = async (output, context) => {
|
|
772
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
773
|
+
return deserializeAws_restJson1SearchDevicesCommandError(output, context);
|
|
774
|
+
}
|
|
775
|
+
const contents = map({
|
|
776
|
+
$metadata: deserializeMetadata(output),
|
|
1247
777
|
});
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
778
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
779
|
+
if (data.devices != null) {
|
|
780
|
+
contents.devices = deserializeAws_restJson1DeviceSummaryList(data.devices, context);
|
|
781
|
+
}
|
|
782
|
+
if (data.nextToken != null) {
|
|
783
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
784
|
+
}
|
|
785
|
+
return contents;
|
|
786
|
+
};
|
|
787
|
+
const deserializeAws_restJson1SearchDevicesCommandError = async (output, context) => {
|
|
788
|
+
const parsedOutput = {
|
|
789
|
+
...output,
|
|
790
|
+
body: await parseErrorBody(output.body, context),
|
|
791
|
+
};
|
|
792
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
793
|
+
switch (errorCode) {
|
|
794
|
+
case "AccessDeniedException":
|
|
795
|
+
case "com.amazonaws.braket#AccessDeniedException":
|
|
796
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
797
|
+
case "InternalServiceException":
|
|
798
|
+
case "com.amazonaws.braket#InternalServiceException":
|
|
799
|
+
throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context);
|
|
800
|
+
case "ThrottlingException":
|
|
801
|
+
case "com.amazonaws.braket#ThrottlingException":
|
|
802
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
803
|
+
case "ValidationException":
|
|
804
|
+
case "com.amazonaws.braket#ValidationException":
|
|
805
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
806
|
+
default:
|
|
807
|
+
const parsedBody = parsedOutput.body;
|
|
808
|
+
throwDefaultError({
|
|
809
|
+
output,
|
|
810
|
+
parsedBody,
|
|
811
|
+
exceptionCtor: __BaseException,
|
|
812
|
+
errorCode,
|
|
813
|
+
});
|
|
814
|
+
}
|
|
815
|
+
};
|
|
816
|
+
export const deserializeAws_restJson1SearchJobsCommand = async (output, context) => {
|
|
817
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
818
|
+
return deserializeAws_restJson1SearchJobsCommandError(output, context);
|
|
819
|
+
}
|
|
820
|
+
const contents = map({
|
|
821
|
+
$metadata: deserializeMetadata(output),
|
|
1265
822
|
});
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
823
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
824
|
+
if (data.jobs != null) {
|
|
825
|
+
contents.jobs = deserializeAws_restJson1JobSummaryList(data.jobs, context);
|
|
826
|
+
}
|
|
827
|
+
if (data.nextToken != null) {
|
|
828
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
829
|
+
}
|
|
830
|
+
return contents;
|
|
831
|
+
};
|
|
832
|
+
const deserializeAws_restJson1SearchJobsCommandError = async (output, context) => {
|
|
833
|
+
const parsedOutput = {
|
|
834
|
+
...output,
|
|
835
|
+
body: await parseErrorBody(output.body, context),
|
|
836
|
+
};
|
|
837
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
838
|
+
switch (errorCode) {
|
|
839
|
+
case "AccessDeniedException":
|
|
840
|
+
case "com.amazonaws.braket#AccessDeniedException":
|
|
841
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
842
|
+
case "InternalServiceException":
|
|
843
|
+
case "com.amazonaws.braket#InternalServiceException":
|
|
844
|
+
throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context);
|
|
845
|
+
case "ThrottlingException":
|
|
846
|
+
case "com.amazonaws.braket#ThrottlingException":
|
|
847
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
848
|
+
case "ValidationException":
|
|
849
|
+
case "com.amazonaws.braket#ValidationException":
|
|
850
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
851
|
+
default:
|
|
852
|
+
const parsedBody = parsedOutput.body;
|
|
853
|
+
throwDefaultError({
|
|
854
|
+
output,
|
|
855
|
+
parsedBody,
|
|
856
|
+
exceptionCtor: __BaseException,
|
|
857
|
+
errorCode,
|
|
858
|
+
});
|
|
859
|
+
}
|
|
860
|
+
};
|
|
861
|
+
export const deserializeAws_restJson1SearchQuantumTasksCommand = async (output, context) => {
|
|
862
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
863
|
+
return deserializeAws_restJson1SearchQuantumTasksCommandError(output, context);
|
|
864
|
+
}
|
|
865
|
+
const contents = map({
|
|
866
|
+
$metadata: deserializeMetadata(output),
|
|
1306
867
|
});
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
868
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
869
|
+
if (data.nextToken != null) {
|
|
870
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
871
|
+
}
|
|
872
|
+
if (data.quantumTasks != null) {
|
|
873
|
+
contents.quantumTasks = deserializeAws_restJson1QuantumTaskSummaryList(data.quantumTasks, context);
|
|
874
|
+
}
|
|
875
|
+
return contents;
|
|
876
|
+
};
|
|
877
|
+
const deserializeAws_restJson1SearchQuantumTasksCommandError = async (output, context) => {
|
|
878
|
+
const parsedOutput = {
|
|
879
|
+
...output,
|
|
880
|
+
body: await parseErrorBody(output.body, context),
|
|
881
|
+
};
|
|
882
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
883
|
+
switch (errorCode) {
|
|
884
|
+
case "AccessDeniedException":
|
|
885
|
+
case "com.amazonaws.braket#AccessDeniedException":
|
|
886
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
887
|
+
case "InternalServiceException":
|
|
888
|
+
case "com.amazonaws.braket#InternalServiceException":
|
|
889
|
+
throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context);
|
|
890
|
+
case "ThrottlingException":
|
|
891
|
+
case "com.amazonaws.braket#ThrottlingException":
|
|
892
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
893
|
+
case "ValidationException":
|
|
894
|
+
case "com.amazonaws.braket#ValidationException":
|
|
895
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
896
|
+
default:
|
|
897
|
+
const parsedBody = parsedOutput.body;
|
|
898
|
+
throwDefaultError({
|
|
899
|
+
output,
|
|
900
|
+
parsedBody,
|
|
901
|
+
exceptionCtor: __BaseException,
|
|
902
|
+
errorCode,
|
|
903
|
+
});
|
|
904
|
+
}
|
|
905
|
+
};
|
|
906
|
+
export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
907
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
908
|
+
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
909
|
+
}
|
|
910
|
+
const contents = map({
|
|
911
|
+
$metadata: deserializeMetadata(output),
|
|
1324
912
|
});
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
errorCode: errorCode,
|
|
1361
|
-
});
|
|
1362
|
-
_d.label = 9;
|
|
1363
|
-
case 9: return [2];
|
|
1364
|
-
}
|
|
913
|
+
await collectBody(output.body, context);
|
|
914
|
+
return contents;
|
|
915
|
+
};
|
|
916
|
+
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
917
|
+
const parsedOutput = {
|
|
918
|
+
...output,
|
|
919
|
+
body: await parseErrorBody(output.body, context),
|
|
920
|
+
};
|
|
921
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
922
|
+
switch (errorCode) {
|
|
923
|
+
case "InternalServiceException":
|
|
924
|
+
case "com.amazonaws.braket#InternalServiceException":
|
|
925
|
+
throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context);
|
|
926
|
+
case "ResourceNotFoundException":
|
|
927
|
+
case "com.amazonaws.braket#ResourceNotFoundException":
|
|
928
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
929
|
+
case "ValidationException":
|
|
930
|
+
case "com.amazonaws.braket#ValidationException":
|
|
931
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
932
|
+
default:
|
|
933
|
+
const parsedBody = parsedOutput.body;
|
|
934
|
+
throwDefaultError({
|
|
935
|
+
output,
|
|
936
|
+
parsedBody,
|
|
937
|
+
exceptionCtor: __BaseException,
|
|
938
|
+
errorCode,
|
|
939
|
+
});
|
|
940
|
+
}
|
|
941
|
+
};
|
|
942
|
+
export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
943
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
944
|
+
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
945
|
+
}
|
|
946
|
+
const contents = map({
|
|
947
|
+
$metadata: deserializeMetadata(output),
|
|
1365
948
|
});
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
949
|
+
await collectBody(output.body, context);
|
|
950
|
+
return contents;
|
|
951
|
+
};
|
|
952
|
+
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
953
|
+
const parsedOutput = {
|
|
954
|
+
...output,
|
|
955
|
+
body: await parseErrorBody(output.body, context),
|
|
956
|
+
};
|
|
957
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
958
|
+
switch (errorCode) {
|
|
959
|
+
case "InternalServiceException":
|
|
960
|
+
case "com.amazonaws.braket#InternalServiceException":
|
|
961
|
+
throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context);
|
|
962
|
+
case "ResourceNotFoundException":
|
|
963
|
+
case "com.amazonaws.braket#ResourceNotFoundException":
|
|
964
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
965
|
+
case "ValidationException":
|
|
966
|
+
case "com.amazonaws.braket#ValidationException":
|
|
967
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
968
|
+
default:
|
|
969
|
+
const parsedBody = parsedOutput.body;
|
|
970
|
+
throwDefaultError({
|
|
971
|
+
output,
|
|
972
|
+
parsedBody,
|
|
973
|
+
exceptionCtor: __BaseException,
|
|
974
|
+
errorCode,
|
|
975
|
+
});
|
|
976
|
+
}
|
|
977
|
+
};
|
|
978
|
+
const map = __map;
|
|
979
|
+
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
980
|
+
const contents = map({});
|
|
981
|
+
const data = parsedOutput.body;
|
|
982
|
+
if (data.message != null) {
|
|
983
|
+
contents.message = __expectString(data.message);
|
|
984
|
+
}
|
|
985
|
+
const exception = new AccessDeniedException({
|
|
986
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
987
|
+
...contents,
|
|
1378
988
|
});
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
989
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
990
|
+
};
|
|
991
|
+
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
992
|
+
const contents = map({});
|
|
993
|
+
const data = parsedOutput.body;
|
|
994
|
+
if (data.message != null) {
|
|
995
|
+
contents.message = __expectString(data.message);
|
|
996
|
+
}
|
|
997
|
+
const exception = new ConflictException({
|
|
998
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
999
|
+
...contents,
|
|
1390
1000
|
});
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1001
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1002
|
+
};
|
|
1003
|
+
const deserializeAws_restJson1DeviceOfflineExceptionResponse = async (parsedOutput, context) => {
|
|
1004
|
+
const contents = map({});
|
|
1005
|
+
const data = parsedOutput.body;
|
|
1006
|
+
if (data.message != null) {
|
|
1007
|
+
contents.message = __expectString(data.message);
|
|
1008
|
+
}
|
|
1009
|
+
const exception = new DeviceOfflineException({
|
|
1010
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1011
|
+
...contents,
|
|
1402
1012
|
});
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1013
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1014
|
+
};
|
|
1015
|
+
const deserializeAws_restJson1DeviceRetiredExceptionResponse = async (parsedOutput, context) => {
|
|
1016
|
+
const contents = map({});
|
|
1017
|
+
const data = parsedOutput.body;
|
|
1018
|
+
if (data.message != null) {
|
|
1019
|
+
contents.message = __expectString(data.message);
|
|
1020
|
+
}
|
|
1021
|
+
const exception = new DeviceRetiredException({
|
|
1022
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1023
|
+
...contents,
|
|
1414
1024
|
});
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1025
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1026
|
+
};
|
|
1027
|
+
const deserializeAws_restJson1InternalServiceExceptionResponse = async (parsedOutput, context) => {
|
|
1028
|
+
const contents = map({});
|
|
1029
|
+
const data = parsedOutput.body;
|
|
1030
|
+
if (data.message != null) {
|
|
1031
|
+
contents.message = __expectString(data.message);
|
|
1032
|
+
}
|
|
1033
|
+
const exception = new InternalServiceException({
|
|
1034
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1035
|
+
...contents,
|
|
1426
1036
|
});
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1037
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1038
|
+
};
|
|
1039
|
+
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
1040
|
+
const contents = map({});
|
|
1041
|
+
const data = parsedOutput.body;
|
|
1042
|
+
if (data.message != null) {
|
|
1043
|
+
contents.message = __expectString(data.message);
|
|
1044
|
+
}
|
|
1045
|
+
const exception = new ResourceNotFoundException({
|
|
1046
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1047
|
+
...contents,
|
|
1438
1048
|
});
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1049
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1050
|
+
};
|
|
1051
|
+
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
1052
|
+
const contents = map({});
|
|
1053
|
+
const data = parsedOutput.body;
|
|
1054
|
+
if (data.message != null) {
|
|
1055
|
+
contents.message = __expectString(data.message);
|
|
1056
|
+
}
|
|
1057
|
+
const exception = new ServiceQuotaExceededException({
|
|
1058
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1059
|
+
...contents,
|
|
1450
1060
|
});
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1061
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1062
|
+
};
|
|
1063
|
+
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
1064
|
+
const contents = map({});
|
|
1065
|
+
const data = parsedOutput.body;
|
|
1066
|
+
if (data.message != null) {
|
|
1067
|
+
contents.message = __expectString(data.message);
|
|
1068
|
+
}
|
|
1069
|
+
const exception = new ThrottlingException({
|
|
1070
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1071
|
+
...contents,
|
|
1462
1072
|
});
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1073
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1074
|
+
};
|
|
1075
|
+
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
1076
|
+
const contents = map({});
|
|
1077
|
+
const data = parsedOutput.body;
|
|
1078
|
+
if (data.message != null) {
|
|
1079
|
+
contents.message = __expectString(data.message);
|
|
1080
|
+
}
|
|
1081
|
+
const exception = new ValidationException({
|
|
1082
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1083
|
+
...contents,
|
|
1474
1084
|
});
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
};
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
};
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1085
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1086
|
+
};
|
|
1087
|
+
const serializeAws_restJson1AlgorithmSpecification = (input, context) => {
|
|
1088
|
+
return {
|
|
1089
|
+
...(input.containerImage != null && {
|
|
1090
|
+
containerImage: serializeAws_restJson1ContainerImage(input.containerImage, context),
|
|
1091
|
+
}),
|
|
1092
|
+
...(input.scriptModeConfig != null && {
|
|
1093
|
+
scriptModeConfig: serializeAws_restJson1ScriptModeConfig(input.scriptModeConfig, context),
|
|
1094
|
+
}),
|
|
1095
|
+
};
|
|
1096
|
+
};
|
|
1097
|
+
const serializeAws_restJson1ContainerImage = (input, context) => {
|
|
1098
|
+
return {
|
|
1099
|
+
...(input.uri != null && { uri: input.uri }),
|
|
1100
|
+
};
|
|
1101
|
+
};
|
|
1102
|
+
const serializeAws_restJson1DataSource = (input, context) => {
|
|
1103
|
+
return {
|
|
1104
|
+
...(input.s3DataSource != null && {
|
|
1105
|
+
s3DataSource: serializeAws_restJson1S3DataSource(input.s3DataSource, context),
|
|
1106
|
+
}),
|
|
1107
|
+
};
|
|
1108
|
+
};
|
|
1109
|
+
const serializeAws_restJson1DeviceConfig = (input, context) => {
|
|
1110
|
+
return {
|
|
1111
|
+
...(input.device != null && { device: input.device }),
|
|
1112
|
+
};
|
|
1113
|
+
};
|
|
1114
|
+
const serializeAws_restJson1HyperParameters = (input, context) => {
|
|
1115
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1498
1116
|
if (value === null) {
|
|
1499
1117
|
return acc;
|
|
1500
1118
|
}
|
|
1501
|
-
return
|
|
1119
|
+
return {
|
|
1120
|
+
...acc,
|
|
1121
|
+
[key]: value,
|
|
1122
|
+
};
|
|
1502
1123
|
}, {});
|
|
1503
1124
|
};
|
|
1504
|
-
|
|
1125
|
+
const serializeAws_restJson1InputConfigList = (input, context) => {
|
|
1505
1126
|
return input
|
|
1506
|
-
.filter(
|
|
1507
|
-
.map(
|
|
1127
|
+
.filter((e) => e != null)
|
|
1128
|
+
.map((entry) => {
|
|
1508
1129
|
return serializeAws_restJson1InputFileConfig(entry, context);
|
|
1509
1130
|
});
|
|
1510
1131
|
};
|
|
1511
|
-
|
|
1512
|
-
return
|
|
1132
|
+
const serializeAws_restJson1InputFileConfig = (input, context) => {
|
|
1133
|
+
return {
|
|
1134
|
+
...(input.channelName != null && { channelName: input.channelName }),
|
|
1135
|
+
...(input.contentType != null && { contentType: input.contentType }),
|
|
1136
|
+
...(input.dataSource != null && { dataSource: serializeAws_restJson1DataSource(input.dataSource, context) }),
|
|
1137
|
+
};
|
|
1513
1138
|
};
|
|
1514
|
-
|
|
1515
|
-
return
|
|
1139
|
+
const serializeAws_restJson1InstanceConfig = (input, context) => {
|
|
1140
|
+
return {
|
|
1141
|
+
...(input.instanceCount != null && { instanceCount: input.instanceCount }),
|
|
1142
|
+
...(input.instanceType != null && { instanceType: input.instanceType }),
|
|
1143
|
+
...(input.volumeSizeInGb != null && { volumeSizeInGb: input.volumeSizeInGb }),
|
|
1144
|
+
};
|
|
1516
1145
|
};
|
|
1517
|
-
|
|
1518
|
-
return
|
|
1146
|
+
const serializeAws_restJson1JobCheckpointConfig = (input, context) => {
|
|
1147
|
+
return {
|
|
1148
|
+
...(input.localPath != null && { localPath: input.localPath }),
|
|
1149
|
+
...(input.s3Uri != null && { s3Uri: input.s3Uri }),
|
|
1150
|
+
};
|
|
1519
1151
|
};
|
|
1520
|
-
|
|
1521
|
-
return
|
|
1152
|
+
const serializeAws_restJson1JobOutputDataConfig = (input, context) => {
|
|
1153
|
+
return {
|
|
1154
|
+
...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
|
|
1155
|
+
...(input.s3Path != null && { s3Path: input.s3Path }),
|
|
1156
|
+
};
|
|
1522
1157
|
};
|
|
1523
|
-
|
|
1524
|
-
return
|
|
1158
|
+
const serializeAws_restJson1JobStoppingCondition = (input, context) => {
|
|
1159
|
+
return {
|
|
1160
|
+
...(input.maxRuntimeInSeconds != null && { maxRuntimeInSeconds: input.maxRuntimeInSeconds }),
|
|
1161
|
+
};
|
|
1525
1162
|
};
|
|
1526
|
-
|
|
1527
|
-
return
|
|
1163
|
+
const serializeAws_restJson1S3DataSource = (input, context) => {
|
|
1164
|
+
return {
|
|
1165
|
+
...(input.s3Uri != null && { s3Uri: input.s3Uri }),
|
|
1166
|
+
};
|
|
1528
1167
|
};
|
|
1529
|
-
|
|
1530
|
-
return
|
|
1168
|
+
const serializeAws_restJson1ScriptModeConfig = (input, context) => {
|
|
1169
|
+
return {
|
|
1170
|
+
...(input.compressionType != null && { compressionType: input.compressionType }),
|
|
1171
|
+
...(input.entryPoint != null && { entryPoint: input.entryPoint }),
|
|
1172
|
+
...(input.s3Uri != null && { s3Uri: input.s3Uri }),
|
|
1173
|
+
};
|
|
1531
1174
|
};
|
|
1532
|
-
|
|
1533
|
-
return
|
|
1175
|
+
const serializeAws_restJson1SearchDevicesFilter = (input, context) => {
|
|
1176
|
+
return {
|
|
1177
|
+
...(input.name != null && { name: input.name }),
|
|
1178
|
+
...(input.values != null && { values: serializeAws_restJson1String256List(input.values, context) }),
|
|
1179
|
+
};
|
|
1534
1180
|
};
|
|
1535
|
-
|
|
1181
|
+
const serializeAws_restJson1SearchDevicesFilterList = (input, context) => {
|
|
1536
1182
|
return input
|
|
1537
|
-
.filter(
|
|
1538
|
-
.map(
|
|
1183
|
+
.filter((e) => e != null)
|
|
1184
|
+
.map((entry) => {
|
|
1539
1185
|
return serializeAws_restJson1SearchDevicesFilter(entry, context);
|
|
1540
1186
|
});
|
|
1541
1187
|
};
|
|
1542
|
-
|
|
1543
|
-
return
|
|
1188
|
+
const serializeAws_restJson1SearchJobsFilter = (input, context) => {
|
|
1189
|
+
return {
|
|
1190
|
+
...(input.name != null && { name: input.name }),
|
|
1191
|
+
...(input.operator != null && { operator: input.operator }),
|
|
1192
|
+
...(input.values != null && { values: serializeAws_restJson1String256List(input.values, context) }),
|
|
1193
|
+
};
|
|
1544
1194
|
};
|
|
1545
|
-
|
|
1195
|
+
const serializeAws_restJson1SearchJobsFilterList = (input, context) => {
|
|
1546
1196
|
return input
|
|
1547
|
-
.filter(
|
|
1548
|
-
.map(
|
|
1197
|
+
.filter((e) => e != null)
|
|
1198
|
+
.map((entry) => {
|
|
1549
1199
|
return serializeAws_restJson1SearchJobsFilter(entry, context);
|
|
1550
1200
|
});
|
|
1551
1201
|
};
|
|
1552
|
-
|
|
1553
|
-
return
|
|
1202
|
+
const serializeAws_restJson1SearchQuantumTasksFilter = (input, context) => {
|
|
1203
|
+
return {
|
|
1204
|
+
...(input.name != null && { name: input.name }),
|
|
1205
|
+
...(input.operator != null && { operator: input.operator }),
|
|
1206
|
+
...(input.values != null && { values: serializeAws_restJson1String256List(input.values, context) }),
|
|
1207
|
+
};
|
|
1554
1208
|
};
|
|
1555
|
-
|
|
1209
|
+
const serializeAws_restJson1SearchQuantumTasksFilterList = (input, context) => {
|
|
1556
1210
|
return input
|
|
1557
|
-
.filter(
|
|
1558
|
-
.map(
|
|
1211
|
+
.filter((e) => e != null)
|
|
1212
|
+
.map((entry) => {
|
|
1559
1213
|
return serializeAws_restJson1SearchQuantumTasksFilter(entry, context);
|
|
1560
1214
|
});
|
|
1561
1215
|
};
|
|
1562
|
-
|
|
1216
|
+
const serializeAws_restJson1String256List = (input, context) => {
|
|
1563
1217
|
return input
|
|
1564
|
-
.filter(
|
|
1565
|
-
.map(
|
|
1218
|
+
.filter((e) => e != null)
|
|
1219
|
+
.map((entry) => {
|
|
1566
1220
|
return entry;
|
|
1567
1221
|
});
|
|
1568
1222
|
};
|
|
1569
|
-
|
|
1570
|
-
return Object.entries(input).reduce(
|
|
1571
|
-
var _b;
|
|
1572
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1223
|
+
const serializeAws_restJson1TagsMap = (input, context) => {
|
|
1224
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1573
1225
|
if (value === null) {
|
|
1574
1226
|
return acc;
|
|
1575
1227
|
}
|
|
1576
|
-
return
|
|
1228
|
+
return {
|
|
1229
|
+
...acc,
|
|
1230
|
+
[key]: value,
|
|
1231
|
+
};
|
|
1577
1232
|
}, {});
|
|
1578
1233
|
};
|
|
1579
|
-
|
|
1234
|
+
const deserializeAws_restJson1AlgorithmSpecification = (output, context) => {
|
|
1580
1235
|
return {
|
|
1581
1236
|
containerImage: output.containerImage != null
|
|
1582
1237
|
? deserializeAws_restJson1ContainerImage(output.containerImage, context)
|
|
@@ -1586,22 +1241,22 @@ var deserializeAws_restJson1AlgorithmSpecification = function (output, context)
|
|
|
1586
1241
|
: undefined,
|
|
1587
1242
|
};
|
|
1588
1243
|
};
|
|
1589
|
-
|
|
1244
|
+
const deserializeAws_restJson1ContainerImage = (output, context) => {
|
|
1590
1245
|
return {
|
|
1591
1246
|
uri: __expectString(output.uri),
|
|
1592
1247
|
};
|
|
1593
1248
|
};
|
|
1594
|
-
|
|
1249
|
+
const deserializeAws_restJson1DataSource = (output, context) => {
|
|
1595
1250
|
return {
|
|
1596
1251
|
s3DataSource: output.s3DataSource != null ? deserializeAws_restJson1S3DataSource(output.s3DataSource, context) : undefined,
|
|
1597
1252
|
};
|
|
1598
1253
|
};
|
|
1599
|
-
|
|
1254
|
+
const deserializeAws_restJson1DeviceConfig = (output, context) => {
|
|
1600
1255
|
return {
|
|
1601
1256
|
device: __expectString(output.device),
|
|
1602
1257
|
};
|
|
1603
1258
|
};
|
|
1604
|
-
|
|
1259
|
+
const deserializeAws_restJson1DeviceSummary = (output, context) => {
|
|
1605
1260
|
return {
|
|
1606
1261
|
deviceArn: __expectString(output.deviceArn),
|
|
1607
1262
|
deviceName: __expectString(output.deviceName),
|
|
@@ -1610,10 +1265,10 @@ var deserializeAws_restJson1DeviceSummary = function (output, context) {
|
|
|
1610
1265
|
providerName: __expectString(output.providerName),
|
|
1611
1266
|
};
|
|
1612
1267
|
};
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
.filter(
|
|
1616
|
-
.map(
|
|
1268
|
+
const deserializeAws_restJson1DeviceSummaryList = (output, context) => {
|
|
1269
|
+
const retVal = (output || [])
|
|
1270
|
+
.filter((e) => e != null)
|
|
1271
|
+
.map((entry) => {
|
|
1617
1272
|
if (entry === null) {
|
|
1618
1273
|
return null;
|
|
1619
1274
|
}
|
|
@@ -1621,20 +1276,21 @@ var deserializeAws_restJson1DeviceSummaryList = function (output, context) {
|
|
|
1621
1276
|
});
|
|
1622
1277
|
return retVal;
|
|
1623
1278
|
};
|
|
1624
|
-
|
|
1625
|
-
return Object.entries(output).reduce(
|
|
1626
|
-
var _b;
|
|
1627
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1279
|
+
const deserializeAws_restJson1HyperParameters = (output, context) => {
|
|
1280
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1628
1281
|
if (value === null) {
|
|
1629
1282
|
return acc;
|
|
1630
1283
|
}
|
|
1631
|
-
return
|
|
1284
|
+
return {
|
|
1285
|
+
...acc,
|
|
1286
|
+
[key]: __expectString(value),
|
|
1287
|
+
};
|
|
1632
1288
|
}, {});
|
|
1633
1289
|
};
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
.filter(
|
|
1637
|
-
.map(
|
|
1290
|
+
const deserializeAws_restJson1InputConfigList = (output, context) => {
|
|
1291
|
+
const retVal = (output || [])
|
|
1292
|
+
.filter((e) => e != null)
|
|
1293
|
+
.map((entry) => {
|
|
1638
1294
|
if (entry === null) {
|
|
1639
1295
|
return null;
|
|
1640
1296
|
}
|
|
@@ -1642,37 +1298,37 @@ var deserializeAws_restJson1InputConfigList = function (output, context) {
|
|
|
1642
1298
|
});
|
|
1643
1299
|
return retVal;
|
|
1644
1300
|
};
|
|
1645
|
-
|
|
1301
|
+
const deserializeAws_restJson1InputFileConfig = (output, context) => {
|
|
1646
1302
|
return {
|
|
1647
1303
|
channelName: __expectString(output.channelName),
|
|
1648
1304
|
contentType: __expectString(output.contentType),
|
|
1649
1305
|
dataSource: output.dataSource != null ? deserializeAws_restJson1DataSource(output.dataSource, context) : undefined,
|
|
1650
1306
|
};
|
|
1651
1307
|
};
|
|
1652
|
-
|
|
1308
|
+
const deserializeAws_restJson1InstanceConfig = (output, context) => {
|
|
1653
1309
|
return {
|
|
1654
1310
|
instanceCount: __expectInt32(output.instanceCount),
|
|
1655
1311
|
instanceType: __expectString(output.instanceType),
|
|
1656
1312
|
volumeSizeInGb: __expectInt32(output.volumeSizeInGb),
|
|
1657
1313
|
};
|
|
1658
1314
|
};
|
|
1659
|
-
|
|
1315
|
+
const deserializeAws_restJson1JobCheckpointConfig = (output, context) => {
|
|
1660
1316
|
return {
|
|
1661
1317
|
localPath: __expectString(output.localPath),
|
|
1662
1318
|
s3Uri: __expectString(output.s3Uri),
|
|
1663
1319
|
};
|
|
1664
1320
|
};
|
|
1665
|
-
|
|
1321
|
+
const deserializeAws_restJson1JobEventDetails = (output, context) => {
|
|
1666
1322
|
return {
|
|
1667
1323
|
eventType: __expectString(output.eventType),
|
|
1668
1324
|
message: __expectString(output.message),
|
|
1669
1325
|
timeOfEvent: output.timeOfEvent != null ? __expectNonNull(__parseRfc3339DateTime(output.timeOfEvent)) : undefined,
|
|
1670
1326
|
};
|
|
1671
1327
|
};
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
.filter(
|
|
1675
|
-
.map(
|
|
1328
|
+
const deserializeAws_restJson1JobEvents = (output, context) => {
|
|
1329
|
+
const retVal = (output || [])
|
|
1330
|
+
.filter((e) => e != null)
|
|
1331
|
+
.map((entry) => {
|
|
1676
1332
|
if (entry === null) {
|
|
1677
1333
|
return null;
|
|
1678
1334
|
}
|
|
@@ -1680,18 +1336,18 @@ var deserializeAws_restJson1JobEvents = function (output, context) {
|
|
|
1680
1336
|
});
|
|
1681
1337
|
return retVal;
|
|
1682
1338
|
};
|
|
1683
|
-
|
|
1339
|
+
const deserializeAws_restJson1JobOutputDataConfig = (output, context) => {
|
|
1684
1340
|
return {
|
|
1685
1341
|
kmsKeyId: __expectString(output.kmsKeyId),
|
|
1686
1342
|
s3Path: __expectString(output.s3Path),
|
|
1687
1343
|
};
|
|
1688
1344
|
};
|
|
1689
|
-
|
|
1345
|
+
const deserializeAws_restJson1JobStoppingCondition = (output, context) => {
|
|
1690
1346
|
return {
|
|
1691
1347
|
maxRuntimeInSeconds: __expectInt32(output.maxRuntimeInSeconds),
|
|
1692
1348
|
};
|
|
1693
1349
|
};
|
|
1694
|
-
|
|
1350
|
+
const deserializeAws_restJson1JobSummary = (output, context) => {
|
|
1695
1351
|
return {
|
|
1696
1352
|
createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTime(output.createdAt)) : undefined,
|
|
1697
1353
|
device: __expectString(output.device),
|
|
@@ -1703,10 +1359,10 @@ var deserializeAws_restJson1JobSummary = function (output, context) {
|
|
|
1703
1359
|
tags: output.tags != null ? deserializeAws_restJson1TagsMap(output.tags, context) : undefined,
|
|
1704
1360
|
};
|
|
1705
1361
|
};
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
.filter(
|
|
1709
|
-
.map(
|
|
1362
|
+
const deserializeAws_restJson1JobSummaryList = (output, context) => {
|
|
1363
|
+
const retVal = (output || [])
|
|
1364
|
+
.filter((e) => e != null)
|
|
1365
|
+
.map((entry) => {
|
|
1710
1366
|
if (entry === null) {
|
|
1711
1367
|
return null;
|
|
1712
1368
|
}
|
|
@@ -1714,7 +1370,7 @@ var deserializeAws_restJson1JobSummaryList = function (output, context) {
|
|
|
1714
1370
|
});
|
|
1715
1371
|
return retVal;
|
|
1716
1372
|
};
|
|
1717
|
-
|
|
1373
|
+
const deserializeAws_restJson1QuantumTaskSummary = (output, context) => {
|
|
1718
1374
|
return {
|
|
1719
1375
|
createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTime(output.createdAt)) : undefined,
|
|
1720
1376
|
deviceArn: __expectString(output.deviceArn),
|
|
@@ -1727,10 +1383,10 @@ var deserializeAws_restJson1QuantumTaskSummary = function (output, context) {
|
|
|
1727
1383
|
tags: output.tags != null ? deserializeAws_restJson1TagsMap(output.tags, context) : undefined,
|
|
1728
1384
|
};
|
|
1729
1385
|
};
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
.filter(
|
|
1733
|
-
.map(
|
|
1386
|
+
const deserializeAws_restJson1QuantumTaskSummaryList = (output, context) => {
|
|
1387
|
+
const retVal = (output || [])
|
|
1388
|
+
.filter((e) => e != null)
|
|
1389
|
+
.map((entry) => {
|
|
1734
1390
|
if (entry === null) {
|
|
1735
1391
|
return null;
|
|
1736
1392
|
}
|
|
@@ -1738,79 +1394,62 @@ var deserializeAws_restJson1QuantumTaskSummaryList = function (output, context)
|
|
|
1738
1394
|
});
|
|
1739
1395
|
return retVal;
|
|
1740
1396
|
};
|
|
1741
|
-
|
|
1397
|
+
const deserializeAws_restJson1S3DataSource = (output, context) => {
|
|
1742
1398
|
return {
|
|
1743
1399
|
s3Uri: __expectString(output.s3Uri),
|
|
1744
1400
|
};
|
|
1745
1401
|
};
|
|
1746
|
-
|
|
1402
|
+
const deserializeAws_restJson1ScriptModeConfig = (output, context) => {
|
|
1747
1403
|
return {
|
|
1748
1404
|
compressionType: __expectString(output.compressionType),
|
|
1749
1405
|
entryPoint: __expectString(output.entryPoint),
|
|
1750
1406
|
s3Uri: __expectString(output.s3Uri),
|
|
1751
1407
|
};
|
|
1752
1408
|
};
|
|
1753
|
-
|
|
1754
|
-
return Object.entries(output).reduce(
|
|
1755
|
-
var _b;
|
|
1756
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1409
|
+
const deserializeAws_restJson1TagsMap = (output, context) => {
|
|
1410
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1757
1411
|
if (value === null) {
|
|
1758
1412
|
return acc;
|
|
1759
1413
|
}
|
|
1760
|
-
return
|
|
1414
|
+
return {
|
|
1415
|
+
...acc,
|
|
1416
|
+
[key]: __expectString(value),
|
|
1417
|
+
};
|
|
1761
1418
|
}, {});
|
|
1762
1419
|
};
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
});
|
|
1771
|
-
};
|
|
1772
|
-
var collectBody = function (streamBody, context) {
|
|
1773
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1420
|
+
const deserializeMetadata = (output) => ({
|
|
1421
|
+
httpStatusCode: output.statusCode,
|
|
1422
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1423
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1424
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1425
|
+
});
|
|
1426
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
1774
1427
|
if (streamBody instanceof Uint8Array) {
|
|
1775
1428
|
return Promise.resolve(streamBody);
|
|
1776
1429
|
}
|
|
1777
1430
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1778
1431
|
};
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
}
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
});
|
|
1432
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1433
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1434
|
+
value !== null &&
|
|
1435
|
+
value !== "" &&
|
|
1436
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1437
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1438
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1439
|
+
if (encoded.length) {
|
|
1440
|
+
return JSON.parse(encoded);
|
|
1441
|
+
}
|
|
1442
|
+
return {};
|
|
1443
|
+
});
|
|
1444
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1445
|
+
const value = await parseBody(errorBody, context);
|
|
1446
|
+
value.message = value.message ?? value.Message;
|
|
1447
|
+
return value;
|
|
1796
1448
|
};
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
switch (_b.label) {
|
|
1802
|
-
case 0: return [4, parseBody(errorBody, context)];
|
|
1803
|
-
case 1:
|
|
1804
|
-
value = _b.sent();
|
|
1805
|
-
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1806
|
-
return [2, value];
|
|
1807
|
-
}
|
|
1808
|
-
});
|
|
1809
|
-
}); };
|
|
1810
|
-
var loadRestJsonErrorCode = function (output, data) {
|
|
1811
|
-
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1812
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
1813
|
-
var cleanValue = rawValue;
|
|
1449
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1450
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1451
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1452
|
+
let cleanValue = rawValue;
|
|
1814
1453
|
if (typeof cleanValue === "number") {
|
|
1815
1454
|
cleanValue = cleanValue.toString();
|
|
1816
1455
|
}
|
|
@@ -1825,7 +1464,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
1825
1464
|
}
|
|
1826
1465
|
return cleanValue;
|
|
1827
1466
|
};
|
|
1828
|
-
|
|
1467
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1829
1468
|
if (headerKey !== undefined) {
|
|
1830
1469
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1831
1470
|
}
|