@aws-sdk/client-medical-imaging 3.489.0 → 3.495.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.
Files changed (36) hide show
  1. package/dist-cjs/MedicalImaging.js +1 -47
  2. package/dist-cjs/MedicalImagingClient.js +1 -43
  3. package/dist-cjs/commands/CopyImageSetCommand.js +1 -28
  4. package/dist-cjs/commands/CreateDatastoreCommand.js +1 -28
  5. package/dist-cjs/commands/DeleteDatastoreCommand.js +1 -28
  6. package/dist-cjs/commands/DeleteImageSetCommand.js +1 -28
  7. package/dist-cjs/commands/GetDICOMImportJobCommand.js +1 -28
  8. package/dist-cjs/commands/GetDatastoreCommand.js +1 -28
  9. package/dist-cjs/commands/GetImageFrameCommand.js +1 -29
  10. package/dist-cjs/commands/GetImageSetCommand.js +1 -28
  11. package/dist-cjs/commands/GetImageSetMetadataCommand.js +1 -29
  12. package/dist-cjs/commands/ListDICOMImportJobsCommand.js +1 -28
  13. package/dist-cjs/commands/ListDatastoresCommand.js +1 -28
  14. package/dist-cjs/commands/ListImageSetVersionsCommand.js +1 -28
  15. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  16. package/dist-cjs/commands/SearchImageSetsCommand.js +1 -29
  17. package/dist-cjs/commands/StartDICOMImportJobCommand.js +1 -28
  18. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  19. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  20. package/dist-cjs/commands/UpdateImageSetMetadataCommand.js +1 -29
  21. package/dist-cjs/commands/index.js +1 -21
  22. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  23. package/dist-cjs/extensionConfiguration.js +1 -2
  24. package/dist-cjs/index.js +2375 -11
  25. package/dist-cjs/models/MedicalImagingServiceException.js +1 -12
  26. package/dist-cjs/models/index.js +1 -4
  27. package/dist-cjs/models/models_0.js +1 -248
  28. package/dist-cjs/pagination/Interfaces.js +1 -2
  29. package/dist-cjs/pagination/ListDICOMImportJobsPaginator.js +1 -7
  30. package/dist-cjs/pagination/ListDatastoresPaginator.js +1 -7
  31. package/dist-cjs/pagination/ListImageSetVersionsPaginator.js +1 -7
  32. package/dist-cjs/pagination/SearchImageSetsPaginator.js +1 -7
  33. package/dist-cjs/pagination/index.js +1 -8
  34. package/dist-cjs/protocols/Aws_restJson1.js +1 -1571
  35. package/dist-cjs/runtimeExtensions.js +1 -22
  36. package/package.json +41 -41
