@aws-sdk/client-snowball 3.186.0 → 3.190.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 +16 -0
- package/dist-es/Snowball.js +102 -109
- package/dist-es/SnowballClient.js +22 -28
- package/dist-es/commands/CancelClusterCommand.js +21 -28
- package/dist-es/commands/CancelJobCommand.js +21 -28
- package/dist-es/commands/CreateAddressCommand.js +21 -28
- package/dist-es/commands/CreateClusterCommand.js +21 -28
- package/dist-es/commands/CreateJobCommand.js +21 -28
- package/dist-es/commands/CreateLongTermPricingCommand.js +21 -28
- package/dist-es/commands/CreateReturnShippingLabelCommand.js +21 -28
- package/dist-es/commands/DescribeAddressCommand.js +21 -28
- package/dist-es/commands/DescribeAddressesCommand.js +21 -28
- package/dist-es/commands/DescribeClusterCommand.js +21 -28
- package/dist-es/commands/DescribeJobCommand.js +21 -28
- package/dist-es/commands/DescribeReturnShippingLabelCommand.js +21 -28
- package/dist-es/commands/GetJobManifestCommand.js +21 -28
- package/dist-es/commands/GetJobUnlockCodeCommand.js +21 -28
- package/dist-es/commands/GetSnowballUsageCommand.js +21 -28
- package/dist-es/commands/GetSoftwareUpdatesCommand.js +21 -28
- package/dist-es/commands/ListClusterJobsCommand.js +21 -28
- package/dist-es/commands/ListClustersCommand.js +21 -28
- package/dist-es/commands/ListCompatibleImagesCommand.js +21 -28
- package/dist-es/commands/ListJobsCommand.js +21 -28
- package/dist-es/commands/ListLongTermPricingCommand.js +21 -28
- package/dist-es/commands/UpdateClusterCommand.js +21 -28
- package/dist-es/commands/UpdateJobCommand.js +21 -28
- package/dist-es/commands/UpdateJobShipmentStateCommand.js +21 -28
- package/dist-es/commands/UpdateLongTermPricingCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/SnowballServiceException.js +5 -10
- package/dist-es/models/models_0.js +365 -212
- package/dist-es/pagination/DescribeAddressesPaginator.js +25 -68
- package/dist-es/pagination/ListClusterJobsPaginator.js +25 -68
- package/dist-es/pagination/ListClustersPaginator.js +25 -68
- package/dist-es/pagination/ListCompatibleImagesPaginator.js +25 -68
- package/dist-es/pagination/ListJobsPaginator.js +25 -68
- package/dist-es/pagination/ListLongTermPricingPaginator.js +25 -68
- package/dist-es/protocols/Aws_json1_1.js +1699 -2088
- 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,1984 +1,1618 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } 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, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { ClusterLimitExceededException, ConflictException, Ec2RequestFailedException, InvalidAddressException, InvalidInputCombinationException, InvalidJobStateException, InvalidNextTokenException, InvalidResourceException, KMSRequestFailedException, ReturnShippingLabelAlreadyExistsException, UnsupportedAddressException, } from "../models/models_0";
|
|
5
4
|
import { SnowballServiceException as __BaseException } from "../models/SnowballServiceException";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
return
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
export
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
return
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
}
|
|
204
|
-
export
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
"content-type": "application/x-amz-json-1.1",
|
|
231
|
-
"x-amz-target": "AWSIESnowballJobManagementService.ListLongTermPricing",
|
|
232
|
-
};
|
|
233
|
-
body = JSON.stringify(serializeAws_json1_1ListLongTermPricingRequest(input, context));
|
|
234
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
235
|
-
});
|
|
236
|
-
}); };
|
|
237
|
-
export var serializeAws_json1_1UpdateClusterCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
238
|
-
var headers, body;
|
|
239
|
-
return __generator(this, function (_a) {
|
|
240
|
-
headers = {
|
|
241
|
-
"content-type": "application/x-amz-json-1.1",
|
|
242
|
-
"x-amz-target": "AWSIESnowballJobManagementService.UpdateCluster",
|
|
243
|
-
};
|
|
244
|
-
body = JSON.stringify(serializeAws_json1_1UpdateClusterRequest(input, context));
|
|
245
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
246
|
-
});
|
|
247
|
-
}); };
|
|
248
|
-
export var serializeAws_json1_1UpdateJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
249
|
-
var headers, body;
|
|
250
|
-
return __generator(this, function (_a) {
|
|
251
|
-
headers = {
|
|
252
|
-
"content-type": "application/x-amz-json-1.1",
|
|
253
|
-
"x-amz-target": "AWSIESnowballJobManagementService.UpdateJob",
|
|
254
|
-
};
|
|
255
|
-
body = JSON.stringify(serializeAws_json1_1UpdateJobRequest(input, context));
|
|
256
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
257
|
-
});
|
|
258
|
-
}); };
|
|
259
|
-
export var serializeAws_json1_1UpdateJobShipmentStateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
260
|
-
var headers, body;
|
|
261
|
-
return __generator(this, function (_a) {
|
|
262
|
-
headers = {
|
|
263
|
-
"content-type": "application/x-amz-json-1.1",
|
|
264
|
-
"x-amz-target": "AWSIESnowballJobManagementService.UpdateJobShipmentState",
|
|
265
|
-
};
|
|
266
|
-
body = JSON.stringify(serializeAws_json1_1UpdateJobShipmentStateRequest(input, context));
|
|
267
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
268
|
-
});
|
|
269
|
-
}); };
|
|
270
|
-
export var serializeAws_json1_1UpdateLongTermPricingCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
271
|
-
var headers, body;
|
|
272
|
-
return __generator(this, function (_a) {
|
|
273
|
-
headers = {
|
|
274
|
-
"content-type": "application/x-amz-json-1.1",
|
|
275
|
-
"x-amz-target": "AWSIESnowballJobManagementService.UpdateLongTermPricing",
|
|
276
|
-
};
|
|
277
|
-
body = JSON.stringify(serializeAws_json1_1UpdateLongTermPricingRequest(input, context));
|
|
278
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
279
|
-
});
|
|
280
|
-
}); };
|
|
281
|
-
export var deserializeAws_json1_1CancelClusterCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
282
|
-
var data, contents, response;
|
|
283
|
-
return __generator(this, function (_a) {
|
|
284
|
-
switch (_a.label) {
|
|
285
|
-
case 0:
|
|
286
|
-
if (output.statusCode >= 300) {
|
|
287
|
-
return [2, deserializeAws_json1_1CancelClusterCommandError(output, context)];
|
|
288
|
-
}
|
|
289
|
-
return [4, parseBody(output.body, context)];
|
|
290
|
-
case 1:
|
|
291
|
-
data = _a.sent();
|
|
292
|
-
contents = {};
|
|
293
|
-
contents = deserializeAws_json1_1CancelClusterResult(data, context);
|
|
294
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
295
|
-
return [2, Promise.resolve(response)];
|
|
296
|
-
}
|
|
297
|
-
});
|
|
298
|
-
}); };
|
|
299
|
-
var deserializeAws_json1_1CancelClusterCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
300
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
301
|
-
var _c;
|
|
302
|
-
return __generator(this, function (_d) {
|
|
303
|
-
switch (_d.label) {
|
|
304
|
-
case 0:
|
|
305
|
-
_a = [__assign({}, output)];
|
|
306
|
-
_c = {};
|
|
307
|
-
return [4, parseErrorBody(output.body, context)];
|
|
308
|
-
case 1:
|
|
309
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
310
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
311
|
-
_b = errorCode;
|
|
312
|
-
switch (_b) {
|
|
313
|
-
case "InvalidJobStateException": return [3, 2];
|
|
314
|
-
case "com.amazonaws.snowball#InvalidJobStateException": return [3, 2];
|
|
315
|
-
case "InvalidResourceException": return [3, 4];
|
|
316
|
-
case "com.amazonaws.snowball#InvalidResourceException": return [3, 4];
|
|
317
|
-
case "KMSRequestFailedException": return [3, 6];
|
|
318
|
-
case "com.amazonaws.snowball#KMSRequestFailedException": return [3, 6];
|
|
319
|
-
}
|
|
320
|
-
return [3, 8];
|
|
321
|
-
case 2: return [4, deserializeAws_json1_1InvalidJobStateExceptionResponse(parsedOutput, context)];
|
|
322
|
-
case 3: throw _d.sent();
|
|
323
|
-
case 4: return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
|
|
324
|
-
case 5: throw _d.sent();
|
|
325
|
-
case 6: return [4, deserializeAws_json1_1KMSRequestFailedExceptionResponse(parsedOutput, context)];
|
|
326
|
-
case 7: throw _d.sent();
|
|
327
|
-
case 8:
|
|
328
|
-
parsedBody = parsedOutput.body;
|
|
329
|
-
throwDefaultError({
|
|
330
|
-
output: output,
|
|
331
|
-
parsedBody: parsedBody,
|
|
332
|
-
exceptionCtor: __BaseException,
|
|
333
|
-
errorCode: errorCode,
|
|
334
|
-
});
|
|
335
|
-
_d.label = 9;
|
|
336
|
-
case 9: return [2];
|
|
337
|
-
}
|
|
338
|
-
});
|
|
339
|
-
}); };
|
|
340
|
-
export var deserializeAws_json1_1CancelJobCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
341
|
-
var data, contents, response;
|
|
342
|
-
return __generator(this, function (_a) {
|
|
343
|
-
switch (_a.label) {
|
|
344
|
-
case 0:
|
|
345
|
-
if (output.statusCode >= 300) {
|
|
346
|
-
return [2, deserializeAws_json1_1CancelJobCommandError(output, context)];
|
|
347
|
-
}
|
|
348
|
-
return [4, parseBody(output.body, context)];
|
|
349
|
-
case 1:
|
|
350
|
-
data = _a.sent();
|
|
351
|
-
contents = {};
|
|
352
|
-
contents = deserializeAws_json1_1CancelJobResult(data, context);
|
|
353
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
354
|
-
return [2, Promise.resolve(response)];
|
|
355
|
-
}
|
|
356
|
-
});
|
|
357
|
-
}); };
|
|
358
|
-
var deserializeAws_json1_1CancelJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
359
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
360
|
-
var _c;
|
|
361
|
-
return __generator(this, function (_d) {
|
|
362
|
-
switch (_d.label) {
|
|
363
|
-
case 0:
|
|
364
|
-
_a = [__assign({}, output)];
|
|
365
|
-
_c = {};
|
|
366
|
-
return [4, parseErrorBody(output.body, context)];
|
|
367
|
-
case 1:
|
|
368
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
369
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
370
|
-
_b = errorCode;
|
|
371
|
-
switch (_b) {
|
|
372
|
-
case "InvalidJobStateException": return [3, 2];
|
|
373
|
-
case "com.amazonaws.snowball#InvalidJobStateException": return [3, 2];
|
|
374
|
-
case "InvalidResourceException": return [3, 4];
|
|
375
|
-
case "com.amazonaws.snowball#InvalidResourceException": return [3, 4];
|
|
376
|
-
case "KMSRequestFailedException": return [3, 6];
|
|
377
|
-
case "com.amazonaws.snowball#KMSRequestFailedException": return [3, 6];
|
|
378
|
-
}
|
|
379
|
-
return [3, 8];
|
|
380
|
-
case 2: return [4, deserializeAws_json1_1InvalidJobStateExceptionResponse(parsedOutput, context)];
|
|
381
|
-
case 3: throw _d.sent();
|
|
382
|
-
case 4: return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
|
|
383
|
-
case 5: throw _d.sent();
|
|
384
|
-
case 6: return [4, deserializeAws_json1_1KMSRequestFailedExceptionResponse(parsedOutput, context)];
|
|
385
|
-
case 7: throw _d.sent();
|
|
386
|
-
case 8:
|
|
387
|
-
parsedBody = parsedOutput.body;
|
|
388
|
-
throwDefaultError({
|
|
389
|
-
output: output,
|
|
390
|
-
parsedBody: parsedBody,
|
|
391
|
-
exceptionCtor: __BaseException,
|
|
392
|
-
errorCode: errorCode,
|
|
393
|
-
});
|
|
394
|
-
_d.label = 9;
|
|
395
|
-
case 9: return [2];
|
|
396
|
-
}
|
|
397
|
-
});
|
|
398
|
-
}); };
|
|
399
|
-
export var deserializeAws_json1_1CreateAddressCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
400
|
-
var data, contents, response;
|
|
401
|
-
return __generator(this, function (_a) {
|
|
402
|
-
switch (_a.label) {
|
|
403
|
-
case 0:
|
|
404
|
-
if (output.statusCode >= 300) {
|
|
405
|
-
return [2, deserializeAws_json1_1CreateAddressCommandError(output, context)];
|
|
406
|
-
}
|
|
407
|
-
return [4, parseBody(output.body, context)];
|
|
408
|
-
case 1:
|
|
409
|
-
data = _a.sent();
|
|
410
|
-
contents = {};
|
|
411
|
-
contents = deserializeAws_json1_1CreateAddressResult(data, context);
|
|
412
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
413
|
-
return [2, Promise.resolve(response)];
|
|
414
|
-
}
|
|
415
|
-
});
|
|
416
|
-
}); };
|
|
417
|
-
var deserializeAws_json1_1CreateAddressCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
418
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
419
|
-
var _c;
|
|
420
|
-
return __generator(this, function (_d) {
|
|
421
|
-
switch (_d.label) {
|
|
422
|
-
case 0:
|
|
423
|
-
_a = [__assign({}, output)];
|
|
424
|
-
_c = {};
|
|
425
|
-
return [4, parseErrorBody(output.body, context)];
|
|
426
|
-
case 1:
|
|
427
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
428
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
429
|
-
_b = errorCode;
|
|
430
|
-
switch (_b) {
|
|
431
|
-
case "InvalidAddressException": return [3, 2];
|
|
432
|
-
case "com.amazonaws.snowball#InvalidAddressException": return [3, 2];
|
|
433
|
-
case "UnsupportedAddressException": return [3, 4];
|
|
434
|
-
case "com.amazonaws.snowball#UnsupportedAddressException": return [3, 4];
|
|
435
|
-
}
|
|
436
|
-
return [3, 6];
|
|
437
|
-
case 2: return [4, deserializeAws_json1_1InvalidAddressExceptionResponse(parsedOutput, context)];
|
|
438
|
-
case 3: throw _d.sent();
|
|
439
|
-
case 4: return [4, deserializeAws_json1_1UnsupportedAddressExceptionResponse(parsedOutput, context)];
|
|
440
|
-
case 5: throw _d.sent();
|
|
441
|
-
case 6:
|
|
442
|
-
parsedBody = parsedOutput.body;
|
|
443
|
-
throwDefaultError({
|
|
444
|
-
output: output,
|
|
445
|
-
parsedBody: parsedBody,
|
|
446
|
-
exceptionCtor: __BaseException,
|
|
447
|
-
errorCode: errorCode,
|
|
448
|
-
});
|
|
449
|
-
_d.label = 7;
|
|
450
|
-
case 7: return [2];
|
|
451
|
-
}
|
|
452
|
-
});
|
|
453
|
-
}); };
|
|
454
|
-
export var deserializeAws_json1_1CreateClusterCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
455
|
-
var data, contents, response;
|
|
456
|
-
return __generator(this, function (_a) {
|
|
457
|
-
switch (_a.label) {
|
|
458
|
-
case 0:
|
|
459
|
-
if (output.statusCode >= 300) {
|
|
460
|
-
return [2, deserializeAws_json1_1CreateClusterCommandError(output, context)];
|
|
461
|
-
}
|
|
462
|
-
return [4, parseBody(output.body, context)];
|
|
463
|
-
case 1:
|
|
464
|
-
data = _a.sent();
|
|
465
|
-
contents = {};
|
|
466
|
-
contents = deserializeAws_json1_1CreateClusterResult(data, context);
|
|
467
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
468
|
-
return [2, Promise.resolve(response)];
|
|
469
|
-
}
|
|
470
|
-
});
|
|
471
|
-
}); };
|
|
472
|
-
var deserializeAws_json1_1CreateClusterCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
473
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
474
|
-
var _c;
|
|
475
|
-
return __generator(this, function (_d) {
|
|
476
|
-
switch (_d.label) {
|
|
477
|
-
case 0:
|
|
478
|
-
_a = [__assign({}, output)];
|
|
479
|
-
_c = {};
|
|
480
|
-
return [4, parseErrorBody(output.body, context)];
|
|
481
|
-
case 1:
|
|
482
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
483
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
484
|
-
_b = errorCode;
|
|
485
|
-
switch (_b) {
|
|
486
|
-
case "Ec2RequestFailedException": return [3, 2];
|
|
487
|
-
case "com.amazonaws.snowball#Ec2RequestFailedException": return [3, 2];
|
|
488
|
-
case "InvalidInputCombinationException": return [3, 4];
|
|
489
|
-
case "com.amazonaws.snowball#InvalidInputCombinationException": return [3, 4];
|
|
490
|
-
case "InvalidResourceException": return [3, 6];
|
|
491
|
-
case "com.amazonaws.snowball#InvalidResourceException": return [3, 6];
|
|
492
|
-
case "KMSRequestFailedException": return [3, 8];
|
|
493
|
-
case "com.amazonaws.snowball#KMSRequestFailedException": return [3, 8];
|
|
494
|
-
}
|
|
495
|
-
return [3, 10];
|
|
496
|
-
case 2: return [4, deserializeAws_json1_1Ec2RequestFailedExceptionResponse(parsedOutput, context)];
|
|
497
|
-
case 3: throw _d.sent();
|
|
498
|
-
case 4: return [4, deserializeAws_json1_1InvalidInputCombinationExceptionResponse(parsedOutput, context)];
|
|
499
|
-
case 5: throw _d.sent();
|
|
500
|
-
case 6: return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
|
|
501
|
-
case 7: throw _d.sent();
|
|
502
|
-
case 8: return [4, deserializeAws_json1_1KMSRequestFailedExceptionResponse(parsedOutput, context)];
|
|
503
|
-
case 9: throw _d.sent();
|
|
504
|
-
case 10:
|
|
505
|
-
parsedBody = parsedOutput.body;
|
|
506
|
-
throwDefaultError({
|
|
507
|
-
output: output,
|
|
508
|
-
parsedBody: parsedBody,
|
|
509
|
-
exceptionCtor: __BaseException,
|
|
510
|
-
errorCode: errorCode,
|
|
511
|
-
});
|
|
512
|
-
_d.label = 11;
|
|
513
|
-
case 11: return [2];
|
|
514
|
-
}
|
|
515
|
-
});
|
|
516
|
-
}); };
|
|
517
|
-
export var deserializeAws_json1_1CreateJobCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
518
|
-
var data, contents, response;
|
|
519
|
-
return __generator(this, function (_a) {
|
|
520
|
-
switch (_a.label) {
|
|
521
|
-
case 0:
|
|
522
|
-
if (output.statusCode >= 300) {
|
|
523
|
-
return [2, deserializeAws_json1_1CreateJobCommandError(output, context)];
|
|
524
|
-
}
|
|
525
|
-
return [4, parseBody(output.body, context)];
|
|
526
|
-
case 1:
|
|
527
|
-
data = _a.sent();
|
|
528
|
-
contents = {};
|
|
529
|
-
contents = deserializeAws_json1_1CreateJobResult(data, context);
|
|
530
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
531
|
-
return [2, Promise.resolve(response)];
|
|
532
|
-
}
|
|
533
|
-
});
|
|
534
|
-
}); };
|
|
535
|
-
var deserializeAws_json1_1CreateJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
536
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
537
|
-
var _c;
|
|
538
|
-
return __generator(this, function (_d) {
|
|
539
|
-
switch (_d.label) {
|
|
540
|
-
case 0:
|
|
541
|
-
_a = [__assign({}, output)];
|
|
542
|
-
_c = {};
|
|
543
|
-
return [4, parseErrorBody(output.body, context)];
|
|
544
|
-
case 1:
|
|
545
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
546
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
547
|
-
_b = errorCode;
|
|
548
|
-
switch (_b) {
|
|
549
|
-
case "ClusterLimitExceededException": return [3, 2];
|
|
550
|
-
case "com.amazonaws.snowball#ClusterLimitExceededException": return [3, 2];
|
|
551
|
-
case "Ec2RequestFailedException": return [3, 4];
|
|
552
|
-
case "com.amazonaws.snowball#Ec2RequestFailedException": return [3, 4];
|
|
553
|
-
case "InvalidInputCombinationException": return [3, 6];
|
|
554
|
-
case "com.amazonaws.snowball#InvalidInputCombinationException": return [3, 6];
|
|
555
|
-
case "InvalidResourceException": return [3, 8];
|
|
556
|
-
case "com.amazonaws.snowball#InvalidResourceException": return [3, 8];
|
|
557
|
-
case "KMSRequestFailedException": return [3, 10];
|
|
558
|
-
case "com.amazonaws.snowball#KMSRequestFailedException": return [3, 10];
|
|
559
|
-
}
|
|
560
|
-
return [3, 12];
|
|
561
|
-
case 2: return [4, deserializeAws_json1_1ClusterLimitExceededExceptionResponse(parsedOutput, context)];
|
|
562
|
-
case 3: throw _d.sent();
|
|
563
|
-
case 4: return [4, deserializeAws_json1_1Ec2RequestFailedExceptionResponse(parsedOutput, context)];
|
|
564
|
-
case 5: throw _d.sent();
|
|
565
|
-
case 6: return [4, deserializeAws_json1_1InvalidInputCombinationExceptionResponse(parsedOutput, context)];
|
|
566
|
-
case 7: throw _d.sent();
|
|
567
|
-
case 8: return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
|
|
568
|
-
case 9: throw _d.sent();
|
|
569
|
-
case 10: return [4, deserializeAws_json1_1KMSRequestFailedExceptionResponse(parsedOutput, context)];
|
|
570
|
-
case 11: throw _d.sent();
|
|
571
|
-
case 12:
|
|
572
|
-
parsedBody = parsedOutput.body;
|
|
573
|
-
throwDefaultError({
|
|
574
|
-
output: output,
|
|
575
|
-
parsedBody: parsedBody,
|
|
576
|
-
exceptionCtor: __BaseException,
|
|
577
|
-
errorCode: errorCode,
|
|
578
|
-
});
|
|
579
|
-
_d.label = 13;
|
|
580
|
-
case 13: return [2];
|
|
581
|
-
}
|
|
582
|
-
});
|
|
583
|
-
}); };
|
|
584
|
-
export var deserializeAws_json1_1CreateLongTermPricingCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
585
|
-
var data, contents, response;
|
|
586
|
-
return __generator(this, function (_a) {
|
|
587
|
-
switch (_a.label) {
|
|
588
|
-
case 0:
|
|
589
|
-
if (output.statusCode >= 300) {
|
|
590
|
-
return [2, deserializeAws_json1_1CreateLongTermPricingCommandError(output, context)];
|
|
591
|
-
}
|
|
592
|
-
return [4, parseBody(output.body, context)];
|
|
593
|
-
case 1:
|
|
594
|
-
data = _a.sent();
|
|
595
|
-
contents = {};
|
|
596
|
-
contents = deserializeAws_json1_1CreateLongTermPricingResult(data, context);
|
|
597
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
598
|
-
return [2, Promise.resolve(response)];
|
|
599
|
-
}
|
|
600
|
-
});
|
|
601
|
-
}); };
|
|
602
|
-
var deserializeAws_json1_1CreateLongTermPricingCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
603
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
604
|
-
var _c;
|
|
605
|
-
return __generator(this, function (_d) {
|
|
606
|
-
switch (_d.label) {
|
|
607
|
-
case 0:
|
|
608
|
-
_a = [__assign({}, output)];
|
|
609
|
-
_c = {};
|
|
610
|
-
return [4, parseErrorBody(output.body, context)];
|
|
611
|
-
case 1:
|
|
612
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
613
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
614
|
-
_b = errorCode;
|
|
615
|
-
switch (_b) {
|
|
616
|
-
case "InvalidResourceException": return [3, 2];
|
|
617
|
-
case "com.amazonaws.snowball#InvalidResourceException": return [3, 2];
|
|
618
|
-
}
|
|
619
|
-
return [3, 4];
|
|
620
|
-
case 2: return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
|
|
621
|
-
case 3: throw _d.sent();
|
|
622
|
-
case 4:
|
|
623
|
-
parsedBody = parsedOutput.body;
|
|
624
|
-
throwDefaultError({
|
|
625
|
-
output: output,
|
|
626
|
-
parsedBody: parsedBody,
|
|
627
|
-
exceptionCtor: __BaseException,
|
|
628
|
-
errorCode: errorCode,
|
|
629
|
-
});
|
|
630
|
-
_d.label = 5;
|
|
631
|
-
case 5: return [2];
|
|
632
|
-
}
|
|
633
|
-
});
|
|
634
|
-
}); };
|
|
635
|
-
export var deserializeAws_json1_1CreateReturnShippingLabelCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
636
|
-
var data, contents, response;
|
|
637
|
-
return __generator(this, function (_a) {
|
|
638
|
-
switch (_a.label) {
|
|
639
|
-
case 0:
|
|
640
|
-
if (output.statusCode >= 300) {
|
|
641
|
-
return [2, deserializeAws_json1_1CreateReturnShippingLabelCommandError(output, context)];
|
|
642
|
-
}
|
|
643
|
-
return [4, parseBody(output.body, context)];
|
|
644
|
-
case 1:
|
|
645
|
-
data = _a.sent();
|
|
646
|
-
contents = {};
|
|
647
|
-
contents = deserializeAws_json1_1CreateReturnShippingLabelResult(data, context);
|
|
648
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
649
|
-
return [2, Promise.resolve(response)];
|
|
650
|
-
}
|
|
651
|
-
});
|
|
652
|
-
}); };
|
|
653
|
-
var deserializeAws_json1_1CreateReturnShippingLabelCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
654
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
655
|
-
var _c;
|
|
656
|
-
return __generator(this, function (_d) {
|
|
657
|
-
switch (_d.label) {
|
|
658
|
-
case 0:
|
|
659
|
-
_a = [__assign({}, output)];
|
|
660
|
-
_c = {};
|
|
661
|
-
return [4, parseErrorBody(output.body, context)];
|
|
662
|
-
case 1:
|
|
663
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
664
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
665
|
-
_b = errorCode;
|
|
666
|
-
switch (_b) {
|
|
667
|
-
case "ConflictException": return [3, 2];
|
|
668
|
-
case "com.amazonaws.snowball#ConflictException": return [3, 2];
|
|
669
|
-
case "InvalidInputCombinationException": return [3, 4];
|
|
670
|
-
case "com.amazonaws.snowball#InvalidInputCombinationException": return [3, 4];
|
|
671
|
-
case "InvalidJobStateException": return [3, 6];
|
|
672
|
-
case "com.amazonaws.snowball#InvalidJobStateException": return [3, 6];
|
|
673
|
-
case "InvalidResourceException": return [3, 8];
|
|
674
|
-
case "com.amazonaws.snowball#InvalidResourceException": return [3, 8];
|
|
675
|
-
case "ReturnShippingLabelAlreadyExistsException": return [3, 10];
|
|
676
|
-
case "com.amazonaws.snowball#ReturnShippingLabelAlreadyExistsException": return [3, 10];
|
|
677
|
-
}
|
|
678
|
-
return [3, 12];
|
|
679
|
-
case 2: return [4, deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)];
|
|
680
|
-
case 3: throw _d.sent();
|
|
681
|
-
case 4: return [4, deserializeAws_json1_1InvalidInputCombinationExceptionResponse(parsedOutput, context)];
|
|
682
|
-
case 5: throw _d.sent();
|
|
683
|
-
case 6: return [4, deserializeAws_json1_1InvalidJobStateExceptionResponse(parsedOutput, context)];
|
|
684
|
-
case 7: throw _d.sent();
|
|
685
|
-
case 8: return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
|
|
686
|
-
case 9: throw _d.sent();
|
|
687
|
-
case 10: return [4, deserializeAws_json1_1ReturnShippingLabelAlreadyExistsExceptionResponse(parsedOutput, context)];
|
|
688
|
-
case 11: throw _d.sent();
|
|
689
|
-
case 12:
|
|
690
|
-
parsedBody = parsedOutput.body;
|
|
691
|
-
throwDefaultError({
|
|
692
|
-
output: output,
|
|
693
|
-
parsedBody: parsedBody,
|
|
694
|
-
exceptionCtor: __BaseException,
|
|
695
|
-
errorCode: errorCode,
|
|
696
|
-
});
|
|
697
|
-
_d.label = 13;
|
|
698
|
-
case 13: return [2];
|
|
699
|
-
}
|
|
700
|
-
});
|
|
701
|
-
}); };
|
|
702
|
-
export var deserializeAws_json1_1DescribeAddressCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
703
|
-
var data, contents, response;
|
|
704
|
-
return __generator(this, function (_a) {
|
|
705
|
-
switch (_a.label) {
|
|
706
|
-
case 0:
|
|
707
|
-
if (output.statusCode >= 300) {
|
|
708
|
-
return [2, deserializeAws_json1_1DescribeAddressCommandError(output, context)];
|
|
709
|
-
}
|
|
710
|
-
return [4, parseBody(output.body, context)];
|
|
711
|
-
case 1:
|
|
712
|
-
data = _a.sent();
|
|
713
|
-
contents = {};
|
|
714
|
-
contents = deserializeAws_json1_1DescribeAddressResult(data, context);
|
|
715
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
716
|
-
return [2, Promise.resolve(response)];
|
|
717
|
-
}
|
|
718
|
-
});
|
|
719
|
-
}); };
|
|
720
|
-
var deserializeAws_json1_1DescribeAddressCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
721
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
722
|
-
var _c;
|
|
723
|
-
return __generator(this, function (_d) {
|
|
724
|
-
switch (_d.label) {
|
|
725
|
-
case 0:
|
|
726
|
-
_a = [__assign({}, output)];
|
|
727
|
-
_c = {};
|
|
728
|
-
return [4, parseErrorBody(output.body, context)];
|
|
729
|
-
case 1:
|
|
730
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
731
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
732
|
-
_b = errorCode;
|
|
733
|
-
switch (_b) {
|
|
734
|
-
case "InvalidResourceException": return [3, 2];
|
|
735
|
-
case "com.amazonaws.snowball#InvalidResourceException": return [3, 2];
|
|
736
|
-
}
|
|
737
|
-
return [3, 4];
|
|
738
|
-
case 2: return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
|
|
739
|
-
case 3: throw _d.sent();
|
|
740
|
-
case 4:
|
|
741
|
-
parsedBody = parsedOutput.body;
|
|
742
|
-
throwDefaultError({
|
|
743
|
-
output: output,
|
|
744
|
-
parsedBody: parsedBody,
|
|
745
|
-
exceptionCtor: __BaseException,
|
|
746
|
-
errorCode: errorCode,
|
|
747
|
-
});
|
|
748
|
-
_d.label = 5;
|
|
749
|
-
case 5: return [2];
|
|
750
|
-
}
|
|
751
|
-
});
|
|
752
|
-
}); };
|
|
753
|
-
export var deserializeAws_json1_1DescribeAddressesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
754
|
-
var data, contents, response;
|
|
755
|
-
return __generator(this, function (_a) {
|
|
756
|
-
switch (_a.label) {
|
|
757
|
-
case 0:
|
|
758
|
-
if (output.statusCode >= 300) {
|
|
759
|
-
return [2, deserializeAws_json1_1DescribeAddressesCommandError(output, context)];
|
|
760
|
-
}
|
|
761
|
-
return [4, parseBody(output.body, context)];
|
|
762
|
-
case 1:
|
|
763
|
-
data = _a.sent();
|
|
764
|
-
contents = {};
|
|
765
|
-
contents = deserializeAws_json1_1DescribeAddressesResult(data, context);
|
|
766
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
767
|
-
return [2, Promise.resolve(response)];
|
|
768
|
-
}
|
|
769
|
-
});
|
|
770
|
-
}); };
|
|
771
|
-
var deserializeAws_json1_1DescribeAddressesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
772
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
773
|
-
var _c;
|
|
774
|
-
return __generator(this, function (_d) {
|
|
775
|
-
switch (_d.label) {
|
|
776
|
-
case 0:
|
|
777
|
-
_a = [__assign({}, output)];
|
|
778
|
-
_c = {};
|
|
779
|
-
return [4, parseErrorBody(output.body, context)];
|
|
780
|
-
case 1:
|
|
781
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
782
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
783
|
-
_b = errorCode;
|
|
784
|
-
switch (_b) {
|
|
785
|
-
case "InvalidNextTokenException": return [3, 2];
|
|
786
|
-
case "com.amazonaws.snowball#InvalidNextTokenException": return [3, 2];
|
|
787
|
-
case "InvalidResourceException": return [3, 4];
|
|
788
|
-
case "com.amazonaws.snowball#InvalidResourceException": return [3, 4];
|
|
789
|
-
}
|
|
790
|
-
return [3, 6];
|
|
791
|
-
case 2: return [4, deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)];
|
|
792
|
-
case 3: throw _d.sent();
|
|
793
|
-
case 4: return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
|
|
794
|
-
case 5: throw _d.sent();
|
|
795
|
-
case 6:
|
|
796
|
-
parsedBody = parsedOutput.body;
|
|
797
|
-
throwDefaultError({
|
|
798
|
-
output: output,
|
|
799
|
-
parsedBody: parsedBody,
|
|
800
|
-
exceptionCtor: __BaseException,
|
|
801
|
-
errorCode: errorCode,
|
|
802
|
-
});
|
|
803
|
-
_d.label = 7;
|
|
804
|
-
case 7: return [2];
|
|
805
|
-
}
|
|
806
|
-
});
|
|
807
|
-
}); };
|
|
808
|
-
export var deserializeAws_json1_1DescribeClusterCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
809
|
-
var data, contents, response;
|
|
810
|
-
return __generator(this, function (_a) {
|
|
811
|
-
switch (_a.label) {
|
|
812
|
-
case 0:
|
|
813
|
-
if (output.statusCode >= 300) {
|
|
814
|
-
return [2, deserializeAws_json1_1DescribeClusterCommandError(output, context)];
|
|
815
|
-
}
|
|
816
|
-
return [4, parseBody(output.body, context)];
|
|
817
|
-
case 1:
|
|
818
|
-
data = _a.sent();
|
|
819
|
-
contents = {};
|
|
820
|
-
contents = deserializeAws_json1_1DescribeClusterResult(data, context);
|
|
821
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
822
|
-
return [2, Promise.resolve(response)];
|
|
823
|
-
}
|
|
824
|
-
});
|
|
825
|
-
}); };
|
|
826
|
-
var deserializeAws_json1_1DescribeClusterCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
827
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
828
|
-
var _c;
|
|
829
|
-
return __generator(this, function (_d) {
|
|
830
|
-
switch (_d.label) {
|
|
831
|
-
case 0:
|
|
832
|
-
_a = [__assign({}, output)];
|
|
833
|
-
_c = {};
|
|
834
|
-
return [4, parseErrorBody(output.body, context)];
|
|
835
|
-
case 1:
|
|
836
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
837
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
838
|
-
_b = errorCode;
|
|
839
|
-
switch (_b) {
|
|
840
|
-
case "InvalidResourceException": return [3, 2];
|
|
841
|
-
case "com.amazonaws.snowball#InvalidResourceException": return [3, 2];
|
|
842
|
-
}
|
|
843
|
-
return [3, 4];
|
|
844
|
-
case 2: return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
|
|
845
|
-
case 3: throw _d.sent();
|
|
846
|
-
case 4:
|
|
847
|
-
parsedBody = parsedOutput.body;
|
|
848
|
-
throwDefaultError({
|
|
849
|
-
output: output,
|
|
850
|
-
parsedBody: parsedBody,
|
|
851
|
-
exceptionCtor: __BaseException,
|
|
852
|
-
errorCode: errorCode,
|
|
853
|
-
});
|
|
854
|
-
_d.label = 5;
|
|
855
|
-
case 5: return [2];
|
|
856
|
-
}
|
|
857
|
-
});
|
|
858
|
-
}); };
|
|
859
|
-
export var deserializeAws_json1_1DescribeJobCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
860
|
-
var data, contents, response;
|
|
861
|
-
return __generator(this, function (_a) {
|
|
862
|
-
switch (_a.label) {
|
|
863
|
-
case 0:
|
|
864
|
-
if (output.statusCode >= 300) {
|
|
865
|
-
return [2, deserializeAws_json1_1DescribeJobCommandError(output, context)];
|
|
866
|
-
}
|
|
867
|
-
return [4, parseBody(output.body, context)];
|
|
868
|
-
case 1:
|
|
869
|
-
data = _a.sent();
|
|
870
|
-
contents = {};
|
|
871
|
-
contents = deserializeAws_json1_1DescribeJobResult(data, context);
|
|
872
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
873
|
-
return [2, Promise.resolve(response)];
|
|
874
|
-
}
|
|
875
|
-
});
|
|
876
|
-
}); };
|
|
877
|
-
var deserializeAws_json1_1DescribeJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
878
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
879
|
-
var _c;
|
|
880
|
-
return __generator(this, function (_d) {
|
|
881
|
-
switch (_d.label) {
|
|
882
|
-
case 0:
|
|
883
|
-
_a = [__assign({}, output)];
|
|
884
|
-
_c = {};
|
|
885
|
-
return [4, parseErrorBody(output.body, context)];
|
|
886
|
-
case 1:
|
|
887
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
888
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
889
|
-
_b = errorCode;
|
|
890
|
-
switch (_b) {
|
|
891
|
-
case "InvalidResourceException": return [3, 2];
|
|
892
|
-
case "com.amazonaws.snowball#InvalidResourceException": return [3, 2];
|
|
893
|
-
}
|
|
894
|
-
return [3, 4];
|
|
895
|
-
case 2: return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
|
|
896
|
-
case 3: throw _d.sent();
|
|
897
|
-
case 4:
|
|
898
|
-
parsedBody = parsedOutput.body;
|
|
899
|
-
throwDefaultError({
|
|
900
|
-
output: output,
|
|
901
|
-
parsedBody: parsedBody,
|
|
902
|
-
exceptionCtor: __BaseException,
|
|
903
|
-
errorCode: errorCode,
|
|
904
|
-
});
|
|
905
|
-
_d.label = 5;
|
|
906
|
-
case 5: return [2];
|
|
907
|
-
}
|
|
908
|
-
});
|
|
909
|
-
}); };
|
|
910
|
-
export var deserializeAws_json1_1DescribeReturnShippingLabelCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
911
|
-
var data, contents, response;
|
|
912
|
-
return __generator(this, function (_a) {
|
|
913
|
-
switch (_a.label) {
|
|
914
|
-
case 0:
|
|
915
|
-
if (output.statusCode >= 300) {
|
|
916
|
-
return [2, deserializeAws_json1_1DescribeReturnShippingLabelCommandError(output, context)];
|
|
917
|
-
}
|
|
918
|
-
return [4, parseBody(output.body, context)];
|
|
919
|
-
case 1:
|
|
920
|
-
data = _a.sent();
|
|
921
|
-
contents = {};
|
|
922
|
-
contents = deserializeAws_json1_1DescribeReturnShippingLabelResult(data, context);
|
|
923
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
924
|
-
return [2, Promise.resolve(response)];
|
|
925
|
-
}
|
|
926
|
-
});
|
|
927
|
-
}); };
|
|
928
|
-
var deserializeAws_json1_1DescribeReturnShippingLabelCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
929
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
930
|
-
var _c;
|
|
931
|
-
return __generator(this, function (_d) {
|
|
932
|
-
switch (_d.label) {
|
|
933
|
-
case 0:
|
|
934
|
-
_a = [__assign({}, output)];
|
|
935
|
-
_c = {};
|
|
936
|
-
return [4, parseErrorBody(output.body, context)];
|
|
937
|
-
case 1:
|
|
938
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
939
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
940
|
-
_b = errorCode;
|
|
941
|
-
switch (_b) {
|
|
942
|
-
case "ConflictException": return [3, 2];
|
|
943
|
-
case "com.amazonaws.snowball#ConflictException": return [3, 2];
|
|
944
|
-
case "InvalidJobStateException": return [3, 4];
|
|
945
|
-
case "com.amazonaws.snowball#InvalidJobStateException": return [3, 4];
|
|
946
|
-
case "InvalidResourceException": return [3, 6];
|
|
947
|
-
case "com.amazonaws.snowball#InvalidResourceException": return [3, 6];
|
|
948
|
-
}
|
|
949
|
-
return [3, 8];
|
|
950
|
-
case 2: return [4, deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)];
|
|
951
|
-
case 3: throw _d.sent();
|
|
952
|
-
case 4: return [4, deserializeAws_json1_1InvalidJobStateExceptionResponse(parsedOutput, context)];
|
|
953
|
-
case 5: throw _d.sent();
|
|
954
|
-
case 6: return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
|
|
955
|
-
case 7: throw _d.sent();
|
|
956
|
-
case 8:
|
|
957
|
-
parsedBody = parsedOutput.body;
|
|
958
|
-
throwDefaultError({
|
|
959
|
-
output: output,
|
|
960
|
-
parsedBody: parsedBody,
|
|
961
|
-
exceptionCtor: __BaseException,
|
|
962
|
-
errorCode: errorCode,
|
|
963
|
-
});
|
|
964
|
-
_d.label = 9;
|
|
965
|
-
case 9: return [2];
|
|
966
|
-
}
|
|
967
|
-
});
|
|
968
|
-
}); };
|
|
969
|
-
export var deserializeAws_json1_1GetJobManifestCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
970
|
-
var data, contents, response;
|
|
971
|
-
return __generator(this, function (_a) {
|
|
972
|
-
switch (_a.label) {
|
|
973
|
-
case 0:
|
|
974
|
-
if (output.statusCode >= 300) {
|
|
975
|
-
return [2, deserializeAws_json1_1GetJobManifestCommandError(output, context)];
|
|
976
|
-
}
|
|
977
|
-
return [4, parseBody(output.body, context)];
|
|
978
|
-
case 1:
|
|
979
|
-
data = _a.sent();
|
|
980
|
-
contents = {};
|
|
981
|
-
contents = deserializeAws_json1_1GetJobManifestResult(data, context);
|
|
982
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
983
|
-
return [2, Promise.resolve(response)];
|
|
984
|
-
}
|
|
985
|
-
});
|
|
986
|
-
}); };
|
|
987
|
-
var deserializeAws_json1_1GetJobManifestCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
988
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
989
|
-
var _c;
|
|
990
|
-
return __generator(this, function (_d) {
|
|
991
|
-
switch (_d.label) {
|
|
992
|
-
case 0:
|
|
993
|
-
_a = [__assign({}, output)];
|
|
994
|
-
_c = {};
|
|
995
|
-
return [4, parseErrorBody(output.body, context)];
|
|
996
|
-
case 1:
|
|
997
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
998
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
999
|
-
_b = errorCode;
|
|
1000
|
-
switch (_b) {
|
|
1001
|
-
case "InvalidJobStateException": return [3, 2];
|
|
1002
|
-
case "com.amazonaws.snowball#InvalidJobStateException": return [3, 2];
|
|
1003
|
-
case "InvalidResourceException": return [3, 4];
|
|
1004
|
-
case "com.amazonaws.snowball#InvalidResourceException": return [3, 4];
|
|
1005
|
-
}
|
|
1006
|
-
return [3, 6];
|
|
1007
|
-
case 2: return [4, deserializeAws_json1_1InvalidJobStateExceptionResponse(parsedOutput, context)];
|
|
1008
|
-
case 3: throw _d.sent();
|
|
1009
|
-
case 4: return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
|
|
1010
|
-
case 5: throw _d.sent();
|
|
1011
|
-
case 6:
|
|
1012
|
-
parsedBody = parsedOutput.body;
|
|
1013
|
-
throwDefaultError({
|
|
1014
|
-
output: output,
|
|
1015
|
-
parsedBody: parsedBody,
|
|
1016
|
-
exceptionCtor: __BaseException,
|
|
1017
|
-
errorCode: errorCode,
|
|
1018
|
-
});
|
|
1019
|
-
_d.label = 7;
|
|
1020
|
-
case 7: return [2];
|
|
1021
|
-
}
|
|
1022
|
-
});
|
|
1023
|
-
}); };
|
|
1024
|
-
export var deserializeAws_json1_1GetJobUnlockCodeCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1025
|
-
var data, contents, response;
|
|
1026
|
-
return __generator(this, function (_a) {
|
|
1027
|
-
switch (_a.label) {
|
|
1028
|
-
case 0:
|
|
1029
|
-
if (output.statusCode >= 300) {
|
|
1030
|
-
return [2, deserializeAws_json1_1GetJobUnlockCodeCommandError(output, context)];
|
|
1031
|
-
}
|
|
1032
|
-
return [4, parseBody(output.body, context)];
|
|
1033
|
-
case 1:
|
|
1034
|
-
data = _a.sent();
|
|
1035
|
-
contents = {};
|
|
1036
|
-
contents = deserializeAws_json1_1GetJobUnlockCodeResult(data, context);
|
|
1037
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1038
|
-
return [2, Promise.resolve(response)];
|
|
1039
|
-
}
|
|
1040
|
-
});
|
|
1041
|
-
}); };
|
|
1042
|
-
var deserializeAws_json1_1GetJobUnlockCodeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1043
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1044
|
-
var _c;
|
|
1045
|
-
return __generator(this, function (_d) {
|
|
1046
|
-
switch (_d.label) {
|
|
1047
|
-
case 0:
|
|
1048
|
-
_a = [__assign({}, output)];
|
|
1049
|
-
_c = {};
|
|
1050
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1051
|
-
case 1:
|
|
1052
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1053
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1054
|
-
_b = errorCode;
|
|
1055
|
-
switch (_b) {
|
|
1056
|
-
case "InvalidJobStateException": return [3, 2];
|
|
1057
|
-
case "com.amazonaws.snowball#InvalidJobStateException": return [3, 2];
|
|
1058
|
-
case "InvalidResourceException": return [3, 4];
|
|
1059
|
-
case "com.amazonaws.snowball#InvalidResourceException": return [3, 4];
|
|
1060
|
-
}
|
|
1061
|
-
return [3, 6];
|
|
1062
|
-
case 2: return [4, deserializeAws_json1_1InvalidJobStateExceptionResponse(parsedOutput, context)];
|
|
1063
|
-
case 3: throw _d.sent();
|
|
1064
|
-
case 4: return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
|
|
1065
|
-
case 5: throw _d.sent();
|
|
1066
|
-
case 6:
|
|
1067
|
-
parsedBody = parsedOutput.body;
|
|
1068
|
-
throwDefaultError({
|
|
1069
|
-
output: output,
|
|
1070
|
-
parsedBody: parsedBody,
|
|
1071
|
-
exceptionCtor: __BaseException,
|
|
1072
|
-
errorCode: errorCode,
|
|
1073
|
-
});
|
|
1074
|
-
_d.label = 7;
|
|
1075
|
-
case 7: return [2];
|
|
1076
|
-
}
|
|
1077
|
-
});
|
|
1078
|
-
}); };
|
|
1079
|
-
export var deserializeAws_json1_1GetSnowballUsageCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1080
|
-
var data, contents, response;
|
|
1081
|
-
return __generator(this, function (_a) {
|
|
1082
|
-
switch (_a.label) {
|
|
1083
|
-
case 0:
|
|
1084
|
-
if (output.statusCode >= 300) {
|
|
1085
|
-
return [2, deserializeAws_json1_1GetSnowballUsageCommandError(output, context)];
|
|
1086
|
-
}
|
|
1087
|
-
return [4, parseBody(output.body, context)];
|
|
1088
|
-
case 1:
|
|
1089
|
-
data = _a.sent();
|
|
1090
|
-
contents = {};
|
|
1091
|
-
contents = deserializeAws_json1_1GetSnowballUsageResult(data, context);
|
|
1092
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1093
|
-
return [2, Promise.resolve(response)];
|
|
1094
|
-
}
|
|
1095
|
-
});
|
|
1096
|
-
}); };
|
|
1097
|
-
var deserializeAws_json1_1GetSnowballUsageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1098
|
-
var parsedOutput, _a, errorCode, parsedBody;
|
|
1099
|
-
var _b;
|
|
1100
|
-
return __generator(this, function (_c) {
|
|
1101
|
-
switch (_c.label) {
|
|
1102
|
-
case 0:
|
|
1103
|
-
_a = [__assign({}, output)];
|
|
1104
|
-
_b = {};
|
|
1105
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1106
|
-
case 1:
|
|
1107
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
|
|
1108
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1109
|
-
parsedBody = parsedOutput.body;
|
|
1110
|
-
throwDefaultError({
|
|
1111
|
-
output: output,
|
|
1112
|
-
parsedBody: parsedBody,
|
|
1113
|
-
exceptionCtor: __BaseException,
|
|
1114
|
-
errorCode: errorCode,
|
|
1115
|
-
});
|
|
1116
|
-
return [2];
|
|
1117
|
-
}
|
|
1118
|
-
});
|
|
1119
|
-
}); };
|
|
1120
|
-
export var deserializeAws_json1_1GetSoftwareUpdatesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1121
|
-
var data, contents, response;
|
|
1122
|
-
return __generator(this, function (_a) {
|
|
1123
|
-
switch (_a.label) {
|
|
1124
|
-
case 0:
|
|
1125
|
-
if (output.statusCode >= 300) {
|
|
1126
|
-
return [2, deserializeAws_json1_1GetSoftwareUpdatesCommandError(output, context)];
|
|
1127
|
-
}
|
|
1128
|
-
return [4, parseBody(output.body, context)];
|
|
1129
|
-
case 1:
|
|
1130
|
-
data = _a.sent();
|
|
1131
|
-
contents = {};
|
|
1132
|
-
contents = deserializeAws_json1_1GetSoftwareUpdatesResult(data, context);
|
|
1133
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1134
|
-
return [2, Promise.resolve(response)];
|
|
1135
|
-
}
|
|
1136
|
-
});
|
|
1137
|
-
}); };
|
|
1138
|
-
var deserializeAws_json1_1GetSoftwareUpdatesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1139
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1140
|
-
var _c;
|
|
1141
|
-
return __generator(this, function (_d) {
|
|
1142
|
-
switch (_d.label) {
|
|
1143
|
-
case 0:
|
|
1144
|
-
_a = [__assign({}, output)];
|
|
1145
|
-
_c = {};
|
|
1146
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1147
|
-
case 1:
|
|
1148
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1149
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1150
|
-
_b = errorCode;
|
|
1151
|
-
switch (_b) {
|
|
1152
|
-
case "InvalidJobStateException": return [3, 2];
|
|
1153
|
-
case "com.amazonaws.snowball#InvalidJobStateException": return [3, 2];
|
|
1154
|
-
case "InvalidResourceException": return [3, 4];
|
|
1155
|
-
case "com.amazonaws.snowball#InvalidResourceException": return [3, 4];
|
|
1156
|
-
}
|
|
1157
|
-
return [3, 6];
|
|
1158
|
-
case 2: return [4, deserializeAws_json1_1InvalidJobStateExceptionResponse(parsedOutput, context)];
|
|
1159
|
-
case 3: throw _d.sent();
|
|
1160
|
-
case 4: return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
|
|
1161
|
-
case 5: throw _d.sent();
|
|
1162
|
-
case 6:
|
|
1163
|
-
parsedBody = parsedOutput.body;
|
|
1164
|
-
throwDefaultError({
|
|
1165
|
-
output: output,
|
|
1166
|
-
parsedBody: parsedBody,
|
|
1167
|
-
exceptionCtor: __BaseException,
|
|
1168
|
-
errorCode: errorCode,
|
|
1169
|
-
});
|
|
1170
|
-
_d.label = 7;
|
|
1171
|
-
case 7: return [2];
|
|
1172
|
-
}
|
|
1173
|
-
});
|
|
1174
|
-
}); };
|
|
1175
|
-
export var deserializeAws_json1_1ListClusterJobsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1176
|
-
var data, contents, response;
|
|
1177
|
-
return __generator(this, function (_a) {
|
|
1178
|
-
switch (_a.label) {
|
|
1179
|
-
case 0:
|
|
1180
|
-
if (output.statusCode >= 300) {
|
|
1181
|
-
return [2, deserializeAws_json1_1ListClusterJobsCommandError(output, context)];
|
|
1182
|
-
}
|
|
1183
|
-
return [4, parseBody(output.body, context)];
|
|
1184
|
-
case 1:
|
|
1185
|
-
data = _a.sent();
|
|
1186
|
-
contents = {};
|
|
1187
|
-
contents = deserializeAws_json1_1ListClusterJobsResult(data, context);
|
|
1188
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1189
|
-
return [2, Promise.resolve(response)];
|
|
1190
|
-
}
|
|
1191
|
-
});
|
|
1192
|
-
}); };
|
|
1193
|
-
var deserializeAws_json1_1ListClusterJobsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1194
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1195
|
-
var _c;
|
|
1196
|
-
return __generator(this, function (_d) {
|
|
1197
|
-
switch (_d.label) {
|
|
1198
|
-
case 0:
|
|
1199
|
-
_a = [__assign({}, output)];
|
|
1200
|
-
_c = {};
|
|
1201
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1202
|
-
case 1:
|
|
1203
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1204
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1205
|
-
_b = errorCode;
|
|
1206
|
-
switch (_b) {
|
|
1207
|
-
case "InvalidNextTokenException": return [3, 2];
|
|
1208
|
-
case "com.amazonaws.snowball#InvalidNextTokenException": return [3, 2];
|
|
1209
|
-
case "InvalidResourceException": return [3, 4];
|
|
1210
|
-
case "com.amazonaws.snowball#InvalidResourceException": return [3, 4];
|
|
1211
|
-
}
|
|
1212
|
-
return [3, 6];
|
|
1213
|
-
case 2: return [4, deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)];
|
|
1214
|
-
case 3: throw _d.sent();
|
|
1215
|
-
case 4: return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
|
|
1216
|
-
case 5: throw _d.sent();
|
|
1217
|
-
case 6:
|
|
1218
|
-
parsedBody = parsedOutput.body;
|
|
1219
|
-
throwDefaultError({
|
|
1220
|
-
output: output,
|
|
1221
|
-
parsedBody: parsedBody,
|
|
1222
|
-
exceptionCtor: __BaseException,
|
|
1223
|
-
errorCode: errorCode,
|
|
1224
|
-
});
|
|
1225
|
-
_d.label = 7;
|
|
1226
|
-
case 7: return [2];
|
|
1227
|
-
}
|
|
1228
|
-
});
|
|
1229
|
-
}); };
|
|
1230
|
-
export var deserializeAws_json1_1ListClustersCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1231
|
-
var data, contents, response;
|
|
1232
|
-
return __generator(this, function (_a) {
|
|
1233
|
-
switch (_a.label) {
|
|
1234
|
-
case 0:
|
|
1235
|
-
if (output.statusCode >= 300) {
|
|
1236
|
-
return [2, deserializeAws_json1_1ListClustersCommandError(output, context)];
|
|
1237
|
-
}
|
|
1238
|
-
return [4, parseBody(output.body, context)];
|
|
1239
|
-
case 1:
|
|
1240
|
-
data = _a.sent();
|
|
1241
|
-
contents = {};
|
|
1242
|
-
contents = deserializeAws_json1_1ListClustersResult(data, context);
|
|
1243
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1244
|
-
return [2, Promise.resolve(response)];
|
|
1245
|
-
}
|
|
1246
|
-
});
|
|
1247
|
-
}); };
|
|
1248
|
-
var deserializeAws_json1_1ListClustersCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1249
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1250
|
-
var _c;
|
|
1251
|
-
return __generator(this, function (_d) {
|
|
1252
|
-
switch (_d.label) {
|
|
1253
|
-
case 0:
|
|
1254
|
-
_a = [__assign({}, output)];
|
|
1255
|
-
_c = {};
|
|
1256
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1257
|
-
case 1:
|
|
1258
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1259
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1260
|
-
_b = errorCode;
|
|
1261
|
-
switch (_b) {
|
|
1262
|
-
case "InvalidNextTokenException": return [3, 2];
|
|
1263
|
-
case "com.amazonaws.snowball#InvalidNextTokenException": return [3, 2];
|
|
1264
|
-
}
|
|
1265
|
-
return [3, 4];
|
|
1266
|
-
case 2: return [4, deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)];
|
|
1267
|
-
case 3: throw _d.sent();
|
|
1268
|
-
case 4:
|
|
1269
|
-
parsedBody = parsedOutput.body;
|
|
1270
|
-
throwDefaultError({
|
|
1271
|
-
output: output,
|
|
1272
|
-
parsedBody: parsedBody,
|
|
1273
|
-
exceptionCtor: __BaseException,
|
|
1274
|
-
errorCode: errorCode,
|
|
1275
|
-
});
|
|
1276
|
-
_d.label = 5;
|
|
1277
|
-
case 5: return [2];
|
|
1278
|
-
}
|
|
1279
|
-
});
|
|
1280
|
-
}); };
|
|
1281
|
-
export var deserializeAws_json1_1ListCompatibleImagesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1282
|
-
var data, contents, response;
|
|
1283
|
-
return __generator(this, function (_a) {
|
|
1284
|
-
switch (_a.label) {
|
|
1285
|
-
case 0:
|
|
1286
|
-
if (output.statusCode >= 300) {
|
|
1287
|
-
return [2, deserializeAws_json1_1ListCompatibleImagesCommandError(output, context)];
|
|
1288
|
-
}
|
|
1289
|
-
return [4, parseBody(output.body, context)];
|
|
1290
|
-
case 1:
|
|
1291
|
-
data = _a.sent();
|
|
1292
|
-
contents = {};
|
|
1293
|
-
contents = deserializeAws_json1_1ListCompatibleImagesResult(data, context);
|
|
1294
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1295
|
-
return [2, Promise.resolve(response)];
|
|
1296
|
-
}
|
|
1297
|
-
});
|
|
1298
|
-
}); };
|
|
1299
|
-
var deserializeAws_json1_1ListCompatibleImagesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1300
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1301
|
-
var _c;
|
|
1302
|
-
return __generator(this, function (_d) {
|
|
1303
|
-
switch (_d.label) {
|
|
1304
|
-
case 0:
|
|
1305
|
-
_a = [__assign({}, output)];
|
|
1306
|
-
_c = {};
|
|
1307
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1308
|
-
case 1:
|
|
1309
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1310
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1311
|
-
_b = errorCode;
|
|
1312
|
-
switch (_b) {
|
|
1313
|
-
case "Ec2RequestFailedException": return [3, 2];
|
|
1314
|
-
case "com.amazonaws.snowball#Ec2RequestFailedException": return [3, 2];
|
|
1315
|
-
case "InvalidNextTokenException": return [3, 4];
|
|
1316
|
-
case "com.amazonaws.snowball#InvalidNextTokenException": return [3, 4];
|
|
1317
|
-
}
|
|
1318
|
-
return [3, 6];
|
|
1319
|
-
case 2: return [4, deserializeAws_json1_1Ec2RequestFailedExceptionResponse(parsedOutput, context)];
|
|
1320
|
-
case 3: throw _d.sent();
|
|
1321
|
-
case 4: return [4, deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)];
|
|
1322
|
-
case 5: throw _d.sent();
|
|
1323
|
-
case 6:
|
|
1324
|
-
parsedBody = parsedOutput.body;
|
|
1325
|
-
throwDefaultError({
|
|
1326
|
-
output: output,
|
|
1327
|
-
parsedBody: parsedBody,
|
|
1328
|
-
exceptionCtor: __BaseException,
|
|
1329
|
-
errorCode: errorCode,
|
|
1330
|
-
});
|
|
1331
|
-
_d.label = 7;
|
|
1332
|
-
case 7: return [2];
|
|
1333
|
-
}
|
|
1334
|
-
});
|
|
1335
|
-
}); };
|
|
1336
|
-
export var deserializeAws_json1_1ListJobsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1337
|
-
var data, contents, response;
|
|
1338
|
-
return __generator(this, function (_a) {
|
|
1339
|
-
switch (_a.label) {
|
|
1340
|
-
case 0:
|
|
1341
|
-
if (output.statusCode >= 300) {
|
|
1342
|
-
return [2, deserializeAws_json1_1ListJobsCommandError(output, context)];
|
|
1343
|
-
}
|
|
1344
|
-
return [4, parseBody(output.body, context)];
|
|
1345
|
-
case 1:
|
|
1346
|
-
data = _a.sent();
|
|
1347
|
-
contents = {};
|
|
1348
|
-
contents = deserializeAws_json1_1ListJobsResult(data, context);
|
|
1349
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1350
|
-
return [2, Promise.resolve(response)];
|
|
1351
|
-
}
|
|
1352
|
-
});
|
|
1353
|
-
}); };
|
|
1354
|
-
var deserializeAws_json1_1ListJobsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1355
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1356
|
-
var _c;
|
|
1357
|
-
return __generator(this, function (_d) {
|
|
1358
|
-
switch (_d.label) {
|
|
1359
|
-
case 0:
|
|
1360
|
-
_a = [__assign({}, output)];
|
|
1361
|
-
_c = {};
|
|
1362
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1363
|
-
case 1:
|
|
1364
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1365
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1366
|
-
_b = errorCode;
|
|
1367
|
-
switch (_b) {
|
|
1368
|
-
case "InvalidNextTokenException": return [3, 2];
|
|
1369
|
-
case "com.amazonaws.snowball#InvalidNextTokenException": return [3, 2];
|
|
1370
|
-
}
|
|
1371
|
-
return [3, 4];
|
|
1372
|
-
case 2: return [4, deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)];
|
|
1373
|
-
case 3: throw _d.sent();
|
|
1374
|
-
case 4:
|
|
1375
|
-
parsedBody = parsedOutput.body;
|
|
1376
|
-
throwDefaultError({
|
|
1377
|
-
output: output,
|
|
1378
|
-
parsedBody: parsedBody,
|
|
1379
|
-
exceptionCtor: __BaseException,
|
|
1380
|
-
errorCode: errorCode,
|
|
1381
|
-
});
|
|
1382
|
-
_d.label = 5;
|
|
1383
|
-
case 5: return [2];
|
|
1384
|
-
}
|
|
1385
|
-
});
|
|
1386
|
-
}); };
|
|
1387
|
-
export var deserializeAws_json1_1ListLongTermPricingCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1388
|
-
var data, contents, response;
|
|
1389
|
-
return __generator(this, function (_a) {
|
|
1390
|
-
switch (_a.label) {
|
|
1391
|
-
case 0:
|
|
1392
|
-
if (output.statusCode >= 300) {
|
|
1393
|
-
return [2, deserializeAws_json1_1ListLongTermPricingCommandError(output, context)];
|
|
1394
|
-
}
|
|
1395
|
-
return [4, parseBody(output.body, context)];
|
|
1396
|
-
case 1:
|
|
1397
|
-
data = _a.sent();
|
|
1398
|
-
contents = {};
|
|
1399
|
-
contents = deserializeAws_json1_1ListLongTermPricingResult(data, context);
|
|
1400
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1401
|
-
return [2, Promise.resolve(response)];
|
|
1402
|
-
}
|
|
1403
|
-
});
|
|
1404
|
-
}); };
|
|
1405
|
-
var deserializeAws_json1_1ListLongTermPricingCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1406
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1407
|
-
var _c;
|
|
1408
|
-
return __generator(this, function (_d) {
|
|
1409
|
-
switch (_d.label) {
|
|
1410
|
-
case 0:
|
|
1411
|
-
_a = [__assign({}, output)];
|
|
1412
|
-
_c = {};
|
|
1413
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1414
|
-
case 1:
|
|
1415
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1416
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1417
|
-
_b = errorCode;
|
|
1418
|
-
switch (_b) {
|
|
1419
|
-
case "InvalidNextTokenException": return [3, 2];
|
|
1420
|
-
case "com.amazonaws.snowball#InvalidNextTokenException": return [3, 2];
|
|
1421
|
-
case "InvalidResourceException": return [3, 4];
|
|
1422
|
-
case "com.amazonaws.snowball#InvalidResourceException": return [3, 4];
|
|
1423
|
-
}
|
|
1424
|
-
return [3, 6];
|
|
1425
|
-
case 2: return [4, deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)];
|
|
1426
|
-
case 3: throw _d.sent();
|
|
1427
|
-
case 4: return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
|
|
1428
|
-
case 5: throw _d.sent();
|
|
1429
|
-
case 6:
|
|
1430
|
-
parsedBody = parsedOutput.body;
|
|
1431
|
-
throwDefaultError({
|
|
1432
|
-
output: output,
|
|
1433
|
-
parsedBody: parsedBody,
|
|
1434
|
-
exceptionCtor: __BaseException,
|
|
1435
|
-
errorCode: errorCode,
|
|
1436
|
-
});
|
|
1437
|
-
_d.label = 7;
|
|
1438
|
-
case 7: return [2];
|
|
1439
|
-
}
|
|
1440
|
-
});
|
|
1441
|
-
}); };
|
|
1442
|
-
export var deserializeAws_json1_1UpdateClusterCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1443
|
-
var data, contents, response;
|
|
1444
|
-
return __generator(this, function (_a) {
|
|
1445
|
-
switch (_a.label) {
|
|
1446
|
-
case 0:
|
|
1447
|
-
if (output.statusCode >= 300) {
|
|
1448
|
-
return [2, deserializeAws_json1_1UpdateClusterCommandError(output, context)];
|
|
1449
|
-
}
|
|
1450
|
-
return [4, parseBody(output.body, context)];
|
|
1451
|
-
case 1:
|
|
1452
|
-
data = _a.sent();
|
|
1453
|
-
contents = {};
|
|
1454
|
-
contents = deserializeAws_json1_1UpdateClusterResult(data, context);
|
|
1455
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1456
|
-
return [2, Promise.resolve(response)];
|
|
1457
|
-
}
|
|
1458
|
-
});
|
|
1459
|
-
}); };
|
|
1460
|
-
var deserializeAws_json1_1UpdateClusterCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1461
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1462
|
-
var _c;
|
|
1463
|
-
return __generator(this, function (_d) {
|
|
1464
|
-
switch (_d.label) {
|
|
1465
|
-
case 0:
|
|
1466
|
-
_a = [__assign({}, output)];
|
|
1467
|
-
_c = {};
|
|
1468
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1469
|
-
case 1:
|
|
1470
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1471
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1472
|
-
_b = errorCode;
|
|
1473
|
-
switch (_b) {
|
|
1474
|
-
case "Ec2RequestFailedException": return [3, 2];
|
|
1475
|
-
case "com.amazonaws.snowball#Ec2RequestFailedException": return [3, 2];
|
|
1476
|
-
case "InvalidInputCombinationException": return [3, 4];
|
|
1477
|
-
case "com.amazonaws.snowball#InvalidInputCombinationException": return [3, 4];
|
|
1478
|
-
case "InvalidJobStateException": return [3, 6];
|
|
1479
|
-
case "com.amazonaws.snowball#InvalidJobStateException": return [3, 6];
|
|
1480
|
-
case "InvalidResourceException": return [3, 8];
|
|
1481
|
-
case "com.amazonaws.snowball#InvalidResourceException": return [3, 8];
|
|
1482
|
-
case "KMSRequestFailedException": return [3, 10];
|
|
1483
|
-
case "com.amazonaws.snowball#KMSRequestFailedException": return [3, 10];
|
|
1484
|
-
}
|
|
1485
|
-
return [3, 12];
|
|
1486
|
-
case 2: return [4, deserializeAws_json1_1Ec2RequestFailedExceptionResponse(parsedOutput, context)];
|
|
1487
|
-
case 3: throw _d.sent();
|
|
1488
|
-
case 4: return [4, deserializeAws_json1_1InvalidInputCombinationExceptionResponse(parsedOutput, context)];
|
|
1489
|
-
case 5: throw _d.sent();
|
|
1490
|
-
case 6: return [4, deserializeAws_json1_1InvalidJobStateExceptionResponse(parsedOutput, context)];
|
|
1491
|
-
case 7: throw _d.sent();
|
|
1492
|
-
case 8: return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
|
|
1493
|
-
case 9: throw _d.sent();
|
|
1494
|
-
case 10: return [4, deserializeAws_json1_1KMSRequestFailedExceptionResponse(parsedOutput, context)];
|
|
1495
|
-
case 11: throw _d.sent();
|
|
1496
|
-
case 12:
|
|
1497
|
-
parsedBody = parsedOutput.body;
|
|
1498
|
-
throwDefaultError({
|
|
1499
|
-
output: output,
|
|
1500
|
-
parsedBody: parsedBody,
|
|
1501
|
-
exceptionCtor: __BaseException,
|
|
1502
|
-
errorCode: errorCode,
|
|
1503
|
-
});
|
|
1504
|
-
_d.label = 13;
|
|
1505
|
-
case 13: return [2];
|
|
1506
|
-
}
|
|
1507
|
-
});
|
|
1508
|
-
}); };
|
|
1509
|
-
export var deserializeAws_json1_1UpdateJobCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1510
|
-
var data, contents, response;
|
|
1511
|
-
return __generator(this, function (_a) {
|
|
1512
|
-
switch (_a.label) {
|
|
1513
|
-
case 0:
|
|
1514
|
-
if (output.statusCode >= 300) {
|
|
1515
|
-
return [2, deserializeAws_json1_1UpdateJobCommandError(output, context)];
|
|
1516
|
-
}
|
|
1517
|
-
return [4, parseBody(output.body, context)];
|
|
1518
|
-
case 1:
|
|
1519
|
-
data = _a.sent();
|
|
1520
|
-
contents = {};
|
|
1521
|
-
contents = deserializeAws_json1_1UpdateJobResult(data, context);
|
|
1522
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1523
|
-
return [2, Promise.resolve(response)];
|
|
1524
|
-
}
|
|
1525
|
-
});
|
|
1526
|
-
}); };
|
|
1527
|
-
var deserializeAws_json1_1UpdateJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1528
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1529
|
-
var _c;
|
|
1530
|
-
return __generator(this, function (_d) {
|
|
1531
|
-
switch (_d.label) {
|
|
1532
|
-
case 0:
|
|
1533
|
-
_a = [__assign({}, output)];
|
|
1534
|
-
_c = {};
|
|
1535
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1536
|
-
case 1:
|
|
1537
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1538
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1539
|
-
_b = errorCode;
|
|
1540
|
-
switch (_b) {
|
|
1541
|
-
case "ClusterLimitExceededException": return [3, 2];
|
|
1542
|
-
case "com.amazonaws.snowball#ClusterLimitExceededException": return [3, 2];
|
|
1543
|
-
case "Ec2RequestFailedException": return [3, 4];
|
|
1544
|
-
case "com.amazonaws.snowball#Ec2RequestFailedException": return [3, 4];
|
|
1545
|
-
case "InvalidInputCombinationException": return [3, 6];
|
|
1546
|
-
case "com.amazonaws.snowball#InvalidInputCombinationException": return [3, 6];
|
|
1547
|
-
case "InvalidJobStateException": return [3, 8];
|
|
1548
|
-
case "com.amazonaws.snowball#InvalidJobStateException": return [3, 8];
|
|
1549
|
-
case "InvalidResourceException": return [3, 10];
|
|
1550
|
-
case "com.amazonaws.snowball#InvalidResourceException": return [3, 10];
|
|
1551
|
-
case "KMSRequestFailedException": return [3, 12];
|
|
1552
|
-
case "com.amazonaws.snowball#KMSRequestFailedException": return [3, 12];
|
|
1553
|
-
}
|
|
1554
|
-
return [3, 14];
|
|
1555
|
-
case 2: return [4, deserializeAws_json1_1ClusterLimitExceededExceptionResponse(parsedOutput, context)];
|
|
1556
|
-
case 3: throw _d.sent();
|
|
1557
|
-
case 4: return [4, deserializeAws_json1_1Ec2RequestFailedExceptionResponse(parsedOutput, context)];
|
|
1558
|
-
case 5: throw _d.sent();
|
|
1559
|
-
case 6: return [4, deserializeAws_json1_1InvalidInputCombinationExceptionResponse(parsedOutput, context)];
|
|
1560
|
-
case 7: throw _d.sent();
|
|
1561
|
-
case 8: return [4, deserializeAws_json1_1InvalidJobStateExceptionResponse(parsedOutput, context)];
|
|
1562
|
-
case 9: throw _d.sent();
|
|
1563
|
-
case 10: return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
|
|
1564
|
-
case 11: throw _d.sent();
|
|
1565
|
-
case 12: return [4, deserializeAws_json1_1KMSRequestFailedExceptionResponse(parsedOutput, context)];
|
|
1566
|
-
case 13: throw _d.sent();
|
|
1567
|
-
case 14:
|
|
1568
|
-
parsedBody = parsedOutput.body;
|
|
1569
|
-
throwDefaultError({
|
|
1570
|
-
output: output,
|
|
1571
|
-
parsedBody: parsedBody,
|
|
1572
|
-
exceptionCtor: __BaseException,
|
|
1573
|
-
errorCode: errorCode,
|
|
1574
|
-
});
|
|
1575
|
-
_d.label = 15;
|
|
1576
|
-
case 15: return [2];
|
|
1577
|
-
}
|
|
1578
|
-
});
|
|
1579
|
-
}); };
|
|
1580
|
-
export var deserializeAws_json1_1UpdateJobShipmentStateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1581
|
-
var data, contents, response;
|
|
1582
|
-
return __generator(this, function (_a) {
|
|
1583
|
-
switch (_a.label) {
|
|
1584
|
-
case 0:
|
|
1585
|
-
if (output.statusCode >= 300) {
|
|
1586
|
-
return [2, deserializeAws_json1_1UpdateJobShipmentStateCommandError(output, context)];
|
|
1587
|
-
}
|
|
1588
|
-
return [4, parseBody(output.body, context)];
|
|
1589
|
-
case 1:
|
|
1590
|
-
data = _a.sent();
|
|
1591
|
-
contents = {};
|
|
1592
|
-
contents = deserializeAws_json1_1UpdateJobShipmentStateResult(data, context);
|
|
1593
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1594
|
-
return [2, Promise.resolve(response)];
|
|
1595
|
-
}
|
|
1596
|
-
});
|
|
1597
|
-
}); };
|
|
1598
|
-
var deserializeAws_json1_1UpdateJobShipmentStateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1599
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1600
|
-
var _c;
|
|
1601
|
-
return __generator(this, function (_d) {
|
|
1602
|
-
switch (_d.label) {
|
|
1603
|
-
case 0:
|
|
1604
|
-
_a = [__assign({}, output)];
|
|
1605
|
-
_c = {};
|
|
1606
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1607
|
-
case 1:
|
|
1608
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1609
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1610
|
-
_b = errorCode;
|
|
1611
|
-
switch (_b) {
|
|
1612
|
-
case "InvalidJobStateException": return [3, 2];
|
|
1613
|
-
case "com.amazonaws.snowball#InvalidJobStateException": return [3, 2];
|
|
1614
|
-
case "InvalidResourceException": return [3, 4];
|
|
1615
|
-
case "com.amazonaws.snowball#InvalidResourceException": return [3, 4];
|
|
1616
|
-
}
|
|
1617
|
-
return [3, 6];
|
|
1618
|
-
case 2: return [4, deserializeAws_json1_1InvalidJobStateExceptionResponse(parsedOutput, context)];
|
|
1619
|
-
case 3: throw _d.sent();
|
|
1620
|
-
case 4: return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
|
|
1621
|
-
case 5: throw _d.sent();
|
|
1622
|
-
case 6:
|
|
1623
|
-
parsedBody = parsedOutput.body;
|
|
1624
|
-
throwDefaultError({
|
|
1625
|
-
output: output,
|
|
1626
|
-
parsedBody: parsedBody,
|
|
1627
|
-
exceptionCtor: __BaseException,
|
|
1628
|
-
errorCode: errorCode,
|
|
1629
|
-
});
|
|
1630
|
-
_d.label = 7;
|
|
1631
|
-
case 7: return [2];
|
|
1632
|
-
}
|
|
1633
|
-
});
|
|
1634
|
-
}); };
|
|
1635
|
-
export var deserializeAws_json1_1UpdateLongTermPricingCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1636
|
-
var data, contents, response;
|
|
1637
|
-
return __generator(this, function (_a) {
|
|
1638
|
-
switch (_a.label) {
|
|
1639
|
-
case 0:
|
|
1640
|
-
if (output.statusCode >= 300) {
|
|
1641
|
-
return [2, deserializeAws_json1_1UpdateLongTermPricingCommandError(output, context)];
|
|
1642
|
-
}
|
|
1643
|
-
return [4, parseBody(output.body, context)];
|
|
1644
|
-
case 1:
|
|
1645
|
-
data = _a.sent();
|
|
1646
|
-
contents = {};
|
|
1647
|
-
contents = deserializeAws_json1_1UpdateLongTermPricingResult(data, context);
|
|
1648
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1649
|
-
return [2, Promise.resolve(response)];
|
|
1650
|
-
}
|
|
1651
|
-
});
|
|
1652
|
-
}); };
|
|
1653
|
-
var deserializeAws_json1_1UpdateLongTermPricingCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1654
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1655
|
-
var _c;
|
|
1656
|
-
return __generator(this, function (_d) {
|
|
1657
|
-
switch (_d.label) {
|
|
1658
|
-
case 0:
|
|
1659
|
-
_a = [__assign({}, output)];
|
|
1660
|
-
_c = {};
|
|
1661
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1662
|
-
case 1:
|
|
1663
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1664
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1665
|
-
_b = errorCode;
|
|
1666
|
-
switch (_b) {
|
|
1667
|
-
case "InvalidResourceException": return [3, 2];
|
|
1668
|
-
case "com.amazonaws.snowball#InvalidResourceException": return [3, 2];
|
|
1669
|
-
}
|
|
1670
|
-
return [3, 4];
|
|
1671
|
-
case 2: return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
|
|
1672
|
-
case 3: throw _d.sent();
|
|
1673
|
-
case 4:
|
|
1674
|
-
parsedBody = parsedOutput.body;
|
|
1675
|
-
throwDefaultError({
|
|
1676
|
-
output: output,
|
|
1677
|
-
parsedBody: parsedBody,
|
|
1678
|
-
exceptionCtor: __BaseException,
|
|
1679
|
-
errorCode: errorCode,
|
|
1680
|
-
});
|
|
1681
|
-
_d.label = 5;
|
|
1682
|
-
case 5: return [2];
|
|
1683
|
-
}
|
|
1684
|
-
});
|
|
1685
|
-
}); };
|
|
1686
|
-
var deserializeAws_json1_1ClusterLimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1687
|
-
var body, deserialized, exception;
|
|
1688
|
-
return __generator(this, function (_a) {
|
|
1689
|
-
body = parsedOutput.body;
|
|
1690
|
-
deserialized = deserializeAws_json1_1ClusterLimitExceededException(body, context);
|
|
1691
|
-
exception = new ClusterLimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1692
|
-
return [2, __decorateServiceException(exception, body)];
|
|
1693
|
-
});
|
|
1694
|
-
}); };
|
|
1695
|
-
var deserializeAws_json1_1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1696
|
-
var body, deserialized, exception;
|
|
1697
|
-
return __generator(this, function (_a) {
|
|
1698
|
-
body = parsedOutput.body;
|
|
1699
|
-
deserialized = deserializeAws_json1_1ConflictException(body, context);
|
|
1700
|
-
exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1701
|
-
return [2, __decorateServiceException(exception, body)];
|
|
1702
|
-
});
|
|
1703
|
-
}); };
|
|
1704
|
-
var deserializeAws_json1_1Ec2RequestFailedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1705
|
-
var body, deserialized, exception;
|
|
1706
|
-
return __generator(this, function (_a) {
|
|
1707
|
-
body = parsedOutput.body;
|
|
1708
|
-
deserialized = deserializeAws_json1_1Ec2RequestFailedException(body, context);
|
|
1709
|
-
exception = new Ec2RequestFailedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1710
|
-
return [2, __decorateServiceException(exception, body)];
|
|
1711
|
-
});
|
|
1712
|
-
}); };
|
|
1713
|
-
var deserializeAws_json1_1InvalidAddressExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1714
|
-
var body, deserialized, exception;
|
|
1715
|
-
return __generator(this, function (_a) {
|
|
1716
|
-
body = parsedOutput.body;
|
|
1717
|
-
deserialized = deserializeAws_json1_1InvalidAddressException(body, context);
|
|
1718
|
-
exception = new InvalidAddressException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1719
|
-
return [2, __decorateServiceException(exception, body)];
|
|
1720
|
-
});
|
|
1721
|
-
}); };
|
|
1722
|
-
var deserializeAws_json1_1InvalidInputCombinationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1723
|
-
var body, deserialized, exception;
|
|
1724
|
-
return __generator(this, function (_a) {
|
|
1725
|
-
body = parsedOutput.body;
|
|
1726
|
-
deserialized = deserializeAws_json1_1InvalidInputCombinationException(body, context);
|
|
1727
|
-
exception = new InvalidInputCombinationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1728
|
-
return [2, __decorateServiceException(exception, body)];
|
|
1729
|
-
});
|
|
1730
|
-
}); };
|
|
1731
|
-
var deserializeAws_json1_1InvalidJobStateExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1732
|
-
var body, deserialized, exception;
|
|
1733
|
-
return __generator(this, function (_a) {
|
|
1734
|
-
body = parsedOutput.body;
|
|
1735
|
-
deserialized = deserializeAws_json1_1InvalidJobStateException(body, context);
|
|
1736
|
-
exception = new InvalidJobStateException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1737
|
-
return [2, __decorateServiceException(exception, body)];
|
|
1738
|
-
});
|
|
1739
|
-
}); };
|
|
1740
|
-
var deserializeAws_json1_1InvalidNextTokenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1741
|
-
var body, deserialized, exception;
|
|
1742
|
-
return __generator(this, function (_a) {
|
|
1743
|
-
body = parsedOutput.body;
|
|
1744
|
-
deserialized = deserializeAws_json1_1InvalidNextTokenException(body, context);
|
|
1745
|
-
exception = new InvalidNextTokenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1746
|
-
return [2, __decorateServiceException(exception, body)];
|
|
1747
|
-
});
|
|
1748
|
-
}); };
|
|
1749
|
-
var deserializeAws_json1_1InvalidResourceExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1750
|
-
var body, deserialized, exception;
|
|
1751
|
-
return __generator(this, function (_a) {
|
|
1752
|
-
body = parsedOutput.body;
|
|
1753
|
-
deserialized = deserializeAws_json1_1InvalidResourceException(body, context);
|
|
1754
|
-
exception = new InvalidResourceException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1755
|
-
return [2, __decorateServiceException(exception, body)];
|
|
1756
|
-
});
|
|
1757
|
-
}); };
|
|
1758
|
-
var deserializeAws_json1_1KMSRequestFailedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1759
|
-
var body, deserialized, exception;
|
|
1760
|
-
return __generator(this, function (_a) {
|
|
1761
|
-
body = parsedOutput.body;
|
|
1762
|
-
deserialized = deserializeAws_json1_1KMSRequestFailedException(body, context);
|
|
1763
|
-
exception = new KMSRequestFailedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1764
|
-
return [2, __decorateServiceException(exception, body)];
|
|
1765
|
-
});
|
|
1766
|
-
}); };
|
|
1767
|
-
var deserializeAws_json1_1ReturnShippingLabelAlreadyExistsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1768
|
-
var body, deserialized, exception;
|
|
1769
|
-
return __generator(this, function (_a) {
|
|
1770
|
-
body = parsedOutput.body;
|
|
1771
|
-
deserialized = deserializeAws_json1_1ReturnShippingLabelAlreadyExistsException(body, context);
|
|
1772
|
-
exception = new ReturnShippingLabelAlreadyExistsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1773
|
-
return [2, __decorateServiceException(exception, body)];
|
|
1774
|
-
});
|
|
1775
|
-
}); };
|
|
1776
|
-
var deserializeAws_json1_1UnsupportedAddressExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1777
|
-
var body, deserialized, exception;
|
|
1778
|
-
return __generator(this, function (_a) {
|
|
1779
|
-
body = parsedOutput.body;
|
|
1780
|
-
deserialized = deserializeAws_json1_1UnsupportedAddressException(body, context);
|
|
1781
|
-
exception = new UnsupportedAddressException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1782
|
-
return [2, __decorateServiceException(exception, body)];
|
|
1783
|
-
});
|
|
1784
|
-
}); };
|
|
1785
|
-
var serializeAws_json1_1Address = function (input, context) {
|
|
1786
|
-
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AddressId != null && { AddressId: input.AddressId })), (input.City != null && { City: input.City })), (input.Company != null && { Company: input.Company })), (input.Country != null && { Country: input.Country })), (input.IsRestricted != null && { IsRestricted: input.IsRestricted })), (input.Landmark != null && { Landmark: input.Landmark })), (input.Name != null && { Name: input.Name })), (input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber })), (input.PostalCode != null && { PostalCode: input.PostalCode })), (input.PrefectureOrDistrict != null && { PrefectureOrDistrict: input.PrefectureOrDistrict })), (input.StateOrProvince != null && { StateOrProvince: input.StateOrProvince })), (input.Street1 != null && { Street1: input.Street1 })), (input.Street2 != null && { Street2: input.Street2 })), (input.Street3 != null && { Street3: input.Street3 }));
|
|
5
|
+
export const serializeAws_json1_1CancelClusterCommand = async (input, context) => {
|
|
6
|
+
const headers = {
|
|
7
|
+
"content-type": "application/x-amz-json-1.1",
|
|
8
|
+
"x-amz-target": "AWSIESnowballJobManagementService.CancelCluster",
|
|
9
|
+
};
|
|
10
|
+
let body;
|
|
11
|
+
body = JSON.stringify(serializeAws_json1_1CancelClusterRequest(input, context));
|
|
12
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
13
|
+
};
|
|
14
|
+
export const serializeAws_json1_1CancelJobCommand = async (input, context) => {
|
|
15
|
+
const headers = {
|
|
16
|
+
"content-type": "application/x-amz-json-1.1",
|
|
17
|
+
"x-amz-target": "AWSIESnowballJobManagementService.CancelJob",
|
|
18
|
+
};
|
|
19
|
+
let body;
|
|
20
|
+
body = JSON.stringify(serializeAws_json1_1CancelJobRequest(input, context));
|
|
21
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
|
+
};
|
|
23
|
+
export const serializeAws_json1_1CreateAddressCommand = async (input, context) => {
|
|
24
|
+
const headers = {
|
|
25
|
+
"content-type": "application/x-amz-json-1.1",
|
|
26
|
+
"x-amz-target": "AWSIESnowballJobManagementService.CreateAddress",
|
|
27
|
+
};
|
|
28
|
+
let body;
|
|
29
|
+
body = JSON.stringify(serializeAws_json1_1CreateAddressRequest(input, context));
|
|
30
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
31
|
+
};
|
|
32
|
+
export const serializeAws_json1_1CreateClusterCommand = async (input, context) => {
|
|
33
|
+
const headers = {
|
|
34
|
+
"content-type": "application/x-amz-json-1.1",
|
|
35
|
+
"x-amz-target": "AWSIESnowballJobManagementService.CreateCluster",
|
|
36
|
+
};
|
|
37
|
+
let body;
|
|
38
|
+
body = JSON.stringify(serializeAws_json1_1CreateClusterRequest(input, context));
|
|
39
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
40
|
+
};
|
|
41
|
+
export const serializeAws_json1_1CreateJobCommand = async (input, context) => {
|
|
42
|
+
const headers = {
|
|
43
|
+
"content-type": "application/x-amz-json-1.1",
|
|
44
|
+
"x-amz-target": "AWSIESnowballJobManagementService.CreateJob",
|
|
45
|
+
};
|
|
46
|
+
let body;
|
|
47
|
+
body = JSON.stringify(serializeAws_json1_1CreateJobRequest(input, context));
|
|
48
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
49
|
+
};
|
|
50
|
+
export const serializeAws_json1_1CreateLongTermPricingCommand = async (input, context) => {
|
|
51
|
+
const headers = {
|
|
52
|
+
"content-type": "application/x-amz-json-1.1",
|
|
53
|
+
"x-amz-target": "AWSIESnowballJobManagementService.CreateLongTermPricing",
|
|
54
|
+
};
|
|
55
|
+
let body;
|
|
56
|
+
body = JSON.stringify(serializeAws_json1_1CreateLongTermPricingRequest(input, context));
|
|
57
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
58
|
+
};
|
|
59
|
+
export const serializeAws_json1_1CreateReturnShippingLabelCommand = async (input, context) => {
|
|
60
|
+
const headers = {
|
|
61
|
+
"content-type": "application/x-amz-json-1.1",
|
|
62
|
+
"x-amz-target": "AWSIESnowballJobManagementService.CreateReturnShippingLabel",
|
|
63
|
+
};
|
|
64
|
+
let body;
|
|
65
|
+
body = JSON.stringify(serializeAws_json1_1CreateReturnShippingLabelRequest(input, context));
|
|
66
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
67
|
+
};
|
|
68
|
+
export const serializeAws_json1_1DescribeAddressCommand = async (input, context) => {
|
|
69
|
+
const headers = {
|
|
70
|
+
"content-type": "application/x-amz-json-1.1",
|
|
71
|
+
"x-amz-target": "AWSIESnowballJobManagementService.DescribeAddress",
|
|
72
|
+
};
|
|
73
|
+
let body;
|
|
74
|
+
body = JSON.stringify(serializeAws_json1_1DescribeAddressRequest(input, context));
|
|
75
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
76
|
+
};
|
|
77
|
+
export const serializeAws_json1_1DescribeAddressesCommand = async (input, context) => {
|
|
78
|
+
const headers = {
|
|
79
|
+
"content-type": "application/x-amz-json-1.1",
|
|
80
|
+
"x-amz-target": "AWSIESnowballJobManagementService.DescribeAddresses",
|
|
81
|
+
};
|
|
82
|
+
let body;
|
|
83
|
+
body = JSON.stringify(serializeAws_json1_1DescribeAddressesRequest(input, context));
|
|
84
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
85
|
+
};
|
|
86
|
+
export const serializeAws_json1_1DescribeClusterCommand = async (input, context) => {
|
|
87
|
+
const headers = {
|
|
88
|
+
"content-type": "application/x-amz-json-1.1",
|
|
89
|
+
"x-amz-target": "AWSIESnowballJobManagementService.DescribeCluster",
|
|
90
|
+
};
|
|
91
|
+
let body;
|
|
92
|
+
body = JSON.stringify(serializeAws_json1_1DescribeClusterRequest(input, context));
|
|
93
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
94
|
+
};
|
|
95
|
+
export const serializeAws_json1_1DescribeJobCommand = async (input, context) => {
|
|
96
|
+
const headers = {
|
|
97
|
+
"content-type": "application/x-amz-json-1.1",
|
|
98
|
+
"x-amz-target": "AWSIESnowballJobManagementService.DescribeJob",
|
|
99
|
+
};
|
|
100
|
+
let body;
|
|
101
|
+
body = JSON.stringify(serializeAws_json1_1DescribeJobRequest(input, context));
|
|
102
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
103
|
+
};
|
|
104
|
+
export const serializeAws_json1_1DescribeReturnShippingLabelCommand = async (input, context) => {
|
|
105
|
+
const headers = {
|
|
106
|
+
"content-type": "application/x-amz-json-1.1",
|
|
107
|
+
"x-amz-target": "AWSIESnowballJobManagementService.DescribeReturnShippingLabel",
|
|
108
|
+
};
|
|
109
|
+
let body;
|
|
110
|
+
body = JSON.stringify(serializeAws_json1_1DescribeReturnShippingLabelRequest(input, context));
|
|
111
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
112
|
+
};
|
|
113
|
+
export const serializeAws_json1_1GetJobManifestCommand = async (input, context) => {
|
|
114
|
+
const headers = {
|
|
115
|
+
"content-type": "application/x-amz-json-1.1",
|
|
116
|
+
"x-amz-target": "AWSIESnowballJobManagementService.GetJobManifest",
|
|
117
|
+
};
|
|
118
|
+
let body;
|
|
119
|
+
body = JSON.stringify(serializeAws_json1_1GetJobManifestRequest(input, context));
|
|
120
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
121
|
+
};
|
|
122
|
+
export const serializeAws_json1_1GetJobUnlockCodeCommand = async (input, context) => {
|
|
123
|
+
const headers = {
|
|
124
|
+
"content-type": "application/x-amz-json-1.1",
|
|
125
|
+
"x-amz-target": "AWSIESnowballJobManagementService.GetJobUnlockCode",
|
|
126
|
+
};
|
|
127
|
+
let body;
|
|
128
|
+
body = JSON.stringify(serializeAws_json1_1GetJobUnlockCodeRequest(input, context));
|
|
129
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
130
|
+
};
|
|
131
|
+
export const serializeAws_json1_1GetSnowballUsageCommand = async (input, context) => {
|
|
132
|
+
const headers = {
|
|
133
|
+
"content-type": "application/x-amz-json-1.1",
|
|
134
|
+
"x-amz-target": "AWSIESnowballJobManagementService.GetSnowballUsage",
|
|
135
|
+
};
|
|
136
|
+
let body;
|
|
137
|
+
body = JSON.stringify(serializeAws_json1_1GetSnowballUsageRequest(input, context));
|
|
138
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
139
|
+
};
|
|
140
|
+
export const serializeAws_json1_1GetSoftwareUpdatesCommand = async (input, context) => {
|
|
141
|
+
const headers = {
|
|
142
|
+
"content-type": "application/x-amz-json-1.1",
|
|
143
|
+
"x-amz-target": "AWSIESnowballJobManagementService.GetSoftwareUpdates",
|
|
144
|
+
};
|
|
145
|
+
let body;
|
|
146
|
+
body = JSON.stringify(serializeAws_json1_1GetSoftwareUpdatesRequest(input, context));
|
|
147
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
148
|
+
};
|
|
149
|
+
export const serializeAws_json1_1ListClusterJobsCommand = async (input, context) => {
|
|
150
|
+
const headers = {
|
|
151
|
+
"content-type": "application/x-amz-json-1.1",
|
|
152
|
+
"x-amz-target": "AWSIESnowballJobManagementService.ListClusterJobs",
|
|
153
|
+
};
|
|
154
|
+
let body;
|
|
155
|
+
body = JSON.stringify(serializeAws_json1_1ListClusterJobsRequest(input, context));
|
|
156
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
157
|
+
};
|
|
158
|
+
export const serializeAws_json1_1ListClustersCommand = async (input, context) => {
|
|
159
|
+
const headers = {
|
|
160
|
+
"content-type": "application/x-amz-json-1.1",
|
|
161
|
+
"x-amz-target": "AWSIESnowballJobManagementService.ListClusters",
|
|
162
|
+
};
|
|
163
|
+
let body;
|
|
164
|
+
body = JSON.stringify(serializeAws_json1_1ListClustersRequest(input, context));
|
|
165
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
166
|
+
};
|
|
167
|
+
export const serializeAws_json1_1ListCompatibleImagesCommand = async (input, context) => {
|
|
168
|
+
const headers = {
|
|
169
|
+
"content-type": "application/x-amz-json-1.1",
|
|
170
|
+
"x-amz-target": "AWSIESnowballJobManagementService.ListCompatibleImages",
|
|
171
|
+
};
|
|
172
|
+
let body;
|
|
173
|
+
body = JSON.stringify(serializeAws_json1_1ListCompatibleImagesRequest(input, context));
|
|
174
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
175
|
+
};
|
|
176
|
+
export const serializeAws_json1_1ListJobsCommand = async (input, context) => {
|
|
177
|
+
const headers = {
|
|
178
|
+
"content-type": "application/x-amz-json-1.1",
|
|
179
|
+
"x-amz-target": "AWSIESnowballJobManagementService.ListJobs",
|
|
180
|
+
};
|
|
181
|
+
let body;
|
|
182
|
+
body = JSON.stringify(serializeAws_json1_1ListJobsRequest(input, context));
|
|
183
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
184
|
+
};
|
|
185
|
+
export const serializeAws_json1_1ListLongTermPricingCommand = async (input, context) => {
|
|
186
|
+
const headers = {
|
|
187
|
+
"content-type": "application/x-amz-json-1.1",
|
|
188
|
+
"x-amz-target": "AWSIESnowballJobManagementService.ListLongTermPricing",
|
|
189
|
+
};
|
|
190
|
+
let body;
|
|
191
|
+
body = JSON.stringify(serializeAws_json1_1ListLongTermPricingRequest(input, context));
|
|
192
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
193
|
+
};
|
|
194
|
+
export const serializeAws_json1_1UpdateClusterCommand = async (input, context) => {
|
|
195
|
+
const headers = {
|
|
196
|
+
"content-type": "application/x-amz-json-1.1",
|
|
197
|
+
"x-amz-target": "AWSIESnowballJobManagementService.UpdateCluster",
|
|
198
|
+
};
|
|
199
|
+
let body;
|
|
200
|
+
body = JSON.stringify(serializeAws_json1_1UpdateClusterRequest(input, context));
|
|
201
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
202
|
+
};
|
|
203
|
+
export const serializeAws_json1_1UpdateJobCommand = async (input, context) => {
|
|
204
|
+
const headers = {
|
|
205
|
+
"content-type": "application/x-amz-json-1.1",
|
|
206
|
+
"x-amz-target": "AWSIESnowballJobManagementService.UpdateJob",
|
|
207
|
+
};
|
|
208
|
+
let body;
|
|
209
|
+
body = JSON.stringify(serializeAws_json1_1UpdateJobRequest(input, context));
|
|
210
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
211
|
+
};
|
|
212
|
+
export const serializeAws_json1_1UpdateJobShipmentStateCommand = async (input, context) => {
|
|
213
|
+
const headers = {
|
|
214
|
+
"content-type": "application/x-amz-json-1.1",
|
|
215
|
+
"x-amz-target": "AWSIESnowballJobManagementService.UpdateJobShipmentState",
|
|
216
|
+
};
|
|
217
|
+
let body;
|
|
218
|
+
body = JSON.stringify(serializeAws_json1_1UpdateJobShipmentStateRequest(input, context));
|
|
219
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
220
|
+
};
|
|
221
|
+
export const serializeAws_json1_1UpdateLongTermPricingCommand = async (input, context) => {
|
|
222
|
+
const headers = {
|
|
223
|
+
"content-type": "application/x-amz-json-1.1",
|
|
224
|
+
"x-amz-target": "AWSIESnowballJobManagementService.UpdateLongTermPricing",
|
|
225
|
+
};
|
|
226
|
+
let body;
|
|
227
|
+
body = JSON.stringify(serializeAws_json1_1UpdateLongTermPricingRequest(input, context));
|
|
228
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
1787
229
|
};
|
|
1788
|
-
|
|
1789
|
-
|
|
230
|
+
export const deserializeAws_json1_1CancelClusterCommand = async (output, context) => {
|
|
231
|
+
if (output.statusCode >= 300) {
|
|
232
|
+
return deserializeAws_json1_1CancelClusterCommandError(output, context);
|
|
233
|
+
}
|
|
234
|
+
const data = await parseBody(output.body, context);
|
|
235
|
+
let contents = {};
|
|
236
|
+
contents = deserializeAws_json1_1CancelClusterResult(data, context);
|
|
237
|
+
const response = {
|
|
238
|
+
$metadata: deserializeMetadata(output),
|
|
239
|
+
...contents,
|
|
240
|
+
};
|
|
241
|
+
return Promise.resolve(response);
|
|
1790
242
|
};
|
|
1791
|
-
|
|
1792
|
-
|
|
243
|
+
const deserializeAws_json1_1CancelClusterCommandError = async (output, context) => {
|
|
244
|
+
const parsedOutput = {
|
|
245
|
+
...output,
|
|
246
|
+
body: await parseErrorBody(output.body, context),
|
|
247
|
+
};
|
|
248
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
249
|
+
switch (errorCode) {
|
|
250
|
+
case "InvalidJobStateException":
|
|
251
|
+
case "com.amazonaws.snowball#InvalidJobStateException":
|
|
252
|
+
throw await deserializeAws_json1_1InvalidJobStateExceptionResponse(parsedOutput, context);
|
|
253
|
+
case "InvalidResourceException":
|
|
254
|
+
case "com.amazonaws.snowball#InvalidResourceException":
|
|
255
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
256
|
+
case "KMSRequestFailedException":
|
|
257
|
+
case "com.amazonaws.snowball#KMSRequestFailedException":
|
|
258
|
+
throw await deserializeAws_json1_1KMSRequestFailedExceptionResponse(parsedOutput, context);
|
|
259
|
+
default:
|
|
260
|
+
const parsedBody = parsedOutput.body;
|
|
261
|
+
throwDefaultError({
|
|
262
|
+
output,
|
|
263
|
+
parsedBody,
|
|
264
|
+
exceptionCtor: __BaseException,
|
|
265
|
+
errorCode,
|
|
266
|
+
});
|
|
267
|
+
}
|
|
1793
268
|
};
|
|
1794
|
-
|
|
1795
|
-
|
|
269
|
+
export const deserializeAws_json1_1CancelJobCommand = async (output, context) => {
|
|
270
|
+
if (output.statusCode >= 300) {
|
|
271
|
+
return deserializeAws_json1_1CancelJobCommandError(output, context);
|
|
272
|
+
}
|
|
273
|
+
const data = await parseBody(output.body, context);
|
|
274
|
+
let contents = {};
|
|
275
|
+
contents = deserializeAws_json1_1CancelJobResult(data, context);
|
|
276
|
+
const response = {
|
|
277
|
+
$metadata: deserializeMetadata(output),
|
|
278
|
+
...contents,
|
|
279
|
+
};
|
|
280
|
+
return Promise.resolve(response);
|
|
281
|
+
};
|
|
282
|
+
const deserializeAws_json1_1CancelJobCommandError = async (output, context) => {
|
|
283
|
+
const parsedOutput = {
|
|
284
|
+
...output,
|
|
285
|
+
body: await parseErrorBody(output.body, context),
|
|
286
|
+
};
|
|
287
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
288
|
+
switch (errorCode) {
|
|
289
|
+
case "InvalidJobStateException":
|
|
290
|
+
case "com.amazonaws.snowball#InvalidJobStateException":
|
|
291
|
+
throw await deserializeAws_json1_1InvalidJobStateExceptionResponse(parsedOutput, context);
|
|
292
|
+
case "InvalidResourceException":
|
|
293
|
+
case "com.amazonaws.snowball#InvalidResourceException":
|
|
294
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
295
|
+
case "KMSRequestFailedException":
|
|
296
|
+
case "com.amazonaws.snowball#KMSRequestFailedException":
|
|
297
|
+
throw await deserializeAws_json1_1KMSRequestFailedExceptionResponse(parsedOutput, context);
|
|
298
|
+
default:
|
|
299
|
+
const parsedBody = parsedOutput.body;
|
|
300
|
+
throwDefaultError({
|
|
301
|
+
output,
|
|
302
|
+
parsedBody,
|
|
303
|
+
exceptionCtor: __BaseException,
|
|
304
|
+
errorCode,
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
export const deserializeAws_json1_1CreateAddressCommand = async (output, context) => {
|
|
309
|
+
if (output.statusCode >= 300) {
|
|
310
|
+
return deserializeAws_json1_1CreateAddressCommandError(output, context);
|
|
311
|
+
}
|
|
312
|
+
const data = await parseBody(output.body, context);
|
|
313
|
+
let contents = {};
|
|
314
|
+
contents = deserializeAws_json1_1CreateAddressResult(data, context);
|
|
315
|
+
const response = {
|
|
316
|
+
$metadata: deserializeMetadata(output),
|
|
317
|
+
...contents,
|
|
318
|
+
};
|
|
319
|
+
return Promise.resolve(response);
|
|
320
|
+
};
|
|
321
|
+
const deserializeAws_json1_1CreateAddressCommandError = async (output, context) => {
|
|
322
|
+
const parsedOutput = {
|
|
323
|
+
...output,
|
|
324
|
+
body: await parseErrorBody(output.body, context),
|
|
325
|
+
};
|
|
326
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
327
|
+
switch (errorCode) {
|
|
328
|
+
case "InvalidAddressException":
|
|
329
|
+
case "com.amazonaws.snowball#InvalidAddressException":
|
|
330
|
+
throw await deserializeAws_json1_1InvalidAddressExceptionResponse(parsedOutput, context);
|
|
331
|
+
case "UnsupportedAddressException":
|
|
332
|
+
case "com.amazonaws.snowball#UnsupportedAddressException":
|
|
333
|
+
throw await deserializeAws_json1_1UnsupportedAddressExceptionResponse(parsedOutput, context);
|
|
334
|
+
default:
|
|
335
|
+
const parsedBody = parsedOutput.body;
|
|
336
|
+
throwDefaultError({
|
|
337
|
+
output,
|
|
338
|
+
parsedBody,
|
|
339
|
+
exceptionCtor: __BaseException,
|
|
340
|
+
errorCode,
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
export const deserializeAws_json1_1CreateClusterCommand = async (output, context) => {
|
|
345
|
+
if (output.statusCode >= 300) {
|
|
346
|
+
return deserializeAws_json1_1CreateClusterCommandError(output, context);
|
|
347
|
+
}
|
|
348
|
+
const data = await parseBody(output.body, context);
|
|
349
|
+
let contents = {};
|
|
350
|
+
contents = deserializeAws_json1_1CreateClusterResult(data, context);
|
|
351
|
+
const response = {
|
|
352
|
+
$metadata: deserializeMetadata(output),
|
|
353
|
+
...contents,
|
|
354
|
+
};
|
|
355
|
+
return Promise.resolve(response);
|
|
1796
356
|
};
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
357
|
+
const deserializeAws_json1_1CreateClusterCommandError = async (output, context) => {
|
|
358
|
+
const parsedOutput = {
|
|
359
|
+
...output,
|
|
360
|
+
body: await parseErrorBody(output.body, context),
|
|
361
|
+
};
|
|
362
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
363
|
+
switch (errorCode) {
|
|
364
|
+
case "Ec2RequestFailedException":
|
|
365
|
+
case "com.amazonaws.snowball#Ec2RequestFailedException":
|
|
366
|
+
throw await deserializeAws_json1_1Ec2RequestFailedExceptionResponse(parsedOutput, context);
|
|
367
|
+
case "InvalidInputCombinationException":
|
|
368
|
+
case "com.amazonaws.snowball#InvalidInputCombinationException":
|
|
369
|
+
throw await deserializeAws_json1_1InvalidInputCombinationExceptionResponse(parsedOutput, context);
|
|
370
|
+
case "InvalidResourceException":
|
|
371
|
+
case "com.amazonaws.snowball#InvalidResourceException":
|
|
372
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
373
|
+
case "KMSRequestFailedException":
|
|
374
|
+
case "com.amazonaws.snowball#KMSRequestFailedException":
|
|
375
|
+
throw await deserializeAws_json1_1KMSRequestFailedExceptionResponse(parsedOutput, context);
|
|
376
|
+
default:
|
|
377
|
+
const parsedBody = parsedOutput.body;
|
|
378
|
+
throwDefaultError({
|
|
379
|
+
output,
|
|
380
|
+
parsedBody,
|
|
381
|
+
exceptionCtor: __BaseException,
|
|
382
|
+
errorCode,
|
|
383
|
+
});
|
|
384
|
+
}
|
|
1801
385
|
};
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
}
|
|
1806
|
-
|
|
1807
|
-
|
|
386
|
+
export const deserializeAws_json1_1CreateJobCommand = async (output, context) => {
|
|
387
|
+
if (output.statusCode >= 300) {
|
|
388
|
+
return deserializeAws_json1_1CreateJobCommandError(output, context);
|
|
389
|
+
}
|
|
390
|
+
const data = await parseBody(output.body, context);
|
|
391
|
+
let contents = {};
|
|
392
|
+
contents = deserializeAws_json1_1CreateJobResult(data, context);
|
|
393
|
+
const response = {
|
|
394
|
+
$metadata: deserializeMetadata(output),
|
|
395
|
+
...contents,
|
|
396
|
+
};
|
|
397
|
+
return Promise.resolve(response);
|
|
1808
398
|
};
|
|
1809
|
-
|
|
1810
|
-
|
|
399
|
+
const deserializeAws_json1_1CreateJobCommandError = async (output, context) => {
|
|
400
|
+
const parsedOutput = {
|
|
401
|
+
...output,
|
|
402
|
+
body: await parseErrorBody(output.body, context),
|
|
403
|
+
};
|
|
404
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
405
|
+
switch (errorCode) {
|
|
406
|
+
case "ClusterLimitExceededException":
|
|
407
|
+
case "com.amazonaws.snowball#ClusterLimitExceededException":
|
|
408
|
+
throw await deserializeAws_json1_1ClusterLimitExceededExceptionResponse(parsedOutput, context);
|
|
409
|
+
case "Ec2RequestFailedException":
|
|
410
|
+
case "com.amazonaws.snowball#Ec2RequestFailedException":
|
|
411
|
+
throw await deserializeAws_json1_1Ec2RequestFailedExceptionResponse(parsedOutput, context);
|
|
412
|
+
case "InvalidInputCombinationException":
|
|
413
|
+
case "com.amazonaws.snowball#InvalidInputCombinationException":
|
|
414
|
+
throw await deserializeAws_json1_1InvalidInputCombinationExceptionResponse(parsedOutput, context);
|
|
415
|
+
case "InvalidResourceException":
|
|
416
|
+
case "com.amazonaws.snowball#InvalidResourceException":
|
|
417
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
418
|
+
case "KMSRequestFailedException":
|
|
419
|
+
case "com.amazonaws.snowball#KMSRequestFailedException":
|
|
420
|
+
throw await deserializeAws_json1_1KMSRequestFailedExceptionResponse(parsedOutput, context);
|
|
421
|
+
default:
|
|
422
|
+
const parsedBody = parsedOutput.body;
|
|
423
|
+
throwDefaultError({
|
|
424
|
+
output,
|
|
425
|
+
parsedBody,
|
|
426
|
+
exceptionCtor: __BaseException,
|
|
427
|
+
errorCode,
|
|
428
|
+
});
|
|
429
|
+
}
|
|
1811
430
|
};
|
|
1812
|
-
|
|
1813
|
-
|
|
431
|
+
export const deserializeAws_json1_1CreateLongTermPricingCommand = async (output, context) => {
|
|
432
|
+
if (output.statusCode >= 300) {
|
|
433
|
+
return deserializeAws_json1_1CreateLongTermPricingCommandError(output, context);
|
|
434
|
+
}
|
|
435
|
+
const data = await parseBody(output.body, context);
|
|
436
|
+
let contents = {};
|
|
437
|
+
contents = deserializeAws_json1_1CreateLongTermPricingResult(data, context);
|
|
438
|
+
const response = {
|
|
439
|
+
$metadata: deserializeMetadata(output),
|
|
440
|
+
...contents,
|
|
441
|
+
};
|
|
442
|
+
return Promise.resolve(response);
|
|
1814
443
|
};
|
|
1815
|
-
|
|
1816
|
-
|
|
444
|
+
const deserializeAws_json1_1CreateLongTermPricingCommandError = async (output, context) => {
|
|
445
|
+
const parsedOutput = {
|
|
446
|
+
...output,
|
|
447
|
+
body: await parseErrorBody(output.body, context),
|
|
448
|
+
};
|
|
449
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
450
|
+
switch (errorCode) {
|
|
451
|
+
case "InvalidResourceException":
|
|
452
|
+
case "com.amazonaws.snowball#InvalidResourceException":
|
|
453
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
454
|
+
default:
|
|
455
|
+
const parsedBody = parsedOutput.body;
|
|
456
|
+
throwDefaultError({
|
|
457
|
+
output,
|
|
458
|
+
parsedBody,
|
|
459
|
+
exceptionCtor: __BaseException,
|
|
460
|
+
errorCode,
|
|
461
|
+
});
|
|
462
|
+
}
|
|
1817
463
|
};
|
|
1818
|
-
|
|
1819
|
-
|
|
464
|
+
export const deserializeAws_json1_1CreateReturnShippingLabelCommand = async (output, context) => {
|
|
465
|
+
if (output.statusCode >= 300) {
|
|
466
|
+
return deserializeAws_json1_1CreateReturnShippingLabelCommandError(output, context);
|
|
467
|
+
}
|
|
468
|
+
const data = await parseBody(output.body, context);
|
|
469
|
+
let contents = {};
|
|
470
|
+
contents = deserializeAws_json1_1CreateReturnShippingLabelResult(data, context);
|
|
471
|
+
const response = {
|
|
472
|
+
$metadata: deserializeMetadata(output),
|
|
473
|
+
...contents,
|
|
474
|
+
};
|
|
475
|
+
return Promise.resolve(response);
|
|
1820
476
|
};
|
|
1821
|
-
|
|
1822
|
-
|
|
477
|
+
const deserializeAws_json1_1CreateReturnShippingLabelCommandError = async (output, context) => {
|
|
478
|
+
const parsedOutput = {
|
|
479
|
+
...output,
|
|
480
|
+
body: await parseErrorBody(output.body, context),
|
|
481
|
+
};
|
|
482
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
483
|
+
switch (errorCode) {
|
|
484
|
+
case "ConflictException":
|
|
485
|
+
case "com.amazonaws.snowball#ConflictException":
|
|
486
|
+
throw await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context);
|
|
487
|
+
case "InvalidInputCombinationException":
|
|
488
|
+
case "com.amazonaws.snowball#InvalidInputCombinationException":
|
|
489
|
+
throw await deserializeAws_json1_1InvalidInputCombinationExceptionResponse(parsedOutput, context);
|
|
490
|
+
case "InvalidJobStateException":
|
|
491
|
+
case "com.amazonaws.snowball#InvalidJobStateException":
|
|
492
|
+
throw await deserializeAws_json1_1InvalidJobStateExceptionResponse(parsedOutput, context);
|
|
493
|
+
case "InvalidResourceException":
|
|
494
|
+
case "com.amazonaws.snowball#InvalidResourceException":
|
|
495
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
496
|
+
case "ReturnShippingLabelAlreadyExistsException":
|
|
497
|
+
case "com.amazonaws.snowball#ReturnShippingLabelAlreadyExistsException":
|
|
498
|
+
throw await deserializeAws_json1_1ReturnShippingLabelAlreadyExistsExceptionResponse(parsedOutput, context);
|
|
499
|
+
default:
|
|
500
|
+
const parsedBody = parsedOutput.body;
|
|
501
|
+
throwDefaultError({
|
|
502
|
+
output,
|
|
503
|
+
parsedBody,
|
|
504
|
+
exceptionCtor: __BaseException,
|
|
505
|
+
errorCode,
|
|
506
|
+
});
|
|
507
|
+
}
|
|
1823
508
|
};
|
|
1824
|
-
|
|
1825
|
-
|
|
509
|
+
export const deserializeAws_json1_1DescribeAddressCommand = async (output, context) => {
|
|
510
|
+
if (output.statusCode >= 300) {
|
|
511
|
+
return deserializeAws_json1_1DescribeAddressCommandError(output, context);
|
|
512
|
+
}
|
|
513
|
+
const data = await parseBody(output.body, context);
|
|
514
|
+
let contents = {};
|
|
515
|
+
contents = deserializeAws_json1_1DescribeAddressResult(data, context);
|
|
516
|
+
const response = {
|
|
517
|
+
$metadata: deserializeMetadata(output),
|
|
518
|
+
...contents,
|
|
519
|
+
};
|
|
520
|
+
return Promise.resolve(response);
|
|
1826
521
|
};
|
|
1827
|
-
|
|
1828
|
-
|
|
522
|
+
const deserializeAws_json1_1DescribeAddressCommandError = async (output, context) => {
|
|
523
|
+
const parsedOutput = {
|
|
524
|
+
...output,
|
|
525
|
+
body: await parseErrorBody(output.body, context),
|
|
526
|
+
};
|
|
527
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
528
|
+
switch (errorCode) {
|
|
529
|
+
case "InvalidResourceException":
|
|
530
|
+
case "com.amazonaws.snowball#InvalidResourceException":
|
|
531
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
532
|
+
default:
|
|
533
|
+
const parsedBody = parsedOutput.body;
|
|
534
|
+
throwDefaultError({
|
|
535
|
+
output,
|
|
536
|
+
parsedBody,
|
|
537
|
+
exceptionCtor: __BaseException,
|
|
538
|
+
errorCode,
|
|
539
|
+
});
|
|
540
|
+
}
|
|
1829
541
|
};
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
}
|
|
542
|
+
export const deserializeAws_json1_1DescribeAddressesCommand = async (output, context) => {
|
|
543
|
+
if (output.statusCode >= 300) {
|
|
544
|
+
return deserializeAws_json1_1DescribeAddressesCommandError(output, context);
|
|
545
|
+
}
|
|
546
|
+
const data = await parseBody(output.body, context);
|
|
547
|
+
let contents = {};
|
|
548
|
+
contents = deserializeAws_json1_1DescribeAddressesResult(data, context);
|
|
549
|
+
const response = {
|
|
550
|
+
$metadata: deserializeMetadata(output),
|
|
551
|
+
...contents,
|
|
552
|
+
};
|
|
553
|
+
return Promise.resolve(response);
|
|
1834
554
|
};
|
|
1835
|
-
|
|
1836
|
-
|
|
555
|
+
const deserializeAws_json1_1DescribeAddressesCommandError = async (output, context) => {
|
|
556
|
+
const parsedOutput = {
|
|
557
|
+
...output,
|
|
558
|
+
body: await parseErrorBody(output.body, context),
|
|
559
|
+
};
|
|
560
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
561
|
+
switch (errorCode) {
|
|
562
|
+
case "InvalidNextTokenException":
|
|
563
|
+
case "com.amazonaws.snowball#InvalidNextTokenException":
|
|
564
|
+
throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
|
|
565
|
+
case "InvalidResourceException":
|
|
566
|
+
case "com.amazonaws.snowball#InvalidResourceException":
|
|
567
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
568
|
+
default:
|
|
569
|
+
const parsedBody = parsedOutput.body;
|
|
570
|
+
throwDefaultError({
|
|
571
|
+
output,
|
|
572
|
+
parsedBody,
|
|
573
|
+
exceptionCtor: __BaseException,
|
|
574
|
+
errorCode,
|
|
575
|
+
});
|
|
576
|
+
}
|
|
1837
577
|
};
|
|
1838
|
-
|
|
578
|
+
export const deserializeAws_json1_1DescribeClusterCommand = async (output, context) => {
|
|
579
|
+
if (output.statusCode >= 300) {
|
|
580
|
+
return deserializeAws_json1_1DescribeClusterCommandError(output, context);
|
|
581
|
+
}
|
|
582
|
+
const data = await parseBody(output.body, context);
|
|
583
|
+
let contents = {};
|
|
584
|
+
contents = deserializeAws_json1_1DescribeClusterResult(data, context);
|
|
585
|
+
const response = {
|
|
586
|
+
$metadata: deserializeMetadata(output),
|
|
587
|
+
...contents,
|
|
588
|
+
};
|
|
589
|
+
return Promise.resolve(response);
|
|
590
|
+
};
|
|
591
|
+
const deserializeAws_json1_1DescribeClusterCommandError = async (output, context) => {
|
|
592
|
+
const parsedOutput = {
|
|
593
|
+
...output,
|
|
594
|
+
body: await parseErrorBody(output.body, context),
|
|
595
|
+
};
|
|
596
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
597
|
+
switch (errorCode) {
|
|
598
|
+
case "InvalidResourceException":
|
|
599
|
+
case "com.amazonaws.snowball#InvalidResourceException":
|
|
600
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
601
|
+
default:
|
|
602
|
+
const parsedBody = parsedOutput.body;
|
|
603
|
+
throwDefaultError({
|
|
604
|
+
output,
|
|
605
|
+
parsedBody,
|
|
606
|
+
exceptionCtor: __BaseException,
|
|
607
|
+
errorCode,
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
};
|
|
611
|
+
export const deserializeAws_json1_1DescribeJobCommand = async (output, context) => {
|
|
612
|
+
if (output.statusCode >= 300) {
|
|
613
|
+
return deserializeAws_json1_1DescribeJobCommandError(output, context);
|
|
614
|
+
}
|
|
615
|
+
const data = await parseBody(output.body, context);
|
|
616
|
+
let contents = {};
|
|
617
|
+
contents = deserializeAws_json1_1DescribeJobResult(data, context);
|
|
618
|
+
const response = {
|
|
619
|
+
$metadata: deserializeMetadata(output),
|
|
620
|
+
...contents,
|
|
621
|
+
};
|
|
622
|
+
return Promise.resolve(response);
|
|
623
|
+
};
|
|
624
|
+
const deserializeAws_json1_1DescribeJobCommandError = async (output, context) => {
|
|
625
|
+
const parsedOutput = {
|
|
626
|
+
...output,
|
|
627
|
+
body: await parseErrorBody(output.body, context),
|
|
628
|
+
};
|
|
629
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
630
|
+
switch (errorCode) {
|
|
631
|
+
case "InvalidResourceException":
|
|
632
|
+
case "com.amazonaws.snowball#InvalidResourceException":
|
|
633
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
634
|
+
default:
|
|
635
|
+
const parsedBody = parsedOutput.body;
|
|
636
|
+
throwDefaultError({
|
|
637
|
+
output,
|
|
638
|
+
parsedBody,
|
|
639
|
+
exceptionCtor: __BaseException,
|
|
640
|
+
errorCode,
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
};
|
|
644
|
+
export const deserializeAws_json1_1DescribeReturnShippingLabelCommand = async (output, context) => {
|
|
645
|
+
if (output.statusCode >= 300) {
|
|
646
|
+
return deserializeAws_json1_1DescribeReturnShippingLabelCommandError(output, context);
|
|
647
|
+
}
|
|
648
|
+
const data = await parseBody(output.body, context);
|
|
649
|
+
let contents = {};
|
|
650
|
+
contents = deserializeAws_json1_1DescribeReturnShippingLabelResult(data, context);
|
|
651
|
+
const response = {
|
|
652
|
+
$metadata: deserializeMetadata(output),
|
|
653
|
+
...contents,
|
|
654
|
+
};
|
|
655
|
+
return Promise.resolve(response);
|
|
656
|
+
};
|
|
657
|
+
const deserializeAws_json1_1DescribeReturnShippingLabelCommandError = async (output, context) => {
|
|
658
|
+
const parsedOutput = {
|
|
659
|
+
...output,
|
|
660
|
+
body: await parseErrorBody(output.body, context),
|
|
661
|
+
};
|
|
662
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
663
|
+
switch (errorCode) {
|
|
664
|
+
case "ConflictException":
|
|
665
|
+
case "com.amazonaws.snowball#ConflictException":
|
|
666
|
+
throw await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context);
|
|
667
|
+
case "InvalidJobStateException":
|
|
668
|
+
case "com.amazonaws.snowball#InvalidJobStateException":
|
|
669
|
+
throw await deserializeAws_json1_1InvalidJobStateExceptionResponse(parsedOutput, context);
|
|
670
|
+
case "InvalidResourceException":
|
|
671
|
+
case "com.amazonaws.snowball#InvalidResourceException":
|
|
672
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
673
|
+
default:
|
|
674
|
+
const parsedBody = parsedOutput.body;
|
|
675
|
+
throwDefaultError({
|
|
676
|
+
output,
|
|
677
|
+
parsedBody,
|
|
678
|
+
exceptionCtor: __BaseException,
|
|
679
|
+
errorCode,
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
};
|
|
683
|
+
export const deserializeAws_json1_1GetJobManifestCommand = async (output, context) => {
|
|
684
|
+
if (output.statusCode >= 300) {
|
|
685
|
+
return deserializeAws_json1_1GetJobManifestCommandError(output, context);
|
|
686
|
+
}
|
|
687
|
+
const data = await parseBody(output.body, context);
|
|
688
|
+
let contents = {};
|
|
689
|
+
contents = deserializeAws_json1_1GetJobManifestResult(data, context);
|
|
690
|
+
const response = {
|
|
691
|
+
$metadata: deserializeMetadata(output),
|
|
692
|
+
...contents,
|
|
693
|
+
};
|
|
694
|
+
return Promise.resolve(response);
|
|
695
|
+
};
|
|
696
|
+
const deserializeAws_json1_1GetJobManifestCommandError = async (output, context) => {
|
|
697
|
+
const parsedOutput = {
|
|
698
|
+
...output,
|
|
699
|
+
body: await parseErrorBody(output.body, context),
|
|
700
|
+
};
|
|
701
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
702
|
+
switch (errorCode) {
|
|
703
|
+
case "InvalidJobStateException":
|
|
704
|
+
case "com.amazonaws.snowball#InvalidJobStateException":
|
|
705
|
+
throw await deserializeAws_json1_1InvalidJobStateExceptionResponse(parsedOutput, context);
|
|
706
|
+
case "InvalidResourceException":
|
|
707
|
+
case "com.amazonaws.snowball#InvalidResourceException":
|
|
708
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
709
|
+
default:
|
|
710
|
+
const parsedBody = parsedOutput.body;
|
|
711
|
+
throwDefaultError({
|
|
712
|
+
output,
|
|
713
|
+
parsedBody,
|
|
714
|
+
exceptionCtor: __BaseException,
|
|
715
|
+
errorCode,
|
|
716
|
+
});
|
|
717
|
+
}
|
|
718
|
+
};
|
|
719
|
+
export const deserializeAws_json1_1GetJobUnlockCodeCommand = async (output, context) => {
|
|
720
|
+
if (output.statusCode >= 300) {
|
|
721
|
+
return deserializeAws_json1_1GetJobUnlockCodeCommandError(output, context);
|
|
722
|
+
}
|
|
723
|
+
const data = await parseBody(output.body, context);
|
|
724
|
+
let contents = {};
|
|
725
|
+
contents = deserializeAws_json1_1GetJobUnlockCodeResult(data, context);
|
|
726
|
+
const response = {
|
|
727
|
+
$metadata: deserializeMetadata(output),
|
|
728
|
+
...contents,
|
|
729
|
+
};
|
|
730
|
+
return Promise.resolve(response);
|
|
731
|
+
};
|
|
732
|
+
const deserializeAws_json1_1GetJobUnlockCodeCommandError = async (output, context) => {
|
|
733
|
+
const parsedOutput = {
|
|
734
|
+
...output,
|
|
735
|
+
body: await parseErrorBody(output.body, context),
|
|
736
|
+
};
|
|
737
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
738
|
+
switch (errorCode) {
|
|
739
|
+
case "InvalidJobStateException":
|
|
740
|
+
case "com.amazonaws.snowball#InvalidJobStateException":
|
|
741
|
+
throw await deserializeAws_json1_1InvalidJobStateExceptionResponse(parsedOutput, context);
|
|
742
|
+
case "InvalidResourceException":
|
|
743
|
+
case "com.amazonaws.snowball#InvalidResourceException":
|
|
744
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
745
|
+
default:
|
|
746
|
+
const parsedBody = parsedOutput.body;
|
|
747
|
+
throwDefaultError({
|
|
748
|
+
output,
|
|
749
|
+
parsedBody,
|
|
750
|
+
exceptionCtor: __BaseException,
|
|
751
|
+
errorCode,
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
};
|
|
755
|
+
export const deserializeAws_json1_1GetSnowballUsageCommand = async (output, context) => {
|
|
756
|
+
if (output.statusCode >= 300) {
|
|
757
|
+
return deserializeAws_json1_1GetSnowballUsageCommandError(output, context);
|
|
758
|
+
}
|
|
759
|
+
const data = await parseBody(output.body, context);
|
|
760
|
+
let contents = {};
|
|
761
|
+
contents = deserializeAws_json1_1GetSnowballUsageResult(data, context);
|
|
762
|
+
const response = {
|
|
763
|
+
$metadata: deserializeMetadata(output),
|
|
764
|
+
...contents,
|
|
765
|
+
};
|
|
766
|
+
return Promise.resolve(response);
|
|
767
|
+
};
|
|
768
|
+
const deserializeAws_json1_1GetSnowballUsageCommandError = async (output, context) => {
|
|
769
|
+
const parsedOutput = {
|
|
770
|
+
...output,
|
|
771
|
+
body: await parseErrorBody(output.body, context),
|
|
772
|
+
};
|
|
773
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
774
|
+
const parsedBody = parsedOutput.body;
|
|
775
|
+
throwDefaultError({
|
|
776
|
+
output,
|
|
777
|
+
parsedBody,
|
|
778
|
+
exceptionCtor: __BaseException,
|
|
779
|
+
errorCode,
|
|
780
|
+
});
|
|
781
|
+
};
|
|
782
|
+
export const deserializeAws_json1_1GetSoftwareUpdatesCommand = async (output, context) => {
|
|
783
|
+
if (output.statusCode >= 300) {
|
|
784
|
+
return deserializeAws_json1_1GetSoftwareUpdatesCommandError(output, context);
|
|
785
|
+
}
|
|
786
|
+
const data = await parseBody(output.body, context);
|
|
787
|
+
let contents = {};
|
|
788
|
+
contents = deserializeAws_json1_1GetSoftwareUpdatesResult(data, context);
|
|
789
|
+
const response = {
|
|
790
|
+
$metadata: deserializeMetadata(output),
|
|
791
|
+
...contents,
|
|
792
|
+
};
|
|
793
|
+
return Promise.resolve(response);
|
|
794
|
+
};
|
|
795
|
+
const deserializeAws_json1_1GetSoftwareUpdatesCommandError = async (output, context) => {
|
|
796
|
+
const parsedOutput = {
|
|
797
|
+
...output,
|
|
798
|
+
body: await parseErrorBody(output.body, context),
|
|
799
|
+
};
|
|
800
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
801
|
+
switch (errorCode) {
|
|
802
|
+
case "InvalidJobStateException":
|
|
803
|
+
case "com.amazonaws.snowball#InvalidJobStateException":
|
|
804
|
+
throw await deserializeAws_json1_1InvalidJobStateExceptionResponse(parsedOutput, context);
|
|
805
|
+
case "InvalidResourceException":
|
|
806
|
+
case "com.amazonaws.snowball#InvalidResourceException":
|
|
807
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
808
|
+
default:
|
|
809
|
+
const parsedBody = parsedOutput.body;
|
|
810
|
+
throwDefaultError({
|
|
811
|
+
output,
|
|
812
|
+
parsedBody,
|
|
813
|
+
exceptionCtor: __BaseException,
|
|
814
|
+
errorCode,
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
};
|
|
818
|
+
export const deserializeAws_json1_1ListClusterJobsCommand = async (output, context) => {
|
|
819
|
+
if (output.statusCode >= 300) {
|
|
820
|
+
return deserializeAws_json1_1ListClusterJobsCommandError(output, context);
|
|
821
|
+
}
|
|
822
|
+
const data = await parseBody(output.body, context);
|
|
823
|
+
let contents = {};
|
|
824
|
+
contents = deserializeAws_json1_1ListClusterJobsResult(data, context);
|
|
825
|
+
const response = {
|
|
826
|
+
$metadata: deserializeMetadata(output),
|
|
827
|
+
...contents,
|
|
828
|
+
};
|
|
829
|
+
return Promise.resolve(response);
|
|
830
|
+
};
|
|
831
|
+
const deserializeAws_json1_1ListClusterJobsCommandError = async (output, context) => {
|
|
832
|
+
const parsedOutput = {
|
|
833
|
+
...output,
|
|
834
|
+
body: await parseErrorBody(output.body, context),
|
|
835
|
+
};
|
|
836
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
837
|
+
switch (errorCode) {
|
|
838
|
+
case "InvalidNextTokenException":
|
|
839
|
+
case "com.amazonaws.snowball#InvalidNextTokenException":
|
|
840
|
+
throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
|
|
841
|
+
case "InvalidResourceException":
|
|
842
|
+
case "com.amazonaws.snowball#InvalidResourceException":
|
|
843
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
844
|
+
default:
|
|
845
|
+
const parsedBody = parsedOutput.body;
|
|
846
|
+
throwDefaultError({
|
|
847
|
+
output,
|
|
848
|
+
parsedBody,
|
|
849
|
+
exceptionCtor: __BaseException,
|
|
850
|
+
errorCode,
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
};
|
|
854
|
+
export const deserializeAws_json1_1ListClustersCommand = async (output, context) => {
|
|
855
|
+
if (output.statusCode >= 300) {
|
|
856
|
+
return deserializeAws_json1_1ListClustersCommandError(output, context);
|
|
857
|
+
}
|
|
858
|
+
const data = await parseBody(output.body, context);
|
|
859
|
+
let contents = {};
|
|
860
|
+
contents = deserializeAws_json1_1ListClustersResult(data, context);
|
|
861
|
+
const response = {
|
|
862
|
+
$metadata: deserializeMetadata(output),
|
|
863
|
+
...contents,
|
|
864
|
+
};
|
|
865
|
+
return Promise.resolve(response);
|
|
866
|
+
};
|
|
867
|
+
const deserializeAws_json1_1ListClustersCommandError = async (output, context) => {
|
|
868
|
+
const parsedOutput = {
|
|
869
|
+
...output,
|
|
870
|
+
body: await parseErrorBody(output.body, context),
|
|
871
|
+
};
|
|
872
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
873
|
+
switch (errorCode) {
|
|
874
|
+
case "InvalidNextTokenException":
|
|
875
|
+
case "com.amazonaws.snowball#InvalidNextTokenException":
|
|
876
|
+
throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
|
|
877
|
+
default:
|
|
878
|
+
const parsedBody = parsedOutput.body;
|
|
879
|
+
throwDefaultError({
|
|
880
|
+
output,
|
|
881
|
+
parsedBody,
|
|
882
|
+
exceptionCtor: __BaseException,
|
|
883
|
+
errorCode,
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
};
|
|
887
|
+
export const deserializeAws_json1_1ListCompatibleImagesCommand = async (output, context) => {
|
|
888
|
+
if (output.statusCode >= 300) {
|
|
889
|
+
return deserializeAws_json1_1ListCompatibleImagesCommandError(output, context);
|
|
890
|
+
}
|
|
891
|
+
const data = await parseBody(output.body, context);
|
|
892
|
+
let contents = {};
|
|
893
|
+
contents = deserializeAws_json1_1ListCompatibleImagesResult(data, context);
|
|
894
|
+
const response = {
|
|
895
|
+
$metadata: deserializeMetadata(output),
|
|
896
|
+
...contents,
|
|
897
|
+
};
|
|
898
|
+
return Promise.resolve(response);
|
|
899
|
+
};
|
|
900
|
+
const deserializeAws_json1_1ListCompatibleImagesCommandError = async (output, context) => {
|
|
901
|
+
const parsedOutput = {
|
|
902
|
+
...output,
|
|
903
|
+
body: await parseErrorBody(output.body, context),
|
|
904
|
+
};
|
|
905
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
906
|
+
switch (errorCode) {
|
|
907
|
+
case "Ec2RequestFailedException":
|
|
908
|
+
case "com.amazonaws.snowball#Ec2RequestFailedException":
|
|
909
|
+
throw await deserializeAws_json1_1Ec2RequestFailedExceptionResponse(parsedOutput, context);
|
|
910
|
+
case "InvalidNextTokenException":
|
|
911
|
+
case "com.amazonaws.snowball#InvalidNextTokenException":
|
|
912
|
+
throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
|
|
913
|
+
default:
|
|
914
|
+
const parsedBody = parsedOutput.body;
|
|
915
|
+
throwDefaultError({
|
|
916
|
+
output,
|
|
917
|
+
parsedBody,
|
|
918
|
+
exceptionCtor: __BaseException,
|
|
919
|
+
errorCode,
|
|
920
|
+
});
|
|
921
|
+
}
|
|
922
|
+
};
|
|
923
|
+
export const deserializeAws_json1_1ListJobsCommand = async (output, context) => {
|
|
924
|
+
if (output.statusCode >= 300) {
|
|
925
|
+
return deserializeAws_json1_1ListJobsCommandError(output, context);
|
|
926
|
+
}
|
|
927
|
+
const data = await parseBody(output.body, context);
|
|
928
|
+
let contents = {};
|
|
929
|
+
contents = deserializeAws_json1_1ListJobsResult(data, context);
|
|
930
|
+
const response = {
|
|
931
|
+
$metadata: deserializeMetadata(output),
|
|
932
|
+
...contents,
|
|
933
|
+
};
|
|
934
|
+
return Promise.resolve(response);
|
|
935
|
+
};
|
|
936
|
+
const deserializeAws_json1_1ListJobsCommandError = async (output, context) => {
|
|
937
|
+
const parsedOutput = {
|
|
938
|
+
...output,
|
|
939
|
+
body: await parseErrorBody(output.body, context),
|
|
940
|
+
};
|
|
941
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
942
|
+
switch (errorCode) {
|
|
943
|
+
case "InvalidNextTokenException":
|
|
944
|
+
case "com.amazonaws.snowball#InvalidNextTokenException":
|
|
945
|
+
throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
|
|
946
|
+
default:
|
|
947
|
+
const parsedBody = parsedOutput.body;
|
|
948
|
+
throwDefaultError({
|
|
949
|
+
output,
|
|
950
|
+
parsedBody,
|
|
951
|
+
exceptionCtor: __BaseException,
|
|
952
|
+
errorCode,
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
};
|
|
956
|
+
export const deserializeAws_json1_1ListLongTermPricingCommand = async (output, context) => {
|
|
957
|
+
if (output.statusCode >= 300) {
|
|
958
|
+
return deserializeAws_json1_1ListLongTermPricingCommandError(output, context);
|
|
959
|
+
}
|
|
960
|
+
const data = await parseBody(output.body, context);
|
|
961
|
+
let contents = {};
|
|
962
|
+
contents = deserializeAws_json1_1ListLongTermPricingResult(data, context);
|
|
963
|
+
const response = {
|
|
964
|
+
$metadata: deserializeMetadata(output),
|
|
965
|
+
...contents,
|
|
966
|
+
};
|
|
967
|
+
return Promise.resolve(response);
|
|
968
|
+
};
|
|
969
|
+
const deserializeAws_json1_1ListLongTermPricingCommandError = async (output, context) => {
|
|
970
|
+
const parsedOutput = {
|
|
971
|
+
...output,
|
|
972
|
+
body: await parseErrorBody(output.body, context),
|
|
973
|
+
};
|
|
974
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
975
|
+
switch (errorCode) {
|
|
976
|
+
case "InvalidNextTokenException":
|
|
977
|
+
case "com.amazonaws.snowball#InvalidNextTokenException":
|
|
978
|
+
throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
|
|
979
|
+
case "InvalidResourceException":
|
|
980
|
+
case "com.amazonaws.snowball#InvalidResourceException":
|
|
981
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
982
|
+
default:
|
|
983
|
+
const parsedBody = parsedOutput.body;
|
|
984
|
+
throwDefaultError({
|
|
985
|
+
output,
|
|
986
|
+
parsedBody,
|
|
987
|
+
exceptionCtor: __BaseException,
|
|
988
|
+
errorCode,
|
|
989
|
+
});
|
|
990
|
+
}
|
|
991
|
+
};
|
|
992
|
+
export const deserializeAws_json1_1UpdateClusterCommand = async (output, context) => {
|
|
993
|
+
if (output.statusCode >= 300) {
|
|
994
|
+
return deserializeAws_json1_1UpdateClusterCommandError(output, context);
|
|
995
|
+
}
|
|
996
|
+
const data = await parseBody(output.body, context);
|
|
997
|
+
let contents = {};
|
|
998
|
+
contents = deserializeAws_json1_1UpdateClusterResult(data, context);
|
|
999
|
+
const response = {
|
|
1000
|
+
$metadata: deserializeMetadata(output),
|
|
1001
|
+
...contents,
|
|
1002
|
+
};
|
|
1003
|
+
return Promise.resolve(response);
|
|
1004
|
+
};
|
|
1005
|
+
const deserializeAws_json1_1UpdateClusterCommandError = async (output, context) => {
|
|
1006
|
+
const parsedOutput = {
|
|
1007
|
+
...output,
|
|
1008
|
+
body: await parseErrorBody(output.body, context),
|
|
1009
|
+
};
|
|
1010
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1011
|
+
switch (errorCode) {
|
|
1012
|
+
case "Ec2RequestFailedException":
|
|
1013
|
+
case "com.amazonaws.snowball#Ec2RequestFailedException":
|
|
1014
|
+
throw await deserializeAws_json1_1Ec2RequestFailedExceptionResponse(parsedOutput, context);
|
|
1015
|
+
case "InvalidInputCombinationException":
|
|
1016
|
+
case "com.amazonaws.snowball#InvalidInputCombinationException":
|
|
1017
|
+
throw await deserializeAws_json1_1InvalidInputCombinationExceptionResponse(parsedOutput, context);
|
|
1018
|
+
case "InvalidJobStateException":
|
|
1019
|
+
case "com.amazonaws.snowball#InvalidJobStateException":
|
|
1020
|
+
throw await deserializeAws_json1_1InvalidJobStateExceptionResponse(parsedOutput, context);
|
|
1021
|
+
case "InvalidResourceException":
|
|
1022
|
+
case "com.amazonaws.snowball#InvalidResourceException":
|
|
1023
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
1024
|
+
case "KMSRequestFailedException":
|
|
1025
|
+
case "com.amazonaws.snowball#KMSRequestFailedException":
|
|
1026
|
+
throw await deserializeAws_json1_1KMSRequestFailedExceptionResponse(parsedOutput, context);
|
|
1027
|
+
default:
|
|
1028
|
+
const parsedBody = parsedOutput.body;
|
|
1029
|
+
throwDefaultError({
|
|
1030
|
+
output,
|
|
1031
|
+
parsedBody,
|
|
1032
|
+
exceptionCtor: __BaseException,
|
|
1033
|
+
errorCode,
|
|
1034
|
+
});
|
|
1035
|
+
}
|
|
1036
|
+
};
|
|
1037
|
+
export const deserializeAws_json1_1UpdateJobCommand = async (output, context) => {
|
|
1038
|
+
if (output.statusCode >= 300) {
|
|
1039
|
+
return deserializeAws_json1_1UpdateJobCommandError(output, context);
|
|
1040
|
+
}
|
|
1041
|
+
const data = await parseBody(output.body, context);
|
|
1042
|
+
let contents = {};
|
|
1043
|
+
contents = deserializeAws_json1_1UpdateJobResult(data, context);
|
|
1044
|
+
const response = {
|
|
1045
|
+
$metadata: deserializeMetadata(output),
|
|
1046
|
+
...contents,
|
|
1047
|
+
};
|
|
1048
|
+
return Promise.resolve(response);
|
|
1049
|
+
};
|
|
1050
|
+
const deserializeAws_json1_1UpdateJobCommandError = async (output, context) => {
|
|
1051
|
+
const parsedOutput = {
|
|
1052
|
+
...output,
|
|
1053
|
+
body: await parseErrorBody(output.body, context),
|
|
1054
|
+
};
|
|
1055
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1056
|
+
switch (errorCode) {
|
|
1057
|
+
case "ClusterLimitExceededException":
|
|
1058
|
+
case "com.amazonaws.snowball#ClusterLimitExceededException":
|
|
1059
|
+
throw await deserializeAws_json1_1ClusterLimitExceededExceptionResponse(parsedOutput, context);
|
|
1060
|
+
case "Ec2RequestFailedException":
|
|
1061
|
+
case "com.amazonaws.snowball#Ec2RequestFailedException":
|
|
1062
|
+
throw await deserializeAws_json1_1Ec2RequestFailedExceptionResponse(parsedOutput, context);
|
|
1063
|
+
case "InvalidInputCombinationException":
|
|
1064
|
+
case "com.amazonaws.snowball#InvalidInputCombinationException":
|
|
1065
|
+
throw await deserializeAws_json1_1InvalidInputCombinationExceptionResponse(parsedOutput, context);
|
|
1066
|
+
case "InvalidJobStateException":
|
|
1067
|
+
case "com.amazonaws.snowball#InvalidJobStateException":
|
|
1068
|
+
throw await deserializeAws_json1_1InvalidJobStateExceptionResponse(parsedOutput, context);
|
|
1069
|
+
case "InvalidResourceException":
|
|
1070
|
+
case "com.amazonaws.snowball#InvalidResourceException":
|
|
1071
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
1072
|
+
case "KMSRequestFailedException":
|
|
1073
|
+
case "com.amazonaws.snowball#KMSRequestFailedException":
|
|
1074
|
+
throw await deserializeAws_json1_1KMSRequestFailedExceptionResponse(parsedOutput, context);
|
|
1075
|
+
default:
|
|
1076
|
+
const parsedBody = parsedOutput.body;
|
|
1077
|
+
throwDefaultError({
|
|
1078
|
+
output,
|
|
1079
|
+
parsedBody,
|
|
1080
|
+
exceptionCtor: __BaseException,
|
|
1081
|
+
errorCode,
|
|
1082
|
+
});
|
|
1083
|
+
}
|
|
1084
|
+
};
|
|
1085
|
+
export const deserializeAws_json1_1UpdateJobShipmentStateCommand = async (output, context) => {
|
|
1086
|
+
if (output.statusCode >= 300) {
|
|
1087
|
+
return deserializeAws_json1_1UpdateJobShipmentStateCommandError(output, context);
|
|
1088
|
+
}
|
|
1089
|
+
const data = await parseBody(output.body, context);
|
|
1090
|
+
let contents = {};
|
|
1091
|
+
contents = deserializeAws_json1_1UpdateJobShipmentStateResult(data, context);
|
|
1092
|
+
const response = {
|
|
1093
|
+
$metadata: deserializeMetadata(output),
|
|
1094
|
+
...contents,
|
|
1095
|
+
};
|
|
1096
|
+
return Promise.resolve(response);
|
|
1097
|
+
};
|
|
1098
|
+
const deserializeAws_json1_1UpdateJobShipmentStateCommandError = async (output, context) => {
|
|
1099
|
+
const parsedOutput = {
|
|
1100
|
+
...output,
|
|
1101
|
+
body: await parseErrorBody(output.body, context),
|
|
1102
|
+
};
|
|
1103
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1104
|
+
switch (errorCode) {
|
|
1105
|
+
case "InvalidJobStateException":
|
|
1106
|
+
case "com.amazonaws.snowball#InvalidJobStateException":
|
|
1107
|
+
throw await deserializeAws_json1_1InvalidJobStateExceptionResponse(parsedOutput, context);
|
|
1108
|
+
case "InvalidResourceException":
|
|
1109
|
+
case "com.amazonaws.snowball#InvalidResourceException":
|
|
1110
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
1111
|
+
default:
|
|
1112
|
+
const parsedBody = parsedOutput.body;
|
|
1113
|
+
throwDefaultError({
|
|
1114
|
+
output,
|
|
1115
|
+
parsedBody,
|
|
1116
|
+
exceptionCtor: __BaseException,
|
|
1117
|
+
errorCode,
|
|
1118
|
+
});
|
|
1119
|
+
}
|
|
1120
|
+
};
|
|
1121
|
+
export const deserializeAws_json1_1UpdateLongTermPricingCommand = async (output, context) => {
|
|
1122
|
+
if (output.statusCode >= 300) {
|
|
1123
|
+
return deserializeAws_json1_1UpdateLongTermPricingCommandError(output, context);
|
|
1124
|
+
}
|
|
1125
|
+
const data = await parseBody(output.body, context);
|
|
1126
|
+
let contents = {};
|
|
1127
|
+
contents = deserializeAws_json1_1UpdateLongTermPricingResult(data, context);
|
|
1128
|
+
const response = {
|
|
1129
|
+
$metadata: deserializeMetadata(output),
|
|
1130
|
+
...contents,
|
|
1131
|
+
};
|
|
1132
|
+
return Promise.resolve(response);
|
|
1133
|
+
};
|
|
1134
|
+
const deserializeAws_json1_1UpdateLongTermPricingCommandError = async (output, context) => {
|
|
1135
|
+
const parsedOutput = {
|
|
1136
|
+
...output,
|
|
1137
|
+
body: await parseErrorBody(output.body, context),
|
|
1138
|
+
};
|
|
1139
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1140
|
+
switch (errorCode) {
|
|
1141
|
+
case "InvalidResourceException":
|
|
1142
|
+
case "com.amazonaws.snowball#InvalidResourceException":
|
|
1143
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
1144
|
+
default:
|
|
1145
|
+
const parsedBody = parsedOutput.body;
|
|
1146
|
+
throwDefaultError({
|
|
1147
|
+
output,
|
|
1148
|
+
parsedBody,
|
|
1149
|
+
exceptionCtor: __BaseException,
|
|
1150
|
+
errorCode,
|
|
1151
|
+
});
|
|
1152
|
+
}
|
|
1153
|
+
};
|
|
1154
|
+
const deserializeAws_json1_1ClusterLimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
1155
|
+
const body = parsedOutput.body;
|
|
1156
|
+
const deserialized = deserializeAws_json1_1ClusterLimitExceededException(body, context);
|
|
1157
|
+
const exception = new ClusterLimitExceededException({
|
|
1158
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1159
|
+
...deserialized,
|
|
1160
|
+
});
|
|
1161
|
+
return __decorateServiceException(exception, body);
|
|
1162
|
+
};
|
|
1163
|
+
const deserializeAws_json1_1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
1164
|
+
const body = parsedOutput.body;
|
|
1165
|
+
const deserialized = deserializeAws_json1_1ConflictException(body, context);
|
|
1166
|
+
const exception = new ConflictException({
|
|
1167
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1168
|
+
...deserialized,
|
|
1169
|
+
});
|
|
1170
|
+
return __decorateServiceException(exception, body);
|
|
1171
|
+
};
|
|
1172
|
+
const deserializeAws_json1_1Ec2RequestFailedExceptionResponse = async (parsedOutput, context) => {
|
|
1173
|
+
const body = parsedOutput.body;
|
|
1174
|
+
const deserialized = deserializeAws_json1_1Ec2RequestFailedException(body, context);
|
|
1175
|
+
const exception = new Ec2RequestFailedException({
|
|
1176
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1177
|
+
...deserialized,
|
|
1178
|
+
});
|
|
1179
|
+
return __decorateServiceException(exception, body);
|
|
1180
|
+
};
|
|
1181
|
+
const deserializeAws_json1_1InvalidAddressExceptionResponse = async (parsedOutput, context) => {
|
|
1182
|
+
const body = parsedOutput.body;
|
|
1183
|
+
const deserialized = deserializeAws_json1_1InvalidAddressException(body, context);
|
|
1184
|
+
const exception = new InvalidAddressException({
|
|
1185
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1186
|
+
...deserialized,
|
|
1187
|
+
});
|
|
1188
|
+
return __decorateServiceException(exception, body);
|
|
1189
|
+
};
|
|
1190
|
+
const deserializeAws_json1_1InvalidInputCombinationExceptionResponse = async (parsedOutput, context) => {
|
|
1191
|
+
const body = parsedOutput.body;
|
|
1192
|
+
const deserialized = deserializeAws_json1_1InvalidInputCombinationException(body, context);
|
|
1193
|
+
const exception = new InvalidInputCombinationException({
|
|
1194
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1195
|
+
...deserialized,
|
|
1196
|
+
});
|
|
1197
|
+
return __decorateServiceException(exception, body);
|
|
1198
|
+
};
|
|
1199
|
+
const deserializeAws_json1_1InvalidJobStateExceptionResponse = async (parsedOutput, context) => {
|
|
1200
|
+
const body = parsedOutput.body;
|
|
1201
|
+
const deserialized = deserializeAws_json1_1InvalidJobStateException(body, context);
|
|
1202
|
+
const exception = new InvalidJobStateException({
|
|
1203
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1204
|
+
...deserialized,
|
|
1205
|
+
});
|
|
1206
|
+
return __decorateServiceException(exception, body);
|
|
1207
|
+
};
|
|
1208
|
+
const deserializeAws_json1_1InvalidNextTokenExceptionResponse = async (parsedOutput, context) => {
|
|
1209
|
+
const body = parsedOutput.body;
|
|
1210
|
+
const deserialized = deserializeAws_json1_1InvalidNextTokenException(body, context);
|
|
1211
|
+
const exception = new InvalidNextTokenException({
|
|
1212
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1213
|
+
...deserialized,
|
|
1214
|
+
});
|
|
1215
|
+
return __decorateServiceException(exception, body);
|
|
1216
|
+
};
|
|
1217
|
+
const deserializeAws_json1_1InvalidResourceExceptionResponse = async (parsedOutput, context) => {
|
|
1218
|
+
const body = parsedOutput.body;
|
|
1219
|
+
const deserialized = deserializeAws_json1_1InvalidResourceException(body, context);
|
|
1220
|
+
const exception = new InvalidResourceException({
|
|
1221
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1222
|
+
...deserialized,
|
|
1223
|
+
});
|
|
1224
|
+
return __decorateServiceException(exception, body);
|
|
1225
|
+
};
|
|
1226
|
+
const deserializeAws_json1_1KMSRequestFailedExceptionResponse = async (parsedOutput, context) => {
|
|
1227
|
+
const body = parsedOutput.body;
|
|
1228
|
+
const deserialized = deserializeAws_json1_1KMSRequestFailedException(body, context);
|
|
1229
|
+
const exception = new KMSRequestFailedException({
|
|
1230
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1231
|
+
...deserialized,
|
|
1232
|
+
});
|
|
1233
|
+
return __decorateServiceException(exception, body);
|
|
1234
|
+
};
|
|
1235
|
+
const deserializeAws_json1_1ReturnShippingLabelAlreadyExistsExceptionResponse = async (parsedOutput, context) => {
|
|
1236
|
+
const body = parsedOutput.body;
|
|
1237
|
+
const deserialized = deserializeAws_json1_1ReturnShippingLabelAlreadyExistsException(body, context);
|
|
1238
|
+
const exception = new ReturnShippingLabelAlreadyExistsException({
|
|
1239
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1240
|
+
...deserialized,
|
|
1241
|
+
});
|
|
1242
|
+
return __decorateServiceException(exception, body);
|
|
1243
|
+
};
|
|
1244
|
+
const deserializeAws_json1_1UnsupportedAddressExceptionResponse = async (parsedOutput, context) => {
|
|
1245
|
+
const body = parsedOutput.body;
|
|
1246
|
+
const deserialized = deserializeAws_json1_1UnsupportedAddressException(body, context);
|
|
1247
|
+
const exception = new UnsupportedAddressException({
|
|
1248
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1249
|
+
...deserialized,
|
|
1250
|
+
});
|
|
1251
|
+
return __decorateServiceException(exception, body);
|
|
1252
|
+
};
|
|
1253
|
+
const serializeAws_json1_1Address = (input, context) => {
|
|
1254
|
+
return {
|
|
1255
|
+
...(input.AddressId != null && { AddressId: input.AddressId }),
|
|
1256
|
+
...(input.City != null && { City: input.City }),
|
|
1257
|
+
...(input.Company != null && { Company: input.Company }),
|
|
1258
|
+
...(input.Country != null && { Country: input.Country }),
|
|
1259
|
+
...(input.IsRestricted != null && { IsRestricted: input.IsRestricted }),
|
|
1260
|
+
...(input.Landmark != null && { Landmark: input.Landmark }),
|
|
1261
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1262
|
+
...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }),
|
|
1263
|
+
...(input.PostalCode != null && { PostalCode: input.PostalCode }),
|
|
1264
|
+
...(input.PrefectureOrDistrict != null && { PrefectureOrDistrict: input.PrefectureOrDistrict }),
|
|
1265
|
+
...(input.StateOrProvince != null && { StateOrProvince: input.StateOrProvince }),
|
|
1266
|
+
...(input.Street1 != null && { Street1: input.Street1 }),
|
|
1267
|
+
...(input.Street2 != null && { Street2: input.Street2 }),
|
|
1268
|
+
...(input.Street3 != null && { Street3: input.Street3 }),
|
|
1269
|
+
};
|
|
1270
|
+
};
|
|
1271
|
+
const serializeAws_json1_1CancelClusterRequest = (input, context) => {
|
|
1272
|
+
return {
|
|
1273
|
+
...(input.ClusterId != null && { ClusterId: input.ClusterId }),
|
|
1274
|
+
};
|
|
1275
|
+
};
|
|
1276
|
+
const serializeAws_json1_1CancelJobRequest = (input, context) => {
|
|
1277
|
+
return {
|
|
1278
|
+
...(input.JobId != null && { JobId: input.JobId }),
|
|
1279
|
+
};
|
|
1280
|
+
};
|
|
1281
|
+
const serializeAws_json1_1CreateAddressRequest = (input, context) => {
|
|
1282
|
+
return {
|
|
1283
|
+
...(input.Address != null && { Address: serializeAws_json1_1Address(input.Address, context) }),
|
|
1284
|
+
};
|
|
1285
|
+
};
|
|
1286
|
+
const serializeAws_json1_1CreateClusterRequest = (input, context) => {
|
|
1287
|
+
return {
|
|
1288
|
+
...(input.AddressId != null && { AddressId: input.AddressId }),
|
|
1289
|
+
...(input.Description != null && { Description: input.Description }),
|
|
1290
|
+
...(input.ForwardingAddressId != null && { ForwardingAddressId: input.ForwardingAddressId }),
|
|
1291
|
+
...(input.JobType != null && { JobType: input.JobType }),
|
|
1292
|
+
...(input.KmsKeyARN != null && { KmsKeyARN: input.KmsKeyARN }),
|
|
1293
|
+
...(input.Notification != null && { Notification: serializeAws_json1_1Notification(input.Notification, context) }),
|
|
1294
|
+
...(input.OnDeviceServiceConfiguration != null && {
|
|
1295
|
+
OnDeviceServiceConfiguration: serializeAws_json1_1OnDeviceServiceConfiguration(input.OnDeviceServiceConfiguration, context),
|
|
1296
|
+
}),
|
|
1297
|
+
...(input.RemoteManagement != null && { RemoteManagement: input.RemoteManagement }),
|
|
1298
|
+
...(input.Resources != null && { Resources: serializeAws_json1_1JobResource(input.Resources, context) }),
|
|
1299
|
+
...(input.RoleARN != null && { RoleARN: input.RoleARN }),
|
|
1300
|
+
...(input.ShippingOption != null && { ShippingOption: input.ShippingOption }),
|
|
1301
|
+
...(input.SnowballType != null && { SnowballType: input.SnowballType }),
|
|
1302
|
+
...(input.TaxDocuments != null && { TaxDocuments: serializeAws_json1_1TaxDocuments(input.TaxDocuments, context) }),
|
|
1303
|
+
};
|
|
1304
|
+
};
|
|
1305
|
+
const serializeAws_json1_1CreateJobRequest = (input, context) => {
|
|
1306
|
+
return {
|
|
1307
|
+
...(input.AddressId != null && { AddressId: input.AddressId }),
|
|
1308
|
+
...(input.ClusterId != null && { ClusterId: input.ClusterId }),
|
|
1309
|
+
...(input.Description != null && { Description: input.Description }),
|
|
1310
|
+
...(input.DeviceConfiguration != null && {
|
|
1311
|
+
DeviceConfiguration: serializeAws_json1_1DeviceConfiguration(input.DeviceConfiguration, context),
|
|
1312
|
+
}),
|
|
1313
|
+
...(input.ForwardingAddressId != null && { ForwardingAddressId: input.ForwardingAddressId }),
|
|
1314
|
+
...(input.JobType != null && { JobType: input.JobType }),
|
|
1315
|
+
...(input.KmsKeyARN != null && { KmsKeyARN: input.KmsKeyARN }),
|
|
1316
|
+
...(input.LongTermPricingId != null && { LongTermPricingId: input.LongTermPricingId }),
|
|
1317
|
+
...(input.Notification != null && { Notification: serializeAws_json1_1Notification(input.Notification, context) }),
|
|
1318
|
+
...(input.OnDeviceServiceConfiguration != null && {
|
|
1319
|
+
OnDeviceServiceConfiguration: serializeAws_json1_1OnDeviceServiceConfiguration(input.OnDeviceServiceConfiguration, context),
|
|
1320
|
+
}),
|
|
1321
|
+
...(input.RemoteManagement != null && { RemoteManagement: input.RemoteManagement }),
|
|
1322
|
+
...(input.Resources != null && { Resources: serializeAws_json1_1JobResource(input.Resources, context) }),
|
|
1323
|
+
...(input.RoleARN != null && { RoleARN: input.RoleARN }),
|
|
1324
|
+
...(input.ShippingOption != null && { ShippingOption: input.ShippingOption }),
|
|
1325
|
+
...(input.SnowballCapacityPreference != null && { SnowballCapacityPreference: input.SnowballCapacityPreference }),
|
|
1326
|
+
...(input.SnowballType != null && { SnowballType: input.SnowballType }),
|
|
1327
|
+
...(input.TaxDocuments != null && { TaxDocuments: serializeAws_json1_1TaxDocuments(input.TaxDocuments, context) }),
|
|
1328
|
+
};
|
|
1329
|
+
};
|
|
1330
|
+
const serializeAws_json1_1CreateLongTermPricingRequest = (input, context) => {
|
|
1331
|
+
return {
|
|
1332
|
+
...(input.IsLongTermPricingAutoRenew != null && { IsLongTermPricingAutoRenew: input.IsLongTermPricingAutoRenew }),
|
|
1333
|
+
...(input.LongTermPricingType != null && { LongTermPricingType: input.LongTermPricingType }),
|
|
1334
|
+
...(input.SnowballType != null && { SnowballType: input.SnowballType }),
|
|
1335
|
+
};
|
|
1336
|
+
};
|
|
1337
|
+
const serializeAws_json1_1CreateReturnShippingLabelRequest = (input, context) => {
|
|
1338
|
+
return {
|
|
1339
|
+
...(input.JobId != null && { JobId: input.JobId }),
|
|
1340
|
+
...(input.ShippingOption != null && { ShippingOption: input.ShippingOption }),
|
|
1341
|
+
};
|
|
1342
|
+
};
|
|
1343
|
+
const serializeAws_json1_1DescribeAddressesRequest = (input, context) => {
|
|
1344
|
+
return {
|
|
1345
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1346
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1347
|
+
};
|
|
1348
|
+
};
|
|
1349
|
+
const serializeAws_json1_1DescribeAddressRequest = (input, context) => {
|
|
1350
|
+
return {
|
|
1351
|
+
...(input.AddressId != null && { AddressId: input.AddressId }),
|
|
1352
|
+
};
|
|
1353
|
+
};
|
|
1354
|
+
const serializeAws_json1_1DescribeClusterRequest = (input, context) => {
|
|
1355
|
+
return {
|
|
1356
|
+
...(input.ClusterId != null && { ClusterId: input.ClusterId }),
|
|
1357
|
+
};
|
|
1358
|
+
};
|
|
1359
|
+
const serializeAws_json1_1DescribeJobRequest = (input, context) => {
|
|
1360
|
+
return {
|
|
1361
|
+
...(input.JobId != null && { JobId: input.JobId }),
|
|
1362
|
+
};
|
|
1363
|
+
};
|
|
1364
|
+
const serializeAws_json1_1DescribeReturnShippingLabelRequest = (input, context) => {
|
|
1365
|
+
return {
|
|
1366
|
+
...(input.JobId != null && { JobId: input.JobId }),
|
|
1367
|
+
};
|
|
1368
|
+
};
|
|
1369
|
+
const serializeAws_json1_1DeviceConfiguration = (input, context) => {
|
|
1370
|
+
return {
|
|
1371
|
+
...(input.SnowconeDeviceConfiguration != null && {
|
|
1372
|
+
SnowconeDeviceConfiguration: serializeAws_json1_1SnowconeDeviceConfiguration(input.SnowconeDeviceConfiguration, context),
|
|
1373
|
+
}),
|
|
1374
|
+
};
|
|
1375
|
+
};
|
|
1376
|
+
const serializeAws_json1_1Ec2AmiResource = (input, context) => {
|
|
1377
|
+
return {
|
|
1378
|
+
...(input.AmiId != null && { AmiId: input.AmiId }),
|
|
1379
|
+
...(input.SnowballAmiId != null && { SnowballAmiId: input.SnowballAmiId }),
|
|
1380
|
+
};
|
|
1381
|
+
};
|
|
1382
|
+
const serializeAws_json1_1Ec2AmiResourceList = (input, context) => {
|
|
1839
1383
|
return input
|
|
1840
|
-
.filter(
|
|
1841
|
-
.map(
|
|
1384
|
+
.filter((e) => e != null)
|
|
1385
|
+
.map((entry) => {
|
|
1842
1386
|
return serializeAws_json1_1Ec2AmiResource(entry, context);
|
|
1843
1387
|
});
|
|
1844
1388
|
};
|
|
1845
|
-
|
|
1846
|
-
return
|
|
1389
|
+
const serializeAws_json1_1EventTriggerDefinition = (input, context) => {
|
|
1390
|
+
return {
|
|
1391
|
+
...(input.EventResourceARN != null && { EventResourceARN: input.EventResourceARN }),
|
|
1392
|
+
};
|
|
1847
1393
|
};
|
|
1848
|
-
|
|
1394
|
+
const serializeAws_json1_1EventTriggerDefinitionList = (input, context) => {
|
|
1849
1395
|
return input
|
|
1850
|
-
.filter(
|
|
1851
|
-
.map(
|
|
1396
|
+
.filter((e) => e != null)
|
|
1397
|
+
.map((entry) => {
|
|
1852
1398
|
return serializeAws_json1_1EventTriggerDefinition(entry, context);
|
|
1853
1399
|
});
|
|
1854
1400
|
};
|
|
1855
|
-
|
|
1856
|
-
return
|
|
1401
|
+
const serializeAws_json1_1GetJobManifestRequest = (input, context) => {
|
|
1402
|
+
return {
|
|
1403
|
+
...(input.JobId != null && { JobId: input.JobId }),
|
|
1404
|
+
};
|
|
1857
1405
|
};
|
|
1858
|
-
|
|
1859
|
-
return
|
|
1406
|
+
const serializeAws_json1_1GetJobUnlockCodeRequest = (input, context) => {
|
|
1407
|
+
return {
|
|
1408
|
+
...(input.JobId != null && { JobId: input.JobId }),
|
|
1409
|
+
};
|
|
1860
1410
|
};
|
|
1861
|
-
|
|
1411
|
+
const serializeAws_json1_1GetSnowballUsageRequest = (input, context) => {
|
|
1862
1412
|
return {};
|
|
1863
1413
|
};
|
|
1864
|
-
|
|
1865
|
-
return
|
|
1414
|
+
const serializeAws_json1_1GetSoftwareUpdatesRequest = (input, context) => {
|
|
1415
|
+
return {
|
|
1416
|
+
...(input.JobId != null && { JobId: input.JobId }),
|
|
1417
|
+
};
|
|
1866
1418
|
};
|
|
1867
|
-
|
|
1868
|
-
return
|
|
1419
|
+
const serializeAws_json1_1INDTaxDocuments = (input, context) => {
|
|
1420
|
+
return {
|
|
1421
|
+
...(input.GSTIN != null && { GSTIN: input.GSTIN }),
|
|
1422
|
+
};
|
|
1869
1423
|
};
|
|
1870
|
-
|
|
1871
|
-
return
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1424
|
+
const serializeAws_json1_1JobResource = (input, context) => {
|
|
1425
|
+
return {
|
|
1426
|
+
...(input.Ec2AmiResources != null && {
|
|
1427
|
+
Ec2AmiResources: serializeAws_json1_1Ec2AmiResourceList(input.Ec2AmiResources, context),
|
|
1428
|
+
}),
|
|
1429
|
+
...(input.LambdaResources != null && {
|
|
1430
|
+
LambdaResources: serializeAws_json1_1LambdaResourceList(input.LambdaResources, context),
|
|
1431
|
+
}),
|
|
1432
|
+
...(input.S3Resources != null && { S3Resources: serializeAws_json1_1S3ResourceList(input.S3Resources, context) }),
|
|
1433
|
+
};
|
|
1876
1434
|
};
|
|
1877
|
-
|
|
1435
|
+
const serializeAws_json1_1JobStateList = (input, context) => {
|
|
1878
1436
|
return input
|
|
1879
|
-
.filter(
|
|
1880
|
-
.map(
|
|
1437
|
+
.filter((e) => e != null)
|
|
1438
|
+
.map((entry) => {
|
|
1881
1439
|
return entry;
|
|
1882
1440
|
});
|
|
1883
1441
|
};
|
|
1884
|
-
|
|
1885
|
-
return
|
|
1442
|
+
const serializeAws_json1_1KeyRange = (input, context) => {
|
|
1443
|
+
return {
|
|
1444
|
+
...(input.BeginMarker != null && { BeginMarker: input.BeginMarker }),
|
|
1445
|
+
...(input.EndMarker != null && { EndMarker: input.EndMarker }),
|
|
1446
|
+
};
|
|
1886
1447
|
};
|
|
1887
|
-
|
|
1888
|
-
return
|
|
1889
|
-
|
|
1890
|
-
|
|
1448
|
+
const serializeAws_json1_1LambdaResource = (input, context) => {
|
|
1449
|
+
return {
|
|
1450
|
+
...(input.EventTriggers != null && {
|
|
1451
|
+
EventTriggers: serializeAws_json1_1EventTriggerDefinitionList(input.EventTriggers, context),
|
|
1452
|
+
}),
|
|
1453
|
+
...(input.LambdaArn != null && { LambdaArn: input.LambdaArn }),
|
|
1454
|
+
};
|
|
1891
1455
|
};
|
|
1892
|
-
|
|
1456
|
+
const serializeAws_json1_1LambdaResourceList = (input, context) => {
|
|
1893
1457
|
return input
|
|
1894
|
-
.filter(
|
|
1895
|
-
.map(
|
|
1458
|
+
.filter((e) => e != null)
|
|
1459
|
+
.map((entry) => {
|
|
1896
1460
|
return serializeAws_json1_1LambdaResource(entry, context);
|
|
1897
1461
|
});
|
|
1898
1462
|
};
|
|
1899
|
-
|
|
1900
|
-
return
|
|
1463
|
+
const serializeAws_json1_1ListClusterJobsRequest = (input, context) => {
|
|
1464
|
+
return {
|
|
1465
|
+
...(input.ClusterId != null && { ClusterId: input.ClusterId }),
|
|
1466
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1467
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1468
|
+
};
|
|
1901
1469
|
};
|
|
1902
|
-
|
|
1903
|
-
return
|
|
1470
|
+
const serializeAws_json1_1ListClustersRequest = (input, context) => {
|
|
1471
|
+
return {
|
|
1472
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1473
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1474
|
+
};
|
|
1904
1475
|
};
|
|
1905
|
-
|
|
1906
|
-
return
|
|
1476
|
+
const serializeAws_json1_1ListCompatibleImagesRequest = (input, context) => {
|
|
1477
|
+
return {
|
|
1478
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1479
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1480
|
+
};
|
|
1907
1481
|
};
|
|
1908
|
-
|
|
1909
|
-
return
|
|
1482
|
+
const serializeAws_json1_1ListJobsRequest = (input, context) => {
|
|
1483
|
+
return {
|
|
1484
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1485
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1486
|
+
};
|
|
1910
1487
|
};
|
|
1911
|
-
|
|
1912
|
-
return
|
|
1488
|
+
const serializeAws_json1_1ListLongTermPricingRequest = (input, context) => {
|
|
1489
|
+
return {
|
|
1490
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1491
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1492
|
+
};
|
|
1913
1493
|
};
|
|
1914
|
-
|
|
1915
|
-
return
|
|
1494
|
+
const serializeAws_json1_1NFSOnDeviceServiceConfiguration = (input, context) => {
|
|
1495
|
+
return {
|
|
1496
|
+
...(input.StorageLimit != null && { StorageLimit: input.StorageLimit }),
|
|
1497
|
+
...(input.StorageUnit != null && { StorageUnit: input.StorageUnit }),
|
|
1498
|
+
};
|
|
1916
1499
|
};
|
|
1917
|
-
|
|
1918
|
-
return
|
|
1919
|
-
|
|
1920
|
-
|
|
1500
|
+
const serializeAws_json1_1Notification = (input, context) => {
|
|
1501
|
+
return {
|
|
1502
|
+
...(input.JobStatesToNotify != null && {
|
|
1503
|
+
JobStatesToNotify: serializeAws_json1_1JobStateList(input.JobStatesToNotify, context),
|
|
1504
|
+
}),
|
|
1505
|
+
...(input.NotifyAll != null && { NotifyAll: input.NotifyAll }),
|
|
1506
|
+
...(input.SnsTopicARN != null && { SnsTopicARN: input.SnsTopicARN }),
|
|
1507
|
+
};
|
|
1921
1508
|
};
|
|
1922
|
-
|
|
1923
|
-
return
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1509
|
+
const serializeAws_json1_1OnDeviceServiceConfiguration = (input, context) => {
|
|
1510
|
+
return {
|
|
1511
|
+
...(input.NFSOnDeviceService != null && {
|
|
1512
|
+
NFSOnDeviceService: serializeAws_json1_1NFSOnDeviceServiceConfiguration(input.NFSOnDeviceService, context),
|
|
1513
|
+
}),
|
|
1514
|
+
...(input.TGWOnDeviceService != null && {
|
|
1515
|
+
TGWOnDeviceService: serializeAws_json1_1TGWOnDeviceServiceConfiguration(input.TGWOnDeviceService, context),
|
|
1516
|
+
}),
|
|
1517
|
+
};
|
|
1928
1518
|
};
|
|
1929
|
-
|
|
1930
|
-
return
|
|
1931
|
-
|
|
1932
|
-
|
|
1519
|
+
const serializeAws_json1_1S3Resource = (input, context) => {
|
|
1520
|
+
return {
|
|
1521
|
+
...(input.BucketArn != null && { BucketArn: input.BucketArn }),
|
|
1522
|
+
...(input.KeyRange != null && { KeyRange: serializeAws_json1_1KeyRange(input.KeyRange, context) }),
|
|
1523
|
+
...(input.TargetOnDeviceServices != null && {
|
|
1524
|
+
TargetOnDeviceServices: serializeAws_json1_1TargetOnDeviceServiceList(input.TargetOnDeviceServices, context),
|
|
1525
|
+
}),
|
|
1526
|
+
};
|
|
1933
1527
|
};
|
|
1934
|
-
|
|
1528
|
+
const serializeAws_json1_1S3ResourceList = (input, context) => {
|
|
1935
1529
|
return input
|
|
1936
|
-
.filter(
|
|
1937
|
-
.map(
|
|
1530
|
+
.filter((e) => e != null)
|
|
1531
|
+
.map((entry) => {
|
|
1938
1532
|
return serializeAws_json1_1S3Resource(entry, context);
|
|
1939
1533
|
});
|
|
1940
1534
|
};
|
|
1941
|
-
|
|
1942
|
-
return
|
|
1943
|
-
|
|
1944
|
-
|
|
1535
|
+
const serializeAws_json1_1SnowconeDeviceConfiguration = (input, context) => {
|
|
1536
|
+
return {
|
|
1537
|
+
...(input.WirelessConnection != null && {
|
|
1538
|
+
WirelessConnection: serializeAws_json1_1WirelessConnection(input.WirelessConnection, context),
|
|
1539
|
+
}),
|
|
1540
|
+
};
|
|
1945
1541
|
};
|
|
1946
|
-
|
|
1947
|
-
return
|
|
1542
|
+
const serializeAws_json1_1TargetOnDeviceService = (input, context) => {
|
|
1543
|
+
return {
|
|
1544
|
+
...(input.ServiceName != null && { ServiceName: input.ServiceName }),
|
|
1545
|
+
...(input.TransferOption != null && { TransferOption: input.TransferOption }),
|
|
1546
|
+
};
|
|
1948
1547
|
};
|
|
1949
|
-
|
|
1548
|
+
const serializeAws_json1_1TargetOnDeviceServiceList = (input, context) => {
|
|
1950
1549
|
return input
|
|
1951
|
-
.filter(
|
|
1952
|
-
.map(
|
|
1550
|
+
.filter((e) => e != null)
|
|
1551
|
+
.map((entry) => {
|
|
1953
1552
|
return serializeAws_json1_1TargetOnDeviceService(entry, context);
|
|
1954
1553
|
});
|
|
1955
1554
|
};
|
|
1956
|
-
|
|
1957
|
-
return
|
|
1555
|
+
const serializeAws_json1_1TaxDocuments = (input, context) => {
|
|
1556
|
+
return {
|
|
1557
|
+
...(input.IND != null && { IND: serializeAws_json1_1INDTaxDocuments(input.IND, context) }),
|
|
1558
|
+
};
|
|
1958
1559
|
};
|
|
1959
|
-
|
|
1960
|
-
return
|
|
1560
|
+
const serializeAws_json1_1TGWOnDeviceServiceConfiguration = (input, context) => {
|
|
1561
|
+
return {
|
|
1562
|
+
...(input.StorageLimit != null && { StorageLimit: input.StorageLimit }),
|
|
1563
|
+
...(input.StorageUnit != null && { StorageUnit: input.StorageUnit }),
|
|
1564
|
+
};
|
|
1961
1565
|
};
|
|
1962
|
-
|
|
1963
|
-
return
|
|
1964
|
-
|
|
1965
|
-
|
|
1566
|
+
const serializeAws_json1_1UpdateClusterRequest = (input, context) => {
|
|
1567
|
+
return {
|
|
1568
|
+
...(input.AddressId != null && { AddressId: input.AddressId }),
|
|
1569
|
+
...(input.ClusterId != null && { ClusterId: input.ClusterId }),
|
|
1570
|
+
...(input.Description != null && { Description: input.Description }),
|
|
1571
|
+
...(input.ForwardingAddressId != null && { ForwardingAddressId: input.ForwardingAddressId }),
|
|
1572
|
+
...(input.Notification != null && { Notification: serializeAws_json1_1Notification(input.Notification, context) }),
|
|
1573
|
+
...(input.OnDeviceServiceConfiguration != null && {
|
|
1574
|
+
OnDeviceServiceConfiguration: serializeAws_json1_1OnDeviceServiceConfiguration(input.OnDeviceServiceConfiguration, context),
|
|
1575
|
+
}),
|
|
1576
|
+
...(input.Resources != null && { Resources: serializeAws_json1_1JobResource(input.Resources, context) }),
|
|
1577
|
+
...(input.RoleARN != null && { RoleARN: input.RoleARN }),
|
|
1578
|
+
...(input.ShippingOption != null && { ShippingOption: input.ShippingOption }),
|
|
1579
|
+
};
|
|
1966
1580
|
};
|
|
1967
|
-
|
|
1968
|
-
return
|
|
1969
|
-
|
|
1970
|
-
|
|
1581
|
+
const serializeAws_json1_1UpdateJobRequest = (input, context) => {
|
|
1582
|
+
return {
|
|
1583
|
+
...(input.AddressId != null && { AddressId: input.AddressId }),
|
|
1584
|
+
...(input.Description != null && { Description: input.Description }),
|
|
1585
|
+
...(input.ForwardingAddressId != null && { ForwardingAddressId: input.ForwardingAddressId }),
|
|
1586
|
+
...(input.JobId != null && { JobId: input.JobId }),
|
|
1587
|
+
...(input.Notification != null && { Notification: serializeAws_json1_1Notification(input.Notification, context) }),
|
|
1588
|
+
...(input.OnDeviceServiceConfiguration != null && {
|
|
1589
|
+
OnDeviceServiceConfiguration: serializeAws_json1_1OnDeviceServiceConfiguration(input.OnDeviceServiceConfiguration, context),
|
|
1590
|
+
}),
|
|
1591
|
+
...(input.Resources != null && { Resources: serializeAws_json1_1JobResource(input.Resources, context) }),
|
|
1592
|
+
...(input.RoleARN != null && { RoleARN: input.RoleARN }),
|
|
1593
|
+
...(input.ShippingOption != null && { ShippingOption: input.ShippingOption }),
|
|
1594
|
+
...(input.SnowballCapacityPreference != null && { SnowballCapacityPreference: input.SnowballCapacityPreference }),
|
|
1595
|
+
};
|
|
1971
1596
|
};
|
|
1972
|
-
|
|
1973
|
-
return
|
|
1597
|
+
const serializeAws_json1_1UpdateJobShipmentStateRequest = (input, context) => {
|
|
1598
|
+
return {
|
|
1599
|
+
...(input.JobId != null && { JobId: input.JobId }),
|
|
1600
|
+
...(input.ShipmentState != null && { ShipmentState: input.ShipmentState }),
|
|
1601
|
+
};
|
|
1974
1602
|
};
|
|
1975
|
-
|
|
1976
|
-
return
|
|
1603
|
+
const serializeAws_json1_1UpdateLongTermPricingRequest = (input, context) => {
|
|
1604
|
+
return {
|
|
1605
|
+
...(input.IsLongTermPricingAutoRenew != null && { IsLongTermPricingAutoRenew: input.IsLongTermPricingAutoRenew }),
|
|
1606
|
+
...(input.LongTermPricingId != null && { LongTermPricingId: input.LongTermPricingId }),
|
|
1607
|
+
...(input.ReplacementJob != null && { ReplacementJob: input.ReplacementJob }),
|
|
1608
|
+
};
|
|
1977
1609
|
};
|
|
1978
|
-
|
|
1979
|
-
return
|
|
1610
|
+
const serializeAws_json1_1WirelessConnection = (input, context) => {
|
|
1611
|
+
return {
|
|
1612
|
+
...(input.IsWifiEnabled != null && { IsWifiEnabled: input.IsWifiEnabled }),
|
|
1613
|
+
};
|
|
1980
1614
|
};
|
|
1981
|
-
|
|
1615
|
+
const deserializeAws_json1_1Address = (output, context) => {
|
|
1982
1616
|
return {
|
|
1983
1617
|
AddressId: __expectString(output.AddressId),
|
|
1984
1618
|
City: __expectString(output.City),
|
|
@@ -1996,10 +1630,10 @@ var deserializeAws_json1_1Address = function (output, context) {
|
|
|
1996
1630
|
Street3: __expectString(output.Street3),
|
|
1997
1631
|
};
|
|
1998
1632
|
};
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
.filter(
|
|
2002
|
-
.map(
|
|
1633
|
+
const deserializeAws_json1_1AddressList = (output, context) => {
|
|
1634
|
+
const retVal = (output || [])
|
|
1635
|
+
.filter((e) => e != null)
|
|
1636
|
+
.map((entry) => {
|
|
2003
1637
|
if (entry === null) {
|
|
2004
1638
|
return null;
|
|
2005
1639
|
}
|
|
@@ -2007,18 +1641,18 @@ var deserializeAws_json1_1AddressList = function (output, context) {
|
|
|
2007
1641
|
});
|
|
2008
1642
|
return retVal;
|
|
2009
1643
|
};
|
|
2010
|
-
|
|
1644
|
+
const deserializeAws_json1_1CancelClusterResult = (output, context) => {
|
|
2011
1645
|
return {};
|
|
2012
1646
|
};
|
|
2013
|
-
|
|
1647
|
+
const deserializeAws_json1_1CancelJobResult = (output, context) => {
|
|
2014
1648
|
return {};
|
|
2015
1649
|
};
|
|
2016
|
-
|
|
1650
|
+
const deserializeAws_json1_1ClusterLimitExceededException = (output, context) => {
|
|
2017
1651
|
return {
|
|
2018
1652
|
Message: __expectString(output.Message),
|
|
2019
1653
|
};
|
|
2020
1654
|
};
|
|
2021
|
-
|
|
1655
|
+
const deserializeAws_json1_1ClusterListEntry = (output, context) => {
|
|
2022
1656
|
return {
|
|
2023
1657
|
ClusterId: __expectString(output.ClusterId),
|
|
2024
1658
|
ClusterState: __expectString(output.ClusterState),
|
|
@@ -2028,10 +1662,10 @@ var deserializeAws_json1_1ClusterListEntry = function (output, context) {
|
|
|
2028
1662
|
Description: __expectString(output.Description),
|
|
2029
1663
|
};
|
|
2030
1664
|
};
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
.filter(
|
|
2034
|
-
.map(
|
|
1665
|
+
const deserializeAws_json1_1ClusterListEntryList = (output, context) => {
|
|
1666
|
+
const retVal = (output || [])
|
|
1667
|
+
.filter((e) => e != null)
|
|
1668
|
+
.map((entry) => {
|
|
2035
1669
|
if (entry === null) {
|
|
2036
1670
|
return null;
|
|
2037
1671
|
}
|
|
@@ -2039,7 +1673,7 @@ var deserializeAws_json1_1ClusterListEntryList = function (output, context) {
|
|
|
2039
1673
|
});
|
|
2040
1674
|
return retVal;
|
|
2041
1675
|
};
|
|
2042
|
-
|
|
1676
|
+
const deserializeAws_json1_1ClusterMetadata = (output, context) => {
|
|
2043
1677
|
return {
|
|
2044
1678
|
AddressId: __expectString(output.AddressId),
|
|
2045
1679
|
ClusterId: __expectString(output.ClusterId),
|
|
@@ -2062,16 +1696,16 @@ var deserializeAws_json1_1ClusterMetadata = function (output, context) {
|
|
|
2062
1696
|
TaxDocuments: output.TaxDocuments != null ? deserializeAws_json1_1TaxDocuments(output.TaxDocuments, context) : undefined,
|
|
2063
1697
|
};
|
|
2064
1698
|
};
|
|
2065
|
-
|
|
1699
|
+
const deserializeAws_json1_1CompatibleImage = (output, context) => {
|
|
2066
1700
|
return {
|
|
2067
1701
|
AmiId: __expectString(output.AmiId),
|
|
2068
1702
|
Name: __expectString(output.Name),
|
|
2069
1703
|
};
|
|
2070
1704
|
};
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
.filter(
|
|
2074
|
-
.map(
|
|
1705
|
+
const deserializeAws_json1_1CompatibleImageList = (output, context) => {
|
|
1706
|
+
const retVal = (output || [])
|
|
1707
|
+
.filter((e) => e != null)
|
|
1708
|
+
.map((entry) => {
|
|
2075
1709
|
if (entry === null) {
|
|
2076
1710
|
return null;
|
|
2077
1711
|
}
|
|
@@ -2079,38 +1713,38 @@ var deserializeAws_json1_1CompatibleImageList = function (output, context) {
|
|
|
2079
1713
|
});
|
|
2080
1714
|
return retVal;
|
|
2081
1715
|
};
|
|
2082
|
-
|
|
1716
|
+
const deserializeAws_json1_1ConflictException = (output, context) => {
|
|
2083
1717
|
return {
|
|
2084
1718
|
ConflictResource: __expectString(output.ConflictResource),
|
|
2085
1719
|
Message: __expectString(output.Message),
|
|
2086
1720
|
};
|
|
2087
1721
|
};
|
|
2088
|
-
|
|
1722
|
+
const deserializeAws_json1_1CreateAddressResult = (output, context) => {
|
|
2089
1723
|
return {
|
|
2090
1724
|
AddressId: __expectString(output.AddressId),
|
|
2091
1725
|
};
|
|
2092
1726
|
};
|
|
2093
|
-
|
|
1727
|
+
const deserializeAws_json1_1CreateClusterResult = (output, context) => {
|
|
2094
1728
|
return {
|
|
2095
1729
|
ClusterId: __expectString(output.ClusterId),
|
|
2096
1730
|
};
|
|
2097
1731
|
};
|
|
2098
|
-
|
|
1732
|
+
const deserializeAws_json1_1CreateJobResult = (output, context) => {
|
|
2099
1733
|
return {
|
|
2100
1734
|
JobId: __expectString(output.JobId),
|
|
2101
1735
|
};
|
|
2102
1736
|
};
|
|
2103
|
-
|
|
1737
|
+
const deserializeAws_json1_1CreateLongTermPricingResult = (output, context) => {
|
|
2104
1738
|
return {
|
|
2105
1739
|
LongTermPricingId: __expectString(output.LongTermPricingId),
|
|
2106
1740
|
};
|
|
2107
1741
|
};
|
|
2108
|
-
|
|
1742
|
+
const deserializeAws_json1_1CreateReturnShippingLabelResult = (output, context) => {
|
|
2109
1743
|
return {
|
|
2110
1744
|
Status: __expectString(output.Status),
|
|
2111
1745
|
};
|
|
2112
1746
|
};
|
|
2113
|
-
|
|
1747
|
+
const deserializeAws_json1_1DataTransfer = (output, context) => {
|
|
2114
1748
|
return {
|
|
2115
1749
|
BytesTransferred: __expectLong(output.BytesTransferred),
|
|
2116
1750
|
ObjectsTransferred: __expectLong(output.ObjectsTransferred),
|
|
@@ -2118,31 +1752,31 @@ var deserializeAws_json1_1DataTransfer = function (output, context) {
|
|
|
2118
1752
|
TotalObjects: __expectLong(output.TotalObjects),
|
|
2119
1753
|
};
|
|
2120
1754
|
};
|
|
2121
|
-
|
|
1755
|
+
const deserializeAws_json1_1DescribeAddressesResult = (output, context) => {
|
|
2122
1756
|
return {
|
|
2123
1757
|
Addresses: output.Addresses != null ? deserializeAws_json1_1AddressList(output.Addresses, context) : undefined,
|
|
2124
1758
|
NextToken: __expectString(output.NextToken),
|
|
2125
1759
|
};
|
|
2126
1760
|
};
|
|
2127
|
-
|
|
1761
|
+
const deserializeAws_json1_1DescribeAddressResult = (output, context) => {
|
|
2128
1762
|
return {
|
|
2129
1763
|
Address: output.Address != null ? deserializeAws_json1_1Address(output.Address, context) : undefined,
|
|
2130
1764
|
};
|
|
2131
1765
|
};
|
|
2132
|
-
|
|
1766
|
+
const deserializeAws_json1_1DescribeClusterResult = (output, context) => {
|
|
2133
1767
|
return {
|
|
2134
1768
|
ClusterMetadata: output.ClusterMetadata != null
|
|
2135
1769
|
? deserializeAws_json1_1ClusterMetadata(output.ClusterMetadata, context)
|
|
2136
1770
|
: undefined,
|
|
2137
1771
|
};
|
|
2138
1772
|
};
|
|
2139
|
-
|
|
1773
|
+
const deserializeAws_json1_1DescribeJobResult = (output, context) => {
|
|
2140
1774
|
return {
|
|
2141
1775
|
JobMetadata: output.JobMetadata != null ? deserializeAws_json1_1JobMetadata(output.JobMetadata, context) : undefined,
|
|
2142
1776
|
SubJobMetadata: output.SubJobMetadata != null ? deserializeAws_json1_1JobMetadataList(output.SubJobMetadata, context) : undefined,
|
|
2143
1777
|
};
|
|
2144
1778
|
};
|
|
2145
|
-
|
|
1779
|
+
const deserializeAws_json1_1DescribeReturnShippingLabelResult = (output, context) => {
|
|
2146
1780
|
return {
|
|
2147
1781
|
ExpirationDate: output.ExpirationDate != null
|
|
2148
1782
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpirationDate)))
|
|
@@ -2151,23 +1785,23 @@ var deserializeAws_json1_1DescribeReturnShippingLabelResult = function (output,
|
|
|
2151
1785
|
Status: __expectString(output.Status),
|
|
2152
1786
|
};
|
|
2153
1787
|
};
|
|
2154
|
-
|
|
1788
|
+
const deserializeAws_json1_1DeviceConfiguration = (output, context) => {
|
|
2155
1789
|
return {
|
|
2156
1790
|
SnowconeDeviceConfiguration: output.SnowconeDeviceConfiguration != null
|
|
2157
1791
|
? deserializeAws_json1_1SnowconeDeviceConfiguration(output.SnowconeDeviceConfiguration, context)
|
|
2158
1792
|
: undefined,
|
|
2159
1793
|
};
|
|
2160
1794
|
};
|
|
2161
|
-
|
|
1795
|
+
const deserializeAws_json1_1Ec2AmiResource = (output, context) => {
|
|
2162
1796
|
return {
|
|
2163
1797
|
AmiId: __expectString(output.AmiId),
|
|
2164
1798
|
SnowballAmiId: __expectString(output.SnowballAmiId),
|
|
2165
1799
|
};
|
|
2166
1800
|
};
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
.filter(
|
|
2170
|
-
.map(
|
|
1801
|
+
const deserializeAws_json1_1Ec2AmiResourceList = (output, context) => {
|
|
1802
|
+
const retVal = (output || [])
|
|
1803
|
+
.filter((e) => e != null)
|
|
1804
|
+
.map((entry) => {
|
|
2171
1805
|
if (entry === null) {
|
|
2172
1806
|
return null;
|
|
2173
1807
|
}
|
|
@@ -2175,20 +1809,20 @@ var deserializeAws_json1_1Ec2AmiResourceList = function (output, context) {
|
|
|
2175
1809
|
});
|
|
2176
1810
|
return retVal;
|
|
2177
1811
|
};
|
|
2178
|
-
|
|
1812
|
+
const deserializeAws_json1_1Ec2RequestFailedException = (output, context) => {
|
|
2179
1813
|
return {
|
|
2180
1814
|
Message: __expectString(output.Message),
|
|
2181
1815
|
};
|
|
2182
1816
|
};
|
|
2183
|
-
|
|
1817
|
+
const deserializeAws_json1_1EventTriggerDefinition = (output, context) => {
|
|
2184
1818
|
return {
|
|
2185
1819
|
EventResourceARN: __expectString(output.EventResourceARN),
|
|
2186
1820
|
};
|
|
2187
1821
|
};
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
.filter(
|
|
2191
|
-
.map(
|
|
1822
|
+
const deserializeAws_json1_1EventTriggerDefinitionList = (output, context) => {
|
|
1823
|
+
const retVal = (output || [])
|
|
1824
|
+
.filter((e) => e != null)
|
|
1825
|
+
.map((entry) => {
|
|
2192
1826
|
if (entry === null) {
|
|
2193
1827
|
return null;
|
|
2194
1828
|
}
|
|
@@ -2196,59 +1830,59 @@ var deserializeAws_json1_1EventTriggerDefinitionList = function (output, context
|
|
|
2196
1830
|
});
|
|
2197
1831
|
return retVal;
|
|
2198
1832
|
};
|
|
2199
|
-
|
|
1833
|
+
const deserializeAws_json1_1GetJobManifestResult = (output, context) => {
|
|
2200
1834
|
return {
|
|
2201
1835
|
ManifestURI: __expectString(output.ManifestURI),
|
|
2202
1836
|
};
|
|
2203
1837
|
};
|
|
2204
|
-
|
|
1838
|
+
const deserializeAws_json1_1GetJobUnlockCodeResult = (output, context) => {
|
|
2205
1839
|
return {
|
|
2206
1840
|
UnlockCode: __expectString(output.UnlockCode),
|
|
2207
1841
|
};
|
|
2208
1842
|
};
|
|
2209
|
-
|
|
1843
|
+
const deserializeAws_json1_1GetSnowballUsageResult = (output, context) => {
|
|
2210
1844
|
return {
|
|
2211
1845
|
SnowballLimit: __expectInt32(output.SnowballLimit),
|
|
2212
1846
|
SnowballsInUse: __expectInt32(output.SnowballsInUse),
|
|
2213
1847
|
};
|
|
2214
1848
|
};
|
|
2215
|
-
|
|
1849
|
+
const deserializeAws_json1_1GetSoftwareUpdatesResult = (output, context) => {
|
|
2216
1850
|
return {
|
|
2217
1851
|
UpdatesURI: __expectString(output.UpdatesURI),
|
|
2218
1852
|
};
|
|
2219
1853
|
};
|
|
2220
|
-
|
|
1854
|
+
const deserializeAws_json1_1INDTaxDocuments = (output, context) => {
|
|
2221
1855
|
return {
|
|
2222
1856
|
GSTIN: __expectString(output.GSTIN),
|
|
2223
1857
|
};
|
|
2224
1858
|
};
|
|
2225
|
-
|
|
1859
|
+
const deserializeAws_json1_1InvalidAddressException = (output, context) => {
|
|
2226
1860
|
return {
|
|
2227
1861
|
Message: __expectString(output.Message),
|
|
2228
1862
|
};
|
|
2229
1863
|
};
|
|
2230
|
-
|
|
1864
|
+
const deserializeAws_json1_1InvalidInputCombinationException = (output, context) => {
|
|
2231
1865
|
return {
|
|
2232
1866
|
Message: __expectString(output.Message),
|
|
2233
1867
|
};
|
|
2234
1868
|
};
|
|
2235
|
-
|
|
1869
|
+
const deserializeAws_json1_1InvalidJobStateException = (output, context) => {
|
|
2236
1870
|
return {
|
|
2237
1871
|
Message: __expectString(output.Message),
|
|
2238
1872
|
};
|
|
2239
1873
|
};
|
|
2240
|
-
|
|
1874
|
+
const deserializeAws_json1_1InvalidNextTokenException = (output, context) => {
|
|
2241
1875
|
return {
|
|
2242
1876
|
Message: __expectString(output.Message),
|
|
2243
1877
|
};
|
|
2244
1878
|
};
|
|
2245
|
-
|
|
1879
|
+
const deserializeAws_json1_1InvalidResourceException = (output, context) => {
|
|
2246
1880
|
return {
|
|
2247
1881
|
Message: __expectString(output.Message),
|
|
2248
1882
|
ResourceType: __expectString(output.ResourceType),
|
|
2249
1883
|
};
|
|
2250
1884
|
};
|
|
2251
|
-
|
|
1885
|
+
const deserializeAws_json1_1JobListEntry = (output, context) => {
|
|
2252
1886
|
return {
|
|
2253
1887
|
CreationDate: output.CreationDate != null
|
|
2254
1888
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate)))
|
|
@@ -2261,10 +1895,10 @@ var deserializeAws_json1_1JobListEntry = function (output, context) {
|
|
|
2261
1895
|
SnowballType: __expectString(output.SnowballType),
|
|
2262
1896
|
};
|
|
2263
1897
|
};
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
.filter(
|
|
2267
|
-
.map(
|
|
1898
|
+
const deserializeAws_json1_1JobListEntryList = (output, context) => {
|
|
1899
|
+
const retVal = (output || [])
|
|
1900
|
+
.filter((e) => e != null)
|
|
1901
|
+
.map((entry) => {
|
|
2268
1902
|
if (entry === null) {
|
|
2269
1903
|
return null;
|
|
2270
1904
|
}
|
|
@@ -2272,14 +1906,14 @@ var deserializeAws_json1_1JobListEntryList = function (output, context) {
|
|
|
2272
1906
|
});
|
|
2273
1907
|
return retVal;
|
|
2274
1908
|
};
|
|
2275
|
-
|
|
1909
|
+
const deserializeAws_json1_1JobLogs = (output, context) => {
|
|
2276
1910
|
return {
|
|
2277
1911
|
JobCompletionReportURI: __expectString(output.JobCompletionReportURI),
|
|
2278
1912
|
JobFailureLogURI: __expectString(output.JobFailureLogURI),
|
|
2279
1913
|
JobSuccessLogURI: __expectString(output.JobSuccessLogURI),
|
|
2280
1914
|
};
|
|
2281
1915
|
};
|
|
2282
|
-
|
|
1916
|
+
const deserializeAws_json1_1JobMetadata = (output, context) => {
|
|
2283
1917
|
return {
|
|
2284
1918
|
AddressId: __expectString(output.AddressId),
|
|
2285
1919
|
ClusterId: __expectString(output.ClusterId),
|
|
@@ -2315,10 +1949,10 @@ var deserializeAws_json1_1JobMetadata = function (output, context) {
|
|
|
2315
1949
|
TaxDocuments: output.TaxDocuments != null ? deserializeAws_json1_1TaxDocuments(output.TaxDocuments, context) : undefined,
|
|
2316
1950
|
};
|
|
2317
1951
|
};
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
.filter(
|
|
2321
|
-
.map(
|
|
1952
|
+
const deserializeAws_json1_1JobMetadataList = (output, context) => {
|
|
1953
|
+
const retVal = (output || [])
|
|
1954
|
+
.filter((e) => e != null)
|
|
1955
|
+
.map((entry) => {
|
|
2322
1956
|
if (entry === null) {
|
|
2323
1957
|
return null;
|
|
2324
1958
|
}
|
|
@@ -2326,7 +1960,7 @@ var deserializeAws_json1_1JobMetadataList = function (output, context) {
|
|
|
2326
1960
|
});
|
|
2327
1961
|
return retVal;
|
|
2328
1962
|
};
|
|
2329
|
-
|
|
1963
|
+
const deserializeAws_json1_1JobResource = (output, context) => {
|
|
2330
1964
|
return {
|
|
2331
1965
|
Ec2AmiResources: output.Ec2AmiResources != null
|
|
2332
1966
|
? deserializeAws_json1_1Ec2AmiResourceList(output.Ec2AmiResources, context)
|
|
@@ -2337,10 +1971,10 @@ var deserializeAws_json1_1JobResource = function (output, context) {
|
|
|
2337
1971
|
S3Resources: output.S3Resources != null ? deserializeAws_json1_1S3ResourceList(output.S3Resources, context) : undefined,
|
|
2338
1972
|
};
|
|
2339
1973
|
};
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
.filter(
|
|
2343
|
-
.map(
|
|
1974
|
+
const deserializeAws_json1_1JobStateList = (output, context) => {
|
|
1975
|
+
const retVal = (output || [])
|
|
1976
|
+
.filter((e) => e != null)
|
|
1977
|
+
.map((entry) => {
|
|
2344
1978
|
if (entry === null) {
|
|
2345
1979
|
return null;
|
|
2346
1980
|
}
|
|
@@ -2348,18 +1982,18 @@ var deserializeAws_json1_1JobStateList = function (output, context) {
|
|
|
2348
1982
|
});
|
|
2349
1983
|
return retVal;
|
|
2350
1984
|
};
|
|
2351
|
-
|
|
1985
|
+
const deserializeAws_json1_1KeyRange = (output, context) => {
|
|
2352
1986
|
return {
|
|
2353
1987
|
BeginMarker: __expectString(output.BeginMarker),
|
|
2354
1988
|
EndMarker: __expectString(output.EndMarker),
|
|
2355
1989
|
};
|
|
2356
1990
|
};
|
|
2357
|
-
|
|
1991
|
+
const deserializeAws_json1_1KMSRequestFailedException = (output, context) => {
|
|
2358
1992
|
return {
|
|
2359
1993
|
Message: __expectString(output.Message),
|
|
2360
1994
|
};
|
|
2361
1995
|
};
|
|
2362
|
-
|
|
1996
|
+
const deserializeAws_json1_1LambdaResource = (output, context) => {
|
|
2363
1997
|
return {
|
|
2364
1998
|
EventTriggers: output.EventTriggers != null
|
|
2365
1999
|
? deserializeAws_json1_1EventTriggerDefinitionList(output.EventTriggers, context)
|
|
@@ -2367,10 +2001,10 @@ var deserializeAws_json1_1LambdaResource = function (output, context) {
|
|
|
2367
2001
|
LambdaArn: __expectString(output.LambdaArn),
|
|
2368
2002
|
};
|
|
2369
2003
|
};
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
.filter(
|
|
2373
|
-
.map(
|
|
2004
|
+
const deserializeAws_json1_1LambdaResourceList = (output, context) => {
|
|
2005
|
+
const retVal = (output || [])
|
|
2006
|
+
.filter((e) => e != null)
|
|
2007
|
+
.map((entry) => {
|
|
2374
2008
|
if (entry === null) {
|
|
2375
2009
|
return null;
|
|
2376
2010
|
}
|
|
@@ -2378,7 +2012,7 @@ var deserializeAws_json1_1LambdaResourceList = function (output, context) {
|
|
|
2378
2012
|
});
|
|
2379
2013
|
return retVal;
|
|
2380
2014
|
};
|
|
2381
|
-
|
|
2015
|
+
const deserializeAws_json1_1ListClusterJobsResult = (output, context) => {
|
|
2382
2016
|
return {
|
|
2383
2017
|
JobListEntries: output.JobListEntries != null
|
|
2384
2018
|
? deserializeAws_json1_1JobListEntryList(output.JobListEntries, context)
|
|
@@ -2386,7 +2020,7 @@ var deserializeAws_json1_1ListClusterJobsResult = function (output, context) {
|
|
|
2386
2020
|
NextToken: __expectString(output.NextToken),
|
|
2387
2021
|
};
|
|
2388
2022
|
};
|
|
2389
|
-
|
|
2023
|
+
const deserializeAws_json1_1ListClustersResult = (output, context) => {
|
|
2390
2024
|
return {
|
|
2391
2025
|
ClusterListEntries: output.ClusterListEntries != null
|
|
2392
2026
|
? deserializeAws_json1_1ClusterListEntryList(output.ClusterListEntries, context)
|
|
@@ -2394,7 +2028,7 @@ var deserializeAws_json1_1ListClustersResult = function (output, context) {
|
|
|
2394
2028
|
NextToken: __expectString(output.NextToken),
|
|
2395
2029
|
};
|
|
2396
2030
|
};
|
|
2397
|
-
|
|
2031
|
+
const deserializeAws_json1_1ListCompatibleImagesResult = (output, context) => {
|
|
2398
2032
|
return {
|
|
2399
2033
|
CompatibleImages: output.CompatibleImages != null
|
|
2400
2034
|
? deserializeAws_json1_1CompatibleImageList(output.CompatibleImages, context)
|
|
@@ -2402,7 +2036,7 @@ var deserializeAws_json1_1ListCompatibleImagesResult = function (output, context
|
|
|
2402
2036
|
NextToken: __expectString(output.NextToken),
|
|
2403
2037
|
};
|
|
2404
2038
|
};
|
|
2405
|
-
|
|
2039
|
+
const deserializeAws_json1_1ListJobsResult = (output, context) => {
|
|
2406
2040
|
return {
|
|
2407
2041
|
JobListEntries: output.JobListEntries != null
|
|
2408
2042
|
? deserializeAws_json1_1JobListEntryList(output.JobListEntries, context)
|
|
@@ -2410,7 +2044,7 @@ var deserializeAws_json1_1ListJobsResult = function (output, context) {
|
|
|
2410
2044
|
NextToken: __expectString(output.NextToken),
|
|
2411
2045
|
};
|
|
2412
2046
|
};
|
|
2413
|
-
|
|
2047
|
+
const deserializeAws_json1_1ListLongTermPricingResult = (output, context) => {
|
|
2414
2048
|
return {
|
|
2415
2049
|
LongTermPricingEntries: output.LongTermPricingEntries != null
|
|
2416
2050
|
? deserializeAws_json1_1LongTermPricingEntryList(output.LongTermPricingEntries, context)
|
|
@@ -2418,10 +2052,10 @@ var deserializeAws_json1_1ListLongTermPricingResult = function (output, context)
|
|
|
2418
2052
|
NextToken: __expectString(output.NextToken),
|
|
2419
2053
|
};
|
|
2420
2054
|
};
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
.filter(
|
|
2424
|
-
.map(
|
|
2055
|
+
const deserializeAws_json1_1LongTermPricingAssociatedJobIdList = (output, context) => {
|
|
2056
|
+
const retVal = (output || [])
|
|
2057
|
+
.filter((e) => e != null)
|
|
2058
|
+
.map((entry) => {
|
|
2425
2059
|
if (entry === null) {
|
|
2426
2060
|
return null;
|
|
2427
2061
|
}
|
|
@@ -2429,10 +2063,10 @@ var deserializeAws_json1_1LongTermPricingAssociatedJobIdList = function (output,
|
|
|
2429
2063
|
});
|
|
2430
2064
|
return retVal;
|
|
2431
2065
|
};
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
.filter(
|
|
2435
|
-
.map(
|
|
2066
|
+
const deserializeAws_json1_1LongTermPricingEntryList = (output, context) => {
|
|
2067
|
+
const retVal = (output || [])
|
|
2068
|
+
.filter((e) => e != null)
|
|
2069
|
+
.map((entry) => {
|
|
2436
2070
|
if (entry === null) {
|
|
2437
2071
|
return null;
|
|
2438
2072
|
}
|
|
@@ -2440,7 +2074,7 @@ var deserializeAws_json1_1LongTermPricingEntryList = function (output, context)
|
|
|
2440
2074
|
});
|
|
2441
2075
|
return retVal;
|
|
2442
2076
|
};
|
|
2443
|
-
|
|
2077
|
+
const deserializeAws_json1_1LongTermPricingListEntry = (output, context) => {
|
|
2444
2078
|
return {
|
|
2445
2079
|
CurrentActiveJob: __expectString(output.CurrentActiveJob),
|
|
2446
2080
|
IsLongTermPricingAutoRenew: __expectBoolean(output.IsLongTermPricingAutoRenew),
|
|
@@ -2460,13 +2094,13 @@ var deserializeAws_json1_1LongTermPricingListEntry = function (output, context)
|
|
|
2460
2094
|
SnowballType: __expectString(output.SnowballType),
|
|
2461
2095
|
};
|
|
2462
2096
|
};
|
|
2463
|
-
|
|
2097
|
+
const deserializeAws_json1_1NFSOnDeviceServiceConfiguration = (output, context) => {
|
|
2464
2098
|
return {
|
|
2465
2099
|
StorageLimit: __expectInt32(output.StorageLimit),
|
|
2466
2100
|
StorageUnit: __expectString(output.StorageUnit),
|
|
2467
2101
|
};
|
|
2468
2102
|
};
|
|
2469
|
-
|
|
2103
|
+
const deserializeAws_json1_1Notification = (output, context) => {
|
|
2470
2104
|
return {
|
|
2471
2105
|
JobStatesToNotify: output.JobStatesToNotify != null
|
|
2472
2106
|
? deserializeAws_json1_1JobStateList(output.JobStatesToNotify, context)
|
|
@@ -2475,7 +2109,7 @@ var deserializeAws_json1_1Notification = function (output, context) {
|
|
|
2475
2109
|
SnsTopicARN: __expectString(output.SnsTopicARN),
|
|
2476
2110
|
};
|
|
2477
2111
|
};
|
|
2478
|
-
|
|
2112
|
+
const deserializeAws_json1_1OnDeviceServiceConfiguration = (output, context) => {
|
|
2479
2113
|
return {
|
|
2480
2114
|
NFSOnDeviceService: output.NFSOnDeviceService != null
|
|
2481
2115
|
? deserializeAws_json1_1NFSOnDeviceServiceConfiguration(output.NFSOnDeviceService, context)
|
|
@@ -2485,12 +2119,12 @@ var deserializeAws_json1_1OnDeviceServiceConfiguration = function (output, conte
|
|
|
2485
2119
|
: undefined,
|
|
2486
2120
|
};
|
|
2487
2121
|
};
|
|
2488
|
-
|
|
2122
|
+
const deserializeAws_json1_1ReturnShippingLabelAlreadyExistsException = (output, context) => {
|
|
2489
2123
|
return {
|
|
2490
2124
|
Message: __expectString(output.Message),
|
|
2491
2125
|
};
|
|
2492
2126
|
};
|
|
2493
|
-
|
|
2127
|
+
const deserializeAws_json1_1S3Resource = (output, context) => {
|
|
2494
2128
|
return {
|
|
2495
2129
|
BucketArn: __expectString(output.BucketArn),
|
|
2496
2130
|
KeyRange: output.KeyRange != null ? deserializeAws_json1_1KeyRange(output.KeyRange, context) : undefined,
|
|
@@ -2499,10 +2133,10 @@ var deserializeAws_json1_1S3Resource = function (output, context) {
|
|
|
2499
2133
|
: undefined,
|
|
2500
2134
|
};
|
|
2501
2135
|
};
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
.filter(
|
|
2505
|
-
.map(
|
|
2136
|
+
const deserializeAws_json1_1S3ResourceList = (output, context) => {
|
|
2137
|
+
const retVal = (output || [])
|
|
2138
|
+
.filter((e) => e != null)
|
|
2139
|
+
.map((entry) => {
|
|
2506
2140
|
if (entry === null) {
|
|
2507
2141
|
return null;
|
|
2508
2142
|
}
|
|
@@ -2510,36 +2144,36 @@ var deserializeAws_json1_1S3ResourceList = function (output, context) {
|
|
|
2510
2144
|
});
|
|
2511
2145
|
return retVal;
|
|
2512
2146
|
};
|
|
2513
|
-
|
|
2147
|
+
const deserializeAws_json1_1Shipment = (output, context) => {
|
|
2514
2148
|
return {
|
|
2515
2149
|
Status: __expectString(output.Status),
|
|
2516
2150
|
TrackingNumber: __expectString(output.TrackingNumber),
|
|
2517
2151
|
};
|
|
2518
2152
|
};
|
|
2519
|
-
|
|
2153
|
+
const deserializeAws_json1_1ShippingDetails = (output, context) => {
|
|
2520
2154
|
return {
|
|
2521
2155
|
InboundShipment: output.InboundShipment != null ? deserializeAws_json1_1Shipment(output.InboundShipment, context) : undefined,
|
|
2522
2156
|
OutboundShipment: output.OutboundShipment != null ? deserializeAws_json1_1Shipment(output.OutboundShipment, context) : undefined,
|
|
2523
2157
|
ShippingOption: __expectString(output.ShippingOption),
|
|
2524
2158
|
};
|
|
2525
2159
|
};
|
|
2526
|
-
|
|
2160
|
+
const deserializeAws_json1_1SnowconeDeviceConfiguration = (output, context) => {
|
|
2527
2161
|
return {
|
|
2528
2162
|
WirelessConnection: output.WirelessConnection != null
|
|
2529
2163
|
? deserializeAws_json1_1WirelessConnection(output.WirelessConnection, context)
|
|
2530
2164
|
: undefined,
|
|
2531
2165
|
};
|
|
2532
2166
|
};
|
|
2533
|
-
|
|
2167
|
+
const deserializeAws_json1_1TargetOnDeviceService = (output, context) => {
|
|
2534
2168
|
return {
|
|
2535
2169
|
ServiceName: __expectString(output.ServiceName),
|
|
2536
2170
|
TransferOption: __expectString(output.TransferOption),
|
|
2537
2171
|
};
|
|
2538
2172
|
};
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
.filter(
|
|
2542
|
-
.map(
|
|
2173
|
+
const deserializeAws_json1_1TargetOnDeviceServiceList = (output, context) => {
|
|
2174
|
+
const retVal = (output || [])
|
|
2175
|
+
.filter((e) => e != null)
|
|
2176
|
+
.map((entry) => {
|
|
2543
2177
|
if (entry === null) {
|
|
2544
2178
|
return null;
|
|
2545
2179
|
}
|
|
@@ -2547,108 +2181,85 @@ var deserializeAws_json1_1TargetOnDeviceServiceList = function (output, context)
|
|
|
2547
2181
|
});
|
|
2548
2182
|
return retVal;
|
|
2549
2183
|
};
|
|
2550
|
-
|
|
2184
|
+
const deserializeAws_json1_1TaxDocuments = (output, context) => {
|
|
2551
2185
|
return {
|
|
2552
2186
|
IND: output.IND != null ? deserializeAws_json1_1INDTaxDocuments(output.IND, context) : undefined,
|
|
2553
2187
|
};
|
|
2554
2188
|
};
|
|
2555
|
-
|
|
2189
|
+
const deserializeAws_json1_1TGWOnDeviceServiceConfiguration = (output, context) => {
|
|
2556
2190
|
return {
|
|
2557
2191
|
StorageLimit: __expectInt32(output.StorageLimit),
|
|
2558
2192
|
StorageUnit: __expectString(output.StorageUnit),
|
|
2559
2193
|
};
|
|
2560
2194
|
};
|
|
2561
|
-
|
|
2195
|
+
const deserializeAws_json1_1UnsupportedAddressException = (output, context) => {
|
|
2562
2196
|
return {
|
|
2563
2197
|
Message: __expectString(output.Message),
|
|
2564
2198
|
};
|
|
2565
2199
|
};
|
|
2566
|
-
|
|
2200
|
+
const deserializeAws_json1_1UpdateClusterResult = (output, context) => {
|
|
2567
2201
|
return {};
|
|
2568
2202
|
};
|
|
2569
|
-
|
|
2203
|
+
const deserializeAws_json1_1UpdateJobResult = (output, context) => {
|
|
2570
2204
|
return {};
|
|
2571
2205
|
};
|
|
2572
|
-
|
|
2206
|
+
const deserializeAws_json1_1UpdateJobShipmentStateResult = (output, context) => {
|
|
2573
2207
|
return {};
|
|
2574
2208
|
};
|
|
2575
|
-
|
|
2209
|
+
const deserializeAws_json1_1UpdateLongTermPricingResult = (output, context) => {
|
|
2576
2210
|
return {};
|
|
2577
2211
|
};
|
|
2578
|
-
|
|
2212
|
+
const deserializeAws_json1_1WirelessConnection = (output, context) => {
|
|
2579
2213
|
return {
|
|
2580
2214
|
IsWifiEnabled: __expectBoolean(output.IsWifiEnabled),
|
|
2581
2215
|
};
|
|
2582
2216
|
};
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
});
|
|
2591
|
-
};
|
|
2592
|
-
var collectBody = function (streamBody, context) {
|
|
2593
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
2217
|
+
const deserializeMetadata = (output) => ({
|
|
2218
|
+
httpStatusCode: output.statusCode,
|
|
2219
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
2220
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
2221
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
2222
|
+
});
|
|
2223
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
2594
2224
|
if (streamBody instanceof Uint8Array) {
|
|
2595
2225
|
return Promise.resolve(streamBody);
|
|
2596
2226
|
}
|
|
2597
2227
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
2598
2228
|
};
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
};
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
if (resolvedHostname !== undefined) {
|
|
2618
|
-
contents.hostname = resolvedHostname;
|
|
2619
|
-
}
|
|
2620
|
-
if (body !== undefined) {
|
|
2621
|
-
contents.body = body;
|
|
2622
|
-
}
|
|
2623
|
-
return [2, new __HttpRequest(contents)];
|
|
2624
|
-
}
|
|
2625
|
-
});
|
|
2626
|
-
}); };
|
|
2627
|
-
var parseBody = function (streamBody, context) {
|
|
2628
|
-
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
2629
|
-
if (encoded.length) {
|
|
2630
|
-
return JSON.parse(encoded);
|
|
2631
|
-
}
|
|
2632
|
-
return {};
|
|
2633
|
-
});
|
|
2229
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
2230
|
+
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
2231
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
2232
|
+
const contents = {
|
|
2233
|
+
protocol,
|
|
2234
|
+
hostname,
|
|
2235
|
+
port,
|
|
2236
|
+
method: "POST",
|
|
2237
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
2238
|
+
headers,
|
|
2239
|
+
};
|
|
2240
|
+
if (resolvedHostname !== undefined) {
|
|
2241
|
+
contents.hostname = resolvedHostname;
|
|
2242
|
+
}
|
|
2243
|
+
if (body !== undefined) {
|
|
2244
|
+
contents.body = body;
|
|
2245
|
+
}
|
|
2246
|
+
return new __HttpRequest(contents);
|
|
2634
2247
|
};
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
2651
|
-
var cleanValue = rawValue;
|
|
2248
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
2249
|
+
if (encoded.length) {
|
|
2250
|
+
return JSON.parse(encoded);
|
|
2251
|
+
}
|
|
2252
|
+
return {};
|
|
2253
|
+
});
|
|
2254
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
2255
|
+
const value = await parseBody(errorBody, context);
|
|
2256
|
+
value.message = value.message ?? value.Message;
|
|
2257
|
+
return value;
|
|
2258
|
+
};
|
|
2259
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
2260
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
2261
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
2262
|
+
let cleanValue = rawValue;
|
|
2652
2263
|
if (typeof cleanValue === "number") {
|
|
2653
2264
|
cleanValue = cleanValue.toString();
|
|
2654
2265
|
}
|
|
@@ -2663,7 +2274,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
2663
2274
|
}
|
|
2664
2275
|
return cleanValue;
|
|
2665
2276
|
};
|
|
2666
|
-
|
|
2277
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2667
2278
|
if (headerKey !== undefined) {
|
|
2668
2279
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
2669
2280
|
}
|