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