@aws-sdk/client-chime-sdk-meetings 3.141.0 → 3.142.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.
@@ -1,11 +1,11 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
5
  import { ChimeSDKMeetingsServiceException as __BaseException } from "../models/ChimeSDKMeetingsServiceException";
6
6
  import { BadRequestException, ConflictException, ForbiddenException, LimitExceededException, NotFoundException, ServiceFailureException, ServiceUnavailableException, ThrottlingException, UnauthorizedException, UnprocessableEntityException, } from "../models/models_0";
7
7
  export var serializeAws_restJson1BatchCreateAttendeeCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
8
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
8
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
9
9
  return __generator(this, function (_c) {
10
10
  switch (_c.label) {
11
11
  case 0: return [4, context.endpoint()];
@@ -15,19 +15,10 @@ export var serializeAws_restJson1BatchCreateAttendeeCommand = function (input, c
15
15
  "content-type": "application/json",
16
16
  };
17
17
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/meetings/{MeetingId}/attendees";
18
- if (input.MeetingId !== undefined) {
19
- labelValue = input.MeetingId;
20
- if (labelValue.length <= 0) {
21
- throw new Error("Empty value provided for input HTTP label: MeetingId.");
22
- }
23
- resolvedPath = resolvedPath.replace("{MeetingId}", __extendedEncodeURIComponent(labelValue));
24
- }
25
- else {
26
- throw new Error("No value provided for input HTTP label: MeetingId.");
27
- }
28
- query = {
29
- operation: "batch-create",
30
- };
18
+ resolvedPath = __resolvedPath(resolvedPath, input, "MeetingId", function () { return input.MeetingId; }, "{MeetingId}", false);
19
+ query = map({
20
+ operation: [, "batch-create"],
21
+ });
31
22
  body = JSON.stringify(__assign({}, (input.Attendees != null && {
32
23
  Attendees: serializeAws_restJson1CreateAttendeeRequestItemList(input.Attendees, context),
33
24
  })));
@@ -45,7 +36,7 @@ export var serializeAws_restJson1BatchCreateAttendeeCommand = function (input, c
45
36
  });
46
37
  }); };
47
38
  export var serializeAws_restJson1BatchUpdateAttendeeCapabilitiesExceptCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
48
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
39
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
49
40
  return __generator(this, function (_c) {
50
41
  switch (_c.label) {
51
42
  case 0: return [4, context.endpoint()];
@@ -56,19 +47,10 @@ export var serializeAws_restJson1BatchUpdateAttendeeCapabilitiesExceptCommand =
56
47
  };
57
48
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
58
49
  "/meetings/{MeetingId}/attendees/capabilities";
59
- if (input.MeetingId !== undefined) {
60
- labelValue = input.MeetingId;
61
- if (labelValue.length <= 0) {
62
- throw new Error("Empty value provided for input HTTP label: MeetingId.");
63
- }
64
- resolvedPath = resolvedPath.replace("{MeetingId}", __extendedEncodeURIComponent(labelValue));
65
- }
66
- else {
67
- throw new Error("No value provided for input HTTP label: MeetingId.");
68
- }
69
- query = {
70
- operation: "batch-update-except",
71
- };
50
+ resolvedPath = __resolvedPath(resolvedPath, input, "MeetingId", function () { return input.MeetingId; }, "{MeetingId}", false);
51
+ query = map({
52
+ operation: [, "batch-update-except"],
53
+ });
72
54
  body = JSON.stringify(__assign(__assign({}, (input.Capabilities != null && {
73
55
  Capabilities: serializeAws_restJson1AttendeeCapabilities(input.Capabilities, context),
74
56
  })), (input.ExcludedAttendeeIds != null && {
@@ -88,7 +70,7 @@ export var serializeAws_restJson1BatchUpdateAttendeeCapabilitiesExceptCommand =
88
70
  });
89
71
  }); };
90
72
  export var serializeAws_restJson1CreateAttendeeCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
91
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
73
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
92
74
  return __generator(this, function (_c) {
93
75
  switch (_c.label) {
94
76
  case 0: return [4, context.endpoint()];
@@ -98,16 +80,7 @@ export var serializeAws_restJson1CreateAttendeeCommand = function (input, contex
98
80
  "content-type": "application/json",
99
81
  };
100
82
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/meetings/{MeetingId}/attendees";
101
- if (input.MeetingId !== undefined) {
102
- labelValue = input.MeetingId;
103
- if (labelValue.length <= 0) {
104
- throw new Error("Empty value provided for input HTTP label: MeetingId.");
105
- }
106
- resolvedPath = resolvedPath.replace("{MeetingId}", __extendedEncodeURIComponent(labelValue));
107
- }
108
- else {
109
- throw new Error("No value provided for input HTTP label: MeetingId.");
110
- }
83
+ resolvedPath = __resolvedPath(resolvedPath, input, "MeetingId", function () { return input.MeetingId; }, "{MeetingId}", false);
111
84
  body = JSON.stringify(__assign(__assign({}, (input.Capabilities != null && {
112
85
  Capabilities: serializeAws_restJson1AttendeeCapabilities(input.Capabilities, context),
113
86
  })), (input.ExternalUserId != null && { ExternalUserId: input.ExternalUserId })));
@@ -164,9 +137,9 @@ export var serializeAws_restJson1CreateMeetingWithAttendeesCommand = function (i
164
137
  "content-type": "application/json",
165
138
  };
166
139
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/meetings";
167
- query = {
168
- operation: "create-attendees",
169
- };
140
+ query = map({
141
+ operation: [, "create-attendees"],
142
+ });
170
143
  body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Attendees != null && {
171
144
  Attendees: serializeAws_restJson1CreateMeetingWithAttendeesRequestItemList(input.Attendees, context),
172
145
  })), { ClientRequestToken: (_c = input.ClientRequestToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.ExternalMeetingId != null && { ExternalMeetingId: input.ExternalMeetingId })), (input.MediaRegion != null && { MediaRegion: input.MediaRegion })), (input.MeetingFeatures != null && {
@@ -188,7 +161,7 @@ export var serializeAws_restJson1CreateMeetingWithAttendeesCommand = function (i
188
161
  });
189
162
  }); };
190
163
  export var serializeAws_restJson1DeleteAttendeeCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
