@aws-sdk/client-sagemaker-a2i-runtime 3.180.0 → 3.183.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 +20 -0
- package/dist-cjs/protocols/Aws_restJson1.js +11 -5
- package/dist-es/SageMakerA2IRuntime.js +22 -29
- package/dist-es/SageMakerA2IRuntimeClient.js +22 -28
- package/dist-es/commands/DeleteHumanLoopCommand.js +21 -28
- package/dist-es/commands/DescribeHumanLoopCommand.js +21 -28
- package/dist-es/commands/ListHumanLoopsCommand.js +21 -28
- package/dist-es/commands/StartHumanLoopCommand.js +21 -28
- package/dist-es/commands/StopHumanLoopCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/SageMakerA2IRuntimeServiceException.js +5 -10
- package/dist-es/models/models_0.js +114 -87
- package/dist-es/pagination/ListHumanLoopsPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +441 -593
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,595 +1,448 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, parseRfc3339DateTime as __parseRfc3339DateTime, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
5
4
|
import { SageMakerA2IRuntimeServiceException as __BaseException } from "../models/SageMakerA2IRuntimeServiceException";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
method: "DELETE",
|
|
21
|
-
headers: headers,
|
|
22
|
-
path: resolvedPath,
|
|
23
|
-
body: body,
|
|
24
|
-
})];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}); };
|
|
28
|
-
export var serializeAws_restJson1DescribeHumanLoopCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
29
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
30
|
-
return __generator(this, function (_c) {
|
|
31
|
-
switch (_c.label) {
|
|
32
|
-
case 0: return [4, context.endpoint()];
|
|
33
|
-
case 1:
|
|
34
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
35
|
-
headers = {};
|
|
36
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/human-loops/{HumanLoopName}";
|
|
37
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "HumanLoopName", function () { return input.HumanLoopName; }, "{HumanLoopName}", false);
|
|
38
|
-
return [2, new __HttpRequest({
|
|
39
|
-
protocol: protocol,
|
|
40
|
-
hostname: hostname,
|
|
41
|
-
port: port,
|
|
42
|
-
method: "GET",
|
|
43
|
-
headers: headers,
|
|
44
|
-
path: resolvedPath,
|
|
45
|
-
body: body,
|
|
46
|
-
})];
|
|
47
|
-
}
|
|
5
|
+
export const serializeAws_restJson1DeleteHumanLoopCommand = async (input, context) => {
|
|
6
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
|
+
const headers = {};
|
|
8
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops/{HumanLoopName}";
|
|
9
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "HumanLoopName", () => input.HumanLoopName, "{HumanLoopName}", false);
|
|
10
|
+
let body;
|
|
11
|
+
return new __HttpRequest({
|
|
12
|
+
protocol,
|
|
13
|
+
hostname,
|
|
14
|
+
port,
|
|
15
|
+
method: "DELETE",
|
|
16
|
+
headers,
|
|
17
|
+
path: resolvedPath,
|
|
18
|
+
body,
|
|
48
19
|
});
|
|
49
|
-
}
|
|
50
|
-
export
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
CreationTimeBefore: [
|
|
65
|
-
function () { return input.CreationTimeBefore !== void 0; },
|
|
66
|
-
function () { return (input.CreationTimeBefore.toISOString().split(".")[0] + "Z").toString(); },
|
|
67
|
-
],
|
|
68
|
-
FlowDefinitionArn: [, input.FlowDefinitionArn],
|
|
69
|
-
SortOrder: [, input.SortOrder],
|
|
70
|
-
NextToken: [, input.NextToken],
|
|
71
|
-
MaxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
|
|
72
|
-
});
|
|
73
|
-
return [2, new __HttpRequest({
|
|
74
|
-
protocol: protocol,
|
|
75
|
-
hostname: hostname,
|
|
76
|
-
port: port,
|
|
77
|
-
method: "GET",
|
|
78
|
-
headers: headers,
|
|
79
|
-
path: resolvedPath,
|
|
80
|
-
query: query,
|
|
81
|
-
body: body,
|
|
82
|
-
})];
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
}); };
|
|
86
|
-
export var serializeAws_restJson1StartHumanLoopCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
87
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
88
|
-
return __generator(this, function (_c) {
|
|
89
|
-
switch (_c.label) {
|
|
90
|
-
case 0: return [4, context.endpoint()];
|
|
91
|
-
case 1:
|
|
92
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
93
|
-
headers = {
|
|
94
|
-
"content-type": "application/json",
|
|
95
|
-
};
|
|
96
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/human-loops";
|
|
97
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.DataAttributes != null && {
|
|
98
|
-
DataAttributes: serializeAws_restJson1HumanLoopDataAttributes(input.DataAttributes, context),
|
|
99
|
-
})), (input.FlowDefinitionArn != null && { FlowDefinitionArn: input.FlowDefinitionArn })), (input.HumanLoopInput != null && {
|
|
100
|
-
HumanLoopInput: serializeAws_restJson1HumanLoopInput(input.HumanLoopInput, context),
|
|
101
|
-
})), (input.HumanLoopName != null && { HumanLoopName: input.HumanLoopName })));
|
|
102
|
-
return [2, new __HttpRequest({
|
|
103
|
-
protocol: protocol,
|
|
104
|
-
hostname: hostname,
|
|
105
|
-
port: port,
|
|
106
|
-
method: "POST",
|
|
107
|
-
headers: headers,
|
|
108
|
-
path: resolvedPath,
|
|
109
|
-
body: body,
|
|
110
|
-
})];
|
|
111
|
-
}
|
|
20
|
+
};
|
|
21
|
+
export const serializeAws_restJson1DescribeHumanLoopCommand = async (input, context) => {
|
|
22
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
23
|
+
const headers = {};
|
|
24
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops/{HumanLoopName}";
|
|
25
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "HumanLoopName", () => input.HumanLoopName, "{HumanLoopName}", false);
|
|
26
|
+
let body;
|
|
27
|
+
return new __HttpRequest({
|
|
28
|
+
protocol,
|
|
29
|
+
hostname,
|
|
30
|
+
port,
|
|
31
|
+
method: "GET",
|
|
32
|
+
headers,
|
|
33
|
+
path: resolvedPath,
|
|
34
|
+
body,
|
|
112
35
|
});
|
|
113
|
-
}
|
|
114
|
-
export
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
headers: headers,
|
|
132
|
-
path: resolvedPath,
|
|
133
|
-
body: body,
|
|
134
|
-
})];
|
|
135
|
-
}
|
|
36
|
+
};
|
|
37
|
+
export const serializeAws_restJson1ListHumanLoopsCommand = async (input, context) => {
|
|
38
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
39
|
+
const headers = {};
|
|
40
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops";
|
|
41
|
+
const query = map({
|
|
42
|
+
CreationTimeAfter: [
|
|
43
|
+
() => input.CreationTimeAfter !== void 0,
|
|
44
|
+
() => (input.CreationTimeAfter.toISOString().split(".")[0] + "Z").toString(),
|
|
45
|
+
],
|
|
46
|
+
CreationTimeBefore: [
|
|
47
|
+
() => input.CreationTimeBefore !== void 0,
|
|
48
|
+
() => (input.CreationTimeBefore.toISOString().split(".")[0] + "Z").toString(),
|
|
49
|
+
],
|
|
50
|
+
FlowDefinitionArn: [, input.FlowDefinitionArn],
|
|
51
|
+
SortOrder: [, input.SortOrder],
|
|
52
|
+
NextToken: [, input.NextToken],
|
|
53
|
+
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
136
54
|
});
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
$metadata: deserializeMetadata(output),
|
|
148
|
-
});
|
|
149
|
-
return [4, collectBody(output.body, context)];
|
|
150
|
-
case 1:
|
|
151
|
-
_a.sent();
|
|
152
|
-
return [2, contents];
|
|
153
|
-
}
|
|
55
|
+
let body;
|
|
56
|
+
return new __HttpRequest({
|
|
57
|
+
protocol,
|
|
58
|
+
hostname,
|
|
59
|
+
port,
|
|
60
|
+
method: "GET",
|
|
61
|
+
headers,
|
|
62
|
+
path: resolvedPath,
|
|
63
|
+
query,
|
|
64
|
+
body,
|
|
154
65
|
});
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
173
|
-
case "com.amazonaws.sagemakera2iruntime#ResourceNotFoundException": return [3, 4];
|
|
174
|
-
case "ThrottlingException": return [3, 6];
|
|
175
|
-
case "com.amazonaws.sagemakera2iruntime#ThrottlingException": return [3, 6];
|
|
176
|
-
case "ValidationException": return [3, 8];
|
|
177
|
-
case "com.amazonaws.sagemakera2iruntime#ValidationException": return [3, 8];
|
|
178
|
-
}
|
|
179
|
-
return [3, 10];
|
|
180
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
181
|
-
case 3: throw _d.sent();
|
|
182
|
-
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
183
|
-
case 5: throw _d.sent();
|
|
184
|
-
case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
185
|
-
case 7: throw _d.sent();
|
|
186
|
-
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
187
|
-
case 9: throw _d.sent();
|
|
188
|
-
case 10:
|
|
189
|
-
parsedBody = parsedOutput.body;
|
|
190
|
-
throwDefaultError({
|
|
191
|
-
output: output,
|
|
192
|
-
parsedBody: parsedBody,
|
|
193
|
-
exceptionCtor: __BaseException,
|
|
194
|
-
errorCode: errorCode,
|
|
195
|
-
});
|
|
196
|
-
_d.label = 11;
|
|
197
|
-
case 11: return [2];
|
|
198
|
-
}
|
|
66
|
+
};
|
|
67
|
+
export const serializeAws_restJson1StartHumanLoopCommand = async (input, context) => {
|
|
68
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
69
|
+
const headers = {
|
|
70
|
+
"content-type": "application/json",
|
|
71
|
+
};
|
|
72
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops";
|
|
73
|
+
let body;
|
|
74
|
+
body = JSON.stringify({
|
|
75
|
+
...(input.DataAttributes != null && {
|
|
76
|
+
DataAttributes: serializeAws_restJson1HumanLoopDataAttributes(input.DataAttributes, context),
|
|
77
|
+
}),
|
|
78
|
+
...(input.FlowDefinitionArn != null && { FlowDefinitionArn: input.FlowDefinitionArn }),
|
|
79
|
+
...(input.HumanLoopInput != null && {
|
|
80
|
+
HumanLoopInput: serializeAws_restJson1HumanLoopInput(input.HumanLoopInput, context),
|
|
81
|
+
}),
|
|
82
|
+
...(input.HumanLoopName != null && { HumanLoopName: input.HumanLoopName }),
|
|
199
83
|
});
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}
|
|
209
|
-
contents = map({
|
|
210
|
-
$metadata: deserializeMetadata(output),
|
|
211
|
-
});
|
|
212
|
-
_a = __expectNonNull;
|
|
213
|
-
_b = __expectObject;
|
|
214
|
-
return [4, parseBody(output.body, context)];
|
|
215
|
-
case 1:
|
|
216
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
217
|
-
if (data.CreationTime != null) {
|
|
218
|
-
contents.CreationTime = __expectNonNull(__parseRfc3339DateTime(data.CreationTime));
|
|
219
|
-
}
|
|
220
|
-
if (data.FailureCode != null) {
|
|
221
|
-
contents.FailureCode = __expectString(data.FailureCode);
|
|
222
|
-
}
|
|
223
|
-
if (data.FailureReason != null) {
|
|
224
|
-
contents.FailureReason = __expectString(data.FailureReason);
|
|
225
|
-
}
|
|
226
|
-
if (data.FlowDefinitionArn != null) {
|
|
227
|
-
contents.FlowDefinitionArn = __expectString(data.FlowDefinitionArn);
|
|
228
|
-
}
|
|
229
|
-
if (data.HumanLoopArn != null) {
|
|
230
|
-
contents.HumanLoopArn = __expectString(data.HumanLoopArn);
|
|
231
|
-
}
|
|
232
|
-
if (data.HumanLoopName != null) {
|
|
233
|
-
contents.HumanLoopName = __expectString(data.HumanLoopName);
|
|
234
|
-
}
|
|
235
|
-
if (data.HumanLoopOutput != null) {
|
|
236
|
-
contents.HumanLoopOutput = deserializeAws_restJson1HumanLoopOutput(data.HumanLoopOutput, context);
|
|
237
|
-
}
|
|
238
|
-
if (data.HumanLoopStatus != null) {
|
|
239
|
-
contents.HumanLoopStatus = __expectString(data.HumanLoopStatus);
|
|
240
|
-
}
|
|
241
|
-
return [2, contents];
|
|
242
|
-
}
|
|
84
|
+
return new __HttpRequest({
|
|
85
|
+
protocol,
|
|
86
|
+
hostname,
|
|
87
|
+
port,
|
|
88
|
+
method: "POST",
|
|
89
|
+
headers,
|
|
90
|
+
path: resolvedPath,
|
|
91
|
+
body,
|
|
243
92
|
});
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
case 1:
|
|
255
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
256
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
257
|
-
_b = errorCode;
|
|
258
|
-
switch (_b) {
|
|
259
|
-
case "InternalServerException": return [3, 2];
|
|
260
|
-
case "com.amazonaws.sagemakera2iruntime#InternalServerException": return [3, 2];
|
|
261
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
262
|
-
case "com.amazonaws.sagemakera2iruntime#ResourceNotFoundException": return [3, 4];
|
|
263
|
-
case "ThrottlingException": return [3, 6];
|
|
264
|
-
case "com.amazonaws.sagemakera2iruntime#ThrottlingException": return [3, 6];
|
|
265
|
-
case "ValidationException": return [3, 8];
|
|
266
|
-
case "com.amazonaws.sagemakera2iruntime#ValidationException": return [3, 8];
|
|
267
|
-
}
|
|
268
|
-
return [3, 10];
|
|
269
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
270
|
-
case 3: throw _d.sent();
|
|
271
|
-
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
272
|
-
case 5: throw _d.sent();
|
|
273
|
-
case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
274
|
-
case 7: throw _d.sent();
|
|
275
|
-
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
276
|
-
case 9: throw _d.sent();
|
|
277
|
-
case 10:
|
|
278
|
-
parsedBody = parsedOutput.body;
|
|
279
|
-
throwDefaultError({
|
|
280
|
-
output: output,
|
|
281
|
-
parsedBody: parsedBody,
|
|
282
|
-
exceptionCtor: __BaseException,
|
|
283
|
-
errorCode: errorCode,
|
|
284
|
-
});
|
|
285
|
-
_d.label = 11;
|
|
286
|
-
case 11: return [2];
|
|
287
|
-
}
|
|
93
|
+
};
|
|
94
|
+
export const serializeAws_restJson1StopHumanLoopCommand = async (input, context) => {
|
|
95
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
96
|
+
const headers = {
|
|
97
|
+
"content-type": "application/json",
|
|
98
|
+
};
|
|
99
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops/stop";
|
|
100
|
+
let body;
|
|
101
|
+
body = JSON.stringify({
|
|
102
|
+
...(input.HumanLoopName != null && { HumanLoopName: input.HumanLoopName }),
|
|
288
103
|
});
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
}
|
|
298
|
-
contents = map({
|
|
299
|
-
$metadata: deserializeMetadata(output),
|
|
300
|
-
});
|
|
301
|
-
_a = __expectNonNull;
|
|
302
|
-
_b = __expectObject;
|
|
303
|
-
return [4, parseBody(output.body, context)];
|
|
304
|
-
case 1:
|
|
305
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
306
|
-
if (data.HumanLoopSummaries != null) {
|
|
307
|
-
contents.HumanLoopSummaries = deserializeAws_restJson1HumanLoopSummaries(data.HumanLoopSummaries, context);
|
|
308
|
-
}
|
|
309
|
-
if (data.NextToken != null) {
|
|
310
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
311
|
-
}
|
|
312
|
-
return [2, contents];
|
|
313
|
-
}
|
|
104
|
+
return new __HttpRequest({
|
|
105
|
+
protocol,
|
|
106
|
+
hostname,
|
|
107
|
+
port,
|
|
108
|
+
method: "POST",
|
|
109
|
+
headers,
|
|
110
|
+
path: resolvedPath,
|
|
111
|
+
body,
|
|
314
112
|
});
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
_a = [__assign({}, output)];
|
|
323
|
-
_c = {};
|
|
324
|
-
return [4, parseBody(output.body, context)];
|
|
325
|
-
case 1:
|
|
326
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
327
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
328
|
-
_b = errorCode;
|
|
329
|
-
switch (_b) {
|
|
330
|
-
case "InternalServerException": return [3, 2];
|
|
331
|
-
case "com.amazonaws.sagemakera2iruntime#InternalServerException": return [3, 2];
|
|
332
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
333
|
-
case "com.amazonaws.sagemakera2iruntime#ResourceNotFoundException": return [3, 4];
|
|
334
|
-
case "ThrottlingException": return [3, 6];
|
|
335
|
-
case "com.amazonaws.sagemakera2iruntime#ThrottlingException": return [3, 6];
|
|
336
|
-
case "ValidationException": return [3, 8];
|
|
337
|
-
case "com.amazonaws.sagemakera2iruntime#ValidationException": return [3, 8];
|
|
338
|
-
}
|
|
339
|
-
return [3, 10];
|
|
340
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
341
|
-
case 3: throw _d.sent();
|
|
342
|
-
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
343
|
-
case 5: throw _d.sent();
|
|
344
|
-
case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
345
|
-
case 7: throw _d.sent();
|
|
346
|
-
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
347
|
-
case 9: throw _d.sent();
|
|
348
|
-
case 10:
|
|
349
|
-
parsedBody = parsedOutput.body;
|
|
350
|
-
throwDefaultError({
|
|
351
|
-
output: output,
|
|
352
|
-
parsedBody: parsedBody,
|
|
353
|
-
exceptionCtor: __BaseException,
|
|
354
|
-
errorCode: errorCode,
|
|
355
|
-
});
|
|
356
|
-
_d.label = 11;
|
|
357
|
-
case 11: return [2];
|
|
358
|
-
}
|
|
113
|
+
};
|
|
114
|
+
export const deserializeAws_restJson1DeleteHumanLoopCommand = async (output, context) => {
|
|
115
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
116
|
+
return deserializeAws_restJson1DeleteHumanLoopCommandError(output, context);
|
|
117
|
+
}
|
|
118
|
+
const contents = map({
|
|
119
|
+
$metadata: deserializeMetadata(output),
|
|
359
120
|
});
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
121
|
+
await collectBody(output.body, context);
|
|
122
|
+
return contents;
|
|
123
|
+
};
|
|
124
|
+
const deserializeAws_restJson1DeleteHumanLoopCommandError = async (output, context) => {
|
|
125
|
+
const parsedOutput = {
|
|
126
|
+
...output,
|
|
127
|
+
body: await parseErrorBody(output.body, context),
|
|
128
|
+
};
|
|
129
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
130
|
+
switch (errorCode) {
|
|
131
|
+
case "InternalServerException":
|
|
132
|
+
case "com.amazonaws.sagemakera2iruntime#InternalServerException":
|
|
133
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
134
|
+
case "ResourceNotFoundException":
|
|
135
|
+
case "com.amazonaws.sagemakera2iruntime#ResourceNotFoundException":
|
|
136
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
137
|
+
case "ThrottlingException":
|
|
138
|
+
case "com.amazonaws.sagemakera2iruntime#ThrottlingException":
|
|
139
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
140
|
+
case "ValidationException":
|
|
141
|
+
case "com.amazonaws.sagemakera2iruntime#ValidationException":
|
|
142
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
143
|
+
default:
|
|
144
|
+
const parsedBody = parsedOutput.body;
|
|
145
|
+
throwDefaultError({
|
|
146
|
+
output,
|
|
147
|
+
parsedBody,
|
|
148
|
+
exceptionCtor: __BaseException,
|
|
149
|
+
errorCode,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
export const deserializeAws_restJson1DescribeHumanLoopCommand = async (output, context) => {
|
|
154
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
155
|
+
return deserializeAws_restJson1DescribeHumanLoopCommandError(output, context);
|
|
156
|
+
}
|
|
157
|
+
const contents = map({
|
|
158
|
+
$metadata: deserializeMetadata(output),
|
|
382
159
|
});
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
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
|
-
|
|
160
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
161
|
+
if (data.CreationTime != null) {
|
|
162
|
+
contents.CreationTime = __expectNonNull(__parseRfc3339DateTime(data.CreationTime));
|
|
163
|
+
}
|
|
164
|
+
if (data.FailureCode != null) {
|
|
165
|
+
contents.FailureCode = __expectString(data.FailureCode);
|
|
166
|
+
}
|
|
167
|
+
if (data.FailureReason != null) {
|
|
168
|
+
contents.FailureReason = __expectString(data.FailureReason);
|
|
169
|
+
}
|
|
170
|
+
if (data.FlowDefinitionArn != null) {
|
|
171
|
+
contents.FlowDefinitionArn = __expectString(data.FlowDefinitionArn);
|
|
172
|
+
}
|
|
173
|
+
if (data.HumanLoopArn != null) {
|
|
174
|
+
contents.HumanLoopArn = __expectString(data.HumanLoopArn);
|
|
175
|
+
}
|
|
176
|
+
if (data.HumanLoopName != null) {
|
|
177
|
+
contents.HumanLoopName = __expectString(data.HumanLoopName);
|
|
178
|
+
}
|
|
179
|
+
if (data.HumanLoopOutput != null) {
|
|
180
|
+
contents.HumanLoopOutput = deserializeAws_restJson1HumanLoopOutput(data.HumanLoopOutput, context);
|
|
181
|
+
}
|
|
182
|
+
if (data.HumanLoopStatus != null) {
|
|
183
|
+
contents.HumanLoopStatus = __expectString(data.HumanLoopStatus);
|
|
184
|
+
}
|
|
185
|
+
return contents;
|
|
186
|
+
};
|
|
187
|
+
const deserializeAws_restJson1DescribeHumanLoopCommandError = async (output, context) => {
|
|
188
|
+
const parsedOutput = {
|
|
189
|
+
...output,
|
|
190
|
+
body: await parseErrorBody(output.body, context),
|
|
191
|
+
};
|
|
192
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
193
|
+
switch (errorCode) {
|
|
194
|
+
case "InternalServerException":
|
|
195
|
+
case "com.amazonaws.sagemakera2iruntime#InternalServerException":
|
|
196
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
197
|
+
case "ResourceNotFoundException":
|
|
198
|
+
case "com.amazonaws.sagemakera2iruntime#ResourceNotFoundException":
|
|
199
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
200
|
+
case "ThrottlingException":
|
|
201
|
+
case "com.amazonaws.sagemakera2iruntime#ThrottlingException":
|
|
202
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
203
|
+
case "ValidationException":
|
|
204
|
+
case "com.amazonaws.sagemakera2iruntime#ValidationException":
|
|
205
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
206
|
+
default:
|
|
207
|
+
const parsedBody = parsedOutput.body;
|
|
208
|
+
throwDefaultError({
|
|
209
|
+
output,
|
|
210
|
+
parsedBody,
|
|
211
|
+
exceptionCtor: __BaseException,
|
|
212
|
+
errorCode,
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
export const deserializeAws_restJson1ListHumanLoopsCommand = async (output, context) => {
|
|
217
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
218
|
+
return deserializeAws_restJson1ListHumanLoopsCommandError(output, context);
|
|
219
|
+
}
|
|
220
|
+
const contents = map({
|
|
221
|
+
$metadata: deserializeMetadata(output),
|
|
431
222
|
});
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
223
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
224
|
+
if (data.HumanLoopSummaries != null) {
|
|
225
|
+
contents.HumanLoopSummaries = deserializeAws_restJson1HumanLoopSummaries(data.HumanLoopSummaries, context);
|
|
226
|
+
}
|
|
227
|
+
if (data.NextToken != null) {
|
|
228
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
229
|
+
}
|
|
230
|
+
return contents;
|
|
231
|
+
};
|
|
232
|
+
const deserializeAws_restJson1ListHumanLoopsCommandError = async (output, context) => {
|
|
233
|
+
const parsedOutput = {
|
|
234
|
+
...output,
|
|
235
|
+
body: await parseErrorBody(output.body, context),
|
|
236
|
+
};
|
|
237
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
238
|
+
switch (errorCode) {
|
|
239
|
+
case "InternalServerException":
|
|
240
|
+
case "com.amazonaws.sagemakera2iruntime#InternalServerException":
|
|
241
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
242
|
+
case "ResourceNotFoundException":
|
|
243
|
+
case "com.amazonaws.sagemakera2iruntime#ResourceNotFoundException":
|
|
244
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
245
|
+
case "ThrottlingException":
|
|
246
|
+
case "com.amazonaws.sagemakera2iruntime#ThrottlingException":
|
|
247
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
248
|
+
case "ValidationException":
|
|
249
|
+
case "com.amazonaws.sagemakera2iruntime#ValidationException":
|
|
250
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
251
|
+
default:
|
|
252
|
+
const parsedBody = parsedOutput.body;
|
|
253
|
+
throwDefaultError({
|
|
254
|
+
output,
|
|
255
|
+
parsedBody,
|
|
256
|
+
exceptionCtor: __BaseException,
|
|
257
|
+
errorCode,
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
export const deserializeAws_restJson1StartHumanLoopCommand = async (output, context) => {
|
|
262
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
263
|
+
return deserializeAws_restJson1StartHumanLoopCommandError(output, context);
|
|
264
|
+
}
|
|
265
|
+
const contents = map({
|
|
266
|
+
$metadata: deserializeMetadata(output),
|
|
449
267
|
});
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
return
|
|
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
|
-
|
|
268
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
269
|
+
if (data.HumanLoopArn != null) {
|
|
270
|
+
contents.HumanLoopArn = __expectString(data.HumanLoopArn);
|
|
271
|
+
}
|
|
272
|
+
return contents;
|
|
273
|
+
};
|
|
274
|
+
const deserializeAws_restJson1StartHumanLoopCommandError = async (output, context) => {
|
|
275
|
+
const parsedOutput = {
|
|
276
|
+
...output,
|
|
277
|
+
body: await parseErrorBody(output.body, context),
|
|
278
|
+
};
|
|
279
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
280
|
+
switch (errorCode) {
|
|
281
|
+
case "ConflictException":
|
|
282
|
+
case "com.amazonaws.sagemakera2iruntime#ConflictException":
|
|
283
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
284
|
+
case "InternalServerException":
|
|
285
|
+
case "com.amazonaws.sagemakera2iruntime#InternalServerException":
|
|
286
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
287
|
+
case "ServiceQuotaExceededException":
|
|
288
|
+
case "com.amazonaws.sagemakera2iruntime#ServiceQuotaExceededException":
|
|
289
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
290
|
+
case "ThrottlingException":
|
|
291
|
+
case "com.amazonaws.sagemakera2iruntime#ThrottlingException":
|
|
292
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
293
|
+
case "ValidationException":
|
|
294
|
+
case "com.amazonaws.sagemakera2iruntime#ValidationException":
|
|
295
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
296
|
+
default:
|
|
297
|
+
const parsedBody = parsedOutput.body;
|
|
298
|
+
throwDefaultError({
|
|
299
|
+
output,
|
|
300
|
+
parsedBody,
|
|
301
|
+
exceptionCtor: __BaseException,
|
|
302
|
+
errorCode,
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
export const deserializeAws_restJson1StopHumanLoopCommand = async (output, context) => {
|
|
307
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
308
|
+
return deserializeAws_restJson1StopHumanLoopCommandError(output, context);
|
|
309
|
+
}
|
|
310
|
+
const contents = map({
|
|
311
|
+
$metadata: deserializeMetadata(output),
|
|
494
312
|
});
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
313
|
+
await collectBody(output.body, context);
|
|
314
|
+
return contents;
|
|
315
|
+
};
|
|
316
|
+
const deserializeAws_restJson1StopHumanLoopCommandError = async (output, context) => {
|
|
317
|
+
const parsedOutput = {
|
|
318
|
+
...output,
|
|
319
|
+
body: await parseErrorBody(output.body, context),
|
|
320
|
+
};
|
|
321
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
322
|
+
switch (errorCode) {
|
|
323
|
+
case "InternalServerException":
|
|
324
|
+
case "com.amazonaws.sagemakera2iruntime#InternalServerException":
|
|
325
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
326
|
+
case "ResourceNotFoundException":
|
|
327
|
+
case "com.amazonaws.sagemakera2iruntime#ResourceNotFoundException":
|
|
328
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
329
|
+
case "ThrottlingException":
|
|
330
|
+
case "com.amazonaws.sagemakera2iruntime#ThrottlingException":
|
|
331
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
332
|
+
case "ValidationException":
|
|
333
|
+
case "com.amazonaws.sagemakera2iruntime#ValidationException":
|
|
334
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
335
|
+
default:
|
|
336
|
+
const parsedBody = parsedOutput.body;
|
|
337
|
+
throwDefaultError({
|
|
338
|
+
output,
|
|
339
|
+
parsedBody,
|
|
340
|
+
exceptionCtor: __BaseException,
|
|
341
|
+
errorCode,
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
const map = __map;
|
|
346
|
+
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
347
|
+
const contents = map({});
|
|
348
|
+
const data = parsedOutput.body;
|
|
349
|
+
if (data.Message != null) {
|
|
350
|
+
contents.Message = __expectString(data.Message);
|
|
351
|
+
}
|
|
352
|
+
const exception = new ConflictException({
|
|
353
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
354
|
+
...contents,
|
|
507
355
|
});
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
356
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
357
|
+
};
|
|
358
|
+
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
359
|
+
const contents = map({});
|
|
360
|
+
const data = parsedOutput.body;
|
|
361
|
+
if (data.Message != null) {
|
|
362
|
+
contents.Message = __expectString(data.Message);
|
|
363
|
+
}
|
|
364
|
+
const exception = new InternalServerException({
|
|
365
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
366
|
+
...contents,
|
|
519
367
|
});
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
368
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
369
|
+
};
|
|
370
|
+
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
371
|
+
const contents = map({});
|
|
372
|
+
const data = parsedOutput.body;
|
|
373
|
+
if (data.Message != null) {
|
|
374
|
+
contents.Message = __expectString(data.Message);
|
|
375
|
+
}
|
|
376
|
+
const exception = new ResourceNotFoundException({
|
|
377
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
378
|
+
...contents,
|
|
531
379
|
});
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
380
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
381
|
+
};
|
|
382
|
+
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
383
|
+
const contents = map({});
|
|
384
|
+
const data = parsedOutput.body;
|
|
385
|
+
if (data.Message != null) {
|
|
386
|
+
contents.Message = __expectString(data.Message);
|
|
387
|
+
}
|
|
388
|
+
const exception = new ServiceQuotaExceededException({
|
|
389
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
390
|
+
...contents,
|
|
543
391
|
});
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
392
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
393
|
+
};
|
|
394
|
+
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
395
|
+
const contents = map({});
|
|
396
|
+
const data = parsedOutput.body;
|
|
397
|
+
if (data.Message != null) {
|
|
398
|
+
contents.Message = __expectString(data.Message);
|
|
399
|
+
}
|
|
400
|
+
const exception = new ThrottlingException({
|
|
401
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
402
|
+
...contents,
|
|
555
403
|
});
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
404
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
405
|
+
};
|
|
406
|
+
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
407
|
+
const contents = map({});
|
|
408
|
+
const data = parsedOutput.body;
|
|
409
|
+
if (data.Message != null) {
|
|
410
|
+
contents.Message = __expectString(data.Message);
|
|
411
|
+
}
|
|
412
|
+
const exception = new ValidationException({
|
|
413
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
414
|
+
...contents,
|
|
567
415
|
});
|
|
568
|
-
|
|
569
|
-
|
|
416
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
417
|
+
};
|
|
418
|
+
const serializeAws_restJson1ContentClassifiers = (input, context) => {
|
|
570
419
|
return input
|
|
571
|
-
.filter(
|
|
572
|
-
.map(
|
|
420
|
+
.filter((e) => e != null)
|
|
421
|
+
.map((entry) => {
|
|
573
422
|
return entry;
|
|
574
423
|
});
|
|
575
424
|
};
|
|
576
|
-
|
|
577
|
-
return
|
|
578
|
-
|
|
579
|
-
|
|
425
|
+
const serializeAws_restJson1HumanLoopDataAttributes = (input, context) => {
|
|
426
|
+
return {
|
|
427
|
+
...(input.ContentClassifiers != null && {
|
|
428
|
+
ContentClassifiers: serializeAws_restJson1ContentClassifiers(input.ContentClassifiers, context),
|
|
429
|
+
}),
|
|
430
|
+
};
|
|
580
431
|
};
|
|
581
|
-
|
|
582
|
-
return
|
|
432
|
+
const serializeAws_restJson1HumanLoopInput = (input, context) => {
|
|
433
|
+
return {
|
|
434
|
+
...(input.InputContent != null && { InputContent: input.InputContent }),
|
|
435
|
+
};
|
|
583
436
|
};
|
|
584
|
-
|
|
437
|
+
const deserializeAws_restJson1HumanLoopOutput = (output, context) => {
|
|
585
438
|
return {
|
|
586
439
|
OutputS3Uri: __expectString(output.OutputS3Uri),
|
|
587
440
|
};
|
|
588
441
|
};
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
.filter(
|
|
592
|
-
.map(
|
|
442
|
+
const deserializeAws_restJson1HumanLoopSummaries = (output, context) => {
|
|
443
|
+
const retVal = (output || [])
|
|
444
|
+
.filter((e) => e != null)
|
|
445
|
+
.map((entry) => {
|
|
593
446
|
if (entry === null) {
|
|
594
447
|
return null;
|
|
595
448
|
}
|
|
@@ -597,7 +450,7 @@ var deserializeAws_restJson1HumanLoopSummaries = function (output, context) {
|
|
|
597
450
|
});
|
|
598
451
|
return retVal;
|
|
599
452
|
};
|
|
600
|
-
|
|
453
|
+
const deserializeAws_restJson1HumanLoopSummary = (output, context) => {
|
|
601
454
|
return {
|
|
602
455
|
CreationTime: output.CreationTime != null ? __expectNonNull(__parseRfc3339DateTime(output.CreationTime)) : undefined,
|
|
603
456
|
FailureReason: __expectString(output.FailureReason),
|
|
@@ -606,44 +459,39 @@ var deserializeAws_restJson1HumanLoopSummary = function (output, context) {
|
|
|
606
459
|
HumanLoopStatus: __expectString(output.HumanLoopStatus),
|
|
607
460
|
};
|
|
608
461
|
};
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
});
|
|
617
|
-
};
|
|
618
|
-
var collectBody = function (streamBody, context) {
|
|
619
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
462
|
+
const deserializeMetadata = (output) => ({
|
|
463
|
+
httpStatusCode: output.statusCode,
|
|
464
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
465
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
466
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
467
|
+
});
|
|
468
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
620
469
|
if (streamBody instanceof Uint8Array) {
|
|
621
470
|
return Promise.resolve(streamBody);
|
|
622
471
|
}
|
|
623
472
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
624
473
|
};
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
});
|
|
474
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
475
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
476
|
+
value !== null &&
|
|
477
|
+
value !== "" &&
|
|
478
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
479
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
480
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
481
|
+
if (encoded.length) {
|
|
482
|
+
return JSON.parse(encoded);
|
|
483
|
+
}
|
|
484
|
+
return {};
|
|
485
|
+
});
|
|
486
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
487
|
+
const value = await parseBody(errorBody, context);
|
|
488
|
+
value.message = value.message ?? value.Message;
|
|
489
|
+
return value;
|
|
642
490
|
};
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
491
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
492
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
493
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
494
|
+
let cleanValue = rawValue;
|
|
647
495
|
if (typeof cleanValue === "number") {
|
|
648
496
|
cleanValue = cleanValue.toString();
|
|
649
497
|
}
|
|
@@ -658,7 +506,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
658
506
|
}
|
|
659
507
|
return cleanValue;
|
|
660
508
|
};
|
|
661
|
-
|
|
509
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
662
510
|
if (headerKey !== undefined) {
|
|
663
511
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
664
512
|
}
|