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