191
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
164
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
192
165
  return __generator(this, function (_c) {
193
166
  switch (_c.label) {
194
167
  case 0: return [4, context.endpoint()];
@@ -197,26 +170,8 @@ export var serializeAws_restJson1DeleteAttendeeCommand = function (input, contex
197
170
  headers = {};
198
171
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
199
172
  "/meetings/{MeetingId}/attendees/{AttendeeId}";
200
- if (input.MeetingId !== undefined) {
201
- labelValue = input.MeetingId;
202
- if (labelValue.length <= 0) {
203
- throw new Error("Empty value provided for input HTTP label: MeetingId.");
204
- }
205
- resolvedPath = resolvedPath.replace("{MeetingId}", __extendedEncodeURIComponent(labelValue));
206
- }
207
- else {
208
- throw new Error("No value provided for input HTTP label: MeetingId.");
209
- }
210
- if (input.AttendeeId !== undefined) {
211
- labelValue = input.AttendeeId;
212
- if (labelValue.length <= 0) {
213
- throw new Error("Empty value provided for input HTTP label: AttendeeId.");
214
- }
215
- resolvedPath = resolvedPath.replace("{AttendeeId}", __extendedEncodeURIComponent(labelValue));
216
- }
217
- else {
218
- throw new Error("No value provided for input HTTP label: AttendeeId.");
219
- }
173
+ resolvedPath = __resolvedPath(resolvedPath, input, "MeetingId", function () { return input.MeetingId; }, "{MeetingId}", false);
174
+ resolvedPath = __resolvedPath(resolvedPath, input, "AttendeeId", function () { return input.AttendeeId; }, "{AttendeeId}", false);
220
175
  return [2, new __HttpRequest({
221
176
  protocol: protocol,
222
177
  hostname: hostname,
@@ -230,7 +185,7 @@ export var serializeAws_restJson1DeleteAttendeeCommand = function (input, contex
230
185
  });
231
186
  }); };
232
187
  export var serializeAws_restJson1DeleteMeetingCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
233
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
188
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
234
189
  return __generator(this, function (_c) {
235
190
  switch (_c.label) {
236
191
  case 0: return [4, context.endpoint()];
@@ -238,16 +193,7 @@ export var serializeAws_restJson1DeleteMeetingCommand = function (input, context
238
193
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
239
194
  headers = {};
240
195
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/meetings/{MeetingId}";
241
- if (input.MeetingId !== undefined) {
242
- labelValue = input.MeetingId;
243
- if (labelValue.length <= 0) {
244
- throw new Error("Empty value provided for input HTTP label: MeetingId.");
245
- }
246
- resolvedPath = resolvedPath.replace("{MeetingId}", __extendedEncodeURIComponent(labelValue));
247
- }
248
- else {
249
- throw new Error("No value provided for input HTTP label: MeetingId.");
250
- }
196
+ resolvedPath = __resolvedPath(resolvedPath, input, "MeetingId", function () { return input.MeetingId; }, "{MeetingId}", false);
251
197
  return [2, new __HttpRequest({
252
198
  protocol: protocol,
253
199
  hostname: hostname,
@@ -261,7 +207,7 @@ export var serializeAws_restJson1DeleteMeetingCommand = function (input, context
261
207
  });
262
208
  }); };
263
209
  export var serializeAws_restJson1GetAttendeeCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
264
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
210
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
265
211
  return __generator(this, function (_c) {
266
212
  switch (_c.label) {
267
213
  case 0: return [4, context.endpoint()];
@@ -270,26 +216,8 @@ export var serializeAws_restJson1GetAttendeeCommand = function (input, context)
270
216
  headers = {};
271
217
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
272
218
  "/meetings/{MeetingId}/attendees/{AttendeeId}";
273
- if (input.MeetingId !== undefined) {
274
- labelValue = input.MeetingId;
275
- if (labelValue.length <= 0) {
276
- throw new Error("Empty value provided for input HTTP label: MeetingId.");
277
- }
278
- resolvedPath = resolvedPath.replace("{MeetingId}", __extendedEncodeURIComponent(labelValue));
279
- }
280
- else {
281
- throw new Error("No value provided for input HTTP label: MeetingId.");
282
- }
283
- if (input.AttendeeId !== undefined) {
284
- labelValue = input.AttendeeId;
285
- if (labelValue.length <= 0) {
286
- throw new Error("Empty value provided for input HTTP label: AttendeeId.");
287
- }
288
- resolvedPath = resolvedPath.replace("{AttendeeId}", __extendedEncodeURIComponent(labelValue));
289
- }
290
- else {
291
- throw new Error("No value provided for input HTTP label: AttendeeId.");
292
- }
219
+ resolvedPath = __resolvedPath(resolvedPath, input, "MeetingId", function () { return input.MeetingId; }, "{MeetingId}", false);
220
+ resolvedPath = __resolvedPath(resolvedPath, input, "AttendeeId", function () { return input.AttendeeId; }, "{AttendeeId}", false);
293
221
  return [2, new __HttpRequest({
294
222
  protocol: protocol,
295
223
  hostname: hostname,
@@ -303,7 +231,7 @@ export var serializeAws_restJson1GetAttendeeCommand = function (input, context)
303
231
  });
304
232
  }); };
305
233
  export var serializeAws_restJson1GetMeetingCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
306
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
234
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
307
235
  return __generator(this, function (_c) {
308
236
  switch (_c.label) {
309
237
  case 0: return [4, context.endpoint()];
@@ -311,16 +239,7 @@ export var serializeAws_restJson1GetMeetingCommand = function (input, context) {
311
239
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
312
240
  headers = {};
313
241
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/meetings/{MeetingId}";
314
- if (input.MeetingId !== undefined) {
315
- labelValue = input.MeetingId;
316
- if (labelValue.length <= 0) {
317
- throw new Error("Empty value provided for input HTTP label: MeetingId.");
318
- }
319
- resolvedPath = resolvedPath.replace("{MeetingId}", __extendedEncodeURIComponent(labelValue));
320
- }
321
- else {
322
- throw new Error("No value provided for input HTTP label: MeetingId.");
323
- }
242
+ resolvedPath = __resolvedPath(resolvedPath, input, "MeetingId", function () { return input.MeetingId; }, "{MeetingId}", false);
324
243
  return [2, new __HttpRequest({
325
244
  protocol: protocol,
326
245
  hostname: hostname,
@@ -334,7 +253,7 @@ export var serializeAws_restJson1GetMeetingCommand = function (input, context) {
334
253
  });
335
254
  }); };
336
255
  export var serializeAws_restJson1ListAttendeesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
337
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
256
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
338
257
  return __generator(this, function (_c) {
339
258
  switch (_c.label) {
340
259
  case 0: return [4, context.endpoint()];
@@ -342,17 +261,11 @@ export var serializeAws_restJson1ListAttendeesCommand = function (input, context
342
261
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
343
262
  headers = {};
344
263
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/meetings/{MeetingId}/attendees";
345
- if (input.MeetingId !== undefined) {
346
- labelValue = input.MeetingId;
347
- if (labelValue.length <= 0) {
348
- throw new Error("Empty value provided for input HTTP label: MeetingId.");
349
- }
350
- resolvedPath = resolvedPath.replace("{MeetingId}", __extendedEncodeURIComponent(labelValue));
351
- }
352
- else {
353
- throw new Error("No value provided for input HTTP label: MeetingId.");
354
- }
355
- query = __assign(__assign({}, (input.NextToken !== undefined && { "next-token": input.NextToken })), (input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }));
264
+ resolvedPath = __resolvedPath(resolvedPath, input, "MeetingId", function () { return input.MeetingId; }, "{MeetingId}", false);
265
+ query = map({
266
+ "next-token": [, input.NextToken],
267
+ "max-results": [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
268
+ });
356
269
  return [2, new __HttpRequest({
357
270
  protocol: protocol,
358
271
  hostname: hostname,
@@ -367,7 +280,7 @@ export var serializeAws_restJson1ListAttendeesCommand = function (input, context
367
280
  });
368
281
  }); };
369
282
  export var serializeAws_restJson1StartMeetingTranscriptionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
370
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
283
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
371
284
  return __generator(this, function (_c) {
372
285
  switch (_c.label) {
373
286
  case 0: return [4, context.endpoint()];
@@ -377,19 +290,10 @@ export var serializeAws_restJson1StartMeetingTranscriptionCommand = function (in
377
290
  "content-type": "application/json",
378
291
  };
379
292
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/meetings/{MeetingId}/transcription";
380
- if (input.MeetingId !== undefined) {
381
- labelValue = input.MeetingId;
382
- if (labelValue.length <= 0) {
383
- throw new Error("Empty value provided for input HTTP label: MeetingId.");
384
- }
385
- resolvedPath = resolvedPath.replace("{MeetingId}", __extendedEncodeURIComponent(labelValue));
386
- }
387
- else {
388
- throw new Error("No value provided for input HTTP label: MeetingId.");
389
- }
390
- query = {
391
- operation: "start",
392
- };
293
+ resolvedPath = __resolvedPath(resolvedPath, input, "MeetingId", function () { return input.MeetingId; }, "{MeetingId}", false);
294
+ query = map({
295
+ operation: [, "start"],
296
+ });
393
297
  body = JSON.stringify(__assign({}, (input.TranscriptionConfiguration != null && {
394
298
  TranscriptionConfiguration: serializeAws_restJson1TranscriptionConfiguration(input.TranscriptionConfiguration, context),
395
299
  })));
@@ -407,7 +311,7 @@ export var serializeAws_restJson1StartMeetingTranscriptionCommand = function (in
407
311
  });
408
312
  }); };
409
313
  export var serializeAws_restJson1StopMeetingTranscriptionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
410
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
314
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
411
315
  return __generator(this, function (_c) {
412
316
  switch (_c.label) {
413
317
  case 0: return [4, context.endpoint()];
@@ -415,19 +319,10 @@ export var serializeAws_restJson1StopMeetingTranscriptionCommand = function (inp
415
319
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
416
320
  headers = {};
417
321
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/meetings/{MeetingId}/transcription";
418
- if (input.MeetingId !== undefined) {
419
- labelValue = input.MeetingId;
420
- if (labelValue.length <= 0) {
421
- throw new Error("Empty value provided for input HTTP label: MeetingId.");
422
- }
423
- resolvedPath = resolvedPath.replace("{MeetingId}", __extendedEncodeURIComponent(labelValue));
424
- }
425
- else {
426
- throw new Error("No value provided for input HTTP label: MeetingId.");
427
- }
428
- query = {
429
- operation: "stop",
430
- };
322
+ resolvedPath = __resolvedPath(resolvedPath, input, "MeetingId", function () { return input.MeetingId; }, "{MeetingId}", false);
323
+ query = map({
324
+ operation: [, "stop"],
325
+ });
431
326
  return [2, new __HttpRequest({
432
327
  protocol: protocol,
433
328
  hostname: hostname,
@@ -442,7 +337,7 @@ export var serializeAws_restJson1StopMeetingTranscriptionCommand = function (inp
442
337
  });
443
338
  }); };
444
339
  export var serializeAws_restJson1UpdateAttendeeCapabilitiesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
445
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
340
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
446
341
  return __generator(this, function (_c) {
447
342
  switch (_c.label) {
448
343
  case 0: return [4, context.endpoint()];
@@ -453,26 +348,8 @@ export var serializeAws_restJson1UpdateAttendeeCapabilitiesCommand = function (i
453
348
  };
454
349
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
455
350
  "/meetings/{MeetingId}/attendees/{AttendeeId}/capabilities";
456
- if (input.MeetingId !== undefined) {
457
- labelValue = input.MeetingId;
458
- if (labelValue.length <= 0) {
459
- throw new Error("Empty value provided for input HTTP label: MeetingId.");
460
- }
461
- resolvedPath = resolvedPath.replace("{MeetingId}", __extendedEncodeURIComponent(labelValue));
462
- }
463
- else {
464
- throw new Error("No value provided for input HTTP label: MeetingId.");
465
- }
466
- if (input.AttendeeId !== undefined) {
467
- labelValue = input.AttendeeId;
468
- if (labelValue.length <= 0) {
469
- throw new Error("Empty value provided for input HTTP label: AttendeeId.");
470
- }
471
- resolvedPath = resolvedPath.replace("{AttendeeId}", __extendedEncodeURIComponent(labelValue));
472
- }
473
- else {
474
- throw new Error("No value provided for input HTTP label: AttendeeId.");
475
- }
351
+ resolvedPath = __resolvedPath(resolvedPath, input, "MeetingId", function () { return input.MeetingId; }, "{MeetingId}", false);
352
+ resolvedPath = __resolvedPath(resolvedPath, input, "AttendeeId", function () { return input.AttendeeId; }, "{AttendeeId}", false);
476
353
  body = JSON.stringify(__assign({}, (input.Capabilities != null && {
477
354
  Capabilities: serializeAws_restJson1AttendeeCapabilities(input.Capabilities, context),
478
355
  })));
@@ -496,28 +373,26 @@ export var deserializeAws_restJson1BatchCreateAttendeeCommand = function (output
496
373
  if (output.statusCode !== 200 && output.statusCode >= 300) {
497
374
  return [2, deserializeAws_restJson1BatchCreateAttendeeCommandError(output, context)];
498
375
  }
499
- contents = {
376
+ contents = map({
500
377
  $metadata: deserializeMetadata(output),
501
- Attendees: undefined,
502
- Errors: undefined,
503
- };
378
+ });
504
379
  _a = __expectNonNull;
505
380
  _b = __expectObject;
506
381
  return [4, parseBody(output.body, context)];
507
382
  case 1:
508
383
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
509
- if (data.Attendees !== undefined && data.Attendees !== null) {
384
+ if (data.Attendees != null) {
510
385
  contents.Attendees = deserializeAws_restJson1AttendeeList(data.Attendees, context);
511
386
  }
512
- if (data.Errors !== undefined && data.Errors !== null) {
387
+ if (data.Errors != null) {
513
388
  contents.Errors = deserializeAws_restJson1BatchCreateAttendeeErrorList(data.Errors, context);
514
389
  }
515
- return [2, Promise.resolve(contents)];
390
+ return [2, contents];
516
391
  }
517
392
  });
518
393
  }); };
519
394
  var deserializeAws_restJson1BatchCreateAttendeeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
520
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
395
+ var parsedOutput, _a, errorCode, _b, parsedBody;
521
396
  var _c;
522
397
  return __generator(this, function (_d) {
523
398
  switch (_d.label) {
@@ -570,14 +445,14 @@ var deserializeAws_restJson1BatchCreateAttendeeCommandError = function (output,
570
445
  case 19: throw _d.sent();
571
446
  case 20:
572
447
  parsedBody = parsedOutput.body;
573
- $metadata = deserializeMetadata(output);
574
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
575
- response = new __BaseException({
576
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
577
- $fault: "client",
578
- $metadata: $metadata,
448
+ throwDefaultError({
449
+ output: output,
450
+ parsedBody: parsedBody,
451
+ exceptionCtor: __BaseException,
452
+ errorCode: errorCode,
579
453
  });
580
- throw __decorateServiceException(response, parsedBody);
454
+ _d.label = 21;
455
+ case 21: return [2];
581
456
  }
582
457
  });
583
458
  }); };
@@ -589,18 +464,18 @@ export var deserializeAws_restJson1BatchUpdateAttendeeCapabilitiesExceptCommand
589
464
  if (output.statusCode !== 200 && output.statusCode >= 300) {
590
465
  return [2, deserializeAws_restJson1BatchUpdateAttendeeCapabilitiesExceptCommandError(output, context)];
591
466
  }
592
- contents = {
467
+ contents = map({
593
468
  $metadata: deserializeMetadata(output),
594
- };
469
+ });
595
470
  return [4, collectBody(output.body, context)];
596
471
  case 1:
597
472
  _a.sent();
598
- return [2, Promise.resolve(contents)];
473
+ return [2, contents];
599
474
  }
600
475
  });
601
476
  }); };
602
477
  var deserializeAws_restJson1BatchUpdateAttendeeCapabilitiesExceptCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
603
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
478
+ var parsedOutput, _a, errorCode, _b, parsedBody;
604
479
  var _c;
605
480
  return __generator(this, function (_d) {
606
481
  switch (_d.label) {
@@ -641,14 +516,14 @@ var deserializeAws_restJson1BatchUpdateAttendeeCapabilitiesExceptCommandError =
641
516
  case 13: throw _d.sent();
642
517
  case 14:
643
518
  parsedBody = parsedOutput.body;
644
- $metadata = deserializeMetadata(output);
645
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
646
- response = new __BaseException({
647
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
648
- $fault: "client",
649
- $metadata: $metadata,
519
+ throwDefaultError({
520
+ output: output,
521
+ parsedBody: parsedBody,
522
+ exceptionCtor: __BaseException,
523
+ errorCode: errorCode,
650
524
  });
651
- throw __decorateServiceException(response, parsedBody);
525
+ _d.label = 15;
526
+ case 15: return [2];
652
527
  }
653
528
  });
654
529
  }); };
@@ -660,24 +535,23 @@ export var deserializeAws_restJson1CreateAttendeeCommand = function (output, con
660
535
  if (output.statusCode !== 200 && output.statusCode >= 300) {
661
536
  return [2, deserializeAws_restJson1CreateAttendeeCommandError(output, context)];
662
537
  }
663
- contents = {
538
+ contents = map({
664
539
  $metadata: deserializeMetadata(output),
665
- Attendee: undefined,
666
- };
540
+ });
667
541
  _a = __expectNonNull;
668
542
  _b = __expectObject;
669
543
  return [4, parseBody(output.body, context)];
670
544
  case 1:
671
545
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
672
- if (data.Attendee !== undefined && data.Attendee !== null) {
546
+ if (data.Attendee != null) {
673
547
  contents.Attendee = deserializeAws_restJson1Attendee(data.Attendee, context);
674
548
  }
675
- return [2, Promise.resolve(contents)];
549
+ return [2, contents];
676
550
  }
677
551
  });
678
552
  }); };
679
553
  var deserializeAws_restJson1CreateAttendeeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
680
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
554
+ var parsedOutput, _a, errorCode, _b, parsedBody;
681
555
  var _c;
682
556
  return __generator(this, function (_d) {
683
557
  switch (_d.label) {
@@ -730,14 +604,14 @@ var deserializeAws_restJson1CreateAttendeeCommandError = function (output, conte
730
604
  case 19: throw _d.sent();
731
605
  case 20:
732
606
  parsedBody = parsedOutput.body;
733
- $metadata = deserializeMetadata(output);
734
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
735
- response = new __BaseException({
736
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
737
- $fault: "client",
738
- $metadata: $metadata,
607
+ throwDefaultError({
608
+ output: output,
609
+ parsedBody: parsedBody,
610
+ exceptionCtor: __BaseException,
611
+ errorCode: errorCode,
739
612
  });
740
- throw __decorateServiceException(response, parsedBody);
613
+ _d.label = 21;
614
+ case 21: return [2];
741
615
  }
742
616
  });
743
617
  }); };
@@ -749,24 +623,23 @@ export var deserializeAws_restJson1CreateMeetingCommand = function (output, cont
749
623
  if (output.statusCode !== 200 && output.statusCode >= 300) {
750
624
  return [2, deserializeAws_restJson1CreateMeetingCommandError(output, context)];
751
625
  }
752
- contents = {
626
+ contents = map({
753
627
  $metadata: deserializeMetadata(output),
754
- Meeting: undefined,
755
- };
628
+ });
756
629
  _a = __expectNonNull;
757
630
  _b = __expectObject;
758
631
  return [4, parseBody(output.body, context)];
759
632
  case 1:
760
633
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
761
- if (data.Meeting !== undefined && data.Meeting !== null) {
634
+ if (data.Meeting != null) {
762
635
  contents.Meeting = deserializeAws_restJson1Meeting(data.Meeting, context);
763
636
  }
764
- return [2, Promise.resolve(contents)];
637
+ return [2, contents];
765
638
  }
766
639
  });
767
640
  }); };
