@aws-sdk/client-chime-sdk-meetings 3.312.0 → 3.315.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,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- 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";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { ChimeSDKMeetingsServiceException as __BaseException } from "../models/ChimeSDKMeetingsServiceException";
5
5
  import { BadRequestException, ConflictException, ForbiddenException, LimitExceededException, NotFoundException, ResourceNotFoundException, ServiceFailureException, ServiceUnavailableException, ThrottlingException, TooManyTagsException, UnauthorizedException, UnprocessableEntityException, } from "../models/models_0";
@@ -14,9 +14,9 @@ export const se_BatchCreateAttendeeCommand = async (input, context) => {
14
14
  operation: [, "batch-create"],
15
15
  });
16
16
  let body;
17
- body = JSON.stringify({
18
- ...(input.Attendees != null && { Attendees: se_CreateAttendeeRequestItemList(input.Attendees, context) }),
19
- });
17
+ body = JSON.stringify(take(input, {
18
+ Attendees: (_) => _json(_),
19
+ }));
20
20
  return new __HttpRequest({
21
21
  protocol,
22
22
  hostname,
@@ -40,12 +40,10 @@ export const se_BatchUpdateAttendeeCapabilitiesExceptCommand = async (input, con
40
40
  operation: [, "batch-update-except"],
41
41
  });
42
42
  let body;
43
- body = JSON.stringify({
44
- ...(input.Capabilities != null && { Capabilities: se_AttendeeCapabilities(input.Capabilities, context) }),
45
- ...(input.ExcludedAttendeeIds != null && {
46
- ExcludedAttendeeIds: se_AttendeeIdsList(input.ExcludedAttendeeIds, context),
47
- }),
48
- });
43
+ body = JSON.stringify(take(input, {
44
+ Capabilities: (_) => _json(_),
45
+ ExcludedAttendeeIds: (_) => _json(_),
46
+ }));
49
47
  return new __HttpRequest({
50
48
  protocol,
51
49
  hostname,
@@ -65,10 +63,10 @@ export const se_CreateAttendeeCommand = async (input, context) => {
65
63
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/attendees";
66
64
  resolvedPath = __resolvedPath(resolvedPath, input, "MeetingId", () => input.MeetingId, "{MeetingId}", false);
67
65
  let body;
68
- body = JSON.stringify({
69
- ...(input.Capabilities != null && { Capabilities: se_AttendeeCapabilities(input.Capabilities, context) }),
70
- ...(input.ExternalUserId != null && { ExternalUserId: input.ExternalUserId }),
71
- });
66
+ body = JSON.stringify(take(input, {
67
+ Capabilities: (_) => _json(_),
68
+ ExternalUserId: [],
69
+ }));
72
70
  return new __HttpRequest({
73
71
  protocol,
74
72
  hostname,
@@ -86,21 +84,17 @@ export const se_CreateMeetingCommand = async (input, context) => {
86
84
  };
87
85
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings";
88
86
  let body;
89
- body = JSON.stringify({
90
- ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
91
- ...(input.ExternalMeetingId != null && { ExternalMeetingId: input.ExternalMeetingId }),
92
- ...(input.MediaRegion != null && { MediaRegion: input.MediaRegion }),
93
- ...(input.MeetingFeatures != null && {
94
- MeetingFeatures: se_MeetingFeaturesConfiguration(input.MeetingFeatures, context),
95
- }),
96
- ...(input.MeetingHostId != null && { MeetingHostId: input.MeetingHostId }),
97
- ...(input.NotificationsConfiguration != null && {
98
- NotificationsConfiguration: se_NotificationsConfiguration(input.NotificationsConfiguration, context),
99
- }),
100
- ...(input.PrimaryMeetingId != null && { PrimaryMeetingId: input.PrimaryMeetingId }),
101
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
102
- ...(input.TenantIds != null && { TenantIds: se_TenantIdList(input.TenantIds, context) }),
103
- });
87
+ body = JSON.stringify(take(input, {
88
+ ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
89
+ ExternalMeetingId: [],
90
+ MediaRegion: [],
91
+ MeetingFeatures: (_) => _json(_),
92
+ MeetingHostId: [],
93
+ NotificationsConfiguration: (_) => _json(_),
94
+ PrimaryMeetingId: [],
95
+ Tags: (_) => _json(_),
96
+ TenantIds: (_) => _json(_),
97
+ }));
104
98
  return new __HttpRequest({
105
99
  protocol,
106
100
  hostname,
@@ -121,24 +115,18 @@ export const se_CreateMeetingWithAttendeesCommand = async (input, context) => {
121
115
  operation: [, "create-attendees"],
122
116
  });
123
117
  let body;
124
- body = JSON.stringify({
125
- ...(input.Attendees != null && {
126
- Attendees: se_CreateMeetingWithAttendeesRequestItemList(input.Attendees, context),
127
- }),
128
- ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
129
- ...(input.ExternalMeetingId != null && { ExternalMeetingId: input.ExternalMeetingId }),
130
- ...(input.MediaRegion != null && { MediaRegion: input.MediaRegion }),
131
- ...(input.MeetingFeatures != null && {
132
- MeetingFeatures: se_MeetingFeaturesConfiguration(input.MeetingFeatures, context),
133
- }),
134
- ...(input.MeetingHostId != null && { MeetingHostId: input.MeetingHostId }),
135
- ...(input.NotificationsConfiguration != null && {
136
- NotificationsConfiguration: se_NotificationsConfiguration(input.NotificationsConfiguration, context),
137
- }),
138
- ...(input.PrimaryMeetingId != null && { PrimaryMeetingId: input.PrimaryMeetingId }),
139
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
140
- ...(input.TenantIds != null && { TenantIds: se_TenantIdList(input.TenantIds, context) }),
141
- });
118
+ body = JSON.stringify(take(input, {
119
+ Attendees: (_) => _json(_),
120
+ ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
121
+ ExternalMeetingId: [],
122
+ MediaRegion: [],
123
+ MeetingFeatures: (_) => _json(_),
124
+ MeetingHostId: [],
125
+ NotificationsConfiguration: (_) => _json(_),
126
+ PrimaryMeetingId: [],
127
+ Tags: (_) => _json(_),
128
+ TenantIds: (_) => _json(_),
129
+ }));
142
130
  return new __HttpRequest({
143
131
  protocol,
144
132
  hostname,
@@ -269,11 +257,9 @@ export const se_StartMeetingTranscriptionCommand = async (input, context) => {
269
257
  operation: [, "start"],
270
258
  });
271
259
  let body;
272
- body = JSON.stringify({
273
- ...(input.TranscriptionConfiguration != null && {
274
- TranscriptionConfiguration: se_TranscriptionConfiguration(input.TranscriptionConfiguration, context),
275
- }),
276
- });
260
+ body = JSON.stringify(take(input, {
261
+ TranscriptionConfiguration: (_) => _json(_),
262
+ }));
277
263
  return new __HttpRequest({
278
264
  protocol,
279
265
  hostname,
@@ -315,10 +301,10 @@ export const se_TagResourceCommand = async (input, context) => {
315
301
  operation: [, "tag-resource"],
316
302
  });
317
303
  let body;
318
- body = JSON.stringify({
319
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
320
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
321
- });
304
+ body = JSON.stringify(take(input, {
305
+ ResourceARN: [],
306
+ Tags: (_) => _json(_),
307
+ }));
322
308
  return new __HttpRequest({
323
309
  protocol,
324
310
  hostname,
@@ -340,10 +326,10 @@ export const se_UntagResourceCommand = async (input, context) => {
340
326
  operation: [, "untag-resource"],
341
327
  });
342
328
  let body;
343
- body = JSON.stringify({
344
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
345
- ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }),
346
- });
329
+ body = JSON.stringify(take(input, {
330
+ ResourceARN: [],
331
+ TagKeys: (_) => _json(_),
332
+ }));
347
333
  return new __HttpRequest({
348
334
  protocol,
349
335
  hostname,
@@ -365,9 +351,9 @@ export const se_UpdateAttendeeCapabilitiesCommand = async (input, context) => {
365
351
  resolvedPath = __resolvedPath(resolvedPath, input, "MeetingId", () => input.MeetingId, "{MeetingId}", false);
366
352
  resolvedPath = __resolvedPath(resolvedPath, input, "AttendeeId", () => input.AttendeeId, "{AttendeeId}", false);
367
353
  let body;
368
- body = JSON.stringify({
369
- ...(input.Capabilities != null && { Capabilities: se_AttendeeCapabilities(input.Capabilities, context) }),
370
- });
354
+ body = JSON.stringify(take(input, {
355
+ Capabilities: (_) => _json(_),
356
+ }));
371
357
  return new __HttpRequest({
372
358
  protocol,
373
359
  hostname,
@@ -386,12 +372,11 @@ export const de_BatchCreateAttendeeCommand = async (output, context) => {
386
372
  $metadata: deserializeMetadata(output),
387
373
  });
388
374
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
389
- if (data.Attendees != null) {
390
- contents.Attendees = de_AttendeeList(data.Attendees, context);
391
- }
392
- if (data.Errors != null) {
393
- contents.Errors = de_BatchCreateAttendeeErrorList(data.Errors, context);
394
- }
375
+ const doc = take(data, {
376
+ Attendees: _json,
377
+ Errors: _json,
378
+ });
379
+ Object.assign(contents, doc);
395
380
  return contents;
396
381
  };
397
382
  const de_BatchCreateAttendeeCommandError = async (output, context) => {
@@ -430,10 +415,9 @@ const de_BatchCreateAttendeeCommandError = async (output, context) => {
430
415
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
431
416
  default:
432
417
  const parsedBody = parsedOutput.body;
433
- throwDefaultError({
418
+ return throwDefaultError({
434
419
  output,
435
420
  parsedBody,
436
- exceptionCtor: __BaseException,
437
421
  errorCode,
438
422
  });
439
423
  }
@@ -475,10 +459,9 @@ const de_BatchUpdateAttendeeCapabilitiesExceptCommandError = async (output, cont
475
459
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
476
460
  default:
477
461
  const parsedBody = parsedOutput.body;
478
- throwDefaultError({
462
+ return throwDefaultError({
479
463
  output,
480
464
  parsedBody,
481
- exceptionCtor: __BaseException,
482
465
  errorCode,
483
466
  });
484
467
  }
@@ -491,9 +474,10 @@ export const de_CreateAttendeeCommand = async (output, context) => {
491
474
  $metadata: deserializeMetadata(output),
492
475
  });
493
476
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
494
- if (data.Attendee != null) {
495
- contents.Attendee = de_Attendee(data.Attendee, context);
496
- }
477
+ const doc = take(data, {
478
+ Attendee: _json,
479
+ });
480
+ Object.assign(contents, doc);
497
481
  return contents;
498
482
  };
499
483
  const de_CreateAttendeeCommandError = async (output, context) => {
@@ -532,10 +516,9 @@ const de_CreateAttendeeCommandError = async (output, context) => {
532
516
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
533
517
  default:
534
518
  const parsedBody = parsedOutput.body;
535
- throwDefaultError({
519
+ return throwDefaultError({
536
520
  output,
537
521
  parsedBody,
538
- exceptionCtor: __BaseException,
539
522
  errorCode,
540
523
  });
541
524
  }
@@ -548,9 +531,10 @@ export const de_CreateMeetingCommand = async (output, context) => {
548
531
  $metadata: deserializeMetadata(output),
549
532
  });
550
533
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
551
- if (data.Meeting != null) {
552
- contents.Meeting = de_Meeting(data.Meeting, context);
553
- }
534
+ const doc = take(data, {
535
+ Meeting: _json,
536
+ });
537
+ Object.assign(contents, doc);
554
538
  return contents;
555
539
  };
556
540
  const de_CreateMeetingCommandError = async (output, context) => {
@@ -583,10 +567,9 @@ const de_CreateMeetingCommandError = async (output, context) => {
583
567
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
584
568
  default:
585
569
  const parsedBody = parsedOutput.body;
586
- throwDefaultError({
570
+ return throwDefaultError({
587
571
  output,
588
572
  parsedBody,
589
- exceptionCtor: __BaseException,
590
573
  errorCode,
591
574
  });
592
575
  }
@@ -599,15 +582,12 @@ export const de_CreateMeetingWithAttendeesCommand = async (output, context) => {
599
582
  $metadata: deserializeMetadata(output),
600
583
  });
601
584
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
602
- if (data.Attendees != null) {
603
- contents.Attendees = de_AttendeeList(data.Attendees, context);
604
- }
605
- if (data.Errors != null) {
606
- contents.Errors = de_BatchCreateAttendeeErrorList(data.Errors, context);
607
- }
608
- if (data.Meeting != null) {
609
- contents.Meeting = de_Meeting(data.Meeting, context);
610
- }
585
+ const doc = take(data, {
586
+ Attendees: _json,
587
+ Errors: _json,
588
+ Meeting: _json,
589
+ });
590
+ Object.assign(contents, doc);
611
591
  return contents;
612
592
  };
613
593
  const de_CreateMeetingWithAttendeesCommandError = async (output, context) => {
@@ -640,10 +620,9 @@ const de_CreateMeetingWithAttendeesCommandError = async (output, context) => {
640
620
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
641
621
  default:
642
622
  const parsedBody = parsedOutput.body;
643
- throwDefaultError({
623
+ return throwDefaultError({
644
624
  output,
645
625
  parsedBody,
646
- exceptionCtor: __BaseException,
647
626
  errorCode,
648
627
  });
649
628
  }
@@ -688,10 +667,9 @@ const de_DeleteAttendeeCommandError = async (output, context) => {
688
667
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
689
668
  default:
690
669
  const parsedBody = parsedOutput.body;
691
- throwDefaultError({
670
+ return throwDefaultError({
692
671
  output,
693
672
  parsedBody,
694
- exceptionCtor: __BaseException,
695
673
  errorCode,
696
674
  });
697
675
  }
@@ -736,10 +714,9 @@ const de_DeleteMeetingCommandError = async (output, context) => {
736
714
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
737
715
  default:
738
716
  const parsedBody = parsedOutput.body;
739
- throwDefaultError({
717
+ return throwDefaultError({
740
718
  output,
741
719
  parsedBody,
742
- exceptionCtor: __BaseException,
743
720
  errorCode,
744
721
  });
745
722
  }
@@ -752,9 +729,10 @@ export const de_GetAttendeeCommand = async (output, context) => {
752
729
  $metadata: deserializeMetadata(output),
753
730
  });
754
731
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
755
- if (data.Attendee != null) {
756
- contents.Attendee = de_Attendee(data.Attendee, context);
757
- }
732
+ const doc = take(data, {
733
+ Attendee: _json,
734
+ });
735
+ Object.assign(contents, doc);
758
736
  return contents;
759
737
  };
760
738
  const de_GetAttendeeCommandError = async (output, context) => {
@@ -787,10 +765,9 @@ const de_GetAttendeeCommandError = async (output, context) => {
787
765
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
788
766
  default:
789
767
  const parsedBody = parsedOutput.body;
790
- throwDefaultError({
768
+ return throwDefaultError({
791
769
  output,
792
770
  parsedBody,
793
- exceptionCtor: __BaseException,
794
771
  errorCode,
795
772
  });
796
773
  }
@@ -803,9 +780,10 @@ export const de_GetMeetingCommand = async (output, context) => {
803
780
  $metadata: deserializeMetadata(output),
804
781
  });
805
782
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
806
- if (data.Meeting != null) {
807
- contents.Meeting = de_Meeting(data.Meeting, context);
808
- }
783
+ const doc = take(data, {
784
+ Meeting: _json,
785
+ });
786
+ Object.assign(contents, doc);
809
787
  return contents;
810
788
  };
811
789
  const de_GetMeetingCommandError = async (output, context) => {
@@ -838,10 +816,9 @@ const de_GetMeetingCommandError = async (output, context) => {
838
816
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
839
817
  default:
840
818
  const parsedBody = parsedOutput.body;
841
- throwDefaultError({
819
+ return throwDefaultError({
842
820
  output,
843
821
  parsedBody,
844
- exceptionCtor: __BaseException,
845
822
  errorCode,
846
823
  });
847
824
  }
@@ -854,12 +831,11 @@ export const de_ListAttendeesCommand = async (output, context) => {
854
831
  $metadata: deserializeMetadata(output),
855
832
  });
856
833
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
857
- if (data.Attendees != null) {
858
- contents.Attendees = de_AttendeeList(data.Attendees, context);
859
- }
860
- if (data.NextToken != null) {
861
- contents.NextToken = __expectString(data.NextToken);
862
- }
834
+ const doc = take(data, {
835
+ Attendees: _json,
836
+ NextToken: __expectString,
837
+ });
838
+ Object.assign(contents, doc);
863
839
  return contents;
864
840
  };
865
841
  const de_ListAttendeesCommandError = async (output, context) => {
@@ -892,10 +868,9 @@ const de_ListAttendeesCommandError = async (output, context) => {
892
868
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
893
869
  default:
894
870
  const parsedBody = parsedOutput.body;
895
- throwDefaultError({
871
+ return throwDefaultError({
896
872
  output,
897
873
  parsedBody,
898
- exceptionCtor: __BaseException,
899
874
  errorCode,
900
875
  });
901
876
  }
@@ -908,9 +883,10 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
908
883
  $metadata: deserializeMetadata(output),
909
884
  });
910
885
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
911
- if (data.Tags != null) {
912
- contents.Tags = de_TagList(data.Tags, context);
913
- }
886
+ const doc = take(data, {
887
+ Tags: _json,
888
+ });
889
+ Object.assign(contents, doc);
914
890
  return contents;
915
891
  };
916
892
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -925,10 +901,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
925
901
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
926
902
  default:
927
903
  const parsedBody = parsedOutput.body;
928
- throwDefaultError({
904
+ return throwDefaultError({
929
905
  output,
930
906
  parsedBody,
931
- exceptionCtor: __BaseException,
932
907
  errorCode,
933
908
  });
934
909
  }
@@ -979,10 +954,9 @@ const de_StartMeetingTranscriptionCommandError = async (output, context) => {
979
954
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
980
955
  default:
981
956
  const parsedBody = parsedOutput.body;
982
- throwDefaultError({
957
+ return throwDefaultError({
983
958
  output,
984
959
  parsedBody,
985
- exceptionCtor: __BaseException,
986
960
  errorCode,
987
961
  });
988
962
  }
@@ -1030,10 +1004,9 @@ const de_StopMeetingTranscriptionCommandError = async (output, context) => {
1030
1004
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
1031
1005
  default:
1032
1006
  const parsedBody = parsedOutput.body;
1033
- throwDefaultError({
1007
+ return throwDefaultError({
1034
1008
  output,
1035
1009
  parsedBody,
1036
- exceptionCtor: __BaseException,
1037
1010
  errorCode,
1038
1011
  });
1039
1012
  }
@@ -1066,10 +1039,9 @@ const de_TagResourceCommandError = async (output, context) => {
1066
1039
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1067
1040
  default:
1068
1041
  const parsedBody = parsedOutput.body;
1069
- throwDefaultError({
1042
+ return throwDefaultError({
1070
1043
  output,
1071
1044
  parsedBody,
1072
- exceptionCtor: __BaseException,
1073
1045
  errorCode,
1074
1046
  });
1075
1047
  }
@@ -1099,10 +1071,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1099
1071
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1100
1072
  default:
1101
1073
  const parsedBody = parsedOutput.body;
1102
- throwDefaultError({
1074
+ return throwDefaultError({
1103
1075
  output,
1104
1076
  parsedBody,
1105
- exceptionCtor: __BaseException,
1106
1077
  errorCode,
1107
1078
  });
1108
1079
  }
@@ -1115,9 +1086,10 @@ export const de_UpdateAttendeeCapabilitiesCommand = async (output, context) => {
1115
1086
  $metadata: deserializeMetadata(output),
1116
1087
  });
1117
1088
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1118
- if (data.Attendee != null) {
1119
- contents.Attendee = de_Attendee(data.Attendee, context);
1120
- }
1089
+ const doc = take(data, {
1090
+ Attendee: _json,
1091
+ });
1092
+ Object.assign(contents, doc);
1121
1093
  return contents;
1122
1094
  };
1123
1095
  const de_UpdateAttendeeCapabilitiesCommandError = async (output, context) => {
@@ -1147,27 +1119,23 @@ const de_UpdateAttendeeCapabilitiesCommandError = async (output, context) => {
1147
1119
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1148
1120
  default:
1149
1121
  const parsedBody = parsedOutput.body;
1150
- throwDefaultError({
1122
+ return throwDefaultError({
1151
1123
  output,
1152
1124
  parsedBody,
1153
- exceptionCtor: __BaseException,
1154
1125
  errorCode,
1155
1126
  });
1156
1127
  }
1157
1128
  };
1158
- const map = __map;
1129
+ const throwDefaultError = withBaseException(__BaseException);
1159
1130
  const de_BadRequestExceptionRes = async (parsedOutput, context) => {
1160
1131
  const contents = map({});
1161
1132
  const data = parsedOutput.body;
1162
- if (data.Code != null) {
1163
- contents.Code = __expectString(data.Code);
1164
- }
1165
- if (data.Message != null) {
1166
- contents.Message = __expectString(data.Message);
1167
- }
1168
- if (data.RequestId != null) {
1169
- contents.RequestId = __expectString(data.RequestId);
1170
- }
1133
+ const doc = take(data, {
1134
+ Code: __expectString,
1135
+ Message: __expectString,
1136
+ RequestId: __expectString,
1137
+ });
1138
+ Object.assign(contents, doc);
1171
1139
  const exception = new BadRequestException({
1172
1140
  $metadata: deserializeMetadata(parsedOutput),
1173
1141
  ...contents,
@@ -1177,15 +1145,12 @@ const de_BadRequestExceptionRes = async (parsedOutput, context) => {
1177
1145
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
1178
1146
  const contents = map({});
1179
1147
  const data = parsedOutput.body;
1180
- if (data.Code != null) {
1181
- contents.Code = __expectString(data.Code);
1182
- }
1183
- if (data.Message != null) {
1184
- contents.Message = __expectString(data.Message);
1185
- }
1186
- if (data.RequestId != null) {
1187
- contents.RequestId = __expectString(data.RequestId);
1188
- }
1148
+ const doc = take(data, {
1149
+ Code: __expectString,
1150
+ Message: __expectString,
1151
+ RequestId: __expectString,
1152
+ });
1153
+ Object.assign(contents, doc);
1189
1154
  const exception = new ConflictException({
1190
1155
  $metadata: deserializeMetadata(parsedOutput),
1191
1156
  ...contents,
@@ -1195,15 +1160,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1195
1160
  const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
1196
1161
  const contents = map({});
1197
1162
  const data = parsedOutput.body;
1198
- if (data.Code != null) {
1199
- contents.Code = __expectString(data.Code);
1200
- }
1201
- if (data.Message != null) {
1202
- contents.Message = __expectString(data.Message);
1203
- }
1204
- if (data.RequestId != null) {
1205
- contents.RequestId = __expectString(data.RequestId);
1206
- }
1163
+ const doc = take(data, {
1164
+ Code: __expectString,
1165
+ Message: __expectString,
1166
+ RequestId: __expectString,
1167
+ });
1168
+ Object.assign(contents, doc);
1207
1169
  const exception = new ForbiddenException({
1208
1170
  $metadata: deserializeMetadata(parsedOutput),
1209
1171
  ...contents,
@@ -1213,15 +1175,12 @@ const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
1213
1175
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1214
1176
  const contents = map({});
1215
1177
  const data = parsedOutput.body;
1216
- if (data.Code != null) {
1217
- contents.Code = __expectString(data.Code);
1218
- }
1219
- if (data.Message != null) {
1220
- contents.Message = __expectString(data.Message);
1221
- }
1222
- if (data.RequestId != null) {
1223
- contents.RequestId = __expectString(data.RequestId);
1224
- }
1178
+ const doc = take(data, {
1179
+ Code: __expectString,
1180
+ Message: __expectString,
1181
+ RequestId: __expectString,
1182
+ });
1183
+ Object.assign(contents, doc);
1225
1184
  const exception = new LimitExceededException({
1226
1185
  $metadata: deserializeMetadata(parsedOutput),
1227
1186
  ...contents,
@@ -1231,15 +1190,12 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1231
1190
  const de_NotFoundExceptionRes = async (parsedOutput, context) => {
1232
1191
  const contents = map({});
1233
1192
  const data = parsedOutput.body;
1234
- if (data.Code != null) {
1235
- contents.Code = __expectString(data.Code);
1236
- }
1237
- if (data.Message != null) {
1238
- contents.Message = __expectString(data.Message);
1239
- }
1240
- if (data.RequestId != null) {
1241
- contents.RequestId = __expectString(data.RequestId);
1242
- }
1193
+ const doc = take(data, {
1194
+ Code: __expectString,
1195
+ Message: __expectString,
1196
+ RequestId: __expectString,
1197
+ });
1198
+ Object.assign(contents, doc);
1243
1199
  const exception = new NotFoundException({
1244
1200
  $metadata: deserializeMetadata(parsedOutput),
1245
1201
  ...contents,
@@ -1249,18 +1205,13 @@ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
1249
1205
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1250
1206
  const contents = map({});
1251
1207
  const data = parsedOutput.body;
1252
- if (data.Code != null) {
1253
- contents.Code = __expectString(data.Code);
1254
- }
1255
- if (data.Message != null) {
1256
- contents.Message = __expectString(data.Message);
1257
- }
1258
- if (data.RequestId != null) {
1259
- contents.RequestId = __expectString(data.RequestId);
1260
- }
1261
- if (data.ResourceName != null) {
1262
- contents.ResourceName = __expectString(data.ResourceName);
1263
- }
1208
+ const doc = take(data, {
1209
+ Code: __expectString,
1210
+ Message: __expectString,
1211
+ RequestId: __expectString,
1212
+ ResourceName: __expectString,
1213
+ });
1214
+ Object.assign(contents, doc);
1264
1215
  const exception = new ResourceNotFoundException({
1265
1216
  $metadata: deserializeMetadata(parsedOutput),
1266
1217
  ...contents,
@@ -1270,15 +1221,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1270
1221
  const de_ServiceFailureExceptionRes = async (parsedOutput, context) => {
1271
1222
  const contents = map({});
1272
1223
  const data = parsedOutput.body;
1273
- if (data.Code != null) {
1274
- contents.Code = __expectString(data.Code);
1275
- }
1276
- if (data.Message != null) {
1277
- contents.Message = __expectString(data.Message);
1278
- }
1279
- if (data.RequestId != null) {
1280
- contents.RequestId = __expectString(data.RequestId);
1281
- }
1224
+ const doc = take(data, {
1225
+ Code: __expectString,
1226
+ Message: __expectString,
1227
+ RequestId: __expectString,
1228
+ });
1229
+ Object.assign(contents, doc);
1282
1230
  const exception = new ServiceFailureException({
1283
1231
  $metadata: deserializeMetadata(parsedOutput),
1284
1232
  ...contents,
@@ -1290,15 +1238,12 @@ const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
1290
1238
  RetryAfterSeconds: [, parsedOutput.headers["retry-after"]],
1291
1239
  });
1292
1240
  const data = parsedOutput.body;
1293
- if (data.Code != null) {
1294
- contents.Code = __expectString(data.Code);
1295
- }
1296
- if (data.Message != null) {
1297
- contents.Message = __expectString(data.Message);
1298
- }
1299
- if (data.RequestId != null) {
1300
- contents.RequestId = __expectString(data.RequestId);
1301
- }
1241
+ const doc = take(data, {
1242
+ Code: __expectString,
1243
+ Message: __expectString,
1244
+ RequestId: __expectString,
1245
+ });
1246
+ Object.assign(contents, doc);
1302
1247
  const exception = new ServiceUnavailableException({
1303
1248
  $metadata: deserializeMetadata(parsedOutput),
1304
1249
  ...contents,
@@ -1308,15 +1253,12 @@ const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
1308
1253
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1309
1254
  const contents = map({});
1310
1255
  const data = parsedOutput.body;
1311
- if (data.Code != null) {
1312
- contents.Code = __expectString(data.Code);
1313
- }
1314
- if (data.Message != null) {
1315
- contents.Message = __expectString(data.Message);
1316
- }
1317
- if (data.RequestId != null) {
1318
- contents.RequestId = __expectString(data.RequestId);
1319
- }
1256
+ const doc = take(data, {
1257
+ Code: __expectString,
1258
+ Message: __expectString,
1259
+ RequestId: __expectString,
1260
+ });
1261
+ Object.assign(contents, doc);
1320
1262
  const exception = new ThrottlingException({
1321
1263
  $metadata: deserializeMetadata(parsedOutput),
1322
1264
  ...contents,
@@ -1326,18 +1268,13 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1326
1268
  const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
1327
1269
  const contents = map({});
1328
1270
  const data = parsedOutput.body;
1329
- if (data.Code != null) {
1330
- contents.Code = __expectString(data.Code);
1331
- }
1332
- if (data.Message != null) {
1333
- contents.Message = __expectString(data.Message);
1334
- }
1335
- if (data.RequestId != null) {
1336
- contents.RequestId = __expectString(data.RequestId);
1337
- }
1338
- if (data.ResourceName != null) {
1339
- contents.ResourceName = __expectString(data.ResourceName);
1340
- }
1271
+ const doc = take(data, {
1272
+ Code: __expectString,
1273
+ Message: __expectString,
1274
+ RequestId: __expectString,
1275
+ ResourceName: __expectString,
1276
+ });
1277
+ Object.assign(contents, doc);
1341
1278
  const exception = new TooManyTagsException({
1342
1279
  $metadata: deserializeMetadata(parsedOutput),
1343
1280
  ...contents,
@@ -1347,15 +1284,12 @@ const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
1347
1284
  const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
1348
1285
  const contents = map({});
1349
1286
  const data = parsedOutput.body;
1350
- if (data.Code != null) {
1351
- contents.Code = __expectString(data.Code);
1352
- }
1353
- if (data.Message != null) {
1354
- contents.Message = __expectString(data.Message);
1355
- }
1356
- if (data.RequestId != null) {
1357
- contents.RequestId = __expectString(data.RequestId);
1358
- }
1287
+ const doc = take(data, {
1288
+ Code: __expectString,
1289
+ Message: __expectString,
1290
+ RequestId: __expectString,
1291
+ });
1292
+ Object.assign(contents, doc);
1359
1293
  const exception = new UnauthorizedException({
1360
1294
  $metadata: deserializeMetadata(parsedOutput),
1361
1295
  ...contents,
@@ -1365,251 +1299,18 @@ const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
1365
1299
  const de_UnprocessableEntityExceptionRes = async (parsedOutput, context) => {
1366
1300
  const contents = map({});
1367
1301
  const data = parsedOutput.body;
1368
- if (data.Code != null) {
1369
- contents.Code = __expectString(data.Code);
1370
- }
1371
- if (data.Message != null) {
1372
- contents.Message = __expectString(data.Message);
1373
- }
1374
- if (data.RequestId != null) {
1375
- contents.RequestId = __expectString(data.RequestId);
1376
- }
1302
+ const doc = take(data, {
1303
+ Code: __expectString,
1304
+ Message: __expectString,
1305
+ RequestId: __expectString,
1306
+ });
1307
+ Object.assign(contents, doc);
1377
1308
  const exception = new UnprocessableEntityException({
1378
1309
  $metadata: deserializeMetadata(parsedOutput),
1379
1310
  ...contents,
1380
1311
  });
1381
1312
  return __decorateServiceException(exception, parsedOutput.body);
1382
1313
  };
1383
- const se_AttendeeCapabilities = (input, context) => {
1384
- return {
1385
- ...(input.Audio != null && { Audio: input.Audio }),
1386
- ...(input.Content != null && { Content: input.Content }),
1387
- ...(input.Video != null && { Video: input.Video }),
1388
- };
1389
- };
1390
- const se_AttendeeIdItem = (input, context) => {
1391
- return {
1392
- ...(input.AttendeeId != null && { AttendeeId: input.AttendeeId }),
1393
- };
1394
- };
1395
- const se_AttendeeIdsList = (input, context) => {
1396
- return input
1397
- .filter((e) => e != null)
1398
- .map((entry) => {
1399
- return se_AttendeeIdItem(entry, context);
1400
- });
1401
- };
1402
- const se_AudioFeatures = (input, context) => {
1403
- return {
1404
- ...(input.EchoReduction != null && { EchoReduction: input.EchoReduction }),
1405
- };
1406
- };
1407
- const se_CreateAttendeeRequestItem = (input, context) => {
1408
- return {
1409
- ...(input.Capabilities != null && { Capabilities: se_AttendeeCapabilities(input.Capabilities, context) }),
1410
- ...(input.ExternalUserId != null && { ExternalUserId: input.ExternalUserId }),
1411
- };
1412
- };
1413
- const se_CreateAttendeeRequestItemList = (input, context) => {
1414
- return input
1415
- .filter((e) => e != null)
1416
- .map((entry) => {
1417
- return se_CreateAttendeeRequestItem(entry, context);
1418
- });
1419
- };
1420
- const se_CreateMeetingWithAttendeesRequestItemList = (input, context) => {
1421
- return input
1422
- .filter((e) => e != null)
1423
- .map((entry) => {
1424
- return se_CreateAttendeeRequestItem(entry, context);
1425
- });
1426
- };
1427
- const se_EngineTranscribeMedicalSettings = (input, context) => {
1428
- return {
1429
- ...(input.ContentIdentificationType != null && { ContentIdentificationType: input.ContentIdentificationType }),
1430
- ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }),
1431
- ...(input.Region != null && { Region: input.Region }),
1432
- ...(input.Specialty != null && { Specialty: input.Specialty }),
1433
- ...(input.Type != null && { Type: input.Type }),
1434
- ...(input.VocabularyName != null && { VocabularyName: input.VocabularyName }),
1435
- };
1436
- };
1437
- const se_EngineTranscribeSettings = (input, context) => {
1438
- return {
1439
- ...(input.ContentIdentificationType != null && { ContentIdentificationType: input.ContentIdentificationType }),
1440
- ...(input.ContentRedactionType != null && { ContentRedactionType: input.ContentRedactionType }),
1441
- ...(input.EnablePartialResultsStabilization != null && {
1442
- EnablePartialResultsStabilization: input.EnablePartialResultsStabilization,
1443
- }),
1444
- ...(input.IdentifyLanguage != null && { IdentifyLanguage: input.IdentifyLanguage }),
1445
- ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }),
1446
- ...(input.LanguageModelName != null && { LanguageModelName: input.LanguageModelName }),
1447
- ...(input.LanguageOptions != null && { LanguageOptions: input.LanguageOptions }),
1448
- ...(input.PartialResultsStability != null && { PartialResultsStability: input.PartialResultsStability }),
1449
- ...(input.PiiEntityTypes != null && { PiiEntityTypes: input.PiiEntityTypes }),
1450
- ...(input.PreferredLanguage != null && { PreferredLanguage: input.PreferredLanguage }),
1451
- ...(input.Region != null && { Region: input.Region }),
1452
- ...(input.VocabularyFilterMethod != null && { VocabularyFilterMethod: input.VocabularyFilterMethod }),
1453
- ...(input.VocabularyFilterName != null && { VocabularyFilterName: input.VocabularyFilterName }),
1454
- ...(input.VocabularyName != null && { VocabularyName: input.VocabularyName }),
1455
- };
1456
- };
1457
- const se_MeetingFeaturesConfiguration = (input, context) => {
1458
- return {
1459
- ...(input.Audio != null && { Audio: se_AudioFeatures(input.Audio, context) }),
1460
- };
1461
- };
1462
- const se_NotificationsConfiguration = (input, context) => {
1463
- return {
1464
- ...(input.LambdaFunctionArn != null && { LambdaFunctionArn: input.LambdaFunctionArn }),
1465
- ...(input.SnsTopicArn != null && { SnsTopicArn: input.SnsTopicArn }),
1466
- ...(input.SqsQueueArn != null && { SqsQueueArn: input.SqsQueueArn }),
1467
- };
1468
- };
1469
- const se_Tag = (input, context) => {
1470
- return {
1471
- ...(input.Key != null && { Key: input.Key }),
1472
- ...(input.Value != null && { Value: input.Value }),
1473
- };
1474
- };
1475
- const se_TagKeyList = (input, context) => {
1476
- return input
1477
- .filter((e) => e != null)
1478
- .map((entry) => {
1479
- return entry;
1480
- });
1481
- };
1482
- const se_TagList = (input, context) => {
1483
- return input
1484
- .filter((e) => e != null)
1485
- .map((entry) => {
1486
- return se_Tag(entry, context);
1487
- });
1488
- };
1489
- const se_TenantIdList = (input, context) => {
1490
- return input
1491
- .filter((e) => e != null)
1492
- .map((entry) => {
1493
- return entry;
1494
- });
1495
- };
1496
- const se_TranscriptionConfiguration = (input, context) => {
1497
- return {
1498
- ...(input.EngineTranscribeMedicalSettings != null && {
1499
- EngineTranscribeMedicalSettings: se_EngineTranscribeMedicalSettings(input.EngineTranscribeMedicalSettings, context),
1500
- }),
1501
- ...(input.EngineTranscribeSettings != null && {
1502
- EngineTranscribeSettings: se_EngineTranscribeSettings(input.EngineTranscribeSettings, context),
1503
- }),
1504
- };
1505
- };
1506
- const de_Attendee = (output, context) => {
1507
- return {
1508
- AttendeeId: __expectString(output.AttendeeId),
1509
- Capabilities: output.Capabilities != null ? de_AttendeeCapabilities(output.Capabilities, context) : undefined,
1510
- ExternalUserId: __expectString(output.ExternalUserId),
1511
- JoinToken: __expectString(output.JoinToken),
1512
- };
1513
- };
1514
- const de_AttendeeCapabilities = (output, context) => {
1515
- return {
1516
- Audio: __expectString(output.Audio),
1517
- Content: __expectString(output.Content),
1518
- Video: __expectString(output.Video),
1519
- };
1520
- };
1521
- const de_AttendeeList = (output, context) => {
1522
- const retVal = (output || [])
1523
- .filter((e) => e != null)
1524
- .map((entry) => {
1525
- if (entry === null) {
1526
- return null;
1527
- }
1528
- return de_Attendee(entry, context);
1529
- });
1530
- return retVal;
1531
- };
1532
- const de_AudioFeatures = (output, context) => {
1533
- return {
1534
- EchoReduction: __expectString(output.EchoReduction),
1535
- };
1536
- };
1537
- const de_BatchCreateAttendeeErrorList = (output, context) => {
1538
- const retVal = (output || [])
1539
- .filter((e) => e != null)
1540
- .map((entry) => {
1541
- if (entry === null) {
1542
- return null;
1543
- }
1544
- return de_CreateAttendeeError(entry, context);
1545
- });
1546
- return retVal;
1547
- };
1548
- const de_CreateAttendeeError = (output, context) => {
1549
- return {
1550
- ErrorCode: __expectString(output.ErrorCode),
1551
- ErrorMessage: __expectString(output.ErrorMessage),
1552
- ExternalUserId: __expectString(output.ExternalUserId),
1553
- };
1554
- };
1555
- const de_MediaPlacement = (output, context) => {
1556
- return {
1557
- AudioFallbackUrl: __expectString(output.AudioFallbackUrl),
1558
- AudioHostUrl: __expectString(output.AudioHostUrl),
1559
- EventIngestionUrl: __expectString(output.EventIngestionUrl),
1560
- ScreenDataUrl: __expectString(output.ScreenDataUrl),
1561
- ScreenSharingUrl: __expectString(output.ScreenSharingUrl),
1562
- ScreenViewingUrl: __expectString(output.ScreenViewingUrl),
1563
- SignalingUrl: __expectString(output.SignalingUrl),
1564
- TurnControlUrl: __expectString(output.TurnControlUrl),
1565
- };
1566
- };
1567
- const de_Meeting = (output, context) => {
1568
- return {
1569
- ExternalMeetingId: __expectString(output.ExternalMeetingId),
1570
- MediaPlacement: output.MediaPlacement != null ? de_MediaPlacement(output.MediaPlacement, context) : undefined,
1571
- MediaRegion: __expectString(output.MediaRegion),
1572
- MeetingArn: __expectString(output.MeetingArn),
1573
- MeetingFeatures: output.MeetingFeatures != null ? de_MeetingFeaturesConfiguration(output.MeetingFeatures, context) : undefined,
1574
- MeetingHostId: __expectString(output.MeetingHostId),
1575
- MeetingId: __expectString(output.MeetingId),
1576
- PrimaryMeetingId: __expectString(output.PrimaryMeetingId),
1577
- TenantIds: output.TenantIds != null ? de_TenantIdList(output.TenantIds, context) : undefined,
1578
- };
1579
- };
1580
- const de_MeetingFeaturesConfiguration = (output, context) => {
1581
- return {
1582
- Audio: output.Audio != null ? de_AudioFeatures(output.Audio, context) : undefined,
1583
- };
1584
- };
1585
- const de_Tag = (output, context) => {
1586
- return {
1587
- Key: __expectString(output.Key),
1588
- Value: __expectString(output.Value),
1589
- };
1590
- };
1591
- const de_TagList = (output, context) => {
1592
- const retVal = (output || [])
1593
- .filter((e) => e != null)
1594
- .map((entry) => {
1595
- if (entry === null) {
1596
- return null;
1597
- }
1598
- return de_Tag(entry, context);
1599
- });
1600
- return retVal;
1601
- };
1602
- const de_TenantIdList = (output, context) => {
1603
- const retVal = (output || [])
1604
- .filter((e) => e != null)
1605
- .map((entry) => {
1606
- if (entry === null) {
1607
- return null;
1608
- }
1609
- return __expectString(entry);
1610
- });
1611
- return retVal;
1612
- };
1613
1314
  const deserializeMetadata = (output) => ({
1614
1315
  httpStatusCode: output.statusCode,
1615
1316
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],