@aws-sdk/client-sagemaker-a2i-runtime 3.310.0 → 3.315.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -43,7 +43,7 @@ const se_ListHumanLoopsCommand = async (input, context) => {
|
|
|
43
43
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
44
44
|
const headers = {};
|
|
45
45
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops";
|
|
46
|
-
const query = map({
|
|
46
|
+
const query = (0, smithy_client_1.map)({
|
|
47
47
|
CreationTimeAfter: [
|
|
48
48
|
() => input.CreationTimeAfter !== void 0,
|
|
49
49
|
() => (input.CreationTimeAfter.toISOString().split(".")[0] + "Z").toString(),
|
|
@@ -77,12 +77,12 @@ const se_StartHumanLoopCommand = async (input, context) => {
|
|
|
77
77
|
};
|
|
78
78
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops";
|
|
79
79
|
let body;
|
|
80
|
-
body = JSON.stringify({
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
});
|
|
80
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
81
|
+
DataAttributes: (_) => (0, smithy_client_1._json)(_),
|
|
82
|
+
FlowDefinitionArn: [],
|
|
83
|
+
HumanLoopInput: (_) => (0, smithy_client_1._json)(_),
|
|
84
|
+
HumanLoopName: [],
|
|
85
|
+
}));
|
|
86
86
|
return new protocol_http_1.HttpRequest({
|
|
87
87
|
protocol,
|
|
88
88
|
hostname,
|
|
@@ -101,9 +101,9 @@ const se_StopHumanLoopCommand = async (input, context) => {
|
|
|
101
101
|
};
|
|
102
102
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops/stop";
|
|
103
103
|
let body;
|
|
104
|
-
body = JSON.stringify({
|
|
105
|
-
|
|
106
|
-
});
|
|
104
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
105
|
+
HumanLoopName: [],
|
|
106
|
+
}));
|
|
107
107
|
return new protocol_http_1.HttpRequest({
|
|
108
108
|
protocol,
|
|
109
109
|
hostname,
|
|
@@ -119,7 +119,7 @@ const de_DeleteHumanLoopCommand = async (output, context) => {
|
|
|
119
119
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
120
120
|
return de_DeleteHumanLoopCommandError(output, context);
|
|
121
121
|
}
|
|
122
|
-
const contents = map({
|
|
122
|
+
const contents = (0, smithy_client_1.map)({
|
|
123
123
|
$metadata: deserializeMetadata(output),
|
|
124
124
|
});
|
|
125
125
|
await collectBody(output.body, context);
|
|
@@ -147,10 +147,9 @@ const de_DeleteHumanLoopCommandError = async (output, context) => {
|
|
|
147
147
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
148
148
|
default:
|
|
149
149
|
const parsedBody = parsedOutput.body;
|
|
150
|
-
|
|
150
|
+
return throwDefaultError({
|
|
151
151
|
output,
|
|
152
152
|
parsedBody,
|
|
153
|
-
exceptionCtor: SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException,
|
|
154
153
|
errorCode,
|
|
155
154
|
});
|
|
156
155
|
}
|
|
@@ -159,34 +158,21 @@ const de_DescribeHumanLoopCommand = async (output, context) => {
|
|
|
159
158
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
160
159
|
return de_DescribeHumanLoopCommandError(output, context);
|
|
161
160
|
}
|
|
162
|
-
const contents = map({
|
|
161
|
+
const contents = (0, smithy_client_1.map)({
|
|
163
162
|
$metadata: deserializeMetadata(output),
|
|
164
163
|
});
|
|
165
164
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
if (data.HumanLoopArn != null) {
|
|
179
|
-
contents.HumanLoopArn = (0, smithy_client_1.expectString)(data.HumanLoopArn);
|
|
180
|
-
}
|
|
181
|
-
if (data.HumanLoopName != null) {
|
|
182
|
-
contents.HumanLoopName = (0, smithy_client_1.expectString)(data.HumanLoopName);
|
|
183
|
-
}
|
|
184
|
-
if (data.HumanLoopOutput != null) {
|
|
185
|
-
contents.HumanLoopOutput = de_HumanLoopOutput(data.HumanLoopOutput, context);
|
|
186
|
-
}
|
|
187
|
-
if (data.HumanLoopStatus != null) {
|
|
188
|
-
contents.HumanLoopStatus = (0, smithy_client_1.expectString)(data.HumanLoopStatus);
|
|
189
|
-
}
|
|
165
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
166
|
+
CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
167
|
+
FailureCode: smithy_client_1.expectString,
|
|
168
|
+
FailureReason: smithy_client_1.expectString,
|
|
169
|
+
FlowDefinitionArn: smithy_client_1.expectString,
|
|
170
|
+
HumanLoopArn: smithy_client_1.expectString,
|
|
171
|
+
HumanLoopName: smithy_client_1.expectString,
|
|
172
|
+
HumanLoopOutput: smithy_client_1._json,
|
|
173
|
+
HumanLoopStatus: smithy_client_1.expectString,
|
|
174
|
+
});
|
|
175
|
+
Object.assign(contents, doc);
|
|
190
176
|
return contents;
|
|
191
177
|
};
|
|
192
178
|
exports.de_DescribeHumanLoopCommand = de_DescribeHumanLoopCommand;
|
|
@@ -211,10 +197,9 @@ const de_DescribeHumanLoopCommandError = async (output, context) => {
|
|
|
211
197
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
212
198
|
default:
|
|
213
199
|
const parsedBody = parsedOutput.body;
|
|
214
|
-
|
|
200
|
+
return throwDefaultError({
|
|
215
201
|
output,
|
|
216
202
|
parsedBody,
|
|
217
|
-
exceptionCtor: SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException,
|
|
218
203
|
errorCode,
|
|
219
204
|
});
|
|
220
205
|
}
|
|
@@ -223,16 +208,15 @@ const de_ListHumanLoopsCommand = async (output, context) => {
|
|
|
223
208
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
224
209
|
return de_ListHumanLoopsCommandError(output, context);
|
|
225
210
|
}
|
|
226
|
-
const contents = map({
|
|
211
|
+
const contents = (0, smithy_client_1.map)({
|
|
227
212
|
$metadata: deserializeMetadata(output),
|
|
228
213
|
});
|
|
229
214
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
}
|
|
215
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
216
|
+
HumanLoopSummaries: (_) => de_HumanLoopSummaries(_, context),
|
|
217
|
+
NextToken: smithy_client_1.expectString,
|
|
218
|
+
});
|
|
219
|
+
Object.assign(contents, doc);
|
|
236
220
|
return contents;
|
|
237
221
|
};
|
|
238
222
|
exports.de_ListHumanLoopsCommand = de_ListHumanLoopsCommand;
|
|
@@ -257,10 +241,9 @@ const de_ListHumanLoopsCommandError = async (output, context) => {
|
|
|
257
241
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
258
242
|
default:
|
|
259
243
|
const parsedBody = parsedOutput.body;
|
|
260
|
-
|
|
244
|
+
return throwDefaultError({
|
|
261
245
|
output,
|
|
262
246
|
parsedBody,
|
|
263
|
-
exceptionCtor: SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException,
|
|
264
247
|
errorCode,
|
|
265
248
|
});
|
|
266
249
|
}
|
|
@@ -269,13 +252,14 @@ const de_StartHumanLoopCommand = async (output, context) => {
|
|
|
269
252
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
270
253
|
return de_StartHumanLoopCommandError(output, context);
|
|
271
254
|
}
|
|
272
|
-
const contents = map({
|
|
255
|
+
const contents = (0, smithy_client_1.map)({
|
|
273
256
|
$metadata: deserializeMetadata(output),
|
|
274
257
|
});
|
|
275
258
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}
|
|
259
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
260
|
+
HumanLoopArn: smithy_client_1.expectString,
|
|
261
|
+
});
|
|
262
|
+
Object.assign(contents, doc);
|
|
279
263
|
return contents;
|
|
280
264
|
};
|
|
281
265
|
exports.de_StartHumanLoopCommand = de_StartHumanLoopCommand;
|
|
@@ -303,10 +287,9 @@ const de_StartHumanLoopCommandError = async (output, context) => {
|
|
|
303
287
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
304
288
|
default:
|
|
305
289
|
const parsedBody = parsedOutput.body;
|
|
306
|
-
|
|
290
|
+
return throwDefaultError({
|
|
307
291
|
output,
|
|
308
292
|
parsedBody,
|
|
309
|
-
exceptionCtor: SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException,
|
|
310
293
|
errorCode,
|
|
311
294
|
});
|
|
312
295
|
}
|
|
@@ -315,7 +298,7 @@ const de_StopHumanLoopCommand = async (output, context) => {
|
|
|
315
298
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
316
299
|
return de_StopHumanLoopCommandError(output, context);
|
|
317
300
|
}
|
|
318
|
-
const contents = map({
|
|
301
|
+
const contents = (0, smithy_client_1.map)({
|
|
319
302
|
$metadata: deserializeMetadata(output),
|
|
320
303
|
});
|
|
321
304
|
await collectBody(output.body, context);
|
|
@@ -343,21 +326,21 @@ const de_StopHumanLoopCommandError = async (output, context) => {
|
|
|
343
326
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
344
327
|
default:
|
|
345
328
|
const parsedBody = parsedOutput.body;
|
|
346
|
-
|
|
329
|
+
return throwDefaultError({
|
|
347
330
|
output,
|
|
348
331
|
parsedBody,
|
|
349
|
-
exceptionCtor: SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException,
|
|
350
332
|
errorCode,
|
|
351
333
|
});
|
|
352
334
|
}
|
|
353
335
|
};
|
|
354
|
-
const
|
|
336
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException);
|
|
355
337
|
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
356
|
-
const contents = map({});
|
|
338
|
+
const contents = (0, smithy_client_1.map)({});
|
|
357
339
|
const data = parsedOutput.body;
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
}
|
|
340
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
341
|
+
Message: smithy_client_1.expectString,
|
|
342
|
+
});
|
|
343
|
+
Object.assign(contents, doc);
|
|
361
344
|
const exception = new models_0_1.ConflictException({
|
|
362
345
|
$metadata: deserializeMetadata(parsedOutput),
|
|
363
346
|
...contents,
|
|
@@ -365,11 +348,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
|
365
348
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
366
349
|
};
|
|
367
350
|
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
368
|
-
const contents = map({});
|
|
351
|
+
const contents = (0, smithy_client_1.map)({});
|
|
369
352
|
const data = parsedOutput.body;
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
}
|
|
353
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
354
|
+
Message: smithy_client_1.expectString,
|
|
355
|
+
});
|
|
356
|
+
Object.assign(contents, doc);
|
|
373
357
|
const exception = new models_0_1.InternalServerException({
|
|
374
358
|
$metadata: deserializeMetadata(parsedOutput),
|
|
375
359
|
...contents,
|
|
@@ -377,11 +361,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
|
377
361
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
378
362
|
};
|
|
379
363
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
380
|
-
const contents = map({});
|
|
364
|
+
const contents = (0, smithy_client_1.map)({});
|
|
381
365
|
const data = parsedOutput.body;
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
}
|
|
366
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
367
|
+
Message: smithy_client_1.expectString,
|
|
368
|
+
});
|
|
369
|
+
Object.assign(contents, doc);
|
|
385
370
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
386
371
|
$metadata: deserializeMetadata(parsedOutput),
|
|
387
372
|
...contents,
|
|
@@ -389,11 +374,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
389
374
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
390
375
|
};
|
|
391
376
|
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
392
|
-
const contents = map({});
|
|
377
|
+
const contents = (0, smithy_client_1.map)({});
|
|
393
378
|
const data = parsedOutput.body;
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
}
|
|
379
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
380
|
+
Message: smithy_client_1.expectString,
|
|
381
|
+
});
|
|
382
|
+
Object.assign(contents, doc);
|
|
397
383
|
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
398
384
|
$metadata: deserializeMetadata(parsedOutput),
|
|
399
385
|
...contents,
|
|
@@ -401,11 +387,12 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
401
387
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
402
388
|
};
|
|
403
389
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
404
|
-
const contents = map({});
|
|
390
|
+
const contents = (0, smithy_client_1.map)({});
|
|
405
391
|
const data = parsedOutput.body;
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
}
|
|
392
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
393
|
+
Message: smithy_client_1.expectString,
|
|
394
|
+
});
|
|
395
|
+
Object.assign(contents, doc);
|
|
409
396
|
const exception = new models_0_1.ThrottlingException({
|
|
410
397
|
$metadata: deserializeMetadata(parsedOutput),
|
|
411
398
|
...contents,
|
|
@@ -413,60 +400,34 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
|
413
400
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
414
401
|
};
|
|
415
402
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
416
|
-
const contents = map({});
|
|
403
|
+
const contents = (0, smithy_client_1.map)({});
|
|
417
404
|
const data = parsedOutput.body;
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
}
|
|
405
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
406
|
+
Message: smithy_client_1.expectString,
|
|
407
|
+
});
|
|
408
|
+
Object.assign(contents, doc);
|
|
421
409
|
const exception = new models_0_1.ValidationException({
|
|
422
410
|
$metadata: deserializeMetadata(parsedOutput),
|
|
423
411
|
...contents,
|
|
424
412
|
});
|
|
425
413
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
426
414
|
};
|
|
427
|
-
const se_ContentClassifiers = (input, context) => {
|
|
428
|
-
return input
|
|
429
|
-
.filter((e) => e != null)
|
|
430
|
-
.map((entry) => {
|
|
431
|
-
return entry;
|
|
432
|
-
});
|
|
433
|
-
};
|
|
434
|
-
const se_HumanLoopDataAttributes = (input, context) => {
|
|
435
|
-
return {
|
|
436
|
-
...(input.ContentClassifiers != null && {
|
|
437
|
-
ContentClassifiers: se_ContentClassifiers(input.ContentClassifiers, context),
|
|
438
|
-
}),
|
|
439
|
-
};
|
|
440
|
-
};
|
|
441
|
-
const se_HumanLoopInput = (input, context) => {
|
|
442
|
-
return {
|
|
443
|
-
...(input.InputContent != null && { InputContent: input.InputContent }),
|
|
444
|
-
};
|
|
445
|
-
};
|
|
446
|
-
const de_HumanLoopOutput = (output, context) => {
|
|
447
|
-
return {
|
|
448
|
-
OutputS3Uri: (0, smithy_client_1.expectString)(output.OutputS3Uri),
|
|
449
|
-
};
|
|
450
|
-
};
|
|
451
415
|
const de_HumanLoopSummaries = (output, context) => {
|
|
452
416
|
const retVal = (output || [])
|
|
453
417
|
.filter((e) => e != null)
|
|
454
418
|
.map((entry) => {
|
|
455
|
-
if (entry === null) {
|
|
456
|
-
return null;
|
|
457
|
-
}
|
|
458
419
|
return de_HumanLoopSummary(entry, context);
|
|
459
420
|
});
|
|
460
421
|
return retVal;
|
|
461
422
|
};
|
|
462
423
|
const de_HumanLoopSummary = (output, context) => {
|
|
463
|
-
return {
|
|
464
|
-
CreationTime:
|
|
465
|
-
FailureReason:
|
|
466
|
-
FlowDefinitionArn:
|
|
467
|
-
HumanLoopName:
|
|
468
|
-
HumanLoopStatus:
|
|
469
|
-
};
|
|
424
|
+
return (0, smithy_client_1.take)(output, {
|
|
425
|
+
CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
426
|
+
FailureReason: smithy_client_1.expectString,
|
|
427
|
+
FlowDefinitionArn: smithy_client_1.expectString,
|
|
428
|
+
HumanLoopName: smithy_client_1.expectString,
|
|
429
|
+
HumanLoopStatus: smithy_client_1.expectString,
|
|
430
|
+
});
|
|
470
431
|
};
|
|
471
432
|
const deserializeMetadata = (output) => ({
|
|
472
433
|
httpStatusCode: output.statusCode,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map
|
|
2
|
+
import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
4
4
|
import { SageMakerA2IRuntimeServiceException as __BaseException } from "../models/SageMakerA2IRuntimeServiceException";
|
|
5
5
|
export const se_DeleteHumanLoopCommand = async (input, context) => {
|
|
@@ -71,12 +71,12 @@ export const se_StartHumanLoopCommand = async (input, context) => {
|
|
|
71
71
|
};
|
|
72
72
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops";
|
|
73
73
|
let body;
|
|
74
|
-
body = JSON.stringify({
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
});
|
|
74
|
+
body = JSON.stringify(take(input, {
|
|
75
|
+
DataAttributes: (_) => _json(_),
|
|
76
|
+
FlowDefinitionArn: [],
|
|
77
|
+
HumanLoopInput: (_) => _json(_),
|
|
78
|
+
HumanLoopName: [],
|
|
79
|
+
}));
|
|
80
80
|
return new __HttpRequest({
|
|
81
81
|
protocol,
|
|
82
82
|
hostname,
|
|
@@ -94,9 +94,9 @@ export const se_StopHumanLoopCommand = async (input, context) => {
|
|
|
94
94
|
};
|
|
95
95
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops/stop";
|
|
96
96
|
let body;
|
|
97
|
-
body = JSON.stringify({
|
|
98
|
-
|
|
99
|
-
});
|
|
97
|
+
body = JSON.stringify(take(input, {
|
|
98
|
+
HumanLoopName: [],
|
|
99
|
+
}));
|
|
100
100
|
return new __HttpRequest({
|
|
101
101
|
protocol,
|
|
102
102
|
hostname,
|
|
@@ -138,10 +138,9 @@ const de_DeleteHumanLoopCommandError = async (output, context) => {
|
|
|
138
138
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
139
139
|
default:
|
|
140
140
|
const parsedBody = parsedOutput.body;
|
|
141
|
-
throwDefaultError({
|
|
141
|
+
return throwDefaultError({
|
|
142
142
|
output,
|
|
143
143
|
parsedBody,
|
|
144
|
-
exceptionCtor: __BaseException,
|
|
145
144
|
errorCode,
|
|
146
145
|
});
|
|
147
146
|
}
|
|
@@ -154,30 +153,17 @@ export const de_DescribeHumanLoopCommand = async (output, context) => {
|
|
|
154
153
|
$metadata: deserializeMetadata(output),
|
|
155
154
|
});
|
|
156
155
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
if (data.HumanLoopArn != null) {
|
|
170
|
-
contents.HumanLoopArn = __expectString(data.HumanLoopArn);
|
|
171
|
-
}
|
|
172
|
-
if (data.HumanLoopName != null) {
|
|
173
|
-
contents.HumanLoopName = __expectString(data.HumanLoopName);
|
|
174
|
-
}
|
|
175
|
-
if (data.HumanLoopOutput != null) {
|
|
176
|
-
contents.HumanLoopOutput = de_HumanLoopOutput(data.HumanLoopOutput, context);
|
|
177
|
-
}
|
|
178
|
-
if (data.HumanLoopStatus != null) {
|
|
179
|
-
contents.HumanLoopStatus = __expectString(data.HumanLoopStatus);
|
|
180
|
-
}
|
|
156
|
+
const doc = take(data, {
|
|
157
|
+
CreationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
158
|
+
FailureCode: __expectString,
|
|
159
|
+
FailureReason: __expectString,
|
|
160
|
+
FlowDefinitionArn: __expectString,
|
|
161
|
+
HumanLoopArn: __expectString,
|
|
162
|
+
HumanLoopName: __expectString,
|
|
163
|
+
HumanLoopOutput: _json,
|
|
164
|
+
HumanLoopStatus: __expectString,
|
|
165
|
+
});
|
|
166
|
+
Object.assign(contents, doc);
|
|
181
167
|
return contents;
|
|
182
168
|
};
|
|
183
169
|
const de_DescribeHumanLoopCommandError = async (output, context) => {
|
|
@@ -201,10 +187,9 @@ const de_DescribeHumanLoopCommandError = async (output, context) => {
|
|
|
201
187
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
202
188
|
default:
|
|
203
189
|
const parsedBody = parsedOutput.body;
|
|
204
|
-
throwDefaultError({
|
|
190
|
+
return throwDefaultError({
|
|
205
191
|
output,
|
|
206
192
|
parsedBody,
|
|
207
|
-
exceptionCtor: __BaseException,
|
|
208
193
|
errorCode,
|
|
209
194
|
});
|
|
210
195
|
}
|
|
@@ -217,12 +202,11 @@ export const de_ListHumanLoopsCommand = async (output, context) => {
|
|
|
217
202
|
$metadata: deserializeMetadata(output),
|
|
218
203
|
});
|
|
219
204
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
}
|
|
205
|
+
const doc = take(data, {
|
|
206
|
+
HumanLoopSummaries: (_) => de_HumanLoopSummaries(_, context),
|
|
207
|
+
NextToken: __expectString,
|
|
208
|
+
});
|
|
209
|
+
Object.assign(contents, doc);
|
|
226
210
|
return contents;
|
|
227
211
|
};
|
|
228
212
|
const de_ListHumanLoopsCommandError = async (output, context) => {
|
|
@@ -246,10 +230,9 @@ const de_ListHumanLoopsCommandError = async (output, context) => {
|
|
|
246
230
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
247
231
|
default:
|
|
248
232
|
const parsedBody = parsedOutput.body;
|
|
249
|
-
throwDefaultError({
|
|
233
|
+
return throwDefaultError({
|
|
250
234
|
output,
|
|
251
235
|
parsedBody,
|
|
252
|
-
exceptionCtor: __BaseException,
|
|
253
236
|
errorCode,
|
|
254
237
|
});
|
|
255
238
|
}
|
|
@@ -262,9 +245,10 @@ export const de_StartHumanLoopCommand = async (output, context) => {
|
|
|
262
245
|
$metadata: deserializeMetadata(output),
|
|
263
246
|
});
|
|
264
247
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
}
|
|
248
|
+
const doc = take(data, {
|
|
249
|
+
HumanLoopArn: __expectString,
|
|
250
|
+
});
|
|
251
|
+
Object.assign(contents, doc);
|
|
268
252
|
return contents;
|
|
269
253
|
};
|
|
270
254
|
const de_StartHumanLoopCommandError = async (output, context) => {
|
|
@@ -291,10 +275,9 @@ const de_StartHumanLoopCommandError = async (output, context) => {
|
|
|
291
275
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
292
276
|
default:
|
|
293
277
|
const parsedBody = parsedOutput.body;
|
|
294
|
-
throwDefaultError({
|
|
278
|
+
return throwDefaultError({
|
|
295
279
|
output,
|
|
296
280
|
parsedBody,
|
|
297
|
-
exceptionCtor: __BaseException,
|
|
298
281
|
errorCode,
|
|
299
282
|
});
|
|
300
283
|
}
|
|
@@ -330,21 +313,21 @@ const de_StopHumanLoopCommandError = async (output, context) => {
|
|
|
330
313
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
331
314
|
default:
|
|
332
315
|
const parsedBody = parsedOutput.body;
|
|
333
|
-
throwDefaultError({
|
|
316
|
+
return throwDefaultError({
|
|
334
317
|
output,
|
|
335
318
|
parsedBody,
|
|
336
|
-
exceptionCtor: __BaseException,
|
|
337
319
|
errorCode,
|
|
338
320
|
});
|
|
339
321
|
}
|
|
340
322
|
};
|
|
341
|
-
const
|
|
323
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
342
324
|
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
343
325
|
const contents = map({});
|
|
344
326
|
const data = parsedOutput.body;
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
}
|
|
327
|
+
const doc = take(data, {
|
|
328
|
+
Message: __expectString,
|
|
329
|
+
});
|
|
330
|
+
Object.assign(contents, doc);
|
|
348
331
|
const exception = new ConflictException({
|
|
349
332
|
$metadata: deserializeMetadata(parsedOutput),
|
|
350
333
|
...contents,
|
|
@@ -354,9 +337,10 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
|
354
337
|
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
355
338
|
const contents = map({});
|
|
356
339
|
const data = parsedOutput.body;
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
}
|
|
340
|
+
const doc = take(data, {
|
|
341
|
+
Message: __expectString,
|
|
342
|
+
});
|
|
343
|
+
Object.assign(contents, doc);
|
|
360
344
|
const exception = new InternalServerException({
|
|
361
345
|
$metadata: deserializeMetadata(parsedOutput),
|
|
362
346
|
...contents,
|
|
@@ -366,9 +350,10 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
|
366
350
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
367
351
|
const contents = map({});
|
|
368
352
|
const data = parsedOutput.body;
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
}
|
|
353
|
+
const doc = take(data, {
|
|
354
|
+
Message: __expectString,
|
|
355
|
+
});
|
|
356
|
+
Object.assign(contents, doc);
|
|
372
357
|
const exception = new ResourceNotFoundException({
|
|
373
358
|
$metadata: deserializeMetadata(parsedOutput),
|
|
374
359
|
...contents,
|
|
@@ -378,9 +363,10 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
378
363
|
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
379
364
|
const contents = map({});
|
|
380
365
|
const data = parsedOutput.body;
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
}
|
|
366
|
+
const doc = take(data, {
|
|
367
|
+
Message: __expectString,
|
|
368
|
+
});
|
|
369
|
+
Object.assign(contents, doc);
|
|
384
370
|
const exception = new ServiceQuotaExceededException({
|
|
385
371
|
$metadata: deserializeMetadata(parsedOutput),
|
|
386
372
|
...contents,
|
|
@@ -390,9 +376,10 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
390
376
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
391
377
|
const contents = map({});
|
|
392
378
|
const data = parsedOutput.body;
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
}
|
|
379
|
+
const doc = take(data, {
|
|
380
|
+
Message: __expectString,
|
|
381
|
+
});
|
|
382
|
+
Object.assign(contents, doc);
|
|
396
383
|
const exception = new ThrottlingException({
|
|
397
384
|
$metadata: deserializeMetadata(parsedOutput),
|
|
398
385
|
...contents,
|
|
@@ -402,58 +389,32 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
|
402
389
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
403
390
|
const contents = map({});
|
|
404
391
|
const data = parsedOutput.body;
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
}
|
|
392
|
+
const doc = take(data, {
|
|
393
|
+
Message: __expectString,
|
|
394
|
+
});
|
|
395
|
+
Object.assign(contents, doc);
|
|
408
396
|
const exception = new ValidationException({
|
|
409
397
|
$metadata: deserializeMetadata(parsedOutput),
|
|
410
398
|
...contents,
|
|
411
399
|
});
|
|
412
400
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
413
401
|
};
|
|
414
|
-
const se_ContentClassifiers = (input, context) => {
|
|
415
|
-
return input
|
|
416
|
-
.filter((e) => e != null)
|
|
417
|
-
.map((entry) => {
|
|
418
|
-
return entry;
|
|
419
|
-
});
|
|
420
|
-
};
|
|
421
|
-
const se_HumanLoopDataAttributes = (input, context) => {
|
|
422
|
-
return {
|
|
423
|
-
...(input.ContentClassifiers != null && {
|
|
424
|
-
ContentClassifiers: se_ContentClassifiers(input.ContentClassifiers, context),
|
|
425
|
-
}),
|
|
426
|
-
};
|
|
427
|
-
};
|
|
428
|
-
const se_HumanLoopInput = (input, context) => {
|
|
429
|
-
return {
|
|
430
|
-
...(input.InputContent != null && { InputContent: input.InputContent }),
|
|
431
|
-
};
|
|
432
|
-
};
|
|
433
|
-
const de_HumanLoopOutput = (output, context) => {
|
|
434
|
-
return {
|
|
435
|
-
OutputS3Uri: __expectString(output.OutputS3Uri),
|
|
436
|
-
};
|
|
437
|
-
};
|
|
438
402
|
const de_HumanLoopSummaries = (output, context) => {
|
|
439
403
|
const retVal = (output || [])
|
|
440
404
|
.filter((e) => e != null)
|
|
441
405
|
.map((entry) => {
|
|
442
|
-
if (entry === null) {
|
|
443
|
-
return null;
|
|
444
|
-
}
|
|
445
406
|
return de_HumanLoopSummary(entry, context);
|
|
446
407
|
});
|
|
447
408
|
return retVal;
|
|
448
409
|
};
|
|
449
410
|
const de_HumanLoopSummary = (output, context) => {
|
|
450
|
-
return {
|
|
451
|
-
CreationTime:
|
|
452
|
-
FailureReason: __expectString
|
|
453
|
-
FlowDefinitionArn: __expectString
|
|
454
|
-
HumanLoopName: __expectString
|
|
455
|
-
HumanLoopStatus: __expectString
|
|
456
|
-
};
|
|
411
|
+
return take(output, {
|
|
412
|
+
CreationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
413
|
+
FailureReason: __expectString,
|
|
414
|
+
FlowDefinitionArn: __expectString,
|
|
415
|
+
HumanLoopName: __expectString,
|
|
416
|
+
HumanLoopStatus: __expectString,
|
|
417
|
+
});
|
|
457
418
|
};
|
|
458
419
|
const deserializeMetadata = (output) => ({
|
|
459
420
|
httpStatusCode: output.statusCode,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sagemaker-a2i-runtime",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sagemaker A2i Runtime Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.315.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.315.0",
|
|
25
25
|
"@aws-sdk/config-resolver": "3.310.0",
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.315.0",
|
|
27
27
|
"@aws-sdk/fetch-http-handler": "3.310.0",
|
|
28
28
|
"@aws-sdk/hash-node": "3.310.0",
|
|
29
29
|
"@aws-sdk/invalid-dependency": "3.310.0",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"@aws-sdk/node-config-provider": "3.310.0",
|
|
41
41
|
"@aws-sdk/node-http-handler": "3.310.0",
|
|
42
42
|
"@aws-sdk/protocol-http": "3.310.0",
|
|
43
|
-
"@aws-sdk/smithy-client": "3.
|
|
43
|
+
"@aws-sdk/smithy-client": "3.315.0",
|
|
44
44
|
"@aws-sdk/types": "3.310.0",
|
|
45
45
|
"@aws-sdk/url-parser": "3.310.0",
|
|
46
46
|
"@aws-sdk/util-base64": "3.310.0",
|
|
47
47
|
"@aws-sdk/util-body-length-browser": "3.310.0",
|
|
48
48
|
"@aws-sdk/util-body-length-node": "3.310.0",
|
|
49
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
50
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
49
|
+
"@aws-sdk/util-defaults-mode-browser": "3.315.0",
|
|
50
|
+
"@aws-sdk/util-defaults-mode-node": "3.315.0",
|
|
51
51
|
"@aws-sdk/util-endpoints": "3.310.0",
|
|
52
52
|
"@aws-sdk/util-retry": "3.310.0",
|
|
53
53
|
"@aws-sdk/util-user-agent-browser": "3.310.0",
|