@aws-sdk/client-emr-serverless 3.181.0 → 3.183.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist-es/EMRServerless.js +62 -69
- package/dist-es/EMRServerlessClient.js +22 -28
- package/dist-es/commands/CancelJobRunCommand.js +21 -28
- package/dist-es/commands/CreateApplicationCommand.js +21 -28
- package/dist-es/commands/DeleteApplicationCommand.js +21 -28
- package/dist-es/commands/GetApplicationCommand.js +21 -28
- package/dist-es/commands/GetDashboardForJobRunCommand.js +21 -28
- package/dist-es/commands/GetJobRunCommand.js +21 -28
- package/dist-es/commands/ListApplicationsCommand.js +21 -28
- package/dist-es/commands/ListJobRunsCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/StartApplicationCommand.js +21 -28
- package/dist-es/commands/StartJobRunCommand.js +21 -28
- package/dist-es/commands/StopApplicationCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/commands/UpdateApplicationCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/EMRServerlessServiceException.js +5 -10
- package/dist-es/models/models_0.js +224 -116
- package/dist-es/pagination/ListApplicationsPaginator.js +25 -68
- package/dist-es/pagination/ListJobRunsPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +1157 -1557
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,1544 +1,1159 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, limitedParseDouble as __limitedParseDouble, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
4
|
import { EMRServerlessServiceException as __BaseException } from "../models/EMRServerlessServiceException";
|
|
6
5
|
import { ConflictException, InternalServerException, JobDriver, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
method: "DELETE",
|
|
24
|
-
headers: headers,
|
|
25
|
-
path: resolvedPath,
|
|
26
|
-
body: body,
|
|
27
|
-
})];
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
}); };
|
|
31
|
-
export var serializeAws_restJson1CreateApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
32
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
33
|
-
var _c;
|
|
34
|
-
return __generator(this, function (_d) {
|
|
35
|
-
switch (_d.label) {
|
|
36
|
-
case 0: return [4, context.endpoint()];
|
|
37
|
-
case 1:
|
|
38
|
-
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
39
|
-
headers = {
|
|
40
|
-
"content-type": "application/json",
|
|
41
|
-
};
|
|
42
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications";
|
|
43
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.autoStartConfiguration != null && {
|
|
44
|
-
autoStartConfiguration: serializeAws_restJson1AutoStartConfig(input.autoStartConfiguration, context),
|
|
45
|
-
})), (input.autoStopConfiguration != null && {
|
|
46
|
-
autoStopConfiguration: serializeAws_restJson1AutoStopConfig(input.autoStopConfiguration, context),
|
|
47
|
-
})), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.initialCapacity != null && {
|
|
48
|
-
initialCapacity: serializeAws_restJson1InitialCapacityConfigMap(input.initialCapacity, context),
|
|
49
|
-
})), (input.maximumCapacity != null && {
|
|
50
|
-
maximumCapacity: serializeAws_restJson1MaximumAllowedResources(input.maximumCapacity, context),
|
|
51
|
-
})), (input.name != null && { name: input.name })), (input.networkConfiguration != null && {
|
|
52
|
-
networkConfiguration: serializeAws_restJson1NetworkConfiguration(input.networkConfiguration, context),
|
|
53
|
-
})), (input.releaseLabel != null && { releaseLabel: input.releaseLabel })), (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })), (input.type != null && { type: input.type })));
|
|
54
|
-
return [2, new __HttpRequest({
|
|
55
|
-
protocol: protocol,
|
|
56
|
-
hostname: hostname,
|
|
57
|
-
port: port,
|
|
58
|
-
method: "POST",
|
|
59
|
-
headers: headers,
|
|
60
|
-
path: resolvedPath,
|
|
61
|
-
body: body,
|
|
62
|
-
})];
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}); };
|
|
66
|
-
export var serializeAws_restJson1DeleteApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
67
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
68
|
-
return __generator(this, function (_c) {
|
|
69
|
-
switch (_c.label) {
|
|
70
|
-
case 0: return [4, context.endpoint()];
|
|
71
|
-
case 1:
|
|
72
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
73
|
-
headers = {};
|
|
74
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}";
|
|
75
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
|
|
76
|
-
return [2, new __HttpRequest({
|
|
77
|
-
protocol: protocol,
|
|
78
|
-
hostname: hostname,
|
|
79
|
-
port: port,
|
|
80
|
-
method: "DELETE",
|
|
81
|
-
headers: headers,
|
|
82
|
-
path: resolvedPath,
|
|
83
|
-
body: body,
|
|
84
|
-
})];
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}); };
|
|
88
|
-
export var serializeAws_restJson1GetApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
89
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
90
|
-
return __generator(this, function (_c) {
|
|
91
|
-
switch (_c.label) {
|
|
92
|
-
case 0: return [4, context.endpoint()];
|
|
93
|
-
case 1:
|
|
94
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
95
|
-
headers = {};
|
|
96
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}";
|
|
97
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
|
|
98
|
-
return [2, new __HttpRequest({
|
|
99
|
-
protocol: protocol,
|
|
100
|
-
hostname: hostname,
|
|
101
|
-
port: port,
|
|
102
|
-
method: "GET",
|
|
103
|
-
headers: headers,
|
|
104
|
-
path: resolvedPath,
|
|
105
|
-
body: body,
|
|
106
|
-
})];
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
}); };
|
|
110
|
-
export var serializeAws_restJson1GetDashboardForJobRunCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
111
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
112
|
-
return __generator(this, function (_c) {
|
|
113
|
-
switch (_c.label) {
|
|
114
|
-
case 0: return [4, context.endpoint()];
|
|
115
|
-
case 1:
|
|
116
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
117
|
-
headers = {};
|
|
118
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
119
|
-
"/applications/{applicationId}/jobruns/{jobRunId}/dashboard";
|
|
120
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
|
|
121
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "jobRunId", function () { return input.jobRunId; }, "{jobRunId}", false);
|
|
122
|
-
return [2, new __HttpRequest({
|
|
123
|
-
protocol: protocol,
|
|
124
|
-
hostname: hostname,
|
|
125
|
-
port: port,
|
|
126
|
-
method: "GET",
|
|
127
|
-
headers: headers,
|
|
128
|
-
path: resolvedPath,
|
|
129
|
-
body: body,
|
|
130
|
-
})];
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
}); };
|
|
134
|
-
export var serializeAws_restJson1GetJobRunCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
135
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
136
|
-
return __generator(this, function (_c) {
|
|
137
|
-
switch (_c.label) {
|
|
138
|
-
case 0: return [4, context.endpoint()];
|
|
139
|
-
case 1:
|
|
140
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
141
|
-
headers = {};
|
|
142
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
143
|
-
"/applications/{applicationId}/jobruns/{jobRunId}";
|
|
144
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
|
|
145
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "jobRunId", function () { return input.jobRunId; }, "{jobRunId}", false);
|
|
146
|
-
return [2, new __HttpRequest({
|
|
147
|
-
protocol: protocol,
|
|
148
|
-
hostname: hostname,
|
|
149
|
-
port: port,
|
|
150
|
-
method: "GET",
|
|
151
|
-
headers: headers,
|
|
152
|
-
path: resolvedPath,
|
|
153
|
-
body: body,
|
|
154
|
-
})];
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
}); };
|
|
158
|
-
export var serializeAws_restJson1ListApplicationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
159
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
160
|
-
return __generator(this, function (_c) {
|
|
161
|
-
switch (_c.label) {
|
|
162
|
-
case 0: return [4, context.endpoint()];
|
|
163
|
-
case 1:
|
|
164
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
165
|
-
headers = {};
|
|
166
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications";
|
|
167
|
-
query = map({
|
|
168
|
-
nextToken: [, input.nextToken],
|
|
169
|
-
maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
|
|
170
|
-
states: [function () { return input.states !== void 0; }, function () { return (input.states || []).map(function (_entry) { return _entry; }); }],
|
|
171
|
-
});
|
|
172
|
-
return [2, new __HttpRequest({
|
|
173
|
-
protocol: protocol,
|
|
174
|
-
hostname: hostname,
|
|
175
|
-
port: port,
|
|
176
|
-
method: "GET",
|
|
177
|
-
headers: headers,
|
|
178
|
-
path: resolvedPath,
|
|
179
|
-
query: query,
|
|
180
|
-
body: body,
|
|
181
|
-
})];
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
}); };
|
|
185
|
-
export var serializeAws_restJson1ListJobRunsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
186
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
187
|
-
return __generator(this, function (_c) {
|
|
188
|
-
switch (_c.label) {
|
|
189
|
-
case 0: return [4, context.endpoint()];
|
|
190
|
-
case 1:
|
|
191
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
192
|
-
headers = {};
|
|
193
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}/jobruns";
|
|
194
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
|
|
195
|
-
query = map({
|
|
196
|
-
nextToken: [, input.nextToken],
|
|
197
|
-
maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
|
|
198
|
-
createdAtAfter: [
|
|
199
|
-
function () { return input.createdAtAfter !== void 0; },
|
|
200
|
-
function () { return (input.createdAtAfter.toISOString().split(".")[0] + "Z").toString(); },
|
|
201
|
-
],
|
|
202
|
-
createdAtBefore: [
|
|
203
|
-
function () { return input.createdAtBefore !== void 0; },
|
|
204
|
-
function () { return (input.createdAtBefore.toISOString().split(".")[0] + "Z").toString(); },
|
|
205
|
-
],
|
|
206
|
-
states: [function () { return input.states !== void 0; }, function () { return (input.states || []).map(function (_entry) { return _entry; }); }],
|
|
207
|
-
});
|
|
208
|
-
return [2, new __HttpRequest({
|
|
209
|
-
protocol: protocol,
|
|
210
|
-
hostname: hostname,
|
|
211
|
-
port: port,
|
|
212
|
-
method: "GET",
|
|
213
|
-
headers: headers,
|
|
214
|
-
path: resolvedPath,
|
|
215
|
-
query: query,
|
|
216
|
-
body: body,
|
|
217
|
-
})];
|
|
218
|
-
}
|
|
6
|
+
export const serializeAws_restJson1CancelJobRunCommand = async (input, context) => {
|
|
7
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
|
+
const headers = {};
|
|
9
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
10
|
+
"/applications/{applicationId}/jobruns/{jobRunId}";
|
|
11
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
|
|
12
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "jobRunId", () => input.jobRunId, "{jobRunId}", false);
|
|
13
|
+
let body;
|
|
14
|
+
return new __HttpRequest({
|
|
15
|
+
protocol,
|
|
16
|
+
hostname,
|
|
17
|
+
port,
|
|
18
|
+
method: "DELETE",
|
|
19
|
+
headers,
|
|
20
|
+
path: resolvedPath,
|
|
21
|
+
body,
|
|
219
22
|
});
|
|
220
|
-
}
|
|
221
|
-
export
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
})
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
headers: headers,
|
|
259
|
-
path: resolvedPath,
|
|
260
|
-
body: body,
|
|
261
|
-
})];
|
|
262
|
-
}
|
|
263
|
-
});
|
|
264
|
-
}); };
|
|
265
|
-
export var serializeAws_restJson1StartJobRunCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
266
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
267
|
-
var _c;
|
|
268
|
-
return __generator(this, function (_d) {
|
|
269
|
-
switch (_d.label) {
|
|
270
|
-
case 0: return [4, context.endpoint()];
|
|
271
|
-
case 1:
|
|
272
|
-
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
273
|
-
headers = {
|
|
274
|
-
"content-type": "application/json",
|
|
275
|
-
};
|
|
276
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}/jobruns";
|
|
277
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
|
|
278
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.configurationOverrides != null && {
|
|
279
|
-
configurationOverrides: serializeAws_restJson1ConfigurationOverrides(input.configurationOverrides, context),
|
|
280
|
-
})), (input.executionRoleArn != null && { executionRoleArn: input.executionRoleArn })), (input.executionTimeoutMinutes != null && { executionTimeoutMinutes: input.executionTimeoutMinutes })), (input.jobDriver != null && { jobDriver: serializeAws_restJson1JobDriver(input.jobDriver, context) })), (input.name != null && { name: input.name })), (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
|
|
281
|
-
return [2, new __HttpRequest({
|
|
282
|
-
protocol: protocol,
|
|
283
|
-
hostname: hostname,
|
|
284
|
-
port: port,
|
|
285
|
-
method: "POST",
|
|
286
|
-
headers: headers,
|
|
287
|
-
path: resolvedPath,
|
|
288
|
-
body: body,
|
|
289
|
-
})];
|
|
290
|
-
}
|
|
291
|
-
});
|
|
292
|
-
}); };
|
|
293
|
-
export var serializeAws_restJson1StopApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
294
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
295
|
-
return __generator(this, function (_c) {
|
|
296
|
-
switch (_c.label) {
|
|
297
|
-
case 0: return [4, context.endpoint()];
|
|
298
|
-
case 1:
|
|
299
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
300
|
-
headers = {};
|
|
301
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}/stop";
|
|
302
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
|
|
303
|
-
return [2, new __HttpRequest({
|
|
304
|
-
protocol: protocol,
|
|
305
|
-
hostname: hostname,
|
|
306
|
-
port: port,
|
|
307
|
-
method: "POST",
|
|
308
|
-
headers: headers,
|
|
309
|
-
path: resolvedPath,
|
|
310
|
-
body: body,
|
|
311
|
-
})];
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
}); };
|
|
315
|
-
export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
316
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
317
|
-
return __generator(this, function (_c) {
|
|
318
|
-
switch (_c.label) {
|
|
319
|
-
case 0: return [4, context.endpoint()];
|
|
320
|
-
case 1:
|
|
321
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
322
|
-
headers = {
|
|
323
|
-
"content-type": "application/json",
|
|
324
|
-
};
|
|
325
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
|
|
326
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
|
|
327
|
-
body = JSON.stringify(__assign({}, (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
|
|
328
|
-
return [2, new __HttpRequest({
|
|
329
|
-
protocol: protocol,
|
|
330
|
-
hostname: hostname,
|
|
331
|
-
port: port,
|
|
332
|
-
method: "POST",
|
|
333
|
-
headers: headers,
|
|
334
|
-
path: resolvedPath,
|
|
335
|
-
body: body,
|
|
336
|
-
})];
|
|
337
|
-
}
|
|
338
|
-
});
|
|
339
|
-
}); };
|
|
340
|
-
export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
341
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
342
|
-
return __generator(this, function (_c) {
|
|
343
|
-
switch (_c.label) {
|
|
344
|
-
case 0: return [4, context.endpoint()];
|
|
345
|
-
case 1:
|
|
346
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
347
|
-
headers = {};
|
|
348
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
|
|
349
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
|
|
350
|
-
query = map({
|
|
351
|
-
tagKeys: [function () { return input.tagKeys !== void 0; }, function () { return (input.tagKeys || []).map(function (_entry) { return _entry; }); }],
|
|
352
|
-
});
|
|
353
|
-
return [2, new __HttpRequest({
|
|
354
|
-
protocol: protocol,
|
|
355
|
-
hostname: hostname,
|
|
356
|
-
port: port,
|
|
357
|
-
method: "DELETE",
|
|
358
|
-
headers: headers,
|
|
359
|
-
path: resolvedPath,
|
|
360
|
-
query: query,
|
|
361
|
-
body: body,
|
|
362
|
-
})];
|
|
363
|
-
}
|
|
364
|
-
});
|
|
365
|
-
}); };
|
|
366
|
-
export var serializeAws_restJson1UpdateApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
367
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
368
|
-
var _c;
|
|
369
|
-
return __generator(this, function (_d) {
|
|
370
|
-
switch (_d.label) {
|
|
371
|
-
case 0: return [4, context.endpoint()];
|
|
372
|
-
case 1:
|
|
373
|
-
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
374
|
-
headers = {
|
|
375
|
-
"content-type": "application/json",
|
|
376
|
-
};
|
|
377
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}";
|
|
378
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
|
|
379
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.autoStartConfiguration != null && {
|
|
380
|
-
autoStartConfiguration: serializeAws_restJson1AutoStartConfig(input.autoStartConfiguration, context),
|
|
381
|
-
})), (input.autoStopConfiguration != null && {
|
|
382
|
-
autoStopConfiguration: serializeAws_restJson1AutoStopConfig(input.autoStopConfiguration, context),
|
|
383
|
-
})), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.initialCapacity != null && {
|
|
384
|
-
initialCapacity: serializeAws_restJson1InitialCapacityConfigMap(input.initialCapacity, context),
|
|
385
|
-
})), (input.maximumCapacity != null && {
|
|
386
|
-
maximumCapacity: serializeAws_restJson1MaximumAllowedResources(input.maximumCapacity, context),
|
|
387
|
-
})), (input.networkConfiguration != null && {
|
|
388
|
-
networkConfiguration: serializeAws_restJson1NetworkConfiguration(input.networkConfiguration, context),
|
|
389
|
-
})));
|
|
390
|
-
return [2, new __HttpRequest({
|
|
391
|
-
protocol: protocol,
|
|
392
|
-
hostname: hostname,
|
|
393
|
-
port: port,
|
|
394
|
-
method: "PATCH",
|
|
395
|
-
headers: headers,
|
|
396
|
-
path: resolvedPath,
|
|
397
|
-
body: body,
|
|
398
|
-
})];
|
|
399
|
-
}
|
|
400
|
-
});
|
|
401
|
-
}); };
|
|
402
|
-
export var deserializeAws_restJson1CancelJobRunCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
403
|
-
var contents, data, _a, _b;
|
|
404
|
-
return __generator(this, function (_c) {
|
|
405
|
-
switch (_c.label) {
|
|
406
|
-
case 0:
|
|
407
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
408
|
-
return [2, deserializeAws_restJson1CancelJobRunCommandError(output, context)];
|
|
409
|
-
}
|
|
410
|
-
contents = map({
|
|
411
|
-
$metadata: deserializeMetadata(output),
|
|
412
|
-
});
|
|
413
|
-
_a = __expectNonNull;
|
|
414
|
-
_b = __expectObject;
|
|
415
|
-
return [4, parseBody(output.body, context)];
|
|
416
|
-
case 1:
|
|
417
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
418
|
-
if (data.applicationId != null) {
|
|
419
|
-
contents.applicationId = __expectString(data.applicationId);
|
|
420
|
-
}
|
|
421
|
-
if (data.jobRunId != null) {
|
|
422
|
-
contents.jobRunId = __expectString(data.jobRunId);
|
|
423
|
-
}
|
|
424
|
-
return [2, contents];
|
|
425
|
-
}
|
|
426
|
-
});
|
|
427
|
-
}); };
|
|
428
|
-
var deserializeAws_restJson1CancelJobRunCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
429
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
430
|
-
var _c;
|
|
431
|
-
return __generator(this, function (_d) {
|
|
432
|
-
switch (_d.label) {
|
|
433
|
-
case 0:
|
|
434
|
-
_a = [__assign({}, output)];
|
|
435
|
-
_c = {};
|
|
436
|
-
return [4, parseErrorBody(output.body, context)];
|
|
437
|
-
case 1:
|
|
438
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
439
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
440
|
-
_b = errorCode;
|
|
441
|
-
switch (_b) {
|
|
442
|
-
case "InternalServerException": return [3, 2];
|
|
443
|
-
case "com.amazonaws.emrserverless#InternalServerException": return [3, 2];
|
|
444
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
445
|
-
case "com.amazonaws.emrserverless#ResourceNotFoundException": return [3, 4];
|
|
446
|
-
case "ValidationException": return [3, 6];
|
|
447
|
-
case "com.amazonaws.emrserverless#ValidationException": return [3, 6];
|
|
448
|
-
}
|
|
449
|
-
return [3, 8];
|
|
450
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
451
|
-
case 3: throw _d.sent();
|
|
452
|
-
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
453
|
-
case 5: throw _d.sent();
|
|
454
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
455
|
-
case 7: throw _d.sent();
|
|
456
|
-
case 8:
|
|
457
|
-
parsedBody = parsedOutput.body;
|
|
458
|
-
throwDefaultError({
|
|
459
|
-
output: output,
|
|
460
|
-
parsedBody: parsedBody,
|
|
461
|
-
exceptionCtor: __BaseException,
|
|
462
|
-
errorCode: errorCode,
|
|
463
|
-
});
|
|
464
|
-
_d.label = 9;
|
|
465
|
-
case 9: return [2];
|
|
466
|
-
}
|
|
23
|
+
};
|
|
24
|
+
export const serializeAws_restJson1CreateApplicationCommand = async (input, context) => {
|
|
25
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
26
|
+
const headers = {
|
|
27
|
+
"content-type": "application/json",
|
|
28
|
+
};
|
|
29
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
|
|
30
|
+
let body;
|
|
31
|
+
body = JSON.stringify({
|
|
32
|
+
...(input.autoStartConfiguration != null && {
|
|
33
|
+
autoStartConfiguration: serializeAws_restJson1AutoStartConfig(input.autoStartConfiguration, context),
|
|
34
|
+
}),
|
|
35
|
+
...(input.autoStopConfiguration != null && {
|
|
36
|
+
autoStopConfiguration: serializeAws_restJson1AutoStopConfig(input.autoStopConfiguration, context),
|
|
37
|
+
}),
|
|
38
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
39
|
+
...(input.initialCapacity != null && {
|
|
40
|
+
initialCapacity: serializeAws_restJson1InitialCapacityConfigMap(input.initialCapacity, context),
|
|
41
|
+
}),
|
|
42
|
+
...(input.maximumCapacity != null && {
|
|
43
|
+
maximumCapacity: serializeAws_restJson1MaximumAllowedResources(input.maximumCapacity, context),
|
|
44
|
+
}),
|
|
45
|
+
...(input.name != null && { name: input.name }),
|
|
46
|
+
...(input.networkConfiguration != null && {
|
|
47
|
+
networkConfiguration: serializeAws_restJson1NetworkConfiguration(input.networkConfiguration, context),
|
|
48
|
+
}),
|
|
49
|
+
...(input.releaseLabel != null && { releaseLabel: input.releaseLabel }),
|
|
50
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
51
|
+
...(input.type != null && { type: input.type }),
|
|
52
|
+
});
|
|
53
|
+
return new __HttpRequest({
|
|
54
|
+
protocol,
|
|
55
|
+
hostname,
|
|
56
|
+
port,
|
|
57
|
+
method: "POST",
|
|
58
|
+
headers,
|
|
59
|
+
path: resolvedPath,
|
|
60
|
+
body,
|
|
467
61
|
});
|
|
468
|
-
}
|
|
469
|
-
export
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
case 1:
|
|
484
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
485
|
-
if (data.applicationId != null) {
|
|
486
|
-
contents.applicationId = __expectString(data.applicationId);
|
|
487
|
-
}
|
|
488
|
-
if (data.arn != null) {
|
|
489
|
-
contents.arn = __expectString(data.arn);
|
|
490
|
-
}
|
|
491
|
-
if (data.name != null) {
|
|
492
|
-
contents.name = __expectString(data.name);
|
|
493
|
-
}
|
|
494
|
-
return [2, contents];
|
|
495
|
-
}
|
|
62
|
+
};
|
|
63
|
+
export const serializeAws_restJson1DeleteApplicationCommand = 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 || ""}` + "/applications/{applicationId}";
|
|
67
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
|
|
68
|
+
let body;
|
|
69
|
+
return new __HttpRequest({
|
|
70
|
+
protocol,
|
|
71
|
+
hostname,
|
|
72
|
+
port,
|
|
73
|
+
method: "DELETE",
|
|
74
|
+
headers,
|
|
75
|
+
path: resolvedPath,
|
|
76
|
+
body,
|
|
496
77
|
});
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
case "ConflictException": return [3, 2];
|
|
513
|
-
case "com.amazonaws.emrserverless#ConflictException": return [3, 2];
|
|
514
|
-
case "InternalServerException": return [3, 4];
|
|
515
|
-
case "com.amazonaws.emrserverless#InternalServerException": return [3, 4];
|
|
516
|
-
case "ValidationException": return [3, 6];
|
|
517
|
-
case "com.amazonaws.emrserverless#ValidationException": return [3, 6];
|
|
518
|
-
}
|
|
519
|
-
return [3, 8];
|
|
520
|
-
case 2: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
521
|
-
case 3: throw _d.sent();
|
|
522
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
523
|
-
case 5: throw _d.sent();
|
|
524
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
525
|
-
case 7: throw _d.sent();
|
|
526
|
-
case 8:
|
|
527
|
-
parsedBody = parsedOutput.body;
|
|
528
|
-
throwDefaultError({
|
|
529
|
-
output: output,
|
|
530
|
-
parsedBody: parsedBody,
|
|
531
|
-
exceptionCtor: __BaseException,
|
|
532
|
-
errorCode: errorCode,
|
|
533
|
-
});
|
|
534
|
-
_d.label = 9;
|
|
535
|
-
case 9: return [2];
|
|
536
|
-
}
|
|
78
|
+
};
|
|
79
|
+
export const serializeAws_restJson1GetApplicationCommand = 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 || ""}` + "/applications/{applicationId}";
|
|
83
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
|
|
84
|
+
let body;
|
|
85
|
+
return new __HttpRequest({
|
|
86
|
+
protocol,
|
|
87
|
+
hostname,
|
|
88
|
+
port,
|
|
89
|
+
method: "GET",
|
|
90
|
+
headers,
|
|
91
|
+
path: resolvedPath,
|
|
92
|
+
body,
|
|
537
93
|
});
|
|
538
|
-
}
|
|
539
|
-
export
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
94
|
+
};
|
|
95
|
+
export const serializeAws_restJson1GetDashboardForJobRunCommand = async (input, context) => {
|
|
96
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
97
|
+
const headers = {};
|
|
98
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
99
|
+
"/applications/{applicationId}/jobruns/{jobRunId}/dashboard";
|
|
100
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
|
|
101
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "jobRunId", () => input.jobRunId, "{jobRunId}", false);
|
|
102
|
+
let body;
|
|
103
|
+
return new __HttpRequest({
|
|
104
|
+
protocol,
|
|
105
|
+
hostname,
|
|
106
|
+
port,
|
|
107
|
+
method: "GET",
|
|
108
|
+
headers,
|
|
109
|
+
path: resolvedPath,
|
|
110
|
+
body,
|
|
555
111
|
});
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
574
|
-
case "com.amazonaws.emrserverless#ResourceNotFoundException": return [3, 4];
|
|
575
|
-
case "ValidationException": return [3, 6];
|
|
576
|
-
case "com.amazonaws.emrserverless#ValidationException": return [3, 6];
|
|
577
|
-
}
|
|
578
|
-
return [3, 8];
|
|
579
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
580
|
-
case 3: throw _d.sent();
|
|
581
|
-
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
582
|
-
case 5: throw _d.sent();
|
|
583
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
584
|
-
case 7: throw _d.sent();
|
|
585
|
-
case 8:
|
|
586
|
-
parsedBody = parsedOutput.body;
|
|
587
|
-
throwDefaultError({
|
|
588
|
-
output: output,
|
|
589
|
-
parsedBody: parsedBody,
|
|
590
|
-
exceptionCtor: __BaseException,
|
|
591
|
-
errorCode: errorCode,
|
|
592
|
-
});
|
|
593
|
-
_d.label = 9;
|
|
594
|
-
case 9: return [2];
|
|
595
|
-
}
|
|
112
|
+
};
|
|
113
|
+
export const serializeAws_restJson1GetJobRunCommand = async (input, context) => {
|
|
114
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
115
|
+
const headers = {};
|
|
116
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
117
|
+
"/applications/{applicationId}/jobruns/{jobRunId}";
|
|
118
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
|
|
119
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "jobRunId", () => input.jobRunId, "{jobRunId}", false);
|
|
120
|
+
let body;
|
|
121
|
+
return new __HttpRequest({
|
|
122
|
+
protocol,
|
|
123
|
+
hostname,
|
|
124
|
+
port,
|
|
125
|
+
method: "GET",
|
|
126
|
+
headers,
|
|
127
|
+
path: resolvedPath,
|
|
128
|
+
body,
|
|
596
129
|
});
|
|
597
|
-
}
|
|
598
|
-
export
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
return [2, contents];
|
|
618
|
-
}
|
|
130
|
+
};
|
|
131
|
+
export const serializeAws_restJson1ListApplicationsCommand = async (input, context) => {
|
|
132
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
133
|
+
const headers = {};
|
|
134
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
|
|
135
|
+
const query = map({
|
|
136
|
+
nextToken: [, input.nextToken],
|
|
137
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
138
|
+
states: [() => input.states !== void 0, () => (input.states || []).map((_entry) => _entry)],
|
|
139
|
+
});
|
|
140
|
+
let body;
|
|
141
|
+
return new __HttpRequest({
|
|
142
|
+
protocol,
|
|
143
|
+
hostname,
|
|
144
|
+
port,
|
|
145
|
+
method: "GET",
|
|
146
|
+
headers,
|
|
147
|
+
path: resolvedPath,
|
|
148
|
+
query,
|
|
149
|
+
body,
|
|
619
150
|
});
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
case 8:
|
|
650
|
-
parsedBody = parsedOutput.body;
|
|
651
|
-
throwDefaultError({
|
|
652
|
-
output: output,
|
|
653
|
-
parsedBody: parsedBody,
|
|
654
|
-
exceptionCtor: __BaseException,
|
|
655
|
-
errorCode: errorCode,
|
|
656
|
-
});
|
|
657
|
-
_d.label = 9;
|
|
658
|
-
case 9: return [2];
|
|
659
|
-
}
|
|
151
|
+
};
|
|
152
|
+
export const serializeAws_restJson1ListJobRunsCommand = async (input, context) => {
|
|
153
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
154
|
+
const headers = {};
|
|
155
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/jobruns";
|
|
156
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
|
|
157
|
+
const query = map({
|
|
158
|
+
nextToken: [, input.nextToken],
|
|
159
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
160
|
+
createdAtAfter: [
|
|
161
|
+
() => input.createdAtAfter !== void 0,
|
|
162
|
+
() => (input.createdAtAfter.toISOString().split(".")[0] + "Z").toString(),
|
|
163
|
+
],
|
|
164
|
+
createdAtBefore: [
|
|
165
|
+
() => input.createdAtBefore !== void 0,
|
|
166
|
+
() => (input.createdAtBefore.toISOString().split(".")[0] + "Z").toString(),
|
|
167
|
+
],
|
|
168
|
+
states: [() => input.states !== void 0, () => (input.states || []).map((_entry) => _entry)],
|
|
169
|
+
});
|
|
170
|
+
let body;
|
|
171
|
+
return new __HttpRequest({
|
|
172
|
+
protocol,
|
|
173
|
+
hostname,
|
|
174
|
+
port,
|
|
175
|
+
method: "GET",
|
|
176
|
+
headers,
|
|
177
|
+
path: resolvedPath,
|
|
178
|
+
query,
|
|
179
|
+
body,
|
|
660
180
|
});
|
|
661
|
-
}
|
|
662
|
-
export
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
case 1:
|
|
677
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
678
|
-
if (data.url != null) {
|
|
679
|
-
contents.url = __expectString(data.url);
|
|
680
|
-
}
|
|
681
|
-
return [2, contents];
|
|
682
|
-
}
|
|
181
|
+
};
|
|
182
|
+
export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
183
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
184
|
+
const headers = {};
|
|
185
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
186
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
187
|
+
let body;
|
|
188
|
+
return new __HttpRequest({
|
|
189
|
+
protocol,
|
|
190
|
+
hostname,
|
|
191
|
+
port,
|
|
192
|
+
method: "GET",
|
|
193
|
+
headers,
|
|
194
|
+
path: resolvedPath,
|
|
195
|
+
body,
|
|
683
196
|
});
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
case "InternalServerException": return [3, 2];
|
|
700
|
-
case "com.amazonaws.emrserverless#InternalServerException": return [3, 2];
|
|
701
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
702
|
-
case "com.amazonaws.emrserverless#ResourceNotFoundException": return [3, 4];
|
|
703
|
-
case "ValidationException": return [3, 6];
|
|
704
|
-
case "com.amazonaws.emrserverless#ValidationException": return [3, 6];
|
|
705
|
-
}
|
|
706
|
-
return [3, 8];
|
|
707
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
708
|
-
case 3: throw _d.sent();
|
|
709
|
-
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
710
|
-
case 5: throw _d.sent();
|
|
711
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
712
|
-
case 7: throw _d.sent();
|
|
713
|
-
case 8:
|
|
714
|
-
parsedBody = parsedOutput.body;
|
|
715
|
-
throwDefaultError({
|
|
716
|
-
output: output,
|
|
717
|
-
parsedBody: parsedBody,
|
|
718
|
-
exceptionCtor: __BaseException,
|
|
719
|
-
errorCode: errorCode,
|
|
720
|
-
});
|
|
721
|
-
_d.label = 9;
|
|
722
|
-
case 9: return [2];
|
|
723
|
-
}
|
|
197
|
+
};
|
|
198
|
+
export const serializeAws_restJson1StartApplicationCommand = async (input, context) => {
|
|
199
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
200
|
+
const headers = {};
|
|
201
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/start";
|
|
202
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
|
|
203
|
+
let body;
|
|
204
|
+
return new __HttpRequest({
|
|
205
|
+
protocol,
|
|
206
|
+
hostname,
|
|
207
|
+
port,
|
|
208
|
+
method: "POST",
|
|
209
|
+
headers,
|
|
210
|
+
path: resolvedPath,
|
|
211
|
+
body,
|
|
724
212
|
});
|
|
725
|
-
}
|
|
726
|
-
export
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
213
|
+
};
|
|
214
|
+
export const serializeAws_restJson1StartJobRunCommand = async (input, context) => {
|
|
215
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
216
|
+
const headers = {
|
|
217
|
+
"content-type": "application/json",
|
|
218
|
+
};
|
|
219
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/jobruns";
|
|
220
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
|
|
221
|
+
let body;
|
|
222
|
+
body = JSON.stringify({
|
|
223
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
224
|
+
...(input.configurationOverrides != null && {
|
|
225
|
+
configurationOverrides: serializeAws_restJson1ConfigurationOverrides(input.configurationOverrides, context),
|
|
226
|
+
}),
|
|
227
|
+
...(input.executionRoleArn != null && { executionRoleArn: input.executionRoleArn }),
|
|
228
|
+
...(input.executionTimeoutMinutes != null && { executionTimeoutMinutes: input.executionTimeoutMinutes }),
|
|
229
|
+
...(input.jobDriver != null && { jobDriver: serializeAws_restJson1JobDriver(input.jobDriver, context) }),
|
|
230
|
+
...(input.name != null && { name: input.name }),
|
|
231
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
232
|
+
});
|
|
233
|
+
return new __HttpRequest({
|
|
234
|
+
protocol,
|
|
235
|
+
hostname,
|
|
236
|
+
port,
|
|
237
|
+
method: "POST",
|
|
238
|
+
headers,
|
|
239
|
+
path: resolvedPath,
|
|
240
|
+
body,
|
|
747
241
|
});
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
case "InternalServerException": return [3, 2];
|
|
764
|
-
case "com.amazonaws.emrserverless#InternalServerException": return [3, 2];
|
|
765
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
766
|
-
case "com.amazonaws.emrserverless#ResourceNotFoundException": return [3, 4];
|
|
767
|
-
case "ValidationException": return [3, 6];
|
|
768
|
-
case "com.amazonaws.emrserverless#ValidationException": return [3, 6];
|
|
769
|
-
}
|
|
770
|
-
return [3, 8];
|
|
771
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
772
|
-
case 3: throw _d.sent();
|
|
773
|
-
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
774
|
-
case 5: throw _d.sent();
|
|
775
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
776
|
-
case 7: throw _d.sent();
|
|
777
|
-
case 8:
|
|
778
|
-
parsedBody = parsedOutput.body;
|
|
779
|
-
throwDefaultError({
|
|
780
|
-
output: output,
|
|
781
|
-
parsedBody: parsedBody,
|
|
782
|
-
exceptionCtor: __BaseException,
|
|
783
|
-
errorCode: errorCode,
|
|
784
|
-
});
|
|
785
|
-
_d.label = 9;
|
|
786
|
-
case 9: return [2];
|
|
787
|
-
}
|
|
242
|
+
};
|
|
243
|
+
export const serializeAws_restJson1StopApplicationCommand = async (input, context) => {
|
|
244
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
245
|
+
const headers = {};
|
|
246
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/stop";
|
|
247
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
|
|
248
|
+
let body;
|
|
249
|
+
return new __HttpRequest({
|
|
250
|
+
protocol,
|
|
251
|
+
hostname,
|
|
252
|
+
port,
|
|
253
|
+
method: "POST",
|
|
254
|
+
headers,
|
|
255
|
+
path: resolvedPath,
|
|
256
|
+
body,
|
|
788
257
|
});
|
|
789
|
-
}
|
|
790
|
-
export
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
if (data.nextToken != null) {
|
|
810
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
811
|
-
}
|
|
812
|
-
return [2, contents];
|
|
813
|
-
}
|
|
258
|
+
};
|
|
259
|
+
export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
260
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
261
|
+
const headers = {
|
|
262
|
+
"content-type": "application/json",
|
|
263
|
+
};
|
|
264
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
265
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
266
|
+
let body;
|
|
267
|
+
body = JSON.stringify({
|
|
268
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
269
|
+
});
|
|
270
|
+
return new __HttpRequest({
|
|
271
|
+
protocol,
|
|
272
|
+
hostname,
|
|
273
|
+
port,
|
|
274
|
+
method: "POST",
|
|
275
|
+
headers,
|
|
276
|
+
path: resolvedPath,
|
|
277
|
+
body,
|
|
814
278
|
});
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
}
|
|
835
|
-
return [3, 6];
|
|
836
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
837
|
-
case 3: throw _d.sent();
|
|
838
|
-
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
839
|
-
case 5: throw _d.sent();
|
|
840
|
-
case 6:
|
|
841
|
-
parsedBody = parsedOutput.body;
|
|
842
|
-
throwDefaultError({
|
|
843
|
-
output: output,
|
|
844
|
-
parsedBody: parsedBody,
|
|
845
|
-
exceptionCtor: __BaseException,
|
|
846
|
-
errorCode: errorCode,
|
|
847
|
-
});
|
|
848
|
-
_d.label = 7;
|
|
849
|
-
case 7: return [2];
|
|
850
|
-
}
|
|
279
|
+
};
|
|
280
|
+
export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
281
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
282
|
+
const headers = {};
|
|
283
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
284
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
285
|
+
const query = map({
|
|
286
|
+
tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
|
|
287
|
+
});
|
|
288
|
+
let body;
|
|
289
|
+
return new __HttpRequest({
|
|
290
|
+
protocol,
|
|
291
|
+
hostname,
|
|
292
|
+
port,
|
|
293
|
+
method: "DELETE",
|
|
294
|
+
headers,
|
|
295
|
+
path: resolvedPath,
|
|
296
|
+
query,
|
|
297
|
+
body,
|
|
851
298
|
});
|
|
852
|
-
}
|
|
853
|
-
export
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
299
|
+
};
|
|
300
|
+
export const serializeAws_restJson1UpdateApplicationCommand = async (input, context) => {
|
|
301
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
302
|
+
const headers = {
|
|
303
|
+
"content-type": "application/json",
|
|
304
|
+
};
|
|
305
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}";
|
|
306
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
|
|
307
|
+
let body;
|
|
308
|
+
body = JSON.stringify({
|
|
309
|
+
...(input.autoStartConfiguration != null && {
|
|
310
|
+
autoStartConfiguration: serializeAws_restJson1AutoStartConfig(input.autoStartConfiguration, context),
|
|
311
|
+
}),
|
|
312
|
+
...(input.autoStopConfiguration != null && {
|
|
313
|
+
autoStopConfiguration: serializeAws_restJson1AutoStopConfig(input.autoStopConfiguration, context),
|
|
314
|
+
}),
|
|
315
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
316
|
+
...(input.initialCapacity != null && {
|
|
317
|
+
initialCapacity: serializeAws_restJson1InitialCapacityConfigMap(input.initialCapacity, context),
|
|
318
|
+
}),
|
|
319
|
+
...(input.maximumCapacity != null && {
|
|
320
|
+
maximumCapacity: serializeAws_restJson1MaximumAllowedResources(input.maximumCapacity, context),
|
|
321
|
+
}),
|
|
322
|
+
...(input.networkConfiguration != null && {
|
|
323
|
+
networkConfiguration: serializeAws_restJson1NetworkConfiguration(input.networkConfiguration, context),
|
|
324
|
+
}),
|
|
325
|
+
});
|
|
326
|
+
return new __HttpRequest({
|
|
327
|
+
protocol,
|
|
328
|
+
hostname,
|
|
329
|
+
port,
|
|
330
|
+
method: "PATCH",
|
|
331
|
+
headers,
|
|
332
|
+
path: resolvedPath,
|
|
333
|
+
body,
|
|
877
334
|
});
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
_a = [__assign({}, output)];
|
|
886
|
-
_c = {};
|
|
887
|
-
return [4, parseErrorBody(output.body, context)];
|
|
888
|
-
case 1:
|
|
889
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
890
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
891
|
-
_b = errorCode;
|
|
892
|
-
switch (_b) {
|
|
893
|
-
case "InternalServerException": return [3, 2];
|
|
894
|
-
case "com.amazonaws.emrserverless#InternalServerException": return [3, 2];
|
|
895
|
-
case "ValidationException": return [3, 4];
|
|
896
|
-
case "com.amazonaws.emrserverless#ValidationException": return [3, 4];
|
|
897
|
-
}
|
|
898
|
-
return [3, 6];
|
|
899
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
900
|
-
case 3: throw _d.sent();
|
|
901
|
-
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
902
|
-
case 5: throw _d.sent();
|
|
903
|
-
case 6:
|
|
904
|
-
parsedBody = parsedOutput.body;
|
|
905
|
-
throwDefaultError({
|
|
906
|
-
output: output,
|
|
907
|
-
parsedBody: parsedBody,
|
|
908
|
-
exceptionCtor: __BaseException,
|
|
909
|
-
errorCode: errorCode,
|
|
910
|
-
});
|
|
911
|
-
_d.label = 7;
|
|
912
|
-
case 7: return [2];
|
|
913
|
-
}
|
|
335
|
+
};
|
|
336
|
+
export const deserializeAws_restJson1CancelJobRunCommand = async (output, context) => {
|
|
337
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
338
|
+
return deserializeAws_restJson1CancelJobRunCommandError(output, context);
|
|
339
|
+
}
|
|
340
|
+
const contents = map({
|
|
341
|
+
$metadata: deserializeMetadata(output),
|
|
914
342
|
});
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
343
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
344
|
+
if (data.applicationId != null) {
|
|
345
|
+
contents.applicationId = __expectString(data.applicationId);
|
|
346
|
+
}
|
|
347
|
+
if (data.jobRunId != null) {
|
|
348
|
+
contents.jobRunId = __expectString(data.jobRunId);
|
|
349
|
+
}
|
|
350
|
+
return contents;
|
|
351
|
+
};
|
|
352
|
+
const deserializeAws_restJson1CancelJobRunCommandError = async (output, context) => {
|
|
353
|
+
const parsedOutput = {
|
|
354
|
+
...output,
|
|
355
|
+
body: await parseErrorBody(output.body, context),
|
|
356
|
+
};
|
|
357
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
358
|
+
switch (errorCode) {
|
|
359
|
+
case "InternalServerException":
|
|
360
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
361
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
362
|
+
case "ResourceNotFoundException":
|
|
363
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
364
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
365
|
+
case "ValidationException":
|
|
366
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
367
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
368
|
+
default:
|
|
369
|
+
const parsedBody = parsedOutput.body;
|
|
370
|
+
throwDefaultError({
|
|
371
|
+
output,
|
|
372
|
+
parsedBody,
|
|
373
|
+
exceptionCtor: __BaseException,
|
|
374
|
+
errorCode,
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
export const deserializeAws_restJson1CreateApplicationCommand = async (output, context) => {
|
|
379
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
380
|
+
return deserializeAws_restJson1CreateApplicationCommandError(output, context);
|
|
381
|
+
}
|
|
382
|
+
const contents = map({
|
|
383
|
+
$metadata: deserializeMetadata(output),
|
|
937
384
|
});
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
385
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
386
|
+
if (data.applicationId != null) {
|
|
387
|
+
contents.applicationId = __expectString(data.applicationId);
|
|
388
|
+
}
|
|
389
|
+
if (data.arn != null) {
|
|
390
|
+
contents.arn = __expectString(data.arn);
|
|
391
|
+
}
|
|
392
|
+
if (data.name != null) {
|
|
393
|
+
contents.name = __expectString(data.name);
|
|
394
|
+
}
|
|
395
|
+
return contents;
|
|
396
|
+
};
|
|
397
|
+
const deserializeAws_restJson1CreateApplicationCommandError = async (output, context) => {
|
|
398
|
+
const parsedOutput = {
|
|
399
|
+
...output,
|
|
400
|
+
body: await parseErrorBody(output.body, context),
|
|
401
|
+
};
|
|
402
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
403
|
+
switch (errorCode) {
|
|
404
|
+
case "ConflictException":
|
|
405
|
+
case "com.amazonaws.emrserverless#ConflictException":
|
|
406
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
407
|
+
case "InternalServerException":
|
|
408
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
409
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
410
|
+
case "ValidationException":
|
|
411
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
412
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
413
|
+
default:
|
|
414
|
+
const parsedBody = parsedOutput.body;
|
|
415
|
+
throwDefaultError({
|
|
416
|
+
output,
|
|
417
|
+
parsedBody,
|
|
418
|
+
exceptionCtor: __BaseException,
|
|
419
|
+
errorCode,
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
};
|
|
423
|
+
export const deserializeAws_restJson1DeleteApplicationCommand = async (output, context) => {
|
|
424
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
425
|
+
return deserializeAws_restJson1DeleteApplicationCommandError(output, context);
|
|
426
|
+
}
|
|
427
|
+
const contents = map({
|
|
428
|
+
$metadata: deserializeMetadata(output),
|
|
978
429
|
});
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
430
|
+
await collectBody(output.body, context);
|
|
431
|
+
return contents;
|
|
432
|
+
};
|
|
433
|
+
const deserializeAws_restJson1DeleteApplicationCommandError = async (output, context) => {
|
|
434
|
+
const parsedOutput = {
|
|
435
|
+
...output,
|
|
436
|
+
body: await parseErrorBody(output.body, context),
|
|
437
|
+
};
|
|
438
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
439
|
+
switch (errorCode) {
|
|
440
|
+
case "InternalServerException":
|
|
441
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
442
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
443
|
+
case "ResourceNotFoundException":
|
|
444
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
445
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
446
|
+
case "ValidationException":
|
|
447
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
448
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
449
|
+
default:
|
|
450
|
+
const parsedBody = parsedOutput.body;
|
|
451
|
+
throwDefaultError({
|
|
452
|
+
output,
|
|
453
|
+
parsedBody,
|
|
454
|
+
exceptionCtor: __BaseException,
|
|
455
|
+
errorCode,
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
export const deserializeAws_restJson1GetApplicationCommand = async (output, context) => {
|
|
460
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
461
|
+
return deserializeAws_restJson1GetApplicationCommandError(output, context);
|
|
462
|
+
}
|
|
463
|
+
const contents = map({
|
|
464
|
+
$metadata: deserializeMetadata(output),
|
|
996
465
|
});
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
return
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
exceptionCtor: __BaseException,
|
|
1036
|
-
errorCode: errorCode,
|
|
1037
|
-
});
|
|
1038
|
-
_d.label = 11;
|
|
1039
|
-
case 11: return [2];
|
|
1040
|
-
}
|
|
466
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
467
|
+
if (data.application != null) {
|
|
468
|
+
contents.application = deserializeAws_restJson1Application(data.application, context);
|
|
469
|
+
}
|
|
470
|
+
return contents;
|
|
471
|
+
};
|
|
472
|
+
const deserializeAws_restJson1GetApplicationCommandError = async (output, context) => {
|
|
473
|
+
const parsedOutput = {
|
|
474
|
+
...output,
|
|
475
|
+
body: await parseErrorBody(output.body, context),
|
|
476
|
+
};
|
|
477
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
478
|
+
switch (errorCode) {
|
|
479
|
+
case "InternalServerException":
|
|
480
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
481
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
482
|
+
case "ResourceNotFoundException":
|
|
483
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
484
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
485
|
+
case "ValidationException":
|
|
486
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
487
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
488
|
+
default:
|
|
489
|
+
const parsedBody = parsedOutput.body;
|
|
490
|
+
throwDefaultError({
|
|
491
|
+
output,
|
|
492
|
+
parsedBody,
|
|
493
|
+
exceptionCtor: __BaseException,
|
|
494
|
+
errorCode,
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
export const deserializeAws_restJson1GetDashboardForJobRunCommand = async (output, context) => {
|
|
499
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
500
|
+
return deserializeAws_restJson1GetDashboardForJobRunCommandError(output, context);
|
|
501
|
+
}
|
|
502
|
+
const contents = map({
|
|
503
|
+
$metadata: deserializeMetadata(output),
|
|
1041
504
|
});
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
505
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
506
|
+
if (data.url != null) {
|
|
507
|
+
contents.url = __expectString(data.url);
|
|
508
|
+
}
|
|
509
|
+
return contents;
|
|
510
|
+
};
|
|
511
|
+
const deserializeAws_restJson1GetDashboardForJobRunCommandError = async (output, context) => {
|
|
512
|
+
const parsedOutput = {
|
|
513
|
+
...output,
|
|
514
|
+
body: await parseErrorBody(output.body, context),
|
|
515
|
+
};
|
|
516
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
517
|
+
switch (errorCode) {
|
|
518
|
+
case "InternalServerException":
|
|
519
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
520
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
521
|
+
case "ResourceNotFoundException":
|
|
522
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
523
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
524
|
+
case "ValidationException":
|
|
525
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
526
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
527
|
+
default:
|
|
528
|
+
const parsedBody = parsedOutput.body;
|
|
529
|
+
throwDefaultError({
|
|
530
|
+
output,
|
|
531
|
+
parsedBody,
|
|
532
|
+
exceptionCtor: __BaseException,
|
|
533
|
+
errorCode,
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
};
|
|
537
|
+
export const deserializeAws_restJson1GetJobRunCommand = async (output, context) => {
|
|
538
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
539
|
+
return deserializeAws_restJson1GetJobRunCommandError(output, context);
|
|
540
|
+
}
|
|
541
|
+
const contents = map({
|
|
542
|
+
$metadata: deserializeMetadata(output),
|
|
1070
543
|
});
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
return
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
exceptionCtor: __BaseException,
|
|
1110
|
-
errorCode: errorCode,
|
|
1111
|
-
});
|
|
1112
|
-
_d.label = 11;
|
|
1113
|
-
case 11: return [2];
|
|
1114
|
-
}
|
|
544
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
545
|
+
if (data.jobRun != null) {
|
|
546
|
+
contents.jobRun = deserializeAws_restJson1JobRun(data.jobRun, context);
|
|
547
|
+
}
|
|
548
|
+
return contents;
|
|
549
|
+
};
|
|
550
|
+
const deserializeAws_restJson1GetJobRunCommandError = async (output, context) => {
|
|
551
|
+
const parsedOutput = {
|
|
552
|
+
...output,
|
|
553
|
+
body: await parseErrorBody(output.body, context),
|
|
554
|
+
};
|
|
555
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
556
|
+
switch (errorCode) {
|
|
557
|
+
case "InternalServerException":
|
|
558
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
559
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
560
|
+
case "ResourceNotFoundException":
|
|
561
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
562
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
563
|
+
case "ValidationException":
|
|
564
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
565
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
566
|
+
default:
|
|
567
|
+
const parsedBody = parsedOutput.body;
|
|
568
|
+
throwDefaultError({
|
|
569
|
+
output,
|
|
570
|
+
parsedBody,
|
|
571
|
+
exceptionCtor: __BaseException,
|
|
572
|
+
errorCode,
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
};
|
|
576
|
+
export const deserializeAws_restJson1ListApplicationsCommand = async (output, context) => {
|
|
577
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
578
|
+
return deserializeAws_restJson1ListApplicationsCommandError(output, context);
|
|
579
|
+
}
|
|
580
|
+
const contents = map({
|
|
581
|
+
$metadata: deserializeMetadata(output),
|
|
1115
582
|
});
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
583
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
584
|
+
if (data.applications != null) {
|
|
585
|
+
contents.applications = deserializeAws_restJson1ApplicationList(data.applications, context);
|
|
586
|
+
}
|
|
587
|
+
if (data.nextToken != null) {
|
|
588
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
589
|
+
}
|
|
590
|
+
return contents;
|
|
591
|
+
};
|
|
592
|
+
const deserializeAws_restJson1ListApplicationsCommandError = async (output, context) => {
|
|
593
|
+
const parsedOutput = {
|
|
594
|
+
...output,
|
|
595
|
+
body: await parseErrorBody(output.body, context),
|
|
596
|
+
};
|
|
597
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
598
|
+
switch (errorCode) {
|
|
599
|
+
case "InternalServerException":
|
|
600
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
601
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
602
|
+
case "ValidationException":
|
|
603
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
604
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
605
|
+
default:
|
|
606
|
+
const parsedBody = parsedOutput.body;
|
|
607
|
+
throwDefaultError({
|
|
608
|
+
output,
|
|
609
|
+
parsedBody,
|
|
610
|
+
exceptionCtor: __BaseException,
|
|
611
|
+
errorCode,
|
|
612
|
+
});
|
|
613
|
+
}
|
|
614
|
+
};
|
|
615
|
+
export const deserializeAws_restJson1ListJobRunsCommand = async (output, context) => {
|
|
616
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
617
|
+
return deserializeAws_restJson1ListJobRunsCommandError(output, context);
|
|
618
|
+
}
|
|
619
|
+
const contents = map({
|
|
620
|
+
$metadata: deserializeMetadata(output),
|
|
1133
621
|
});
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
case 9: return [2];
|
|
1173
|
-
}
|
|
622
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
623
|
+
if (data.jobRuns != null) {
|
|
624
|
+
contents.jobRuns = deserializeAws_restJson1JobRuns(data.jobRuns, context);
|
|
625
|
+
}
|
|
626
|
+
if (data.nextToken != null) {
|
|
627
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
628
|
+
}
|
|
629
|
+
return contents;
|
|
630
|
+
};
|
|
631
|
+
const deserializeAws_restJson1ListJobRunsCommandError = async (output, context) => {
|
|
632
|
+
const parsedOutput = {
|
|
633
|
+
...output,
|
|
634
|
+
body: await parseErrorBody(output.body, context),
|
|
635
|
+
};
|
|
636
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
637
|
+
switch (errorCode) {
|
|
638
|
+
case "InternalServerException":
|
|
639
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
640
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
641
|
+
case "ValidationException":
|
|
642
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
643
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
644
|
+
default:
|
|
645
|
+
const parsedBody = parsedOutput.body;
|
|
646
|
+
throwDefaultError({
|
|
647
|
+
output,
|
|
648
|
+
parsedBody,
|
|
649
|
+
exceptionCtor: __BaseException,
|
|
650
|
+
errorCode,
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
};
|
|
654
|
+
export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
655
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
656
|
+
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
657
|
+
}
|
|
658
|
+
const contents = map({
|
|
659
|
+
$metadata: deserializeMetadata(output),
|
|
1174
660
|
});
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
661
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
662
|
+
if (data.tags != null) {
|
|
663
|
+
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
664
|
+
}
|
|
665
|
+
return contents;
|
|
666
|
+
};
|
|
667
|
+
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
668
|
+
const parsedOutput = {
|
|
669
|
+
...output,
|
|
670
|
+
body: await parseErrorBody(output.body, context),
|
|
671
|
+
};
|
|
672
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
673
|
+
switch (errorCode) {
|
|
674
|
+
case "InternalServerException":
|
|
675
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
676
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
677
|
+
case "ResourceNotFoundException":
|
|
678
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
679
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
680
|
+
case "ValidationException":
|
|
681
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
682
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
683
|
+
default:
|
|
684
|
+
const parsedBody = parsedOutput.body;
|
|
685
|
+
throwDefaultError({
|
|
686
|
+
output,
|
|
687
|
+
parsedBody,
|
|
688
|
+
exceptionCtor: __BaseException,
|
|
689
|
+
errorCode,
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
};
|
|
693
|
+
export const deserializeAws_restJson1StartApplicationCommand = async (output, context) => {
|
|
694
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
695
|
+
return deserializeAws_restJson1StartApplicationCommandError(output, context);
|
|
696
|
+
}
|
|
697
|
+
const contents = map({
|
|
698
|
+
$metadata: deserializeMetadata(output),
|
|
1192
699
|
});
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
case 9: return [2];
|
|
1232
|
-
}
|
|
700
|
+
await collectBody(output.body, context);
|
|
701
|
+
return contents;
|
|
702
|
+
};
|
|
703
|
+
const deserializeAws_restJson1StartApplicationCommandError = async (output, context) => {
|
|
704
|
+
const parsedOutput = {
|
|
705
|
+
...output,
|
|
706
|
+
body: await parseErrorBody(output.body, context),
|
|
707
|
+
};
|
|
708
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
709
|
+
switch (errorCode) {
|
|
710
|
+
case "InternalServerException":
|
|
711
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
712
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
713
|
+
case "ResourceNotFoundException":
|
|
714
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
715
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
716
|
+
case "ServiceQuotaExceededException":
|
|
717
|
+
case "com.amazonaws.emrserverless#ServiceQuotaExceededException":
|
|
718
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
719
|
+
case "ValidationException":
|
|
720
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
721
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
722
|
+
default:
|
|
723
|
+
const parsedBody = parsedOutput.body;
|
|
724
|
+
throwDefaultError({
|
|
725
|
+
output,
|
|
726
|
+
parsedBody,
|
|
727
|
+
exceptionCtor: __BaseException,
|
|
728
|
+
errorCode,
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
};
|
|
732
|
+
export const deserializeAws_restJson1StartJobRunCommand = async (output, context) => {
|
|
733
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
734
|
+
return deserializeAws_restJson1StartJobRunCommandError(output, context);
|
|
735
|
+
}
|
|
736
|
+
const contents = map({
|
|
737
|
+
$metadata: deserializeMetadata(output),
|
|
1233
738
|
});
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
739
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
740
|
+
if (data.applicationId != null) {
|
|
741
|
+
contents.applicationId = __expectString(data.applicationId);
|
|
742
|
+
}
|
|
743
|
+
if (data.arn != null) {
|
|
744
|
+
contents.arn = __expectString(data.arn);
|
|
745
|
+
}
|
|
746
|
+
if (data.jobRunId != null) {
|
|
747
|
+
contents.jobRunId = __expectString(data.jobRunId);
|
|
748
|
+
}
|
|
749
|
+
return contents;
|
|
750
|
+
};
|
|
751
|
+
const deserializeAws_restJson1StartJobRunCommandError = async (output, context) => {
|
|
752
|
+
const parsedOutput = {
|
|
753
|
+
...output,
|
|
754
|
+
body: await parseErrorBody(output.body, context),
|
|
755
|
+
};
|
|
756
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
757
|
+
switch (errorCode) {
|
|
758
|
+
case "ConflictException":
|
|
759
|
+
case "com.amazonaws.emrserverless#ConflictException":
|
|
760
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
761
|
+
case "InternalServerException":
|
|
762
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
763
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
764
|
+
case "ResourceNotFoundException":
|
|
765
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
766
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
767
|
+
case "ValidationException":
|
|
768
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
769
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
770
|
+
default:
|
|
771
|
+
const parsedBody = parsedOutput.body;
|
|
772
|
+
throwDefaultError({
|
|
773
|
+
output,
|
|
774
|
+
parsedBody,
|
|
775
|
+
exceptionCtor: __BaseException,
|
|
776
|
+
errorCode,
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
};
|
|
780
|
+
export const deserializeAws_restJson1StopApplicationCommand = async (output, context) => {
|
|
781
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
782
|
+
return deserializeAws_restJson1StopApplicationCommandError(output, context);
|
|
783
|
+
}
|
|
784
|
+
const contents = map({
|
|
785
|
+
$metadata: deserializeMetadata(output),
|
|
1251
786
|
});
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
errorCode: errorCode,
|
|
1288
|
-
});
|
|
1289
|
-
_d.label = 9;
|
|
1290
|
-
case 9: return [2];
|
|
1291
|
-
}
|
|
787
|
+
await collectBody(output.body, context);
|
|
788
|
+
return contents;
|
|
789
|
+
};
|
|
790
|
+
const deserializeAws_restJson1StopApplicationCommandError = async (output, context) => {
|
|
791
|
+
const parsedOutput = {
|
|
792
|
+
...output,
|
|
793
|
+
body: await parseErrorBody(output.body, context),
|
|
794
|
+
};
|
|
795
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
796
|
+
switch (errorCode) {
|
|
797
|
+
case "InternalServerException":
|
|
798
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
799
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
800
|
+
case "ResourceNotFoundException":
|
|
801
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
802
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
803
|
+
case "ValidationException":
|
|
804
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
805
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
806
|
+
default:
|
|
807
|
+
const parsedBody = parsedOutput.body;
|
|
808
|
+
throwDefaultError({
|
|
809
|
+
output,
|
|
810
|
+
parsedBody,
|
|
811
|
+
exceptionCtor: __BaseException,
|
|
812
|
+
errorCode,
|
|
813
|
+
});
|
|
814
|
+
}
|
|
815
|
+
};
|
|
816
|
+
export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
817
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
818
|
+
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
819
|
+
}
|
|
820
|
+
const contents = map({
|
|
821
|
+
$metadata: deserializeMetadata(output),
|
|
1292
822
|
});
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
823
|
+
await collectBody(output.body, context);
|
|
824
|
+
return contents;
|
|
825
|
+
};
|
|
826
|
+
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
827
|
+
const parsedOutput = {
|
|
828
|
+
...output,
|
|
829
|
+
body: await parseErrorBody(output.body, context),
|
|
830
|
+
};
|
|
831
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
832
|
+
switch (errorCode) {
|
|
833
|
+
case "InternalServerException":
|
|
834
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
835
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
836
|
+
case "ResourceNotFoundException":
|
|
837
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
838
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
839
|
+
case "ValidationException":
|
|
840
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
841
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
842
|
+
default:
|
|
843
|
+
const parsedBody = parsedOutput.body;
|
|
844
|
+
throwDefaultError({
|
|
845
|
+
output,
|
|
846
|
+
parsedBody,
|
|
847
|
+
exceptionCtor: __BaseException,
|
|
848
|
+
errorCode,
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
};
|
|
852
|
+
export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
853
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
854
|
+
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
855
|
+
}
|
|
856
|
+
const contents = map({
|
|
857
|
+
$metadata: deserializeMetadata(output),
|
|
1315
858
|
});
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
errorCode: errorCode,
|
|
1352
|
-
});
|
|
1353
|
-
_d.label = 9;
|
|
1354
|
-
case 9: return [2];
|
|
1355
|
-
}
|
|
859
|
+
await collectBody(output.body, context);
|
|
860
|
+
return contents;
|
|
861
|
+
};
|
|
862
|
+
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
863
|
+
const parsedOutput = {
|
|
864
|
+
...output,
|
|
865
|
+
body: await parseErrorBody(output.body, context),
|
|
866
|
+
};
|
|
867
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
868
|
+
switch (errorCode) {
|
|
869
|
+
case "InternalServerException":
|
|
870
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
871
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
872
|
+
case "ResourceNotFoundException":
|
|
873
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
874
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
875
|
+
case "ValidationException":
|
|
876
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
877
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
878
|
+
default:
|
|
879
|
+
const parsedBody = parsedOutput.body;
|
|
880
|
+
throwDefaultError({
|
|
881
|
+
output,
|
|
882
|
+
parsedBody,
|
|
883
|
+
exceptionCtor: __BaseException,
|
|
884
|
+
errorCode,
|
|
885
|
+
});
|
|
886
|
+
}
|
|
887
|
+
};
|
|
888
|
+
export const deserializeAws_restJson1UpdateApplicationCommand = async (output, context) => {
|
|
889
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
890
|
+
return deserializeAws_restJson1UpdateApplicationCommandError(output, context);
|
|
891
|
+
}
|
|
892
|
+
const contents = map({
|
|
893
|
+
$metadata: deserializeMetadata(output),
|
|
1356
894
|
});
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
return
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
895
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
896
|
+
if (data.application != null) {
|
|
897
|
+
contents.application = deserializeAws_restJson1Application(data.application, context);
|
|
898
|
+
}
|
|
899
|
+
return contents;
|
|
900
|
+
};
|
|
901
|
+
const deserializeAws_restJson1UpdateApplicationCommandError = async (output, context) => {
|
|
902
|
+
const parsedOutput = {
|
|
903
|
+
...output,
|
|
904
|
+
body: await parseErrorBody(output.body, context),
|
|
905
|
+
};
|
|
906
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
907
|
+
switch (errorCode) {
|
|
908
|
+
case "InternalServerException":
|
|
909
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
910
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
911
|
+
case "ResourceNotFoundException":
|
|
912
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
913
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
914
|
+
case "ValidationException":
|
|
915
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
916
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
917
|
+
default:
|
|
918
|
+
const parsedBody = parsedOutput.body;
|
|
919
|
+
throwDefaultError({
|
|
920
|
+
output,
|
|
921
|
+
parsedBody,
|
|
922
|
+
exceptionCtor: __BaseException,
|
|
923
|
+
errorCode,
|
|
924
|
+
});
|
|
925
|
+
}
|
|
926
|
+
};
|
|
927
|
+
const map = __map;
|
|
928
|
+
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
929
|
+
const contents = map({});
|
|
930
|
+
const data = parsedOutput.body;
|
|
931
|
+
if (data.message != null) {
|
|
932
|
+
contents.message = __expectString(data.message);
|
|
933
|
+
}
|
|
934
|
+
const exception = new ConflictException({
|
|
935
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
936
|
+
...contents,
|
|
1369
937
|
});
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
938
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
939
|
+
};
|
|
940
|
+
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
941
|
+
const contents = map({});
|
|
942
|
+
const data = parsedOutput.body;
|
|
943
|
+
if (data.message != null) {
|
|
944
|
+
contents.message = __expectString(data.message);
|
|
945
|
+
}
|
|
946
|
+
const exception = new InternalServerException({
|
|
947
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
948
|
+
...contents,
|
|
1381
949
|
});
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
950
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
951
|
+
};
|
|
952
|
+
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
953
|
+
const contents = map({});
|
|
954
|
+
const data = parsedOutput.body;
|
|
955
|
+
if (data.message != null) {
|
|
956
|
+
contents.message = __expectString(data.message);
|
|
957
|
+
}
|
|
958
|
+
const exception = new ResourceNotFoundException({
|
|
959
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
960
|
+
...contents,
|
|
1393
961
|
});
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
962
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
963
|
+
};
|
|
964
|
+
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
965
|
+
const contents = map({});
|
|
966
|
+
const data = parsedOutput.body;
|
|
967
|
+
if (data.message != null) {
|
|
968
|
+
contents.message = __expectString(data.message);
|
|
969
|
+
}
|
|
970
|
+
const exception = new ServiceQuotaExceededException({
|
|
971
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
972
|
+
...contents,
|
|
1405
973
|
});
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
974
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
975
|
+
};
|
|
976
|
+
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
977
|
+
const contents = map({});
|
|
978
|
+
const data = parsedOutput.body;
|
|
979
|
+
if (data.message != null) {
|
|
980
|
+
contents.message = __expectString(data.message);
|
|
981
|
+
}
|
|
982
|
+
const exception = new ValidationException({
|
|
983
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
984
|
+
...contents,
|
|
1417
985
|
});
|
|
1418
|
-
|
|
1419
|
-
var serializeAws_restJson1AutoStartConfig = function (input, context) {
|
|
1420
|
-
return __assign({}, (input.enabled != null && { enabled: input.enabled }));
|
|
986
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1421
987
|
};
|
|
1422
|
-
|
|
1423
|
-
return
|
|
988
|
+
const serializeAws_restJson1AutoStartConfig = (input, context) => {
|
|
989
|
+
return {
|
|
990
|
+
...(input.enabled != null && { enabled: input.enabled }),
|
|
991
|
+
};
|
|
1424
992
|
};
|
|
1425
|
-
|
|
1426
|
-
return
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
}));
|
|
993
|
+
const serializeAws_restJson1AutoStopConfig = (input, context) => {
|
|
994
|
+
return {
|
|
995
|
+
...(input.enabled != null && { enabled: input.enabled }),
|
|
996
|
+
...(input.idleTimeoutMinutes != null && { idleTimeoutMinutes: input.idleTimeoutMinutes }),
|
|
997
|
+
};
|
|
1431
998
|
};
|
|
1432
|
-
|
|
999
|
+
const serializeAws_restJson1Configuration = (input, context) => {
|
|
1000
|
+
return {
|
|
1001
|
+
...(input.classification != null && { classification: input.classification }),
|
|
1002
|
+
...(input.configurations != null && {
|
|
1003
|
+
configurations: serializeAws_restJson1ConfigurationList(input.configurations, context),
|
|
1004
|
+
}),
|
|
1005
|
+
...(input.properties != null && {
|
|
1006
|
+
properties: serializeAws_restJson1SensitivePropertiesMap(input.properties, context),
|
|
1007
|
+
}),
|
|
1008
|
+
};
|
|
1009
|
+
};
|
|
1010
|
+
const serializeAws_restJson1ConfigurationList = (input, context) => {
|
|
1433
1011
|
return input
|
|
1434
|
-
.filter(
|
|
1435
|
-
.map(
|
|
1012
|
+
.filter((e) => e != null)
|
|
1013
|
+
.map((entry) => {
|
|
1436
1014
|
return serializeAws_restJson1Configuration(entry, context);
|
|
1437
1015
|
});
|
|
1438
1016
|
};
|
|
1439
|
-
|
|
1440
|
-
return
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1017
|
+
const serializeAws_restJson1ConfigurationOverrides = (input, context) => {
|
|
1018
|
+
return {
|
|
1019
|
+
...(input.applicationConfiguration != null && {
|
|
1020
|
+
applicationConfiguration: serializeAws_restJson1ConfigurationList(input.applicationConfiguration, context),
|
|
1021
|
+
}),
|
|
1022
|
+
...(input.monitoringConfiguration != null && {
|
|
1023
|
+
monitoringConfiguration: serializeAws_restJson1MonitoringConfiguration(input.monitoringConfiguration, context),
|
|
1024
|
+
}),
|
|
1025
|
+
};
|
|
1445
1026
|
};
|
|
1446
|
-
|
|
1027
|
+
const serializeAws_restJson1EntryPointArguments = (input, context) => {
|
|
1447
1028
|
return input
|
|
1448
|
-
.filter(
|
|
1449
|
-
.map(
|
|
1029
|
+
.filter((e) => e != null)
|
|
1030
|
+
.map((entry) => {
|
|
1450
1031
|
return entry;
|
|
1451
1032
|
});
|
|
1452
1033
|
};
|
|
1453
|
-
|
|
1454
|
-
return
|
|
1034
|
+
const serializeAws_restJson1Hive = (input, context) => {
|
|
1035
|
+
return {
|
|
1036
|
+
...(input.initQueryFile != null && { initQueryFile: input.initQueryFile }),
|
|
1037
|
+
...(input.parameters != null && { parameters: input.parameters }),
|
|
1038
|
+
...(input.query != null && { query: input.query }),
|
|
1039
|
+
};
|
|
1455
1040
|
};
|
|
1456
|
-
|
|
1457
|
-
return
|
|
1458
|
-
|
|
1459
|
-
|
|
1041
|
+
const serializeAws_restJson1InitialCapacityConfig = (input, context) => {
|
|
1042
|
+
return {
|
|
1043
|
+
...(input.workerConfiguration != null && {
|
|
1044
|
+
workerConfiguration: serializeAws_restJson1WorkerResourceConfig(input.workerConfiguration, context),
|
|
1045
|
+
}),
|
|
1046
|
+
...(input.workerCount != null && { workerCount: input.workerCount }),
|
|
1047
|
+
};
|
|
1460
1048
|
};
|
|
1461
|
-
|
|
1462
|
-
return Object.entries(input).reduce(
|
|
1463
|
-
var _b;
|
|
1464
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1049
|
+
const serializeAws_restJson1InitialCapacityConfigMap = (input, context) => {
|
|
1050
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1465
1051
|
if (value === null) {
|
|
1466
1052
|
return acc;
|
|
1467
1053
|
}
|
|
1468
|
-
return
|
|
1054
|
+
return {
|
|
1055
|
+
...acc,
|
|
1056
|
+
[key]: serializeAws_restJson1InitialCapacityConfig(value, context),
|
|
1057
|
+
};
|
|
1469
1058
|
}, {});
|
|
1470
1059
|
};
|
|
1471
|
-
|
|
1060
|
+
const serializeAws_restJson1JobDriver = (input, context) => {
|
|
1472
1061
|
return JobDriver.visit(input, {
|
|
1473
|
-
hive:
|
|
1474
|
-
sparkSubmit:
|
|
1475
|
-
_:
|
|
1062
|
+
hive: (value) => ({ hive: serializeAws_restJson1Hive(value, context) }),
|
|
1063
|
+
sparkSubmit: (value) => ({ sparkSubmit: serializeAws_restJson1SparkSubmit(value, context) }),
|
|
1064
|
+
_: (name, value) => ({ name: value }),
|
|
1476
1065
|
});
|
|
1477
1066
|
};
|
|
1478
|
-
|
|
1479
|
-
return
|
|
1067
|
+
const serializeAws_restJson1ManagedPersistenceMonitoringConfiguration = (input, context) => {
|
|
1068
|
+
return {
|
|
1069
|
+
...(input.enabled != null && { enabled: input.enabled }),
|
|
1070
|
+
...(input.encryptionKeyArn != null && { encryptionKeyArn: input.encryptionKeyArn }),
|
|
1071
|
+
};
|
|
1480
1072
|
};
|
|
1481
|
-
|
|
1482
|
-
return
|
|
1073
|
+
const serializeAws_restJson1MaximumAllowedResources = (input, context) => {
|
|
1074
|
+
return {
|
|
1075
|
+
...(input.cpu != null && { cpu: input.cpu }),
|
|
1076
|
+
...(input.disk != null && { disk: input.disk }),
|
|
1077
|
+
...(input.memory != null && { memory: input.memory }),
|
|
1078
|
+
};
|
|
1483
1079
|
};
|
|
1484
|
-
|
|
1485
|
-
return
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1080
|
+
const serializeAws_restJson1MonitoringConfiguration = (input, context) => {
|
|
1081
|
+
return {
|
|
1082
|
+
...(input.managedPersistenceMonitoringConfiguration != null && {
|
|
1083
|
+
managedPersistenceMonitoringConfiguration: serializeAws_restJson1ManagedPersistenceMonitoringConfiguration(input.managedPersistenceMonitoringConfiguration, context),
|
|
1084
|
+
}),
|
|
1085
|
+
...(input.s3MonitoringConfiguration != null && {
|
|
1086
|
+
s3MonitoringConfiguration: serializeAws_restJson1S3MonitoringConfiguration(input.s3MonitoringConfiguration, context),
|
|
1087
|
+
}),
|
|
1088
|
+
};
|
|
1490
1089
|
};
|
|
1491
|
-
|
|
1492
|
-
return
|
|
1493
|
-
|
|
1494
|
-
|
|
1090
|
+
const serializeAws_restJson1NetworkConfiguration = (input, context) => {
|
|
1091
|
+
return {
|
|
1092
|
+
...(input.securityGroupIds != null && {
|
|
1093
|
+
securityGroupIds: serializeAws_restJson1SecurityGroupIds(input.securityGroupIds, context),
|
|
1094
|
+
}),
|
|
1095
|
+
...(input.subnetIds != null && { subnetIds: serializeAws_restJson1SubnetIds(input.subnetIds, context) }),
|
|
1096
|
+
};
|
|
1495
1097
|
};
|
|
1496
|
-
|
|
1497
|
-
return
|
|
1098
|
+
const serializeAws_restJson1S3MonitoringConfiguration = (input, context) => {
|
|
1099
|
+
return {
|
|
1100
|
+
...(input.encryptionKeyArn != null && { encryptionKeyArn: input.encryptionKeyArn }),
|
|
1101
|
+
...(input.logUri != null && { logUri: input.logUri }),
|
|
1102
|
+
};
|
|
1498
1103
|
};
|
|
1499
|
-
|
|
1104
|
+
const serializeAws_restJson1SecurityGroupIds = (input, context) => {
|
|
1500
1105
|
return input
|
|
1501
|
-
.filter(
|
|
1502
|
-
.map(
|
|
1106
|
+
.filter((e) => e != null)
|
|
1107
|
+
.map((entry) => {
|
|
1503
1108
|
return entry;
|
|
1504
1109
|
});
|
|
1505
1110
|
};
|
|
1506
|
-
|
|
1507
|
-
return Object.entries(input).reduce(
|
|
1508
|
-
var _b;
|
|
1509
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1111
|
+
const serializeAws_restJson1SensitivePropertiesMap = (input, context) => {
|
|
1112
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1510
1113
|
if (value === null) {
|
|
1511
1114
|
return acc;
|
|
1512
1115
|
}
|
|
1513
|
-
return
|
|
1116
|
+
return {
|
|
1117
|
+
...acc,
|
|
1118
|
+
[key]: value,
|
|
1119
|
+
};
|
|
1514
1120
|
}, {});
|
|
1515
1121
|
};
|
|
1516
|
-
|
|
1517
|
-
return
|
|
1518
|
-
|
|
1519
|
-
|
|
1122
|
+
const serializeAws_restJson1SparkSubmit = (input, context) => {
|
|
1123
|
+
return {
|
|
1124
|
+
...(input.entryPoint != null && { entryPoint: input.entryPoint }),
|
|
1125
|
+
...(input.entryPointArguments != null && {
|
|
1126
|
+
entryPointArguments: serializeAws_restJson1EntryPointArguments(input.entryPointArguments, context),
|
|
1127
|
+
}),
|
|
1128
|
+
...(input.sparkSubmitParameters != null && { sparkSubmitParameters: input.sparkSubmitParameters }),
|
|
1129
|
+
};
|
|
1520
1130
|
};
|
|
1521
|
-
|
|
1131
|
+
const serializeAws_restJson1SubnetIds = (input, context) => {
|
|
1522
1132
|
return input
|
|
1523
|
-
.filter(
|
|
1524
|
-
.map(
|
|
1133
|
+
.filter((e) => e != null)
|
|
1134
|
+
.map((entry) => {
|
|
1525
1135
|
return entry;
|
|
1526
1136
|
});
|
|
1527
1137
|
};
|
|
1528
|
-
|
|
1529
|
-
return Object.entries(input).reduce(
|
|
1530
|
-
var _b;
|
|
1531
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1138
|
+
const serializeAws_restJson1TagMap = (input, context) => {
|
|
1139
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1532
1140
|
if (value === null) {
|
|
1533
1141
|
return acc;
|
|
1534
1142
|
}
|
|
1535
|
-
return
|
|
1143
|
+
return {
|
|
1144
|
+
...acc,
|
|
1145
|
+
[key]: value,
|
|
1146
|
+
};
|
|
1536
1147
|
}, {});
|
|
1537
1148
|
};
|
|
1538
|
-
|
|
1539
|
-
return
|
|
1149
|
+
const serializeAws_restJson1WorkerResourceConfig = (input, context) => {
|
|
1150
|
+
return {
|
|
1151
|
+
...(input.cpu != null && { cpu: input.cpu }),
|
|
1152
|
+
...(input.disk != null && { disk: input.disk }),
|
|
1153
|
+
...(input.memory != null && { memory: input.memory }),
|
|
1154
|
+
};
|
|
1540
1155
|
};
|
|
1541
|
-
|
|
1156
|
+
const deserializeAws_restJson1Application = (output, context) => {
|
|
1542
1157
|
return {
|
|
1543
1158
|
applicationId: __expectString(output.applicationId),
|
|
1544
1159
|
arn: __expectString(output.arn),
|
|
@@ -1567,10 +1182,10 @@ var deserializeAws_restJson1Application = function (output, context) {
|
|
|
1567
1182
|
updatedAt: output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined,
|
|
1568
1183
|
};
|
|
1569
1184
|
};
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
.filter(
|
|
1573
|
-
.map(
|
|
1185
|
+
const deserializeAws_restJson1ApplicationList = (output, context) => {
|
|
1186
|
+
const retVal = (output || [])
|
|
1187
|
+
.filter((e) => e != null)
|
|
1188
|
+
.map((entry) => {
|
|
1574
1189
|
if (entry === null) {
|
|
1575
1190
|
return null;
|
|
1576
1191
|
}
|
|
@@ -1578,7 +1193,7 @@ var deserializeAws_restJson1ApplicationList = function (output, context) {
|
|
|
1578
1193
|
});
|
|
1579
1194
|
return retVal;
|
|
1580
1195
|
};
|
|
1581
|
-
|
|
1196
|
+
const deserializeAws_restJson1ApplicationSummary = (output, context) => {
|
|
1582
1197
|
return {
|
|
1583
1198
|
arn: __expectString(output.arn),
|
|
1584
1199
|
createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
|
|
@@ -1591,18 +1206,18 @@ var deserializeAws_restJson1ApplicationSummary = function (output, context) {
|
|
|
1591
1206
|
updatedAt: output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined,
|
|
1592
1207
|
};
|
|
1593
1208
|
};
|
|
1594
|
-
|
|
1209
|
+
const deserializeAws_restJson1AutoStartConfig = (output, context) => {
|
|
1595
1210
|
return {
|
|
1596
1211
|
enabled: __expectBoolean(output.enabled),
|
|
1597
1212
|
};
|
|
1598
1213
|
};
|
|
1599
|
-
|
|
1214
|
+
const deserializeAws_restJson1AutoStopConfig = (output, context) => {
|
|
1600
1215
|
return {
|
|
1601
1216
|
enabled: __expectBoolean(output.enabled),
|
|
1602
1217
|
idleTimeoutMinutes: __expectInt32(output.idleTimeoutMinutes),
|
|
1603
1218
|
};
|
|
1604
1219
|
};
|
|
1605
|
-
|
|
1220
|
+
const deserializeAws_restJson1Configuration = (output, context) => {
|
|
1606
1221
|
return {
|
|
1607
1222
|
classification: __expectString(output.classification),
|
|
1608
1223
|
configurations: output.configurations != null
|
|
@@ -1613,10 +1228,10 @@ var deserializeAws_restJson1Configuration = function (output, context) {
|
|
|
1613
1228
|
: undefined,
|
|
1614
1229
|
};
|
|
1615
1230
|
};
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
.filter(
|
|
1619
|
-
.map(
|
|
1231
|
+
const deserializeAws_restJson1ConfigurationList = (output, context) => {
|
|
1232
|
+
const retVal = (output || [])
|
|
1233
|
+
.filter((e) => e != null)
|
|
1234
|
+
.map((entry) => {
|
|
1620
1235
|
if (entry === null) {
|
|
1621
1236
|
return null;
|
|
1622
1237
|
}
|
|
@@ -1624,7 +1239,7 @@ var deserializeAws_restJson1ConfigurationList = function (output, context) {
|
|
|
1624
1239
|
});
|
|
1625
1240
|
return retVal;
|
|
1626
1241
|
};
|
|
1627
|
-
|
|
1242
|
+
const deserializeAws_restJson1ConfigurationOverrides = (output, context) => {
|
|
1628
1243
|
return {
|
|
1629
1244
|
applicationConfiguration: output.applicationConfiguration != null
|
|
1630
1245
|
? deserializeAws_restJson1ConfigurationList(output.applicationConfiguration, context)
|
|
@@ -1634,10 +1249,10 @@ var deserializeAws_restJson1ConfigurationOverrides = function (output, context)
|
|
|
1634
1249
|
: undefined,
|
|
1635
1250
|
};
|
|
1636
1251
|
};
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
.filter(
|
|
1640
|
-
.map(
|
|
1252
|
+
const deserializeAws_restJson1EntryPointArguments = (output, context) => {
|
|
1253
|
+
const retVal = (output || [])
|
|
1254
|
+
.filter((e) => e != null)
|
|
1255
|
+
.map((entry) => {
|
|
1641
1256
|
if (entry === null) {
|
|
1642
1257
|
return null;
|
|
1643
1258
|
}
|
|
@@ -1645,14 +1260,14 @@ var deserializeAws_restJson1EntryPointArguments = function (output, context) {
|
|
|
1645
1260
|
});
|
|
1646
1261
|
return retVal;
|
|
1647
1262
|
};
|
|
1648
|
-
|
|
1263
|
+
const deserializeAws_restJson1Hive = (output, context) => {
|
|
1649
1264
|
return {
|
|
1650
1265
|
initQueryFile: __expectString(output.initQueryFile),
|
|
1651
1266
|
parameters: __expectString(output.parameters),
|
|
1652
1267
|
query: __expectString(output.query),
|
|
1653
1268
|
};
|
|
1654
1269
|
};
|
|
1655
|
-
|
|
1270
|
+
const deserializeAws_restJson1InitialCapacityConfig = (output, context) => {
|
|
1656
1271
|
return {
|
|
1657
1272
|
workerConfiguration: output.workerConfiguration != null
|
|
1658
1273
|
? deserializeAws_restJson1WorkerResourceConfig(output.workerConfiguration, context)
|
|
@@ -1660,17 +1275,18 @@ var deserializeAws_restJson1InitialCapacityConfig = function (output, context) {
|
|
|
1660
1275
|
workerCount: __expectLong(output.workerCount),
|
|
1661
1276
|
};
|
|
1662
1277
|
};
|
|
1663
|
-
|
|
1664
|
-
return Object.entries(output).reduce(
|
|
1665
|
-
var _b;
|
|
1666
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1278
|
+
const deserializeAws_restJson1InitialCapacityConfigMap = (output, context) => {
|
|
1279
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1667
1280
|
if (value === null) {
|
|
1668
1281
|
return acc;
|
|
1669
1282
|
}
|
|
1670
|
-
return
|
|
1283
|
+
return {
|
|
1284
|
+
...acc,
|
|
1285
|
+
[key]: deserializeAws_restJson1InitialCapacityConfig(value, context),
|
|
1286
|
+
};
|
|
1671
1287
|
}, {});
|
|
1672
1288
|
};
|
|
1673
|
-
|
|
1289
|
+
const deserializeAws_restJson1JobDriver = (output, context) => {
|
|
1674
1290
|
if (output.hive != null) {
|
|
1675
1291
|
return {
|
|
1676
1292
|
hive: deserializeAws_restJson1Hive(output.hive, context),
|
|
@@ -1683,7 +1299,7 @@ var deserializeAws_restJson1JobDriver = function (output, context) {
|
|
|
1683
1299
|
}
|
|
1684
1300
|
return { $unknown: Object.entries(output)[0] };
|
|
1685
1301
|
};
|
|
1686
|
-
|
|
1302
|
+
const deserializeAws_restJson1JobRun = (output, context) => {
|
|
1687
1303
|
return {
|
|
1688
1304
|
applicationId: __expectString(output.applicationId),
|
|
1689
1305
|
arn: __expectString(output.arn),
|
|
@@ -1712,10 +1328,10 @@ var deserializeAws_restJson1JobRun = function (output, context) {
|
|
|
1712
1328
|
updatedAt: output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined,
|
|
1713
1329
|
};
|
|
1714
1330
|
};
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
.filter(
|
|
1718
|
-
.map(
|
|
1331
|
+
const deserializeAws_restJson1JobRuns = (output, context) => {
|
|
1332
|
+
const retVal = (output || [])
|
|
1333
|
+
.filter((e) => e != null)
|
|
1334
|
+
.map((entry) => {
|
|
1719
1335
|
if (entry === null) {
|
|
1720
1336
|
return null;
|
|
1721
1337
|
}
|
|
@@ -1723,7 +1339,7 @@ var deserializeAws_restJson1JobRuns = function (output, context) {
|
|
|
1723
1339
|
});
|
|
1724
1340
|
return retVal;
|
|
1725
1341
|
};
|
|
1726
|
-
|
|
1342
|
+
const deserializeAws_restJson1JobRunSummary = (output, context) => {
|
|
1727
1343
|
return {
|
|
1728
1344
|
applicationId: __expectString(output.applicationId),
|
|
1729
1345
|
arn: __expectString(output.arn),
|
|
@@ -1739,20 +1355,20 @@ var deserializeAws_restJson1JobRunSummary = function (output, context) {
|
|
|
1739
1355
|
updatedAt: output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined,
|
|
1740
1356
|
};
|
|
1741
1357
|
};
|
|
1742
|
-
|
|
1358
|
+
const deserializeAws_restJson1ManagedPersistenceMonitoringConfiguration = (output, context) => {
|
|
1743
1359
|
return {
|
|
1744
1360
|
enabled: __expectBoolean(output.enabled),
|
|
1745
1361
|
encryptionKeyArn: __expectString(output.encryptionKeyArn),
|
|
1746
1362
|
};
|
|
1747
1363
|
};
|
|
1748
|
-
|
|
1364
|
+
const deserializeAws_restJson1MaximumAllowedResources = (output, context) => {
|
|
1749
1365
|
return {
|
|
1750
1366
|
cpu: __expectString(output.cpu),
|
|
1751
1367
|
disk: __expectString(output.disk),
|
|
1752
1368
|
memory: __expectString(output.memory),
|
|
1753
1369
|
};
|
|
1754
1370
|
};
|
|
1755
|
-
|
|
1371
|
+
const deserializeAws_restJson1MonitoringConfiguration = (output, context) => {
|
|
1756
1372
|
return {
|
|
1757
1373
|
managedPersistenceMonitoringConfiguration: output.managedPersistenceMonitoringConfiguration != null
|
|
1758
1374
|
? deserializeAws_restJson1ManagedPersistenceMonitoringConfiguration(output.managedPersistenceMonitoringConfiguration, context)
|
|
@@ -1762,7 +1378,7 @@ var deserializeAws_restJson1MonitoringConfiguration = function (output, context)
|
|
|
1762
1378
|
: undefined,
|
|
1763
1379
|
};
|
|
1764
1380
|
};
|
|
1765
|
-
|
|
1381
|
+
const deserializeAws_restJson1NetworkConfiguration = (output, context) => {
|
|
1766
1382
|
return {
|
|
1767
1383
|
securityGroupIds: output.securityGroupIds != null
|
|
1768
1384
|
? deserializeAws_restJson1SecurityGroupIds(output.securityGroupIds, context)
|
|
@@ -1770,16 +1386,16 @@ var deserializeAws_restJson1NetworkConfiguration = function (output, context) {
|
|
|
1770
1386
|
subnetIds: output.subnetIds != null ? deserializeAws_restJson1SubnetIds(output.subnetIds, context) : undefined,
|
|
1771
1387
|
};
|
|
1772
1388
|
};
|
|
1773
|
-
|
|
1389
|
+
const deserializeAws_restJson1S3MonitoringConfiguration = (output, context) => {
|
|
1774
1390
|
return {
|
|
1775
1391
|
encryptionKeyArn: __expectString(output.encryptionKeyArn),
|
|
1776
1392
|
logUri: __expectString(output.logUri),
|
|
1777
1393
|
};
|
|
1778
1394
|
};
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
.filter(
|
|
1782
|
-
.map(
|
|
1395
|
+
const deserializeAws_restJson1SecurityGroupIds = (output, context) => {
|
|
1396
|
+
const retVal = (output || [])
|
|
1397
|
+
.filter((e) => e != null)
|
|
1398
|
+
.map((entry) => {
|
|
1783
1399
|
if (entry === null) {
|
|
1784
1400
|
return null;
|
|
1785
1401
|
}
|
|
@@ -1787,17 +1403,18 @@ var deserializeAws_restJson1SecurityGroupIds = function (output, context) {
|
|
|
1787
1403
|
});
|
|
1788
1404
|
return retVal;
|
|
1789
1405
|
};
|
|
1790
|
-
|
|
1791
|
-
return Object.entries(output).reduce(
|
|
1792
|
-
var _b;
|
|
1793
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1406
|
+
const deserializeAws_restJson1SensitivePropertiesMap = (output, context) => {
|
|
1407
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1794
1408
|
if (value === null) {
|
|
1795
1409
|
return acc;
|
|
1796
1410
|
}
|
|
1797
|
-
return
|
|
1411
|
+
return {
|
|
1412
|
+
...acc,
|
|
1413
|
+
[key]: __expectString(value),
|
|
1414
|
+
};
|
|
1798
1415
|
}, {});
|
|
1799
1416
|
};
|
|
1800
|
-
|
|
1417
|
+
const deserializeAws_restJson1SparkSubmit = (output, context) => {
|
|
1801
1418
|
return {
|
|
1802
1419
|
entryPoint: __expectString(output.entryPoint),
|
|
1803
1420
|
entryPointArguments: output.entryPointArguments != null
|
|
@@ -1806,10 +1423,10 @@ var deserializeAws_restJson1SparkSubmit = function (output, context) {
|
|
|
1806
1423
|
sparkSubmitParameters: __expectString(output.sparkSubmitParameters),
|
|
1807
1424
|
};
|
|
1808
1425
|
};
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
.filter(
|
|
1812
|
-
.map(
|
|
1426
|
+
const deserializeAws_restJson1SubnetIds = (output, context) => {
|
|
1427
|
+
const retVal = (output || [])
|
|
1428
|
+
.filter((e) => e != null)
|
|
1429
|
+
.map((entry) => {
|
|
1813
1430
|
if (entry === null) {
|
|
1814
1431
|
return null;
|
|
1815
1432
|
}
|
|
@@ -1817,81 +1434,64 @@ var deserializeAws_restJson1SubnetIds = function (output, context) {
|
|
|
1817
1434
|
});
|
|
1818
1435
|
return retVal;
|
|
1819
1436
|
};
|
|
1820
|
-
|
|
1821
|
-
return Object.entries(output).reduce(
|
|
1822
|
-
var _b;
|
|
1823
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1437
|
+
const deserializeAws_restJson1TagMap = (output, context) => {
|
|
1438
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1824
1439
|
if (value === null) {
|
|
1825
1440
|
return acc;
|
|
1826
1441
|
}
|
|
1827
|
-
return
|
|
1442
|
+
return {
|
|
1443
|
+
...acc,
|
|
1444
|
+
[key]: __expectString(value),
|
|
1445
|
+
};
|
|
1828
1446
|
}, {});
|
|
1829
1447
|
};
|
|
1830
|
-
|
|
1448
|
+
const deserializeAws_restJson1TotalResourceUtilization = (output, context) => {
|
|
1831
1449
|
return {
|
|
1832
1450
|
memoryGBHour: __limitedParseDouble(output.memoryGBHour),
|
|
1833
1451
|
storageGBHour: __limitedParseDouble(output.storageGBHour),
|
|
1834
1452
|
vCPUHour: __limitedParseDouble(output.vCPUHour),
|
|
1835
1453
|
};
|
|
1836
1454
|
};
|
|
1837
|
-
|
|
1455
|
+
const deserializeAws_restJson1WorkerResourceConfig = (output, context) => {
|
|
1838
1456
|
return {
|
|
1839
1457
|
cpu: __expectString(output.cpu),
|
|
1840
1458
|
disk: __expectString(output.disk),
|
|
1841
1459
|
memory: __expectString(output.memory),
|
|
1842
1460
|
};
|
|
1843
1461
|
};
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
});
|
|
1852
|
-
};
|
|
1853
|
-
var collectBody = function (streamBody, context) {
|
|
1854
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1462
|
+
const deserializeMetadata = (output) => ({
|
|
1463
|
+
httpStatusCode: output.statusCode,
|
|
1464
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
1465
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1466
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1467
|
+
});
|
|
1468
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
1855
1469
|
if (streamBody instanceof Uint8Array) {
|
|
1856
1470
|
return Promise.resolve(streamBody);
|
|
1857
1471
|
}
|
|
1858
1472
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1859
1473
|
};
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
}
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
});
|
|
1474
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1475
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1476
|
+
value !== null &&
|
|
1477
|
+
value !== "" &&
|
|
1478
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1479
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1480
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1481
|
+
if (encoded.length) {
|
|
1482
|
+
return JSON.parse(encoded);
|
|
1483
|
+
}
|
|
1484
|
+
return {};
|
|
1485
|
+
});
|
|
1486
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1487
|
+
const value = await parseBody(errorBody, context);
|
|
1488
|
+
value.message = value.message ?? value.Message;
|
|
1489
|
+
return value;
|
|
1877
1490
|
};
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
switch (_b.label) {
|
|
1883
|
-
case 0: return [4, parseBody(errorBody, context)];
|
|
1884
|
-
case 1:
|
|
1885
|
-
value = _b.sent();
|
|
1886
|
-
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1887
|
-
return [2, value];
|
|
1888
|
-
}
|
|
1889
|
-
});
|
|
1890
|
-
}); };
|
|
1891
|
-
var loadRestJsonErrorCode = function (output, data) {
|
|
1892
|
-
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1893
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
1894
|
-
var cleanValue = rawValue;
|
|
1491
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1492
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1493
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1494
|
+
let cleanValue = rawValue;
|
|
1895
1495
|
if (typeof cleanValue === "number") {
|
|
1896
1496
|
cleanValue = cleanValue.toString();
|
|
1897
1497
|
}
|
|
@@ -1906,7 +1506,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
1906
1506
|
}
|
|
1907
1507
|
return cleanValue;
|
|
1908
1508
|
};
|
|
1909
|
-
|
|
1509
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1910
1510
|
if (headerKey !== undefined) {
|
|
1911
1511
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1912
1512
|
}
|