768
641
  var deserializeAws_restJson1CreateMeetingCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
769
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
642
+ var parsedOutput, _a, errorCode, _b, parsedBody;
770
643
  var _c;
771
644
  return __generator(this, function (_d) {
772
645
  switch (_d.label) {
@@ -811,14 +684,14 @@ var deserializeAws_restJson1CreateMeetingCommandError = function (output, contex
811
684
  case 15: throw _d.sent();
812
685
  case 16:
813
686
  parsedBody = parsedOutput.body;
814
- $metadata = deserializeMetadata(output);
815
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
816
- response = new __BaseException({
817
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
818
- $fault: "client",
819
- $metadata: $metadata,
687
+ throwDefaultError({
688
+ output: output,
689
+ parsedBody: parsedBody,
690
+ exceptionCtor: __BaseException,
691
+ errorCode: errorCode,
820
692
  });
821
- throw __decorateServiceException(response, parsedBody);
693
+ _d.label = 17;
694
+ case 17: return [2];
822
695
  }
823
696
  });
824
697
  }); };
@@ -830,32 +703,29 @@ export var deserializeAws_restJson1CreateMeetingWithAttendeesCommand = function
830
703
  if (output.statusCode !== 200 && output.statusCode >= 300) {
831
704
  return [2, deserializeAws_restJson1CreateMeetingWithAttendeesCommandError(output, context)];
832
705
  }
