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