@aws-sdk/client-ebs 3.33.0 → 3.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/cjs/package.json +38 -38
  3. package/dist/es/EBS.js +1 -23
  4. package/dist/es/EBS.js.map +1 -1
  5. package/dist/es/EBSClient.js +1 -28
  6. package/dist/es/EBSClient.js.map +1 -1
  7. package/dist/es/commands/CompleteSnapshotCommand.js +2 -29
  8. package/dist/es/commands/CompleteSnapshotCommand.js.map +1 -1
  9. package/dist/es/commands/GetSnapshotBlockCommand.js +2 -27
  10. package/dist/es/commands/GetSnapshotBlockCommand.js.map +1 -1
  11. package/dist/es/commands/ListChangedBlocksCommand.js +2 -28
  12. package/dist/es/commands/ListChangedBlocksCommand.js.map +1 -1
  13. package/dist/es/commands/ListSnapshotBlocksCommand.js +2 -27
  14. package/dist/es/commands/ListSnapshotBlocksCommand.js.map +1 -1
  15. package/dist/es/commands/PutSnapshotBlockCommand.js +2 -30
  16. package/dist/es/commands/PutSnapshotBlockCommand.js.map +1 -1
  17. package/dist/es/commands/StartSnapshotCommand.js +2 -30
  18. package/dist/es/commands/StartSnapshotCommand.js.map +1 -1
  19. package/dist/es/endpoints.js +1 -1
  20. package/dist/es/endpoints.js.map +1 -1
  21. package/dist/es/models/models_0.js +0 -69
  22. package/dist/es/models/models_0.js.map +1 -1
  23. package/dist/es/package.json +38 -38
  24. package/dist/es/pagination/ListChangedBlocksPaginator.js +16 -28
  25. package/dist/es/pagination/ListChangedBlocksPaginator.js.map +1 -1
  26. package/dist/es/pagination/ListSnapshotBlocksPaginator.js +16 -28
  27. package/dist/es/pagination/ListSnapshotBlocksPaginator.js.map +1 -1
  28. package/dist/es/protocols/Aws_restJson1.js +207 -212
  29. package/dist/es/protocols/Aws_restJson1.js.map +1 -1
  30. package/dist/es/runtimeConfig.browser.js +0 -3
  31. package/dist/es/runtimeConfig.browser.js.map +1 -1
  32. package/dist/es/runtimeConfig.js +0 -3
  33. package/dist/es/runtimeConfig.js.map +1 -1
  34. package/dist/es/runtimeConfig.native.js +0 -3
  35. package/dist/es/runtimeConfig.native.js.map +1 -1
  36. package/dist/es/runtimeConfig.shared.js +0 -3
  37. package/dist/es/runtimeConfig.shared.js.map +1 -1
  38. package/package.json +38 -38
  39. package/tsconfig.es.json +0 -2
  40. package/tsconfig.json +4 -5
  41. package/tsconfig.types.json +8 -0