833
- contents = {
706
+ contents = map({
834
707
  $metadata: deserializeMetadata(output),
835
- Attendees: undefined,
836
- Errors: undefined,
837
- Meeting: undefined,
838
- };
708
+ });
839
709
  _a = __expectNonNull;
840
710
  _b = __expectObject;
841
711
  return [4, parseBody(output.body, context)];
842
712
  case 1:
843
713
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
844
- if (data.Attendees !== undefined && data.Attendees !== null) {
714
+ if (data.Attendees != null) {
845
715
  contents.Attendees = deserializeAws_restJson1AttendeeList(data.Attendees, context);
846
716
  }
847
- if (data.Errors !== undefined && data.Errors !== null) {
717
+ if (data.Errors != null) {
848
718
  contents.Errors = deserializeAws_restJson1BatchCreateAttendeeErrorList(data.Errors, context);
849
719
  }
850
- if (data.Meeting !== undefined && data.Meeting !== null) {
720
+ if (data.Meeting != null) {
851
721
  contents.Meeting = deserializeAws_restJson1Meeting(data.Meeting, context);
852
722
  }
853
- return [2, Promise.resolve(contents)];
723
+ return [2, contents];
854
724
  }
855
725
  });
856
726
  }); };
857
727
  var deserializeAws_restJson1CreateMeetingWithAttendeesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