@@ -1,1571 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UpdateImageSetMetadataCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartDICOMImportJobCommand = exports.de_SearchImageSetsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListImageSetVersionsCommand = exports.de_ListDICOMImportJobsCommand = exports.de_ListDatastoresCommand = exports.de_GetImageSetMetadataCommand = exports.de_GetImageSetCommand = exports.de_GetImageFrameCommand = exports.de_GetDICOMImportJobCommand = exports.de_GetDatastoreCommand = exports.de_DeleteImageSetCommand = exports.de_DeleteDatastoreCommand = exports.de_CreateDatastoreCommand = exports.de_CopyImageSetCommand = exports.se_UpdateImageSetMetadataCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartDICOMImportJobCommand = exports.se_SearchImageSetsCommand = exports.se_ListTagsForResourceCommand = exports.se_ListImageSetVersionsCommand = exports.se_ListDICOMImportJobsCommand = exports.se_ListDatastoresCommand = exports.se_GetImageSetMetadataCommand = exports.se_GetImageSetCommand = exports.se_GetImageFrameCommand = exports.se_GetDICOMImportJobCommand = exports.se_GetDatastoreCommand = exports.se_DeleteImageSetCommand = exports.se_DeleteDatastoreCommand = exports.se_CreateDatastoreCommand = exports.se_CopyImageSetCommand = void 0;
4
- const core_1 = require("@smithy/core");
5
- const protocol_http_1 = require("@smithy/protocol-http");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const uuid_1 = require("uuid");
8
- const MedicalImagingServiceException_1 = require("../models/MedicalImagingServiceException");
9
- const models_0_1 = require("../models/models_0");
10
- const se_CopyImageSetCommand = async (input, context) => {
11
- const b = (0, core_1.requestBuilder)(input, context);
12
- const headers = {
13
- "content-type": "application/json",
14
- };
15
- b.bp("/datastore/{datastoreId}/imageSet/{sourceImageSetId}/copyImageSet");
16
- b.p("datastoreId", () => input.datastoreId, "{datastoreId}", false);
17
- b.p("sourceImageSetId", () => input.sourceImageSetId, "{sourceImageSetId}", false);
18
- let body;
19
- if (input.copyImageSetInformation !== undefined) {
20
- body = (0, smithy_client_1._json)(input.copyImageSetInformation);
21
- }
22
- if (body === undefined) {
23
- body = {};
24
- }
25
- body = JSON.stringify(body);
26
- let { hostname: resolvedHostname } = await context.endpoint();
27
- if (context.disableHostPrefix !== true) {
28
- resolvedHostname = "runtime-" + resolvedHostname;
29
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
30
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
31
- }
32
- }
33
- b.hn(resolvedHostname);
34
- b.m("POST").h(headers).b(body);
35
- return b.build();
36
- };
37
- exports.se_CopyImageSetCommand = se_CopyImageSetCommand;
38
- const se_CreateDatastoreCommand = async (input, context) => {
39
- const b = (0, core_1.requestBuilder)(input, context);
40
- const headers = {
41
- "content-type": "application/json",
42
- };
43
- b.bp("/datastore");
44
- let body;
45
- body = JSON.stringify((0, smithy_client_1.take)(input, {
46
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
47
- datastoreName: [],
48
- kmsKeyArn: [],
49
- tags: (_) => (0, smithy_client_1._json)(_),
50
- }));
51
- b.m("POST").h(headers).b(body);
52
- return b.build();
53
- };
54
- exports.se_CreateDatastoreCommand = se_CreateDatastoreCommand;
55
- const se_DeleteDatastoreCommand = async (input, context) => {
56
- const b = (0, core_1.requestBuilder)(input, context);
57
- const headers = {};
58
- b.bp("/datastore/{datastoreId}");
59
- b.p("datastoreId", () => input.datastoreId, "{datastoreId}", false);
60
- let body;
61
- b.m("DELETE").h(headers).b(body);
62
- return b.build();
63
- };
64
- exports.se_DeleteDatastoreCommand = se_DeleteDatastoreCommand;
65
- const se_DeleteImageSetCommand = async (input, context) => {
66
- const b = (0, core_1.requestBuilder)(input, context);
67
- const headers = {};
68
- b.bp("/datastore/{datastoreId}/imageSet/{imageSetId}/deleteImageSet");
69
- b.p("datastoreId", () => input.datastoreId, "{datastoreId}", false);
70
- b.p("imageSetId", () => input.imageSetId, "{imageSetId}", false);
71
- let body;
72
- let { hostname: resolvedHostname } = await context.endpoint();
73
- if (context.disableHostPrefix !== true) {
74
- resolvedHostname = "runtime-" + resolvedHostname;
75
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
76
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
77
- }
78
- }
79
- b.hn(resolvedHostname);
80
- b.m("POST").h(headers).b(body);
81
- return b.build();
82
- };
83
- exports.se_DeleteImageSetCommand = se_DeleteImageSetCommand;
84
- const se_GetDatastoreCommand = async (input, context) => {
85
- const b = (0, core_1.requestBuilder)(input, context);
86
- const headers = {};
87
- b.bp("/datastore/{datastoreId}");
88
- b.p("datastoreId", () => input.datastoreId, "{datastoreId}", false);
89
- let body;
90
- b.m("GET").h(headers).b(body);
91
- return b.build();
92
- };
93
- exports.se_GetDatastoreCommand = se_GetDatastoreCommand;
94
- const se_GetDICOMImportJobCommand = async (input, context) => {
95
- const b = (0, core_1.requestBuilder)(input, context);
96
- const headers = {};
97
- b.bp("/getDICOMImportJob/datastore/{datastoreId}/job/{jobId}");
98
- b.p("datastoreId", () => input.datastoreId, "{datastoreId}", false);
99
- b.p("jobId", () => input.jobId, "{jobId}", false);
100
- let body;
101
- b.m("GET").h(headers).b(body);
102
- return b.build();
103
- };
104
- exports.se_GetDICOMImportJobCommand = se_GetDICOMImportJobCommand;
105
- const se_GetImageFrameCommand = async (input, context) => {
106
- const b = (0, core_1.requestBuilder)(input, context);
107
- const headers = {
108
- "content-type": "application/json",
109
- };
110
- b.bp("/datastore/{datastoreId}/imageSet/{imageSetId}/getImageFrame");
111
- b.p("datastoreId", () => input.datastoreId, "{datastoreId}", false);
112
- b.p("imageSetId", () => input.imageSetId, "{imageSetId}", false);
113
- let body;
114
- if (input.imageFrameInformation !== undefined) {
115
- body = (0, smithy_client_1._json)(input.imageFrameInformation);
116
- }
117
- if (body === undefined) {
118
- body = {};
119
- }
120
- body = JSON.stringify(body);
121
- let { hostname: resolvedHostname } = await context.endpoint();
122
- if (context.disableHostPrefix !== true) {
123
- resolvedHostname = "runtime-" + resolvedHostname;
124
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
125
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
126
- }
127
- }
128
- b.hn(resolvedHostname);
129
- b.m("POST").h(headers).b(body);
130
- return b.build();
131
- };
132
- exports.se_GetImageFrameCommand = se_GetImageFrameCommand;
133
- const se_GetImageSetCommand = async (input, context) => {
134
- const b = (0, core_1.requestBuilder)(input, context);
135
- const headers = {};
136
- b.bp("/datastore/{datastoreId}/imageSet/{imageSetId}/getImageSet");
137
- b.p("datastoreId", () => input.datastoreId, "{datastoreId}", false);
138
- b.p("imageSetId", () => input.imageSetId, "{imageSetId}", false);
139
- const query = (0, smithy_client_1.map)({
140
- [_v]: [, input[_vI]],
141
- });
142
- let body;
143
- let { hostname: resolvedHostname } = await context.endpoint();
144
- if (context.disableHostPrefix !== true) {
145
- resolvedHostname = "runtime-" + resolvedHostname;
146
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
147
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
148
- }
149
- }
150
- b.hn(resolvedHostname);
151
- b.m("POST").h(headers).q(query).b(body);
152
- return b.build();
153
- };
154
- exports.se_GetImageSetCommand = se_GetImageSetCommand;
155
- const se_GetImageSetMetadataCommand = async (input, context) => {
156
- const b = (0, core_1.requestBuilder)(input, context);
157
- const headers = {};
158
- b.bp("/datastore/{datastoreId}/imageSet/{imageSetId}/getImageSetMetadata");
159
- b.p("datastoreId", () => input.datastoreId, "{datastoreId}", false);
160
- b.p("imageSetId", () => input.imageSetId, "{imageSetId}", false);
161
- const query = (0, smithy_client_1.map)({
162
- [_v]: [, input[_vI]],
163
- });
164
- let body;
165
- let { hostname: resolvedHostname } = await context.endpoint();
166
- if (context.disableHostPrefix !== true) {
167
- resolvedHostname = "runtime-" + resolvedHostname;
168
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
169
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
170
- }
171
- }
172
- b.hn(resolvedHostname);
173
- b.m("POST").h(headers).q(query).b(body);
174
- return b.build();
175
- };
176
- exports.se_GetImageSetMetadataCommand = se_GetImageSetMetadataCommand;
177
- const se_ListDatastoresCommand = async (input, context) => {
178
- const b = (0, core_1.requestBuilder)(input, context);
179
- const headers = {};
180
- b.bp("/datastore");
181
- const query = (0, smithy_client_1.map)({
182
- [_dS]: [, input[_dS]],
183
- [_nT]: [, input[_nT]],
184
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
185
- });
186
- let body;
187
- b.m("GET").h(headers).q(query).b(body);
188
- return b.build();
189
- };
190
- exports.se_ListDatastoresCommand = se_ListDatastoresCommand;
191
- const se_ListDICOMImportJobsCommand = async (input, context) => {
192
- const b = (0, core_1.requestBuilder)(input, context);
193
- const headers = {};
194
- b.bp("/listDICOMImportJobs/datastore/{datastoreId}");
195
- b.p("datastoreId", () => input.datastoreId, "{datastoreId}", false);
196
- const query = (0, smithy_client_1.map)({
197
- [_jS]: [, input[_jS]],
198
- [_nT]: [, input[_nT]],
199
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
200
- });
201
- let body;
202
- b.m("GET").h(headers).q(query).b(body);
203
- return b.build();
204
- };
205
- exports.se_ListDICOMImportJobsCommand = se_ListDICOMImportJobsCommand;
206
- const se_ListImageSetVersionsCommand = async (input, context) => {
207
- const b = (0, core_1.requestBuilder)(input, context);
208
- const headers = {};
209
- b.bp("/datastore/{datastoreId}/imageSet/{imageSetId}/listImageSetVersions");
210
- b.p("datastoreId", () => input.datastoreId, "{datastoreId}", false);
211
- b.p("imageSetId", () => input.imageSetId, "{imageSetId}", false);
212
- const query = (0, smithy_client_1.map)({
213
- [_nT]: [, input[_nT]],
214
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
215
- });
216
- let body;
217
- let { hostname: resolvedHostname } = await context.endpoint();
218
- if (context.disableHostPrefix !== true) {
219
- resolvedHostname = "runtime-" + resolvedHostname;
220
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
221
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
222
- }
223
- }
224
- b.hn(resolvedHostname);
225
- b.m("POST").h(headers).q(query).b(body);
226
- return b.build();
227
- };
228
- exports.se_ListImageSetVersionsCommand = se_ListImageSetVersionsCommand;
229
- const se_ListTagsForResourceCommand = async (input, context) => {
230
- const b = (0, core_1.requestBuilder)(input, context);
231
- const headers = {};
232
- b.bp("/tags/{resourceArn}");
233
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
234
- let body;
235
- b.m("GET").h(headers).b(body);
236
- return b.build();
237
- };
238
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
239
- const se_SearchImageSetsCommand = async (input, context) => {
240
- const b = (0, core_1.requestBuilder)(input, context);
241
- const headers = {
242
- "content-type": "application/json",
243
- };
244
- b.bp("/datastore/{datastoreId}/searchImageSets");
245
- b.p("datastoreId", () => input.datastoreId, "{datastoreId}", false);
246
- const query = (0, smithy_client_1.map)({
247
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
248
- [_nT]: [, input[_nT]],
249
- });
250
- let body;
251
- if (input.searchCriteria !== undefined) {
252
- body = se_SearchCriteria(input.searchCriteria, context);
253
- }
254
- if (body === undefined) {
255
- body = {};
256
- }
257
- body = JSON.stringify(body);
258
- let { hostname: resolvedHostname } = await context.endpoint();
259
- if (context.disableHostPrefix !== true) {
260
- resolvedHostname = "runtime-" + resolvedHostname;
261
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
262
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
263
- }
264
- }
265
- b.hn(resolvedHostname);
266
- b.m("POST").h(headers).q(query).b(body);
267
- return b.build();
268
- };
269
- exports.se_SearchImageSetsCommand = se_SearchImageSetsCommand;
270
- const se_StartDICOMImportJobCommand = async (input, context) => {
271
- const b = (0, core_1.requestBuilder)(input, context);
272
- const headers = {
273
- "content-type": "application/json",
274
- };
275
- b.bp("/startDICOMImportJob/datastore/{datastoreId}");
276
- b.p("datastoreId", () => input.datastoreId, "{datastoreId}", false);
277
- let body;
278
- body = JSON.stringify((0, smithy_client_1.take)(input, {
279
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
280
- dataAccessRoleArn: [],
281
- inputS3Uri: [],
282
- jobName: [],
283
- outputS3Uri: [],
284
- }));
285
- b.m("POST").h(headers).b(body);
286
- return b.build();
287
- };
288
- exports.se_StartDICOMImportJobCommand = se_StartDICOMImportJobCommand;
289
- const se_TagResourceCommand = async (input, context) => {
290
- const b = (0, core_1.requestBuilder)(input, context);
291
- const headers = {
292
- "content-type": "application/json",
293
- };
294
- b.bp("/tags/{resourceArn}");
295
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
296
- let body;
297
- body = JSON.stringify((0, smithy_client_1.take)(input, {
298
- tags: (_) => (0, smithy_client_1._json)(_),
299
- }));
300
- b.m("POST").h(headers).b(body);
301
- return b.build();
302
- };
303
- exports.se_TagResourceCommand = se_TagResourceCommand;
304
- const se_UntagResourceCommand = async (input, context) => {
305
- const b = (0, core_1.requestBuilder)(input, context);
306
- const headers = {};
307
- b.bp("/tags/{resourceArn}");
308
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
309
- const query = (0, smithy_client_1.map)({
310
- [_tK]: [
311
- (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
312
- () => (input[_tK] || []).map((_entry) => _entry),
313
- ],
314
- });
315
- let body;
316
- b.m("DELETE").h(headers).q(query).b(body);
317
- return b.build();
318
- };
319
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
320
- const se_UpdateImageSetMetadataCommand = async (input, context) => {
321
- const b = (0, core_1.requestBuilder)(input, context);
322
- const headers = {
323
- "content-type": "application/json",
324
- };
325
- b.bp("/datastore/{datastoreId}/imageSet/{imageSetId}/updateImageSetMetadata");
326
- b.p("datastoreId", () => input.datastoreId, "{datastoreId}", false);
327
- b.p("imageSetId", () => input.imageSetId, "{imageSetId}", false);
328
- const query = (0, smithy_client_1.map)({
329
- [_lV]: [, (0, smithy_client_1.expectNonNull)(input[_lVI], `latestVersionId`)],
330
- });
331
- let body;
332
- if (input.updateImageSetMetadataUpdates !== undefined) {
333
- body = se_MetadataUpdates(input.updateImageSetMetadataUpdates, context);
334
- }
335
- if (body === undefined) {
336
- body = {};
337
- }
338
- body = JSON.stringify(body);
339
- let { hostname: resolvedHostname } = await context.endpoint();
340
- if (context.disableHostPrefix !== true) {
341
- resolvedHostname = "runtime-" + resolvedHostname;
342
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
343
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
344
- }
345
- }
346
- b.hn(resolvedHostname);
347
- b.m("POST").h(headers).q(query).b(body);
348
- return b.build();
349
- };
350
- exports.se_UpdateImageSetMetadataCommand = se_UpdateImageSetMetadataCommand;
351
- const de_CopyImageSetCommand = async (output, context) => {
352
- if (output.statusCode !== 200 && output.statusCode >= 300) {
353
- return de_CopyImageSetCommandError(output, context);
354
- }
355
- const contents = (0, smithy_client_1.map)({
356
- $metadata: deserializeMetadata(output),
357
- });
358
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
359
- const doc = (0, smithy_client_1.take)(data, {
360
- datastoreId: smithy_client_1.expectString,
361
- destinationImageSetProperties: (_) => de_CopyDestinationImageSetProperties(_, context),
362
- sourceImageSetProperties: (_) => de_CopySourceImageSetProperties(_, context),
363
- });
364
- Object.assign(contents, doc);
365
- return contents;
366
- };
367
- exports.de_CopyImageSetCommand = de_CopyImageSetCommand;
368
- const de_CopyImageSetCommandError = async (output, context) => {
369
- const parsedOutput = {
370
- ...output,
371
- body: await parseErrorBody(output.body, context),
372
- };
373
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
374
- switch (errorCode) {
375
- case "AccessDeniedException":
376
- case "com.amazonaws.medicalimaging#AccessDeniedException":
377
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
378
- case "ConflictException":
379
- case "com.amazonaws.medicalimaging#ConflictException":
380
- throw await de_ConflictExceptionRes(parsedOutput, context);
381
- case "InternalServerException":
382
- case "com.amazonaws.medicalimaging#InternalServerException":
383
- throw await de_InternalServerExceptionRes(parsedOutput, context);
384
- case "ResourceNotFoundException":
385
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
386
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
387
- case "ServiceQuotaExceededException":
388
- case "com.amazonaws.medicalimaging#ServiceQuotaExceededException":
389
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
390
- case "ThrottlingException":
391
- case "com.amazonaws.medicalimaging#ThrottlingException":
392
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
393
- case "ValidationException":
394
- case "com.amazonaws.medicalimaging#ValidationException":
395
- throw await de_ValidationExceptionRes(parsedOutput, context);
396
- default:
397
- const parsedBody = parsedOutput.body;
398
- return throwDefaultError({
399
- output,
400
- parsedBody,
401
- errorCode,
402
- });
403
- }
404
- };
405
- const de_CreateDatastoreCommand = async (output, context) => {
406
- if (output.statusCode !== 200 && output.statusCode >= 300) {
407
- return de_CreateDatastoreCommandError(output, context);
408
- }
409
- const contents = (0, smithy_client_1.map)({
410
- $metadata: deserializeMetadata(output),
411
- });
412
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
413
- const doc = (0, smithy_client_1.take)(data, {
414
- datastoreId: smithy_client_1.expectString,
415
- datastoreStatus: smithy_client_1.expectString,
416
- });
417
- Object.assign(contents, doc);
418
- return contents;
419
- };
420
- exports.de_CreateDatastoreCommand = de_CreateDatastoreCommand;
421
- const de_CreateDatastoreCommandError = async (output, context) => {
422
- const parsedOutput = {
423
- ...output,
424
- body: await parseErrorBody(output.body, context),
425
- };
426
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
427
- switch (errorCode) {
428
- case "AccessDeniedException":
429
- case "com.amazonaws.medicalimaging#AccessDeniedException":
430
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
431
- case "ConflictException":
432
- case "com.amazonaws.medicalimaging#ConflictException":
433
- throw await de_ConflictExceptionRes(parsedOutput, context);
434
- case "InternalServerException":
435
- case "com.amazonaws.medicalimaging#InternalServerException":
436
- throw await de_InternalServerExceptionRes(parsedOutput, context);
437
- case "ServiceQuotaExceededException":
438
- case "com.amazonaws.medicalimaging#ServiceQuotaExceededException":
439
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
440
- case "ThrottlingException":
441
- case "com.amazonaws.medicalimaging#ThrottlingException":
442
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
443
- case "ValidationException":
444
- case "com.amazonaws.medicalimaging#ValidationException":
445
- throw await de_ValidationExceptionRes(parsedOutput, context);
446
- default:
447
- const parsedBody = parsedOutput.body;
448
- return throwDefaultError({
449
- output,
450
- parsedBody,
451
- errorCode,
452
- });
453
- }
454
- };
455
- const de_DeleteDatastoreCommand = async (output, context) => {
456
- if (output.statusCode !== 200 && output.statusCode >= 300) {
457
- return de_DeleteDatastoreCommandError(output, context);
458
- }
459
- const contents = (0, smithy_client_1.map)({
460
- $metadata: deserializeMetadata(output),
461
- });
462
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
463
- const doc = (0, smithy_client_1.take)(data, {
464
- datastoreId: smithy_client_1.expectString,
465
- datastoreStatus: smithy_client_1.expectString,
466
- });
467
- Object.assign(contents, doc);
468
- return contents;
469
- };
470
- exports.de_DeleteDatastoreCommand = de_DeleteDatastoreCommand;
471
- const de_DeleteDatastoreCommandError = async (output, context) => {
472
- const parsedOutput = {
473
- ...output,
474
- body: await parseErrorBody(output.body, context),
475
- };
476
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
477
- switch (errorCode) {
478
- case "AccessDeniedException":
479
- case "com.amazonaws.medicalimaging#AccessDeniedException":
480
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
481
- case "ConflictException":
482
- case "com.amazonaws.medicalimaging#ConflictException":
483
- throw await de_ConflictExceptionRes(parsedOutput, context);
484
- case "InternalServerException":
485
- case "com.amazonaws.medicalimaging#InternalServerException":
486
- throw await de_InternalServerExceptionRes(parsedOutput, context);
487
- case "ResourceNotFoundException":
488
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
489
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
490
- case "ThrottlingException":
491
- case "com.amazonaws.medicalimaging#ThrottlingException":
492
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
493
- case "ValidationException":
494
- case "com.amazonaws.medicalimaging#ValidationException":
495
- throw await de_ValidationExceptionRes(parsedOutput, context);
496
- default:
497
- const parsedBody = parsedOutput.body;
498
- return throwDefaultError({
499
- output,
500
- parsedBody,
501
- errorCode,
502
- });
503
- }
504
- };
505
- const de_DeleteImageSetCommand = async (output, context) => {
506
- if (output.statusCode !== 200 && output.statusCode >= 300) {
507
- return de_DeleteImageSetCommandError(output, context);
508
- }
509
- const contents = (0, smithy_client_1.map)({
510
- $metadata: deserializeMetadata(output),
511
- });
512
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
513
- const doc = (0, smithy_client_1.take)(data, {
514
- datastoreId: smithy_client_1.expectString,
515
- imageSetId: smithy_client_1.expectString,
516
- imageSetState: smithy_client_1.expectString,
517
- imageSetWorkflowStatus: smithy_client_1.expectString,
518
- });
519
- Object.assign(contents, doc);
520
- return contents;
521
- };
522
- exports.de_DeleteImageSetCommand = de_DeleteImageSetCommand;
523
- const de_DeleteImageSetCommandError = async (output, context) => {
524
- const parsedOutput = {
525
- ...output,
526
- body: await parseErrorBody(output.body, context),
527
- };
528
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
529
- switch (errorCode) {
530
- case "AccessDeniedException":
531
- case "com.amazonaws.medicalimaging#AccessDeniedException":
532
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
533
- case "ConflictException":
534
- case "com.amazonaws.medicalimaging#ConflictException":
535
- throw await de_ConflictExceptionRes(parsedOutput, context);
536
- case "InternalServerException":
537
- case "com.amazonaws.medicalimaging#InternalServerException":
538
- throw await de_InternalServerExceptionRes(parsedOutput, context);
539
- case "ResourceNotFoundException":
540
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
541
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
542
- case "ThrottlingException":
543
- case "com.amazonaws.medicalimaging#ThrottlingException":
544
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
545
- case "ValidationException":
546
- case "com.amazonaws.medicalimaging#ValidationException":
547
- throw await de_ValidationExceptionRes(parsedOutput, context);
548
- default:
549
- const parsedBody = parsedOutput.body;
550
- return throwDefaultError({
551
- output,
552
- parsedBody,
553
- errorCode,
554
- });
555
- }
556
- };
557
- const de_GetDatastoreCommand = async (output, context) => {
558
- if (output.statusCode !== 200 && output.statusCode >= 300) {
559
- return de_GetDatastoreCommandError(output, context);
560
- }
561
- const contents = (0, smithy_client_1.map)({
562
- $metadata: deserializeMetadata(output),
563
- });
564
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
565
- const doc = (0, smithy_client_1.take)(data, {
566
- datastoreProperties: (_) => de_DatastoreProperties(_, context),
567
- });
568
- Object.assign(contents, doc);
569
- return contents;
570
- };
571
- exports.de_GetDatastoreCommand = de_GetDatastoreCommand;
572
- const de_GetDatastoreCommandError = async (output, context) => {
573
- const parsedOutput = {
574
- ...output,
575
- body: await parseErrorBody(output.body, context),
576
- };
577
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
578
- switch (errorCode) {
579
- case "AccessDeniedException":
580
- case "com.amazonaws.medicalimaging#AccessDeniedException":
581
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
582
- case "InternalServerException":
583
- case "com.amazonaws.medicalimaging#InternalServerException":
584
- throw await de_InternalServerExceptionRes(parsedOutput, context);
585
- case "ResourceNotFoundException":
586
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
587
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
588
- case "ThrottlingException":
589
- case "com.amazonaws.medicalimaging#ThrottlingException":
590
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
591
- case "ValidationException":
592
- case "com.amazonaws.medicalimaging#ValidationException":
593
- throw await de_ValidationExceptionRes(parsedOutput, context);
594
- default:
595
- const parsedBody = parsedOutput.body;
596
- return throwDefaultError({
597
- output,
598
- parsedBody,
599
- errorCode,
600
- });
601
- }
602
- };
603
- const de_GetDICOMImportJobCommand = async (output, context) => {
604
- if (output.statusCode !== 200 && output.statusCode >= 300) {
605
- return de_GetDICOMImportJobCommandError(output, context);
606
- }
607
- const contents = (0, smithy_client_1.map)({
608
- $metadata: deserializeMetadata(output),
609
- });
610
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
611
- const doc = (0, smithy_client_1.take)(data, {
612
- jobProperties: (_) => de_DICOMImportJobProperties(_, context),
613
- });
614
- Object.assign(contents, doc);
615
- return contents;
616
- };
617
- exports.de_GetDICOMImportJobCommand = de_GetDICOMImportJobCommand;
618
- const de_GetDICOMImportJobCommandError = async (output, context) => {
619
- const parsedOutput = {
620
- ...output,
621
- body: await parseErrorBody(output.body, context),
622
- };
623
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
624
- switch (errorCode) {
625
- case "AccessDeniedException":
626
- case "com.amazonaws.medicalimaging#AccessDeniedException":
627
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
628
- case "ConflictException":
629
- case "com.amazonaws.medicalimaging#ConflictException":
630
- throw await de_ConflictExceptionRes(parsedOutput, context);
631
- case "InternalServerException":
632
- case "com.amazonaws.medicalimaging#InternalServerException":
633
- throw await de_InternalServerExceptionRes(parsedOutput, context);
634
- case "ResourceNotFoundException":
635
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
636
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
637
- case "ThrottlingException":
638
- case "com.amazonaws.medicalimaging#ThrottlingException":
639
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
640
- case "ValidationException":
641
- case "com.amazonaws.medicalimaging#ValidationException":
642
- throw await de_ValidationExceptionRes(parsedOutput, context);
643
- default:
644
- const parsedBody = parsedOutput.body;
645
- return throwDefaultError({
646
- output,
647
- parsedBody,
648
- errorCode,
649
- });
650
- }
651
- };
652
- const de_GetImageFrameCommand = async (output, context) => {
653
- if (output.statusCode !== 200 && output.statusCode >= 300) {
654
- return de_GetImageFrameCommandError(output, context);
655
- }
656
- const contents = (0, smithy_client_1.map)({
657
- $metadata: deserializeMetadata(output),
658
- [_cT]: [, output.headers[_ct]],
659
- });
660
- const data = output.body;
661
- context.sdkStreamMixin(data);
662
- contents.imageFrameBlob = data;
663
- return contents;
664
- };
665
- exports.de_GetImageFrameCommand = de_GetImageFrameCommand;
666
- const de_GetImageFrameCommandError = async (output, context) => {
667
- const parsedOutput = {
668
- ...output,
669
- body: await parseErrorBody(output.body, context),
670
- };
671
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
672
- switch (errorCode) {
673
- case "AccessDeniedException":
674
- case "com.amazonaws.medicalimaging#AccessDeniedException":
675
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
676
- case "ConflictException":
677
- case "com.amazonaws.medicalimaging#ConflictException":
678
- throw await de_ConflictExceptionRes(parsedOutput, context);
679
- case "InternalServerException":
680
- case "com.amazonaws.medicalimaging#InternalServerException":
681
- throw await de_InternalServerExceptionRes(parsedOutput, context);
682
- case "ResourceNotFoundException":
683
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
684
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
685
- case "ThrottlingException":
686
- case "com.amazonaws.medicalimaging#ThrottlingException":
687
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
688
- case "ValidationException":
689
- case "com.amazonaws.medicalimaging#ValidationException":
690
- throw await de_ValidationExceptionRes(parsedOutput, context);
691
- default:
692
- const parsedBody = parsedOutput.body;
693
- return throwDefaultError({
694
- output,
695
- parsedBody,
696
- errorCode,
697
- });
698
- }
699
- };
700
- const de_GetImageSetCommand = async (output, context) => {
701
- if (output.statusCode !== 200 && output.statusCode >= 300) {
702
- return de_GetImageSetCommandError(output, context);
703
- }
704
- const contents = (0, smithy_client_1.map)({
705
- $metadata: deserializeMetadata(output),
706
- });
707
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
708
- const doc = (0, smithy_client_1.take)(data, {
709
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
710
- datastoreId: smithy_client_1.expectString,
711
- deletedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
712
- imageSetArn: smithy_client_1.expectString,
713
- imageSetId: smithy_client_1.expectString,
714
- imageSetState: smithy_client_1.expectString,
715
- imageSetWorkflowStatus: smithy_client_1.expectString,
716
- message: smithy_client_1.expectString,
717
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
718
- versionId: smithy_client_1.expectString,
719
- });
720
- Object.assign(contents, doc);
721
- return contents;
722
- };
723
- exports.de_GetImageSetCommand = de_GetImageSetCommand;
724
- const de_GetImageSetCommandError = async (output, context) => {
725
- const parsedOutput = {
726
- ...output,
727
- body: await parseErrorBody(output.body, context),
728
- };
729
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
730
- switch (errorCode) {
731
- case "AccessDeniedException":
732
- case "com.amazonaws.medicalimaging#AccessDeniedException":
733
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
734
- case "ConflictException":
735
- case "com.amazonaws.medicalimaging#ConflictException":
736
- throw await de_ConflictExceptionRes(parsedOutput, context);
737
- case "InternalServerException":
738
- case "com.amazonaws.medicalimaging#InternalServerException":
739
- throw await de_InternalServerExceptionRes(parsedOutput, context);
740
- case "ResourceNotFoundException":
741
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
742
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
743
- case "ThrottlingException":
744
- case "com.amazonaws.medicalimaging#ThrottlingException":
745
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
746
- case "ValidationException":
747
- case "com.amazonaws.medicalimaging#ValidationException":
748
- throw await de_ValidationExceptionRes(parsedOutput, context);
749
- default:
750
- const parsedBody = parsedOutput.body;
751
- return throwDefaultError({
752
- output,
753
- parsedBody,
754
- errorCode,
755
- });
756
- }
757
- };
758
- const de_GetImageSetMetadataCommand = async (output, context) => {
759
- if (output.statusCode !== 200 && output.statusCode >= 300) {
760
- return de_GetImageSetMetadataCommandError(output, context);
761
- }
762
- const contents = (0, smithy_client_1.map)({
763
- $metadata: deserializeMetadata(output),
764
- [_cT]: [, output.headers[_ct]],
765
- [_cE]: [, output.headers[_ce]],
766
- });
767
- const data = output.body;
768
- context.sdkStreamMixin(data);
769
- contents.imageSetMetadataBlob = data;
770
- return contents;
771
- };
772
- exports.de_GetImageSetMetadataCommand = de_GetImageSetMetadataCommand;
773
- const de_GetImageSetMetadataCommandError = async (output, context) => {
774
- const parsedOutput = {
775
- ...output,
776
- body: await parseErrorBody(output.body, context),
777
- };
778
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
779
- switch (errorCode) {
780
- case "AccessDeniedException":
781
- case "com.amazonaws.medicalimaging#AccessDeniedException":
782
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
783
- case "ConflictException":
784
- case "com.amazonaws.medicalimaging#ConflictException":
785
- throw await de_ConflictExceptionRes(parsedOutput, context);
786
- case "InternalServerException":
787
- case "com.amazonaws.medicalimaging#InternalServerException":
788
- throw await de_InternalServerExceptionRes(parsedOutput, context);
789
- case "ResourceNotFoundException":
790
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
791
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
792
- case "ThrottlingException":
793
- case "com.amazonaws.medicalimaging#ThrottlingException":
794
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
795
- case "ValidationException":
796
- case "com.amazonaws.medicalimaging#ValidationException":
797
- throw await de_ValidationExceptionRes(parsedOutput, context);
798
- default:
799
- const parsedBody = parsedOutput.body;
800
- return throwDefaultError({
801
- output,
802
- parsedBody,
803
- errorCode,
804
- });
805
- }
806
- };
807
- const de_ListDatastoresCommand = async (output, context) => {
808
- if (output.statusCode !== 200 && output.statusCode >= 300) {
809
- return de_ListDatastoresCommandError(output, context);
810
- }
811
- const contents = (0, smithy_client_1.map)({
812
- $metadata: deserializeMetadata(output),
813
- });
814
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
815
- const doc = (0, smithy_client_1.take)(data, {
816
- datastoreSummaries: (_) => de_DatastoreSummaries(_, context),
817
- nextToken: smithy_client_1.expectString,
818
- });
819
- Object.assign(contents, doc);
820
- return contents;
821
- };
822
- exports.de_ListDatastoresCommand = de_ListDatastoresCommand;
823
- const de_ListDatastoresCommandError = async (output, context) => {
824
- const parsedOutput = {
825
- ...output,
826
- body: await parseErrorBody(output.body, context),
827
- };
828
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
829
- switch (errorCode) {
830
- case "AccessDeniedException":
831
- case "com.amazonaws.medicalimaging#AccessDeniedException":
832
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
833
- case "InternalServerException":
834
- case "com.amazonaws.medicalimaging#InternalServerException":
835
- throw await de_InternalServerExceptionRes(parsedOutput, context);
836
- case "ThrottlingException":
837
- case "com.amazonaws.medicalimaging#ThrottlingException":
838
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
839
- case "ValidationException":
840
- case "com.amazonaws.medicalimaging#ValidationException":
841
- throw await de_ValidationExceptionRes(parsedOutput, context);
842
- default:
843
- const parsedBody = parsedOutput.body;
844
- return throwDefaultError({
845
- output,
846
- parsedBody,
847
- errorCode,
848
- });
849
- }
850
- };
851
- const de_ListDICOMImportJobsCommand = async (output, context) => {
852
- if (output.statusCode !== 200 && output.statusCode >= 300) {
853
- return de_ListDICOMImportJobsCommandError(output, context);
854
- }
855
- const contents = (0, smithy_client_1.map)({
856
- $metadata: deserializeMetadata(output),
857
- });
858
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
859
- const doc = (0, smithy_client_1.take)(data, {
860
- jobSummaries: (_) => de_DICOMImportJobSummaries(_, context),
861
- nextToken: smithy_client_1.expectString,
862
- });
863
- Object.assign(contents, doc);
864
- return contents;
865
- };
866
- exports.de_ListDICOMImportJobsCommand = de_ListDICOMImportJobsCommand;
867
- const de_ListDICOMImportJobsCommandError = async (output, context) => {
868
- const parsedOutput = {
869
- ...output,
870
- body: await parseErrorBody(output.body, context),
871
- };
872
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
873
- switch (errorCode) {
874
- case "AccessDeniedException":
875
- case "com.amazonaws.medicalimaging#AccessDeniedException":
876
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
877
- case "ConflictException":
878
- case "com.amazonaws.medicalimaging#ConflictException":
879
- throw await de_ConflictExceptionRes(parsedOutput, context);
880
- case "InternalServerException":
881
- case "com.amazonaws.medicalimaging#InternalServerException":
882
- throw await de_InternalServerExceptionRes(parsedOutput, context);
883
- case "ResourceNotFoundException":
884
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
885
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
886
- case "ThrottlingException":
887
- case "com.amazonaws.medicalimaging#ThrottlingException":
888
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
889
- case "ValidationException":
890
- case "com.amazonaws.medicalimaging#ValidationException":
891
- throw await de_ValidationExceptionRes(parsedOutput, context);
892
- default:
893
- const parsedBody = parsedOutput.body;
894
- return throwDefaultError({
895
- output,
896
- parsedBody,
897
- errorCode,
898
- });
899
- }
900
- };
901
- const de_ListImageSetVersionsCommand = async (output, context) => {
902
- if (output.statusCode !== 200 && output.statusCode >= 300) {
903
- return de_ListImageSetVersionsCommandError(output, context);
904
- }
905
- const contents = (0, smithy_client_1.map)({
906
- $metadata: deserializeMetadata(output),
907
- });
908
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
909
- const doc = (0, smithy_client_1.take)(data, {
910
- imageSetPropertiesList: (_) => de_ImageSetPropertiesList(_, context),
911
- nextToken: smithy_client_1.expectString,
912
- });
913
- Object.assign(contents, doc);
914
- return contents;
915
- };
916
- exports.de_ListImageSetVersionsCommand = de_ListImageSetVersionsCommand;
917
- const de_ListImageSetVersionsCommandError = async (output, context) => {
918
- const parsedOutput = {
919
- ...output,
920
- body: await parseErrorBody(output.body, context),
921
- };
922
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
923
- switch (errorCode) {
924
- case "AccessDeniedException":
925
- case "com.amazonaws.medicalimaging#AccessDeniedException":
926
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
927
- case "ConflictException":
928
- case "com.amazonaws.medicalimaging#ConflictException":
929
- throw await de_ConflictExceptionRes(parsedOutput, context);
930
- case "InternalServerException":
931
- case "com.amazonaws.medicalimaging#InternalServerException":
932
- throw await de_InternalServerExceptionRes(parsedOutput, context);
933
- case "ResourceNotFoundException":
934
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
935
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
936
- case "ThrottlingException":
937
- case "com.amazonaws.medicalimaging#ThrottlingException":
938
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
939
- case "ValidationException":
940
- case "com.amazonaws.medicalimaging#ValidationException":
941
- throw await de_ValidationExceptionRes(parsedOutput, context);
942
- default:
943
- const parsedBody = parsedOutput.body;
944
- return throwDefaultError({
945
- output,
946
- parsedBody,
947
- errorCode,
948
- });
949
- }
950
- };
951
- const de_ListTagsForResourceCommand = async (output, context) => {
952
- if (output.statusCode !== 200 && output.statusCode >= 300) {
953
- return de_ListTagsForResourceCommandError(output, context);
954
- }
955
- const contents = (0, smithy_client_1.map)({
956
- $metadata: deserializeMetadata(output),
957
- });
958
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
959
- const doc = (0, smithy_client_1.take)(data, {
960
- tags: smithy_client_1._json,
961
- });
962
- Object.assign(contents, doc);
963
- return contents;
964
- };
965
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
966
- const de_ListTagsForResourceCommandError = async (output, context) => {
967
- const parsedOutput = {
968
- ...output,
969
- body: await parseErrorBody(output.body, context),
970
- };
971
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
972
- switch (errorCode) {
973
- case "AccessDeniedException":
974
- case "com.amazonaws.medicalimaging#AccessDeniedException":
975
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
976
- case "InternalServerException":
977
- case "com.amazonaws.medicalimaging#InternalServerException":
978
- throw await de_InternalServerExceptionRes(parsedOutput, context);
979
- case "ResourceNotFoundException":
980
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
981
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
982
- case "ThrottlingException":
983
- case "com.amazonaws.medicalimaging#ThrottlingException":
984
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
985
- case "ValidationException":
986
- case "com.amazonaws.medicalimaging#ValidationException":
987
- throw await de_ValidationExceptionRes(parsedOutput, context);
988
- default:
989
- const parsedBody = parsedOutput.body;
990
- return throwDefaultError({
991
- output,
992
- parsedBody,
993
- errorCode,
994
- });
995
- }
996
- };
997
- const de_SearchImageSetsCommand = async (output, context) => {
998
- if (output.statusCode !== 200 && output.statusCode >= 300) {
999
- return de_SearchImageSetsCommandError(output, context);
1000
- }
1001
- const contents = (0, smithy_client_1.map)({
1002
- $metadata: deserializeMetadata(output),
1003
- });
1004
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1005
- const doc = (0, smithy_client_1.take)(data, {
1006
- imageSetsMetadataSummaries: (_) => de_ImageSetsMetadataSummaries(_, context),
1007
- nextToken: smithy_client_1.expectString,
1008
- });
1009
- Object.assign(contents, doc);
1010
- return contents;
1011
- };
1012
- exports.de_SearchImageSetsCommand = de_SearchImageSetsCommand;
1013
- const de_SearchImageSetsCommandError = async (output, context) => {
1014
- const parsedOutput = {
1015
- ...output,
1016
- body: await parseErrorBody(output.body, context),
1017
- };
1018
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1019
- switch (errorCode) {
1020
- case "AccessDeniedException":
1021
- case "com.amazonaws.medicalimaging#AccessDeniedException":
1022
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1023
- case "ConflictException":
1024
- case "com.amazonaws.medicalimaging#ConflictException":
1025
- throw await de_ConflictExceptionRes(parsedOutput, context);
1026
- case "InternalServerException":
1027
- case "com.amazonaws.medicalimaging#InternalServerException":
1028
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1029
- case "ResourceNotFoundException":
1030
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
1031
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1032
- case "ThrottlingException":
1033
- case "com.amazonaws.medicalimaging#ThrottlingException":
1034
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1035
- case "ValidationException":
1036
- case "com.amazonaws.medicalimaging#ValidationException":
1037
- throw await de_ValidationExceptionRes(parsedOutput, context);
1038
- default:
1039
- const parsedBody = parsedOutput.body;
1040
- return throwDefaultError({
1041
- output,
1042
- parsedBody,
1043
- errorCode,
1044
- });
1045
- }
1046
- };
1047
- const de_StartDICOMImportJobCommand = async (output, context) => {
1048
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1049
- return de_StartDICOMImportJobCommandError(output, context);
1050
- }
1051
- const contents = (0, smithy_client_1.map)({
1052
- $metadata: deserializeMetadata(output),
1053
- });
1054
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1055
- const doc = (0, smithy_client_1.take)(data, {
1056
- datastoreId: smithy_client_1.expectString,
1057
- jobId: smithy_client_1.expectString,
1058
- jobStatus: smithy_client_1.expectString,
1059
- submittedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1060
- });
1061
- Object.assign(contents, doc);
1062
- return contents;
1063
- };
1064
- exports.de_StartDICOMImportJobCommand = de_StartDICOMImportJobCommand;
1065
- const de_StartDICOMImportJobCommandError = async (output, context) => {
1066
- const parsedOutput = {
1067
- ...output,
1068
- body: await parseErrorBody(output.body, context),
1069
- };
1070
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1071
- switch (errorCode) {
1072
- case "AccessDeniedException":
1073
- case "com.amazonaws.medicalimaging#AccessDeniedException":
1074
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1075
- case "ConflictException":
1076
- case "com.amazonaws.medicalimaging#ConflictException":
1077
- throw await de_ConflictExceptionRes(parsedOutput, context);
1078
- case "InternalServerException":
1079
- case "com.amazonaws.medicalimaging#InternalServerException":
1080
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1081
- case "ResourceNotFoundException":
1082
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
1083
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1084
- case "ServiceQuotaExceededException":
1085
- case "com.amazonaws.medicalimaging#ServiceQuotaExceededException":
1086
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1087
- case "ThrottlingException":
1088
- case "com.amazonaws.medicalimaging#ThrottlingException":
1089
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1090
- case "ValidationException":
1091
- case "com.amazonaws.medicalimaging#ValidationException":
1092
- throw await de_ValidationExceptionRes(parsedOutput, context);
1093
- default:
1094
- const parsedBody = parsedOutput.body;
1095
- return throwDefaultError({
1096
- output,
1097
- parsedBody,
1098
- errorCode,
1099
- });
1100
- }
1101
- };
1102
- const de_TagResourceCommand = async (output, context) => {
1103
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1104
- return de_TagResourceCommandError(output, context);
1105
- }
1106
- const contents = (0, smithy_client_1.map)({
1107
- $metadata: deserializeMetadata(output),
1108
- });
1109
- await (0, smithy_client_1.collectBody)(output.body, context);
1110
- return contents;
1111
- };
1112
- exports.de_TagResourceCommand = de_TagResourceCommand;
1113
- const de_TagResourceCommandError = async (output, context) => {
1114
- const parsedOutput = {
1115
- ...output,
1116
- body: await parseErrorBody(output.body, context),
1117
- };
1118
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1119
- switch (errorCode) {
1120
- case "AccessDeniedException":
1121
- case "com.amazonaws.medicalimaging#AccessDeniedException":
1122
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1123
- case "InternalServerException":
1124
- case "com.amazonaws.medicalimaging#InternalServerException":
1125
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1126
- case "ResourceNotFoundException":
1127
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
1128
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1129
- case "ThrottlingException":
1130
- case "com.amazonaws.medicalimaging#ThrottlingException":
1131
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1132
- case "ValidationException":
1133
- case "com.amazonaws.medicalimaging#ValidationException":
1134
- throw await de_ValidationExceptionRes(parsedOutput, context);
1135
- default:
1136
- const parsedBody = parsedOutput.body;
1137
- return throwDefaultError({
1138
- output,
1139
- parsedBody,
1140
- errorCode,
1141
- });
1142
- }
1143
- };
1144
- const de_UntagResourceCommand = async (output, context) => {
1145
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1146
- return de_UntagResourceCommandError(output, context);
1147
- }
1148
- const contents = (0, smithy_client_1.map)({
1149
- $metadata: deserializeMetadata(output),
1150
- });
1151
- await (0, smithy_client_1.collectBody)(output.body, context);
1152
- return contents;
1153
- };
1154
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
1155
- const de_UntagResourceCommandError = async (output, context) => {
1156
- const parsedOutput = {
1157
- ...output,
1158
- body: await parseErrorBody(output.body, context),
1159
- };
1160
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1161
- switch (errorCode) {
1162
- case "AccessDeniedException":
1163
- case "com.amazonaws.medicalimaging#AccessDeniedException":
1164
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1165
- case "InternalServerException":
1166
- case "com.amazonaws.medicalimaging#InternalServerException":
1167
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1168
- case "ResourceNotFoundException":
1169
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
1170
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1171
- case "ThrottlingException":
1172
- case "com.amazonaws.medicalimaging#ThrottlingException":
1173
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1174
- case "ValidationException":
1175
- case "com.amazonaws.medicalimaging#ValidationException":
1176
- throw await de_ValidationExceptionRes(parsedOutput, context);
1177
- default:
1178
- const parsedBody = parsedOutput.body;
1179
- return throwDefaultError({
1180
- output,
1181
- parsedBody,
1182
- errorCode,
1183
- });
1184
- }
1185
- };
1186
- const de_UpdateImageSetMetadataCommand = async (output, context) => {
1187
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1188
- return de_UpdateImageSetMetadataCommandError(output, context);
1189
- }
1190
- const contents = (0, smithy_client_1.map)({
1191
- $metadata: deserializeMetadata(output),
1192
- });
1193
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1194
- const doc = (0, smithy_client_1.take)(data, {
1195
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1196
- datastoreId: smithy_client_1.expectString,
1197
- imageSetId: smithy_client_1.expectString,
1198
- imageSetState: smithy_client_1.expectString,
1199
- imageSetWorkflowStatus: smithy_client_1.expectString,
1200
- latestVersionId: smithy_client_1.expectString,
1201
- message: smithy_client_1.expectString,
1202
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1203
- });
1204
- Object.assign(contents, doc);
1205
- return contents;
1206
- };
1207
- exports.de_UpdateImageSetMetadataCommand = de_UpdateImageSetMetadataCommand;
1208
- const de_UpdateImageSetMetadataCommandError = async (output, context) => {
1209
- const parsedOutput = {
1210
- ...output,
1211
- body: await parseErrorBody(output.body, context),
1212
- };
1213
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1214
- switch (errorCode) {
1215
- case "AccessDeniedException":
1216
- case "com.amazonaws.medicalimaging#AccessDeniedException":
1217
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1218
- case "ConflictException":
1219
- case "com.amazonaws.medicalimaging#ConflictException":
1220
- throw await de_ConflictExceptionRes(parsedOutput, context);
1221
- case "InternalServerException":
1222
- case "com.amazonaws.medicalimaging#InternalServerException":
1223
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1224
- case "ResourceNotFoundException":
1225
- case "com.amazonaws.medicalimaging#ResourceNotFoundException":
1226
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1227
- case "ServiceQuotaExceededException":
1228
- case "com.amazonaws.medicalimaging#ServiceQuotaExceededException":
1229
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1230
- case "ThrottlingException":
1231
- case "com.amazonaws.medicalimaging#ThrottlingException":
1232
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1233
- case "ValidationException":
1234
- case "com.amazonaws.medicalimaging#ValidationException":
1235
- throw await de_ValidationExceptionRes(parsedOutput, context);
1236
- default:
1237
- const parsedBody = parsedOutput.body;
1238
- return throwDefaultError({
1239
- output,
1240
- parsedBody,
1241
- errorCode,
1242
- });
1243
- }
1244
- };
1245
- const throwDefaultError = (0, smithy_client_1.withBaseException)(MedicalImagingServiceException_1.MedicalImagingServiceException);
1246
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1247
- const contents = (0, smithy_client_1.map)({});
1248
- const data = parsedOutput.body;
1249
- const doc = (0, smithy_client_1.take)(data, {
1250
- message: smithy_client_1.expectString,
1251
- });
1252
- Object.assign(contents, doc);
1253
- const exception = new models_0_1.AccessDeniedException({
1254
- $metadata: deserializeMetadata(parsedOutput),
1255
- ...contents,
1256
- });
1257
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1258
- };
1259
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
1260
- const contents = (0, smithy_client_1.map)({});
1261
- const data = parsedOutput.body;
1262
- const doc = (0, smithy_client_1.take)(data, {
1263
- message: smithy_client_1.expectString,
1264
- });
1265
- Object.assign(contents, doc);
1266
- const exception = new models_0_1.ConflictException({
1267
- $metadata: deserializeMetadata(parsedOutput),
1268
- ...contents,
1269
- });
1270
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1271
- };
1272
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1273
- const contents = (0, smithy_client_1.map)({});
1274
- const data = parsedOutput.body;
1275
- const doc = (0, smithy_client_1.take)(data, {
1276
- message: smithy_client_1.expectString,
1277
- });
1278
- Object.assign(contents, doc);
1279
- const exception = new models_0_1.InternalServerException({
1280
- $metadata: deserializeMetadata(parsedOutput),
1281
- ...contents,
1282
- });
1283
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1284
- };
1285
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1286
- const contents = (0, smithy_client_1.map)({});
1287
- const data = parsedOutput.body;
1288
- const doc = (0, smithy_client_1.take)(data, {
1289
- message: smithy_client_1.expectString,
1290
- });
1291
- Object.assign(contents, doc);
1292
- const exception = new models_0_1.ResourceNotFoundException({
1293
- $metadata: deserializeMetadata(parsedOutput),
1294
- ...contents,
1295
- });
1296
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1297
- };
1298
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1299
- const contents = (0, smithy_client_1.map)({});
1300
- const data = parsedOutput.body;
1301
- const doc = (0, smithy_client_1.take)(data, {
1302
- message: smithy_client_1.expectString,
1303
- });
1304
- Object.assign(contents, doc);
1305
- const exception = new models_0_1.ServiceQuotaExceededException({
1306
- $metadata: deserializeMetadata(parsedOutput),
1307
- ...contents,
1308
- });
1309
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1310
- };
1311
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1312
- const contents = (0, smithy_client_1.map)({});
1313
- const data = parsedOutput.body;
1314
- const doc = (0, smithy_client_1.take)(data, {
1315
- message: smithy_client_1.expectString,
1316
- });
1317
- Object.assign(contents, doc);
1318
- const exception = new models_0_1.ThrottlingException({
1319
- $metadata: deserializeMetadata(parsedOutput),
1320
- ...contents,
1321
- });
1322
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1323
- };
1324
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
1325
- const contents = (0, smithy_client_1.map)({});
1326
- const data = parsedOutput.body;
1327
- const doc = (0, smithy_client_1.take)(data, {
1328
- message: smithy_client_1.expectString,
1329
- });
1330
- Object.assign(contents, doc);
1331
- const exception = new models_0_1.ValidationException({
1332
- $metadata: deserializeMetadata(parsedOutput),
1333
- ...contents,
1334
- });
1335
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1336
- };
1337
- const se_DICOMUpdates = (input, context) => {
1338
- return (0, smithy_client_1.take)(input, {
1339
- removableAttributes: context.base64Encoder,
1340
- updatableAttributes: context.base64Encoder,
1341
- });
1342
- };
1343
- const se_MetadataUpdates = (input, context) => {
1344
- return models_0_1.MetadataUpdates.visit(input, {
1345
- DICOMUpdates: (value) => ({ DICOMUpdates: se_DICOMUpdates(value, context) }),
1346
- _: (name, value) => ({ name: value }),
1347
- });
1348
- };
1349
- const se_SearchByAttributeValue = (input, context) => {
1350
- return models_0_1.SearchByAttributeValue.visit(input, {
1351
- DICOMAccessionNumber: (value) => ({ DICOMAccessionNumber: value }),
1352
- DICOMPatientId: (value) => ({ DICOMPatientId: value }),
1353
- DICOMStudyDateAndTime: (value) => ({ DICOMStudyDateAndTime: (0, smithy_client_1._json)(value) }),
1354
- DICOMStudyId: (value) => ({ DICOMStudyId: value }),
1355
- DICOMStudyInstanceUID: (value) => ({ DICOMStudyInstanceUID: value }),
1356
- createdAt: (value) => ({ createdAt: Math.round(value.getTime() / 1000) }),
1357
- _: (name, value) => ({ name: value }),
1358
- });
1359
- };
1360
- const se_SearchByAttributeValues = (input, context) => {
1361
- return input
1362
- .filter((e) => e != null)
1363
- .map((entry) => {
1364
- return se_SearchByAttributeValue(entry, context);
1365
- });
1366
- };
1367
- const se_SearchCriteria = (input, context) => {
1368
- return (0, smithy_client_1.take)(input, {
1369
- filters: (_) => se_SearchFilters(_, context),
1370
- });
1371
- };
1372
- const se_SearchFilter = (input, context) => {
1373
- return (0, smithy_client_1.take)(input, {
1374
- operator: [],
1375
- values: (_) => se_SearchByAttributeValues(_, context),
1376
- });
1377
- };
1378
- const se_SearchFilters = (input, context) => {
1379
- return input
1380
- .filter((e) => e != null)
1381
- .map((entry) => {
1382
- return se_SearchFilter(entry, context);
1383
- });
1384
- };
1385
- const de_CopyDestinationImageSetProperties = (output, context) => {
1386
- return (0, smithy_client_1.take)(output, {
1387
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1388
- imageSetArn: smithy_client_1.expectString,
1389
- imageSetId: smithy_client_1.expectString,
1390
- imageSetState: smithy_client_1.expectString,
1391
- imageSetWorkflowStatus: smithy_client_1.expectString,
1392
- latestVersionId: smithy_client_1.expectString,
1393
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1394
- });
1395
- };
1396
- const de_CopySourceImageSetProperties = (output, context) => {
1397
- return (0, smithy_client_1.take)(output, {
1398
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1399
- imageSetArn: smithy_client_1.expectString,
1400
- imageSetId: smithy_client_1.expectString,
1401
- imageSetState: smithy_client_1.expectString,
1402
- imageSetWorkflowStatus: smithy_client_1.expectString,
1403
- latestVersionId: smithy_client_1.expectString,
1404
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1405
- });
1406
- };
1407
- const de_DatastoreProperties = (output, context) => {
1408
- return (0, smithy_client_1.take)(output, {
1409
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1410
- datastoreArn: smithy_client_1.expectString,
1411
- datastoreId: smithy_client_1.expectString,
1412
- datastoreName: smithy_client_1.expectString,
1413
- datastoreStatus: smithy_client_1.expectString,
1414
- kmsKeyArn: smithy_client_1.expectString,
1415
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1416
- });
1417
- };
1418
- const de_DatastoreSummaries = (output, context) => {
1419
- const retVal = (output || [])
1420
- .filter((e) => e != null)
1421
- .map((entry) => {
1422
- return de_DatastoreSummary(entry, context);
1423
- });
1424
- return retVal;
1425
- };
1426
- const de_DatastoreSummary = (output, context) => {
1427
- return (0, smithy_client_1.take)(output, {
1428
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1429
- datastoreArn: smithy_client_1.expectString,
1430
- datastoreId: smithy_client_1.expectString,
1431
- datastoreName: smithy_client_1.expectString,
1432
- datastoreStatus: smithy_client_1.expectString,
1433
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1434
- });
1435
- };
1436
- const de_DICOMImportJobProperties = (output, context) => {
1437
- return (0, smithy_client_1.take)(output, {
1438
- dataAccessRoleArn: smithy_client_1.expectString,
1439
- datastoreId: smithy_client_1.expectString,
1440
- endedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1441
- inputS3Uri: smithy_client_1.expectString,
1442
- jobId: smithy_client_1.expectString,
1443
- jobName: smithy_client_1.expectString,
1444
- jobStatus: smithy_client_1.expectString,
1445
- message: smithy_client_1.expectString,
1446
- outputS3Uri: smithy_client_1.expectString,
1447
- submittedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1448
- });
1449
- };
1450
- const de_DICOMImportJobSummaries = (output, context) => {
1451
- const retVal = (output || [])
1452
- .filter((e) => e != null)
1453
- .map((entry) => {
1454
- return de_DICOMImportJobSummary(entry, context);
1455
- });
1456
- return retVal;
1457
- };
1458
- const de_DICOMImportJobSummary = (output, context) => {
1459
- return (0, smithy_client_1.take)(output, {
1460
- dataAccessRoleArn: smithy_client_1.expectString,
1461
- datastoreId: smithy_client_1.expectString,
1462
- endedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1463
- jobId: smithy_client_1.expectString,
1464
- jobName: smithy_client_1.expectString,
1465
- jobStatus: smithy_client_1.expectString,
1466
- message: smithy_client_1.expectString,
1467
- submittedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1468
- });
1469
- };
1470
- const de_ImageSetProperties = (output, context) => {
1471
- return (0, smithy_client_1.take)(output, {
1472
- ImageSetWorkflowStatus: smithy_client_1.expectString,
1473
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1474
- deletedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1475
- imageSetId: smithy_client_1.expectString,
1476
- imageSetState: smithy_client_1.expectString,
1477
- message: smithy_client_1.expectString,
1478
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1479
- versionId: smithy_client_1.expectString,
1480
- });
1481
- };
1482
- const de_ImageSetPropertiesList = (output, context) => {
1483
- const retVal = (output || [])
1484
- .filter((e) => e != null)
1485
- .map((entry) => {
1486
- return de_ImageSetProperties(entry, context);
1487
- });
1488
- return retVal;
1489
- };
1490
- const de_ImageSetsMetadataSummaries = (output, context) => {
1491
- const retVal = (output || [])
1492
- .filter((e) => e != null)
1493
- .map((entry) => {
1494
- return de_ImageSetsMetadataSummary(entry, context);
1495
- });
1496
- return retVal;
1497
- };
1498
- const de_ImageSetsMetadataSummary = (output, context) => {
1499
- return (0, smithy_client_1.take)(output, {
1500
- DICOMTags: smithy_client_1._json,
1501
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1502
- imageSetId: smithy_client_1.expectString,
1503
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1504
- version: smithy_client_1.expectInt32,
1505
- });
1506
- };
1507
- const deserializeMetadata = (output) => ({
1508
- httpStatusCode: output.statusCode,
1509
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1510
- extendedRequestId: output.headers["x-amz-id-2"],
1511
- cfId: output.headers["x-amz-cf-id"],
1512
- });
1513
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
1514
- const isSerializableHeaderValue = (value) => value !== undefined &&
1515
- value !== null &&
1516
- value !== "" &&
1517
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1518
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1519
- const _cE = "contentEncoding";
1520
- const _cT = "contentType";
1521
- const _ce = "content-encoding";
1522
- const _ct = "content-type";
1523
- const _dS = "datastoreStatus";
1524
- const _jS = "jobStatus";
1525
- const _lV = "latestVersion";
1526
- const _lVI = "latestVersionId";
1527
- const _mR = "maxResults";
1528
- const _nT = "nextToken";
1529
- const _tK = "tagKeys";
1530
- const _v = "version";
1531
- const _vI = "versionId";
1532
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1533
- if (encoded.length) {
1534
- return JSON.parse(encoded);
1535
- }
1536
- return {};
1537
- });
1538
- const parseErrorBody = async (errorBody, context) => {
1539
- const value = await parseBody(errorBody, context);
1540
- value.message = value.message ?? value.Message;
1541
- return value;
1542
- };
1543
- const loadRestJsonErrorCode = (output, data) => {
1544
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1545
- const sanitizeErrorCode = (rawValue) => {
1546
- let cleanValue = rawValue;
1547
- if (typeof cleanValue === "number") {
1548
- cleanValue = cleanValue.toString();
1549
- }
1550
- if (cleanValue.indexOf(",") >= 0) {
1551
- cleanValue = cleanValue.split(",")[0];
1552
- }
1553
- if (cleanValue.indexOf(":") >= 0) {
1554
- cleanValue = cleanValue.split(":")[0];
1555
- }
1556
- if (cleanValue.indexOf("#") >= 0) {
1557
- cleanValue = cleanValue.split("#")[1];
1558
- }
1559
- return cleanValue;
1560
- };
1561
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1562
- if (headerKey !== undefined) {
1563
- return sanitizeErrorCode(output.headers[headerKey]);
1564
- }
1565
- if (data.code !== undefined) {
1566
- return sanitizeErrorCode(data.code);
1567
- }
1568
- if (data["__type"] !== undefined) {
1569
- return sanitizeErrorCode(data["__type"]);
1570
- }
1571
- };
1
+ module.exports = require("../index.js");