@aws-sdk/client-chime-sdk-voice 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, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, map as __map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { ChimeSDKVoiceServiceException as __BaseException } from "../models/ChimeSDKVoiceServiceException";
4
4
  import { AccessDeniedException, BadRequestException, ConflictException, ForbiddenException, GoneException, NotFoundException, ResourceLimitExceededException, ServiceFailureException, ServiceUnavailableException, ThrottledClientException, UnauthorizedClientException, UnprocessableEntityException, } from "../models/models_0";
5
5
  export const se_AssociatePhoneNumbersWithVoiceConnectorCommand = async (input, context) => {
@@ -13,12 +13,10 @@ export const se_AssociatePhoneNumbersWithVoiceConnectorCommand = async (input, c
13
13
  operation: [, "associate-phone-numbers"],
14
14
  });
15
15
  let body;
16
- body = JSON.stringify({
17
- ...(input.E164PhoneNumbers != null && {
18
- E164PhoneNumbers: se_E164PhoneNumberList(input.E164PhoneNumbers, context),
19
- }),
20
- ...(input.ForceAssociate != null && { ForceAssociate: input.ForceAssociate }),
21
- });
16
+ body = JSON.stringify(take(input, {
17
+ E164PhoneNumbers: (_) => _json(_),
18
+ ForceAssociate: [],
19
+ }));
22
20
  return new __HttpRequest({
23
21
  protocol,
24
22
  hostname,
@@ -42,12 +40,10 @@ export const se_AssociatePhoneNumbersWithVoiceConnectorGroupCommand = async (inp
42
40
  operation: [, "associate-phone-numbers"],
43
41
  });
44
42
  let body;
45
- body = JSON.stringify({
46
- ...(input.E164PhoneNumbers != null && {
47
- E164PhoneNumbers: se_E164PhoneNumberList(input.E164PhoneNumbers, context),
48
- }),
49
- ...(input.ForceAssociate != null && { ForceAssociate: input.ForceAssociate }),
50
- });
43
+ body = JSON.stringify(take(input, {
44
+ E164PhoneNumbers: (_) => _json(_),
45
+ ForceAssociate: [],
46
+ }));
51
47
  return new __HttpRequest({
52
48
  protocol,
53
49
  hostname,
@@ -69,9 +65,9 @@ export const se_BatchDeletePhoneNumberCommand = async (input, context) => {
69
65
  operation: [, "batch-delete"],
70
66
  });
71
67
  let body;
72
- body = JSON.stringify({
73
- ...(input.PhoneNumberIds != null && { PhoneNumberIds: se_NonEmptyStringList(input.PhoneNumberIds, context) }),
74
- });
68
+ body = JSON.stringify(take(input, {
69
+ PhoneNumberIds: (_) => _json(_),
70
+ }));
75
71
  return new __HttpRequest({
76
72
  protocol,
77
73
  hostname,
@@ -93,11 +89,9 @@ export const se_BatchUpdatePhoneNumberCommand = async (input, context) => {
93
89
  operation: [, "batch-update"],
94
90
  });
95
91
  let body;
96
- body = JSON.stringify({
97
- ...(input.UpdatePhoneNumberRequestItems != null && {
98
- UpdatePhoneNumberRequestItems: se_UpdatePhoneNumberRequestItemList(input.UpdatePhoneNumberRequestItems, context),
99
- }),
100
- });
92
+ body = JSON.stringify(take(input, {
93
+ UpdatePhoneNumberRequestItems: (_) => _json(_),
94
+ }));
101
95
  return new __HttpRequest({
102
96
  protocol,
103
97
  hostname,
@@ -116,12 +110,10 @@ export const se_CreatePhoneNumberOrderCommand = async (input, context) => {
116
110
  };
117
111
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number-orders";
118
112
  let body;
119
- body = JSON.stringify({
120
- ...(input.E164PhoneNumbers != null && {
121
- E164PhoneNumbers: se_E164PhoneNumberList(input.E164PhoneNumbers, context),
122
- }),
123
- ...(input.ProductType != null && { ProductType: input.ProductType }),
124
- });
113
+ body = JSON.stringify(take(input, {
114
+ E164PhoneNumbers: (_) => _json(_),
115
+ ProductType: [],
116
+ }));
125
117
  return new __HttpRequest({
126
118
  protocol,
127
119
  hostname,
@@ -141,17 +133,15 @@ export const se_CreateProxySessionCommand = async (input, context) => {
141
133
  "/voice-connectors/{VoiceConnectorId}/proxy-sessions";
142
134
  resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
143
135
  let body;
144
- body = JSON.stringify({
145
- ...(input.Capabilities != null && { Capabilities: se_CapabilityList(input.Capabilities, context) }),
146
- ...(input.ExpiryMinutes != null && { ExpiryMinutes: input.ExpiryMinutes }),
147
- ...(input.GeoMatchLevel != null && { GeoMatchLevel: input.GeoMatchLevel }),
148
- ...(input.GeoMatchParams != null && { GeoMatchParams: se_GeoMatchParams(input.GeoMatchParams, context) }),
149
- ...(input.Name != null && { Name: input.Name }),
150
- ...(input.NumberSelectionBehavior != null && { NumberSelectionBehavior: input.NumberSelectionBehavior }),
151
- ...(input.ParticipantPhoneNumbers != null && {
152
- ParticipantPhoneNumbers: se_ParticipantPhoneNumberList(input.ParticipantPhoneNumbers, context),
153
- }),
154
- });
136
+ body = JSON.stringify(take(input, {
137
+ Capabilities: (_) => _json(_),
138
+ ExpiryMinutes: [],
139
+ GeoMatchLevel: [],
140
+ GeoMatchParams: (_) => _json(_),
141
+ Name: [],
142
+ NumberSelectionBehavior: [],
143
+ ParticipantPhoneNumbers: (_) => _json(_),
144
+ }));
155
145
  return new __HttpRequest({
156
146
  protocol,
157
147
  hostname,
@@ -169,11 +159,12 @@ export const se_CreateSipMediaApplicationCommand = async (input, context) => {
169
159
  };
170
160
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-media-applications";
171
161
  let body;
172
- body = JSON.stringify({
173
- ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }),
174
- ...(input.Endpoints != null && { Endpoints: se_SipMediaApplicationEndpointList(input.Endpoints, context) }),
175
- ...(input.Name != null && { Name: input.Name }),
176
- });
162
+ body = JSON.stringify(take(input, {
163
+ AwsRegion: [],
164
+ Endpoints: (_) => _json(_),
165
+ Name: [],
166
+ Tags: (_) => _json(_),
167
+ }));
177
168
  return new __HttpRequest({
178
169
  protocol,
179
170
  hostname,
@@ -193,12 +184,12 @@ export const se_CreateSipMediaApplicationCallCommand = async (input, context) =>
193
184
  "/sip-media-applications/{SipMediaApplicationId}/calls";
194
185
  resolvedPath = __resolvedPath(resolvedPath, input, "SipMediaApplicationId", () => input.SipMediaApplicationId, "{SipMediaApplicationId}", false);
195
186
  let body;
196
- body = JSON.stringify({
197
- ...(input.ArgumentsMap != null && { ArgumentsMap: se_SMACreateCallArgumentsMap(input.ArgumentsMap, context) }),
198
- ...(input.FromPhoneNumber != null && { FromPhoneNumber: input.FromPhoneNumber }),
199
- ...(input.SipHeaders != null && { SipHeaders: se_SipHeadersMap(input.SipHeaders, context) }),
200
- ...(input.ToPhoneNumber != null && { ToPhoneNumber: input.ToPhoneNumber }),
201
- });
187
+ body = JSON.stringify(take(input, {
188
+ ArgumentsMap: (_) => _json(_),
189
+ FromPhoneNumber: [],
190
+ SipHeaders: (_) => _json(_),
191
+ ToPhoneNumber: [],
192
+ }));
202
193
  return new __HttpRequest({
203
194
  protocol,
204
195
  hostname,
@@ -216,15 +207,13 @@ export const se_CreateSipRuleCommand = async (input, context) => {
216
207
  };
217
208
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules";
218
209
  let body;
219
- body = JSON.stringify({
220
- ...(input.Disabled != null && { Disabled: input.Disabled }),
221
- ...(input.Name != null && { Name: input.Name }),
222
- ...(input.TargetApplications != null && {
223
- TargetApplications: se_SipRuleTargetApplicationList(input.TargetApplications, context),
224
- }),
225
- ...(input.TriggerType != null && { TriggerType: input.TriggerType }),
226
- ...(input.TriggerValue != null && { TriggerValue: input.TriggerValue }),
227
- });
210
+ body = JSON.stringify(take(input, {
211
+ Disabled: [],
212
+ Name: [],
213
+ TargetApplications: (_) => _json(_),
214
+ TriggerType: [],
215
+ TriggerValue: [],
216
+ }));
228
217
  return new __HttpRequest({
229
218
  protocol,
230
219
  hostname,
@@ -242,11 +231,12 @@ export const se_CreateVoiceConnectorCommand = async (input, context) => {
242
231
  };
243
232
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors";
244
233
  let body;
245
- body = JSON.stringify({
246
- ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }),
247
- ...(input.Name != null && { Name: input.Name }),
248
- ...(input.RequireEncryption != null && { RequireEncryption: input.RequireEncryption }),
249
- });
234
+ body = JSON.stringify(take(input, {
235
+ AwsRegion: [],
236
+ Name: [],
237
+ RequireEncryption: [],
238
+ Tags: (_) => _json(_),
239
+ }));
250
240
  return new __HttpRequest({
251
241
  protocol,
252
242
  hostname,
@@ -264,12 +254,10 @@ export const se_CreateVoiceConnectorGroupCommand = async (input, context) => {
264
254
  };
265
255
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connector-groups";
266
256
  let body;
267
- body = JSON.stringify({
268
- ...(input.Name != null && { Name: input.Name }),
269
- ...(input.VoiceConnectorItems != null && {
270
- VoiceConnectorItems: se_VoiceConnectorItemList(input.VoiceConnectorItems, context),
271
- }),
272
- });
257
+ body = JSON.stringify(take(input, {
258
+ Name: [],
259
+ VoiceConnectorItems: (_) => _json(_),
260
+ }));
273
261
  return new __HttpRequest({
274
262
  protocol,
275
263
  hostname,
@@ -287,9 +275,9 @@ export const se_CreateVoiceProfileCommand = async (input, context) => {
287
275
  };
288
276
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-profiles";
289
277
  let body;
290
- body = JSON.stringify({
291
- ...(input.SpeakerSearchTaskId != null && { SpeakerSearchTaskId: input.SpeakerSearchTaskId }),
292
- });
278
+ body = JSON.stringify(take(input, {
279
+ SpeakerSearchTaskId: [],
280
+ }));
293
281
  return new __HttpRequest({
294
282
  protocol,
295
283
  hostname,
@@ -307,15 +295,13 @@ export const se_CreateVoiceProfileDomainCommand = async (input, context) => {
307
295
  };
308
296
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-profile-domains";
309
297
  let body;
310
- body = JSON.stringify({
311
- ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
312
- ...(input.Description != null && { Description: input.Description }),
313
- ...(input.Name != null && { Name: input.Name }),
314
- ...(input.ServerSideEncryptionConfiguration != null && {
315
- ServerSideEncryptionConfiguration: se_ServerSideEncryptionConfiguration(input.ServerSideEncryptionConfiguration, context),
316
- }),
317
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
318
- });
298
+ body = JSON.stringify(take(input, {
299
+ ClientRequestToken: [],
300
+ Description: [],
301
+ Name: [],
302
+ ServerSideEncryptionConfiguration: (_) => _json(_),
303
+ Tags: (_) => _json(_),
304
+ }));
319
305
  return new __HttpRequest({
320
306
  protocol,
321
307
  hostname,
@@ -523,9 +509,9 @@ export const se_DeleteVoiceConnectorTerminationCredentialsCommand = async (input
523
509
  operation: [, "delete"],
524
510
  });
525
511
  let body;
526
- body = JSON.stringify({
527
- ...(input.Usernames != null && { Usernames: se_SensitiveStringList(input.Usernames, context) }),
528
- });
512
+ body = JSON.stringify(take(input, {
513
+ Usernames: (_) => _json(_),
514
+ }));
529
515
  return new __HttpRequest({
530
516
  protocol,
531
517
  hostname,
@@ -581,11 +567,9 @@ export const se_DisassociatePhoneNumbersFromVoiceConnectorCommand = async (input
581
567
  operation: [, "disassociate-phone-numbers"],
582
568
  });
583
569
  let body;
584
- body = JSON.stringify({
585
- ...(input.E164PhoneNumbers != null && {
586
- E164PhoneNumbers: se_E164PhoneNumberList(input.E164PhoneNumbers, context),
587
- }),
588
- });
570
+ body = JSON.stringify(take(input, {
571
+ E164PhoneNumbers: (_) => _json(_),
572
+ }));
589
573
  return new __HttpRequest({
590
574
  protocol,
591
575
  hostname,
@@ -609,11 +593,9 @@ export const se_DisassociatePhoneNumbersFromVoiceConnectorGroupCommand = async (
609
593
  operation: [, "disassociate-phone-numbers"],
610
594
  });
611
595
  let body;
612
- body = JSON.stringify({
613
- ...(input.E164PhoneNumbers != null && {
614
- E164PhoneNumbers: se_E164PhoneNumberList(input.E164PhoneNumbers, context),
615
- }),
616
- });
596
+ body = JSON.stringify(take(input, {
597
+ E164PhoneNumbers: (_) => _json(_),
598
+ }));
617
599
  return new __HttpRequest({
618
600
  protocol,
619
601
  hostname,
@@ -1274,11 +1256,9 @@ export const se_PutSipMediaApplicationAlexaSkillConfigurationCommand = async (in
1274
1256
  "/sip-media-applications/{SipMediaApplicationId}/alexa-skill-configuration";
1275
1257
  resolvedPath = __resolvedPath(resolvedPath, input, "SipMediaApplicationId", () => input.SipMediaApplicationId, "{SipMediaApplicationId}", false);
1276
1258
  let body;
1277
- body = JSON.stringify({
1278
- ...(input.SipMediaApplicationAlexaSkillConfiguration != null && {
1279
- SipMediaApplicationAlexaSkillConfiguration: se_SipMediaApplicationAlexaSkillConfiguration(input.SipMediaApplicationAlexaSkillConfiguration, context),
1280
- }),
1281
- });
1259
+ body = JSON.stringify(take(input, {
1260
+ SipMediaApplicationAlexaSkillConfiguration: (_) => _json(_),
1261
+ }));
1282
1262
  return new __HttpRequest({
1283
1263
  protocol,
1284
1264
  hostname,
@@ -1298,11 +1278,9 @@ export const se_PutSipMediaApplicationLoggingConfigurationCommand = async (input
1298
1278
  "/sip-media-applications/{SipMediaApplicationId}/logging-configuration";
1299
1279
  resolvedPath = __resolvedPath(resolvedPath, input, "SipMediaApplicationId", () => input.SipMediaApplicationId, "{SipMediaApplicationId}", false);
1300
1280
  let body;
1301
- body = JSON.stringify({
1302
- ...(input.SipMediaApplicationLoggingConfiguration != null && {
1303
- SipMediaApplicationLoggingConfiguration: se_SipMediaApplicationLoggingConfiguration(input.SipMediaApplicationLoggingConfiguration, context),
1304
- }),
1305
- });
1281
+ body = JSON.stringify(take(input, {
1282
+ SipMediaApplicationLoggingConfiguration: (_) => _json(_),
1283
+ }));
1306
1284
  return new __HttpRequest({
1307
1285
  protocol,
1308
1286
  hostname,
@@ -1322,11 +1300,9 @@ export const se_PutVoiceConnectorEmergencyCallingConfigurationCommand = async (i
1322
1300
  "/voice-connectors/{VoiceConnectorId}/emergency-calling-configuration";
1323
1301
  resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1324
1302
  let body;
1325
- body = JSON.stringify({
1326
- ...(input.EmergencyCallingConfiguration != null && {
1327
- EmergencyCallingConfiguration: se_EmergencyCallingConfiguration(input.EmergencyCallingConfiguration, context),
1328
- }),
1329
- });
1303
+ body = JSON.stringify(take(input, {
1304
+ EmergencyCallingConfiguration: (_) => _json(_),
1305
+ }));
1330
1306
  return new __HttpRequest({
1331
1307
  protocol,
1332
1308
  hostname,
@@ -1346,11 +1322,9 @@ export const se_PutVoiceConnectorLoggingConfigurationCommand = async (input, con
1346
1322
  "/voice-connectors/{VoiceConnectorId}/logging-configuration";
1347
1323
  resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1348
1324
  let body;
1349
- body = JSON.stringify({
1350
- ...(input.LoggingConfiguration != null && {
1351
- LoggingConfiguration: se_LoggingConfiguration(input.LoggingConfiguration, context),
1352
- }),
1353
- });
1325
+ body = JSON.stringify(take(input, {
1326
+ LoggingConfiguration: (_) => _json(_),
1327
+ }));
1354
1328
  return new __HttpRequest({
1355
1329
  protocol,
1356
1330
  hostname,
@@ -1370,9 +1344,9 @@ export const se_PutVoiceConnectorOriginationCommand = async (input, context) =>
1370
1344
  "/voice-connectors/{VoiceConnectorId}/origination";
1371
1345
  resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1372
1346
  let body;
1373
- body = JSON.stringify({
1374
- ...(input.Origination != null && { Origination: se_Origination(input.Origination, context) }),
1375
- });
1347
+ body = JSON.stringify(take(input, {
1348
+ Origination: (_) => _json(_),
1349
+ }));
1376
1350
  return new __HttpRequest({
1377
1351
  protocol,
1378
1352
  hostname,
@@ -1392,16 +1366,12 @@ export const se_PutVoiceConnectorProxyCommand = async (input, context) => {
1392
1366
  "/voice-connectors/{VoiceConnectorId}/programmable-numbers/proxy";
1393
1367
  resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1394
1368
  let body;
1395
- body = JSON.stringify({
1396
- ...(input.DefaultSessionExpiryMinutes != null && {
1397
- DefaultSessionExpiryMinutes: input.DefaultSessionExpiryMinutes,
1398
- }),
1399
- ...(input.Disabled != null && { Disabled: input.Disabled }),
1400
- ...(input.FallBackPhoneNumber != null && { FallBackPhoneNumber: input.FallBackPhoneNumber }),
1401
- ...(input.PhoneNumberPoolCountries != null && {
1402
- PhoneNumberPoolCountries: se_CountryList(input.PhoneNumberPoolCountries, context),
1403
- }),
1404
- });
1369
+ body = JSON.stringify(take(input, {
1370
+ DefaultSessionExpiryMinutes: [],
1371
+ Disabled: [],
1372
+ FallBackPhoneNumber: [],
1373
+ PhoneNumberPoolCountries: (_) => _json(_),
1374
+ }));
1405
1375
  return new __HttpRequest({
1406
1376
  protocol,
1407
1377
  hostname,
@@ -1421,11 +1391,9 @@ export const se_PutVoiceConnectorStreamingConfigurationCommand = async (input, c
1421
1391
  "/voice-connectors/{VoiceConnectorId}/streaming-configuration";
1422
1392
  resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1423
1393
  let body;
1424
- body = JSON.stringify({
1425
- ...(input.StreamingConfiguration != null && {
1426
- StreamingConfiguration: se_StreamingConfiguration(input.StreamingConfiguration, context),
1427
- }),
1428
- });
1394
+ body = JSON.stringify(take(input, {
1395
+ StreamingConfiguration: (_) => _json(_),
1396
+ }));
1429
1397
  return new __HttpRequest({
1430
1398
  protocol,
1431
1399
  hostname,
@@ -1445,9 +1413,9 @@ export const se_PutVoiceConnectorTerminationCommand = async (input, context) =>
1445
1413
  "/voice-connectors/{VoiceConnectorId}/termination";
1446
1414
  resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1447
1415
  let body;
1448
- body = JSON.stringify({
1449
- ...(input.Termination != null && { Termination: se_Termination(input.Termination, context) }),
1450
- });
1416
+ body = JSON.stringify(take(input, {
1417
+ Termination: (_) => _json(_),
1418
+ }));
1451
1419
  return new __HttpRequest({
1452
1420
  protocol,
1453
1421
  hostname,
@@ -1470,9 +1438,9 @@ export const se_PutVoiceConnectorTerminationCredentialsCommand = async (input, c
1470
1438
  operation: [, "put"],
1471
1439
  });
1472
1440
  let body;
1473
- body = JSON.stringify({
1474
- ...(input.Credentials != null && { Credentials: se_CredentialList(input.Credentials, context) }),
1475
- });
1441
+ body = JSON.stringify(take(input, {
1442
+ Credentials: (_) => _json(_),
1443
+ }));
1476
1444
  return new __HttpRequest({
1477
1445
  protocol,
1478
1446
  hostname,
@@ -1540,11 +1508,11 @@ export const se_StartSpeakerSearchTaskCommand = async (input, context) => {
1540
1508
  "/voice-connectors/{VoiceConnectorId}/speaker-search-tasks";
1541
1509
  resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1542
1510
  let body;
1543
- body = JSON.stringify({
1544
- ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
1545
- ...(input.TransactionId != null && { TransactionId: input.TransactionId }),
1546
- ...(input.VoiceProfileDomainId != null && { VoiceProfileDomainId: input.VoiceProfileDomainId }),
1547
- });
1511
+ body = JSON.stringify(take(input, {
1512
+ ClientRequestToken: [],
1513
+ TransactionId: [],
1514
+ VoiceProfileDomainId: [],
1515
+ }));
1548
1516
  return new __HttpRequest({
1549
1517
  protocol,
1550
1518
  hostname,
@@ -1564,11 +1532,11 @@ export const se_StartVoiceToneAnalysisTaskCommand = async (input, context) => {
1564
1532
  "/voice-connectors/{VoiceConnectorId}/voice-tone-analysis-tasks";
1565
1533
  resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1566
1534
  let body;
1567
- body = JSON.stringify({
1568
- ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
1569
- ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }),
1570
- ...(input.TransactionId != null && { TransactionId: input.TransactionId }),
1571
- });
1535
+ body = JSON.stringify(take(input, {
1536
+ ClientRequestToken: [],
1537
+ LanguageCode: [],
1538
+ TransactionId: [],
1539
+ }));
1572
1540
  return new __HttpRequest({
1573
1541
  protocol,
1574
1542
  hostname,
@@ -1633,10 +1601,10 @@ export const se_TagResourceCommand = async (input, context) => {
1633
1601
  operation: [, "tag-resource"],
1634
1602
  });
1635
1603
  let body;
1636
- body = JSON.stringify({
1637
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1638
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1639
- });
1604
+ body = JSON.stringify(take(input, {
1605
+ ResourceARN: [],
1606
+ Tags: (_) => _json(_),
1607
+ }));
1640
1608
  return new __HttpRequest({
1641
1609
  protocol,
1642
1610
  hostname,
@@ -1658,10 +1626,10 @@ export const se_UntagResourceCommand = async (input, context) => {
1658
1626
  operation: [, "untag-resource"],
1659
1627
  });
1660
1628
  let body;
1661
- body = JSON.stringify({
1662
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1663
- ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }),
1664
- });
1629
+ body = JSON.stringify(take(input, {
1630
+ ResourceARN: [],
1631
+ TagKeys: (_) => _json(_),
1632
+ }));
1665
1633
  return new __HttpRequest({
1666
1634
  protocol,
1667
1635
  hostname,
@@ -1680,9 +1648,9 @@ export const se_UpdateGlobalSettingsCommand = async (input, context) => {
1680
1648
  };
1681
1649
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/settings";
1682
1650
  let body;
1683
- body = JSON.stringify({
1684
- ...(input.VoiceConnector != null && { VoiceConnector: se_VoiceConnectorSettings(input.VoiceConnector, context) }),
1685
- });
1651
+ body = JSON.stringify(take(input, {
1652
+ VoiceConnector: (_) => _json(_),
1653
+ }));
1686
1654
  return new __HttpRequest({
1687
1655
  protocol,
1688
1656
  hostname,
@@ -1701,10 +1669,10 @@ export const se_UpdatePhoneNumberCommand = async (input, context) => {
1701
1669
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers/{PhoneNumberId}";
1702
1670
  resolvedPath = __resolvedPath(resolvedPath, input, "PhoneNumberId", () => input.PhoneNumberId, "{PhoneNumberId}", false);
1703
1671
  let body;
1704
- body = JSON.stringify({
1705
- ...(input.CallingName != null && { CallingName: input.CallingName }),
1706
- ...(input.ProductType != null && { ProductType: input.ProductType }),
1707
- });
1672
+ body = JSON.stringify(take(input, {
1673
+ CallingName: [],
1674
+ ProductType: [],
1675
+ }));
1708
1676
  return new __HttpRequest({
1709
1677
  protocol,
1710
1678
  hostname,
@@ -1722,9 +1690,9 @@ export const se_UpdatePhoneNumberSettingsCommand = async (input, context) => {
1722
1690
  };
1723
1691
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/settings/phone-number";
1724
1692
  let body;
1725
- body = JSON.stringify({
1726
- ...(input.CallingName != null && { CallingName: input.CallingName }),
1727
- });
1693
+ body = JSON.stringify(take(input, {
1694
+ CallingName: [],
1695
+ }));
1728
1696
  return new __HttpRequest({
1729
1697
  protocol,
1730
1698
  hostname,
@@ -1745,10 +1713,10 @@ export const se_UpdateProxySessionCommand = async (input, context) => {
1745
1713
  resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1746
1714
  resolvedPath = __resolvedPath(resolvedPath, input, "ProxySessionId", () => input.ProxySessionId, "{ProxySessionId}", false);
1747
1715
  let body;
1748
- body = JSON.stringify({
1749
- ...(input.Capabilities != null && { Capabilities: se_CapabilityList(input.Capabilities, context) }),
1750
- ...(input.ExpiryMinutes != null && { ExpiryMinutes: input.ExpiryMinutes }),
1751
- });
1716
+ body = JSON.stringify(take(input, {
1717
+ Capabilities: (_) => _json(_),
1718
+ ExpiryMinutes: [],
1719
+ }));
1752
1720
  return new __HttpRequest({
1753
1721
  protocol,
1754
1722
  hostname,
@@ -1768,10 +1736,10 @@ export const se_UpdateSipMediaApplicationCommand = async (input, context) => {
1768
1736
  "/sip-media-applications/{SipMediaApplicationId}";
1769
1737
  resolvedPath = __resolvedPath(resolvedPath, input, "SipMediaApplicationId", () => input.SipMediaApplicationId, "{SipMediaApplicationId}", false);
1770
1738
  let body;
1771
- body = JSON.stringify({
1772
- ...(input.Endpoints != null && { Endpoints: se_SipMediaApplicationEndpointList(input.Endpoints, context) }),
1773
- ...(input.Name != null && { Name: input.Name }),
1774
- });
1739
+ body = JSON.stringify(take(input, {
1740
+ Endpoints: (_) => _json(_),
1741
+ Name: [],
1742
+ }));
1775
1743
  return new __HttpRequest({
1776
1744
  protocol,
1777
1745
  hostname,
@@ -1792,9 +1760,9 @@ export const se_UpdateSipMediaApplicationCallCommand = async (input, context) =>
1792
1760
  resolvedPath = __resolvedPath(resolvedPath, input, "SipMediaApplicationId", () => input.SipMediaApplicationId, "{SipMediaApplicationId}", false);
1793
1761
  resolvedPath = __resolvedPath(resolvedPath, input, "TransactionId", () => input.TransactionId, "{TransactionId}", false);
1794
1762
  let body;
1795
- body = JSON.stringify({
1796
- ...(input.Arguments != null && { Arguments: se_SMAUpdateCallArgumentsMap(input.Arguments, context) }),
1797
- });
1763
+ body = JSON.stringify(take(input, {
1764
+ Arguments: (_) => _json(_),
1765
+ }));
1798
1766
  return new __HttpRequest({
1799
1767
  protocol,
1800
1768
  hostname,
@@ -1813,13 +1781,11 @@ export const se_UpdateSipRuleCommand = async (input, context) => {
1813
1781
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules/{SipRuleId}";
1814
1782
  resolvedPath = __resolvedPath(resolvedPath, input, "SipRuleId", () => input.SipRuleId, "{SipRuleId}", false);
1815
1783
  let body;
1816
- body = JSON.stringify({
1817
- ...(input.Disabled != null && { Disabled: input.Disabled }),
1818
- ...(input.Name != null && { Name: input.Name }),
1819
- ...(input.TargetApplications != null && {
1820
- TargetApplications: se_SipRuleTargetApplicationList(input.TargetApplications, context),
1821
- }),
1822
- });
1784
+ body = JSON.stringify(take(input, {
1785
+ Disabled: [],
1786
+ Name: [],
1787
+ TargetApplications: (_) => _json(_),
1788
+ }));
1823
1789
  return new __HttpRequest({
1824
1790
  protocol,
1825
1791
  hostname,
@@ -1838,10 +1804,10 @@ export const se_UpdateVoiceConnectorCommand = async (input, context) => {
1838
1804
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors/{VoiceConnectorId}";
1839
1805
  resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1840
1806
  let body;
1841
- body = JSON.stringify({
1842
- ...(input.Name != null && { Name: input.Name }),
1843
- ...(input.RequireEncryption != null && { RequireEncryption: input.RequireEncryption }),
1844
- });
1807
+ body = JSON.stringify(take(input, {
1808
+ Name: [],
1809
+ RequireEncryption: [],
1810
+ }));
1845
1811
  return new __HttpRequest({
1846
1812
  protocol,
1847
1813
  hostname,
@@ -1861,12 +1827,10 @@ export const se_UpdateVoiceConnectorGroupCommand = async (input, context) => {
1861
1827
  "/voice-connector-groups/{VoiceConnectorGroupId}";
1862
1828
  resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorGroupId", () => input.VoiceConnectorGroupId, "{VoiceConnectorGroupId}", false);
1863
1829
  let body;
1864
- body = JSON.stringify({
1865
- ...(input.Name != null && { Name: input.Name }),
1866
- ...(input.VoiceConnectorItems != null && {
1867
- VoiceConnectorItems: se_VoiceConnectorItemList(input.VoiceConnectorItems, context),
1868
- }),
1869
- });
1830
+ body = JSON.stringify(take(input, {
1831
+ Name: [],
1832
+ VoiceConnectorItems: (_) => _json(_),
1833
+ }));
1870
1834
  return new __HttpRequest({
1871
1835
  protocol,
1872
1836
  hostname,
@@ -1885,9 +1849,9 @@ export const se_UpdateVoiceProfileCommand = async (input, context) => {
1885
1849
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-profiles/{VoiceProfileId}";
1886
1850
  resolvedPath = __resolvedPath(resolvedPath, input, "VoiceProfileId", () => input.VoiceProfileId, "{VoiceProfileId}", false);
1887
1851
  let body;
1888
- body = JSON.stringify({
1889
- ...(input.SpeakerSearchTaskId != null && { SpeakerSearchTaskId: input.SpeakerSearchTaskId }),
1890
- });
1852
+ body = JSON.stringify(take(input, {
1853
+ SpeakerSearchTaskId: [],
1854
+ }));
1891
1855
  return new __HttpRequest({
1892
1856
  protocol,
1893
1857
  hostname,
@@ -1907,10 +1871,10 @@ export const se_UpdateVoiceProfileDomainCommand = async (input, context) => {
1907
1871
  "/voice-profile-domains/{VoiceProfileDomainId}";
1908
1872
  resolvedPath = __resolvedPath(resolvedPath, input, "VoiceProfileDomainId", () => input.VoiceProfileDomainId, "{VoiceProfileDomainId}", false);
1909
1873
  let body;
1910
- body = JSON.stringify({
1911
- ...(input.Description != null && { Description: input.Description }),
1912
- ...(input.Name != null && { Name: input.Name }),
1913
- });
1874
+ body = JSON.stringify(take(input, {
1875
+ Description: [],
1876
+ Name: [],
1877
+ }));
1914
1878
  return new __HttpRequest({
1915
1879
  protocol,
1916
1880
  hostname,
@@ -1928,15 +1892,15 @@ export const se_ValidateE911AddressCommand = async (input, context) => {
1928
1892
  };
1929
1893
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/emergency-calling/address";
1930
1894
  let body;
1931
- body = JSON.stringify({
1932
- ...(input.AwsAccountId != null && { AwsAccountId: input.AwsAccountId }),
1933
- ...(input.City != null && { City: input.City }),
1934
- ...(input.Country != null && { Country: input.Country }),
1935
- ...(input.PostalCode != null && { PostalCode: input.PostalCode }),
1936
- ...(input.State != null && { State: input.State }),
1937
- ...(input.StreetInfo != null && { StreetInfo: input.StreetInfo }),
1938
- ...(input.StreetNumber != null && { StreetNumber: input.StreetNumber }),
1939
- });
1895
+ body = JSON.stringify(take(input, {
1896
+ AwsAccountId: [],
1897
+ City: [],
1898
+ Country: [],
1899
+ PostalCode: [],
1900
+ State: [],
1901
+ StreetInfo: [],
1902
+ StreetNumber: [],
1903
+ }));
1940
1904
  return new __HttpRequest({
1941
1905
  protocol,
1942
1906
  hostname,
@@ -1955,9 +1919,10 @@ export const de_AssociatePhoneNumbersWithVoiceConnectorCommand = async (output,
1955
1919
  $metadata: deserializeMetadata(output),
1956
1920
  });
1957
1921
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1958
- if (data.PhoneNumberErrors != null) {
1959
- contents.PhoneNumberErrors = de_PhoneNumberErrorList(data.PhoneNumberErrors, context);
1960
- }
1922
+ const doc = take(data, {
1923
+ PhoneNumberErrors: _json,
1924
+ });
1925
+ Object.assign(contents, doc);
1961
1926
  return contents;
1962
1927
  };
1963
1928
  const de_AssociatePhoneNumbersWithVoiceConnectorCommandError = async (output, context) => {
@@ -1993,10 +1958,9 @@ const de_AssociatePhoneNumbersWithVoiceConnectorCommandError = async (output, co
1993
1958
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
1994
1959
  default:
1995
1960
  const parsedBody = parsedOutput.body;
1996
- throwDefaultError({
1961
+ return throwDefaultError({
1997
1962
  output,
1998
1963
  parsedBody,
1999
- exceptionCtor: __BaseException,
2000
1964
  errorCode,
2001
1965
  });
2002
1966
  }
@@ -2009,9 +1973,10 @@ export const de_AssociatePhoneNumbersWithVoiceConnectorGroupCommand = async (out
2009
1973
  $metadata: deserializeMetadata(output),
2010
1974
  });
2011
1975
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2012
- if (data.PhoneNumberErrors != null) {
2013
- contents.PhoneNumberErrors = de_PhoneNumberErrorList(data.PhoneNumberErrors, context);
2014
- }
1976
+ const doc = take(data, {
1977
+ PhoneNumberErrors: _json,
1978
+ });
1979
+ Object.assign(contents, doc);
2015
1980
  return contents;
2016
1981
  };
2017
1982
  const de_AssociatePhoneNumbersWithVoiceConnectorGroupCommandError = async (output, context) => {
@@ -2047,10 +2012,9 @@ const de_AssociatePhoneNumbersWithVoiceConnectorGroupCommandError = async (outpu
2047
2012
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
2048
2013
  default:
2049
2014
  const parsedBody = parsedOutput.body;
2050
- throwDefaultError({
2015
+ return throwDefaultError({
2051
2016
  output,
2052
2017
  parsedBody,
2053
- exceptionCtor: __BaseException,
2054
2018
  errorCode,
2055
2019
  });
2056
2020
  }
@@ -2063,9 +2027,10 @@ export const de_BatchDeletePhoneNumberCommand = async (output, context) => {
2063
2027
  $metadata: deserializeMetadata(output),
2064
2028
  });
2065
2029
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2066
- if (data.PhoneNumberErrors != null) {
2067
- contents.PhoneNumberErrors = de_PhoneNumberErrorList(data.PhoneNumberErrors, context);
2068
- }
2030
+ const doc = take(data, {
2031
+ PhoneNumberErrors: _json,
2032
+ });
2033
+ Object.assign(contents, doc);
2069
2034
  return contents;
2070
2035
  };
2071
2036
  const de_BatchDeletePhoneNumberCommandError = async (output, context) => {
@@ -2098,10 +2063,9 @@ const de_BatchDeletePhoneNumberCommandError = async (output, context) => {
2098
2063
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
2099
2064
  default:
2100
2065
  const parsedBody = parsedOutput.body;
2101
- throwDefaultError({
2066
+ return throwDefaultError({
2102
2067
  output,
2103
2068
  parsedBody,
2104
- exceptionCtor: __BaseException,
2105
2069
  errorCode,
2106
2070
  });
2107
2071
  }
@@ -2114,9 +2078,10 @@ export const de_BatchUpdatePhoneNumberCommand = async (output, context) => {
2114
2078
  $metadata: deserializeMetadata(output),
2115
2079
  });
2116
2080
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2117
- if (data.PhoneNumberErrors != null) {
2118
- contents.PhoneNumberErrors = de_PhoneNumberErrorList(data.PhoneNumberErrors, context);
2119
- }
2081
+ const doc = take(data, {
2082
+ PhoneNumberErrors: _json,
2083
+ });
2084
+ Object.assign(contents, doc);
2120
2085
  return contents;
2121
2086
  };
2122
2087
  const de_BatchUpdatePhoneNumberCommandError = async (output, context) => {
@@ -2149,10 +2114,9 @@ const de_BatchUpdatePhoneNumberCommandError = async (output, context) => {
2149
2114
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
2150
2115
  default:
2151
2116
  const parsedBody = parsedOutput.body;
2152
- throwDefaultError({
2117
+ return throwDefaultError({
2153
2118
  output,
2154
2119
  parsedBody,
2155
- exceptionCtor: __BaseException,
2156
2120
  errorCode,
2157
2121
  });
2158
2122
  }
@@ -2165,9 +2129,10 @@ export const de_CreatePhoneNumberOrderCommand = async (output, context) => {
2165
2129
  $metadata: deserializeMetadata(output),
2166
2130
  });
2167
2131
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2168
- if (data.PhoneNumberOrder != null) {
2169
- contents.PhoneNumberOrder = de_PhoneNumberOrder(data.PhoneNumberOrder, context);
2170
- }
2132
+ const doc = take(data, {
2133
+ PhoneNumberOrder: (_) => de_PhoneNumberOrder(_, context),
2134
+ });
2135
+ Object.assign(contents, doc);
2171
2136
  return contents;
2172
2137
  };
2173
2138
  const de_CreatePhoneNumberOrderCommandError = async (output, context) => {
@@ -2203,10 +2168,9 @@ const de_CreatePhoneNumberOrderCommandError = async (output, context) => {
2203
2168
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
2204
2169
  default:
2205
2170
  const parsedBody = parsedOutput.body;
2206
- throwDefaultError({
2171
+ return throwDefaultError({
2207
2172
  output,
2208
2173
  parsedBody,
2209
- exceptionCtor: __BaseException,
2210
2174
  errorCode,
2211
2175
  });
2212
2176
  }
@@ -2219,9 +2183,10 @@ export const de_CreateProxySessionCommand = async (output, context) => {
2219
2183
  $metadata: deserializeMetadata(output),
2220
2184
  });
2221
2185
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2222
- if (data.ProxySession != null) {
2223
- contents.ProxySession = de_ProxySession(data.ProxySession, context);
2224
- }
2186
+ const doc = take(data, {
2187
+ ProxySession: (_) => de_ProxySession(_, context),
2188
+ });
2189
+ Object.assign(contents, doc);
2225
2190
  return contents;
2226
2191
  };
2227
2192
  const de_CreateProxySessionCommandError = async (output, context) => {
@@ -2254,10 +2219,9 @@ const de_CreateProxySessionCommandError = async (output, context) => {
2254
2219
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
2255
2220
  default:
2256
2221
  const parsedBody = parsedOutput.body;
2257
- throwDefaultError({
2222
+ return throwDefaultError({
2258
2223
  output,
2259
2224
  parsedBody,
2260
- exceptionCtor: __BaseException,
2261
2225
  errorCode,
2262
2226
  });
2263
2227
  }
@@ -2270,9 +2234,10 @@ export const de_CreateSipMediaApplicationCommand = async (output, context) => {
2270
2234
  $metadata: deserializeMetadata(output),
2271
2235
  });
2272
2236
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2273
- if (data.SipMediaApplication != null) {
2274
- contents.SipMediaApplication = de_SipMediaApplication(data.SipMediaApplication, context);
2275
- }
2237
+ const doc = take(data, {
2238
+ SipMediaApplication: (_) => de_SipMediaApplication(_, context),
2239
+ });
2240
+ Object.assign(contents, doc);
2276
2241
  return contents;
2277
2242
  };
2278
2243
  const de_CreateSipMediaApplicationCommandError = async (output, context) => {
@@ -2311,10 +2276,9 @@ const de_CreateSipMediaApplicationCommandError = async (output, context) => {
2311
2276
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
2312
2277
  default:
2313
2278
  const parsedBody = parsedOutput.body;
2314
- throwDefaultError({
2279
+ return throwDefaultError({
2315
2280
  output,
2316
2281
  parsedBody,
2317
- exceptionCtor: __BaseException,
2318
2282
  errorCode,
2319
2283
  });
2320
2284
  }
@@ -2327,9 +2291,10 @@ export const de_CreateSipMediaApplicationCallCommand = async (output, context) =
2327
2291
  $metadata: deserializeMetadata(output),
2328
2292
  });
2329
2293
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2330
- if (data.SipMediaApplicationCall != null) {
2331
- contents.SipMediaApplicationCall = de_SipMediaApplicationCall(data.SipMediaApplicationCall, context);
2332
- }
2294
+ const doc = take(data, {
2295
+ SipMediaApplicationCall: _json,
2296
+ });
2297
+ Object.assign(contents, doc);
2333
2298
  return contents;
2334
2299
  };
2335
2300
  const de_CreateSipMediaApplicationCallCommandError = async (output, context) => {
@@ -2365,10 +2330,9 @@ const de_CreateSipMediaApplicationCallCommandError = async (output, context) =>
2365
2330
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
2366
2331
  default:
2367
2332
  const parsedBody = parsedOutput.body;
2368
- throwDefaultError({
2333
+ return throwDefaultError({
2369
2334
  output,
2370
2335
  parsedBody,
2371
- exceptionCtor: __BaseException,
2372
2336
  errorCode,
2373
2337
  });
2374
2338
  }
@@ -2381,9 +2345,10 @@ export const de_CreateSipRuleCommand = async (output, context) => {
2381
2345
  $metadata: deserializeMetadata(output),
2382
2346
  });
2383
2347
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2384
- if (data.SipRule != null) {
2385
- contents.SipRule = de_SipRule(data.SipRule, context);
2386
- }
2348
+ const doc = take(data, {
2349
+ SipRule: (_) => de_SipRule(_, context),
2350
+ });
2351
+ Object.assign(contents, doc);
2387
2352
  return contents;
2388
2353
  };
2389
2354
  const de_CreateSipRuleCommandError = async (output, context) => {
@@ -2422,10 +2387,9 @@ const de_CreateSipRuleCommandError = async (output, context) => {
2422
2387
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
2423
2388
  default:
2424
2389
  const parsedBody = parsedOutput.body;
2425
- throwDefaultError({
2390
+ return throwDefaultError({
2426
2391
  output,
2427
2392
  parsedBody,
2428
- exceptionCtor: __BaseException,
2429
2393
  errorCode,
2430
2394
  });
2431
2395
  }
@@ -2438,9 +2402,10 @@ export const de_CreateVoiceConnectorCommand = async (output, context) => {
2438
2402
  $metadata: deserializeMetadata(output),
2439
2403
  });
2440
2404
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2441
- if (data.VoiceConnector != null) {
2442
- contents.VoiceConnector = de_VoiceConnector(data.VoiceConnector, context);
2443
- }
2405
+ const doc = take(data, {
2406
+ VoiceConnector: (_) => de_VoiceConnector(_, context),
2407
+ });
2408
+ Object.assign(contents, doc);
2444
2409
  return contents;
2445
2410
  };
2446
2411
  const de_CreateVoiceConnectorCommandError = async (output, context) => {
@@ -2476,10 +2441,9 @@ const de_CreateVoiceConnectorCommandError = async (output, context) => {
2476
2441
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
2477
2442
  default:
2478
2443
  const parsedBody = parsedOutput.body;
2479
- throwDefaultError({
2444
+ return throwDefaultError({
2480
2445
  output,
2481
2446
  parsedBody,
2482
- exceptionCtor: __BaseException,
2483
2447
  errorCode,
2484
2448
  });
2485
2449
  }
@@ -2492,9 +2456,10 @@ export const de_CreateVoiceConnectorGroupCommand = async (output, context) => {
2492
2456
  $metadata: deserializeMetadata(output),
2493
2457
  });
2494
2458
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2495
- if (data.VoiceConnectorGroup != null) {
2496
- contents.VoiceConnectorGroup = de_VoiceConnectorGroup(data.VoiceConnectorGroup, context);
2497
- }
2459
+ const doc = take(data, {
2460
+ VoiceConnectorGroup: (_) => de_VoiceConnectorGroup(_, context),
2461
+ });
2462
+ Object.assign(contents, doc);
2498
2463
  return contents;
2499
2464
  };
2500
2465
  const de_CreateVoiceConnectorGroupCommandError = async (output, context) => {
@@ -2530,10 +2495,9 @@ const de_CreateVoiceConnectorGroupCommandError = async (output, context) => {
2530
2495
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
2531
2496
  default:
2532
2497
  const parsedBody = parsedOutput.body;
2533
- throwDefaultError({
2498
+ return throwDefaultError({
2534
2499
  output,
2535
2500
  parsedBody,
2536
- exceptionCtor: __BaseException,
2537
2501
  errorCode,
2538
2502
  });
2539
2503
  }
@@ -2546,9 +2510,10 @@ export const de_CreateVoiceProfileCommand = async (output, context) => {
2546
2510
  $metadata: deserializeMetadata(output),
2547
2511
  });
2548
2512
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2549
- if (data.VoiceProfile != null) {
2550
- contents.VoiceProfile = de_VoiceProfile(data.VoiceProfile, context);
2551
- }
2513
+ const doc = take(data, {
2514
+ VoiceProfile: (_) => de_VoiceProfile(_, context),
2515
+ });
2516
+ Object.assign(contents, doc);
2552
2517
  return contents;
2553
2518
  };
2554
2519
  const de_CreateVoiceProfileCommandError = async (output, context) => {
@@ -2593,10 +2558,9 @@ const de_CreateVoiceProfileCommandError = async (output, context) => {
2593
2558
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
2594
2559
  default:
2595
2560
  const parsedBody = parsedOutput.body;
2596
- throwDefaultError({
2561
+ return throwDefaultError({
2597
2562
  output,
2598
2563
  parsedBody,
2599
- exceptionCtor: __BaseException,
2600
2564
  errorCode,
2601
2565
  });
2602
2566
  }
@@ -2609,9 +2573,10 @@ export const de_CreateVoiceProfileDomainCommand = async (output, context) => {
2609
2573
  $metadata: deserializeMetadata(output),
2610
2574
  });
2611
2575
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2612
- if (data.VoiceProfileDomain != null) {
2613
- contents.VoiceProfileDomain = de_VoiceProfileDomain(data.VoiceProfileDomain, context);
2614
- }
2576
+ const doc = take(data, {
2577
+ VoiceProfileDomain: (_) => de_VoiceProfileDomain(_, context),
2578
+ });
2579
+ Object.assign(contents, doc);
2615
2580
  return contents;
2616
2581
  };
2617
2582
  const de_CreateVoiceProfileDomainCommandError = async (output, context) => {
@@ -2650,10 +2615,9 @@ const de_CreateVoiceProfileDomainCommandError = async (output, context) => {
2650
2615
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
2651
2616
  default:
2652
2617
  const parsedBody = parsedOutput.body;
2653
- throwDefaultError({
2618
+ return throwDefaultError({
2654
2619
  output,
2655
2620
  parsedBody,
2656
- exceptionCtor: __BaseException,
2657
2621
  errorCode,
2658
2622
  });
2659
2623
  }
@@ -2698,10 +2662,9 @@ const de_DeletePhoneNumberCommandError = async (output, context) => {
2698
2662
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
2699
2663
  default:
2700
2664
  const parsedBody = parsedOutput.body;
2701
- throwDefaultError({
2665
+ return throwDefaultError({
2702
2666
  output,
2703
2667
  parsedBody,
2704
- exceptionCtor: __BaseException,
2705
2668
  errorCode,
2706
2669
  });
2707
2670
  }
@@ -2746,10 +2709,9 @@ const de_DeleteProxySessionCommandError = async (output, context) => {
2746
2709
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
2747
2710
  default:
2748
2711
  const parsedBody = parsedOutput.body;
2749
- throwDefaultError({
2712
+ return throwDefaultError({
2750
2713
  output,
2751
2714
  parsedBody,
2752
- exceptionCtor: __BaseException,
2753
2715
  errorCode,
2754
2716
  });
2755
2717
  }
@@ -2797,10 +2759,9 @@ const de_DeleteSipMediaApplicationCommandError = async (output, context) => {
2797
2759
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
2798
2760
  default:
2799
2761
  const parsedBody = parsedOutput.body;
2800
- throwDefaultError({
2762
+ return throwDefaultError({
2801
2763
  output,
2802
2764
  parsedBody,
2803
- exceptionCtor: __BaseException,
2804
2765
  errorCode,
2805
2766
  });
2806
2767
  }
@@ -2848,10 +2809,9 @@ const de_DeleteSipRuleCommandError = async (output, context) => {
2848
2809
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
2849
2810
  default:
2850
2811
  const parsedBody = parsedOutput.body;
2851
- throwDefaultError({
2812
+ return throwDefaultError({
2852
2813
  output,
2853
2814
  parsedBody,
2854
- exceptionCtor: __BaseException,
2855
2815
  errorCode,
2856
2816
  });
2857
2817
  }
@@ -2899,10 +2859,9 @@ const de_DeleteVoiceConnectorCommandError = async (output, context) => {
2899
2859
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
2900
2860
  default:
2901
2861
  const parsedBody = parsedOutput.body;
2902
- throwDefaultError({
2862
+ return throwDefaultError({
2903
2863
  output,
2904
2864
  parsedBody,
2905
- exceptionCtor: __BaseException,
2906
2865
  errorCode,
2907
2866
  });
2908
2867
  }
@@ -2947,10 +2906,9 @@ const de_DeleteVoiceConnectorEmergencyCallingConfigurationCommandError = async (
2947
2906
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
2948
2907
  default:
2949
2908
  const parsedBody = parsedOutput.body;
2950
- throwDefaultError({
2909
+ return throwDefaultError({
2951
2910
  output,
2952
2911
  parsedBody,
2953
- exceptionCtor: __BaseException,
2954
2912
  errorCode,
2955
2913
  });
2956
2914
  }
@@ -2998,10 +2956,9 @@ const de_DeleteVoiceConnectorGroupCommandError = async (output, context) => {
2998
2956
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
2999
2957
  default:
3000
2958
  const parsedBody = parsedOutput.body;
3001
- throwDefaultError({
2959
+ return throwDefaultError({
3002
2960
  output,
3003
2961
  parsedBody,
3004
- exceptionCtor: __BaseException,
3005
2962
  errorCode,
3006
2963
  });
3007
2964
  }
@@ -3046,10 +3003,9 @@ const de_DeleteVoiceConnectorOriginationCommandError = async (output, context) =
3046
3003
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
3047
3004
  default:
3048
3005
  const parsedBody = parsedOutput.body;
3049
- throwDefaultError({
3006
+ return throwDefaultError({
3050
3007
  output,
3051
3008
  parsedBody,
3052
- exceptionCtor: __BaseException,
3053
3009
  errorCode,
3054
3010
  });
3055
3011
  }
@@ -3094,10 +3050,9 @@ const de_DeleteVoiceConnectorProxyCommandError = async (output, context) => {
3094
3050
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
3095
3051
  default:
3096
3052
  const parsedBody = parsedOutput.body;
3097
- throwDefaultError({
3053
+ return throwDefaultError({
3098
3054
  output,
3099
3055
  parsedBody,
3100
- exceptionCtor: __BaseException,
3101
3056
  errorCode,
3102
3057
  });
3103
3058
  }
@@ -3142,10 +3097,9 @@ const de_DeleteVoiceConnectorStreamingConfigurationCommandError = async (output,
3142
3097
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
3143
3098
  default:
3144
3099
  const parsedBody = parsedOutput.body;
3145
- throwDefaultError({
3100
+ return throwDefaultError({
3146
3101
  output,
3147
3102
  parsedBody,
3148
- exceptionCtor: __BaseException,
3149
3103
  errorCode,
3150
3104
  });
3151
3105
  }
@@ -3190,10 +3144,9 @@ const de_DeleteVoiceConnectorTerminationCommandError = async (output, context) =
3190
3144
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
3191
3145
  default:
3192
3146
  const parsedBody = parsedOutput.body;
3193
- throwDefaultError({
3147
+ return throwDefaultError({
3194
3148
  output,
3195
3149
  parsedBody,
3196
- exceptionCtor: __BaseException,
3197
3150
  errorCode,
3198
3151
  });
3199
3152
  }
@@ -3238,10 +3191,9 @@ const de_DeleteVoiceConnectorTerminationCredentialsCommandError = async (output,
3238
3191
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
3239
3192
  default:
3240
3193
  const parsedBody = parsedOutput.body;
3241
- throwDefaultError({
3194
+ return throwDefaultError({
3242
3195
  output,
3243
3196
  parsedBody,
3244
- exceptionCtor: __BaseException,
3245
3197
  errorCode,
3246
3198
  });
3247
3199
  }
@@ -3292,10 +3244,9 @@ const de_DeleteVoiceProfileCommandError = async (output, context) => {
3292
3244
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
3293
3245
  default:
3294
3246
  const parsedBody = parsedOutput.body;
3295
- throwDefaultError({
3247
+ return throwDefaultError({
3296
3248
  output,
3297
3249
  parsedBody,
3298
- exceptionCtor: __BaseException,
3299
3250
  errorCode,
3300
3251
  });
3301
3252
  }
@@ -3346,10 +3297,9 @@ const de_DeleteVoiceProfileDomainCommandError = async (output, context) => {
3346
3297
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
3347
3298
  default:
3348
3299
  const parsedBody = parsedOutput.body;
3349
- throwDefaultError({
3300
+ return throwDefaultError({
3350
3301
  output,
3351
3302
  parsedBody,
3352
- exceptionCtor: __BaseException,
3353
3303
  errorCode,
3354
3304
  });
3355
3305
  }
@@ -3362,9 +3312,10 @@ export const de_DisassociatePhoneNumbersFromVoiceConnectorCommand = async (outpu
3362
3312
  $metadata: deserializeMetadata(output),
3363
3313
  });
3364
3314
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3365
- if (data.PhoneNumberErrors != null) {
3366
- contents.PhoneNumberErrors = de_PhoneNumberErrorList(data.PhoneNumberErrors, context);
3367
- }
3315
+ const doc = take(data, {
3316
+ PhoneNumberErrors: _json,
3317
+ });
3318
+ Object.assign(contents, doc);
3368
3319
  return contents;
3369
3320
  };
3370
3321
  const de_DisassociatePhoneNumbersFromVoiceConnectorCommandError = async (output, context) => {
@@ -3397,10 +3348,9 @@ const de_DisassociatePhoneNumbersFromVoiceConnectorCommandError = async (output,
3397
3348
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
3398
3349
  default:
3399
3350
  const parsedBody = parsedOutput.body;
3400
- throwDefaultError({
3351
+ return throwDefaultError({
3401
3352
  output,
3402
3353
  parsedBody,
3403
- exceptionCtor: __BaseException,
3404
3354
  errorCode,
3405
3355
  });
3406
3356
  }
@@ -3413,9 +3363,10 @@ export const de_DisassociatePhoneNumbersFromVoiceConnectorGroupCommand = async (
3413
3363
  $metadata: deserializeMetadata(output),
3414
3364
  });
3415
3365
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3416
- if (data.PhoneNumberErrors != null) {
3417
- contents.PhoneNumberErrors = de_PhoneNumberErrorList(data.PhoneNumberErrors, context);
3418
- }
3366
+ const doc = take(data, {
3367
+ PhoneNumberErrors: _json,
3368
+ });
3369
+ Object.assign(contents, doc);
3419
3370
  return contents;
3420
3371
  };
3421
3372
  const de_DisassociatePhoneNumbersFromVoiceConnectorGroupCommandError = async (output, context) => {
@@ -3448,10 +3399,9 @@ const de_DisassociatePhoneNumbersFromVoiceConnectorGroupCommandError = async (ou
3448
3399
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
3449
3400
  default:
3450
3401
  const parsedBody = parsedOutput.body;
3451
- throwDefaultError({
3402
+ return throwDefaultError({
3452
3403
  output,
3453
3404
  parsedBody,
3454
- exceptionCtor: __BaseException,
3455
3405
  errorCode,
3456
3406
  });
3457
3407
  }
@@ -3464,9 +3414,10 @@ export const de_GetGlobalSettingsCommand = async (output, context) => {
3464
3414
  $metadata: deserializeMetadata(output),
3465
3415
  });
3466
3416
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3467
- if (data.VoiceConnector != null) {
3468
- contents.VoiceConnector = de_VoiceConnectorSettings(data.VoiceConnector, context);
3469
- }
3417
+ const doc = take(data, {
3418
+ VoiceConnector: _json,
3419
+ });
3420
+ Object.assign(contents, doc);
3470
3421
  return contents;
3471
3422
  };
3472
3423
  const de_GetGlobalSettingsCommandError = async (output, context) => {
@@ -3496,10 +3447,9 @@ const de_GetGlobalSettingsCommandError = async (output, context) => {
3496
3447
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
3497
3448
  default:
3498
3449
  const parsedBody = parsedOutput.body;
3499
- throwDefaultError({
3450
+ return throwDefaultError({
3500
3451
  output,
3501
3452
  parsedBody,
3502
- exceptionCtor: __BaseException,
3503
3453
  errorCode,
3504
3454
  });
3505
3455
  }
@@ -3512,9 +3462,10 @@ export const de_GetPhoneNumberCommand = async (output, context) => {
3512
3462
  $metadata: deserializeMetadata(output),
3513
3463
  });
3514
3464
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3515
- if (data.PhoneNumber != null) {
3516
- contents.PhoneNumber = de_PhoneNumber(data.PhoneNumber, context);
3517
- }
3465
+ const doc = take(data, {
3466
+ PhoneNumber: (_) => de_PhoneNumber(_, context),
3467
+ });
3468
+ Object.assign(contents, doc);
3518
3469
  return contents;
3519
3470
  };
3520
3471
  const de_GetPhoneNumberCommandError = async (output, context) => {
@@ -3547,10 +3498,9 @@ const de_GetPhoneNumberCommandError = async (output, context) => {
3547
3498
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
3548
3499
  default:
3549
3500
  const parsedBody = parsedOutput.body;
3550
- throwDefaultError({
3501
+ return throwDefaultError({
3551
3502
  output,
3552
3503
  parsedBody,
3553
- exceptionCtor: __BaseException,
3554
3504
  errorCode,
3555
3505
  });
3556
3506
  }
@@ -3563,9 +3513,10 @@ export const de_GetPhoneNumberOrderCommand = async (output, context) => {
3563
3513
  $metadata: deserializeMetadata(output),
3564
3514
  });
3565
3515
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3566
- if (data.PhoneNumberOrder != null) {
3567
- contents.PhoneNumberOrder = de_PhoneNumberOrder(data.PhoneNumberOrder, context);
3568
- }
3516
+ const doc = take(data, {
3517
+ PhoneNumberOrder: (_) => de_PhoneNumberOrder(_, context),
3518
+ });
3519
+ Object.assign(contents, doc);
3569
3520
  return contents;
3570
3521
  };
3571
3522
  const de_GetPhoneNumberOrderCommandError = async (output, context) => {
@@ -3598,10 +3549,9 @@ const de_GetPhoneNumberOrderCommandError = async (output, context) => {
3598
3549
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
3599
3550
  default:
3600
3551
  const parsedBody = parsedOutput.body;
3601
- throwDefaultError({
3552
+ return throwDefaultError({
3602
3553
  output,
3603
3554
  parsedBody,
3604
- exceptionCtor: __BaseException,
3605
3555
  errorCode,
3606
3556
  });
3607
3557
  }
@@ -3614,12 +3564,11 @@ export const de_GetPhoneNumberSettingsCommand = async (output, context) => {
3614
3564
  $metadata: deserializeMetadata(output),
3615
3565
  });
3616
3566
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3617
- if (data.CallingName != null) {
3618
- contents.CallingName = __expectString(data.CallingName);
3619
- }
3620
- if (data.CallingNameUpdatedTimestamp != null) {
3621
- contents.CallingNameUpdatedTimestamp = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CallingNameUpdatedTimestamp));
3622
- }
3567
+ const doc = take(data, {
3568
+ CallingName: __expectString,
3569
+ CallingNameUpdatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3570
+ });
3571
+ Object.assign(contents, doc);
3623
3572
  return contents;
3624
3573
  };
3625
3574
  const de_GetPhoneNumberSettingsCommandError = async (output, context) => {
@@ -3649,10 +3598,9 @@ const de_GetPhoneNumberSettingsCommandError = async (output, context) => {
3649
3598
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
3650
3599
  default:
3651
3600
  const parsedBody = parsedOutput.body;
3652
- throwDefaultError({
3601
+ return throwDefaultError({
3653
3602
  output,
3654
3603
  parsedBody,
3655
- exceptionCtor: __BaseException,
3656
3604
  errorCode,
3657
3605
  });
3658
3606
  }
@@ -3665,9 +3613,10 @@ export const de_GetProxySessionCommand = async (output, context) => {
3665
3613
  $metadata: deserializeMetadata(output),
3666
3614
  });
3667
3615
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3668
- if (data.ProxySession != null) {
3669
- contents.ProxySession = de_ProxySession(data.ProxySession, context);
3670
- }
3616
+ const doc = take(data, {
3617
+ ProxySession: (_) => de_ProxySession(_, context),
3618
+ });
3619
+ Object.assign(contents, doc);
3671
3620
  return contents;
3672
3621
  };
3673
3622
  const de_GetProxySessionCommandError = async (output, context) => {
@@ -3700,10 +3649,9 @@ const de_GetProxySessionCommandError = async (output, context) => {
3700
3649
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
3701
3650
  default:
3702
3651
  const parsedBody = parsedOutput.body;
3703
- throwDefaultError({
3652
+ return throwDefaultError({
3704
3653
  output,
3705
3654
  parsedBody,
3706
- exceptionCtor: __BaseException,
3707
3655
  errorCode,
3708
3656
  });
3709
3657
  }
@@ -3716,9 +3664,10 @@ export const de_GetSipMediaApplicationCommand = async (output, context) => {
3716
3664
  $metadata: deserializeMetadata(output),
3717
3665
  });
3718
3666
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3719
- if (data.SipMediaApplication != null) {
3720
- contents.SipMediaApplication = de_SipMediaApplication(data.SipMediaApplication, context);
3721
- }
3667
+ const doc = take(data, {
3668
+ SipMediaApplication: (_) => de_SipMediaApplication(_, context),
3669
+ });
3670
+ Object.assign(contents, doc);
3722
3671
  return contents;
3723
3672
  };
3724
3673
  const de_GetSipMediaApplicationCommandError = async (output, context) => {
@@ -3751,10 +3700,9 @@ const de_GetSipMediaApplicationCommandError = async (output, context) => {
3751
3700
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
3752
3701
  default:
3753
3702
  const parsedBody = parsedOutput.body;
3754
- throwDefaultError({
3703
+ return throwDefaultError({
3755
3704
  output,
3756
3705
  parsedBody,
3757
- exceptionCtor: __BaseException,
3758
3706
  errorCode,
3759
3707
  });
3760
3708
  }
@@ -3767,9 +3715,10 @@ export const de_GetSipMediaApplicationAlexaSkillConfigurationCommand = async (ou
3767
3715
  $metadata: deserializeMetadata(output),
3768
3716
  });
3769
3717
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3770
- if (data.SipMediaApplicationAlexaSkillConfiguration != null) {
3771
- contents.SipMediaApplicationAlexaSkillConfiguration = de_SipMediaApplicationAlexaSkillConfiguration(data.SipMediaApplicationAlexaSkillConfiguration, context);
3772
- }
3718
+ const doc = take(data, {
3719
+ SipMediaApplicationAlexaSkillConfiguration: _json,
3720
+ });
3721
+ Object.assign(contents, doc);
3773
3722
  return contents;
3774
3723
  };
3775
3724
  const de_GetSipMediaApplicationAlexaSkillConfigurationCommandError = async (output, context) => {
@@ -3802,10 +3751,9 @@ const de_GetSipMediaApplicationAlexaSkillConfigurationCommandError = async (outp
3802
3751
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
3803
3752
  default:
3804
3753
  const parsedBody = parsedOutput.body;
3805
- throwDefaultError({
3754
+ return throwDefaultError({
3806
3755
  output,
3807
3756
  parsedBody,
3808
- exceptionCtor: __BaseException,
3809
3757
  errorCode,
3810
3758
  });
3811
3759
  }
@@ -3818,9 +3766,10 @@ export const de_GetSipMediaApplicationLoggingConfigurationCommand = async (outpu
3818
3766
  $metadata: deserializeMetadata(output),
3819
3767
  });
3820
3768
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3821
- if (data.SipMediaApplicationLoggingConfiguration != null) {
3822
- contents.SipMediaApplicationLoggingConfiguration = de_SipMediaApplicationLoggingConfiguration(data.SipMediaApplicationLoggingConfiguration, context);
3823
- }
3769
+ const doc = take(data, {
3770
+ SipMediaApplicationLoggingConfiguration: _json,
3771
+ });
3772
+ Object.assign(contents, doc);
3824
3773
  return contents;
3825
3774
  };
3826
3775
  const de_GetSipMediaApplicationLoggingConfigurationCommandError = async (output, context) => {
@@ -3853,10 +3802,9 @@ const de_GetSipMediaApplicationLoggingConfigurationCommandError = async (output,
3853
3802
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
3854
3803
  default:
3855
3804
  const parsedBody = parsedOutput.body;
3856
- throwDefaultError({
3805
+ return throwDefaultError({
3857
3806
  output,
3858
3807
  parsedBody,
3859
- exceptionCtor: __BaseException,
3860
3808
  errorCode,
3861
3809
  });
3862
3810
  }
@@ -3869,9 +3817,10 @@ export const de_GetSipRuleCommand = async (output, context) => {
3869
3817
  $metadata: deserializeMetadata(output),
3870
3818
  });
3871
3819
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3872
- if (data.SipRule != null) {
3873
- contents.SipRule = de_SipRule(data.SipRule, context);
3874
- }
3820
+ const doc = take(data, {
3821
+ SipRule: (_) => de_SipRule(_, context),
3822
+ });
3823
+ Object.assign(contents, doc);
3875
3824
  return contents;
3876
3825
  };
3877
3826
  const de_GetSipRuleCommandError = async (output, context) => {
@@ -3904,10 +3853,9 @@ const de_GetSipRuleCommandError = async (output, context) => {
3904
3853
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
3905
3854
  default:
3906
3855
  const parsedBody = parsedOutput.body;
3907
- throwDefaultError({
3856
+ return throwDefaultError({
3908
3857
  output,
3909
3858
  parsedBody,
3910
- exceptionCtor: __BaseException,
3911
3859
  errorCode,
3912
3860
  });
3913
3861
  }
@@ -3920,9 +3868,10 @@ export const de_GetSpeakerSearchTaskCommand = async (output, context) => {
3920
3868
  $metadata: deserializeMetadata(output),
3921
3869
  });
3922
3870
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3923
- if (data.SpeakerSearchTask != null) {
3924
- contents.SpeakerSearchTask = de_SpeakerSearchTask(data.SpeakerSearchTask, context);
3925
- }
3871
+ const doc = take(data, {
3872
+ SpeakerSearchTask: (_) => de_SpeakerSearchTask(_, context),
3873
+ });
3874
+ Object.assign(contents, doc);
3926
3875
  return contents;
3927
3876
  };
3928
3877
  const de_GetSpeakerSearchTaskCommandError = async (output, context) => {
@@ -3961,10 +3910,9 @@ const de_GetSpeakerSearchTaskCommandError = async (output, context) => {
3961
3910
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
3962
3911
  default:
3963
3912
  const parsedBody = parsedOutput.body;
3964
- throwDefaultError({
3913
+ return throwDefaultError({
3965
3914
  output,
3966
3915
  parsedBody,
3967
- exceptionCtor: __BaseException,
3968
3916
  errorCode,
3969
3917
  });
3970
3918
  }
@@ -3977,9 +3925,10 @@ export const de_GetVoiceConnectorCommand = async (output, context) => {
3977
3925
  $metadata: deserializeMetadata(output),
3978
3926
  });
3979
3927
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3980
- if (data.VoiceConnector != null) {
3981
- contents.VoiceConnector = de_VoiceConnector(data.VoiceConnector, context);
3982
- }
3928
+ const doc = take(data, {
3929
+ VoiceConnector: (_) => de_VoiceConnector(_, context),
3930
+ });
3931
+ Object.assign(contents, doc);
3983
3932
  return contents;
3984
3933
  };
3985
3934
  const de_GetVoiceConnectorCommandError = async (output, context) => {
@@ -4012,10 +3961,9 @@ const de_GetVoiceConnectorCommandError = async (output, context) => {
4012
3961
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
4013
3962
  default:
4014
3963
  const parsedBody = parsedOutput.body;
4015
- throwDefaultError({
3964
+ return throwDefaultError({
4016
3965
  output,
4017
3966
  parsedBody,
4018
- exceptionCtor: __BaseException,
4019
3967
  errorCode,
4020
3968
  });
4021
3969
  }
@@ -4028,9 +3976,10 @@ export const de_GetVoiceConnectorEmergencyCallingConfigurationCommand = async (o
4028
3976
  $metadata: deserializeMetadata(output),
4029
3977
  });
4030
3978
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4031
- if (data.EmergencyCallingConfiguration != null) {
4032
- contents.EmergencyCallingConfiguration = de_EmergencyCallingConfiguration(data.EmergencyCallingConfiguration, context);
4033
- }
3979
+ const doc = take(data, {
3980
+ EmergencyCallingConfiguration: _json,
3981
+ });
3982
+ Object.assign(contents, doc);
4034
3983
  return contents;
4035
3984
  };
4036
3985
  const de_GetVoiceConnectorEmergencyCallingConfigurationCommandError = async (output, context) => {
@@ -4063,10 +4012,9 @@ const de_GetVoiceConnectorEmergencyCallingConfigurationCommandError = async (out
4063
4012
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
4064
4013
  default:
4065
4014
  const parsedBody = parsedOutput.body;
4066
- throwDefaultError({
4015
+ return throwDefaultError({
4067
4016
  output,
4068
4017
  parsedBody,
4069
- exceptionCtor: __BaseException,
4070
4018
  errorCode,
4071
4019
  });
4072
4020
  }
@@ -4079,9 +4027,10 @@ export const de_GetVoiceConnectorGroupCommand = async (output, context) => {
4079
4027
  $metadata: deserializeMetadata(output),
4080
4028
  });
4081
4029
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4082
- if (data.VoiceConnectorGroup != null) {
4083
- contents.VoiceConnectorGroup = de_VoiceConnectorGroup(data.VoiceConnectorGroup, context);
4084
- }
4030
+ const doc = take(data, {
4031
+ VoiceConnectorGroup: (_) => de_VoiceConnectorGroup(_, context),
4032
+ });
4033
+ Object.assign(contents, doc);
4085
4034
  return contents;
4086
4035
  };
4087
4036
  const de_GetVoiceConnectorGroupCommandError = async (output, context) => {
@@ -4114,10 +4063,9 @@ const de_GetVoiceConnectorGroupCommandError = async (output, context) => {
4114
4063
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
4115
4064
  default:
4116
4065
  const parsedBody = parsedOutput.body;
4117
- throwDefaultError({
4066
+ return throwDefaultError({
4118
4067
  output,
4119
4068
  parsedBody,
4120
- exceptionCtor: __BaseException,
4121
4069
  errorCode,
4122
4070
  });
4123
4071
  }
@@ -4130,9 +4078,10 @@ export const de_GetVoiceConnectorLoggingConfigurationCommand = async (output, co
4130
4078
  $metadata: deserializeMetadata(output),
4131
4079
  });
4132
4080
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4133
- if (data.LoggingConfiguration != null) {
4134
- contents.LoggingConfiguration = de_LoggingConfiguration(data.LoggingConfiguration, context);
4135
- }
4081
+ const doc = take(data, {
4082
+ LoggingConfiguration: _json,
4083
+ });
4084
+ Object.assign(contents, doc);
4136
4085
  return contents;
4137
4086
  };
4138
4087
  const de_GetVoiceConnectorLoggingConfigurationCommandError = async (output, context) => {
@@ -4165,10 +4114,9 @@ const de_GetVoiceConnectorLoggingConfigurationCommandError = async (output, cont
4165
4114
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
4166
4115
  default:
4167
4116
  const parsedBody = parsedOutput.body;
4168
- throwDefaultError({
4117
+ return throwDefaultError({
4169
4118
  output,
4170
4119
  parsedBody,
4171
- exceptionCtor: __BaseException,
4172
4120
  errorCode,
4173
4121
  });
4174
4122
  }
@@ -4181,9 +4129,10 @@ export const de_GetVoiceConnectorOriginationCommand = async (output, context) =>
4181
4129
  $metadata: deserializeMetadata(output),
4182
4130
  });
4183
4131
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4184
- if (data.Origination != null) {
4185
- contents.Origination = de_Origination(data.Origination, context);
4186
- }
4132
+ const doc = take(data, {
4133
+ Origination: _json,
4134
+ });
4135
+ Object.assign(contents, doc);
4187
4136
  return contents;
4188
4137
  };
4189
4138
  const de_GetVoiceConnectorOriginationCommandError = async (output, context) => {
@@ -4216,10 +4165,9 @@ const de_GetVoiceConnectorOriginationCommandError = async (output, context) => {
4216
4165
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
4217
4166
  default:
4218
4167
  const parsedBody = parsedOutput.body;
4219
- throwDefaultError({
4168
+ return throwDefaultError({
4220
4169
  output,
4221
4170
  parsedBody,
4222
- exceptionCtor: __BaseException,
4223
4171
  errorCode,
4224
4172
  });
4225
4173
  }
@@ -4232,9 +4180,10 @@ export const de_GetVoiceConnectorProxyCommand = async (output, context) => {
4232
4180
  $metadata: deserializeMetadata(output),
4233
4181
  });
4234
4182
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4235
- if (data.Proxy != null) {
4236
- contents.Proxy = de_Proxy(data.Proxy, context);
4237
- }
4183
+ const doc = take(data, {
4184
+ Proxy: _json,
4185
+ });
4186
+ Object.assign(contents, doc);
4238
4187
  return contents;
4239
4188
  };
4240
4189
  const de_GetVoiceConnectorProxyCommandError = async (output, context) => {
@@ -4267,10 +4216,9 @@ const de_GetVoiceConnectorProxyCommandError = async (output, context) => {
4267
4216
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
4268
4217
  default:
4269
4218
  const parsedBody = parsedOutput.body;
4270
- throwDefaultError({
4219
+ return throwDefaultError({
4271
4220
  output,
4272
4221
  parsedBody,
4273
- exceptionCtor: __BaseException,
4274
4222
  errorCode,
4275
4223
  });
4276
4224
  }
@@ -4283,9 +4231,10 @@ export const de_GetVoiceConnectorStreamingConfigurationCommand = async (output,
4283
4231
  $metadata: deserializeMetadata(output),
4284
4232
  });
4285
4233
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4286
- if (data.StreamingConfiguration != null) {
4287
- contents.StreamingConfiguration = de_StreamingConfiguration(data.StreamingConfiguration, context);
4288
- }
4234
+ const doc = take(data, {
4235
+ StreamingConfiguration: _json,
4236
+ });
4237
+ Object.assign(contents, doc);
4289
4238
  return contents;
4290
4239
  };
4291
4240
  const de_GetVoiceConnectorStreamingConfigurationCommandError = async (output, context) => {
@@ -4318,10 +4267,9 @@ const de_GetVoiceConnectorStreamingConfigurationCommandError = async (output, co
4318
4267
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
4319
4268
  default:
4320
4269
  const parsedBody = parsedOutput.body;
4321
- throwDefaultError({
4270
+ return throwDefaultError({
4322
4271
  output,
4323
4272
  parsedBody,
4324
- exceptionCtor: __BaseException,
4325
4273
  errorCode,
4326
4274
  });
4327
4275
  }
@@ -4334,9 +4282,10 @@ export const de_GetVoiceConnectorTerminationCommand = async (output, context) =>
4334
4282
  $metadata: deserializeMetadata(output),
4335
4283
  });
4336
4284
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4337
- if (data.Termination != null) {
4338
- contents.Termination = de_Termination(data.Termination, context);
4339
- }
4285
+ const doc = take(data, {
4286
+ Termination: _json,
4287
+ });
4288
+ Object.assign(contents, doc);
4340
4289
  return contents;
4341
4290
  };
4342
4291
  const de_GetVoiceConnectorTerminationCommandError = async (output, context) => {
@@ -4369,10 +4318,9 @@ const de_GetVoiceConnectorTerminationCommandError = async (output, context) => {
4369
4318
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
4370
4319
  default:
4371
4320
  const parsedBody = parsedOutput.body;
4372
- throwDefaultError({
4321
+ return throwDefaultError({
4373
4322
  output,
4374
4323
  parsedBody,
4375
- exceptionCtor: __BaseException,
4376
4324
  errorCode,
4377
4325
  });
4378
4326
  }
@@ -4385,9 +4333,10 @@ export const de_GetVoiceConnectorTerminationHealthCommand = async (output, conte
4385
4333
  $metadata: deserializeMetadata(output),
4386
4334
  });
4387
4335
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4388
- if (data.TerminationHealth != null) {
4389
- contents.TerminationHealth = de_TerminationHealth(data.TerminationHealth, context);
4390
- }
4336
+ const doc = take(data, {
4337
+ TerminationHealth: (_) => de_TerminationHealth(_, context),
4338
+ });
4339
+ Object.assign(contents, doc);
4391
4340
  return contents;
4392
4341
  };
4393
4342
  const de_GetVoiceConnectorTerminationHealthCommandError = async (output, context) => {
@@ -4420,10 +4369,9 @@ const de_GetVoiceConnectorTerminationHealthCommandError = async (output, context
4420
4369
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
4421
4370
  default:
4422
4371
  const parsedBody = parsedOutput.body;
4423
- throwDefaultError({
4372
+ return throwDefaultError({
4424
4373
  output,
4425
4374
  parsedBody,
4426
- exceptionCtor: __BaseException,
4427
4375
  errorCode,
4428
4376
  });
4429
4377
  }
@@ -4436,9 +4384,10 @@ export const de_GetVoiceProfileCommand = async (output, context) => {
4436
4384
  $metadata: deserializeMetadata(output),
4437
4385
  });
4438
4386
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4439
- if (data.VoiceProfile != null) {
4440
- contents.VoiceProfile = de_VoiceProfile(data.VoiceProfile, context);
4441
- }
4387
+ const doc = take(data, {
4388
+ VoiceProfile: (_) => de_VoiceProfile(_, context),
4389
+ });
4390
+ Object.assign(contents, doc);
4442
4391
  return contents;
4443
4392
  };
4444
4393
  const de_GetVoiceProfileCommandError = async (output, context) => {
@@ -4474,10 +4423,9 @@ const de_GetVoiceProfileCommandError = async (output, context) => {
4474
4423
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
4475
4424
  default:
4476
4425
  const parsedBody = parsedOutput.body;
4477
- throwDefaultError({
4426
+ return throwDefaultError({
4478
4427
  output,
4479
4428
  parsedBody,
4480
- exceptionCtor: __BaseException,
4481
4429
  errorCode,
4482
4430
  });
4483
4431
  }
@@ -4490,9 +4438,10 @@ export const de_GetVoiceProfileDomainCommand = async (output, context) => {
4490
4438
  $metadata: deserializeMetadata(output),
4491
4439
  });
4492
4440
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4493
- if (data.VoiceProfileDomain != null) {
4494
- contents.VoiceProfileDomain = de_VoiceProfileDomain(data.VoiceProfileDomain, context);
4495
- }
4441
+ const doc = take(data, {
4442
+ VoiceProfileDomain: (_) => de_VoiceProfileDomain(_, context),
4443
+ });
4444
+ Object.assign(contents, doc);
4496
4445
  return contents;
4497
4446
  };
4498
4447
  const de_GetVoiceProfileDomainCommandError = async (output, context) => {
@@ -4528,10 +4477,9 @@ const de_GetVoiceProfileDomainCommandError = async (output, context) => {
4528
4477
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
4529
4478
  default:
4530
4479
  const parsedBody = parsedOutput.body;
4531
- throwDefaultError({
4480
+ return throwDefaultError({
4532
4481
  output,
4533
4482
  parsedBody,
4534
- exceptionCtor: __BaseException,
4535
4483
  errorCode,
4536
4484
  });
4537
4485
  }
@@ -4544,9 +4492,10 @@ export const de_GetVoiceToneAnalysisTaskCommand = async (output, context) => {
4544
4492
  $metadata: deserializeMetadata(output),
4545
4493
  });
4546
4494
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4547
- if (data.VoiceToneAnalysisTask != null) {
4548
- contents.VoiceToneAnalysisTask = de_VoiceToneAnalysisTask(data.VoiceToneAnalysisTask, context);
4549
- }
4495
+ const doc = take(data, {
4496
+ VoiceToneAnalysisTask: (_) => de_VoiceToneAnalysisTask(_, context),
4497
+ });
4498
+ Object.assign(contents, doc);
4550
4499
  return contents;
4551
4500
  };
4552
4501
  const de_GetVoiceToneAnalysisTaskCommandError = async (output, context) => {
@@ -4585,10 +4534,9 @@ const de_GetVoiceToneAnalysisTaskCommandError = async (output, context) => {
4585
4534
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
4586
4535
  default:
4587
4536
  const parsedBody = parsedOutput.body;
4588
- throwDefaultError({
4537
+ return throwDefaultError({
4589
4538
  output,
4590
4539
  parsedBody,
4591
- exceptionCtor: __BaseException,
4592
4540
  errorCode,
4593
4541
  });
4594
4542
  }
@@ -4601,9 +4549,10 @@ export const de_ListAvailableVoiceConnectorRegionsCommand = async (output, conte
4601
4549
  $metadata: deserializeMetadata(output),
4602
4550
  });
4603
4551
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4604
- if (data.VoiceConnectorRegions != null) {
4605
- contents.VoiceConnectorRegions = de_VoiceConnectorAwsRegionList(data.VoiceConnectorRegions, context);
4606
- }
4552
+ const doc = take(data, {
4553
+ VoiceConnectorRegions: _json,
4554
+ });
4555
+ Object.assign(contents, doc);
4607
4556
  return contents;
4608
4557
  };
4609
4558
  const de_ListAvailableVoiceConnectorRegionsCommandError = async (output, context) => {
@@ -4633,10 +4582,9 @@ const de_ListAvailableVoiceConnectorRegionsCommandError = async (output, context
4633
4582
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
4634
4583
  default:
4635
4584
  const parsedBody = parsedOutput.body;
4636
- throwDefaultError({
4585
+ return throwDefaultError({
4637
4586
  output,
4638
4587
  parsedBody,
4639
- exceptionCtor: __BaseException,
4640
4588
  errorCode,
4641
4589
  });
4642
4590
  }
@@ -4649,12 +4597,11 @@ export const de_ListPhoneNumberOrdersCommand = async (output, context) => {
4649
4597
  $metadata: deserializeMetadata(output),
4650
4598
  });
4651
4599
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4652
- if (data.NextToken != null) {
4653
- contents.NextToken = __expectString(data.NextToken);
4654
- }
4655
- if (data.PhoneNumberOrders != null) {
4656
- contents.PhoneNumberOrders = de_PhoneNumberOrderList(data.PhoneNumberOrders, context);
4657
- }
4600
+ const doc = take(data, {
4601
+ NextToken: __expectString,
4602
+ PhoneNumberOrders: (_) => de_PhoneNumberOrderList(_, context),
4603
+ });
4604
+ Object.assign(contents, doc);
4658
4605
  return contents;
4659
4606
  };
4660
4607
  const de_ListPhoneNumberOrdersCommandError = async (output, context) => {
@@ -4684,10 +4631,9 @@ const de_ListPhoneNumberOrdersCommandError = async (output, context) => {
4684
4631
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
4685
4632
  default:
4686
4633
  const parsedBody = parsedOutput.body;
4687
- throwDefaultError({
4634
+ return throwDefaultError({
4688
4635
  output,
4689
4636
  parsedBody,
4690
- exceptionCtor: __BaseException,
4691
4637
  errorCode,
4692
4638
  });
4693
4639
  }
@@ -4700,12 +4646,11 @@ export const de_ListPhoneNumbersCommand = async (output, context) => {
4700
4646
  $metadata: deserializeMetadata(output),
4701
4647
  });
4702
4648
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4703
- if (data.NextToken != null) {
4704
- contents.NextToken = __expectString(data.NextToken);
4705
- }
4706
- if (data.PhoneNumbers != null) {
4707
- contents.PhoneNumbers = de_PhoneNumberList(data.PhoneNumbers, context);
4708
- }
4649
+ const doc = take(data, {
4650
+ NextToken: __expectString,
4651
+ PhoneNumbers: (_) => de_PhoneNumberList(_, context),
4652
+ });
4653
+ Object.assign(contents, doc);
4709
4654
  return contents;
4710
4655
  };
4711
4656
  const de_ListPhoneNumbersCommandError = async (output, context) => {
@@ -4738,10 +4683,9 @@ const de_ListPhoneNumbersCommandError = async (output, context) => {
4738
4683
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
4739
4684
  default:
4740
4685
  const parsedBody = parsedOutput.body;
4741
- throwDefaultError({
4686
+ return throwDefaultError({
4742
4687
  output,
4743
4688
  parsedBody,
4744
- exceptionCtor: __BaseException,
4745
4689
  errorCode,
4746
4690
  });
4747
4691
  }
@@ -4754,12 +4698,11 @@ export const de_ListProxySessionsCommand = async (output, context) => {
4754
4698
  $metadata: deserializeMetadata(output),
4755
4699
  });
4756
4700
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4757
- if (data.NextToken != null) {
4758
- contents.NextToken = __expectString(data.NextToken);
4759
- }
4760
- if (data.ProxySessions != null) {
4761
- contents.ProxySessions = de_ProxySessions(data.ProxySessions, context);
4762
- }
4701
+ const doc = take(data, {
4702
+ NextToken: __expectString,
4703
+ ProxySessions: (_) => de_ProxySessions(_, context),
4704
+ });
4705
+ Object.assign(contents, doc);
4763
4706
  return contents;
4764
4707
  };
4765
4708
  const de_ListProxySessionsCommandError = async (output, context) => {
@@ -4792,10 +4735,9 @@ const de_ListProxySessionsCommandError = async (output, context) => {
4792
4735
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
4793
4736
  default:
4794
4737
  const parsedBody = parsedOutput.body;
4795
- throwDefaultError({
4738
+ return throwDefaultError({
4796
4739
  output,
4797
4740
  parsedBody,
4798
- exceptionCtor: __BaseException,
4799
4741
  errorCode,
4800
4742
  });
4801
4743
  }
@@ -4808,12 +4750,11 @@ export const de_ListSipMediaApplicationsCommand = async (output, context) => {
4808
4750
  $metadata: deserializeMetadata(output),
4809
4751
  });
4810
4752
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4811
- if (data.NextToken != null) {
4812
- contents.NextToken = __expectString(data.NextToken);
4813
- }
4814
- if (data.SipMediaApplications != null) {
4815
- contents.SipMediaApplications = de_SipMediaApplicationList(data.SipMediaApplications, context);
4816
- }
4753
+ const doc = take(data, {
4754
+ NextToken: __expectString,
4755
+ SipMediaApplications: (_) => de_SipMediaApplicationList(_, context),
4756
+ });
4757
+ Object.assign(contents, doc);
4817
4758
  return contents;
4818
4759
  };
4819
4760
  const de_ListSipMediaApplicationsCommandError = async (output, context) => {
@@ -4843,10 +4784,9 @@ const de_ListSipMediaApplicationsCommandError = async (output, context) => {
4843
4784
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
4844
4785
  default:
4845
4786
  const parsedBody = parsedOutput.body;
4846
- throwDefaultError({
4787
+ return throwDefaultError({
4847
4788
  output,
4848
4789
  parsedBody,
4849
- exceptionCtor: __BaseException,
4850
4790
  errorCode,
4851
4791
  });
4852
4792
  }
@@ -4859,12 +4799,11 @@ export const de_ListSipRulesCommand = async (output, context) => {
4859
4799
  $metadata: deserializeMetadata(output),
4860
4800
  });
4861
4801
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4862
- if (data.NextToken != null) {
4863
- contents.NextToken = __expectString(data.NextToken);
4864
- }
4865
- if (data.SipRules != null) {
4866
- contents.SipRules = de_SipRuleList(data.SipRules, context);
4867
- }
4802
+ const doc = take(data, {
4803
+ NextToken: __expectString,
4804
+ SipRules: (_) => de_SipRuleList(_, context),
4805
+ });
4806
+ Object.assign(contents, doc);
4868
4807
  return contents;
4869
4808
  };
4870
4809
  const de_ListSipRulesCommandError = async (output, context) => {
@@ -4894,10 +4833,9 @@ const de_ListSipRulesCommandError = async (output, context) => {
4894
4833
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
4895
4834
  default:
4896
4835
  const parsedBody = parsedOutput.body;
4897
- throwDefaultError({
4836
+ return throwDefaultError({
4898
4837
  output,
4899
4838
  parsedBody,
4900
- exceptionCtor: __BaseException,
4901
4839
  errorCode,
4902
4840
  });
4903
4841
  }
@@ -4910,9 +4848,10 @@ export const de_ListSupportedPhoneNumberCountriesCommand = async (output, contex
4910
4848
  $metadata: deserializeMetadata(output),
4911
4849
  });
4912
4850
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4913
- if (data.PhoneNumberCountries != null) {
4914
- contents.PhoneNumberCountries = de_PhoneNumberCountriesList(data.PhoneNumberCountries, context);
4915
- }
4851
+ const doc = take(data, {
4852
+ PhoneNumberCountries: _json,
4853
+ });
4854
+ Object.assign(contents, doc);
4916
4855
  return contents;
4917
4856
  };
4918
4857
  const de_ListSupportedPhoneNumberCountriesCommandError = async (output, context) => {
@@ -4945,10 +4884,9 @@ const de_ListSupportedPhoneNumberCountriesCommandError = async (output, context)
4945
4884
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
4946
4885
  default:
4947
4886
  const parsedBody = parsedOutput.body;
4948
- throwDefaultError({
4887
+ return throwDefaultError({
4949
4888
  output,
4950
4889
  parsedBody,
4951
- exceptionCtor: __BaseException,
4952
4890
  errorCode,
4953
4891
  });
4954
4892
  }
@@ -4961,9 +4899,10 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
4961
4899
  $metadata: deserializeMetadata(output),
4962
4900
  });
4963
4901
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4964
- if (data.Tags != null) {
4965
- contents.Tags = de_TagList(data.Tags, context);
4966
- }
4902
+ const doc = take(data, {
4903
+ Tags: _json,
4904
+ });
4905
+ Object.assign(contents, doc);
4967
4906
  return contents;
4968
4907
  };
4969
4908
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -4993,10 +4932,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
4993
4932
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
4994
4933
  default:
4995
4934
  const parsedBody = parsedOutput.body;
4996
- throwDefaultError({
4935
+ return throwDefaultError({
4997
4936
  output,
4998
4937
  parsedBody,
4999
- exceptionCtor: __BaseException,
5000
4938
  errorCode,
5001
4939
  });
5002
4940
  }
@@ -5009,12 +4947,11 @@ export const de_ListVoiceConnectorGroupsCommand = async (output, context) => {
5009
4947
  $metadata: deserializeMetadata(output),
5010
4948
  });
5011
4949
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5012
- if (data.NextToken != null) {
5013
- contents.NextToken = __expectString(data.NextToken);
5014
- }
5015
- if (data.VoiceConnectorGroups != null) {
5016
- contents.VoiceConnectorGroups = de_VoiceConnectorGroupList(data.VoiceConnectorGroups, context);
5017
- }
4950
+ const doc = take(data, {
4951
+ NextToken: __expectString,
4952
+ VoiceConnectorGroups: (_) => de_VoiceConnectorGroupList(_, context),
4953
+ });
4954
+ Object.assign(contents, doc);
5018
4955
  return contents;
5019
4956
  };
5020
4957
  const de_ListVoiceConnectorGroupsCommandError = async (output, context) => {
@@ -5044,10 +4981,9 @@ const de_ListVoiceConnectorGroupsCommandError = async (output, context) => {
5044
4981
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
5045
4982
  default:
5046
4983
  const parsedBody = parsedOutput.body;
5047
- throwDefaultError({
4984
+ return throwDefaultError({
5048
4985
  output,
5049
4986
  parsedBody,
5050
- exceptionCtor: __BaseException,
5051
4987
  errorCode,
5052
4988
  });
5053
4989
  }
@@ -5060,12 +4996,11 @@ export const de_ListVoiceConnectorsCommand = async (output, context) => {
5060
4996
  $metadata: deserializeMetadata(output),
5061
4997
  });
5062
4998
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5063
- if (data.NextToken != null) {
5064
- contents.NextToken = __expectString(data.NextToken);
5065
- }
5066
- if (data.VoiceConnectors != null) {
5067
- contents.VoiceConnectors = de_VoiceConnectorList(data.VoiceConnectors, context);
5068
- }
4999
+ const doc = take(data, {
5000
+ NextToken: __expectString,
5001
+ VoiceConnectors: (_) => de_VoiceConnectorList(_, context),
5002
+ });
5003
+ Object.assign(contents, doc);
5069
5004
  return contents;
5070
5005
  };
5071
5006
  const de_ListVoiceConnectorsCommandError = async (output, context) => {
@@ -5095,10 +5030,9 @@ const de_ListVoiceConnectorsCommandError = async (output, context) => {
5095
5030
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
5096
5031
  default:
5097
5032
  const parsedBody = parsedOutput.body;
5098
- throwDefaultError({
5033
+ return throwDefaultError({
5099
5034
  output,
5100
5035
  parsedBody,
5101
- exceptionCtor: __BaseException,
5102
5036
  errorCode,
5103
5037
  });
5104
5038
  }
@@ -5111,9 +5045,10 @@ export const de_ListVoiceConnectorTerminationCredentialsCommand = async (output,
5111
5045
  $metadata: deserializeMetadata(output),
5112
5046
  });
5113
5047
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5114
- if (data.Usernames != null) {
5115
- contents.Usernames = de_SensitiveStringList(data.Usernames, context);
5116
- }
5048
+ const doc = take(data, {
5049
+ Usernames: _json,
5050
+ });
5051
+ Object.assign(contents, doc);
5117
5052
  return contents;
5118
5053
  };
5119
5054
  const de_ListVoiceConnectorTerminationCredentialsCommandError = async (output, context) => {
@@ -5146,10 +5081,9 @@ const de_ListVoiceConnectorTerminationCredentialsCommandError = async (output, c
5146
5081
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
5147
5082
  default:
5148
5083
  const parsedBody = parsedOutput.body;
5149
- throwDefaultError({
5084
+ return throwDefaultError({
5150
5085
  output,
5151
5086
  parsedBody,
5152
- exceptionCtor: __BaseException,
5153
5087
  errorCode,
5154
5088
  });
5155
5089
  }
@@ -5162,12 +5096,11 @@ export const de_ListVoiceProfileDomainsCommand = async (output, context) => {
5162
5096
  $metadata: deserializeMetadata(output),
5163
5097
  });
5164
5098
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5165
- if (data.NextToken != null) {
5166
- contents.NextToken = __expectString(data.NextToken);
5167
- }
5168
- if (data.VoiceProfileDomains != null) {
5169
- contents.VoiceProfileDomains = de_VoiceProfileDomainSummaryList(data.VoiceProfileDomains, context);
5170
- }
5099
+ const doc = take(data, {
5100
+ NextToken: __expectString,
5101
+ VoiceProfileDomains: (_) => de_VoiceProfileDomainSummaryList(_, context),
5102
+ });
5103
+ Object.assign(contents, doc);
5171
5104
  return contents;
5172
5105
  };
5173
5106
  const de_ListVoiceProfileDomainsCommandError = async (output, context) => {
@@ -5200,10 +5133,9 @@ const de_ListVoiceProfileDomainsCommandError = async (output, context) => {
5200
5133
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
5201
5134
  default:
5202
5135
  const parsedBody = parsedOutput.body;
5203
- throwDefaultError({
5136
+ return throwDefaultError({
5204
5137
  output,
5205
5138
  parsedBody,
5206
- exceptionCtor: __BaseException,
5207
5139
  errorCode,
5208
5140
  });
5209
5141
  }
@@ -5216,12 +5148,11 @@ export const de_ListVoiceProfilesCommand = async (output, context) => {
5216
5148
  $metadata: deserializeMetadata(output),
5217
5149
  });
5218
5150
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5219
- if (data.NextToken != null) {
5220
- contents.NextToken = __expectString(data.NextToken);
5221
- }
5222
- if (data.VoiceProfiles != null) {
5223
- contents.VoiceProfiles = de_VoiceProfileSummaryList(data.VoiceProfiles, context);
5224
- }
5151
+ const doc = take(data, {
5152
+ NextToken: __expectString,
5153
+ VoiceProfiles: (_) => de_VoiceProfileSummaryList(_, context),
5154
+ });
5155
+ Object.assign(contents, doc);
5225
5156
  return contents;
5226
5157
  };
5227
5158
  const de_ListVoiceProfilesCommandError = async (output, context) => {
@@ -5254,10 +5185,9 @@ const de_ListVoiceProfilesCommandError = async (output, context) => {
5254
5185
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
5255
5186
  default:
5256
5187
  const parsedBody = parsedOutput.body;
5257
- throwDefaultError({
5188
+ return throwDefaultError({
5258
5189
  output,
5259
5190
  parsedBody,
5260
- exceptionCtor: __BaseException,
5261
5191
  errorCode,
5262
5192
  });
5263
5193
  }
@@ -5270,9 +5200,10 @@ export const de_PutSipMediaApplicationAlexaSkillConfigurationCommand = async (ou
5270
5200
  $metadata: deserializeMetadata(output),
5271
5201
  });
5272
5202
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5273
- if (data.SipMediaApplicationAlexaSkillConfiguration != null) {
5274
- contents.SipMediaApplicationAlexaSkillConfiguration = de_SipMediaApplicationAlexaSkillConfiguration(data.SipMediaApplicationAlexaSkillConfiguration, context);
5275
- }
5203
+ const doc = take(data, {
5204
+ SipMediaApplicationAlexaSkillConfiguration: _json,
5205
+ });
5206
+ Object.assign(contents, doc);
5276
5207
  return contents;
5277
5208
  };
5278
5209
  const de_PutSipMediaApplicationAlexaSkillConfigurationCommandError = async (output, context) => {
@@ -5305,10 +5236,9 @@ const de_PutSipMediaApplicationAlexaSkillConfigurationCommandError = async (outp
5305
5236
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
5306
5237
  default:
5307
5238
  const parsedBody = parsedOutput.body;
5308
- throwDefaultError({
5239
+ return throwDefaultError({
5309
5240
  output,
5310
5241
  parsedBody,
5311
- exceptionCtor: __BaseException,
5312
5242
  errorCode,
5313
5243
  });
5314
5244
  }
@@ -5321,9 +5251,10 @@ export const de_PutSipMediaApplicationLoggingConfigurationCommand = async (outpu
5321
5251
  $metadata: deserializeMetadata(output),
5322
5252
  });
5323
5253
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5324
- if (data.SipMediaApplicationLoggingConfiguration != null) {
5325
- contents.SipMediaApplicationLoggingConfiguration = de_SipMediaApplicationLoggingConfiguration(data.SipMediaApplicationLoggingConfiguration, context);
5326
- }
5254
+ const doc = take(data, {
5255
+ SipMediaApplicationLoggingConfiguration: _json,
5256
+ });
5257
+ Object.assign(contents, doc);
5327
5258
  return contents;
5328
5259
  };
5329
5260
  const de_PutSipMediaApplicationLoggingConfigurationCommandError = async (output, context) => {
@@ -5356,10 +5287,9 @@ const de_PutSipMediaApplicationLoggingConfigurationCommandError = async (output,
5356
5287
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
5357
5288
  default:
5358
5289
  const parsedBody = parsedOutput.body;
5359
- throwDefaultError({
5290
+ return throwDefaultError({
5360
5291
  output,
5361
5292
  parsedBody,
5362
- exceptionCtor: __BaseException,
5363
5293
  errorCode,
5364
5294
  });
5365
5295
  }
@@ -5372,9 +5302,10 @@ export const de_PutVoiceConnectorEmergencyCallingConfigurationCommand = async (o
5372
5302
  $metadata: deserializeMetadata(output),
5373
5303
  });
5374
5304
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5375
- if (data.EmergencyCallingConfiguration != null) {
5376
- contents.EmergencyCallingConfiguration = de_EmergencyCallingConfiguration(data.EmergencyCallingConfiguration, context);
5377
- }
5305
+ const doc = take(data, {
5306
+ EmergencyCallingConfiguration: _json,
5307
+ });
5308
+ Object.assign(contents, doc);
5378
5309
  return contents;
5379
5310
  };
5380
5311
  const de_PutVoiceConnectorEmergencyCallingConfigurationCommandError = async (output, context) => {
@@ -5407,10 +5338,9 @@ const de_PutVoiceConnectorEmergencyCallingConfigurationCommandError = async (out
5407
5338
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
5408
5339
  default:
5409
5340
  const parsedBody = parsedOutput.body;
5410
- throwDefaultError({
5341
+ return throwDefaultError({
5411
5342
  output,
5412
5343
  parsedBody,
5413
- exceptionCtor: __BaseException,
5414
5344
  errorCode,
5415
5345
  });
5416
5346
  }
@@ -5423,9 +5353,10 @@ export const de_PutVoiceConnectorLoggingConfigurationCommand = async (output, co
5423
5353
  $metadata: deserializeMetadata(output),
5424
5354
  });
5425
5355
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5426
- if (data.LoggingConfiguration != null) {
5427
- contents.LoggingConfiguration = de_LoggingConfiguration(data.LoggingConfiguration, context);
5428
- }
5356
+ const doc = take(data, {
5357
+ LoggingConfiguration: _json,
5358
+ });
5359
+ Object.assign(contents, doc);
5429
5360
  return contents;
5430
5361
  };
5431
5362
  const de_PutVoiceConnectorLoggingConfigurationCommandError = async (output, context) => {
@@ -5458,10 +5389,9 @@ const de_PutVoiceConnectorLoggingConfigurationCommandError = async (output, cont
5458
5389
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
5459
5390
  default:
5460
5391
  const parsedBody = parsedOutput.body;
5461
- throwDefaultError({
5392
+ return throwDefaultError({
5462
5393
  output,
5463
5394
  parsedBody,
5464
- exceptionCtor: __BaseException,
5465
5395
  errorCode,
5466
5396
  });
5467
5397
  }
@@ -5474,9 +5404,10 @@ export const de_PutVoiceConnectorOriginationCommand = async (output, context) =>
5474
5404
  $metadata: deserializeMetadata(output),
5475
5405
  });
5476
5406
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5477
- if (data.Origination != null) {
5478
- contents.Origination = de_Origination(data.Origination, context);
5479
- }
5407
+ const doc = take(data, {
5408
+ Origination: _json,
5409
+ });
5410
+ Object.assign(contents, doc);
5480
5411
  return contents;
5481
5412
  };
5482
5413
  const de_PutVoiceConnectorOriginationCommandError = async (output, context) => {
@@ -5509,10 +5440,9 @@ const de_PutVoiceConnectorOriginationCommandError = async (output, context) => {
5509
5440
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
5510
5441
  default:
5511
5442
  const parsedBody = parsedOutput.body;
5512
- throwDefaultError({
5443
+ return throwDefaultError({
5513
5444
  output,
5514
5445
  parsedBody,
5515
- exceptionCtor: __BaseException,
5516
5446
  errorCode,
5517
5447
  });
5518
5448
  }
@@ -5525,9 +5455,10 @@ export const de_PutVoiceConnectorProxyCommand = async (output, context) => {
5525
5455
  $metadata: deserializeMetadata(output),
5526
5456
  });
5527
5457
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5528
- if (data.Proxy != null) {
5529
- contents.Proxy = de_Proxy(data.Proxy, context);
5530
- }
5458
+ const doc = take(data, {
5459
+ Proxy: _json,
5460
+ });
5461
+ Object.assign(contents, doc);
5531
5462
  return contents;
5532
5463
  };
5533
5464
  const de_PutVoiceConnectorProxyCommandError = async (output, context) => {
@@ -5563,10 +5494,9 @@ const de_PutVoiceConnectorProxyCommandError = async (output, context) => {
5563
5494
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
5564
5495
  default:
5565
5496
  const parsedBody = parsedOutput.body;
5566
- throwDefaultError({
5497
+ return throwDefaultError({
5567
5498
  output,
5568
5499
  parsedBody,
5569
- exceptionCtor: __BaseException,
5570
5500
  errorCode,
5571
5501
  });
5572
5502
  }
@@ -5579,9 +5509,10 @@ export const de_PutVoiceConnectorStreamingConfigurationCommand = async (output,
5579
5509
  $metadata: deserializeMetadata(output),
5580
5510
  });
5581
5511
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5582
- if (data.StreamingConfiguration != null) {
5583
- contents.StreamingConfiguration = de_StreamingConfiguration(data.StreamingConfiguration, context);
5584
- }
5512
+ const doc = take(data, {
5513
+ StreamingConfiguration: _json,
5514
+ });
5515
+ Object.assign(contents, doc);
5585
5516
  return contents;
5586
5517
  };
5587
5518
  const de_PutVoiceConnectorStreamingConfigurationCommandError = async (output, context) => {
@@ -5614,10 +5545,9 @@ const de_PutVoiceConnectorStreamingConfigurationCommandError = async (output, co
5614
5545
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
5615
5546
  default:
5616
5547
  const parsedBody = parsedOutput.body;
5617
- throwDefaultError({
5548
+ return throwDefaultError({
5618
5549
  output,
5619
5550
  parsedBody,
5620
- exceptionCtor: __BaseException,
5621
5551
  errorCode,
5622
5552
  });
5623
5553
  }
@@ -5630,9 +5560,10 @@ export const de_PutVoiceConnectorTerminationCommand = async (output, context) =>
5630
5560
  $metadata: deserializeMetadata(output),
5631
5561
  });
5632
5562
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5633
- if (data.Termination != null) {
5634
- contents.Termination = de_Termination(data.Termination, context);
5635
- }
5563
+ const doc = take(data, {
5564
+ Termination: _json,
5565
+ });
5566
+ Object.assign(contents, doc);
5636
5567
  return contents;
5637
5568
  };
5638
5569
  const de_PutVoiceConnectorTerminationCommandError = async (output, context) => {
@@ -5668,10 +5599,9 @@ const de_PutVoiceConnectorTerminationCommandError = async (output, context) => {
5668
5599
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
5669
5600
  default:
5670
5601
  const parsedBody = parsedOutput.body;
5671
- throwDefaultError({
5602
+ return throwDefaultError({
5672
5603
  output,
5673
5604
  parsedBody,
5674
- exceptionCtor: __BaseException,
5675
5605
  errorCode,
5676
5606
  });
5677
5607
  }
@@ -5716,10 +5646,9 @@ const de_PutVoiceConnectorTerminationCredentialsCommandError = async (output, co
5716
5646
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
5717
5647
  default:
5718
5648
  const parsedBody = parsedOutput.body;
5719
- throwDefaultError({
5649
+ return throwDefaultError({
5720
5650
  output,
5721
5651
  parsedBody,
5722
- exceptionCtor: __BaseException,
5723
5652
  errorCode,
5724
5653
  });
5725
5654
  }
@@ -5732,9 +5661,10 @@ export const de_RestorePhoneNumberCommand = async (output, context) => {
5732
5661
  $metadata: deserializeMetadata(output),
5733
5662
  });
5734
5663
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5735
- if (data.PhoneNumber != null) {
5736
- contents.PhoneNumber = de_PhoneNumber(data.PhoneNumber, context);
5737
- }
5664
+ const doc = take(data, {
5665
+ PhoneNumber: (_) => de_PhoneNumber(_, context),
5666
+ });
5667
+ Object.assign(contents, doc);
5738
5668
  return contents;
5739
5669
  };
5740
5670
  const de_RestorePhoneNumberCommandError = async (output, context) => {
@@ -5770,10 +5700,9 @@ const de_RestorePhoneNumberCommandError = async (output, context) => {
5770
5700
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
5771
5701
  default:
5772
5702
  const parsedBody = parsedOutput.body;
5773
- throwDefaultError({
5703
+ return throwDefaultError({
5774
5704
  output,
5775
5705
  parsedBody,
5776
- exceptionCtor: __BaseException,
5777
5706
  errorCode,
5778
5707
  });
5779
5708
  }
@@ -5786,12 +5715,11 @@ export const de_SearchAvailablePhoneNumbersCommand = async (output, context) =>
5786
5715
  $metadata: deserializeMetadata(output),
5787
5716
  });
5788
5717
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5789
- if (data.E164PhoneNumbers != null) {
5790
- contents.E164PhoneNumbers = de_E164PhoneNumberList(data.E164PhoneNumbers, context);
5791
- }
5792
- if (data.NextToken != null) {
5793
- contents.NextToken = __expectString(data.NextToken);
5794
- }
5718
+ const doc = take(data, {
5719
+ E164PhoneNumbers: _json,
5720
+ NextToken: __expectString,
5721
+ });
5722
+ Object.assign(contents, doc);
5795
5723
  return contents;
5796
5724
  };
5797
5725
  const de_SearchAvailablePhoneNumbersCommandError = async (output, context) => {
@@ -5824,10 +5752,9 @@ const de_SearchAvailablePhoneNumbersCommandError = async (output, context) => {
5824
5752
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
5825
5753
  default:
5826
5754
  const parsedBody = parsedOutput.body;
5827
- throwDefaultError({
5755
+ return throwDefaultError({
5828
5756
  output,
5829
5757
  parsedBody,
5830
- exceptionCtor: __BaseException,
5831
5758
  errorCode,
5832
5759
  });
5833
5760
  }
@@ -5840,9 +5767,10 @@ export const de_StartSpeakerSearchTaskCommand = async (output, context) => {
5840
5767
  $metadata: deserializeMetadata(output),
5841
5768
  });
5842
5769
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5843
- if (data.SpeakerSearchTask != null) {
5844
- contents.SpeakerSearchTask = de_SpeakerSearchTask(data.SpeakerSearchTask, context);
5845
- }
5770
+ const doc = take(data, {
5771
+ SpeakerSearchTask: (_) => de_SpeakerSearchTask(_, context),
5772
+ });
5773
+ Object.assign(contents, doc);
5846
5774
  return contents;
5847
5775
  };
5848
5776
  const de_StartSpeakerSearchTaskCommandError = async (output, context) => {
@@ -5890,10 +5818,9 @@ const de_StartSpeakerSearchTaskCommandError = async (output, context) => {
5890
5818
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
5891
5819
  default:
5892
5820
  const parsedBody = parsedOutput.body;
5893
- throwDefaultError({
5821
+ return throwDefaultError({
5894
5822
  output,
5895
5823
  parsedBody,
5896
- exceptionCtor: __BaseException,
5897
5824
  errorCode,
5898
5825
  });
5899
5826
  }
@@ -5906,9 +5833,10 @@ export const de_StartVoiceToneAnalysisTaskCommand = async (output, context) => {
5906
5833
  $metadata: deserializeMetadata(output),
5907
5834
  });
5908
5835
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5909
- if (data.VoiceToneAnalysisTask != null) {
5910
- contents.VoiceToneAnalysisTask = de_VoiceToneAnalysisTask(data.VoiceToneAnalysisTask, context);
5911
- }
5836
+ const doc = take(data, {
5837
+ VoiceToneAnalysisTask: (_) => de_VoiceToneAnalysisTask(_, context),
5838
+ });
5839
+ Object.assign(contents, doc);
5912
5840
  return contents;
5913
5841
  };
5914
5842
  const de_StartVoiceToneAnalysisTaskCommandError = async (output, context) => {
@@ -5956,10 +5884,9 @@ const de_StartVoiceToneAnalysisTaskCommandError = async (output, context) => {
5956
5884
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
5957
5885
  default:
5958
5886
  const parsedBody = parsedOutput.body;
5959
- throwDefaultError({
5887
+ return throwDefaultError({
5960
5888
  output,
5961
5889
  parsedBody,
5962
- exceptionCtor: __BaseException,
5963
5890
  errorCode,
5964
5891
  });
5965
5892
  }
@@ -6013,10 +5940,9 @@ const de_StopSpeakerSearchTaskCommandError = async (output, context) => {
6013
5940
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
6014
5941
  default:
6015
5942
  const parsedBody = parsedOutput.body;
6016
- throwDefaultError({
5943
+ return throwDefaultError({
6017
5944
  output,
6018
5945
  parsedBody,
6019
- exceptionCtor: __BaseException,
6020
5946
  errorCode,
6021
5947
  });
6022
5948
  }
@@ -6070,10 +5996,9 @@ const de_StopVoiceToneAnalysisTaskCommandError = async (output, context) => {
6070
5996
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
6071
5997
  default:
6072
5998
  const parsedBody = parsedOutput.body;
6073
- throwDefaultError({
5999
+ return throwDefaultError({
6074
6000
  output,
6075
6001
  parsedBody,
6076
- exceptionCtor: __BaseException,
6077
6002
  errorCode,
6078
6003
  });
6079
6004
  }
@@ -6118,10 +6043,9 @@ const de_TagResourceCommandError = async (output, context) => {
6118
6043
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
6119
6044
  default:
6120
6045
  const parsedBody = parsedOutput.body;
6121
- throwDefaultError({
6046
+ return throwDefaultError({
6122
6047
  output,
6123
6048
  parsedBody,
6124
- exceptionCtor: __BaseException,
6125
6049
  errorCode,
6126
6050
  });
6127
6051
  }
@@ -6163,10 +6087,9 @@ const de_UntagResourceCommandError = async (output, context) => {
6163
6087
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
6164
6088
  default:
6165
6089
  const parsedBody = parsedOutput.body;
6166
- throwDefaultError({
6090
+ return throwDefaultError({
6167
6091
  output,
6168
6092
  parsedBody,
6169
- exceptionCtor: __BaseException,
6170
6093
  errorCode,
6171
6094
  });
6172
6095
  }
@@ -6208,10 +6131,9 @@ const de_UpdateGlobalSettingsCommandError = async (output, context) => {
6208
6131
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
6209
6132
  default:
6210
6133
  const parsedBody = parsedOutput.body;
6211
- throwDefaultError({
6134
+ return throwDefaultError({
6212
6135
  output,
6213
6136
  parsedBody,
6214
- exceptionCtor: __BaseException,
6215
6137
  errorCode,
6216
6138
  });
6217
6139
  }
@@ -6224,9 +6146,10 @@ export const de_UpdatePhoneNumberCommand = async (output, context) => {
6224
6146
  $metadata: deserializeMetadata(output),
6225
6147
  });
6226
6148
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
6227
- if (data.PhoneNumber != null) {
6228
- contents.PhoneNumber = de_PhoneNumber(data.PhoneNumber, context);
6229
- }
6149
+ const doc = take(data, {
6150
+ PhoneNumber: (_) => de_PhoneNumber(_, context),
6151
+ });
6152
+ Object.assign(contents, doc);
6230
6153
  return contents;
6231
6154
  };
6232
6155
  const de_UpdatePhoneNumberCommandError = async (output, context) => {
@@ -6262,10 +6185,9 @@ const de_UpdatePhoneNumberCommandError = async (output, context) => {
6262
6185
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
6263
6186
  default:
6264
6187
  const parsedBody = parsedOutput.body;
6265
- throwDefaultError({
6188
+ return throwDefaultError({
6266
6189
  output,
6267
6190
  parsedBody,
6268
- exceptionCtor: __BaseException,
6269
6191
  errorCode,
6270
6192
  });
6271
6193
  }
@@ -6307,10 +6229,9 @@ const de_UpdatePhoneNumberSettingsCommandError = async (output, context) => {
6307
6229
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
6308
6230
  default:
6309
6231
  const parsedBody = parsedOutput.body;
6310
- throwDefaultError({
6232
+ return throwDefaultError({
6311
6233
  output,
6312
6234
  parsedBody,
6313
- exceptionCtor: __BaseException,
6314
6235
  errorCode,
6315
6236
  });
6316
6237
  }
@@ -6323,9 +6244,10 @@ export const de_UpdateProxySessionCommand = async (output, context) => {
6323
6244
  $metadata: deserializeMetadata(output),
6324
6245
  });
6325
6246
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
6326
- if (data.ProxySession != null) {
6327
- contents.ProxySession = de_ProxySession(data.ProxySession, context);
6328
- }
6247
+ const doc = take(data, {
6248
+ ProxySession: (_) => de_ProxySession(_, context),
6249
+ });
6250
+ Object.assign(contents, doc);
6329
6251
  return contents;
6330
6252
  };
6331
6253
  const de_UpdateProxySessionCommandError = async (output, context) => {
@@ -6358,10 +6280,9 @@ const de_UpdateProxySessionCommandError = async (output, context) => {
6358
6280
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
6359
6281
  default:
6360
6282
  const parsedBody = parsedOutput.body;
6361
- throwDefaultError({
6283
+ return throwDefaultError({
6362
6284
  output,
6363
6285
  parsedBody,
6364
- exceptionCtor: __BaseException,
6365
6286
  errorCode,
6366
6287
  });
6367
6288
  }
@@ -6374,9 +6295,10 @@ export const de_UpdateSipMediaApplicationCommand = async (output, context) => {
6374
6295
  $metadata: deserializeMetadata(output),
6375
6296
  });
6376
6297
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
6377
- if (data.SipMediaApplication != null) {
6378
- contents.SipMediaApplication = de_SipMediaApplication(data.SipMediaApplication, context);
6379
- }
6298
+ const doc = take(data, {
6299
+ SipMediaApplication: (_) => de_SipMediaApplication(_, context),
6300
+ });
6301
+ Object.assign(contents, doc);
6380
6302
  return contents;
6381
6303
  };
6382
6304
  const de_UpdateSipMediaApplicationCommandError = async (output, context) => {
@@ -6412,10 +6334,9 @@ const de_UpdateSipMediaApplicationCommandError = async (output, context) => {
6412
6334
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
6413
6335
  default:
6414
6336
  const parsedBody = parsedOutput.body;
6415
- throwDefaultError({
6337
+ return throwDefaultError({
6416
6338
  output,
6417
6339
  parsedBody,
6418
- exceptionCtor: __BaseException,
6419
6340
  errorCode,
6420
6341
  });
6421
6342
  }
@@ -6428,9 +6349,10 @@ export const de_UpdateSipMediaApplicationCallCommand = async (output, context) =
6428
6349
  $metadata: deserializeMetadata(output),
6429
6350
  });
6430
6351
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
6431
- if (data.SipMediaApplicationCall != null) {
6432
- contents.SipMediaApplicationCall = de_SipMediaApplicationCall(data.SipMediaApplicationCall, context);
6433
- }
6352
+ const doc = take(data, {
6353
+ SipMediaApplicationCall: _json,
6354
+ });
6355
+ Object.assign(contents, doc);
6434
6356
  return contents;
6435
6357
  };
6436
6358
  const de_UpdateSipMediaApplicationCallCommandError = async (output, context) => {
@@ -6466,10 +6388,9 @@ const de_UpdateSipMediaApplicationCallCommandError = async (output, context) =>
6466
6388
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
6467
6389
  default:
6468
6390
  const parsedBody = parsedOutput.body;
6469
- throwDefaultError({
6391
+ return throwDefaultError({
6470
6392
  output,
6471
6393
  parsedBody,
6472
- exceptionCtor: __BaseException,
6473
6394
  errorCode,
6474
6395
  });
6475
6396
  }
@@ -6482,9 +6403,10 @@ export const de_UpdateSipRuleCommand = async (output, context) => {
6482
6403
  $metadata: deserializeMetadata(output),
6483
6404
  });
6484
6405
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
6485
- if (data.SipRule != null) {
6486
- contents.SipRule = de_SipRule(data.SipRule, context);
6487
- }
6406
+ const doc = take(data, {
6407
+ SipRule: (_) => de_SipRule(_, context),
6408
+ });
6409
+ Object.assign(contents, doc);
6488
6410
  return contents;
6489
6411
  };
6490
6412
  const de_UpdateSipRuleCommandError = async (output, context) => {
@@ -6523,10 +6445,9 @@ const de_UpdateSipRuleCommandError = async (output, context) => {
6523
6445
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
6524
6446
  default:
6525
6447
  const parsedBody = parsedOutput.body;
6526
- throwDefaultError({
6448
+ return throwDefaultError({
6527
6449
  output,
6528
6450
  parsedBody,
6529
- exceptionCtor: __BaseException,
6530
6451
  errorCode,
6531
6452
  });
6532
6453
  }
@@ -6539,9 +6460,10 @@ export const de_UpdateVoiceConnectorCommand = async (output, context) => {
6539
6460
  $metadata: deserializeMetadata(output),
6540
6461
  });
6541
6462
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
6542
- if (data.VoiceConnector != null) {
6543
- contents.VoiceConnector = de_VoiceConnector(data.VoiceConnector, context);
6544
- }
6463
+ const doc = take(data, {
6464
+ VoiceConnector: (_) => de_VoiceConnector(_, context),
6465
+ });
6466
+ Object.assign(contents, doc);
6545
6467
  return contents;
6546
6468
  };
6547
6469
  const de_UpdateVoiceConnectorCommandError = async (output, context) => {
@@ -6574,10 +6496,9 @@ const de_UpdateVoiceConnectorCommandError = async (output, context) => {
6574
6496
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
6575
6497
  default:
6576
6498
  const parsedBody = parsedOutput.body;
6577
- throwDefaultError({
6499
+ return throwDefaultError({
6578
6500
  output,
6579
6501
  parsedBody,
6580
- exceptionCtor: __BaseException,
6581
6502
  errorCode,
6582
6503
  });
6583
6504
  }
@@ -6590,9 +6511,10 @@ export const de_UpdateVoiceConnectorGroupCommand = async (output, context) => {
6590
6511
  $metadata: deserializeMetadata(output),
6591
6512
  });
6592
6513
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
6593
- if (data.VoiceConnectorGroup != null) {
6594
- contents.VoiceConnectorGroup = de_VoiceConnectorGroup(data.VoiceConnectorGroup, context);
6595
- }
6514
+ const doc = take(data, {
6515
+ VoiceConnectorGroup: (_) => de_VoiceConnectorGroup(_, context),
6516
+ });
6517
+ Object.assign(contents, doc);
6596
6518
  return contents;
6597
6519
  };
6598
6520
  const de_UpdateVoiceConnectorGroupCommandError = async (output, context) => {
@@ -6628,10 +6550,9 @@ const de_UpdateVoiceConnectorGroupCommandError = async (output, context) => {
6628
6550
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
6629
6551
  default:
6630
6552
  const parsedBody = parsedOutput.body;
6631
- throwDefaultError({
6553
+ return throwDefaultError({
6632
6554
  output,
6633
6555
  parsedBody,
6634
- exceptionCtor: __BaseException,
6635
6556
  errorCode,
6636
6557
  });
6637
6558
  }
@@ -6644,9 +6565,10 @@ export const de_UpdateVoiceProfileCommand = async (output, context) => {
6644
6565
  $metadata: deserializeMetadata(output),
6645
6566
  });
6646
6567
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
6647
- if (data.VoiceProfile != null) {
6648
- contents.VoiceProfile = de_VoiceProfile(data.VoiceProfile, context);
6649
- }
6568
+ const doc = take(data, {
6569
+ VoiceProfile: (_) => de_VoiceProfile(_, context),
6570
+ });
6571
+ Object.assign(contents, doc);
6650
6572
  return contents;
6651
6573
  };
6652
6574
  const de_UpdateVoiceProfileCommandError = async (output, context) => {
@@ -6688,10 +6610,9 @@ const de_UpdateVoiceProfileCommandError = async (output, context) => {
6688
6610
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
6689
6611
  default:
6690
6612
  const parsedBody = parsedOutput.body;
6691
- throwDefaultError({
6613
+ return throwDefaultError({
6692
6614
  output,
6693
6615
  parsedBody,
6694
- exceptionCtor: __BaseException,
6695
6616
  errorCode,
6696
6617
  });
6697
6618
  }
@@ -6704,9 +6625,10 @@ export const de_UpdateVoiceProfileDomainCommand = async (output, context) => {
6704
6625
  $metadata: deserializeMetadata(output),
6705
6626
  });
6706
6627
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
6707
- if (data.VoiceProfileDomain != null) {
6708
- contents.VoiceProfileDomain = de_VoiceProfileDomain(data.VoiceProfileDomain, context);
6709
- }
6628
+ const doc = take(data, {
6629
+ VoiceProfileDomain: (_) => de_VoiceProfileDomain(_, context),
6630
+ });
6631
+ Object.assign(contents, doc);
6710
6632
  return contents;
6711
6633
  };
6712
6634
  const de_UpdateVoiceProfileDomainCommandError = async (output, context) => {
@@ -6742,10 +6664,9 @@ const de_UpdateVoiceProfileDomainCommandError = async (output, context) => {
6742
6664
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
6743
6665
  default:
6744
6666
  const parsedBody = parsedOutput.body;
6745
- throwDefaultError({
6667
+ return throwDefaultError({
6746
6668
  output,
6747
6669
  parsedBody,
6748
- exceptionCtor: __BaseException,
6749
6670
  errorCode,
6750
6671
  });
6751
6672
  }
@@ -6758,18 +6679,13 @@ export const de_ValidateE911AddressCommand = async (output, context) => {
6758
6679
  $metadata: deserializeMetadata(output),
6759
6680
  });
6760
6681
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
6761
- if (data.Address != null) {
6762
- contents.Address = de_Address(data.Address, context);
6763
- }
6764
- if (data.AddressExternalId != null) {
6765
- contents.AddressExternalId = __expectString(data.AddressExternalId);
6766
- }
6767
- if (data.CandidateAddressList != null) {
6768
- contents.CandidateAddressList = de_CandidateAddressList(data.CandidateAddressList, context);
6769
- }
6770
- if (data.ValidationResult != null) {
6771
- contents.ValidationResult = __expectInt32(data.ValidationResult);
6772
- }
6682
+ const doc = take(data, {
6683
+ Address: _json,
6684
+ AddressExternalId: __expectString,
6685
+ CandidateAddressList: _json,
6686
+ ValidationResult: __expectInt32,
6687
+ });
6688
+ Object.assign(contents, doc);
6773
6689
  return contents;
6774
6690
  };
6775
6691
  const de_ValidateE911AddressCommandError = async (output, context) => {
@@ -6802,24 +6718,22 @@ const de_ValidateE911AddressCommandError = async (output, context) => {
6802
6718
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
6803
6719
  default:
6804
6720
  const parsedBody = parsedOutput.body;
6805
- throwDefaultError({
6721
+ return throwDefaultError({
6806
6722
  output,
6807
6723
  parsedBody,
6808
- exceptionCtor: __BaseException,
6809
6724
  errorCode,
6810
6725
  });
6811
6726
  }
6812
6727
  };
6813
- const map = __map;
6728
+ const throwDefaultError = withBaseException(__BaseException);
6814
6729
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
6815
6730
  const contents = map({});
6816
6731
  const data = parsedOutput.body;
6817
- if (data.Code != null) {
6818
- contents.Code = __expectString(data.Code);
6819
- }
6820
- if (data.Message != null) {
6821
- contents.Message = __expectString(data.Message);
6822
- }
6732
+ const doc = take(data, {
6733
+ Code: __expectString,
6734
+ Message: __expectString,
6735
+ });
6736
+ Object.assign(contents, doc);
6823
6737
  const exception = new AccessDeniedException({
6824
6738
  $metadata: deserializeMetadata(parsedOutput),
6825
6739
  ...contents,
@@ -6829,12 +6743,11 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
6829
6743
  const de_BadRequestExceptionRes = async (parsedOutput, context) => {
6830
6744
  const contents = map({});
6831
6745
  const data = parsedOutput.body;
6832
- if (data.Code != null) {
6833
- contents.Code = __expectString(data.Code);
6834
- }
6835
- if (data.Message != null) {
6836
- contents.Message = __expectString(data.Message);
6837
- }
6746
+ const doc = take(data, {
6747
+ Code: __expectString,
6748
+ Message: __expectString,
6749
+ });
6750
+ Object.assign(contents, doc);
6838
6751
  const exception = new BadRequestException({
6839
6752
  $metadata: deserializeMetadata(parsedOutput),
6840
6753
  ...contents,
@@ -6844,12 +6757,11 @@ const de_BadRequestExceptionRes = async (parsedOutput, context) => {
6844
6757
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
6845
6758
  const contents = map({});
6846
6759
  const data = parsedOutput.body;
6847
- if (data.Code != null) {
6848
- contents.Code = __expectString(data.Code);
6849
- }
6850
- if (data.Message != null) {
6851
- contents.Message = __expectString(data.Message);
6852
- }
6760
+ const doc = take(data, {
6761
+ Code: __expectString,
6762
+ Message: __expectString,
6763
+ });
6764
+ Object.assign(contents, doc);
6853
6765
  const exception = new ConflictException({
6854
6766
  $metadata: deserializeMetadata(parsedOutput),
6855
6767
  ...contents,
@@ -6859,12 +6771,11 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
6859
6771
  const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
6860
6772
  const contents = map({});
6861
6773
  const data = parsedOutput.body;
6862
- if (data.Code != null) {
6863
- contents.Code = __expectString(data.Code);
6864
- }
6865
- if (data.Message != null) {
6866
- contents.Message = __expectString(data.Message);
6867
- }
6774
+ const doc = take(data, {
6775
+ Code: __expectString,
6776
+ Message: __expectString,
6777
+ });
6778
+ Object.assign(contents, doc);
6868
6779
  const exception = new ForbiddenException({
6869
6780
  $metadata: deserializeMetadata(parsedOutput),
6870
6781
  ...contents,
@@ -6874,12 +6785,11 @@ const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
6874
6785
  const de_GoneExceptionRes = async (parsedOutput, context) => {
6875
6786
  const contents = map({});
6876
6787
  const data = parsedOutput.body;
6877
- if (data.Code != null) {
6878
- contents.Code = __expectString(data.Code);
6879
- }
6880
- if (data.Message != null) {
6881
- contents.Message = __expectString(data.Message);
6882
- }
6788
+ const doc = take(data, {
6789
+ Code: __expectString,
6790
+ Message: __expectString,
6791
+ });
6792
+ Object.assign(contents, doc);
6883
6793
  const exception = new GoneException({
6884
6794
  $metadata: deserializeMetadata(parsedOutput),
6885
6795
  ...contents,
@@ -6889,12 +6799,11 @@ const de_GoneExceptionRes = async (parsedOutput, context) => {
6889
6799
  const de_NotFoundExceptionRes = async (parsedOutput, context) => {
6890
6800
  const contents = map({});
6891
6801
  const data = parsedOutput.body;
6892
- if (data.Code != null) {
6893
- contents.Code = __expectString(data.Code);
6894
- }
6895
- if (data.Message != null) {
6896
- contents.Message = __expectString(data.Message);
6897
- }
6802
+ const doc = take(data, {
6803
+ Code: __expectString,
6804
+ Message: __expectString,
6805
+ });
6806
+ Object.assign(contents, doc);
6898
6807
  const exception = new NotFoundException({
6899
6808
  $metadata: deserializeMetadata(parsedOutput),
6900
6809
  ...contents,
@@ -6904,12 +6813,11 @@ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
6904
6813
  const de_ResourceLimitExceededExceptionRes = async (parsedOutput, context) => {
6905
6814
  const contents = map({});
6906
6815
  const data = parsedOutput.body;
6907
- if (data.Code != null) {
6908
- contents.Code = __expectString(data.Code);
6909
- }
6910
- if (data.Message != null) {
6911
- contents.Message = __expectString(data.Message);
6912
- }
6816
+ const doc = take(data, {
6817
+ Code: __expectString,
6818
+ Message: __expectString,
6819
+ });
6820
+ Object.assign(contents, doc);
6913
6821
  const exception = new ResourceLimitExceededException({
6914
6822
  $metadata: deserializeMetadata(parsedOutput),
6915
6823
  ...contents,
@@ -6919,12 +6827,11 @@ const de_ResourceLimitExceededExceptionRes = async (parsedOutput, context) => {
6919
6827
  const de_ServiceFailureExceptionRes = async (parsedOutput, context) => {
6920
6828
  const contents = map({});
6921
6829
  const data = parsedOutput.body;
6922
- if (data.Code != null) {
6923
- contents.Code = __expectString(data.Code);
6924
- }
6925
- if (data.Message != null) {
6926
- contents.Message = __expectString(data.Message);
6927
- }
6830
+ const doc = take(data, {
6831
+ Code: __expectString,
6832
+ Message: __expectString,
6833
+ });
6834
+ Object.assign(contents, doc);
6928
6835
  const exception = new ServiceFailureException({
6929
6836
  $metadata: deserializeMetadata(parsedOutput),
6930
6837
  ...contents,
@@ -6934,12 +6841,11 @@ const de_ServiceFailureExceptionRes = async (parsedOutput, context) => {
6934
6841
  const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
6935
6842
  const contents = map({});
6936
6843
  const data = parsedOutput.body;
6937
- if (data.Code != null) {
6938
- contents.Code = __expectString(data.Code);
6939
- }
6940
- if (data.Message != null) {
6941
- contents.Message = __expectString(data.Message);
6942
- }
6844
+ const doc = take(data, {
6845
+ Code: __expectString,
6846
+ Message: __expectString,
6847
+ });
6848
+ Object.assign(contents, doc);
6943
6849
  const exception = new ServiceUnavailableException({
6944
6850
  $metadata: deserializeMetadata(parsedOutput),
6945
6851
  ...contents,
@@ -6949,12 +6855,11 @@ const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
6949
6855
  const de_ThrottledClientExceptionRes = async (parsedOutput, context) => {
6950
6856
  const contents = map({});
6951
6857
  const data = parsedOutput.body;
6952
- if (data.Code != null) {
6953
- contents.Code = __expectString(data.Code);
6954
- }
6955
- if (data.Message != null) {
6956
- contents.Message = __expectString(data.Message);
6957
- }
6858
+ const doc = take(data, {
6859
+ Code: __expectString,
6860
+ Message: __expectString,
6861
+ });
6862
+ Object.assign(contents, doc);
6958
6863
  const exception = new ThrottledClientException({
6959
6864
  $metadata: deserializeMetadata(parsedOutput),
6960
6865
  ...contents,
@@ -6964,12 +6869,11 @@ const de_ThrottledClientExceptionRes = async (parsedOutput, context) => {
6964
6869
  const de_UnauthorizedClientExceptionRes = async (parsedOutput, context) => {
6965
6870
  const contents = map({});
6966
6871
  const data = parsedOutput.body;
6967
- if (data.Code != null) {
6968
- contents.Code = __expectString(data.Code);
6969
- }
6970
- if (data.Message != null) {
6971
- contents.Message = __expectString(data.Message);
6972
- }
6872
+ const doc = take(data, {
6873
+ Code: __expectString,
6874
+ Message: __expectString,
6875
+ });
6876
+ Object.assign(contents, doc);
6973
6877
  const exception = new UnauthorizedClientException({
6974
6878
  $metadata: deserializeMetadata(parsedOutput),
6975
6879
  ...contents,
@@ -6979,1096 +6883,284 @@ const de_UnauthorizedClientExceptionRes = async (parsedOutput, context) => {
6979
6883
  const de_UnprocessableEntityExceptionRes = async (parsedOutput, context) => {
6980
6884
  const contents = map({});
6981
6885
  const data = parsedOutput.body;
6982
- if (data.Code != null) {
6983
- contents.Code = __expectString(data.Code);
6984
- }
6985
- if (data.Message != null) {
6986
- contents.Message = __expectString(data.Message);
6987
- }
6886
+ const doc = take(data, {
6887
+ Code: __expectString,
6888
+ Message: __expectString,
6889
+ });
6890
+ Object.assign(contents, doc);
6988
6891
  const exception = new UnprocessableEntityException({
6989
6892
  $metadata: deserializeMetadata(parsedOutput),
6990
6893
  ...contents,
6991
6894
  });
6992
6895
  return __decorateServiceException(exception, parsedOutput.body);
6993
6896
  };
6994
- const se_AlexaSkillIdList = (input, context) => {
6995
- return input
6996
- .filter((e) => e != null)
6997
- .map((entry) => {
6998
- return entry;
6897
+ const de_PhoneNumber = (output, context) => {
6898
+ return take(output, {
6899
+ Associations: (_) => de_PhoneNumberAssociationList(_, context),
6900
+ CallingName: __expectString,
6901
+ CallingNameStatus: __expectString,
6902
+ Capabilities: _json,
6903
+ Country: __expectString,
6904
+ CreatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
6905
+ DeletionTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
6906
+ E164PhoneNumber: __expectString,
6907
+ OrderId: __expectString,
6908
+ PhoneNumberId: __expectString,
6909
+ ProductType: __expectString,
6910
+ Status: __expectString,
6911
+ Type: __expectString,
6912
+ UpdatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
6999
6913
  });
7000
6914
  };
7001
- const se_CallingRegionList = (input, context) => {
7002
- return input
7003
- .filter((e) => e != null)
7004
- .map((entry) => {
7005
- return entry;
6915
+ const de_PhoneNumberAssociation = (output, context) => {
6916
+ return take(output, {
6917
+ AssociatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
6918
+ Name: __expectString,
6919
+ Value: __expectString,
7006
6920
  });
7007
6921
  };
7008
- const se_CapabilityList = (input, context) => {
7009
- return input
6922
+ const de_PhoneNumberAssociationList = (output, context) => {
6923
+ const retVal = (output || [])
7010
6924
  .filter((e) => e != null)
7011
6925
  .map((entry) => {
7012
- return entry;
6926
+ return de_PhoneNumberAssociation(entry, context);
7013
6927
  });
6928
+ return retVal;
7014
6929
  };
7015
- const se_CountryList = (input, context) => {
7016
- return input
6930
+ const de_PhoneNumberList = (output, context) => {
6931
+ const retVal = (output || [])
7017
6932
  .filter((e) => e != null)
7018
6933
  .map((entry) => {
7019
- return entry;
6934
+ return de_PhoneNumber(entry, context);
7020
6935
  });
6936
+ return retVal;
7021
6937
  };
7022
- const se_Credential = (input, context) => {
7023
- return {
7024
- ...(input.Password != null && { Password: input.Password }),
7025
- ...(input.Username != null && { Username: input.Username }),
7026
- };
6938
+ const de_PhoneNumberOrder = (output, context) => {
6939
+ return take(output, {
6940
+ CreatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
6941
+ OrderType: __expectString,
6942
+ OrderedPhoneNumbers: _json,
6943
+ PhoneNumberOrderId: __expectString,
6944
+ ProductType: __expectString,
6945
+ Status: __expectString,
6946
+ UpdatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
6947
+ });
7027
6948
  };
7028
- const se_CredentialList = (input, context) => {
7029
- return input
6949
+ const de_PhoneNumberOrderList = (output, context) => {
6950
+ const retVal = (output || [])
7030
6951
  .filter((e) => e != null)
7031
6952
  .map((entry) => {
7032
- return se_Credential(entry, context);
6953
+ return de_PhoneNumberOrder(entry, context);
7033
6954
  });
7034
- };
7035
- const se_DNISEmergencyCallingConfiguration = (input, context) => {
7036
- return {
7037
- ...(input.CallingCountry != null && { CallingCountry: input.CallingCountry }),
7038
- ...(input.EmergencyPhoneNumber != null && { EmergencyPhoneNumber: input.EmergencyPhoneNumber }),
7039
- ...(input.TestPhoneNumber != null && { TestPhoneNumber: input.TestPhoneNumber }),
7040
- };
7041
- };
7042
- const se_DNISEmergencyCallingConfigurationList = (input, context) => {
7043
- return input
7044
- .filter((e) => e != null)
7045
- .map((entry) => {
7046
- return se_DNISEmergencyCallingConfiguration(entry, context);
7047
- });
7048
- };
7049
- const se_E164PhoneNumberList = (input, context) => {
7050
- return input
7051
- .filter((e) => e != null)
7052
- .map((entry) => {
7053
- return entry;
7054
- });
7055
- };
7056
- const se_EmergencyCallingConfiguration = (input, context) => {
7057
- return {
7058
- ...(input.DNIS != null && { DNIS: se_DNISEmergencyCallingConfigurationList(input.DNIS, context) }),
7059
- };
7060
- };
7061
- const se_GeoMatchParams = (input, context) => {
7062
- return {
7063
- ...(input.AreaCode != null && { AreaCode: input.AreaCode }),
7064
- ...(input.Country != null && { Country: input.Country }),
7065
- };
7066
- };
7067
- const se_LoggingConfiguration = (input, context) => {
7068
- return {
7069
- ...(input.EnableMediaMetricLogs != null && { EnableMediaMetricLogs: input.EnableMediaMetricLogs }),
7070
- ...(input.EnableSIPLogs != null && { EnableSIPLogs: input.EnableSIPLogs }),
7071
- };
7072
- };
7073
- const se_MediaInsightsConfiguration = (input, context) => {
7074
- return {
7075
- ...(input.ConfigurationArn != null && { ConfigurationArn: input.ConfigurationArn }),
7076
- ...(input.Disabled != null && { Disabled: input.Disabled }),
7077
- };
7078
- };
7079
- const se_NonEmptyStringList = (input, context) => {
7080
- return input
7081
- .filter((e) => e != null)
7082
- .map((entry) => {
7083
- return entry;
7084
- });
7085
- };
7086
- const se_Origination = (input, context) => {
7087
- return {
7088
- ...(input.Disabled != null && { Disabled: input.Disabled }),
7089
- ...(input.Routes != null && { Routes: se_OriginationRouteList(input.Routes, context) }),
7090
- };
7091
- };
7092
- const se_OriginationRoute = (input, context) => {
7093
- return {
7094
- ...(input.Host != null && { Host: input.Host }),
7095
- ...(input.Port != null && { Port: input.Port }),
7096
- ...(input.Priority != null && { Priority: input.Priority }),
7097
- ...(input.Protocol != null && { Protocol: input.Protocol }),
7098
- ...(input.Weight != null && { Weight: input.Weight }),
7099
- };
7100
- };
7101
- const se_OriginationRouteList = (input, context) => {
7102
- return input
7103
- .filter((e) => e != null)
7104
- .map((entry) => {
7105
- return se_OriginationRoute(entry, context);
7106
- });
7107
- };
7108
- const se_ParticipantPhoneNumberList = (input, context) => {
7109
- return input
7110
- .filter((e) => e != null)
7111
- .map((entry) => {
7112
- return entry;
7113
- });
7114
- };
7115
- const se_SensitiveStringList = (input, context) => {
7116
- return input
7117
- .filter((e) => e != null)
7118
- .map((entry) => {
7119
- return entry;
7120
- });
7121
- };
7122
- const se_ServerSideEncryptionConfiguration = (input, context) => {
7123
- return {
7124
- ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }),
7125
- };
7126
- };
7127
- const se_SipHeadersMap = (input, context) => {
7128
- return Object.entries(input).reduce((acc, [key, value]) => {
7129
- if (value === null) {
7130
- return acc;
7131
- }
7132
- acc[key] = value;
7133
- return acc;
7134
- }, {});
7135
- };
7136
- const se_SipMediaApplicationAlexaSkillConfiguration = (input, context) => {
7137
- return {
7138
- ...(input.AlexaSkillIds != null && { AlexaSkillIds: se_AlexaSkillIdList(input.AlexaSkillIds, context) }),
7139
- ...(input.AlexaSkillStatus != null && { AlexaSkillStatus: input.AlexaSkillStatus }),
7140
- };
7141
- };
7142
- const se_SipMediaApplicationEndpoint = (input, context) => {
7143
- return {
7144
- ...(input.LambdaArn != null && { LambdaArn: input.LambdaArn }),
7145
- };
7146
- };
7147
- const se_SipMediaApplicationEndpointList = (input, context) => {
7148
- return input
7149
- .filter((e) => e != null)
7150
- .map((entry) => {
7151
- return se_SipMediaApplicationEndpoint(entry, context);
7152
- });
7153
- };
7154
- const se_SipMediaApplicationLoggingConfiguration = (input, context) => {
7155
- return {
7156
- ...(input.EnableSipMediaApplicationMessageLogs != null && {
7157
- EnableSipMediaApplicationMessageLogs: input.EnableSipMediaApplicationMessageLogs,
7158
- }),
7159
- };
7160
- };
7161
- const se_SipRuleTargetApplication = (input, context) => {
7162
- return {
7163
- ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }),
7164
- ...(input.Priority != null && { Priority: input.Priority }),
7165
- ...(input.SipMediaApplicationId != null && { SipMediaApplicationId: input.SipMediaApplicationId }),
7166
- };
7167
- };
7168
- const se_SipRuleTargetApplicationList = (input, context) => {
7169
- return input
7170
- .filter((e) => e != null)
7171
- .map((entry) => {
7172
- return se_SipRuleTargetApplication(entry, context);
7173
- });
7174
- };
7175
- const se_SMACreateCallArgumentsMap = (input, context) => {
7176
- return Object.entries(input).reduce((acc, [key, value]) => {
7177
- if (value === null) {
7178
- return acc;
7179
- }
7180
- acc[key] = value;
7181
- return acc;
7182
- }, {});
7183
- };
7184
- const se_SMAUpdateCallArgumentsMap = (input, context) => {
7185
- return Object.entries(input).reduce((acc, [key, value]) => {
7186
- if (value === null) {
7187
- return acc;
7188
- }
7189
- acc[key] = value;
7190
- return acc;
7191
- }, {});
7192
- };
7193
- const se_StreamingConfiguration = (input, context) => {
7194
- return {
7195
- ...(input.DataRetentionInHours != null && { DataRetentionInHours: input.DataRetentionInHours }),
7196
- ...(input.Disabled != null && { Disabled: input.Disabled }),
7197
- ...(input.MediaInsightsConfiguration != null && {
7198
- MediaInsightsConfiguration: se_MediaInsightsConfiguration(input.MediaInsightsConfiguration, context),
7199
- }),
7200
- ...(input.StreamingNotificationTargets != null && {
7201
- StreamingNotificationTargets: se_StreamingNotificationTargetList(input.StreamingNotificationTargets, context),
7202
- }),
7203
- };
7204
- };
7205
- const se_StreamingNotificationTarget = (input, context) => {
7206
- return {
7207
- ...(input.NotificationTarget != null && { NotificationTarget: input.NotificationTarget }),
7208
- };
7209
- };
7210
- const se_StreamingNotificationTargetList = (input, context) => {
7211
- return input
7212
- .filter((e) => e != null)
7213
- .map((entry) => {
7214
- return se_StreamingNotificationTarget(entry, context);
7215
- });
7216
- };
7217
- const se_StringList = (input, context) => {
7218
- return input
7219
- .filter((e) => e != null)
7220
- .map((entry) => {
7221
- return entry;
7222
- });
7223
- };
7224
- const se_Tag = (input, context) => {
7225
- return {
7226
- ...(input.Key != null && { Key: input.Key }),
7227
- ...(input.Value != null && { Value: input.Value }),
7228
- };
7229
- };
7230
- const se_TagKeyList = (input, context) => {
7231
- return input
7232
- .filter((e) => e != null)
7233
- .map((entry) => {
7234
- return entry;
7235
- });
7236
- };
7237
- const se_TagList = (input, context) => {
7238
- return input
7239
- .filter((e) => e != null)
7240
- .map((entry) => {
7241
- return se_Tag(entry, context);
7242
- });
7243
- };
7244
- const se_Termination = (input, context) => {
7245
- return {
7246
- ...(input.CallingRegions != null && { CallingRegions: se_CallingRegionList(input.CallingRegions, context) }),
7247
- ...(input.CidrAllowedList != null && { CidrAllowedList: se_StringList(input.CidrAllowedList, context) }),
7248
- ...(input.CpsLimit != null && { CpsLimit: input.CpsLimit }),
7249
- ...(input.DefaultPhoneNumber != null && { DefaultPhoneNumber: input.DefaultPhoneNumber }),
7250
- ...(input.Disabled != null && { Disabled: input.Disabled }),
7251
- };
7252
- };
7253
- const se_UpdatePhoneNumberRequestItem = (input, context) => {
7254
- return {
7255
- ...(input.CallingName != null && { CallingName: input.CallingName }),
7256
- ...(input.PhoneNumberId != null && { PhoneNumberId: input.PhoneNumberId }),
7257
- ...(input.ProductType != null && { ProductType: input.ProductType }),
7258
- };
7259
- };
7260
- const se_UpdatePhoneNumberRequestItemList = (input, context) => {
7261
- return input
7262
- .filter((e) => e != null)
7263
- .map((entry) => {
7264
- return se_UpdatePhoneNumberRequestItem(entry, context);
7265
- });
7266
- };
7267
- const se_VoiceConnectorItem = (input, context) => {
7268
- return {
7269
- ...(input.Priority != null && { Priority: input.Priority }),
7270
- ...(input.VoiceConnectorId != null && { VoiceConnectorId: input.VoiceConnectorId }),
7271
- };
7272
- };
7273
- const se_VoiceConnectorItemList = (input, context) => {
7274
- return input
7275
- .filter((e) => e != null)
7276
- .map((entry) => {
7277
- return se_VoiceConnectorItem(entry, context);
7278
- });
7279
- };
7280
- const se_VoiceConnectorSettings = (input, context) => {
7281
- return {
7282
- ...(input.CdrBucket != null && { CdrBucket: input.CdrBucket }),
7283
- };
7284
- };
7285
- const de_Address = (output, context) => {
7286
- return {
7287
- city: __expectString(output.city),
7288
- country: __expectString(output.country),
7289
- postDirectional: __expectString(output.postDirectional),
7290
- postalCode: __expectString(output.postalCode),
7291
- postalCodePlus4: __expectString(output.postalCodePlus4),
7292
- preDirectional: __expectString(output.preDirectional),
7293
- state: __expectString(output.state),
7294
- streetName: __expectString(output.streetName),
7295
- streetNumber: __expectString(output.streetNumber),
7296
- streetSuffix: __expectString(output.streetSuffix),
7297
- };
7298
- };
7299
- const de_AlexaSkillIdList = (output, context) => {
7300
- const retVal = (output || [])
7301
- .filter((e) => e != null)
7302
- .map((entry) => {
7303
- if (entry === null) {
7304
- return null;
7305
- }
7306
- return __expectString(entry);
7307
- });
7308
- return retVal;
7309
- };
7310
- const de_CallDetails = (output, context) => {
7311
- return {
7312
- IsCaller: __expectBoolean(output.IsCaller),
7313
- TransactionId: __expectString(output.TransactionId),
7314
- VoiceConnectorId: __expectString(output.VoiceConnectorId),
7315
- };
7316
- };
7317
- const de_CallingRegionList = (output, context) => {
7318
- const retVal = (output || [])
7319
- .filter((e) => e != null)
7320
- .map((entry) => {
7321
- if (entry === null) {
7322
- return null;
7323
- }
7324
- return __expectString(entry);
7325
- });
7326
- return retVal;
7327
- };
7328
- const de_CandidateAddress = (output, context) => {
7329
- return {
7330
- city: __expectString(output.city),
7331
- country: __expectString(output.country),
7332
- postalCode: __expectString(output.postalCode),
7333
- postalCodePlus4: __expectString(output.postalCodePlus4),
7334
- state: __expectString(output.state),
7335
- streetInfo: __expectString(output.streetInfo),
7336
- streetNumber: __expectString(output.streetNumber),
7337
- };
7338
- };
7339
- const de_CandidateAddressList = (output, context) => {
7340
- const retVal = (output || [])
7341
- .filter((e) => e != null)
7342
- .map((entry) => {
7343
- if (entry === null) {
7344
- return null;
7345
- }
7346
- return de_CandidateAddress(entry, context);
7347
- });
7348
- return retVal;
7349
- };
7350
- const de_CapabilityList = (output, context) => {
7351
- const retVal = (output || [])
7352
- .filter((e) => e != null)
7353
- .map((entry) => {
7354
- if (entry === null) {
7355
- return null;
7356
- }
7357
- return __expectString(entry);
7358
- });
7359
- return retVal;
7360
- };
7361
- const de_DNISEmergencyCallingConfiguration = (output, context) => {
7362
- return {
7363
- CallingCountry: __expectString(output.CallingCountry),
7364
- EmergencyPhoneNumber: __expectString(output.EmergencyPhoneNumber),
7365
- TestPhoneNumber: __expectString(output.TestPhoneNumber),
7366
- };
7367
- };
7368
- const de_DNISEmergencyCallingConfigurationList = (output, context) => {
7369
- const retVal = (output || [])
7370
- .filter((e) => e != null)
7371
- .map((entry) => {
7372
- if (entry === null) {
7373
- return null;
7374
- }
7375
- return de_DNISEmergencyCallingConfiguration(entry, context);
7376
- });
7377
- return retVal;
7378
- };
7379
- const de_E164PhoneNumberList = (output, context) => {
7380
- const retVal = (output || [])
7381
- .filter((e) => e != null)
7382
- .map((entry) => {
7383
- if (entry === null) {
7384
- return null;
7385
- }
7386
- return __expectString(entry);
7387
- });
7388
- return retVal;
7389
- };
7390
- const de_EmergencyCallingConfiguration = (output, context) => {
7391
- return {
7392
- DNIS: output.DNIS != null ? de_DNISEmergencyCallingConfigurationList(output.DNIS, context) : undefined,
7393
- };
7394
- };
7395
- const de_GeoMatchParams = (output, context) => {
7396
- return {
7397
- AreaCode: __expectString(output.AreaCode),
7398
- Country: __expectString(output.Country),
7399
- };
7400
- };
7401
- const de_LoggingConfiguration = (output, context) => {
7402
- return {
7403
- EnableMediaMetricLogs: __expectBoolean(output.EnableMediaMetricLogs),
7404
- EnableSIPLogs: __expectBoolean(output.EnableSIPLogs),
7405
- };
7406
- };
7407
- const de_MediaInsightsConfiguration = (output, context) => {
7408
- return {
7409
- ConfigurationArn: __expectString(output.ConfigurationArn),
7410
- Disabled: __expectBoolean(output.Disabled),
7411
- };
7412
- };
7413
- const de_OrderedPhoneNumber = (output, context) => {
7414
- return {
7415
- E164PhoneNumber: __expectString(output.E164PhoneNumber),
7416
- Status: __expectString(output.Status),
7417
- };
7418
- };
7419
- const de_OrderedPhoneNumberList = (output, context) => {
7420
- const retVal = (output || [])
7421
- .filter((e) => e != null)
7422
- .map((entry) => {
7423
- if (entry === null) {
7424
- return null;
7425
- }
7426
- return de_OrderedPhoneNumber(entry, context);
7427
- });
7428
- return retVal;
7429
- };
7430
- const de_Origination = (output, context) => {
7431
- return {
7432
- Disabled: __expectBoolean(output.Disabled),
7433
- Routes: output.Routes != null ? de_OriginationRouteList(output.Routes, context) : undefined,
7434
- };
7435
- };
7436
- const de_OriginationRoute = (output, context) => {
7437
- return {
7438
- Host: __expectString(output.Host),
7439
- Port: __expectInt32(output.Port),
7440
- Priority: __expectInt32(output.Priority),
7441
- Protocol: __expectString(output.Protocol),
7442
- Weight: __expectInt32(output.Weight),
7443
- };
7444
- };
7445
- const de_OriginationRouteList = (output, context) => {
7446
- const retVal = (output || [])
7447
- .filter((e) => e != null)
7448
- .map((entry) => {
7449
- if (entry === null) {
7450
- return null;
7451
- }
7452
- return de_OriginationRoute(entry, context);
7453
- });
7454
- return retVal;
7455
- };
7456
- const de_Participant = (output, context) => {
7457
- return {
7458
- PhoneNumber: __expectString(output.PhoneNumber),
7459
- ProxyPhoneNumber: __expectString(output.ProxyPhoneNumber),
7460
- };
7461
- };
7462
- const de_Participants = (output, context) => {
7463
- const retVal = (output || [])
7464
- .filter((e) => e != null)
7465
- .map((entry) => {
7466
- if (entry === null) {
7467
- return null;
7468
- }
7469
- return de_Participant(entry, context);
7470
- });
7471
- return retVal;
7472
- };
7473
- const de_PhoneNumber = (output, context) => {
7474
- return {
7475
- Associations: output.Associations != null ? de_PhoneNumberAssociationList(output.Associations, context) : undefined,
7476
- CallingName: __expectString(output.CallingName),
7477
- CallingNameStatus: __expectString(output.CallingNameStatus),
7478
- Capabilities: output.Capabilities != null ? de_PhoneNumberCapabilities(output.Capabilities, context) : undefined,
7479
- Country: __expectString(output.Country),
7480
- CreatedTimestamp: output.CreatedTimestamp != null
7481
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp))
7482
- : undefined,
7483
- DeletionTimestamp: output.DeletionTimestamp != null
7484
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.DeletionTimestamp))
7485
- : undefined,
7486
- E164PhoneNumber: __expectString(output.E164PhoneNumber),
7487
- OrderId: __expectString(output.OrderId),
7488
- PhoneNumberId: __expectString(output.PhoneNumberId),
7489
- ProductType: __expectString(output.ProductType),
7490
- Status: __expectString(output.Status),
7491
- Type: __expectString(output.Type),
7492
- UpdatedTimestamp: output.UpdatedTimestamp != null
7493
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp))
7494
- : undefined,
7495
- };
7496
- };
7497
- const de_PhoneNumberAssociation = (output, context) => {
7498
- return {
7499
- AssociatedTimestamp: output.AssociatedTimestamp != null
7500
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.AssociatedTimestamp))
7501
- : undefined,
7502
- Name: __expectString(output.Name),
7503
- Value: __expectString(output.Value),
7504
- };
7505
- };
7506
- const de_PhoneNumberAssociationList = (output, context) => {
7507
- const retVal = (output || [])
7508
- .filter((e) => e != null)
7509
- .map((entry) => {
7510
- if (entry === null) {
7511
- return null;
7512
- }
7513
- return de_PhoneNumberAssociation(entry, context);
7514
- });
7515
- return retVal;
7516
- };
7517
- const de_PhoneNumberCapabilities = (output, context) => {
7518
- return {
7519
- InboundCall: __expectBoolean(output.InboundCall),
7520
- InboundMMS: __expectBoolean(output.InboundMMS),
7521
- InboundSMS: __expectBoolean(output.InboundSMS),
7522
- OutboundCall: __expectBoolean(output.OutboundCall),
7523
- OutboundMMS: __expectBoolean(output.OutboundMMS),
7524
- OutboundSMS: __expectBoolean(output.OutboundSMS),
7525
- };
7526
- };
7527
- const de_PhoneNumberCountriesList = (output, context) => {
7528
- const retVal = (output || [])
7529
- .filter((e) => e != null)
7530
- .map((entry) => {
7531
- if (entry === null) {
7532
- return null;
7533
- }
7534
- return de_PhoneNumberCountry(entry, context);
7535
- });
7536
- return retVal;
7537
- };
7538
- const de_PhoneNumberCountry = (output, context) => {
7539
- return {
7540
- CountryCode: __expectString(output.CountryCode),
7541
- SupportedPhoneNumberTypes: output.SupportedPhoneNumberTypes != null
7542
- ? de_PhoneNumberTypeList(output.SupportedPhoneNumberTypes, context)
7543
- : undefined,
7544
- };
7545
- };
7546
- const de_PhoneNumberError = (output, context) => {
7547
- return {
7548
- ErrorCode: __expectString(output.ErrorCode),
7549
- ErrorMessage: __expectString(output.ErrorMessage),
7550
- PhoneNumberId: __expectString(output.PhoneNumberId),
7551
- };
7552
- };
7553
- const de_PhoneNumberErrorList = (output, context) => {
7554
- const retVal = (output || [])
7555
- .filter((e) => e != null)
7556
- .map((entry) => {
7557
- if (entry === null) {
7558
- return null;
7559
- }
7560
- return de_PhoneNumberError(entry, context);
7561
- });
7562
- return retVal;
7563
- };
7564
- const de_PhoneNumberList = (output, context) => {
7565
- const retVal = (output || [])
7566
- .filter((e) => e != null)
7567
- .map((entry) => {
7568
- if (entry === null) {
7569
- return null;
7570
- }
7571
- return de_PhoneNumber(entry, context);
7572
- });
7573
- return retVal;
7574
- };
7575
- const de_PhoneNumberOrder = (output, context) => {
7576
- return {
7577
- CreatedTimestamp: output.CreatedTimestamp != null
7578
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp))
7579
- : undefined,
7580
- OrderType: __expectString(output.OrderType),
7581
- OrderedPhoneNumbers: output.OrderedPhoneNumbers != null ? de_OrderedPhoneNumberList(output.OrderedPhoneNumbers, context) : undefined,
7582
- PhoneNumberOrderId: __expectString(output.PhoneNumberOrderId),
7583
- ProductType: __expectString(output.ProductType),
7584
- Status: __expectString(output.Status),
7585
- UpdatedTimestamp: output.UpdatedTimestamp != null
7586
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp))
7587
- : undefined,
7588
- };
7589
- };
7590
- const de_PhoneNumberOrderList = (output, context) => {
7591
- const retVal = (output || [])
7592
- .filter((e) => e != null)
7593
- .map((entry) => {
7594
- if (entry === null) {
7595
- return null;
7596
- }
7597
- return de_PhoneNumberOrder(entry, context);
7598
- });
7599
- return retVal;
7600
- };
7601
- const de_PhoneNumberTypeList = (output, context) => {
7602
- const retVal = (output || [])
7603
- .filter((e) => e != null)
7604
- .map((entry) => {
7605
- if (entry === null) {
7606
- return null;
7607
- }
7608
- return __expectString(entry);
7609
- });
7610
- return retVal;
7611
- };
7612
- const de_Proxy = (output, context) => {
7613
- return {
7614
- DefaultSessionExpiryMinutes: __expectInt32(output.DefaultSessionExpiryMinutes),
7615
- Disabled: __expectBoolean(output.Disabled),
7616
- FallBackPhoneNumber: __expectString(output.FallBackPhoneNumber),
7617
- PhoneNumberCountries: output.PhoneNumberCountries != null ? de_StringList(output.PhoneNumberCountries, context) : undefined,
7618
- };
6955
+ return retVal;
7619
6956
  };
7620
6957
  const de_ProxySession = (output, context) => {
7621
- return {
7622
- Capabilities: output.Capabilities != null ? de_CapabilityList(output.Capabilities, context) : undefined,
7623
- CreatedTimestamp: output.CreatedTimestamp != null
7624
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp))
7625
- : undefined,
7626
- EndedTimestamp: output.EndedTimestamp != null
7627
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.EndedTimestamp))
7628
- : undefined,
7629
- ExpiryMinutes: __expectInt32(output.ExpiryMinutes),
7630
- GeoMatchLevel: __expectString(output.GeoMatchLevel),
7631
- GeoMatchParams: output.GeoMatchParams != null ? de_GeoMatchParams(output.GeoMatchParams, context) : undefined,
7632
- Name: __expectString(output.Name),
7633
- NumberSelectionBehavior: __expectString(output.NumberSelectionBehavior),
7634
- Participants: output.Participants != null ? de_Participants(output.Participants, context) : undefined,
7635
- ProxySessionId: __expectString(output.ProxySessionId),
7636
- Status: __expectString(output.Status),
7637
- UpdatedTimestamp: output.UpdatedTimestamp != null
7638
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp))
7639
- : undefined,
7640
- VoiceConnectorId: __expectString(output.VoiceConnectorId),
7641
- };
6958
+ return take(output, {
6959
+ Capabilities: _json,
6960
+ CreatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
6961
+ EndedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
6962
+ ExpiryMinutes: __expectInt32,
6963
+ GeoMatchLevel: __expectString,
6964
+ GeoMatchParams: _json,
6965
+ Name: __expectString,
6966
+ NumberSelectionBehavior: __expectString,
6967
+ Participants: _json,
6968
+ ProxySessionId: __expectString,
6969
+ Status: __expectString,
6970
+ UpdatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
6971
+ VoiceConnectorId: __expectString,
6972
+ });
7642
6973
  };
7643
6974
  const de_ProxySessions = (output, context) => {
7644
6975
  const retVal = (output || [])
7645
6976
  .filter((e) => e != null)
7646
6977
  .map((entry) => {
7647
- if (entry === null) {
7648
- return null;
7649
- }
7650
6978
  return de_ProxySession(entry, context);
7651
6979
  });
7652
6980
  return retVal;
7653
6981
  };
7654
- const de_SensitiveStringList = (output, context) => {
7655
- const retVal = (output || [])
7656
- .filter((e) => e != null)
7657
- .map((entry) => {
7658
- if (entry === null) {
7659
- return null;
7660
- }
7661
- return __expectString(entry);
7662
- });
7663
- return retVal;
7664
- };
7665
- const de_ServerSideEncryptionConfiguration = (output, context) => {
7666
- return {
7667
- KmsKeyArn: __expectString(output.KmsKeyArn),
7668
- };
7669
- };
7670
6982
  const de_SipMediaApplication = (output, context) => {
7671
- return {
7672
- AwsRegion: __expectString(output.AwsRegion),
7673
- CreatedTimestamp: output.CreatedTimestamp != null
7674
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp))
7675
- : undefined,
7676
- Endpoints: output.Endpoints != null ? de_SipMediaApplicationEndpointList(output.Endpoints, context) : undefined,
7677
- Name: __expectString(output.Name),
7678
- SipMediaApplicationId: __expectString(output.SipMediaApplicationId),
7679
- UpdatedTimestamp: output.UpdatedTimestamp != null
7680
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp))
7681
- : undefined,
7682
- };
7683
- };
7684
- const de_SipMediaApplicationAlexaSkillConfiguration = (output, context) => {
7685
- return {
7686
- AlexaSkillIds: output.AlexaSkillIds != null ? de_AlexaSkillIdList(output.AlexaSkillIds, context) : undefined,
7687
- AlexaSkillStatus: __expectString(output.AlexaSkillStatus),
7688
- };
7689
- };
7690
- const de_SipMediaApplicationCall = (output, context) => {
7691
- return {
7692
- TransactionId: __expectString(output.TransactionId),
7693
- };
7694
- };
7695
- const de_SipMediaApplicationEndpoint = (output, context) => {
7696
- return {
7697
- LambdaArn: __expectString(output.LambdaArn),
7698
- };
7699
- };
7700
- const de_SipMediaApplicationEndpointList = (output, context) => {
7701
- const retVal = (output || [])
7702
- .filter((e) => e != null)
7703
- .map((entry) => {
7704
- if (entry === null) {
7705
- return null;
7706
- }
7707
- return de_SipMediaApplicationEndpoint(entry, context);
6983
+ return take(output, {
6984
+ AwsRegion: __expectString,
6985
+ CreatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
6986
+ Endpoints: _json,
6987
+ Name: __expectString,
6988
+ SipMediaApplicationArn: __expectString,
6989
+ SipMediaApplicationId: __expectString,
6990
+ UpdatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7708
6991
  });
7709
- return retVal;
7710
6992
  };
7711
6993
  const de_SipMediaApplicationList = (output, context) => {
7712
6994
  const retVal = (output || [])
7713
6995
  .filter((e) => e != null)
7714
6996
  .map((entry) => {
7715
- if (entry === null) {
7716
- return null;
7717
- }
7718
6997
  return de_SipMediaApplication(entry, context);
7719
6998
  });
7720
6999
  return retVal;
7721
7000
  };
7722
- const de_SipMediaApplicationLoggingConfiguration = (output, context) => {
7723
- return {
7724
- EnableSipMediaApplicationMessageLogs: __expectBoolean(output.EnableSipMediaApplicationMessageLogs),
7725
- };
7726
- };
7727
7001
  const de_SipRule = (output, context) => {
7728
- return {
7729
- CreatedTimestamp: output.CreatedTimestamp != null
7730
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp))
7731
- : undefined,
7732
- Disabled: __expectBoolean(output.Disabled),
7733
- Name: __expectString(output.Name),
7734
- SipRuleId: __expectString(output.SipRuleId),
7735
- TargetApplications: output.TargetApplications != null
7736
- ? de_SipRuleTargetApplicationList(output.TargetApplications, context)
7737
- : undefined,
7738
- TriggerType: __expectString(output.TriggerType),
7739
- TriggerValue: __expectString(output.TriggerValue),
7740
- UpdatedTimestamp: output.UpdatedTimestamp != null
7741
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp))
7742
- : undefined,
7743
- };
7002
+ return take(output, {
7003
+ CreatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7004
+ Disabled: __expectBoolean,
7005
+ Name: __expectString,
7006
+ SipRuleId: __expectString,
7007
+ TargetApplications: _json,
7008
+ TriggerType: __expectString,
7009
+ TriggerValue: __expectString,
7010
+ UpdatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7011
+ });
7744
7012
  };
7745
7013
  const de_SipRuleList = (output, context) => {
7746
7014
  const retVal = (output || [])
7747
7015
  .filter((e) => e != null)
7748
7016
  .map((entry) => {
7749
- if (entry === null) {
7750
- return null;
7751
- }
7752
7017
  return de_SipRule(entry, context);
7753
7018
  });
7754
7019
  return retVal;
7755
7020
  };
7756
- const de_SipRuleTargetApplication = (output, context) => {
7757
- return {
7758
- AwsRegion: __expectString(output.AwsRegion),
7759
- Priority: __expectInt32(output.Priority),
7760
- SipMediaApplicationId: __expectString(output.SipMediaApplicationId),
7761
- };
7762
- };
7763
- const de_SipRuleTargetApplicationList = (output, context) => {
7764
- const retVal = (output || [])
7765
- .filter((e) => e != null)
7766
- .map((entry) => {
7767
- if (entry === null) {
7768
- return null;
7769
- }
7770
- return de_SipRuleTargetApplication(entry, context);
7771
- });
7772
- return retVal;
7773
- };
7774
7021
  const de_SpeakerSearchDetails = (output, context) => {
7775
- return {
7776
- Results: output.Results != null ? de_SpeakerSearchResultList(output.Results, context) : undefined,
7777
- VoiceprintGenerationStatus: __expectString(output.VoiceprintGenerationStatus),
7778
- };
7022
+ return take(output, {
7023
+ Results: (_) => de_SpeakerSearchResultList(_, context),
7024
+ VoiceprintGenerationStatus: __expectString,
7025
+ });
7779
7026
  };
7780
7027
  const de_SpeakerSearchResult = (output, context) => {
7781
- return {
7782
- ConfidenceScore: __limitedParseFloat32(output.ConfidenceScore),
7783
- VoiceProfileId: __expectString(output.VoiceProfileId),
7784
- };
7028
+ return take(output, {
7029
+ ConfidenceScore: __limitedParseFloat32,
7030
+ VoiceProfileId: __expectString,
7031
+ });
7785
7032
  };
7786
7033
  const de_SpeakerSearchResultList = (output, context) => {
7787
7034
  const retVal = (output || [])
7788
7035
  .filter((e) => e != null)
7789
7036
  .map((entry) => {
7790
- if (entry === null) {
7791
- return null;
7792
- }
7793
7037
  return de_SpeakerSearchResult(entry, context);
7794
7038
  });
7795
7039
  return retVal;
7796
7040
  };
7797
7041
  const de_SpeakerSearchTask = (output, context) => {
7798
- return {
7799
- CallDetails: output.CallDetails != null ? de_CallDetails(output.CallDetails, context) : undefined,
7800
- CreatedTimestamp: output.CreatedTimestamp != null
7801
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp))
7802
- : undefined,
7803
- SpeakerSearchDetails: output.SpeakerSearchDetails != null ? de_SpeakerSearchDetails(output.SpeakerSearchDetails, context) : undefined,
7804
- SpeakerSearchTaskId: __expectString(output.SpeakerSearchTaskId),
7805
- SpeakerSearchTaskStatus: __expectString(output.SpeakerSearchTaskStatus),
7806
- StartedTimestamp: output.StartedTimestamp != null
7807
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.StartedTimestamp))
7808
- : undefined,
7809
- StatusMessage: __expectString(output.StatusMessage),
7810
- UpdatedTimestamp: output.UpdatedTimestamp != null
7811
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp))
7812
- : undefined,
7813
- };
7814
- };
7815
- const de_StreamingConfiguration = (output, context) => {
7816
- return {
7817
- DataRetentionInHours: __expectInt32(output.DataRetentionInHours),
7818
- Disabled: __expectBoolean(output.Disabled),
7819
- MediaInsightsConfiguration: output.MediaInsightsConfiguration != null
7820
- ? de_MediaInsightsConfiguration(output.MediaInsightsConfiguration, context)
7821
- : undefined,
7822
- StreamingNotificationTargets: output.StreamingNotificationTargets != null
7823
- ? de_StreamingNotificationTargetList(output.StreamingNotificationTargets, context)
7824
- : undefined,
7825
- };
7826
- };
7827
- const de_StreamingNotificationTarget = (output, context) => {
7828
- return {
7829
- NotificationTarget: __expectString(output.NotificationTarget),
7830
- };
7831
- };
7832
- const de_StreamingNotificationTargetList = (output, context) => {
7833
- const retVal = (output || [])
7834
- .filter((e) => e != null)
7835
- .map((entry) => {
7836
- if (entry === null) {
7837
- return null;
7838
- }
7839
- return de_StreamingNotificationTarget(entry, context);
7840
- });
7841
- return retVal;
7842
- };
7843
- const de_StringList = (output, context) => {
7844
- const retVal = (output || [])
7845
- .filter((e) => e != null)
7846
- .map((entry) => {
7847
- if (entry === null) {
7848
- return null;
7849
- }
7850
- return __expectString(entry);
7851
- });
7852
- return retVal;
7853
- };
7854
- const de_Tag = (output, context) => {
7855
- return {
7856
- Key: __expectString(output.Key),
7857
- Value: __expectString(output.Value),
7858
- };
7859
- };
7860
- const de_TagList = (output, context) => {
7861
- const retVal = (output || [])
7862
- .filter((e) => e != null)
7863
- .map((entry) => {
7864
- if (entry === null) {
7865
- return null;
7866
- }
7867
- return de_Tag(entry, context);
7042
+ return take(output, {
7043
+ CallDetails: _json,
7044
+ CreatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7045
+ SpeakerSearchDetails: (_) => de_SpeakerSearchDetails(_, context),
7046
+ SpeakerSearchTaskId: __expectString,
7047
+ SpeakerSearchTaskStatus: __expectString,
7048
+ StartedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7049
+ StatusMessage: __expectString,
7050
+ UpdatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7868
7051
  });
7869
- return retVal;
7870
- };
7871
- const de_Termination = (output, context) => {
7872
- return {
7873
- CallingRegions: output.CallingRegions != null ? de_CallingRegionList(output.CallingRegions, context) : undefined,
7874
- CidrAllowedList: output.CidrAllowedList != null ? de_StringList(output.CidrAllowedList, context) : undefined,
7875
- CpsLimit: __expectInt32(output.CpsLimit),
7876
- DefaultPhoneNumber: __expectString(output.DefaultPhoneNumber),
7877
- Disabled: __expectBoolean(output.Disabled),
7878
- };
7879
7052
  };
7880
7053
  const de_TerminationHealth = (output, context) => {
7881
- return {
7882
- Source: __expectString(output.Source),
7883
- Timestamp: output.Timestamp != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.Timestamp)) : undefined,
7884
- };
7054
+ return take(output, {
7055
+ Source: __expectString,
7056
+ Timestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7057
+ });
7885
7058
  };
7886
7059
  const de_VoiceConnector = (output, context) => {
7887
- return {
7888
- AwsRegion: __expectString(output.AwsRegion),
7889
- CreatedTimestamp: output.CreatedTimestamp != null
7890
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp))
7891
- : undefined,
7892
- Name: __expectString(output.Name),
7893
- OutboundHostName: __expectString(output.OutboundHostName),
7894
- RequireEncryption: __expectBoolean(output.RequireEncryption),
7895
- UpdatedTimestamp: output.UpdatedTimestamp != null
7896
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp))
7897
- : undefined,
7898
- VoiceConnectorArn: __expectString(output.VoiceConnectorArn),
7899
- VoiceConnectorId: __expectString(output.VoiceConnectorId),
7900
- };
7901
- };
7902
- const de_VoiceConnectorAwsRegionList = (output, context) => {
7903
- const retVal = (output || [])
7904
- .filter((e) => e != null)
7905
- .map((entry) => {
7906
- if (entry === null) {
7907
- return null;
7908
- }
7909
- return __expectString(entry);
7060
+ return take(output, {
7061
+ AwsRegion: __expectString,
7062
+ CreatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7063
+ Name: __expectString,
7064
+ OutboundHostName: __expectString,
7065
+ RequireEncryption: __expectBoolean,
7066
+ UpdatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7067
+ VoiceConnectorArn: __expectString,
7068
+ VoiceConnectorId: __expectString,
7910
7069
  });
7911
- return retVal;
7912
7070
  };
7913
7071
  const de_VoiceConnectorGroup = (output, context) => {
7914
- return {
7915
- CreatedTimestamp: output.CreatedTimestamp != null
7916
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp))
7917
- : undefined,
7918
- Name: __expectString(output.Name),
7919
- UpdatedTimestamp: output.UpdatedTimestamp != null
7920
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp))
7921
- : undefined,
7922
- VoiceConnectorGroupArn: __expectString(output.VoiceConnectorGroupArn),
7923
- VoiceConnectorGroupId: __expectString(output.VoiceConnectorGroupId),
7924
- VoiceConnectorItems: output.VoiceConnectorItems != null ? de_VoiceConnectorItemList(output.VoiceConnectorItems, context) : undefined,
7925
- };
7072
+ return take(output, {
7073
+ CreatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7074
+ Name: __expectString,
7075
+ UpdatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7076
+ VoiceConnectorGroupArn: __expectString,
7077
+ VoiceConnectorGroupId: __expectString,
7078
+ VoiceConnectorItems: _json,
7079
+ });
7926
7080
  };
7927
7081
  const de_VoiceConnectorGroupList = (output, context) => {
7928
7082
  const retVal = (output || [])
7929
7083
  .filter((e) => e != null)
7930
7084
  .map((entry) => {
7931
- if (entry === null) {
7932
- return null;
7933
- }
7934
7085
  return de_VoiceConnectorGroup(entry, context);
7935
7086
  });
7936
7087
  return retVal;
7937
7088
  };
7938
- const de_VoiceConnectorItem = (output, context) => {
7939
- return {
7940
- Priority: __expectInt32(output.Priority),
7941
- VoiceConnectorId: __expectString(output.VoiceConnectorId),
7942
- };
7943
- };
7944
- const de_VoiceConnectorItemList = (output, context) => {
7945
- const retVal = (output || [])
7946
- .filter((e) => e != null)
7947
- .map((entry) => {
7948
- if (entry === null) {
7949
- return null;
7950
- }
7951
- return de_VoiceConnectorItem(entry, context);
7952
- });
7953
- return retVal;
7954
- };
7955
7089
  const de_VoiceConnectorList = (output, context) => {
7956
7090
  const retVal = (output || [])
7957
7091
  .filter((e) => e != null)
7958
7092
  .map((entry) => {
7959
- if (entry === null) {
7960
- return null;
7961
- }
7962
7093
  return de_VoiceConnector(entry, context);
7963
7094
  });
7964
7095
  return retVal;
7965
7096
  };
7966
- const de_VoiceConnectorSettings = (output, context) => {
7967
- return {
7968
- CdrBucket: __expectString(output.CdrBucket),
7969
- };
7970
- };
7971
7097
  const de_VoiceProfile = (output, context) => {
7972
- return {
7973
- CreatedTimestamp: output.CreatedTimestamp != null
7974
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp))
7975
- : undefined,
7976
- ExpirationTimestamp: output.ExpirationTimestamp != null
7977
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.ExpirationTimestamp))
7978
- : undefined,
7979
- UpdatedTimestamp: output.UpdatedTimestamp != null
7980
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp))
7981
- : undefined,
7982
- VoiceProfileArn: __expectString(output.VoiceProfileArn),
7983
- VoiceProfileDomainId: __expectString(output.VoiceProfileDomainId),
7984
- VoiceProfileId: __expectString(output.VoiceProfileId),
7985
- };
7098
+ return take(output, {
7099
+ CreatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7100
+ ExpirationTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7101
+ UpdatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7102
+ VoiceProfileArn: __expectString,
7103
+ VoiceProfileDomainId: __expectString,
7104
+ VoiceProfileId: __expectString,
7105
+ });
7986
7106
  };
7987
7107
  const de_VoiceProfileDomain = (output, context) => {
7988
- return {
7989
- CreatedTimestamp: output.CreatedTimestamp != null
7990
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp))
7991
- : undefined,
7992
- Description: __expectString(output.Description),
7993
- Name: __expectString(output.Name),
7994
- ServerSideEncryptionConfiguration: output.ServerSideEncryptionConfiguration != null
7995
- ? de_ServerSideEncryptionConfiguration(output.ServerSideEncryptionConfiguration, context)
7996
- : undefined,
7997
- UpdatedTimestamp: output.UpdatedTimestamp != null
7998
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp))
7999
- : undefined,
8000
- VoiceProfileDomainArn: __expectString(output.VoiceProfileDomainArn),
8001
- VoiceProfileDomainId: __expectString(output.VoiceProfileDomainId),
8002
- };
7108
+ return take(output, {
7109
+ CreatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7110
+ Description: __expectString,
7111
+ Name: __expectString,
7112
+ ServerSideEncryptionConfiguration: _json,
7113
+ UpdatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7114
+ VoiceProfileDomainArn: __expectString,
7115
+ VoiceProfileDomainId: __expectString,
7116
+ });
8003
7117
  };
8004
7118
  const de_VoiceProfileDomainSummary = (output, context) => {
8005
- return {
8006
- CreatedTimestamp: output.CreatedTimestamp != null
8007
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp))
8008
- : undefined,
8009
- Description: __expectString(output.Description),
8010
- Name: __expectString(output.Name),
8011
- UpdatedTimestamp: output.UpdatedTimestamp != null
8012
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp))
8013
- : undefined,
8014
- VoiceProfileDomainArn: __expectString(output.VoiceProfileDomainArn),
8015
- VoiceProfileDomainId: __expectString(output.VoiceProfileDomainId),
8016
- };
7119
+ return take(output, {
7120
+ CreatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7121
+ Description: __expectString,
7122
+ Name: __expectString,
7123
+ UpdatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7124
+ VoiceProfileDomainArn: __expectString,
7125
+ VoiceProfileDomainId: __expectString,
7126
+ });
8017
7127
  };
8018
7128
  const de_VoiceProfileDomainSummaryList = (output, context) => {
8019
7129
  const retVal = (output || [])
8020
7130
  .filter((e) => e != null)
8021
7131
  .map((entry) => {
8022
- if (entry === null) {
8023
- return null;
8024
- }
8025
7132
  return de_VoiceProfileDomainSummary(entry, context);
8026
7133
  });
8027
7134
  return retVal;
8028
7135
  };
8029
7136
  const de_VoiceProfileSummary = (output, context) => {
8030
- return {
8031
- CreatedTimestamp: output.CreatedTimestamp != null
8032
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp))
8033
- : undefined,
8034
- ExpirationTimestamp: output.ExpirationTimestamp != null
8035
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.ExpirationTimestamp))
8036
- : undefined,
8037
- UpdatedTimestamp: output.UpdatedTimestamp != null
8038
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp))
8039
- : undefined,
8040
- VoiceProfileArn: __expectString(output.VoiceProfileArn),
8041
- VoiceProfileDomainId: __expectString(output.VoiceProfileDomainId),
8042
- VoiceProfileId: __expectString(output.VoiceProfileId),
8043
- };
7137
+ return take(output, {
7138
+ CreatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7139
+ ExpirationTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7140
+ UpdatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7141
+ VoiceProfileArn: __expectString,
7142
+ VoiceProfileDomainId: __expectString,
7143
+ VoiceProfileId: __expectString,
7144
+ });
8044
7145
  };
8045
7146
  const de_VoiceProfileSummaryList = (output, context) => {
8046
7147
  const retVal = (output || [])
8047
7148
  .filter((e) => e != null)
8048
7149
  .map((entry) => {
8049
- if (entry === null) {
8050
- return null;
8051
- }
8052
7150
  return de_VoiceProfileSummary(entry, context);
8053
7151
  });
8054
7152
  return retVal;
8055
7153
  };
8056
7154
  const de_VoiceToneAnalysisTask = (output, context) => {
8057
- return {
8058
- CallDetails: output.CallDetails != null ? de_CallDetails(output.CallDetails, context) : undefined,
8059
- CreatedTimestamp: output.CreatedTimestamp != null
8060
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp))
8061
- : undefined,
8062
- StartedTimestamp: output.StartedTimestamp != null
8063
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.StartedTimestamp))
8064
- : undefined,
8065
- StatusMessage: __expectString(output.StatusMessage),
8066
- UpdatedTimestamp: output.UpdatedTimestamp != null
8067
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp))
8068
- : undefined,
8069
- VoiceToneAnalysisTaskId: __expectString(output.VoiceToneAnalysisTaskId),
8070
- VoiceToneAnalysisTaskStatus: __expectString(output.VoiceToneAnalysisTaskStatus),
8071
- };
7155
+ return take(output, {
7156
+ CallDetails: _json,
7157
+ CreatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7158
+ StartedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7159
+ StatusMessage: __expectString,
7160
+ UpdatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
7161
+ VoiceToneAnalysisTaskId: __expectString,
7162
+ VoiceToneAnalysisTaskStatus: __expectString,
7163
+ });
8072
7164
  };
8073
7165
  const deserializeMetadata = (output) => ({
8074
7166
  httpStatusCode: output.statusCode,