858
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
728
+ var parsedOutput, _a, errorCode, _b, parsedBody;
859
729
  var _c;
860
730
  return __generator(this, function (_d) {
861
731
  switch (_d.label) {
@@ -900,14 +770,14 @@ var deserializeAws_restJson1CreateMeetingWithAttendeesCommandError = function (o
900
770
  case 15: throw _d.sent();
901
771
  case 16:
902
772
  parsedBody = parsedOutput.body;
903
- $metadata = deserializeMetadata(output);
904
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
905
- response = new __BaseException({
906
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
907
- $fault: "client",
908
- $metadata: $metadata,
773
+ throwDefaultError({
774
+ output: output,
775
+ parsedBody: parsedBody,
776
+ exceptionCtor: __BaseException,
777
+ errorCode: errorCode,
909
778
  });
910
- throw __decorateServiceException(response, parsedBody);
779
+ _d.label = 17;
780
+ case 17: return [2];
911
781
  }
912
782
  });
913
783
  }); };
@@ -919,18 +789,18 @@ export var deserializeAws_restJson1DeleteAttendeeCommand = function (output, con
919
789
  if (output.statusCode !== 204 && output.statusCode >= 300) {
920
790
  return [2, deserializeAws_restJson1DeleteAttendeeCommandError(output, context)];
921
791
  }
922
- contents = {
792
+ contents = map({
923
793
  $metadata: deserializeMetadata(output),
924
- };
794
+ });
925
795
  return [4, collectBody(output.body, context)];
926
796
  case 1:
927
797
  _a.sent();
928
- return [2, Promise.resolve(contents)];
798
+ return [2, contents];
929
799
  }
930
800
  });
931
801
  }); };
932
802
  var deserializeAws_restJson1DeleteAttendeeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
933
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
803
+ var parsedOutput, _a, errorCode, _b, parsedBody;
934
804
  var _c;
935
805
  return __generator(this, function (_d) {
936
806
  switch (_d.label) {
@@ -975,14 +845,14 @@ var deserializeAws_restJson1DeleteAttendeeCommandError = function (output, conte
975
845
  case 15: throw _d.sent();
976
846
  case 16:
977
847
  parsedBody = parsedOutput.body;
978
- $metadata = deserializeMetadata(output);
979
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
980
- response = new __BaseException({
981
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
982
- $fault: "client",
983
- $metadata: $metadata,
848
+ throwDefaultError({
849
+ output: output,
850
+ parsedBody: parsedBody,
851
+ exceptionCtor: __BaseException,
852
+ errorCode: errorCode,
984
853
  });
985
- throw __decorateServiceException(response, parsedBody);
854
+ _d.label = 17;
855
+ case 17: return [2];
986
856
  }
987
857
  });
988
858
  }); };
@@ -994,18 +864,18 @@ export var deserializeAws_restJson1DeleteMeetingCommand = function (output, cont
994
864
  if (output.statusCode !== 204 && output.statusCode >= 300) {
995
865
  return [2, deserializeAws_restJson1DeleteMeetingCommandError(output, context)];
996
866
  }
997
- contents = {
867
+ contents = map({
998
868
  $metadata: deserializeMetadata(output),
999
- };
869
+ });
1000
870
  return [4, collectBody(output.body, context)];
1001
871
  case 1:
1002
872
  _a.sent();
1003
- return [2, Promise.resolve(contents)];
873
+ return [2, contents];
1004
874
  }
1005
875
  });
1006
876
  }); };
1007
877
  var deserializeAws_restJson1DeleteMeetingCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1008
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
878
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1009
879
  var _c;
1010
880
  return __generator(this, function (_d) {
1011
881
  switch (_d.label) {
@@ -1050,14 +920,14 @@ var deserializeAws_restJson1DeleteMeetingCommandError = function (output, contex
1050
920
  case 15: throw _d.sent();
1051
921
  case 16:
1052
922
  parsedBody = parsedOutput.body;
1053
- $metadata = deserializeMetadata(output);
1054
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1055
- response = new __BaseException({
1056
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1057
- $fault: "client",
1058
- $metadata: $metadata,
923
+ throwDefaultError({
924
+ output: output,
925
+ parsedBody: parsedBody,
926
+ exceptionCtor: __BaseException,
927
+ errorCode: errorCode,
1059
928
  });
1060
- throw __decorateServiceException(response, parsedBody);
929
+ _d.label = 17;
930
+ case 17: return [2];
1061
931
  }
1062
932
  });
1063
933
  }); };
@@ -1069,24 +939,23 @@ export var deserializeAws_restJson1GetAttendeeCommand = function (output, contex
1069
939
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1070
940
  return [2, deserializeAws_restJson1GetAttendeeCommandError(output, context)];
1071
941
  }
1072
- contents = {
942
+ contents = map({
1073
943
  $metadata: deserializeMetadata(output),
1074
- Attendee: undefined,
1075
- };
944
+ });
1076
945
  _a = __expectNonNull;
1077
946
  _b = __expectObject;
1078
947
  return [4, parseBody(output.body, context)];
1079
948
  case 1:
1080
949
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1081
- if (data.Attendee !== undefined && data.Attendee !== null) {
950
+ if (data.Attendee != null) {
1082
951
  contents.Attendee = deserializeAws_restJson1Attendee(data.Attendee, context);
1083
952
  }
1084
- return [2, Promise.resolve(contents)];
953
+ return [2, contents];
1085
954
  }
1086
955
  });
1087
956
  }); };
1088
957
  var deserializeAws_restJson1GetAttendeeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1089
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
958
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1090
959
  var _c;
1091
960
  return __generator(this, function (_d) {
1092
961
  switch (_d.label) {
@@ -1131,14 +1000,14 @@ var deserializeAws_restJson1GetAttendeeCommandError = function (output, context)
1131
1000
  case 15: throw _d.sent();
1132
1001
  case 16:
1133
1002
  parsedBody = parsedOutput.body;
1134
- $metadata = deserializeMetadata(output);
1135
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1136
- response = new __BaseException({
1137
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1138
- $fault: "client",
1139
- $metadata: $metadata,
1003
+ throwDefaultError({
1004
+ output: output,
1005
+ parsedBody: parsedBody,
1006
+ exceptionCtor: __BaseException,
1007
+ errorCode: errorCode,
1140
1008
  });
1141
- throw __decorateServiceException(response, parsedBody);
1009
+ _d.label = 17;
1010
+ case 17: return [2];
1142
1011
  }
1143
1012
  });
1144
1013
  }); };
@@ -1150,24 +1019,23 @@ export var deserializeAws_restJson1GetMeetingCommand = function (output, context
1150
1019
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1151
1020
  return [2, deserializeAws_restJson1GetMeetingCommandError(output, context)];
1152
1021
  }