@@ -6,7 +6,7 @@ export var serializeAws_restJson1CompleteSnapshotCommand = function (input, cont
6
6
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
7
7
  return __generator(this, function (_c) {
8
8
  switch (_c.label) {
9
- case 0: return [4 /*yield*/, context.endpoint()];
9
+ case 0: return [4, context.endpoint()];
10
10
  case 1:
11
11
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
12
12
  headers = __assign(__assign(__assign(__assign({}, (isSerializableHeaderValue(input.ChangedBlocksCount) && {
@@ -25,7 +25,7 @@ export var serializeAws_restJson1CompleteSnapshotCommand = function (input, cont
25
25
  else {
26
26
  throw new Error("No value provided for input HTTP label: SnapshotId.");
27
27
  }
28
- return [2 /*return*/, new __HttpRequest({
28
+ return [2, new __HttpRequest({
29
29
  protocol: protocol,
30
30
  hostname: hostname,
31
31
  port: port,
@@ -41,7 +41,7 @@ export var serializeAws_restJson1GetSnapshotBlockCommand = function (input, cont
41
41
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, query, body;
42
42
  return __generator(this, function (_c) {
43
43
  switch (_c.label) {
44
- case 0: return [4 /*yield*/, context.endpoint()];
44
+ case 0: return [4, context.endpoint()];
45
45
  case 1:
46
46
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
47
47
  headers = {};
@@ -68,7 +68,7 @@ export var serializeAws_restJson1GetSnapshotBlockCommand = function (input, cont
68
68
  throw new Error("No value provided for input HTTP label: BlockIndex.");
69
69
  }
70
70
  query = __assign({}, (input.BlockToken !== undefined && { blockToken: input.BlockToken }));
71
- return [2 /*return*/, new __HttpRequest({
71
+ return [2, new __HttpRequest({
72
72
  protocol: protocol,
73
73
  hostname: hostname,
74
74
  port: port,
@@ -85,7 +85,7 @@ export var serializeAws_restJson1ListChangedBlocksCommand = function (input, con
85
85
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
86
86
  return __generator(this, function (_c) {
87
87
  switch (_c.label) {
88
- case 0: return [4 /*yield*/, context.endpoint()];
88
+ case 0: return [4, context.endpoint()];
89
89
  case 1:
90
90
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
91
91
  headers = {};
@@ -102,7 +102,7 @@ export var serializeAws_restJson1ListChangedBlocksCommand = function (input, con
102
102
  throw new Error("No value provided for input HTTP label: SecondSnapshotId.");
103
103
  }
104
104
  query = __assign(__assign(__assign(__assign({}, (input.FirstSnapshotId !== undefined && { firstSnapshotId: input.FirstSnapshotId })), (input.NextToken !== undefined && { pageToken: input.NextToken })), (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() })), (input.StartingBlockIndex !== undefined && { startingBlockIndex: input.StartingBlockIndex.toString() }));
105
- return [2 /*return*/, new __HttpRequest({
105
+ return [2, new __HttpRequest({
106
106
  protocol: protocol,
107
107
  hostname: hostname,
108
108
  port: port,
@@ -119,7 +119,7 @@ export var serializeAws_restJson1ListSnapshotBlocksCommand = function (input, co
119
119
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
120
120
  return __generator(this, function (_c) {
121
121
  switch (_c.label) {
122
- case 0: return [4 /*yield*/, context.endpoint()];
122
+ case 0: return [4, context.endpoint()];
123
123
  case 1:
124
124
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
125
125
  headers = {};
@@ -135,7 +135,7 @@ export var serializeAws_restJson1ListSnapshotBlocksCommand = function (input, co
135
135
  throw new Error("No value provided for input HTTP label: SnapshotId.");
136
136
  }
137
137
  query = __assign(__assign(__assign({}, (input.NextToken !== undefined && { pageToken: input.NextToken })), (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() })), (input.StartingBlockIndex !== undefined && { startingBlockIndex: input.StartingBlockIndex.toString() }));
138
- return [2 /*return*/, new __HttpRequest({
138
+ return [2, new __HttpRequest({
139
139
  protocol: protocol,
140
140
  hostname: hostname,
141
141
  port: port,
@@ -152,7 +152,7 @@ export var serializeAws_restJson1PutSnapshotBlockCommand = function (input, cont
152
152
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
153
153
  return __generator(this, function (_c) {
154
154
  switch (_c.label) {
155
- case 0: return [4 /*yield*/, context.endpoint()];
155
+ case 0: return [4, context.endpoint()];
156
156
  case 1:
157
157
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
158
158
  headers = __assign(__assign(__assign(__assign({ "content-type": "application/octet-stream", "x-amz-content-sha256": "UNSIGNED-PAYLOAD" }, (isSerializableHeaderValue(input.DataLength) && { "x-amz-data-length": input.DataLength.toString() })), (isSerializableHeaderValue(input.Progress) && { "x-amz-progress": input.Progress.toString() })), (isSerializableHeaderValue(input.Checksum) && { "x-amz-checksum": input.Checksum })), (isSerializableHeaderValue(input.ChecksumAlgorithm) && { "x-amz-checksum-algorithm": input.ChecksumAlgorithm }));
@@ -181,7 +181,7 @@ export var serializeAws_restJson1PutSnapshotBlockCommand = function (input, cont
181
181
  if (input.BlockData !== undefined) {
182
182
  body = input.BlockData;
183
183
  }
184
- return [2 /*return*/, new __HttpRequest({
184
+ return [2, new __HttpRequest({
185
185
  protocol: protocol,
186
186
  hostname: hostname,
187
187
  port: port,
@@ -198,7 +198,7 @@ export var serializeAws_restJson1StartSnapshotCommand = function (input, context
198
198
  var _c;
199
199
  return __generator(this, function (_d) {
200
200
  switch (_d.label) {
201
- case 0: return [4 /*yield*/, context.endpoint()];
201
+ case 0: return [4, context.endpoint()];
202
202
  case 1:
203
203
  _a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
204
204
  headers = {
@@ -207,7 +207,7 @@ export var serializeAws_restJson1StartSnapshotCommand = function (input, context
207
207
  resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/snapshots";
208
208
  body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Encrypted !== undefined && input.Encrypted !== null && { Encrypted: input.Encrypted })), (input.KmsKeyArn !== undefined && input.KmsKeyArn !== null && { KmsKeyArn: input.KmsKeyArn })), (input.ParentSnapshotId !== undefined &&
209
209
  input.ParentSnapshotId !== null && { ParentSnapshotId: input.ParentSnapshotId })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1Tags(input.Tags, context) })), (input.Timeout !== undefined && input.Timeout !== null && { Timeout: input.Timeout })), (input.VolumeSize !== undefined && input.VolumeSize !== null && { VolumeSize: input.VolumeSize })));
210
- return [2 /*return*/, new __HttpRequest({
210
+ return [2, new __HttpRequest({
211
211
  protocol: protocol,
212
212
  hostname: hostname,
213
213
  port: port,
@@ -225,7 +225,7 @@ export var deserializeAws_restJson1CompleteSnapshotCommand = function (output, c
225
225
  switch (_c.label) {
226
226
  case 0:
227
227
  if (output.statusCode !== 202 && output.statusCode >= 300) {
228
- return [2 /*return*/, deserializeAws_restJson1CompleteSnapshotCommandError(output, context)];
228
+ return [2, deserializeAws_restJson1CompleteSnapshotCommandError(output, context)];
229
229
  }
230
230
  contents = {
231
231
  $metadata: deserializeMetadata(output),
@@ -233,13 +233,13 @@ export var deserializeAws_restJson1CompleteSnapshotCommand = function (output, c
233
233
  };
234
234
  _a = __expectNonNull;
235
235
  _b = __expectObject;
236
- return [4 /*yield*/, parseBody(output.body, context)];
236
+ return [4, parseBody(output.body, context)];
237
237
  case 1:
238
238
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
239
239
  if (data.Status !== undefined && data.Status !== null) {
240
240
  contents.Status = __expectString(data.Status);
241
241
  }
242
- return [2 /*return*/, Promise.resolve(contents)];
242
+ return [2, Promise.resolve(contents)];
243
243
  }
244
244
  });
245
245
  }); };
@@ -251,63 +251,63 @@ var deserializeAws_restJson1CompleteSnapshotCommandError = function (output, con
251
251
  case 0:
252
252
  _a = [__assign({}, output)];
253
253
  _j = {};
254
- return [4 /*yield*/, parseBody(output.body, context)];
254
+ return [4, parseBody(output.body, context)];
255
255
  case 1:
256
256
  parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
257
257
  errorCode = "UnknownError";
258
258
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
259
259
  _b = errorCode;
260
260
  switch (_b) {
261
- case "AccessDeniedException": return [3 /*break*/, 2];
262
- case "com.amazonaws.ebs#AccessDeniedException": return [3 /*break*/, 2];
263
- case "InternalServerException": return [3 /*break*/, 4];
264
- case "com.amazonaws.ebs#InternalServerException": return [3 /*break*/, 4];
265
- case "RequestThrottledException": return [3 /*break*/, 6];
266
- case "com.amazonaws.ebs#RequestThrottledException": return [3 /*break*/, 6];
267
- case "ResourceNotFoundException": return [3 /*break*/, 8];
268
- case "com.amazonaws.ebs#ResourceNotFoundException": return [3 /*break*/, 8];
269
- case "ServiceQuotaExceededException": return [3 /*break*/, 10];
270
- case "com.amazonaws.ebs#ServiceQuotaExceededException": return [3 /*break*/, 10];
271
- case "ValidationException": return [3 /*break*/, 12];
272
- case "com.amazonaws.ebs#ValidationException": return [3 /*break*/, 12];
261
+ case "AccessDeniedException": return [3, 2];
262
+ case "com.amazonaws.ebs#AccessDeniedException": return [3, 2];
263
+ case "InternalServerException": return [3, 4];
264
+ case "com.amazonaws.ebs#InternalServerException": return [3, 4];
265
+ case "RequestThrottledException": return [3, 6];
266
+ case "com.amazonaws.ebs#RequestThrottledException": return [3, 6];
267
+ case "ResourceNotFoundException": return [3, 8];
268
+ case "com.amazonaws.ebs#ResourceNotFoundException": return [3, 8];
269
+ case "ServiceQuotaExceededException": return [3, 10];
270
+ case "com.amazonaws.ebs#ServiceQuotaExceededException": return [3, 10];
271
+ case "ValidationException": return [3, 12];
272
+ case "com.amazonaws.ebs#ValidationException": return [3, 12];
273
273
  }
274
- return [3 /*break*/, 14];
274
+ return [3, 14];
275
275
  case 2:
276
276
  _c = [{}];
277
- return [4 /*yield*/, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
277
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
278
278
  case 3:
279
279
  response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
280
- return [3 /*break*/, 15];
280
+ return [3, 15];
281
281
  case 4:
282
282
  _d = [{}];
283
- return [4 /*yield*/, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
283
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
284
284
  case 5:
285
285
  response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
286
- return [3 /*break*/, 15];
286
+ return [3, 15];
287
287
  case 6:
288
288
  _e = [{}];
289
- return [4 /*yield*/, deserializeAws_restJson1RequestThrottledExceptionResponse(parsedOutput, context)];
289
+ return [4, deserializeAws_restJson1RequestThrottledExceptionResponse(parsedOutput, context)];
290
290
  case 7:
291
291
  response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
292
- return [3 /*break*/, 15];
292
+ return [3, 15];
293
293
  case 8:
294
294
  _f = [{}];
295
- return [4 /*yield*/, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
295
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
296
296
  case 9:
297
297
  response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
298
- return [3 /*break*/, 15];
298
+ return [3, 15];
299
299
  case 10:
300
300
  _g = [{}];
301
- return [4 /*yield*/, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
301
+ return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
302
302
  case 11:
303
303
  response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
304
- return [3 /*break*/, 15];
304
+ return [3, 15];
305
305
  case 12:
306
306
  _h = [{}];
307
- return [4 /*yield*/, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
307
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
308
308
  case 13:
309
309
  response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
310
- return [3 /*break*/, 15];
310
+ return [3, 15];
311
311
  case 14:
312
312
  parsedBody = parsedOutput.body;
313
313
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
@@ -317,7 +317,7 @@ var deserializeAws_restJson1CompleteSnapshotCommandError = function (output, con
317
317
  message = response.message || response.Message || errorCode;
318
318
  response.message = message;
319
319
  delete response.Message;
320
- return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];
320
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
321
321
  }
322
322
  });
323
323
  }); };
@@ -325,7 +325,7 @@ export var deserializeAws_restJson1GetSnapshotBlockCommand = function (output, c
325
325
  var contents, data;
326
326
  return __generator(this, function (_a) {
327
327
  if (output.statusCode !== 200 && output.statusCode >= 300) {
328
- return [2 /*return*/, deserializeAws_restJson1GetSnapshotBlockCommandError(output, context)];
328
+ return [2, deserializeAws_restJson1GetSnapshotBlockCommandError(output, context)];
329
329
  }
330
330
  contents = {
331
331
  $metadata: deserializeMetadata(output),
@@ -345,7 +345,7 @@ export var deserializeAws_restJson1GetSnapshotBlockCommand = function (output, c
345
345
  }
346
346
  data = output.body;
347
347
  contents.BlockData = data;
348
- return [2 /*return*/, Promise.resolve(contents)];
348
+ return [2, Promise.resolve(contents)];
349
349
  });
350
350
  }); };
351
351
  var deserializeAws_restJson1GetSnapshotBlockCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -356,63 +356,63 @@ var deserializeAws_restJson1GetSnapshotBlockCommandError = function (output, con
356
356
  case 0:
357
357
  _a = [__assign({}, output)];
358
358
  _j = {};
359
- return [4 /*yield*/, parseBody(output.body, context)];
359
+ return [4, parseBody(output.body, context)];
360
360
  case 1:
361
361
  parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
362
362
  errorCode = "UnknownError";
363
363
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
364
364
  _b = errorCode;
365
365
  switch (_b) {
366
- case "AccessDeniedException": return [3 /*break*/, 2];
367
- case "com.amazonaws.ebs#AccessDeniedException": return [3 /*break*/, 2];
368
- case "InternalServerException": return [3 /*break*/, 4];
369
- case "com.amazonaws.ebs#InternalServerException": return [3 /*break*/, 4];
370
- case "RequestThrottledException": return [3 /*break*/, 6];
371
- case "com.amazonaws.ebs#RequestThrottledException": return [3 /*break*/, 6];
372
- case "ResourceNotFoundException": return [3 /*break*/, 8];
373
- case "com.amazonaws.ebs#ResourceNotFoundException": return [3 /*break*/, 8];
374
- case "ServiceQuotaExceededException": return [3 /*break*/, 10];
375
- case "com.amazonaws.ebs#ServiceQuotaExceededException": return [3 /*break*/, 10];
376
- case "ValidationException": return [3 /*break*/, 12];
377
- case "com.amazonaws.ebs#ValidationException": return [3 /*break*/, 12];
366
+ case "AccessDeniedException": return [3, 2];
367
+ case "com.amazonaws.ebs#AccessDeniedException": return [3, 2];
368
+ case "InternalServerException": return [3, 4];
369
+ case "com.amazonaws.ebs#InternalServerException": return [3, 4];
370
+ case "RequestThrottledException": return [3, 6];
371
+ case "com.amazonaws.ebs#RequestThrottledException": return [3, 6];
372
+ case "ResourceNotFoundException": return [3, 8];
373
+ case "com.amazonaws.ebs#ResourceNotFoundException": return [3, 8];
374
+ case "ServiceQuotaExceededException": return [3, 10];
375
+ case "com.amazonaws.ebs#ServiceQuotaExceededException": return [3, 10];
376
+ case "ValidationException": return [3, 12];
377
+ case "com.amazonaws.ebs#ValidationException": return [3, 12];
378
378
  }
379
- return [3 /*break*/, 14];
379
+ return [3, 14];
380
380
  case 2:
381
381
  _c = [{}];
382
- return [4 /*yield*/, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
382
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
383
383
  case 3:
384
384
  response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
385
- return [3 /*break*/, 15];
385
+ return [3, 15];
386
386
  case 4:
387
387
  _d = [{}];
388
- return [4 /*yield*/, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
388
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
389
389
  case 5:
390
390
  response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
391
- return [3 /*break*/, 15];
391
+ return [3, 15];
392
392
  case 6:
393
393
  _e = [{}];
394
- return [4 /*yield*/, deserializeAws_restJson1RequestThrottledExceptionResponse(parsedOutput, context)];
394
+ return [4, deserializeAws_restJson1RequestThrottledExceptionResponse(parsedOutput, context)];
395
395
  case 7:
396
396
  response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
397
- return [3 /*break*/, 15];
397
+ return [3, 15];
398
398
  case 8:
399
399
  _f = [{}];
400
- return [4 /*yield*/, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
400
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
401
401
  case 9:
402
402
  response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
403
- return [3 /*break*/, 15];
403
+ return [3, 15];
404
404
  case 10:
405
405
  _g = [{}];
406
- return [4 /*yield*/, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
406
+ return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
407
407
  case 11:
408
408
  response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
409
- return [3 /*break*/, 15];
409
+ return [3, 15];
410
410
  case 12:
411
411
  _h = [{}];
412
- return [4 /*yield*/, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
412
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
413
413
  case 13:
414
414
  response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
415
- return [3 /*break*/, 15];
415
+ return [3, 15];
416
416
  case 14:
417
417
  parsedBody = parsedOutput.body;
418
418
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
@@ -422,7 +422,7 @@ var deserializeAws_restJson1GetSnapshotBlockCommandError = function (output, con
422
422
  message = response.message || response.Message || errorCode;
423
423
  response.message = message;
424
424
  delete response.Message;
425
- return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];
425
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
426
426
  }
427
427
  });
428
428
  }); };
@@ -432,7 +432,7 @@ export var deserializeAws_restJson1ListChangedBlocksCommand = function (output,
432
432
  switch (_c.label) {
433
433
  case 0:
434
434
  if (output.statusCode !== 200 && output.statusCode >= 300) {
435
- return [2 /*return*/, deserializeAws_restJson1ListChangedBlocksCommandError(output, context)];
435
+ return [2, deserializeAws_restJson1ListChangedBlocksCommandError(output, context)];
436
436
  }
437
437
  contents = {
438
438
  $metadata: deserializeMetadata(output),
@@ -444,7 +444,7 @@ export var deserializeAws_restJson1ListChangedBlocksCommand = function (output,
444
444
  };
445
445
  _a = __expectNonNull;
446
446
  _b = __expectObject;
447
- return [4 /*yield*/, parseBody(output.body, context)];
447
+ return [4, parseBody(output.body, context)];
448
448
  case 1:
449
449
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
450
450
  if (data.BlockSize !== undefined && data.BlockSize !== null) {
@@ -462,7 +462,7 @@ export var deserializeAws_restJson1ListChangedBlocksCommand = function (output,
462
462
  if (data.VolumeSize !== undefined && data.VolumeSize !== null) {
463
463
  contents.VolumeSize = __expectLong(data.VolumeSize);
464
464
  }
465
- return [2 /*return*/, Promise.resolve(contents)];
465
+ return [2, Promise.resolve(contents)];
466
466
  }
467
467
  });
468
468
  }); };
@@ -474,63 +474,63 @@ var deserializeAws_restJson1ListChangedBlocksCommandError = function (output, co
474
474
  case 0:
475
475
  _a = [__assign({}, output)];
476
476
  _j = {};
477
- return [4 /*yield*/, parseBody(output.body, context)];
477
+ return [4, parseBody(output.body, context)];
478
478
  case 1:
479
479
  parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
480
480
  errorCode = "UnknownError";
481
481
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
482
482
  _b = errorCode;
483
483
  switch (_b) {
484
- case "AccessDeniedException": return [3 /*break*/, 2];
485
- case "com.amazonaws.ebs#AccessDeniedException": return [3 /*break*/, 2];
486
- case "InternalServerException": return [3 /*break*/, 4];
487
- case "com.amazonaws.ebs#InternalServerException": return [3 /*break*/, 4];
488
- case "RequestThrottledException": return [3 /*break*/, 6];
489
- case "com.amazonaws.ebs#RequestThrottledException": return [3 /*break*/, 6];
490
- case "ResourceNotFoundException": return [3 /*break*/, 8];
491
- case "com.amazonaws.ebs#ResourceNotFoundException": return [3 /*break*/, 8];
492
- case "ServiceQuotaExceededException": return [3 /*break*/, 10];
493
- case "com.amazonaws.ebs#ServiceQuotaExceededException": return [3 /*break*/, 10];
494
- case "ValidationException": return [3 /*break*/, 12];
495
- case "com.amazonaws.ebs#ValidationException": return [3 /*break*/, 12];
484
+ case "AccessDeniedException": return [3, 2];
485
+ case "com.amazonaws.ebs#AccessDeniedException": return [3, 2];
486
+ case "InternalServerException": return [3, 4];
487
+ case "com.amazonaws.ebs#InternalServerException": return [3, 4];
488
+ case "RequestThrottledException": return [3, 6];
489
+ case "com.amazonaws.ebs#RequestThrottledException": return [3, 6];
490
+ case "ResourceNotFoundException": return [3, 8];
491
+ case "com.amazonaws.ebs#ResourceNotFoundException": return [3, 8];
492
+ case "ServiceQuotaExceededException": return [3, 10];
493
+ case "com.amazonaws.ebs#ServiceQuotaExceededException": return [3, 10];
494
+ case "ValidationException": return [3, 12];
495
+ case "com.amazonaws.ebs#ValidationException": return [3, 12];
496
496
  }
497
- return [3 /*break*/, 14];
497
+ return [3, 14];
498
498
  case 2:
499
499
  _c = [{}];
500
- return [4 /*yield*/, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
500
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
501
501
  case 3:
502
502
  response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
503
- return [3 /*break*/, 15];
503
+ return [3, 15];
504
504
  case 4:
505
505
  _d = [{}];
506
- return [4 /*yield*/, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
506
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
507
507
  case 5:
508
508
  response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
509
- return [3 /*break*/, 15];
509
+ return [3, 15];
510
510
  case 6:
511
511
  _e = [{}];
512
- return [4 /*yield*/, deserializeAws_restJson1RequestThrottledExceptionResponse(parsedOutput, context)];
512
+ return [4, deserializeAws_restJson1RequestThrottledExceptionResponse(parsedOutput, context)];
513
513
  case 7:
514
514
  response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
515
- return [3 /*break*/, 15];
515
+ return [3, 15];
516
516
  case 8:
517
517
  _f = [{}];
518
- return [4 /*yield*/, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
518
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
519
519
  case 9:
520
520
  response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
521
- return [3 /*break*/, 15];
521
+ return [3, 15];
522
522
  case 10:
523
523
  _g = [{}];
524
- return [4 /*yield*/, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
524
+ return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
525
525
  case 11:
526
526
  response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
527
- return [3 /*break*/, 15];
527
+ return [3, 15];
528
528
  case 12:
529
529
  _h = [{}];
530
- return [4 /*yield*/, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
530
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
531
531
  case 13:
532
532
  response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
533
- return [3 /*break*/, 15];
533
+ return [3, 15];
534
534
  case 14:
535
535
  parsedBody = parsedOutput.body;
536
536
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
@@ -540,7 +540,7 @@ var deserializeAws_restJson1ListChangedBlocksCommandError = function (output, co
540
540
  message = response.message || response.Message || errorCode;
541
541
  response.message = message;
542
542
  delete response.Message;
543
- return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];
543
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
544
544
  }
545
545
  });
546
546
  }); };
@@ -550,7 +550,7 @@ export var deserializeAws_restJson1ListSnapshotBlocksCommand = function (output,
550
550
  switch (_c.label) {
551
551
  case 0:
552
552
  if (output.statusCode !== 200 && output.statusCode >= 300) {
553
- return [2 /*return*/, deserializeAws_restJson1ListSnapshotBlocksCommandError(output, context)];
553
+ return [2, deserializeAws_restJson1ListSnapshotBlocksCommandError(output, context)];
554
554
  }
555
555
  contents = {
556
556
  $metadata: deserializeMetadata(output),
@@ -562,7 +562,7 @@ export var deserializeAws_restJson1ListSnapshotBlocksCommand = function (output,
562
562
  };
563
563
  _a = __expectNonNull;
564
564
  _b = __expectObject;
565
- return [4 /*yield*/, parseBody(output.body, context)];
565
+ return [4, parseBody(output.body, context)];
566
566
  case 1:
567
567
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
568
568
  if (data.BlockSize !== undefined && data.BlockSize !== null) {
@@ -580,7 +580,7 @@ export var deserializeAws_restJson1ListSnapshotBlocksCommand = function (output,
580
580
  if (data.VolumeSize !== undefined && data.VolumeSize !== null) {
581
581
  contents.VolumeSize = __expectLong(data.VolumeSize);
582
582
  }
583
- return [2 /*return*/, Promise.resolve(contents)];
583
+ return [2, Promise.resolve(contents)];
584
584
  }
585
585
  });
586
586
  }); };
@@ -592,63 +592,63 @@ var deserializeAws_restJson1ListSnapshotBlocksCommandError = function (output, c
592
592
  case 0:
593
593
  _a = [__assign({}, output)];
594
594
  _j = {};
595
- return [4 /*yield*/, parseBody(output.body, context)];
595
+ return [4, parseBody(output.body, context)];
596
596
  case 1:
597
597
  parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
598
598
  errorCode = "UnknownError";
599
599
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
600
600
  _b = errorCode;
601
601
  switch (_b) {
602
- case "AccessDeniedException": return [3 /*break*/, 2];
603
- case "com.amazonaws.ebs#AccessDeniedException": return [3 /*break*/, 2];
604
- case "InternalServerException": return [3 /*break*/, 4];
605
- case "com.amazonaws.ebs#InternalServerException": return [3 /*break*/, 4];
606
- case "RequestThrottledException": return [3 /*break*/, 6];
607
- case "com.amazonaws.ebs#RequestThrottledException": return [3 /*break*/, 6];
608
- case "ResourceNotFoundException": return [3 /*break*/, 8];
609
- case "com.amazonaws.ebs#ResourceNotFoundException": return [3 /*break*/, 8];
610
- case "ServiceQuotaExceededException": return [3 /*break*/, 10];
611
- case "com.amazonaws.ebs#ServiceQuotaExceededException": return [3 /*break*/, 10];
612
- case "ValidationException": return [3 /*break*/, 12];
613
- case "com.amazonaws.ebs#ValidationException": return [3 /*break*/, 12];
602
+ case "AccessDeniedException": return [3, 2];
603
+ case "com.amazonaws.ebs#AccessDeniedException": return [3, 2];
604
+ case "InternalServerException": return [3, 4];
605
+ case "com.amazonaws.ebs#InternalServerException": return [3, 4];
606
+ case "RequestThrottledException": return [3, 6];
607
+ case "com.amazonaws.ebs#RequestThrottledException": return [3, 6];
608
+ case "ResourceNotFoundException": return [3, 8];
609
+ case "com.amazonaws.ebs#ResourceNotFoundException": return [3, 8];
610
+ case "ServiceQuotaExceededException": return [3, 10];
611
+ case "com.amazonaws.ebs#ServiceQuotaExceededException": return [3, 10];
612
+ case "ValidationException": return [3, 12];
613
+ case "com.amazonaws.ebs#ValidationException": return [3, 12];
614
614
  }
615
- return [3 /*break*/, 14];
615
+ return [3, 14];
616
616
  case 2:
617
617
  _c = [{}];
618
- return [4 /*yield*/, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
618
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
619
619
  case 3:
620
620
  response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
621
- return [3 /*break*/, 15];
621
+ return [3, 15];
622
622
  case 4:
623
623
  _d = [{}];
624
- return [4 /*yield*/, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
624
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
625
625
  case 5:
626
626
  response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
627
- return [3 /*break*/, 15];
627
+ return [3, 15];
628
628
  case 6:
629
629
  _e = [{}];
630
- return [4 /*yield*/, deserializeAws_restJson1RequestThrottledExceptionResponse(parsedOutput, context)];
630
+ return [4, deserializeAws_restJson1RequestThrottledExceptionResponse(parsedOutput, context)];
631
631
  case 7:
632
632
  response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
633
- return [3 /*break*/, 15];
633
+ return [3, 15];
634
634
  case 8:
635
635
  _f = [{}];
636
- return [4 /*yield*/, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
636
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
637
637
  case 9:
638
638
  response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
639
- return [3 /*break*/, 15];
639
+ return [3, 15];
640
640
  case 10:
641
641
  _g = [{}];
642
- return [4 /*yield*/, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
642
+ return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
643
643
  case 11:
644
644
  response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
645
- return [3 /*break*/, 15];
645
+ return [3, 15];
646
646
  case 12:
647
647
  _h = [{}];
648
- return [4 /*yield*/, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
648
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
649
649
  case 13:
650
650
  response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
651
- return [3 /*break*/, 15];
651
+ return [3, 15];
652
652
  case 14:
653
653
  parsedBody = parsedOutput.body;
654
654
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
@@ -658,7 +658,7 @@ var deserializeAws_restJson1ListSnapshotBlocksCommandError = function (output, c
658
658
  message = response.message || response.Message || errorCode;
659
659
  response.message = message;
660
660
  delete response.Message;
661
- return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];
661
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
662
662
  }
663
663
  });
664
664
  }); };
@@ -668,7 +668,7 @@ export var deserializeAws_restJson1PutSnapshotBlockCommand = function (output, c
668
668
  switch (_a.label) {
669
669
  case 0:
670
670
  if (output.statusCode !== 201 && output.statusCode >= 300) {
671
- return [2 /*return*/, deserializeAws_restJson1PutSnapshotBlockCommandError(output, context)];
671
+ return [2, deserializeAws_restJson1PutSnapshotBlockCommandError(output, context)];
672
672
  }
673
673
  contents = {
674
674
  $metadata: deserializeMetadata(output),
@@ -681,10 +681,10 @@ export var deserializeAws_restJson1PutSnapshotBlockCommand = function (output, c
681
681
  if (output.headers["x-amz-checksum-algorithm"] !== undefined) {
682
682
  contents.ChecksumAlgorithm = output.headers["x-amz-checksum-algorithm"];
683
683
  }
684
- return [4 /*yield*/, collectBody(output.body, context)];
684
+ return [4, collectBody(output.body, context)];
685
685
  case 1:
686
686
  _a.sent();
687
- return [2 /*return*/, Promise.resolve(contents)];
687
+ return [2, Promise.resolve(contents)];
688
688
  }
689
689
  });
690
690
  }); };
@@ -696,63 +696,63 @@ var deserializeAws_restJson1PutSnapshotBlockCommandError = function (output, con
696
696
  case 0:
697
697
  _a = [__assign({}, output)];
698
698
  _j = {};
699
- return [4 /*yield*/, parseBody(output.body, context)];
699
+ return [4, parseBody(output.body, context)];
700
700
  case 1:
701
701
  parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
702
702
  errorCode = "UnknownError";
703
703
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
704
704
  _b = errorCode;
705
705
  switch (_b) {
706
- case "AccessDeniedException": return [3 /*break*/, 2];
707
- case "com.amazonaws.ebs#AccessDeniedException": return [3 /*break*/, 2];
708
- case "InternalServerException": return [3 /*break*/, 4];
709
- case "com.amazonaws.ebs#InternalServerException": return [3 /*break*/, 4];
710
- case "RequestThrottledException": return [3 /*break*/, 6];
711
- case "com.amazonaws.ebs#RequestThrottledException": return [3 /*break*/, 6];
712
- case "ResourceNotFoundException": return [3 /*break*/, 8];
713
- case "com.amazonaws.ebs#ResourceNotFoundException": return [3 /*break*/, 8];
714
- case "ServiceQuotaExceededException": return [3 /*break*/, 10];
715
- case "com.amazonaws.ebs#ServiceQuotaExceededException": return [3 /*break*/, 10];
716
- case "ValidationException": return [3 /*break*/, 12];
717
- case "com.amazonaws.ebs#ValidationException": return [3 /*break*/, 12];
706
+ case "AccessDeniedException": return [3, 2];
707
+ case "com.amazonaws.ebs#AccessDeniedException": return [3, 2];
708
+ case "InternalServerException": return [3, 4];
709
+ case "com.amazonaws.ebs#InternalServerException": return [3, 4];
710
+ case "RequestThrottledException": return [3, 6];
711
+ case "com.amazonaws.ebs#RequestThrottledException": return [3, 6];
712
+ case "ResourceNotFoundException": return [3, 8];
713
+ case "com.amazonaws.ebs#ResourceNotFoundException": return [3, 8];
714
+ case "ServiceQuotaExceededException": return [3, 10];
715
+ case "com.amazonaws.ebs#ServiceQuotaExceededException": return [3, 10];
716
+ case "ValidationException": return [3, 12];
717
+ case "com.amazonaws.ebs#ValidationException": return [3, 12];
718
718
  }
719
- return [3 /*break*/, 14];
719
+ return [3, 14];
720
720
  case 2:
721
721
  _c = [{}];
722
- return [4 /*yield*/, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
722
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
723
723
  case 3:
724
724
  response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
725
- return [3 /*break*/, 15];
725
+ return [3, 15];
726
726
  case 4:
727
727
  _d = [{}];
728
- return [4 /*yield*/, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
728
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
729
729
  case 5:
730
730
  response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
731
- return [3 /*break*/, 15];
731
+ return [3, 15];
732
732
  case 6:
733
733
  _e = [{}];
734
- return [4 /*yield*/, deserializeAws_restJson1RequestThrottledExceptionResponse(parsedOutput, context)];
734
+ return [4, deserializeAws_restJson1RequestThrottledExceptionResponse(parsedOutput, context)];
735
735
  case 7:
736
736
  response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
737
- return [3 /*break*/, 15];
737
+ return [3, 15];
738
738
  case 8:
739
739
  _f = [{}];
740
- return [4 /*yield*/, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
740
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
741
741
  case 9:
742
742
  response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
743
- return [3 /*break*/, 15];
743
+ return [3, 15];
744
744
  case 10:
745
745
  _g = [{}];
746
- return [4 /*yield*/, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
746
+ return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
747
747
  case 11:
748
748
  response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
749
- return [3 /*break*/, 15];
749
+ return [3, 15];
750
750
  case 12:
751
751
  _h = [{}];
752
- return [4 /*yield*/, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
752
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
753
753
  case 13:
754
754
  response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
755
- return [3 /*break*/, 15];
755
+ return [3, 15];
756
756
  case 14:
757
757
  parsedBody = parsedOutput.body;
758
758
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
@@ -762,7 +762,7 @@ var deserializeAws_restJson1PutSnapshotBlockCommandError = function (output, con
762
762
  message = response.message || response.Message || errorCode;
763
763
  response.message = message;
764
764
  delete response.Message;
765
- return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];
765
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
766
766
  }
767
767
  });
768
768
  }); };
@@ -772,7 +772,7 @@ export var deserializeAws_restJson1StartSnapshotCommand = function (output, cont
772
772
  switch (_c.label) {
773
773
  case 0:
774
774
  if (output.statusCode !== 201 && output.statusCode >= 300) {
775
- return [2 /*return*/, deserializeAws_restJson1StartSnapshotCommandError(output, context)];
775
+ return [2, deserializeAws_restJson1StartSnapshotCommandError(output, context)];
776
776
  }
777
777
  contents = {
778
778
  $metadata: deserializeMetadata(output),
@@ -789,7 +789,7 @@ export var deserializeAws_restJson1StartSnapshotCommand = function (output, cont
789
789
  };
790
790
  _a = __expectNonNull;
791
791
  _b = __expectObject;
792
- return [4 /*yield*/, parseBody(output.body, context)];
792
+ return [4, parseBody(output.body, context)];
793
793
  case 1:
794
794
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
795
795
  if (data.BlockSize !== undefined && data.BlockSize !== null) {
@@ -822,7 +822,7 @@ export var deserializeAws_restJson1StartSnapshotCommand = function (output, cont
822
822
  if (data.VolumeSize !== undefined && data.VolumeSize !== null) {
823
823
  contents.VolumeSize = __expectLong(data.VolumeSize);
824
824
  }
825
- return [2 /*return*/, Promise.resolve(contents)];
825
+ return [2, Promise.resolve(contents)];
826
826
  }
827
827
  });
828
828
  }); };
@@ -834,79 +834,79 @@ var deserializeAws_restJson1StartSnapshotCommandError = function (output, contex
834
834
  case 0:
835
835
  _a = [__assign({}, output)];
836
836
  _l = {};
837
- return [4 /*yield*/, parseBody(output.body, context)];
837
+ return [4, parseBody(output.body, context)];
838
838
  case 1:
839
839
  parsedOutput = __assign.apply(void 0, _a.concat([(_l.body = _m.sent(), _l)]));
840
840
  errorCode = "UnknownError";
841
841
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
842
842
  _b = errorCode;
843
843
  switch (_b) {
844
- case "AccessDeniedException": return [3 /*break*/, 2];
845
- case "com.amazonaws.ebs#AccessDeniedException": return [3 /*break*/, 2];
846
- case "ConcurrentLimitExceededException": return [3 /*break*/, 4];
847
- case "com.amazonaws.ebs#ConcurrentLimitExceededException": return [3 /*break*/, 4];
848
- case "ConflictException": return [3 /*break*/, 6];
849
- case "com.amazonaws.ebs#ConflictException": return [3 /*break*/, 6];
850
- case "InternalServerException": return [3 /*break*/, 8];
851
- case "com.amazonaws.ebs#InternalServerException": return [3 /*break*/, 8];
852
- case "RequestThrottledException": return [3 /*break*/, 10];
853
- case "com.amazonaws.ebs#RequestThrottledException": return [3 /*break*/, 10];
854
- case "ResourceNotFoundException": return [3 /*break*/, 12];
855
- case "com.amazonaws.ebs#ResourceNotFoundException": return [3 /*break*/, 12];
856
- case "ServiceQuotaExceededException": return [3 /*break*/, 14];
857
- case "com.amazonaws.ebs#ServiceQuotaExceededException": return [3 /*break*/, 14];
858
- case "ValidationException": return [3 /*break*/, 16];
859
- case "com.amazonaws.ebs#ValidationException": return [3 /*break*/, 16];
844
+ case "AccessDeniedException": return [3, 2];
845
+ case "com.amazonaws.ebs#AccessDeniedException": return [3, 2];
846
+ case "ConcurrentLimitExceededException": return [3, 4];
847
+ case "com.amazonaws.ebs#ConcurrentLimitExceededException": return [3, 4];
848
+ case "ConflictException": return [3, 6];
849
+ case "com.amazonaws.ebs#ConflictException": return [3, 6];
850
+ case "InternalServerException": return [3, 8];
851
+ case "com.amazonaws.ebs#InternalServerException": return [3, 8];
852
+ case "RequestThrottledException": return [3, 10];
853
+ case "com.amazonaws.ebs#RequestThrottledException": return [3, 10];
854
+ case "ResourceNotFoundException": return [3, 12];
855
+ case "com.amazonaws.ebs#ResourceNotFoundException": return [3, 12];
856
+ case "ServiceQuotaExceededException": return [3, 14];
857
+ case "com.amazonaws.ebs#ServiceQuotaExceededException": return [3, 14];
858
+ case "ValidationException": return [3, 16];
859
+ case "com.amazonaws.ebs#ValidationException": return [3, 16];
860
860
  }
861
- return [3 /*break*/, 18];
861
+ return [3, 18];
862
862
  case 2:
863
863
  _c = [{}];
864
- return [4 /*yield*/, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
864
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
865
865
  case 3:
866
866
  response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
867
- return [3 /*break*/, 19];
867
+ return [3, 19];
868
868
  case 4:
869
869
  _d = [{}];
870
- return [4 /*yield*/, deserializeAws_restJson1ConcurrentLimitExceededExceptionResponse(parsedOutput, context)];
870
+ return [4, deserializeAws_restJson1ConcurrentLimitExceededExceptionResponse(parsedOutput, context)];
871
871
  case 5:
872
872
  response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
873
- return [3 /*break*/, 19];
873
+ return [3, 19];
874
874
  case 6:
875
875
  _e = [{}];
876
- return [4 /*yield*/, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
876
+ return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
877
877
  case 7:
878
878
  response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
879
- return [3 /*break*/, 19];
879
+ return [3, 19];
880
880
  case 8:
881
881
  _f = [{}];
882
- return [4 /*yield*/, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
882
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
883
883
  case 9:
884
884
  response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
885
- return [3 /*break*/, 19];
885
+ return [3, 19];
886
886
  case 10:
887
887
  _g = [{}];
888
- return [4 /*yield*/, deserializeAws_restJson1RequestThrottledExceptionResponse(parsedOutput, context)];
888
+ return [4, deserializeAws_restJson1RequestThrottledExceptionResponse(parsedOutput, context)];
889
889
  case 11:
890
890
  response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
891
- return [3 /*break*/, 19];
891
+ return [3, 19];
892
892
  case 12:
893
893
  _h = [{}];
894
- return [4 /*yield*/, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
894
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
895
895
  case 13:
896
896
  response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
897
- return [3 /*break*/, 19];
897
+ return [3, 19];
898
898
  case 14:
899
899
  _j = [{}];
900
- return [4 /*yield*/, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
900
+ return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
901
901
  case 15:
902
902
  response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
903
- return [3 /*break*/, 19];
903
+ return [3, 19];
904
904
  case 16:
905
905
  _k = [{}];
906
- return [4 /*yield*/, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
906
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
907
907
  case 17:
908
908
  response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
909
- return [3 /*break*/, 19];
909
+ return [3, 19];
910
910
  case 18:
911
911
  parsedBody = parsedOutput.body;
912
912
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
@@ -916,7 +916,7 @@ var deserializeAws_restJson1StartSnapshotCommandError = function (output, contex
916
916
  message = response.message || response.Message || errorCode;
917
917
  response.message = message;
918
918
  delete response.Message;
919
- return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];
919
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
920
920
  }
921
921
  });
922
922
  }); };
@@ -937,7 +937,7 @@ var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutp
937
937
  if (data.Reason !== undefined && data.Reason !== null) {
938
938
  contents.Reason = __expectString(data.Reason);
939
939
  }
940
- return [2 /*return*/, contents];
940
+ return [2, contents];
941
941
  });
942
942
  }); };
943
943
  var deserializeAws_restJson1ConcurrentLimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -953,7 +953,7 @@ var deserializeAws_restJson1ConcurrentLimitExceededExceptionResponse = function
953
953
  if (data.Message !== undefined && data.Message !== null) {
954
954
  contents.Message = __expectString(data.Message);
955
955
  }
956
- return [2 /*return*/, contents];
956
+ return [2, contents];
957
957
  });
958
958
  }); };
959
959
  var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -969,7 +969,7 @@ var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput,
969
969
  if (data.Message !== undefined && data.Message !== null) {
970
970
  contents.Message = __expectString(data.Message);
971
971
  }
972
- return [2 /*return*/, contents];
972
+ return [2, contents];
973
973
  });
974
974
  }); };
975
975
  var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -985,7 +985,7 @@ var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOu
985
985
  if (data.Message !== undefined && data.Message !== null) {
986
986
  contents.Message = __expectString(data.Message);
987
987
  }
988
- return [2 /*return*/, contents];
988
+ return [2, contents];
989
989
  });
990
990
  }); };
991
991
  var deserializeAws_restJson1RequestThrottledExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -1005,7 +1005,7 @@ var deserializeAws_restJson1RequestThrottledExceptionResponse = function (parsed
1005
1005
  if (data.Reason !== undefined && data.Reason !== null) {
1006
1006
  contents.Reason = __expectString(data.Reason);
1007
1007
  }
1008
- return [2 /*return*/, contents];
1008
+ return [2, contents];
1009
1009
  });
1010
1010
  }); };
1011
1011
  var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -1025,7 +1025,7 @@ var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsed
1025
1025
  if (data.Reason !== undefined && data.Reason !== null) {
1026
1026
  contents.Reason = __expectString(data.Reason);
1027
1027
  }
1028
- return [2 /*return*/, contents];
1028
+ return [2, contents];
1029
1029
  });
1030
1030
  }); };
1031
1031
  var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -1045,7 +1045,7 @@ var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (pa
1045
1045
  if (data.Reason !== undefined && data.Reason !== null) {
1046
1046
  contents.Reason = __expectString(data.Reason);
1047
1047
  }
1048
- return [2 /*return*/, contents];
1048
+ return [2, contents];
1049
1049
  });
1050
1050
  }); };
1051
1051
  var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -1065,7 +1065,7 @@ var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput
1065
1065
  if (data.Reason !== undefined && data.Reason !== null) {
1066
1066
  contents.Reason = __expectString(data.Reason);
1067
1067
  }
1068
- return [2 /*return*/, contents];
1068
+ return [2, contents];
1069
1069
  });
1070
1070
  }); };
1071
1071
  var serializeAws_restJson1Tag = function (input, context) {
@@ -1139,7 +1139,6 @@ var deserializeMetadata = function (output) {
1139
1139
  cfId: output.headers["x-amz-cf-id"],
1140
1140
  });
1141
1141
  };
1142
- // Collect low-level response body stream to Uint8Array.
1143
1142
  var collectBody = function (streamBody, context) {
1144
1143
  if (streamBody === void 0) { streamBody = new Uint8Array(); }
1145
1144
  if (streamBody instanceof Uint8Array) {
@@ -1147,7 +1146,6 @@ var collectBody = function (streamBody, context) {
1147
1146
  }
1148
1147
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1149
1148
  };
1150
- // Encode Uint8Array data into string with utf-8.
1151
1149
  var collectBodyString = function (streamBody, context) {
1152
1150
  return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
1153
1151
  };
@@ -1166,9 +1164,6 @@ var parseBody = function (streamBody, context) {
1166
1164
  return {};
1167
1165
  });
1168
1166
  };
1169
- /**
1170
- * Load an error code for the aws.rest-json-1.1 protocol.
1171
- */
1172
1167
  var loadRestJsonErrorCode = function (output, data) {
1173
1168
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
1174
1169
  var sanitizeErrorCode = function (rawValue) {