1153
- contents = {
1022
+ contents = map({
1154
1023
  $metadata: deserializeMetadata(output),
1155
- Meeting: undefined,
1156
- };
1024
+ });
1157
1025
  _a = __expectNonNull;
1158
1026
  _b = __expectObject;
1159
1027
  return [4, parseBody(output.body, context)];
1160
1028
  case 1:
1161
1029
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1162
- if (data.Meeting !== undefined && data.Meeting !== null) {
1030
+ if (data.Meeting != null) {
1163
1031
  contents.Meeting = deserializeAws_restJson1Meeting(data.Meeting, context);
1164
1032
  }
1165
- return [2, Promise.resolve(contents)];
1033
+ return [2, contents];
1166
1034
  }
1167
1035
  });
1168
1036
  }); };
1169
1037
  var deserializeAws_restJson1GetMeetingCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1170
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1038
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1171
1039
  var _c;
1172
1040
  return __generator(this, function (_d) {
1173
1041
  switch (_d.label) {
@@ -1212,14 +1080,14 @@ var deserializeAws_restJson1GetMeetingCommandError = function (output, context)
1212
1080
  case 15: throw _d.sent();
1213
1081
  case 16:
1214
1082
  parsedBody = parsedOutput.body;
1215
- $metadata = deserializeMetadata(output);
1216
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1217
- response = new __BaseException({
1218
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1219
- $fault: "client",
1220
- $metadata: $metadata,
1083
+ throwDefaultError({
1084
+ output: output,
1085
+ parsedBody: parsedBody,
1086
+ exceptionCtor: __BaseException,
1087
+ errorCode: errorCode,
1221
1088
  });
1222
- throw __decorateServiceException(response, parsedBody);
1089
+ _d.label = 17;
1090
+ case 17: return [2];
1223
1091
  }
1224
1092
  });
1225
1093
  }); };
@@ -1231,28 +1099,26 @@ export var deserializeAws_restJson1ListAttendeesCommand = function (output, cont
1231
1099
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1232
1100
  return [2, deserializeAws_restJson1ListAttendeesCommandError(output, context)];
1233
1101
  }
1234
- contents = {
1102
+ contents = map({
1235
1103
  $metadata: deserializeMetadata(output),
1236
- Attendees: undefined,
1237
- NextToken: undefined,
1238
- };
1104
+ });
1239
1105
  _a = __expectNonNull;
1240
1106
  _b = __expectObject;
1241
1107
  return [4, parseBody(output.body, context)];
1242
1108
  case 1:
1243
1109
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1244
- if (data.Attendees !== undefined && data.Attendees !== null) {
1110
+ if (data.Attendees != null) {
1245
1111
  contents.Attendees = deserializeAws_restJson1AttendeeList(data.Attendees, context);
1246
1112
  }
1247
- if (data.NextToken !== undefined && data.NextToken !== null) {
1113
+ if (data.NextToken != null) {
1248
1114
  contents.NextToken = __expectString(data.NextToken);
1249
1115
  }
1250
- return [2, Promise.resolve(contents)];
1116
+ return [2, contents];
1251
1117
  }
1252
1118
  });
1253
1119
  }); };
1254
1120
  var deserializeAws_restJson1ListAttendeesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1255
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1121
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1256
1122
  var _c;
1257
1123
  return __generator(this, function (_d) {
1258
1124
  switch (_d.label) {
@@ -1297,14 +1163,14 @@ var deserializeAws_restJson1ListAttendeesCommandError = function (output, contex
1297
1163
  case 15: throw _d.sent();
1298
1164
  case 16:
1299
1165
  parsedBody = parsedOutput.body;
1300
- $metadata = deserializeMetadata(output);
1301
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1302
- response = new __BaseException({
1303
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1304
- $fault: "client",
1305
- $metadata: $metadata,
1166
+ throwDefaultError({
1167
+ output: output,
1168
+ parsedBody: parsedBody,
1169
+ exceptionCtor: __BaseException,
1170
+ errorCode: errorCode,
1306
1171
  });
1307
- throw __decorateServiceException(response, parsedBody);
1172
+ _d.label = 17;
1173
+ case 17: return [2];
1308
1174
  }
1309
1175
  });
1310
1176
  }); };
@@ -1316,18 +1182,18 @@ export var deserializeAws_restJson1StartMeetingTranscriptionCommand = function (
1316
1182
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1317
1183
  return [2, deserializeAws_restJson1StartMeetingTranscriptionCommandError(output, context)];
1318
1184
  }
1319
- contents = {
1185
+ contents = map({
1320
1186
  $metadata: deserializeMetadata(output),
1321
- };
1187
+ });
1322
1188
  return [4, collectBody(output.body, context)];
1323
1189
  case 1:
1324
1190
  _a.sent();
1325
- return [2, Promise.resolve(contents)];
1191
+ return [2, contents];
1326
1192
  }
1327
1193
  });
1328
1194
  }); };
1329
1195
  var deserializeAws_restJson1StartMeetingTranscriptionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1330
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1196
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1331
1197
  var _c;
1332
1198
  return __generator(this, function (_d) {
1333
1199
  switch (_d.label) {
@@ -1380,14 +1246,14 @@ var deserializeAws_restJson1StartMeetingTranscriptionCommandError = function (ou
1380
1246
  case 19: throw _d.sent();
1381
1247
  case 20:
1382
1248
  parsedBody = parsedOutput.body;
1383
- $metadata = deserializeMetadata(output);
1384
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1385
- response = new __BaseException({
1386
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1387
- $fault: "client",
1388
- $metadata: $metadata,
1249
+ throwDefaultError({
1250
+ output: output,
1251
+ parsedBody: parsedBody,
1252
+ exceptionCtor: __BaseException,
1253
+ errorCode: errorCode,
1389
1254
  });
1390
- throw __decorateServiceException(response, parsedBody);
1255
+ _d.label = 21;
1256
+ case 21: return [2];
1391
1257
  }
1392
1258
  });
1393
1259
  }); };
@@ -1399,18 +1265,18 @@ export var deserializeAws_restJson1StopMeetingTranscriptionCommand = function (o
1399
1265
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1400
1266
  return [2, deserializeAws_restJson1StopMeetingTranscriptionCommandError(output, context)];
1401
1267
  }
1402
- contents = {
1268
+ contents = map({
1403
1269
  $metadata: deserializeMetadata(output),
1404
- };
1270
+ });
1405
1271
  return [4, collectBody(output.body, context)];
1406
1272
  case 1:
1407
1273
  _a.sent();
1408
- return [2, Promise.resolve(contents)];
1274
+ return [2, contents];
1409
1275
  }
1410
1276
  });
1411
1277
  }); };
1412
1278
  var deserializeAws_restJson1StopMeetingTranscriptionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1413
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1279
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1414
1280
  var _c;
1415
1281
  return __generator(this, function (_d) {
1416
1282
  switch (_d.label) {
@@ -1459,14 +1325,14 @@ var deserializeAws_restJson1StopMeetingTranscriptionCommandError = function (out
1459
1325
  case 17: throw _d.sent();
1460
1326
  case 18:
1461
1327
  parsedBody = parsedOutput.body;
1462
- $metadata = deserializeMetadata(output);
1463
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1464
- response = new __BaseException({
1465
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1466
- $fault: "client",
1467
- $metadata: $metadata,
1328
+ throwDefaultError({
1329
+ output: output,
1330
+ parsedBody: parsedBody,
1331
+ exceptionCtor: __BaseException,
1332
+ errorCode: errorCode,
1468
1333
  });
1469
- throw __decorateServiceException(response, parsedBody);
1334
+ _d.label = 19;
1335
+ case 19: return [2];
1470
1336
  }
1471
1337
  });
1472
1338
  }); };
@@ -1478,24 +1344,23 @@ export var deserializeAws_restJson1UpdateAttendeeCapabilitiesCommand = function
1478
1344
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1479
1345
  return [2, deserializeAws_restJson1UpdateAttendeeCapabilitiesCommandError(output, context)];
1480
1346
  }
1481
- contents = {
1347
+ contents = map({
1482
1348
  $metadata: deserializeMetadata(output),
1483
- Attendee: undefined,
1484
- };
1349
+ });
1485
1350
  _a = __expectNonNull;
1486
1351
  _b = __expectObject;
1487
1352
  return [4, parseBody(output.body, context)];
1488
1353
  case 1:
1489
1354
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1490
- if (data.Attendee !== undefined && data.Attendee !== null) {
1355
+ if (data.Attendee != null) {
1491
1356
  contents.Attendee = deserializeAws_restJson1Attendee(data.Attendee, context);
1492
1357
  }
1493
- return [2, Promise.resolve(contents)];
1358
+ return [2, contents];
1494
1359
  }
1495
1360
  });
1496
1361
  }); };
1497
1362
  var deserializeAws_restJson1UpdateAttendeeCapabilitiesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1498
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1363
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1499
1364
  var _c;
1500
1365
  return __generator(this, function (_d) {
1501
1366
  switch (_d.label) {
@@ -1536,29 +1401,30 @@ var deserializeAws_restJson1UpdateAttendeeCapabilitiesCommandError = function (o
1536
1401
  case 13: throw _d.sent();
1537
1402
  case 14:
1538
1403
  parsedBody = parsedOutput.body;
1539
- $metadata = deserializeMetadata(output);
1540
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1541
- response = new __BaseException({
1542
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1543
- $fault: "client",
1544
- $metadata: $metadata,
1404
+ throwDefaultError({
1405
+ output: output,
1406
+ parsedBody: parsedBody,
1407
+ exceptionCtor: __BaseException,
1408
+ errorCode: errorCode,
1545
1409
  });
1546
- throw __decorateServiceException(response, parsedBody);
1410
+ _d.label = 15;
1411
+ case 15: return [2];
1547
1412
  }
1548
1413
  });
1549
1414
  }); };
1415
+ var map = __map;
1550
1416
  var deserializeAws_restJson1BadRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1551
1417
  var contents, data, exception;
1552
1418
  return __generator(this, function (_a) {
1553
- contents = {};
1419
+ contents = map({});
1554
1420
  data = parsedOutput.body;
1555
- if (data.Code !== undefined && data.Code !== null) {
1421
+ if (data.Code != null) {
1556
1422
  contents.Code = __expectString(data.Code);
1557
1423
  }
1558
- if (data.Message !== undefined && data.Message !== null) {
1424
+ if (data.Message != null) {
1559
1425
  contents.Message = __expectString(data.Message);
1560
1426
  }
1561
- if (data.RequestId !== undefined && data.RequestId !== null) {
1427
+ if (data.RequestId != null) {
1562
1428
  contents.RequestId = __expectString(data.RequestId);
1563
1429
  }
1564
1430
  exception = new BadRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -1568,15 +1434,15 @@ var deserializeAws_restJson1BadRequestExceptionResponse = function (parsedOutput
1568
1434
  var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1569
1435
  var contents, data, exception;
1570
1436
  return __generator(this, function (_a) {
1571
- contents = {};
1437
+ contents = map({});
1572
1438
  data = parsedOutput.body;
1573
- if (data.Code !== undefined && data.Code !== null) {
1439
+ if (data.Code != null) {
1574
1440
  contents.Code = __expectString(data.Code);
1575
1441
  }
1576
- if (data.Message !== undefined && data.Message !== null) {
1442
+ if (data.Message != null) {
1577
1443
  contents.Message = __expectString(data.Message);
1578
1444
  }
1579
- if (data.RequestId !== undefined && data.RequestId !== null) {
1445
+ if (data.RequestId != null) {
1580
1446
  contents.RequestId = __expectString(data.RequestId);
1581
1447
  }
1582
1448
  exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -1586,15 +1452,15 @@ var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput,
1586
1452
  var deserializeAws_restJson1ForbiddenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1587
1453
  var contents, data, exception;
1588
1454
  return __generator(this, function (_a) {
1589
- contents = {};
1455
+ contents = map({});
1590
1456
  data = parsedOutput.body;
1591
- if (data.Code !== undefined && data.Code !== null) {
1457
+ if (data.Code != null) {
1592
1458
  contents.Code = __expectString(data.Code);
1593
1459
  }
1594
- if (data.Message !== undefined && data.Message !== null) {
1460
+ if (data.Message != null) {
1595
1461
  contents.Message = __expectString(data.Message);
1596
1462
  }
1597
- if (data.RequestId !== undefined && data.RequestId !== null) {
1463
+ if (data.RequestId != null) {
1598
1464
  contents.RequestId = __expectString(data.RequestId);
1599
1465
  }
1600
1466
  exception = new ForbiddenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -1604,15 +1470,15 @@ var deserializeAws_restJson1ForbiddenExceptionResponse = function (parsedOutput,
1604
1470
  var deserializeAws_restJson1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1605
1471
  var contents, data, exception;
1606
1472
  return __generator(this, function (_a) {
1607
- contents = {};
1473
+ contents = map({});
1608
1474
  data = parsedOutput.body;
1609
- if (data.Code !== undefined && data.Code !== null) {
1475
+ if (data.Code != null) {
1610
1476
  contents.Code = __expectString(data.Code);
1611
1477
  }
1612
- if (data.Message !== undefined && data.Message !== null) {
1478
+ if (data.Message != null) {
1613
1479
  contents.Message = __expectString(data.Message);
1614
1480
  }
1615
- if (data.RequestId !== undefined && data.RequestId !== null) {
1481
+ if (data.RequestId != null) {
1616
1482
  contents.RequestId = __expectString(data.RequestId);
1617
1483
  }
1618
1484
  exception = new LimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -1622,15 +1488,15 @@ var deserializeAws_restJson1LimitExceededExceptionResponse = function (parsedOut
1622
1488
  var deserializeAws_restJson1NotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1623
1489
  var contents, data, exception;
1624
1490
  return __generator(this, function (_a) {
1625
- contents = {};
1491
+ contents = map({});
1626
1492
  data = parsedOutput.body;
1627
- if (data.Code !== undefined && data.Code !== null) {
1493
+ if (data.Code != null) {
1628
1494
  contents.Code = __expectString(data.Code);
1629
1495
  }
1630
- if (data.Message !== undefined && data.Message !== null) {
1496
+ if (data.Message != null) {
1631
1497
  contents.Message = __expectString(data.Message);
1632
1498
  }
1633
- if (data.RequestId !== undefined && data.RequestId !== null) {
1499
+ if (data.RequestId != null) {
1634
1500
  contents.RequestId = __expectString(data.RequestId);
1635
1501
  }
1636
1502
  exception = new NotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -1640,15 +1506,15 @@ var deserializeAws_restJson1NotFoundExceptionResponse = function (parsedOutput,
1640
1506
  var deserializeAws_restJson1ServiceFailureExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1641
1507
  var contents, data, exception;
1642
1508
  return __generator(this, function (_a) {
1643
- contents = {};
1509
+ contents = map({});
1644
1510
  data = parsedOutput.body;
1645
- if (data.Code !== undefined && data.Code !== null) {
1511
+ if (data.Code != null) {
1646
1512
  contents.Code = __expectString(data.Code);
1647
1513
  }
1648
- if (data.Message !== undefined && data.Message !== null) {
1514
+ if (data.Message != null) {
1649
1515
  contents.Message = __expectString(data.Message);
1650
1516
  }
1651
- if (data.RequestId !== undefined && data.RequestId !== null) {
1517
+ if (data.RequestId != null) {
1652
1518
  contents.RequestId = __expectString(data.RequestId);
1653
1519
  }
1654
1520
  exception = new ServiceFailureException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -1658,18 +1524,17 @@ var deserializeAws_restJson1ServiceFailureExceptionResponse = function (parsedOu
1658
1524
  var deserializeAws_restJson1ServiceUnavailableExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1659
1525
  var contents, data, exception;
1660
1526
  return __generator(this, function (_a) {
1661
- contents = {};
1662
- if (parsedOutput.headers["retry-after"] !== undefined) {
1663
- contents.RetryAfterSeconds = parsedOutput.headers["retry-after"];
1664
- }
1527
+ contents = map({
1528
+ RetryAfterSeconds: [, parsedOutput.headers["retry-after"]],
1529
+ });
1665
1530
  data = parsedOutput.body;
1666
- if (data.Code !== undefined && data.Code !== null) {
1531
+ if (data.Code != null) {
1667
1532
  contents.Code = __expectString(data.Code);
1668
1533
  }
1669
- if (data.Message !== undefined && data.Message !== null) {
1534
+ if (data.Message != null) {
1670
1535
  contents.Message = __expectString(data.Message);
1671
1536
  }
1672
- if (data.RequestId !== undefined && data.RequestId !== null) {
1537
+ if (data.RequestId != null) {
1673
1538
  contents.RequestId = __expectString(data.RequestId);
1674
1539
  }
1675
1540
  exception = new ServiceUnavailableException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -1679,15 +1544,15 @@ var deserializeAws_restJson1ServiceUnavailableExceptionResponse = function (pars
1679
1544
  var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1680
1545
  var contents, data, exception;
1681
1546
  return __generator(this, function (_a) {
1682
- contents = {};
1547
+ contents = map({});
1683
1548
  data = parsedOutput.body;
1684
- if (data.Code !== undefined && data.Code !== null) {
1549
+ if (data.Code != null) {
1685
1550
  contents.Code = __expectString(data.Code);
1686
1551
  }
1687
- if (data.Message !== undefined && data.Message !== null) {
1552
+ if (data.Message != null) {
1688
1553
  contents.Message = __expectString(data.Message);
1689
1554
  }
1690
- if (data.RequestId !== undefined && data.RequestId !== null) {
1555
+ if (data.RequestId != null) {
1691
1556
  contents.RequestId = __expectString(data.RequestId);
1692
1557
  }
1693
1558
  exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -1697,15 +1562,15 @@ var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput
1697
1562
  var deserializeAws_restJson1UnauthorizedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1698
1563
  var contents, data, exception;
1699
1564
  return __generator(this, function (_a) {
1700
- contents = {};
1565
+ contents = map({});
1701
1566
  data = parsedOutput.body;
1702
- if (data.Code !== undefined && data.Code !== null) {
1567
+ if (data.Code != null) {
1703
1568
  contents.Code = __expectString(data.Code);
1704
1569
  }
1705
- if (data.Message !== undefined && data.Message !== null) {
1570
+ if (data.Message != null) {
1706
1571
  contents.Message = __expectString(data.Message);
1707
1572
  }
1708
- if (data.RequestId !== undefined && data.RequestId !== null) {
1573
+ if (data.RequestId != null) {
1709
1574
  contents.RequestId = __expectString(data.RequestId);
1710
1575
  }
1711
1576
  exception = new UnauthorizedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -1715,15 +1580,15 @@ var deserializeAws_restJson1UnauthorizedExceptionResponse = function (parsedOutp
1715
1580
  var deserializeAws_restJson1UnprocessableEntityExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1716
1581
  var contents, data, exception;
1717
1582
  return __generator(this, function (_a) {
1718
- contents = {};
1583
+ contents = map({});
1719
1584
  data = parsedOutput.body;
1720
- if (data.Code !== undefined && data.Code !== null) {
1585
+ if (data.Code != null) {
1721
1586
  contents.Code = __expectString(data.Code);
1722
1587
  }
1723
- if (data.Message !== undefined && data.Message !== null) {
1588
+ if (data.Message != null) {
1724
1589
  contents.Message = __expectString(data.Message);
1725
1590
  }
1726
- if (data.RequestId !== undefined && data.RequestId !== null) {
1591
+ if (data.RequestId != null) {
1727
1592
  contents.RequestId = __expectString(data.RequestId);
1728
1593
  }
1729
1594
  exception = new UnprocessableEntityException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -1740,9 +1605,6 @@ var serializeAws_restJson1AttendeeIdsList = function (input, context) {
1740
1605
  return input
1741
1606
  .filter(function (e) { return e != null; })
1742
1607
  .map(function (entry) {
1743
- if (entry === null) {
1744
- return null;
1745
- }
1746
1608
  return serializeAws_restJson1AttendeeIdItem(entry, context);
1747
1609
  });
1748
1610
  };
@@ -1758,9 +1620,6 @@ var serializeAws_restJson1CreateAttendeeRequestItemList = function (input, conte
1758
1620
  return input
1759
1621
  .filter(function (e) { return e != null; })
1760
1622
  .map(function (entry) {
1761
- if (entry === null) {
1762
- return null;
1763
- }
1764
1623
  return serializeAws_restJson1CreateAttendeeRequestItem(entry, context);
1765
1624
  });
1766
1625
  };
@@ -1768,9 +1627,6 @@ var serializeAws_restJson1CreateMeetingWithAttendeesRequestItemList = function (
1768
1627
  return input
1769
1628
  .filter(function (e) { return e != null; })
1770
1629
  .map(function (entry) {
1771
- if (entry === null) {
1772
- return null;
1773
- }
1774
1630
  return serializeAws_restJson1CreateAttendeeRequestItem(entry, context);
1775
1631
  });
1776
1632
  };
@@ -1792,9 +1648,6 @@ var serializeAws_restJson1TenantIdList = function (input, context) {
1792
1648
  return input
1793
1649
  .filter(function (e) { return e != null; })
1794
1650
  .map(function (entry) {
1795
- if (entry === null) {
1796
- return null;
1797
- }
1798
1651
  return entry;
1799
1652
  });
1800
1653
  };