@aws-sdk/client-lex-models-v2 3.118.1 → 3.127.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.
@@ -66,11 +66,7 @@ export var serializeAws_restJson1CreateBotCommand = function (input, context) {
66
66
  "content-type": "application/json",
67
67
  };
68
68
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/bots";
69
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.botName !== undefined && input.botName !== null && { botName: input.botName })), (input.botTags !== undefined &&
70
- input.botTags !== null && { botTags: serializeAws_restJson1TagMap(input.botTags, context) })), (input.dataPrivacy !== undefined &&
71
- input.dataPrivacy !== null && { dataPrivacy: serializeAws_restJson1DataPrivacy(input.dataPrivacy, context) })), (input.description !== undefined && input.description !== null && { description: input.description })), (input.idleSessionTTLInSeconds !== undefined &&
72
- input.idleSessionTTLInSeconds !== null && { idleSessionTTLInSeconds: input.idleSessionTTLInSeconds })), (input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn })), (input.testBotAliasTags !== undefined &&
73
- input.testBotAliasTags !== null && {
69
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.botName != null && { botName: input.botName })), (input.botTags != null && { botTags: serializeAws_restJson1TagMap(input.botTags, context) })), (input.dataPrivacy != null && { dataPrivacy: serializeAws_restJson1DataPrivacy(input.dataPrivacy, context) })), (input.description != null && { description: input.description })), (input.idleSessionTTLInSeconds != null && { idleSessionTTLInSeconds: input.idleSessionTTLInSeconds })), (input.roleArn != null && { roleArn: input.roleArn })), (input.testBotAliasTags != null && {
74
70
  testBotAliasTags: serializeAws_restJson1TagMap(input.testBotAliasTags, context),
75
71
  })));
76
72
  return [2, new __HttpRequest({
@@ -106,16 +102,13 @@ export var serializeAws_restJson1CreateBotAliasCommand = function (input, contex
106
102
  else {
107
103
  throw new Error("No value provided for input HTTP label: botId.");
108
104
  }
109
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.botAliasLocaleSettings !== undefined &&
110
- input.botAliasLocaleSettings !== null && {
105
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.botAliasLocaleSettings != null && {
111
106
  botAliasLocaleSettings: serializeAws_restJson1BotAliasLocaleSettingsMap(input.botAliasLocaleSettings, context),
112
- })), (input.botAliasName !== undefined && input.botAliasName !== null && { botAliasName: input.botAliasName })), (input.botVersion !== undefined && input.botVersion !== null && { botVersion: input.botVersion })), (input.conversationLogSettings !== undefined &&
113
- input.conversationLogSettings !== null && {
107
+ })), (input.botAliasName != null && { botAliasName: input.botAliasName })), (input.botVersion != null && { botVersion: input.botVersion })), (input.conversationLogSettings != null && {
114
108
  conversationLogSettings: serializeAws_restJson1ConversationLogSettings(input.conversationLogSettings, context),
115
- })), (input.description !== undefined && input.description !== null && { description: input.description })), (input.sentimentAnalysisSettings !== undefined &&
116
- input.sentimentAnalysisSettings !== null && {
109
+ })), (input.description != null && { description: input.description })), (input.sentimentAnalysisSettings != null && {
117
110
  sentimentAnalysisSettings: serializeAws_restJson1SentimentAnalysisSettings(input.sentimentAnalysisSettings, context),
118
- })), (input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
111
+ })), (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
119
112
  return [2, new __HttpRequest({
120
113
  protocol: protocol,
121
114
  hostname: hostname,
@@ -160,11 +153,9 @@ export var serializeAws_restJson1CreateBotLocaleCommand = function (input, conte
160
153
  else {
161
154
  throw new Error("No value provided for input HTTP label: botVersion.");
162
155
  }
163
- body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.description !== undefined && input.description !== null && { description: input.description })), (input.localeId !== undefined && input.localeId !== null && { localeId: input.localeId })), (input.nluIntentConfidenceThreshold !== undefined &&
164
- input.nluIntentConfidenceThreshold !== null && {
156
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.description != null && { description: input.description })), (input.localeId != null && { localeId: input.localeId })), (input.nluIntentConfidenceThreshold != null && {
165
157
  nluIntentConfidenceThreshold: __serializeFloat(input.nluIntentConfidenceThreshold),
166
- })), (input.voiceSettings !== undefined &&
167
- input.voiceSettings !== null && {
158
+ })), (input.voiceSettings != null && {
168
159
  voiceSettings: serializeAws_restJson1VoiceSettings(input.voiceSettings, context),
169
160
  })));
170
161
  return [2, new __HttpRequest({
@@ -200,10 +191,9 @@ export var serializeAws_restJson1CreateBotVersionCommand = function (input, cont
200
191
  else {
201
192
  throw new Error("No value provided for input HTTP label: botId.");
202
193
  }
203
- body = JSON.stringify(__assign(__assign({}, (input.botVersionLocaleSpecification !== undefined &&
204
- input.botVersionLocaleSpecification !== null && {
194
+ body = JSON.stringify(__assign(__assign({}, (input.botVersionLocaleSpecification != null && {
205
195
  botVersionLocaleSpecification: serializeAws_restJson1BotVersionLocaleSpecification(input.botVersionLocaleSpecification, context),
206
- })), (input.description !== undefined && input.description !== null && { description: input.description })));
196
+ })), (input.description != null && { description: input.description })));
207
197
  return [2, new __HttpRequest({
208
198
  protocol: protocol,
209
199
  hostname: hostname,
@@ -227,8 +217,7 @@ export var serializeAws_restJson1CreateExportCommand = function (input, context)
227
217
  "content-type": "application/json",
228
218
  };
229
219
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/exports";
230
- body = JSON.stringify(__assign(__assign(__assign({}, (input.fileFormat !== undefined && input.fileFormat !== null && { fileFormat: input.fileFormat })), (input.filePassword !== undefined && input.filePassword !== null && { filePassword: input.filePassword })), (input.resourceSpecification !== undefined &&
231
- input.resourceSpecification !== null && {
220
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.fileFormat != null && { fileFormat: input.fileFormat })), (input.filePassword != null && { filePassword: input.filePassword })), (input.resourceSpecification != null && {
232
221
  resourceSpecification: serializeAws_restJson1ExportResourceSpecification(input.resourceSpecification, context),
233
222
  })));
234
223
  return [2, new __HttpRequest({
@@ -285,30 +274,21 @@ export var serializeAws_restJson1CreateIntentCommand = function (input, context)
285
274
  else {
286
275
  throw new Error("No value provided for input HTTP label: localeId.");
287
276
  }
288
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description !== undefined && input.description !== null && { description: input.description })), (input.dialogCodeHook !== undefined &&
289
- input.dialogCodeHook !== null && {
277
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description != null && { description: input.description })), (input.dialogCodeHook != null && {
290
278
  dialogCodeHook: serializeAws_restJson1DialogCodeHookSettings(input.dialogCodeHook, context),
291
- })), (input.fulfillmentCodeHook !== undefined &&
292
- input.fulfillmentCodeHook !== null && {
279
+ })), (input.fulfillmentCodeHook != null && {
293
280
  fulfillmentCodeHook: serializeAws_restJson1FulfillmentCodeHookSettings(input.fulfillmentCodeHook, context),
294
- })), (input.inputContexts !== undefined &&
295
- input.inputContexts !== null && {
281
+ })), (input.inputContexts != null && {
296
282
  inputContexts: serializeAws_restJson1InputContextsList(input.inputContexts, context),
297
- })), (input.intentClosingSetting !== undefined &&
298
- input.intentClosingSetting !== null && {
283
+ })), (input.intentClosingSetting != null && {
299
284
  intentClosingSetting: serializeAws_restJson1IntentClosingSetting(input.intentClosingSetting, context),
300
- })), (input.intentConfirmationSetting !== undefined &&
301
- input.intentConfirmationSetting !== null && {
285
+ })), (input.intentConfirmationSetting != null && {
302
286
  intentConfirmationSetting: serializeAws_restJson1IntentConfirmationSetting(input.intentConfirmationSetting, context),
303
- })), (input.intentName !== undefined && input.intentName !== null && { intentName: input.intentName })), (input.kendraConfiguration !== undefined &&
304
- input.kendraConfiguration !== null && {
287
+ })), (input.intentName != null && { intentName: input.intentName })), (input.kendraConfiguration != null && {
305
288
  kendraConfiguration: serializeAws_restJson1KendraConfiguration(input.kendraConfiguration, context),
306
- })), (input.outputContexts !== undefined &&
307
- input.outputContexts !== null && {
289
+ })), (input.outputContexts != null && {
308
290
  outputContexts: serializeAws_restJson1OutputContextsList(input.outputContexts, context),
309
- })), (input.parentIntentSignature !== undefined &&
310
- input.parentIntentSignature !== null && { parentIntentSignature: input.parentIntentSignature })), (input.sampleUtterances !== undefined &&
311
- input.sampleUtterances !== null && {
291
+ })), (input.parentIntentSignature != null && { parentIntentSignature: input.parentIntentSignature })), (input.sampleUtterances != null && {
312
292
  sampleUtterances: serializeAws_restJson1SampleUtterancesList(input.sampleUtterances, context),
313
293
  })));
314
294
  return [2, new __HttpRequest({
@@ -344,7 +324,7 @@ export var serializeAws_restJson1CreateResourcePolicyCommand = function (input,
344
324
  else {
345
325
  throw new Error("No value provided for input HTTP label: resourceArn.");
346
326
  }
347
- body = JSON.stringify(__assign({}, (input.policy !== undefined && input.policy !== null && { policy: input.policy })));
327
+ body = JSON.stringify(__assign({}, (input.policy != null && { policy: input.policy })));
348
328
  return [2, new __HttpRequest({
349
329
  protocol: protocol,
350
330
  hostname: hostname,
@@ -379,10 +359,7 @@ export var serializeAws_restJson1CreateResourcePolicyStatementCommand = function
379
359
  throw new Error("No value provided for input HTTP label: resourceArn.");
380
360
  }
381
361
  query = __assign({}, (input.expectedRevisionId !== undefined && { expectedRevisionId: input.expectedRevisionId }));
382
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.action !== undefined &&
383
- input.action !== null && { action: serializeAws_restJson1OperationList(input.action, context) })), (input.condition !== undefined &&
384
- input.condition !== null && { condition: serializeAws_restJson1ConditionMap(input.condition, context) })), (input.effect !== undefined && input.effect !== null && { effect: input.effect })), (input.principal !== undefined &&
385
- input.principal !== null && { principal: serializeAws_restJson1PrincipalList(input.principal, context) })), (input.statementId !== undefined && input.statementId !== null && { statementId: input.statementId })));
362
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.action != null && { action: serializeAws_restJson1OperationList(input.action, context) })), (input.condition != null && { condition: serializeAws_restJson1ConditionMap(input.condition, context) })), (input.effect != null && { effect: input.effect })), (input.principal != null && { principal: serializeAws_restJson1PrincipalList(input.principal, context) })), (input.statementId != null && { statementId: input.statementId })));
386
363
  return [2, new __HttpRequest({
387
364
  protocol: protocol,
388
365
  hostname: hostname,
@@ -448,14 +425,11 @@ export var serializeAws_restJson1CreateSlotCommand = function (input, context) {
448
425
  else {
449
426
  throw new Error("No value provided for input HTTP label: intentId.");
450
427
  }
451
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description !== undefined && input.description !== null && { description: input.description })), (input.multipleValuesSetting !== undefined &&
452
- input.multipleValuesSetting !== null && {
428
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description != null && { description: input.description })), (input.multipleValuesSetting != null && {
453
429
  multipleValuesSetting: serializeAws_restJson1MultipleValuesSetting(input.multipleValuesSetting, context),
454
- })), (input.obfuscationSetting !== undefined &&
455
- input.obfuscationSetting !== null && {
430
+ })), (input.obfuscationSetting != null && {
456
431
  obfuscationSetting: serializeAws_restJson1ObfuscationSetting(input.obfuscationSetting, context),
457
- })), (input.slotName !== undefined && input.slotName !== null && { slotName: input.slotName })), (input.slotTypeId !== undefined && input.slotTypeId !== null && { slotTypeId: input.slotTypeId })), (input.valueElicitationSetting !== undefined &&
458
- input.valueElicitationSetting !== null && {
432
+ })), (input.slotName != null && { slotName: input.slotName })), (input.slotTypeId != null && { slotTypeId: input.slotTypeId })), (input.valueElicitationSetting != null && {
459
433
  valueElicitationSetting: serializeAws_restJson1SlotValueElicitationSetting(input.valueElicitationSetting, context),
460
434
  })));
461
435
  return [2, new __HttpRequest({
@@ -512,15 +486,11 @@ export var serializeAws_restJson1CreateSlotTypeCommand = function (input, contex
512
486
  else {
513
487
  throw new Error("No value provided for input HTTP label: localeId.");
514
488
  }
515
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description !== undefined && input.description !== null && { description: input.description })), (input.externalSourceSetting !== undefined &&
516
- input.externalSourceSetting !== null && {
489
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description != null && { description: input.description })), (input.externalSourceSetting != null && {
517
490
  externalSourceSetting: serializeAws_restJson1ExternalSourceSetting(input.externalSourceSetting, context),
518
- })), (input.parentSlotTypeSignature !== undefined &&
519
- input.parentSlotTypeSignature !== null && { parentSlotTypeSignature: input.parentSlotTypeSignature })), (input.slotTypeName !== undefined && input.slotTypeName !== null && { slotTypeName: input.slotTypeName })), (input.slotTypeValues !== undefined &&
520
- input.slotTypeValues !== null && {
491
+ })), (input.parentSlotTypeSignature != null && { parentSlotTypeSignature: input.parentSlotTypeSignature })), (input.slotTypeName != null && { slotTypeName: input.slotTypeName })), (input.slotTypeValues != null && {
521
492
  slotTypeValues: serializeAws_restJson1SlotTypeValues(input.slotTypeValues, context),
522
- })), (input.valueSelectionSetting !== undefined &&
523
- input.valueSelectionSetting !== null && {
493
+ })), (input.valueSelectionSetting != null && {
524
494
  valueSelectionSetting: serializeAws_restJson1SlotValueSelectionSetting(input.valueSelectionSetting, context),
525
495
  })));
526
496
  return [2, new __HttpRequest({
@@ -1749,12 +1719,11 @@ export var serializeAws_restJson1ListAggregatedUtterancesCommand = function (inp
1749
1719
  else {
1750
1720
  throw new Error("No value provided for input HTTP label: botId.");
1751
1721
  }
1752
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.aggregationDuration !== undefined &&
1753
- input.aggregationDuration !== null && {
1722
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.aggregationDuration != null && {
1754
1723
  aggregationDuration: serializeAws_restJson1UtteranceAggregationDuration(input.aggregationDuration, context),
1755
- })), (input.botAliasId !== undefined && input.botAliasId !== null && { botAliasId: input.botAliasId })), (input.botVersion !== undefined && input.botVersion !== null && { botVersion: input.botVersion })), (input.filters !== undefined &&
1756
- input.filters !== null && { filters: serializeAws_restJson1AggregatedUtterancesFilters(input.filters, context) })), (input.localeId !== undefined && input.localeId !== null && { localeId: input.localeId })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })), (input.sortBy !== undefined &&
1757
- input.sortBy !== null && { sortBy: serializeAws_restJson1AggregatedUtterancesSortBy(input.sortBy, context) })));
1724
+ })), (input.botAliasId != null && { botAliasId: input.botAliasId })), (input.botVersion != null && { botVersion: input.botVersion })), (input.filters != null && {
1725
+ filters: serializeAws_restJson1AggregatedUtterancesFilters(input.filters, context),
1726
+ })), (input.localeId != null && { localeId: input.localeId })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.sortBy != null && { sortBy: serializeAws_restJson1AggregatedUtterancesSortBy(input.sortBy, context) })));
1758
1727
  return [2, new __HttpRequest({
1759
1728
  protocol: protocol,
1760
1729
  hostname: hostname,
@@ -1788,7 +1757,7 @@ export var serializeAws_restJson1ListBotAliasesCommand = function (input, contex
1788
1757
  else {
1789
1758
  throw new Error("No value provided for input HTTP label: botId.");
1790
1759
  }
1791
- body = JSON.stringify(__assign(__assign({}, (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })));
1760
+ body = JSON.stringify(__assign(__assign({}, (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })));
1792
1761
  return [2, new __HttpRequest({
1793
1762
  protocol: protocol,
1794
1763
  hostname: hostname,
@@ -1833,9 +1802,7 @@ export var serializeAws_restJson1ListBotLocalesCommand = function (input, contex
1833
1802
  else {
1834
1803
  throw new Error("No value provided for input HTTP label: botVersion.");
1835
1804
  }
1836
- body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.filters !== undefined &&
1837
- input.filters !== null && { filters: serializeAws_restJson1BotLocaleFilters(input.filters, context) })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })), (input.sortBy !== undefined &&
1838
- input.sortBy !== null && { sortBy: serializeAws_restJson1BotLocaleSortBy(input.sortBy, context) })));
1805
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.filters != null && { filters: serializeAws_restJson1BotLocaleFilters(input.filters, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.sortBy != null && { sortBy: serializeAws_restJson1BotLocaleSortBy(input.sortBy, context) })));
1839
1806
  return [2, new __HttpRequest({
1840
1807
  protocol: protocol,
1841
1808
  hostname: hostname,
@@ -1890,7 +1857,7 @@ export var serializeAws_restJson1ListBotRecommendationsCommand = function (input
1890
1857
  else {
1891
1858
  throw new Error("No value provided for input HTTP label: localeId.");
1892
1859
  }
1893
- body = JSON.stringify(__assign(__assign({}, (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })));
1860
+ body = JSON.stringify(__assign(__assign({}, (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })));
1894
1861
  return [2, new __HttpRequest({
1895
1862
  protocol: protocol,
1896
1863
  hostname: hostname,
@@ -1914,9 +1881,7 @@ export var serializeAws_restJson1ListBotsCommand = function (input, context) { r
1914
1881
  "content-type": "application/json",
1915
1882
  };
1916
1883
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/bots";
1917
- body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.filters !== undefined &&
1918
- input.filters !== null && { filters: serializeAws_restJson1BotFilters(input.filters, context) })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })), (input.sortBy !== undefined &&
1919
- input.sortBy !== null && { sortBy: serializeAws_restJson1BotSortBy(input.sortBy, context) })));
1884
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.filters != null && { filters: serializeAws_restJson1BotFilters(input.filters, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.sortBy != null && { sortBy: serializeAws_restJson1BotSortBy(input.sortBy, context) })));
1920
1885
  return [2, new __HttpRequest({
1921
1886
  protocol: protocol,
1922
1887
  hostname: hostname,
@@ -1950,8 +1915,7 @@ export var serializeAws_restJson1ListBotVersionsCommand = function (input, conte
1950
1915
  else {
1951
1916
  throw new Error("No value provided for input HTTP label: botId.");
1952
1917
  }
1953
- body = JSON.stringify(__assign(__assign(__assign({}, (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })), (input.sortBy !== undefined &&
1954
- input.sortBy !== null && { sortBy: serializeAws_restJson1BotVersionSortBy(input.sortBy, context) })));
1918
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.sortBy != null && { sortBy: serializeAws_restJson1BotVersionSortBy(input.sortBy, context) })));
1955
1919
  return [2, new __HttpRequest({
1956
1920
  protocol: protocol,
1957
1921
  hostname: hostname,
@@ -1985,8 +1949,7 @@ export var serializeAws_restJson1ListBuiltInIntentsCommand = function (input, co
1985
1949
  else {
1986
1950
  throw new Error("No value provided for input HTTP label: localeId.");
1987
1951
  }
1988
- body = JSON.stringify(__assign(__assign(__assign({}, (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })), (input.sortBy !== undefined &&
1989
- input.sortBy !== null && { sortBy: serializeAws_restJson1BuiltInIntentSortBy(input.sortBy, context) })));
1952
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.sortBy != null && { sortBy: serializeAws_restJson1BuiltInIntentSortBy(input.sortBy, context) })));
1990
1953
  return [2, new __HttpRequest({
1991
1954
  protocol: protocol,
1992
1955
  hostname: hostname,
@@ -2020,8 +1983,7 @@ export var serializeAws_restJson1ListBuiltInSlotTypesCommand = function (input,
2020
1983
  else {
2021
1984
  throw new Error("No value provided for input HTTP label: localeId.");
2022
1985
  }
2023
- body = JSON.stringify(__assign(__assign(__assign({}, (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })), (input.sortBy !== undefined &&
2024
- input.sortBy !== null && { sortBy: serializeAws_restJson1BuiltInSlotTypeSortBy(input.sortBy, context) })));
1986
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.sortBy != null && { sortBy: serializeAws_restJson1BuiltInSlotTypeSortBy(input.sortBy, context) })));
2025
1987
  return [2, new __HttpRequest({
2026
1988
  protocol: protocol,
2027
1989
  hostname: hostname,
@@ -2045,9 +2007,7 @@ export var serializeAws_restJson1ListExportsCommand = function (input, context)
2045
2007
  "content-type": "application/json",
2046
2008
  };
2047
2009
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/exports";
2048
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.botId !== undefined && input.botId !== null && { botId: input.botId })), (input.botVersion !== undefined && input.botVersion !== null && { botVersion: input.botVersion })), (input.filters !== undefined &&
2049
- input.filters !== null && { filters: serializeAws_restJson1ExportFilters(input.filters, context) })), (input.localeId !== undefined && input.localeId !== null && { localeId: input.localeId })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })), (input.sortBy !== undefined &&
2050
- input.sortBy !== null && { sortBy: serializeAws_restJson1ExportSortBy(input.sortBy, context) })));
2010
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.botId != null && { botId: input.botId })), (input.botVersion != null && { botVersion: input.botVersion })), (input.filters != null && { filters: serializeAws_restJson1ExportFilters(input.filters, context) })), (input.localeId != null && { localeId: input.localeId })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.sortBy != null && { sortBy: serializeAws_restJson1ExportSortBy(input.sortBy, context) })));
2051
2011
  return [2, new __HttpRequest({
2052
2012
  protocol: protocol,
2053
2013
  hostname: hostname,
@@ -2071,9 +2031,7 @@ export var serializeAws_restJson1ListImportsCommand = function (input, context)
2071
2031
  "content-type": "application/json",
2072
2032
  };
2073
2033
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/imports";
2074
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.botId !== undefined && input.botId !== null && { botId: input.botId })), (input.botVersion !== undefined && input.botVersion !== null && { botVersion: input.botVersion })), (input.filters !== undefined &&
2075
- input.filters !== null && { filters: serializeAws_restJson1ImportFilters(input.filters, context) })), (input.localeId !== undefined && input.localeId !== null && { localeId: input.localeId })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })), (input.sortBy !== undefined &&
2076
- input.sortBy !== null && { sortBy: serializeAws_restJson1ImportSortBy(input.sortBy, context) })));
2034
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.botId != null && { botId: input.botId })), (input.botVersion != null && { botVersion: input.botVersion })), (input.filters != null && { filters: serializeAws_restJson1ImportFilters(input.filters, context) })), (input.localeId != null && { localeId: input.localeId })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.sortBy != null && { sortBy: serializeAws_restJson1ImportSortBy(input.sortBy, context) })));
2077
2035
  return [2, new __HttpRequest({
2078
2036
  protocol: protocol,
2079
2037
  hostname: hostname,
@@ -2128,9 +2086,7 @@ export var serializeAws_restJson1ListIntentsCommand = function (input, context)
2128
2086
  else {
2129
2087
  throw new Error("No value provided for input HTTP label: localeId.");
2130
2088
  }
2131
- body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.filters !== undefined &&
2132
- input.filters !== null && { filters: serializeAws_restJson1IntentFilters(input.filters, context) })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })), (input.sortBy !== undefined &&
2133
- input.sortBy !== null && { sortBy: serializeAws_restJson1IntentSortBy(input.sortBy, context) })));
2089
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.filters != null && { filters: serializeAws_restJson1IntentFilters(input.filters, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.sortBy != null && { sortBy: serializeAws_restJson1IntentSortBy(input.sortBy, context) })));
2134
2090
  return [2, new __HttpRequest({
2135
2091
  protocol: protocol,
2136
2092
  hostname: hostname,
@@ -2195,7 +2151,7 @@ export var serializeAws_restJson1ListRecommendedIntentsCommand = function (input
2195
2151
  else {
2196
2152
  throw new Error("No value provided for input HTTP label: botRecommendationId.");
2197
2153
  }
2198
- body = JSON.stringify(__assign(__assign({}, (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })));
2154
+ body = JSON.stringify(__assign(__assign({}, (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })));
2199
2155
  return [2, new __HttpRequest({
2200
2156
  protocol: protocol,
2201
2157
  hostname: hostname,
@@ -2260,9 +2216,7 @@ export var serializeAws_restJson1ListSlotsCommand = function (input, context) {
2260
2216
  else {
2261
2217
  throw new Error("No value provided for input HTTP label: intentId.");
2262
2218
  }
2263
- body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.filters !== undefined &&
2264
- input.filters !== null && { filters: serializeAws_restJson1SlotFilters(input.filters, context) })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })), (input.sortBy !== undefined &&
2265
- input.sortBy !== null && { sortBy: serializeAws_restJson1SlotSortBy(input.sortBy, context) })));
2219
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.filters != null && { filters: serializeAws_restJson1SlotFilters(input.filters, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.sortBy != null && { sortBy: serializeAws_restJson1SlotSortBy(input.sortBy, context) })));
2266
2220
  return [2, new __HttpRequest({
2267
2221
  protocol: protocol,
2268
2222
  hostname: hostname,
@@ -2317,9 +2271,7 @@ export var serializeAws_restJson1ListSlotTypesCommand = function (input, context
2317
2271
  else {
2318
2272
  throw new Error("No value provided for input HTTP label: localeId.");
2319
2273
  }
2320
- body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.filters !== undefined &&
2321
- input.filters !== null && { filters: serializeAws_restJson1SlotTypeFilters(input.filters, context) })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })), (input.sortBy !== undefined &&
2322
- input.sortBy !== null && { sortBy: serializeAws_restJson1SlotTypeSortBy(input.sortBy, context) })));
2274
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.filters != null && { filters: serializeAws_restJson1SlotTypeFilters(input.filters, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.sortBy != null && { sortBy: serializeAws_restJson1SlotTypeSortBy(input.sortBy, context) })));
2323
2275
  return [2, new __HttpRequest({
2324
2276
  protocol: protocol,
2325
2277
  hostname: hostname,
@@ -2415,8 +2367,9 @@ export var serializeAws_restJson1SearchAssociatedTranscriptsCommand = function (
2415
2367
  else {
2416
2368
  throw new Error("No value provided for input HTTP label: botRecommendationId.");
2417
2369
  }
2418
- body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.filters !== undefined &&
2419
- input.filters !== null && { filters: serializeAws_restJson1AssociatedTranscriptFilters(input.filters, context) })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextIndex !== undefined && input.nextIndex !== null && { nextIndex: input.nextIndex })), (input.searchOrder !== undefined && input.searchOrder !== null && { searchOrder: input.searchOrder })));
2370
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.filters != null && {
2371
+ filters: serializeAws_restJson1AssociatedTranscriptFilters(input.filters, context),
2372
+ })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextIndex != null && { nextIndex: input.nextIndex })), (input.searchOrder != null && { searchOrder: input.searchOrder })));
2420
2373
  return [2, new __HttpRequest({
2421
2374
  protocol: protocol,
2422
2375
  hostname: hostname,
@@ -2471,11 +2424,9 @@ export var serializeAws_restJson1StartBotRecommendationCommand = function (input
2471
2424
  else {
2472
2425
  throw new Error("No value provided for input HTTP label: localeId.");
2473
2426
  }
2474
- body = JSON.stringify(__assign(__assign({}, (input.encryptionSetting !== undefined &&
2475
- input.encryptionSetting !== null && {
2427
+ body = JSON.stringify(__assign(__assign({}, (input.encryptionSetting != null && {
2476
2428
  encryptionSetting: serializeAws_restJson1EncryptionSetting(input.encryptionSetting, context),
2477
- })), (input.transcriptSourceSetting !== undefined &&
2478
- input.transcriptSourceSetting !== null && {
2429
+ })), (input.transcriptSourceSetting != null && {
2479
2430
  transcriptSourceSetting: serializeAws_restJson1TranscriptSourceSetting(input.transcriptSourceSetting, context),
2480
2431
  })));
2481
2432
  return [2, new __HttpRequest({
@@ -2501,8 +2452,7 @@ export var serializeAws_restJson1StartImportCommand = function (input, context)
2501
2452
  "content-type": "application/json",
2502
2453
  };
2503
2454
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/imports";
2504
- body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.filePassword !== undefined && input.filePassword !== null && { filePassword: input.filePassword })), (input.importId !== undefined && input.importId !== null && { importId: input.importId })), (input.mergeStrategy !== undefined && input.mergeStrategy !== null && { mergeStrategy: input.mergeStrategy })), (input.resourceSpecification !== undefined &&
2505
- input.resourceSpecification !== null && {
2455
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.filePassword != null && { filePassword: input.filePassword })), (input.importId != null && { importId: input.importId })), (input.mergeStrategy != null && { mergeStrategy: input.mergeStrategy })), (input.resourceSpecification != null && {
2506
2456
  resourceSpecification: serializeAws_restJson1ImportResourceSpecification(input.resourceSpecification, context),
2507
2457
  })));
2508
2458
  return [2, new __HttpRequest({
@@ -2538,7 +2488,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
2538
2488
  else {
2539
2489
  throw new Error("No value provided for input HTTP label: resourceARN.");
2540
2490
  }
2541
- body = JSON.stringify(__assign({}, (input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
2491
+ body = JSON.stringify(__assign({}, (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
2542
2492
  return [2, new __HttpRequest({
2543
2493
  protocol: protocol,
2544
2494
  hostname: hostname,
@@ -2605,9 +2555,7 @@ export var serializeAws_restJson1UpdateBotCommand = function (input, context) {
2605
2555
  else {
2606
2556
  throw new Error("No value provided for input HTTP label: botId.");
2607
2557
  }
2608
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.botName !== undefined && input.botName !== null && { botName: input.botName })), (input.dataPrivacy !== undefined &&
2609
- input.dataPrivacy !== null && { dataPrivacy: serializeAws_restJson1DataPrivacy(input.dataPrivacy, context) })), (input.description !== undefined && input.description !== null && { description: input.description })), (input.idleSessionTTLInSeconds !== undefined &&
2610
- input.idleSessionTTLInSeconds !== null && { idleSessionTTLInSeconds: input.idleSessionTTLInSeconds })), (input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn })));
2558
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.botName != null && { botName: input.botName })), (input.dataPrivacy != null && { dataPrivacy: serializeAws_restJson1DataPrivacy(input.dataPrivacy, context) })), (input.description != null && { description: input.description })), (input.idleSessionTTLInSeconds != null && { idleSessionTTLInSeconds: input.idleSessionTTLInSeconds })), (input.roleArn != null && { roleArn: input.roleArn })));
2611
2559
  return [2, new __HttpRequest({
2612
2560
  protocol: protocol,
2613
2561
  hostname: hostname,
@@ -2651,14 +2599,11 @@ export var serializeAws_restJson1UpdateBotAliasCommand = function (input, contex
2651
2599
  else {
2652
2600
  throw new Error("No value provided for input HTTP label: botId.");
2653
2601
  }
2654
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.botAliasLocaleSettings !== undefined &&
2655
- input.botAliasLocaleSettings !== null && {
2602
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.botAliasLocaleSettings != null && {
2656
2603
  botAliasLocaleSettings: serializeAws_restJson1BotAliasLocaleSettingsMap(input.botAliasLocaleSettings, context),
2657
- })), (input.botAliasName !== undefined && input.botAliasName !== null && { botAliasName: input.botAliasName })), (input.botVersion !== undefined && input.botVersion !== null && { botVersion: input.botVersion })), (input.conversationLogSettings !== undefined &&
2658
- input.conversationLogSettings !== null && {
2604
+ })), (input.botAliasName != null && { botAliasName: input.botAliasName })), (input.botVersion != null && { botVersion: input.botVersion })), (input.conversationLogSettings != null && {
2659
2605
  conversationLogSettings: serializeAws_restJson1ConversationLogSettings(input.conversationLogSettings, context),
2660
- })), (input.description !== undefined && input.description !== null && { description: input.description })), (input.sentimentAnalysisSettings !== undefined &&
2661
- input.sentimentAnalysisSettings !== null && {
2606
+ })), (input.description != null && { description: input.description })), (input.sentimentAnalysisSettings != null && {
2662
2607
  sentimentAnalysisSettings: serializeAws_restJson1SentimentAnalysisSettings(input.sentimentAnalysisSettings, context),
2663
2608
  })));
2664
2609
  return [2, new __HttpRequest({
@@ -2715,11 +2660,9 @@ export var serializeAws_restJson1UpdateBotLocaleCommand = function (input, conte
2715
2660
  else {
2716
2661
  throw new Error("No value provided for input HTTP label: localeId.");
2717
2662
  }
2718
- body = JSON.stringify(__assign(__assign(__assign({}, (input.description !== undefined && input.description !== null && { description: input.description })), (input.nluIntentConfidenceThreshold !== undefined &&
2719
- input.nluIntentConfidenceThreshold !== null && {
2663
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.description != null && { description: input.description })), (input.nluIntentConfidenceThreshold != null && {
2720
2664
  nluIntentConfidenceThreshold: __serializeFloat(input.nluIntentConfidenceThreshold),
2721
- })), (input.voiceSettings !== undefined &&
2722
- input.voiceSettings !== null && {
2665
+ })), (input.voiceSettings != null && {
2723
2666
  voiceSettings: serializeAws_restJson1VoiceSettings(input.voiceSettings, context),
2724
2667
  })));
2725
2668
  return [2, new __HttpRequest({
@@ -2786,8 +2729,7 @@ export var serializeAws_restJson1UpdateBotRecommendationCommand = function (inpu
2786
2729
  else {
2787
2730
  throw new Error("No value provided for input HTTP label: botRecommendationId.");
2788
2731
  }
2789
- body = JSON.stringify(__assign({}, (input.encryptionSetting !== undefined &&
2790
- input.encryptionSetting !== null && {
2732
+ body = JSON.stringify(__assign({}, (input.encryptionSetting != null && {
2791
2733
  encryptionSetting: serializeAws_restJson1EncryptionSetting(input.encryptionSetting, context),
2792
2734
  })));
2793
2735
  return [2, new __HttpRequest({
@@ -2823,7 +2765,7 @@ export var serializeAws_restJson1UpdateExportCommand = function (input, context)
2823
2765
  else {
2824
2766
  throw new Error("No value provided for input HTTP label: exportId.");
2825
2767
  }
2826
- body = JSON.stringify(__assign({}, (input.filePassword !== undefined && input.filePassword !== null && { filePassword: input.filePassword })));
2768
+ body = JSON.stringify(__assign({}, (input.filePassword != null && { filePassword: input.filePassword })));
2827
2769
  return [2, new __HttpRequest({
2828
2770
  protocol: protocol,
2829
2771
  hostname: hostname,
@@ -2888,33 +2830,23 @@ export var serializeAws_restJson1UpdateIntentCommand = function (input, context)
2888
2830
  else {
2889
2831
  throw new Error("No value provided for input HTTP label: localeId.");
2890
2832
  }
2891
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description !== undefined && input.description !== null && { description: input.description })), (input.dialogCodeHook !== undefined &&
2892
- input.dialogCodeHook !== null && {
2833
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description != null && { description: input.description })), (input.dialogCodeHook != null && {
2893
2834
  dialogCodeHook: serializeAws_restJson1DialogCodeHookSettings(input.dialogCodeHook, context),
2894
- })), (input.fulfillmentCodeHook !== undefined &&
2895
- input.fulfillmentCodeHook !== null && {
2835
+ })), (input.fulfillmentCodeHook != null && {
2896
2836
  fulfillmentCodeHook: serializeAws_restJson1FulfillmentCodeHookSettings(input.fulfillmentCodeHook, context),
2897
- })), (input.inputContexts !== undefined &&
2898
- input.inputContexts !== null && {
2837
+ })), (input.inputContexts != null && {
2899
2838
  inputContexts: serializeAws_restJson1InputContextsList(input.inputContexts, context),
2900
- })), (input.intentClosingSetting !== undefined &&
2901
- input.intentClosingSetting !== null && {
2839
+ })), (input.intentClosingSetting != null && {
2902
2840
  intentClosingSetting: serializeAws_restJson1IntentClosingSetting(input.intentClosingSetting, context),
2903
- })), (input.intentConfirmationSetting !== undefined &&
2904
- input.intentConfirmationSetting !== null && {
2841
+ })), (input.intentConfirmationSetting != null && {
2905
2842
  intentConfirmationSetting: serializeAws_restJson1IntentConfirmationSetting(input.intentConfirmationSetting, context),
2906
- })), (input.intentName !== undefined && input.intentName !== null && { intentName: input.intentName })), (input.kendraConfiguration !== undefined &&
2907
- input.kendraConfiguration !== null && {
2843
+ })), (input.intentName != null && { intentName: input.intentName })), (input.kendraConfiguration != null && {
2908
2844
  kendraConfiguration: serializeAws_restJson1KendraConfiguration(input.kendraConfiguration, context),
2909
- })), (input.outputContexts !== undefined &&
2910
- input.outputContexts !== null && {
2845
+ })), (input.outputContexts != null && {
2911
2846
  outputContexts: serializeAws_restJson1OutputContextsList(input.outputContexts, context),
2912
- })), (input.parentIntentSignature !== undefined &&
2913
- input.parentIntentSignature !== null && { parentIntentSignature: input.parentIntentSignature })), (input.sampleUtterances !== undefined &&
2914
- input.sampleUtterances !== null && {
2847
+ })), (input.parentIntentSignature != null && { parentIntentSignature: input.parentIntentSignature })), (input.sampleUtterances != null && {
2915
2848
  sampleUtterances: serializeAws_restJson1SampleUtterancesList(input.sampleUtterances, context),
2916
- })), (input.slotPriorities !== undefined &&
2917
- input.slotPriorities !== null && {
2849
+ })), (input.slotPriorities != null && {
2918
2850
  slotPriorities: serializeAws_restJson1SlotPrioritiesList(input.slotPriorities, context),
2919
2851
  })));
2920
2852
  return [2, new __HttpRequest({
@@ -2951,7 +2883,7 @@ export var serializeAws_restJson1UpdateResourcePolicyCommand = function (input,
2951
2883
  throw new Error("No value provided for input HTTP label: resourceArn.");
2952
2884
  }
2953
2885
  query = __assign({}, (input.expectedRevisionId !== undefined && { expectedRevisionId: input.expectedRevisionId }));
2954
- body = JSON.stringify(__assign({}, (input.policy !== undefined && input.policy !== null && { policy: input.policy })));
2886
+ body = JSON.stringify(__assign({}, (input.policy != null && { policy: input.policy })));
2955
2887
  return [2, new __HttpRequest({
2956
2888
  protocol: protocol,
2957
2889
  hostname: hostname,
@@ -3027,14 +2959,11 @@ export var serializeAws_restJson1UpdateSlotCommand = function (input, context) {
3027
2959
  else {
3028
2960
  throw new Error("No value provided for input HTTP label: intentId.");
3029
2961
  }
3030
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description !== undefined && input.description !== null && { description: input.description })), (input.multipleValuesSetting !== undefined &&
3031
- input.multipleValuesSetting !== null && {
2962
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description != null && { description: input.description })), (input.multipleValuesSetting != null && {
3032
2963
  multipleValuesSetting: serializeAws_restJson1MultipleValuesSetting(input.multipleValuesSetting, context),
3033
- })), (input.obfuscationSetting !== undefined &&
3034
- input.obfuscationSetting !== null && {
2964
+ })), (input.obfuscationSetting != null && {
3035
2965
  obfuscationSetting: serializeAws_restJson1ObfuscationSetting(input.obfuscationSetting, context),
3036
- })), (input.slotName !== undefined && input.slotName !== null && { slotName: input.slotName })), (input.slotTypeId !== undefined && input.slotTypeId !== null && { slotTypeId: input.slotTypeId })), (input.valueElicitationSetting !== undefined &&
3037
- input.valueElicitationSetting !== null && {
2966
+ })), (input.slotName != null && { slotName: input.slotName })), (input.slotTypeId != null && { slotTypeId: input.slotTypeId })), (input.valueElicitationSetting != null && {
3038
2967
  valueElicitationSetting: serializeAws_restJson1SlotValueElicitationSetting(input.valueElicitationSetting, context),
3039
2968
  })));
3040
2969
  return [2, new __HttpRequest({
@@ -3101,15 +3030,11 @@ export var serializeAws_restJson1UpdateSlotTypeCommand = function (input, contex
3101
3030
  else {
3102
3031
  throw new Error("No value provided for input HTTP label: localeId.");
3103
3032
  }
3104
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description !== undefined && input.description !== null && { description: input.description })), (input.externalSourceSetting !== undefined &&
3105
- input.externalSourceSetting !== null && {
3033
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description != null && { description: input.description })), (input.externalSourceSetting != null && {
3106
3034
  externalSourceSetting: serializeAws_restJson1ExternalSourceSetting(input.externalSourceSetting, context),
3107
- })), (input.parentSlotTypeSignature !== undefined &&
3108
- input.parentSlotTypeSignature !== null && { parentSlotTypeSignature: input.parentSlotTypeSignature })), (input.slotTypeName !== undefined && input.slotTypeName !== null && { slotTypeName: input.slotTypeName })), (input.slotTypeValues !== undefined &&
3109
- input.slotTypeValues !== null && {
3035
+ })), (input.parentSlotTypeSignature != null && { parentSlotTypeSignature: input.parentSlotTypeSignature })), (input.slotTypeName != null && { slotTypeName: input.slotTypeName })), (input.slotTypeValues != null && {
3110
3036
  slotTypeValues: serializeAws_restJson1SlotTypeValues(input.slotTypeValues, context),
3111
- })), (input.valueSelectionSetting !== undefined &&
3112
- input.valueSelectionSetting !== null && {
3037
+ })), (input.valueSelectionSetting != null && {
3113
3038
  valueSelectionSetting: serializeAws_restJson1SlotValueSelectionSetting(input.valueSelectionSetting, context),
3114
3039
  })));
3115
3040
  return [2, new __HttpRequest({
@@ -3165,7 +3090,7 @@ export var deserializeAws_restJson1BuildBotLocaleCommand = function (output, con
3165
3090
  });
3166
3091
  }); };
3167
3092
  var deserializeAws_restJson1BuildBotLocaleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3168
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3093
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3169
3094
  var _c;
3170
3095
  return __generator(this, function (_d) {
3171
3096
  switch (_d.label) {
@@ -3175,7 +3100,6 @@ var deserializeAws_restJson1BuildBotLocaleCommandError = function (output, conte
3175
3100
  return [4, parseBody(output.body, context)];
3176
3101
  case 1:
3177
3102
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3178
- errorCode = "UnknownError";
3179
3103
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3180
3104
  _b = errorCode;
3181
3105
  switch (_b) {
@@ -3207,10 +3131,12 @@ var deserializeAws_restJson1BuildBotLocaleCommandError = function (output, conte
3207
3131
  case 13: throw _d.sent();
3208
3132
  case 14:
3209
3133
  parsedBody = parsedOutput.body;
3134
+ $metadata = deserializeMetadata(output);
3135
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3210
3136
  response = new __BaseException({
3211
- name: parsedBody.code || parsedBody.Code || errorCode,
3137
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3212
3138
  $fault: "client",
3213
- $metadata: deserializeMetadata(output),
3139
+ $metadata: $metadata,
3214
3140
  });
3215
3141
  throw __decorateServiceException(response, parsedBody);
3216
3142
  }
@@ -3277,7 +3203,7 @@ export var deserializeAws_restJson1CreateBotCommand = function (output, context)
3277
3203
  });
3278
3204
  }); };
3279
3205
  var deserializeAws_restJson1CreateBotCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3280
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3206
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3281
3207
  var _c;
3282
3208
  return __generator(this, function (_d) {
3283
3209
  switch (_d.label) {
@@ -3287,7 +3213,6 @@ var deserializeAws_restJson1CreateBotCommandError = function (output, context) {
3287
3213
  return [4, parseBody(output.body, context)];
3288
3214
  case 1:
3289
3215
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3290
- errorCode = "UnknownError";
3291
3216
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3292
3217
  _b = errorCode;
3293
3218
  switch (_b) {
@@ -3319,10 +3244,12 @@ var deserializeAws_restJson1CreateBotCommandError = function (output, context) {
3319
3244
  case 13: throw _d.sent();
3320
3245
  case 14:
3321
3246
  parsedBody = parsedOutput.body;
3247
+ $metadata = deserializeMetadata(output);
3248
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3322
3249
  response = new __BaseException({
3323
- name: parsedBody.code || parsedBody.Code || errorCode,
3250
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3324
3251
  $fault: "client",
3325
- $metadata: deserializeMetadata(output),
3252
+ $metadata: $metadata,
3326
3253
  });
3327
3254
  throw __decorateServiceException(response, parsedBody);
3328
3255
  }
@@ -3393,7 +3320,7 @@ export var deserializeAws_restJson1CreateBotAliasCommand = function (output, con
3393
3320
  });
3394
3321
  }); };
3395
3322
  var deserializeAws_restJson1CreateBotAliasCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3396
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3323
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3397
3324
  var _c;
3398
3325
  return __generator(this, function (_d) {
3399
3326
  switch (_d.label) {
@@ -3403,7 +3330,6 @@ var deserializeAws_restJson1CreateBotAliasCommandError = function (output, conte
3403
3330
  return [4, parseBody(output.body, context)];
3404
3331
  case 1:
3405
3332
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3406
- errorCode = "UnknownError";
3407
3333
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3408
3334
  _b = errorCode;
3409
3335
  switch (_b) {
@@ -3435,10 +3361,12 @@ var deserializeAws_restJson1CreateBotAliasCommandError = function (output, conte
3435
3361
  case 13: throw _d.sent();
3436
3362
  case 14:
3437
3363
  parsedBody = parsedOutput.body;
3364
+ $metadata = deserializeMetadata(output);
3365
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3438
3366
  response = new __BaseException({
3439
- name: parsedBody.code || parsedBody.Code || errorCode,
3367
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3440
3368
  $fault: "client",
3441
- $metadata: deserializeMetadata(output),
3369
+ $metadata: $metadata,
3442
3370
  });
3443
3371
  throw __decorateServiceException(response, parsedBody);
3444
3372
  }
@@ -3501,7 +3429,7 @@ export var deserializeAws_restJson1CreateBotLocaleCommand = function (output, co
3501
3429
  });
3502
3430
  }); };
3503
3431
  var deserializeAws_restJson1CreateBotLocaleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3504
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3432
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3505
3433
  var _c;
3506
3434
  return __generator(this, function (_d) {
3507
3435
  switch (_d.label) {
@@ -3511,7 +3439,6 @@ var deserializeAws_restJson1CreateBotLocaleCommandError = function (output, cont
3511
3439
  return [4, parseBody(output.body, context)];
3512
3440
  case 1:
3513
3441
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3514
- errorCode = "UnknownError";
3515
3442
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3516
3443
  _b = errorCode;
3517
3444
  switch (_b) {
@@ -3543,10 +3470,12 @@ var deserializeAws_restJson1CreateBotLocaleCommandError = function (output, cont
3543
3470
  case 13: throw _d.sent();
3544
3471
  case 14:
3545
3472
  parsedBody = parsedOutput.body;
3473
+ $metadata = deserializeMetadata(output);
3474
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3546
3475
  response = new __BaseException({
3547
- name: parsedBody.code || parsedBody.Code || errorCode,
3476
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3548
3477
  $fault: "client",
3549
- $metadata: deserializeMetadata(output),
3478
+ $metadata: $metadata,
3550
3479
  });
3551
3480
  throw __decorateServiceException(response, parsedBody);
3552
3481
  }
@@ -3597,7 +3526,7 @@ export var deserializeAws_restJson1CreateBotVersionCommand = function (output, c
3597
3526
  });
3598
3527
  }); };
3599
3528
  var deserializeAws_restJson1CreateBotVersionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3600
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3529
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3601
3530
  var _c;
3602
3531
  return __generator(this, function (_d) {
3603
3532
  switch (_d.label) {
@@ -3607,7 +3536,6 @@ var deserializeAws_restJson1CreateBotVersionCommandError = function (output, con
3607
3536
  return [4, parseBody(output.body, context)];
3608
3537
  case 1:
3609
3538
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3610
- errorCode = "UnknownError";
3611
3539
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3612
3540
  _b = errorCode;
3613
3541
  switch (_b) {
@@ -3639,10 +3567,12 @@ var deserializeAws_restJson1CreateBotVersionCommandError = function (output, con
3639
3567
  case 13: throw _d.sent();
3640
3568
  case 14:
3641
3569
  parsedBody = parsedOutput.body;
3570
+ $metadata = deserializeMetadata(output);
3571
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3642
3572
  response = new __BaseException({
3643
- name: parsedBody.code || parsedBody.Code || errorCode,
3573
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3644
3574
  $fault: "client",
3645
- $metadata: deserializeMetadata(output),
3575
+ $metadata: $metadata,
3646
3576
  });
3647
3577
  throw __decorateServiceException(response, parsedBody);
3648
3578
  }
@@ -3689,7 +3619,7 @@ export var deserializeAws_restJson1CreateExportCommand = function (output, conte
3689
3619
  });
3690
3620
  }); };
3691
3621
  var deserializeAws_restJson1CreateExportCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3692
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3622
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3693
3623
  var _c;
3694
3624
  return __generator(this, function (_d) {
3695
3625
  switch (_d.label) {
@@ -3699,7 +3629,6 @@ var deserializeAws_restJson1CreateExportCommandError = function (output, context
3699
3629
  return [4, parseBody(output.body, context)];
3700
3630
  case 1:
3701
3631
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3702
- errorCode = "UnknownError";
3703
3632
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3704
3633
  _b = errorCode;
3705
3634
  switch (_b) {
@@ -3731,10 +3660,12 @@ var deserializeAws_restJson1CreateExportCommandError = function (output, context
3731
3660
  case 13: throw _d.sent();
3732
3661
  case 14:
3733
3662
  parsedBody = parsedOutput.body;
3663
+ $metadata = deserializeMetadata(output);
3664
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3734
3665
  response = new __BaseException({
3735
- name: parsedBody.code || parsedBody.Code || errorCode,
3666
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3736
3667
  $fault: "client",
3737
- $metadata: deserializeMetadata(output),
3668
+ $metadata: $metadata,
3738
3669
  });
3739
3670
  throw __decorateServiceException(response, parsedBody);
3740
3671
  }
@@ -3825,7 +3756,7 @@ export var deserializeAws_restJson1CreateIntentCommand = function (output, conte
3825
3756
  });
3826
3757
  }); };
3827
3758
  var deserializeAws_restJson1CreateIntentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3828
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3759
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3829
3760
  var _c;
3830
3761
  return __generator(this, function (_d) {
3831
3762
  switch (_d.label) {
@@ -3835,7 +3766,6 @@ var deserializeAws_restJson1CreateIntentCommandError = function (output, context
3835
3766
  return [4, parseBody(output.body, context)];
3836
3767
  case 1:
3837
3768
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3838
- errorCode = "UnknownError";
3839
3769
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3840
3770
  _b = errorCode;
3841
3771
  switch (_b) {
@@ -3867,10 +3797,12 @@ var deserializeAws_restJson1CreateIntentCommandError = function (output, context
3867
3797
  case 13: throw _d.sent();
3868
3798
  case 14:
3869
3799
  parsedBody = parsedOutput.body;
3800
+ $metadata = deserializeMetadata(output);
3801
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3870
3802
  response = new __BaseException({
3871
- name: parsedBody.code || parsedBody.Code || errorCode,
3803
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3872
3804
  $fault: "client",
3873
- $metadata: deserializeMetadata(output),
3805
+ $metadata: $metadata,
3874
3806
  });
3875
3807
  throw __decorateServiceException(response, parsedBody);
3876
3808
  }
@@ -3905,7 +3837,7 @@ export var deserializeAws_restJson1CreateResourcePolicyCommand = function (outpu
3905
3837
  });
3906
3838
  }); };
3907
3839
  var deserializeAws_restJson1CreateResourcePolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3908
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3840
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3909
3841
  var _c;
3910
3842
  return __generator(this, function (_d) {
3911
3843
  switch (_d.label) {
@@ -3915,7 +3847,6 @@ var deserializeAws_restJson1CreateResourcePolicyCommandError = function (output,
3915
3847
  return [4, parseBody(output.body, context)];
3916
3848
  case 1:
3917
3849
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3918
- errorCode = "UnknownError";
3919
3850
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3920
3851
  _b = errorCode;
3921
3852
  switch (_b) {
@@ -3947,10 +3878,12 @@ var deserializeAws_restJson1CreateResourcePolicyCommandError = function (output,
3947
3878
  case 13: throw _d.sent();
3948
3879
  case 14:
3949
3880
  parsedBody = parsedOutput.body;
3881
+ $metadata = deserializeMetadata(output);
3882
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3950
3883
  response = new __BaseException({
3951
- name: parsedBody.code || parsedBody.Code || errorCode,
3884
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3952
3885
  $fault: "client",
3953
- $metadata: deserializeMetadata(output),
3886
+ $metadata: $metadata,
3954
3887
  });
3955
3888
  throw __decorateServiceException(response, parsedBody);
3956
3889
  }
@@ -3985,7 +3918,7 @@ export var deserializeAws_restJson1CreateResourcePolicyStatementCommand = functi
3985
3918
  });
3986
3919
  }); };
3987
3920
  var deserializeAws_restJson1CreateResourcePolicyStatementCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3988
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3921
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3989
3922
  var _c;
3990
3923
  return __generator(this, function (_d) {
3991
3924
  switch (_d.label) {
@@ -3995,7 +3928,6 @@ var deserializeAws_restJson1CreateResourcePolicyStatementCommandError = function
3995
3928
  return [4, parseBody(output.body, context)];
3996
3929
  case 1:
3997
3930
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3998
- errorCode = "UnknownError";
3999
3931
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4000
3932
  _b = errorCode;
4001
3933
  switch (_b) {
@@ -4031,10 +3963,12 @@ var deserializeAws_restJson1CreateResourcePolicyStatementCommandError = function
4031
3963
  case 15: throw _d.sent();
4032
3964
  case 16:
4033
3965
  parsedBody = parsedOutput.body;
3966
+ $metadata = deserializeMetadata(output);
3967
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4034
3968
  response = new __BaseException({
4035
- name: parsedBody.code || parsedBody.Code || errorCode,
3969
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4036
3970
  $fault: "client",
4037
- $metadata: deserializeMetadata(output),
3971
+ $metadata: $metadata,
4038
3972
  });
4039
3973
  throw __decorateServiceException(response, parsedBody);
4040
3974
  }
@@ -4109,7 +4043,7 @@ export var deserializeAws_restJson1CreateSlotCommand = function (output, context
4109
4043
  });
4110
4044
  }); };
4111
4045
  var deserializeAws_restJson1CreateSlotCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4112
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4046
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4113
4047
  var _c;
4114
4048
  return __generator(this, function (_d) {
4115
4049
  switch (_d.label) {
@@ -4119,7 +4053,6 @@ var deserializeAws_restJson1CreateSlotCommandError = function (output, context)
4119
4053
  return [4, parseBody(output.body, context)];
4120
4054
  case 1:
4121
4055
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4122
- errorCode = "UnknownError";
4123
4056
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4124
4057
  _b = errorCode;
4125
4058
  switch (_b) {
@@ -4151,10 +4084,12 @@ var deserializeAws_restJson1CreateSlotCommandError = function (output, context)
4151
4084
  case 13: throw _d.sent();
4152
4085
  case 14:
4153
4086
  parsedBody = parsedOutput.body;
4087
+ $metadata = deserializeMetadata(output);
4088
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4154
4089
  response = new __BaseException({
4155
- name: parsedBody.code || parsedBody.Code || errorCode,
4090
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4156
4091
  $fault: "client",
4157
- $metadata: deserializeMetadata(output),
4092
+ $metadata: $metadata,
4158
4093
  });
4159
4094
  throw __decorateServiceException(response, parsedBody);
4160
4095
  }
@@ -4225,7 +4160,7 @@ export var deserializeAws_restJson1CreateSlotTypeCommand = function (output, con
4225
4160
  });
4226
4161
  }); };
4227
4162
  var deserializeAws_restJson1CreateSlotTypeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4228
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4163
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4229
4164
  var _c;
4230
4165
  return __generator(this, function (_d) {
4231
4166
  switch (_d.label) {
@@ -4235,7 +4170,6 @@ var deserializeAws_restJson1CreateSlotTypeCommandError = function (output, conte
4235
4170
  return [4, parseBody(output.body, context)];
4236
4171
  case 1:
4237
4172
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4238
- errorCode = "UnknownError";
4239
4173
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4240
4174
  _b = errorCode;
4241
4175
  switch (_b) {
@@ -4267,10 +4201,12 @@ var deserializeAws_restJson1CreateSlotTypeCommandError = function (output, conte
4267
4201
  case 13: throw _d.sent();
4268
4202
  case 14:
4269
4203
  parsedBody = parsedOutput.body;
4204
+ $metadata = deserializeMetadata(output);
4205
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4270
4206
  response = new __BaseException({
4271
- name: parsedBody.code || parsedBody.Code || errorCode,
4207
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4272
4208
  $fault: "client",
4273
- $metadata: deserializeMetadata(output),
4209
+ $metadata: $metadata,
4274
4210
  });
4275
4211
  throw __decorateServiceException(response, parsedBody);
4276
4212
  }
@@ -4305,7 +4241,7 @@ export var deserializeAws_restJson1CreateUploadUrlCommand = function (output, co
4305
4241
  });
4306
4242
  }); };
4307
4243
  var deserializeAws_restJson1CreateUploadUrlCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4308
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4244
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4309
4245
  var _c;
4310
4246
  return __generator(this, function (_d) {
4311
4247
  switch (_d.label) {
@@ -4315,7 +4251,6 @@ var deserializeAws_restJson1CreateUploadUrlCommandError = function (output, cont
4315
4251
  return [4, parseBody(output.body, context)];
4316
4252
  case 1:
4317
4253
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4318
- errorCode = "UnknownError";
4319
4254
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4320
4255
  _b = errorCode;
4321
4256
  switch (_b) {
@@ -4343,10 +4278,12 @@ var deserializeAws_restJson1CreateUploadUrlCommandError = function (output, cont
4343
4278
  case 11: throw _d.sent();
4344
4279
  case 12:
4345
4280
  parsedBody = parsedOutput.body;
4281
+ $metadata = deserializeMetadata(output);
4282
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4346
4283
  response = new __BaseException({
4347
- name: parsedBody.code || parsedBody.Code || errorCode,
4284
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4348
4285
  $fault: "client",
4349
- $metadata: deserializeMetadata(output),
4286
+ $metadata: $metadata,
4350
4287
  });
4351
4288
  throw __decorateServiceException(response, parsedBody);
4352
4289
  }
@@ -4381,7 +4318,7 @@ export var deserializeAws_restJson1DeleteBotCommand = function (output, context)
4381
4318
  });
4382
4319
  }); };
4383
4320
  var deserializeAws_restJson1DeleteBotCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4384
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4321
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4385
4322
  var _c;
4386
4323
  return __generator(this, function (_d) {
4387
4324
  switch (_d.label) {
@@ -4391,7 +4328,6 @@ var deserializeAws_restJson1DeleteBotCommandError = function (output, context) {
4391
4328
  return [4, parseBody(output.body, context)];
4392
4329
  case 1:
4393
4330
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4394
- errorCode = "UnknownError";
4395
4331
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4396
4332
  _b = errorCode;
4397
4333
  switch (_b) {
@@ -4423,10 +4359,12 @@ var deserializeAws_restJson1DeleteBotCommandError = function (output, context) {
4423
4359
  case 13: throw _d.sent();
4424
4360
  case 14:
4425
4361
  parsedBody = parsedOutput.body;
4362
+ $metadata = deserializeMetadata(output);
4363
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4426
4364
  response = new __BaseException({
4427
- name: parsedBody.code || parsedBody.Code || errorCode,
4365
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4428
4366
  $fault: "client",
4429
- $metadata: deserializeMetadata(output),
4367
+ $metadata: $metadata,
4430
4368
  });
4431
4369
  throw __decorateServiceException(response, parsedBody);
4432
4370
  }
@@ -4465,7 +4403,7 @@ export var deserializeAws_restJson1DeleteBotAliasCommand = function (output, con
4465
4403
  });
4466
4404
  }); };
4467
4405
  var deserializeAws_restJson1DeleteBotAliasCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4468
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4406
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4469
4407
  var _c;
4470
4408
  return __generator(this, function (_d) {
4471
4409
  switch (_d.label) {
@@ -4475,7 +4413,6 @@ var deserializeAws_restJson1DeleteBotAliasCommandError = function (output, conte
4475
4413
  return [4, parseBody(output.body, context)];
4476
4414
  case 1:
4477
4415
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4478
- errorCode = "UnknownError";
4479
4416
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4480
4417
  _b = errorCode;
4481
4418
  switch (_b) {
@@ -4507,10 +4444,12 @@ var deserializeAws_restJson1DeleteBotAliasCommandError = function (output, conte
4507
4444
  case 13: throw _d.sent();
4508
4445
  case 14:
4509
4446
  parsedBody = parsedOutput.body;
4447
+ $metadata = deserializeMetadata(output);
4448
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4510
4449
  response = new __BaseException({
4511
- name: parsedBody.code || parsedBody.Code || errorCode,
4450
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4512
4451
  $fault: "client",
4513
- $metadata: deserializeMetadata(output),
4452
+ $metadata: $metadata,
4514
4453
  });
4515
4454
  throw __decorateServiceException(response, parsedBody);
4516
4455
  }
@@ -4553,7 +4492,7 @@ export var deserializeAws_restJson1DeleteBotLocaleCommand = function (output, co
4553
4492
  });
4554
4493
  }); };
4555
4494
  var deserializeAws_restJson1DeleteBotLocaleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4556
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4495
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4557
4496
  var _c;
4558
4497
  return __generator(this, function (_d) {
4559
4498
  switch (_d.label) {
@@ -4563,7 +4502,6 @@ var deserializeAws_restJson1DeleteBotLocaleCommandError = function (output, cont
4563
4502
  return [4, parseBody(output.body, context)];
4564
4503
  case 1:
4565
4504
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4566
- errorCode = "UnknownError";
4567
4505
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4568
4506
  _b = errorCode;
4569
4507
  switch (_b) {
@@ -4595,10 +4533,12 @@ var deserializeAws_restJson1DeleteBotLocaleCommandError = function (output, cont
4595
4533
  case 13: throw _d.sent();
4596
4534
  case 14:
4597
4535
  parsedBody = parsedOutput.body;
4536
+ $metadata = deserializeMetadata(output);
4537
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4598
4538
  response = new __BaseException({
4599
- name: parsedBody.code || parsedBody.Code || errorCode,
4539
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4600
4540
  $fault: "client",
4601
- $metadata: deserializeMetadata(output),
4541
+ $metadata: $metadata,
4602
4542
  });
4603
4543
  throw __decorateServiceException(response, parsedBody);
4604
4544
  }
@@ -4637,7 +4577,7 @@ export var deserializeAws_restJson1DeleteBotVersionCommand = function (output, c
4637
4577
  });
4638
4578
  }); };
4639
4579
  var deserializeAws_restJson1DeleteBotVersionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4640
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4580
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4641
4581
  var _c;
4642
4582
  return __generator(this, function (_d) {
4643
4583
  switch (_d.label) {
@@ -4647,7 +4587,6 @@ var deserializeAws_restJson1DeleteBotVersionCommandError = function (output, con
4647
4587
  return [4, parseBody(output.body, context)];
4648
4588
  case 1:
4649
4589
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4650
- errorCode = "UnknownError";
4651
4590
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4652
4591
  _b = errorCode;
4653
4592
  switch (_b) {
@@ -4679,10 +4618,12 @@ var deserializeAws_restJson1DeleteBotVersionCommandError = function (output, con
4679
4618
  case 13: throw _d.sent();
4680
4619
  case 14:
4681
4620
  parsedBody = parsedOutput.body;
4621
+ $metadata = deserializeMetadata(output);
4622
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4682
4623
  response = new __BaseException({
4683
- name: parsedBody.code || parsedBody.Code || errorCode,
4624
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4684
4625
  $fault: "client",
4685
- $metadata: deserializeMetadata(output),
4626
+ $metadata: $metadata,
4686
4627
  });
4687
4628
  throw __decorateServiceException(response, parsedBody);
4688
4629
  }
@@ -4725,7 +4666,7 @@ export var deserializeAws_restJson1DeleteCustomVocabularyCommand = function (out
4725
4666
  });
4726
4667
  }); };
4727
4668
  var deserializeAws_restJson1DeleteCustomVocabularyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4728
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4669
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4729
4670
  var _c;
4730
4671
  return __generator(this, function (_d) {
4731
4672
  switch (_d.label) {
@@ -4735,7 +4676,6 @@ var deserializeAws_restJson1DeleteCustomVocabularyCommandError = function (outpu
4735
4676
  return [4, parseBody(output.body, context)];
4736
4677
  case 1:
4737
4678
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4738
- errorCode = "UnknownError";
4739
4679
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4740
4680
  _b = errorCode;
4741
4681
  switch (_b) {
@@ -4767,10 +4707,12 @@ var deserializeAws_restJson1DeleteCustomVocabularyCommandError = function (outpu
4767
4707
  case 13: throw _d.sent();
4768
4708
  case 14:
4769
4709
  parsedBody = parsedOutput.body;
4710
+ $metadata = deserializeMetadata(output);
4711
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4770
4712
  response = new __BaseException({
4771
- name: parsedBody.code || parsedBody.Code || errorCode,
4713
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4772
4714
  $fault: "client",
4773
- $metadata: deserializeMetadata(output),
4715
+ $metadata: $metadata,
4774
4716
  });
4775
4717
  throw __decorateServiceException(response, parsedBody);
4776
4718
  }
@@ -4805,7 +4747,7 @@ export var deserializeAws_restJson1DeleteExportCommand = function (output, conte
4805
4747
  });
4806
4748
  }); };
4807
4749
  var deserializeAws_restJson1DeleteExportCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4808
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4750
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4809
4751
  var _c;
4810
4752
  return __generator(this, function (_d) {
4811
4753
  switch (_d.label) {
@@ -4815,7 +4757,6 @@ var deserializeAws_restJson1DeleteExportCommandError = function (output, context
4815
4757
  return [4, parseBody(output.body, context)];
4816
4758
  case 1:
4817
4759
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4818
- errorCode = "UnknownError";
4819
4760
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4820
4761
  _b = errorCode;
4821
4762
  switch (_b) {
@@ -4843,10 +4784,12 @@ var deserializeAws_restJson1DeleteExportCommandError = function (output, context
4843
4784
  case 11: throw _d.sent();
4844
4785
  case 12:
4845
4786
  parsedBody = parsedOutput.body;
4787
+ $metadata = deserializeMetadata(output);
4788
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4846
4789
  response = new __BaseException({
4847
- name: parsedBody.code || parsedBody.Code || errorCode,
4790
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4848
4791
  $fault: "client",
4849
- $metadata: deserializeMetadata(output),
4792
+ $metadata: $metadata,
4850
4793
  });
4851
4794
  throw __decorateServiceException(response, parsedBody);
4852
4795
  }
@@ -4881,7 +4824,7 @@ export var deserializeAws_restJson1DeleteImportCommand = function (output, conte
4881
4824
  });
4882
4825
  }); };
4883
4826
  var deserializeAws_restJson1DeleteImportCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4884
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4827
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4885
4828
  var _c;
4886
4829
  return __generator(this, function (_d) {
4887
4830
  switch (_d.label) {
@@ -4891,7 +4834,6 @@ var deserializeAws_restJson1DeleteImportCommandError = function (output, context
4891
4834
  return [4, parseBody(output.body, context)];
4892
4835
  case 1:
4893
4836
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4894
- errorCode = "UnknownError";
4895
4837
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4896
4838
  _b = errorCode;
4897
4839
  switch (_b) {
@@ -4919,10 +4861,12 @@ var deserializeAws_restJson1DeleteImportCommandError = function (output, context
4919
4861
  case 11: throw _d.sent();
4920
4862
  case 12:
4921
4863
  parsedBody = parsedOutput.body;
4864
+ $metadata = deserializeMetadata(output);
4865
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4922
4866
  response = new __BaseException({
4923
- name: parsedBody.code || parsedBody.Code || errorCode,
4867
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4924
4868
  $fault: "client",
4925
- $metadata: deserializeMetadata(output),
4869
+ $metadata: $metadata,
4926
4870
  });
4927
4871
  throw __decorateServiceException(response, parsedBody);
4928
4872
  }
@@ -4947,7 +4891,7 @@ export var deserializeAws_restJson1DeleteIntentCommand = function (output, conte
4947
4891
  });
4948
4892
  }); };
4949
4893
  var deserializeAws_restJson1DeleteIntentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4950
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4894
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4951
4895
  var _c;
4952
4896
  return __generator(this, function (_d) {
4953
4897
  switch (_d.label) {
@@ -4957,7 +4901,6 @@ var deserializeAws_restJson1DeleteIntentCommandError = function (output, context
4957
4901
  return [4, parseBody(output.body, context)];
4958
4902
  case 1:
4959
4903
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4960
- errorCode = "UnknownError";
4961
4904
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4962
4905
  _b = errorCode;
4963
4906
  switch (_b) {
@@ -4989,10 +4932,12 @@ var deserializeAws_restJson1DeleteIntentCommandError = function (output, context
4989
4932
  case 13: throw _d.sent();
4990
4933
  case 14:
4991
4934
  parsedBody = parsedOutput.body;
4935
+ $metadata = deserializeMetadata(output);
4936
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4992
4937
  response = new __BaseException({
4993
- name: parsedBody.code || parsedBody.Code || errorCode,
4938
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4994
4939
  $fault: "client",
4995
- $metadata: deserializeMetadata(output),
4940
+ $metadata: $metadata,
4996
4941
  });
4997
4942
  throw __decorateServiceException(response, parsedBody);
4998
4943
  }
@@ -5027,7 +4972,7 @@ export var deserializeAws_restJson1DeleteResourcePolicyCommand = function (outpu
5027
4972
  });
5028
4973
  }); };
5029
4974
  var deserializeAws_restJson1DeleteResourcePolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5030
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4975
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5031
4976
  var _c;
5032
4977
  return __generator(this, function (_d) {
5033
4978
  switch (_d.label) {
@@ -5037,7 +4982,6 @@ var deserializeAws_restJson1DeleteResourcePolicyCommandError = function (output,
5037
4982
  return [4, parseBody(output.body, context)];
5038
4983
  case 1:
5039
4984
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5040
- errorCode = "UnknownError";
5041
4985
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5042
4986
  _b = errorCode;
5043
4987
  switch (_b) {
@@ -5061,10 +5005,12 @@ var deserializeAws_restJson1DeleteResourcePolicyCommandError = function (output,
5061
5005
  case 9: throw _d.sent();
5062
5006
  case 10:
5063
5007
  parsedBody = parsedOutput.body;
5008
+ $metadata = deserializeMetadata(output);
5009
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5064
5010
  response = new __BaseException({
5065
- name: parsedBody.code || parsedBody.Code || errorCode,
5011
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5066
5012
  $fault: "client",
5067
- $metadata: deserializeMetadata(output),
5013
+ $metadata: $metadata,
5068
5014
  });
5069
5015
  throw __decorateServiceException(response, parsedBody);
5070
5016
  }
@@ -5099,7 +5045,7 @@ export var deserializeAws_restJson1DeleteResourcePolicyStatementCommand = functi
5099
5045
  });
5100
5046
  }); };
5101
5047
  var deserializeAws_restJson1DeleteResourcePolicyStatementCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5102
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
5048
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5103
5049
  var _c;
5104
5050
  return __generator(this, function (_d) {
5105
5051
  switch (_d.label) {
@@ -5109,7 +5055,6 @@ var deserializeAws_restJson1DeleteResourcePolicyStatementCommandError = function
5109
5055
  return [4, parseBody(output.body, context)];
5110
5056
  case 1:
5111
5057
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5112
- errorCode = "UnknownError";
5113
5058
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5114
5059
  _b = errorCode;
5115
5060
  switch (_b) {
@@ -5133,10 +5078,12 @@ var deserializeAws_restJson1DeleteResourcePolicyStatementCommandError = function
5133
5078
  case 9: throw _d.sent();
5134
5079
  case 10:
5135
5080
  parsedBody = parsedOutput.body;
5081
+ $metadata = deserializeMetadata(output);
5082
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5136
5083
  response = new __BaseException({
5137
- name: parsedBody.code || parsedBody.Code || errorCode,
5084
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5138
5085
  $fault: "client",
5139
- $metadata: deserializeMetadata(output),
5086
+ $metadata: $metadata,
5140
5087
  });
5141
5088
  throw __decorateServiceException(response, parsedBody);
5142
5089
  }
@@ -5161,7 +5108,7 @@ export var deserializeAws_restJson1DeleteSlotCommand = function (output, context
5161
5108
  });
5162
5109
  }); };
5163
5110
  var deserializeAws_restJson1DeleteSlotCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5164
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
5111
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5165
5112
  var _c;
5166
5113
  return __generator(this, function (_d) {
5167
5114
  switch (_d.label) {
@@ -5171,7 +5118,6 @@ var deserializeAws_restJson1DeleteSlotCommandError = function (output, context)
5171
5118
  return [4, parseBody(output.body, context)];
5172
5119
  case 1:
5173
5120
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5174
- errorCode = "UnknownError";
5175
5121
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5176
5122
  _b = errorCode;
5177
5123
  switch (_b) {
@@ -5203,10 +5149,12 @@ var deserializeAws_restJson1DeleteSlotCommandError = function (output, context)
5203
5149
  case 13: throw _d.sent();
5204
5150
  case 14:
5205
5151
  parsedBody = parsedOutput.body;
5152
+ $metadata = deserializeMetadata(output);
5153
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5206
5154
  response = new __BaseException({
5207
- name: parsedBody.code || parsedBody.Code || errorCode,
5155
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5208
5156
  $fault: "client",
5209
- $metadata: deserializeMetadata(output),
5157
+ $metadata: $metadata,
5210
5158
  });
5211
5159
  throw __decorateServiceException(response, parsedBody);
5212
5160
  }
@@ -5231,7 +5179,7 @@ export var deserializeAws_restJson1DeleteSlotTypeCommand = function (output, con
5231
5179
  });
5232
5180
  }); };
5233
5181
  var deserializeAws_restJson1DeleteSlotTypeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5234
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
5182
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5235
5183
  var _c;
5236
5184
  return __generator(this, function (_d) {
5237
5185
  switch (_d.label) {
@@ -5241,7 +5189,6 @@ var deserializeAws_restJson1DeleteSlotTypeCommandError = function (output, conte
5241
5189
  return [4, parseBody(output.body, context)];
5242
5190
  case 1:
5243
5191
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5244
- errorCode = "UnknownError";
5245
5192
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5246
5193
  _b = errorCode;
5247
5194
  switch (_b) {
@@ -5273,10 +5220,12 @@ var deserializeAws_restJson1DeleteSlotTypeCommandError = function (output, conte
5273
5220
  case 13: throw _d.sent();
5274
5221
  case 14:
5275
5222
  parsedBody = parsedOutput.body;
5223
+ $metadata = deserializeMetadata(output);
5224
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5276
5225
  response = new __BaseException({
5277
- name: parsedBody.code || parsedBody.Code || errorCode,
5226
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5278
5227
  $fault: "client",
5279
- $metadata: deserializeMetadata(output),
5228
+ $metadata: $metadata,
5280
5229
  });
5281
5230
  throw __decorateServiceException(response, parsedBody);
5282
5231
  }
@@ -5301,7 +5250,7 @@ export var deserializeAws_restJson1DeleteUtterancesCommand = function (output, c
5301
5250
  });
5302
5251
  }); };
5303
5252
  var deserializeAws_restJson1DeleteUtterancesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5304
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
5253
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5305
5254
  var _c;
5306
5255
  return __generator(this, function (_d) {
5307
5256
  switch (_d.label) {
@@ -5311,7 +5260,6 @@ var deserializeAws_restJson1DeleteUtterancesCommandError = function (output, con
5311
5260
  return [4, parseBody(output.body, context)];
5312
5261
  case 1:
5313
5262
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5314
- errorCode = "UnknownError";
5315
5263
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5316
5264
  _b = errorCode;
5317
5265
  switch (_b) {
@@ -5331,10 +5279,12 @@ var deserializeAws_restJson1DeleteUtterancesCommandError = function (output, con
5331
5279
  case 7: throw _d.sent();
5332
5280
  case 8:
5333
5281
  parsedBody = parsedOutput.body;
5282
+ $metadata = deserializeMetadata(output);
5283
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5334
5284
  response = new __BaseException({
5335
- name: parsedBody.code || parsedBody.Code || errorCode,
5285
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5336
5286
  $fault: "client",
5337
- $metadata: deserializeMetadata(output),
5287
+ $metadata: $metadata,
5338
5288
  });
5339
5289
  throw __decorateServiceException(response, parsedBody);
5340
5290
  }
@@ -5397,7 +5347,7 @@ export var deserializeAws_restJson1DescribeBotCommand = function (output, contex
5397
5347
  });
5398
5348
  }); };
5399
5349
  var deserializeAws_restJson1DescribeBotCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5400
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
5350
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5401
5351
  var _c;
5402
5352
  return __generator(this, function (_d) {
5403
5353
  switch (_d.label) {
@@ -5407,7 +5357,6 @@ var deserializeAws_restJson1DescribeBotCommandError = function (output, context)
5407
5357
  return [4, parseBody(output.body, context)];
5408
5358
  case 1:
5409
5359
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5410
- errorCode = "UnknownError";
5411
5360
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5412
5361
  _b = errorCode;
5413
5362
  switch (_b) {
@@ -5435,10 +5384,12 @@ var deserializeAws_restJson1DescribeBotCommandError = function (output, context)
5435
5384
  case 11: throw _d.sent();
5436
5385
  case 12:
5437
5386
  parsedBody = parsedOutput.body;
5387
+ $metadata = deserializeMetadata(output);
5388
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5438
5389
  response = new __BaseException({
5439
- name: parsedBody.code || parsedBody.Code || errorCode,
5390
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5440
5391
  $fault: "client",
5441
- $metadata: deserializeMetadata(output),
5392
+ $metadata: $metadata,
5442
5393
  });
5443
5394
  throw __decorateServiceException(response, parsedBody);
5444
5395
  }
@@ -5513,7 +5464,7 @@ export var deserializeAws_restJson1DescribeBotAliasCommand = function (output, c
5513
5464
  });
5514
5465
  }); };
5515
5466
  var deserializeAws_restJson1DescribeBotAliasCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5516
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
5467
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5517
5468
  var _c;
5518
5469
  return __generator(this, function (_d) {
5519
5470
  switch (_d.label) {
@@ -5523,7 +5474,6 @@ var deserializeAws_restJson1DescribeBotAliasCommandError = function (output, con
5523
5474
  return [4, parseBody(output.body, context)];
5524
5475
  case 1:
5525
5476
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5526
- errorCode = "UnknownError";
5527
5477
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5528
5478
  _b = errorCode;
5529
5479
  switch (_b) {
@@ -5551,10 +5501,12 @@ var deserializeAws_restJson1DescribeBotAliasCommandError = function (output, con
5551
5501
  case 11: throw _d.sent();
5552
5502
  case 12:
5553
5503
  parsedBody = parsedOutput.body;
5504
+ $metadata = deserializeMetadata(output);
5505
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5554
5506
  response = new __BaseException({
5555
- name: parsedBody.code || parsedBody.Code || errorCode,
5507
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5556
5508
  $fault: "client",
5557
- $metadata: deserializeMetadata(output),
5509
+ $metadata: $metadata,
5558
5510
  });
5559
5511
  throw __decorateServiceException(response, parsedBody);
5560
5512
  }
@@ -5645,7 +5597,7 @@ export var deserializeAws_restJson1DescribeBotLocaleCommand = function (output,
5645
5597
  });
5646
5598
  }); };
5647
5599
  var deserializeAws_restJson1DescribeBotLocaleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5648
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
5600
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5649
5601
  var _c;
5650
5602
  return __generator(this, function (_d) {
5651
5603
  switch (_d.label) {
@@ -5655,7 +5607,6 @@ var deserializeAws_restJson1DescribeBotLocaleCommandError = function (output, co
5655
5607
  return [4, parseBody(output.body, context)];
5656
5608
  case 1:
5657
5609
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5658
- errorCode = "UnknownError";
5659
5610
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5660
5611
  _b = errorCode;
5661
5612
  switch (_b) {
@@ -5683,10 +5634,12 @@ var deserializeAws_restJson1DescribeBotLocaleCommandError = function (output, co
5683
5634
  case 11: throw _d.sent();
5684
5635
  case 12:
5685
5636
  parsedBody = parsedOutput.body;
5637
+ $metadata = deserializeMetadata(output);
5638
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5686
5639
  response = new __BaseException({
5687
- name: parsedBody.code || parsedBody.Code || errorCode,
5640
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5688
5641
  $fault: "client",
5689
- $metadata: deserializeMetadata(output),
5642
+ $metadata: $metadata,
5690
5643
  });
5691
5644
  throw __decorateServiceException(response, parsedBody);
5692
5645
  }
@@ -5757,7 +5710,7 @@ export var deserializeAws_restJson1DescribeBotRecommendationCommand = function (
5757
5710
  });
5758
5711
  }); };
5759
5712
  var deserializeAws_restJson1DescribeBotRecommendationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5760
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
5713
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5761
5714
  var _c;
5762
5715
  return __generator(this, function (_d) {
5763
5716
  switch (_d.label) {
@@ -5767,7 +5720,6 @@ var deserializeAws_restJson1DescribeBotRecommendationCommandError = function (ou
5767
5720
  return [4, parseBody(output.body, context)];
5768
5721
  case 1:
5769
5722
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5770
- errorCode = "UnknownError";
5771
5723
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5772
5724
  _b = errorCode;
5773
5725
  switch (_b) {
@@ -5791,10 +5743,12 @@ var deserializeAws_restJson1DescribeBotRecommendationCommandError = function (ou
5791
5743
  case 9: throw _d.sent();
5792
5744
  case 10:
5793
5745
  parsedBody = parsedOutput.body;
5746
+ $metadata = deserializeMetadata(output);
5747
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5794
5748
  response = new __BaseException({
5795
- name: parsedBody.code || parsedBody.Code || errorCode,
5749
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5796
5750
  $fault: "client",
5797
- $metadata: deserializeMetadata(output),
5751
+ $metadata: $metadata,
5798
5752
  });
5799
5753
  throw __decorateServiceException(response, parsedBody);
5800
5754
  }
@@ -5861,7 +5815,7 @@ export var deserializeAws_restJson1DescribeBotVersionCommand = function (output,
5861
5815
  });
5862
5816
  }); };
5863
5817
  var deserializeAws_restJson1DescribeBotVersionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5864
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
5818
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5865
5819
  var _c;
5866
5820
  return __generator(this, function (_d) {
5867
5821
  switch (_d.label) {
@@ -5871,7 +5825,6 @@ var deserializeAws_restJson1DescribeBotVersionCommandError = function (output, c
5871
5825
  return [4, parseBody(output.body, context)];
5872
5826
  case 1:
5873
5827
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5874
- errorCode = "UnknownError";
5875
5828
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5876
5829
  _b = errorCode;
5877
5830
  switch (_b) {
@@ -5899,10 +5852,12 @@ var deserializeAws_restJson1DescribeBotVersionCommandError = function (output, c
5899
5852
  case 11: throw _d.sent();
5900
5853
  case 12:
5901
5854
  parsedBody = parsedOutput.body;
5855
+ $metadata = deserializeMetadata(output);
5856
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5902
5857
  response = new __BaseException({
5903
- name: parsedBody.code || parsedBody.Code || errorCode,
5858
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5904
5859
  $fault: "client",
5905
- $metadata: deserializeMetadata(output),
5860
+ $metadata: $metadata,
5906
5861
  });
5907
5862
  throw __decorateServiceException(response, parsedBody);
5908
5863
  }
@@ -5953,7 +5908,7 @@ export var deserializeAws_restJson1DescribeCustomVocabularyMetadataCommand = fun
5953
5908
  });
5954
5909
  }); };
5955
5910
  var deserializeAws_restJson1DescribeCustomVocabularyMetadataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5956
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
5911
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5957
5912
  var _c;
5958
5913
  return __generator(this, function (_d) {
5959
5914
  switch (_d.label) {
@@ -5963,7 +5918,6 @@ var deserializeAws_restJson1DescribeCustomVocabularyMetadataCommandError = funct
5963
5918
  return [4, parseBody(output.body, context)];
5964
5919
  case 1:
5965
5920
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5966
- errorCode = "UnknownError";
5967
5921
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5968
5922
  _b = errorCode;
5969
5923
  switch (_b) {
@@ -5991,10 +5945,12 @@ var deserializeAws_restJson1DescribeCustomVocabularyMetadataCommandError = funct
5991
5945
  case 11: throw _d.sent();
5992
5946
  case 12:
5993
5947
  parsedBody = parsedOutput.body;
5948
+ $metadata = deserializeMetadata(output);
5949
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5994
5950
  response = new __BaseException({
5995
- name: parsedBody.code || parsedBody.Code || errorCode,
5951
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5996
5952
  $fault: "client",
5997
- $metadata: deserializeMetadata(output),
5953
+ $metadata: $metadata,
5998
5954
  });
5999
5955
  throw __decorateServiceException(response, parsedBody);
6000
5956
  }
@@ -6053,7 +6009,7 @@ export var deserializeAws_restJson1DescribeExportCommand = function (output, con
6053
6009
  });
6054
6010
  }); };
6055
6011
  var deserializeAws_restJson1DescribeExportCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6056
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
6012
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
6057
6013
  var _c;
6058
6014
  return __generator(this, function (_d) {
6059
6015
  switch (_d.label) {
@@ -6063,7 +6019,6 @@ var deserializeAws_restJson1DescribeExportCommandError = function (output, conte
6063
6019
  return [4, parseBody(output.body, context)];
6064
6020
  case 1:
6065
6021
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6066
- errorCode = "UnknownError";
6067
6022
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6068
6023
  _b = errorCode;
6069
6024
  switch (_b) {
@@ -6087,10 +6042,12 @@ var deserializeAws_restJson1DescribeExportCommandError = function (output, conte
6087
6042
  case 9: throw _d.sent();
6088
6043
  case 10:
6089
6044
  parsedBody = parsedOutput.body;
6045
+ $metadata = deserializeMetadata(output);
6046
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6090
6047
  response = new __BaseException({
6091
- name: parsedBody.code || parsedBody.Code || errorCode,
6048
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6092
6049
  $fault: "client",
6093
- $metadata: deserializeMetadata(output),
6050
+ $metadata: $metadata,
6094
6051
  });
6095
6052
  throw __decorateServiceException(response, parsedBody);
6096
6053
  }
@@ -6153,7 +6110,7 @@ export var deserializeAws_restJson1DescribeImportCommand = function (output, con
6153
6110
  });
6154
6111
  }); };
6155
6112
  var deserializeAws_restJson1DescribeImportCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6156
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
6113
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
6157
6114
  var _c;
6158
6115
  return __generator(this, function (_d) {
6159
6116
  switch (_d.label) {
@@ -6163,7 +6120,6 @@ var deserializeAws_restJson1DescribeImportCommandError = function (output, conte
6163
6120
  return [4, parseBody(output.body, context)];
6164
6121
  case 1:
6165
6122
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6166
- errorCode = "UnknownError";
6167
6123
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6168
6124
  _b = errorCode;
6169
6125
  switch (_b) {
@@ -6187,10 +6143,12 @@ var deserializeAws_restJson1DescribeImportCommandError = function (output, conte
6187
6143
  case 9: throw _d.sent();
6188
6144
  case 10:
6189
6145
  parsedBody = parsedOutput.body;
6146
+ $metadata = deserializeMetadata(output);
6147
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6190
6148
  response = new __BaseException({
6191
- name: parsedBody.code || parsedBody.Code || errorCode,
6149
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6192
6150
  $fault: "client",
6193
- $metadata: deserializeMetadata(output),
6151
+ $metadata: $metadata,
6194
6152
  });
6195
6153
  throw __decorateServiceException(response, parsedBody);
6196
6154
  }
@@ -6289,7 +6247,7 @@ export var deserializeAws_restJson1DescribeIntentCommand = function (output, con
6289
6247
  });
6290
6248
  }); };
6291
6249
  var deserializeAws_restJson1DescribeIntentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6292
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
6250
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
6293
6251
  var _c;
6294
6252
  return __generator(this, function (_d) {
6295
6253
  switch (_d.label) {
@@ -6299,7 +6257,6 @@ var deserializeAws_restJson1DescribeIntentCommandError = function (output, conte
6299
6257
  return [4, parseBody(output.body, context)];
6300
6258
  case 1:
6301
6259
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6302
- errorCode = "UnknownError";
6303
6260
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6304
6261
  _b = errorCode;
6305
6262
  switch (_b) {
@@ -6327,10 +6284,12 @@ var deserializeAws_restJson1DescribeIntentCommandError = function (output, conte
6327
6284
  case 11: throw _d.sent();
6328
6285
  case 12:
6329
6286
  parsedBody = parsedOutput.body;
6287
+ $metadata = deserializeMetadata(output);
6288
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6330
6289
  response = new __BaseException({
6331
- name: parsedBody.code || parsedBody.Code || errorCode,
6290
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6332
6291
  $fault: "client",
6333
- $metadata: deserializeMetadata(output),
6292
+ $metadata: $metadata,
6334
6293
  });
6335
6294
  throw __decorateServiceException(response, parsedBody);
6336
6295
  }
@@ -6369,7 +6328,7 @@ export var deserializeAws_restJson1DescribeResourcePolicyCommand = function (out
6369
6328
  });
6370
6329
  }); };
6371
6330
  var deserializeAws_restJson1DescribeResourcePolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6372
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
6331
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
6373
6332
  var _c;
6374
6333
  return __generator(this, function (_d) {
6375
6334
  switch (_d.label) {
@@ -6379,7 +6338,6 @@ var deserializeAws_restJson1DescribeResourcePolicyCommandError = function (outpu
6379
6338
  return [4, parseBody(output.body, context)];
6380
6339
  case 1:
6381
6340
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6382
- errorCode = "UnknownError";
6383
6341
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6384
6342
  _b = errorCode;
6385
6343
  switch (_b) {
@@ -6399,10 +6357,12 @@ var deserializeAws_restJson1DescribeResourcePolicyCommandError = function (outpu
6399
6357
  case 7: throw _d.sent();
6400
6358
  case 8:
6401
6359
  parsedBody = parsedOutput.body;
6360
+ $metadata = deserializeMetadata(output);
6361
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6402
6362
  response = new __BaseException({
6403
- name: parsedBody.code || parsedBody.Code || errorCode,
6363
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6404
6364
  $fault: "client",
6405
- $metadata: deserializeMetadata(output),
6365
+ $metadata: $metadata,
6406
6366
  });
6407
6367
  throw __decorateServiceException(response, parsedBody);
6408
6368
  }
@@ -6481,7 +6441,7 @@ export var deserializeAws_restJson1DescribeSlotCommand = function (output, conte
6481
6441
  });
6482
6442
  }); };
6483
6443
  var deserializeAws_restJson1DescribeSlotCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6484
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
6444
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
6485
6445
  var _c;
6486
6446
  return __generator(this, function (_d) {
6487
6447
  switch (_d.label) {
@@ -6491,7 +6451,6 @@ var deserializeAws_restJson1DescribeSlotCommandError = function (output, context
6491
6451
  return [4, parseBody(output.body, context)];
6492
6452
  case 1:
6493
6453
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6494
- errorCode = "UnknownError";
6495
6454
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6496
6455
  _b = errorCode;
6497
6456
  switch (_b) {
@@ -6519,10 +6478,12 @@ var deserializeAws_restJson1DescribeSlotCommandError = function (output, context
6519
6478
  case 11: throw _d.sent();
6520
6479
  case 12:
6521
6480
  parsedBody = parsedOutput.body;
6481
+ $metadata = deserializeMetadata(output);
6482
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6522
6483
  response = new __BaseException({
6523
- name: parsedBody.code || parsedBody.Code || errorCode,
6484
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6524
6485
  $fault: "client",
6525
- $metadata: deserializeMetadata(output),
6486
+ $metadata: $metadata,
6526
6487
  });
6527
6488
  throw __decorateServiceException(response, parsedBody);
6528
6489
  }
@@ -6597,7 +6558,7 @@ export var deserializeAws_restJson1DescribeSlotTypeCommand = function (output, c
6597
6558
  });
6598
6559
  }); };
6599
6560
  var deserializeAws_restJson1DescribeSlotTypeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6600
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
6561
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
6601
6562
  var _c;
6602
6563
  return __generator(this, function (_d) {
6603
6564
  switch (_d.label) {
@@ -6607,7 +6568,6 @@ var deserializeAws_restJson1DescribeSlotTypeCommandError = function (output, con
6607
6568
  return [4, parseBody(output.body, context)];
6608
6569
  case 1:
6609
6570
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6610
- errorCode = "UnknownError";
6611
6571
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6612
6572
  _b = errorCode;
6613
6573
  switch (_b) {
@@ -6635,10 +6595,12 @@ var deserializeAws_restJson1DescribeSlotTypeCommandError = function (output, con
6635
6595
  case 11: throw _d.sent();
6636
6596
  case 12:
6637
6597
  parsedBody = parsedOutput.body;
6598
+ $metadata = deserializeMetadata(output);
6599
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6638
6600
  response = new __BaseException({
6639
- name: parsedBody.code || parsedBody.Code || errorCode,
6601
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6640
6602
  $fault: "client",
6641
- $metadata: deserializeMetadata(output),
6603
+ $metadata: $metadata,
6642
6604
  });
6643
6605
  throw __decorateServiceException(response, parsedBody);
6644
6606
  }
@@ -6705,7 +6667,7 @@ export var deserializeAws_restJson1ListAggregatedUtterancesCommand = function (o
6705
6667
  });
6706
6668
  }); };
6707
6669
  var deserializeAws_restJson1ListAggregatedUtterancesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6708
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
6670
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
6709
6671
  var _c;
6710
6672
  return __generator(this, function (_d) {
6711
6673
  switch (_d.label) {
@@ -6715,7 +6677,6 @@ var deserializeAws_restJson1ListAggregatedUtterancesCommandError = function (out
6715
6677
  return [4, parseBody(output.body, context)];
6716
6678
  case 1:
6717
6679
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6718
- errorCode = "UnknownError";
6719
6680
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6720
6681
  _b = errorCode;
6721
6682
  switch (_b) {
@@ -6739,10 +6700,12 @@ var deserializeAws_restJson1ListAggregatedUtterancesCommandError = function (out
6739
6700
  case 9: throw _d.sent();
6740
6701
  case 10:
6741
6702
  parsedBody = parsedOutput.body;
6703
+ $metadata = deserializeMetadata(output);
6704
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6742
6705
  response = new __BaseException({
6743
- name: parsedBody.code || parsedBody.Code || errorCode,
6706
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6744
6707
  $fault: "client",
6745
- $metadata: deserializeMetadata(output),
6708
+ $metadata: $metadata,
6746
6709
  });
6747
6710
  throw __decorateServiceException(response, parsedBody);
6748
6711
  }
@@ -6781,7 +6744,7 @@ export var deserializeAws_restJson1ListBotAliasesCommand = function (output, con
6781
6744
  });
6782
6745
  }); };
6783
6746
  var deserializeAws_restJson1ListBotAliasesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6784
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
6747
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
6785
6748
  var _c;
6786
6749
  return __generator(this, function (_d) {
6787
6750
  switch (_d.label) {
@@ -6791,7 +6754,6 @@ var deserializeAws_restJson1ListBotAliasesCommandError = function (output, conte
6791
6754
  return [4, parseBody(output.body, context)];
6792
6755
  case 1:
6793
6756
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6794
- errorCode = "UnknownError";
6795
6757
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6796
6758
  _b = errorCode;
6797
6759
  switch (_b) {
@@ -6815,10 +6777,12 @@ var deserializeAws_restJson1ListBotAliasesCommandError = function (output, conte
6815
6777
  case 9: throw _d.sent();
6816
6778
  case 10:
6817
6779
  parsedBody = parsedOutput.body;
6780
+ $metadata = deserializeMetadata(output);
6781
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6818
6782
  response = new __BaseException({
6819
- name: parsedBody.code || parsedBody.Code || errorCode,
6783
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6820
6784
  $fault: "client",
6821
- $metadata: deserializeMetadata(output),
6785
+ $metadata: $metadata,
6822
6786
  });
6823
6787
  throw __decorateServiceException(response, parsedBody);
6824
6788
  }
@@ -6861,7 +6825,7 @@ export var deserializeAws_restJson1ListBotLocalesCommand = function (output, con
6861
6825
  });
6862
6826
  }); };
6863
6827
  var deserializeAws_restJson1ListBotLocalesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6864
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
6828
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
6865
6829
  var _c;
6866
6830
  return __generator(this, function (_d) {
6867
6831
  switch (_d.label) {
@@ -6871,7 +6835,6 @@ var deserializeAws_restJson1ListBotLocalesCommandError = function (output, conte
6871
6835
  return [4, parseBody(output.body, context)];
6872
6836
  case 1:
6873
6837
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6874
- errorCode = "UnknownError";
6875
6838
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6876
6839
  _b = errorCode;
6877
6840
  switch (_b) {
@@ -6895,10 +6858,12 @@ var deserializeAws_restJson1ListBotLocalesCommandError = function (output, conte
6895
6858
  case 9: throw _d.sent();
6896
6859
  case 10:
6897
6860
  parsedBody = parsedOutput.body;
6861
+ $metadata = deserializeMetadata(output);
6862
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6898
6863
  response = new __BaseException({
6899
- name: parsedBody.code || parsedBody.Code || errorCode,
6864
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6900
6865
  $fault: "client",
6901
- $metadata: deserializeMetadata(output),
6866
+ $metadata: $metadata,
6902
6867
  });
6903
6868
  throw __decorateServiceException(response, parsedBody);
6904
6869
  }
@@ -6945,7 +6910,7 @@ export var deserializeAws_restJson1ListBotRecommendationsCommand = function (out
6945
6910
  });
6946
6911
  }); };
6947
6912
  var deserializeAws_restJson1ListBotRecommendationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6948
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
6913
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
6949
6914
  var _c;
6950
6915
  return __generator(this, function (_d) {
6951
6916
  switch (_d.label) {
@@ -6955,7 +6920,6 @@ var deserializeAws_restJson1ListBotRecommendationsCommandError = function (outpu
6955
6920
  return [4, parseBody(output.body, context)];
6956
6921
  case 1:
6957
6922
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6958
- errorCode = "UnknownError";
6959
6923
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6960
6924
  _b = errorCode;
6961
6925
  switch (_b) {
@@ -6979,10 +6943,12 @@ var deserializeAws_restJson1ListBotRecommendationsCommandError = function (outpu
6979
6943
  case 9: throw _d.sent();
6980
6944
  case 10:
6981
6945
  parsedBody = parsedOutput.body;
6946
+ $metadata = deserializeMetadata(output);
6947
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6982
6948
  response = new __BaseException({
6983
- name: parsedBody.code || parsedBody.Code || errorCode,
6949
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6984
6950
  $fault: "client",
6985
- $metadata: deserializeMetadata(output),
6951
+ $metadata: $metadata,
6986
6952
  });
6987
6953
  throw __decorateServiceException(response, parsedBody);
6988
6954
  }
@@ -7017,7 +6983,7 @@ export var deserializeAws_restJson1ListBotsCommand = function (output, context)
7017
6983
  });
7018
6984
  }); };
7019
6985
  var deserializeAws_restJson1ListBotsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7020
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
6986
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
7021
6987
  var _c;
7022
6988
  return __generator(this, function (_d) {
7023
6989
  switch (_d.label) {
@@ -7027,7 +6993,6 @@ var deserializeAws_restJson1ListBotsCommandError = function (output, context) {
7027
6993
  return [4, parseBody(output.body, context)];
7028
6994
  case 1:
7029
6995
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
7030
- errorCode = "UnknownError";
7031
6996
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7032
6997
  _b = errorCode;
7033
6998
  switch (_b) {
@@ -7051,10 +7016,12 @@ var deserializeAws_restJson1ListBotsCommandError = function (output, context) {
7051
7016
  case 9: throw _d.sent();
7052
7017
  case 10:
7053
7018
  parsedBody = parsedOutput.body;
7019
+ $metadata = deserializeMetadata(output);
7020
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7054
7021
  response = new __BaseException({
7055
- name: parsedBody.code || parsedBody.Code || errorCode,
7022
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7056
7023
  $fault: "client",
7057
- $metadata: deserializeMetadata(output),
7024
+ $metadata: $metadata,
7058
7025
  });
7059
7026
  throw __decorateServiceException(response, parsedBody);
7060
7027
  }
@@ -7093,7 +7060,7 @@ export var deserializeAws_restJson1ListBotVersionsCommand = function (output, co
7093
7060
  });
7094
7061
  }); };
7095
7062
  var deserializeAws_restJson1ListBotVersionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7096
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
7063
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
7097
7064
  var _c;
7098
7065
  return __generator(this, function (_d) {
7099
7066
  switch (_d.label) {
@@ -7103,7 +7070,6 @@ var deserializeAws_restJson1ListBotVersionsCommandError = function (output, cont
7103
7070
  return [4, parseBody(output.body, context)];
7104
7071
  case 1:
7105
7072
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
7106
- errorCode = "UnknownError";
7107
7073
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7108
7074
  _b = errorCode;
7109
7075
  switch (_b) {
@@ -7127,10 +7093,12 @@ var deserializeAws_restJson1ListBotVersionsCommandError = function (output, cont
7127
7093
  case 9: throw _d.sent();
7128
7094
  case 10:
7129
7095
  parsedBody = parsedOutput.body;
7096
+ $metadata = deserializeMetadata(output);
7097
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7130
7098
  response = new __BaseException({
7131
- name: parsedBody.code || parsedBody.Code || errorCode,
7099
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7132
7100
  $fault: "client",
7133
- $metadata: deserializeMetadata(output),
7101
+ $metadata: $metadata,
7134
7102
  });
7135
7103
  throw __decorateServiceException(response, parsedBody);
7136
7104
  }
@@ -7169,7 +7137,7 @@ export var deserializeAws_restJson1ListBuiltInIntentsCommand = function (output,
7169
7137
  });
7170
7138
  }); };
7171
7139
  var deserializeAws_restJson1ListBuiltInIntentsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7172
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
7140
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
7173
7141
  var _c;
7174
7142
  return __generator(this, function (_d) {
7175
7143
  switch (_d.label) {
@@ -7179,7 +7147,6 @@ var deserializeAws_restJson1ListBuiltInIntentsCommandError = function (output, c
7179
7147
  return [4, parseBody(output.body, context)];
7180
7148
  case 1:
7181
7149
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
7182
- errorCode = "UnknownError";
7183
7150
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7184
7151
  _b = errorCode;
7185
7152
  switch (_b) {
@@ -7203,10 +7170,12 @@ var deserializeAws_restJson1ListBuiltInIntentsCommandError = function (output, c
7203
7170
  case 9: throw _d.sent();
7204
7171
  case 10:
7205
7172
  parsedBody = parsedOutput.body;
7173
+ $metadata = deserializeMetadata(output);
7174
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7206
7175
  response = new __BaseException({
7207
- name: parsedBody.code || parsedBody.Code || errorCode,
7176
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7208
7177
  $fault: "client",
7209
- $metadata: deserializeMetadata(output),
7178
+ $metadata: $metadata,
7210
7179
  });
7211
7180
  throw __decorateServiceException(response, parsedBody);
7212
7181
  }
@@ -7245,7 +7214,7 @@ export var deserializeAws_restJson1ListBuiltInSlotTypesCommand = function (outpu
7245
7214
  });
7246
7215
  }); };
7247
7216
  var deserializeAws_restJson1ListBuiltInSlotTypesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7248
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
7217
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
7249
7218
  var _c;
7250
7219
  return __generator(this, function (_d) {
7251
7220
  switch (_d.label) {
@@ -7255,7 +7224,6 @@ var deserializeAws_restJson1ListBuiltInSlotTypesCommandError = function (output,
7255
7224
  return [4, parseBody(output.body, context)];
7256
7225
  case 1:
7257
7226
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
7258
- errorCode = "UnknownError";
7259
7227
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7260
7228
  _b = errorCode;
7261
7229
  switch (_b) {
@@ -7279,10 +7247,12 @@ var deserializeAws_restJson1ListBuiltInSlotTypesCommandError = function (output,
7279
7247
  case 9: throw _d.sent();
7280
7248
  case 10:
7281
7249
  parsedBody = parsedOutput.body;
7250
+ $metadata = deserializeMetadata(output);
7251
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7282
7252
  response = new __BaseException({
7283
- name: parsedBody.code || parsedBody.Code || errorCode,
7253
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7284
7254
  $fault: "client",
7285
- $metadata: deserializeMetadata(output),
7255
+ $metadata: $metadata,
7286
7256
  });
7287
7257
  throw __decorateServiceException(response, parsedBody);
7288
7258
  }
@@ -7329,7 +7299,7 @@ export var deserializeAws_restJson1ListExportsCommand = function (output, contex
7329
7299
  });
7330
7300
  }); };
7331
7301
  var deserializeAws_restJson1ListExportsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7332
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
7302
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
7333
7303
  var _c;
7334
7304
  return __generator(this, function (_d) {
7335
7305
  switch (_d.label) {
@@ -7339,7 +7309,6 @@ var deserializeAws_restJson1ListExportsCommandError = function (output, context)
7339
7309
  return [4, parseBody(output.body, context)];
7340
7310
  case 1:
7341
7311
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
7342
- errorCode = "UnknownError";
7343
7312
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7344
7313
  _b = errorCode;
7345
7314
  switch (_b) {
@@ -7359,10 +7328,12 @@ var deserializeAws_restJson1ListExportsCommandError = function (output, context)
7359
7328
  case 7: throw _d.sent();
7360
7329
  case 8:
7361
7330
  parsedBody = parsedOutput.body;
7331
+ $metadata = deserializeMetadata(output);
7332
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7362
7333
  response = new __BaseException({
7363
- name: parsedBody.code || parsedBody.Code || errorCode,
7334
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7364
7335
  $fault: "client",
7365
- $metadata: deserializeMetadata(output),
7336
+ $metadata: $metadata,
7366
7337
  });
7367
7338
  throw __decorateServiceException(response, parsedBody);
7368
7339
  }
@@ -7409,7 +7380,7 @@ export var deserializeAws_restJson1ListImportsCommand = function (output, contex
7409
7380
  });
7410
7381
  }); };
7411
7382
  var deserializeAws_restJson1ListImportsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7412
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
7383
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
7413
7384
  var _c;
7414
7385
  return __generator(this, function (_d) {
7415
7386
  switch (_d.label) {
@@ -7419,7 +7390,6 @@ var deserializeAws_restJson1ListImportsCommandError = function (output, context)
7419
7390
  return [4, parseBody(output.body, context)];
7420
7391
  case 1:
7421
7392
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
7422
- errorCode = "UnknownError";
7423
7393
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7424
7394
  _b = errorCode;
7425
7395
  switch (_b) {
@@ -7439,10 +7409,12 @@ var deserializeAws_restJson1ListImportsCommandError = function (output, context)
7439
7409
  case 7: throw _d.sent();
7440
7410
  case 8:
7441
7411
  parsedBody = parsedOutput.body;
7412
+ $metadata = deserializeMetadata(output);
7413
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7442
7414
  response = new __BaseException({
7443
- name: parsedBody.code || parsedBody.Code || errorCode,
7415
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7444
7416
  $fault: "client",
7445
- $metadata: deserializeMetadata(output),
7417
+ $metadata: $metadata,
7446
7418
  });
7447
7419
  throw __decorateServiceException(response, parsedBody);
7448
7420
  }
@@ -7489,7 +7461,7 @@ export var deserializeAws_restJson1ListIntentsCommand = function (output, contex
7489
7461
  });
7490
7462
  }); };
7491
7463
  var deserializeAws_restJson1ListIntentsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7492
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
7464
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
7493
7465
  var _c;
7494
7466
  return __generator(this, function (_d) {
7495
7467
  switch (_d.label) {
@@ -7499,7 +7471,6 @@ var deserializeAws_restJson1ListIntentsCommandError = function (output, context)
7499
7471
  return [4, parseBody(output.body, context)];
7500
7472
  case 1:
7501
7473
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
7502
- errorCode = "UnknownError";
7503
7474
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7504
7475
  _b = errorCode;
7505
7476
  switch (_b) {
@@ -7523,10 +7494,12 @@ var deserializeAws_restJson1ListIntentsCommandError = function (output, context)
7523
7494
  case 9: throw _d.sent();
7524
7495
  case 10:
7525
7496
  parsedBody = parsedOutput.body;
7497
+ $metadata = deserializeMetadata(output);
7498
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7526
7499
  response = new __BaseException({
7527
- name: parsedBody.code || parsedBody.Code || errorCode,
7500
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7528
7501
  $fault: "client",
7529
- $metadata: deserializeMetadata(output),
7502
+ $metadata: $metadata,
7530
7503
  });
7531
7504
  throw __decorateServiceException(response, parsedBody);
7532
7505
  }
@@ -7577,7 +7550,7 @@ export var deserializeAws_restJson1ListRecommendedIntentsCommand = function (out
7577
7550
  });
7578
7551
  }); };
7579
7552
  var deserializeAws_restJson1ListRecommendedIntentsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7580
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
7553
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
7581
7554
  var _c;
7582
7555
  return __generator(this, function (_d) {
7583
7556
  switch (_d.label) {
@@ -7587,7 +7560,6 @@ var deserializeAws_restJson1ListRecommendedIntentsCommandError = function (outpu
7587
7560
  return [4, parseBody(output.body, context)];
7588
7561
  case 1:
7589
7562
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
7590
- errorCode = "UnknownError";
7591
7563
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7592
7564
  _b = errorCode;
7593
7565
  switch (_b) {
@@ -7615,10 +7587,12 @@ var deserializeAws_restJson1ListRecommendedIntentsCommandError = function (outpu
7615
7587
  case 11: throw _d.sent();
7616
7588
  case 12:
7617
7589
  parsedBody = parsedOutput.body;
7590
+ $metadata = deserializeMetadata(output);
7591
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7618
7592
  response = new __BaseException({
7619
- name: parsedBody.code || parsedBody.Code || errorCode,
7593
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7620
7594
  $fault: "client",
7621
- $metadata: deserializeMetadata(output),
7595
+ $metadata: $metadata,
7622
7596
  });
7623
7597
  throw __decorateServiceException(response, parsedBody);
7624
7598
  }
@@ -7669,7 +7643,7 @@ export var deserializeAws_restJson1ListSlotsCommand = function (output, context)
7669
7643
  });
7670
7644
  }); };
7671
7645
  var deserializeAws_restJson1ListSlotsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7672
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
7646
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
7673
7647
  var _c;
7674
7648
  return __generator(this, function (_d) {
7675
7649
  switch (_d.label) {
@@ -7679,7 +7653,6 @@ var deserializeAws_restJson1ListSlotsCommandError = function (output, context) {
7679
7653
  return [4, parseBody(output.body, context)];
7680
7654
  case 1:
7681
7655
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
7682
- errorCode = "UnknownError";
7683
7656
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7684
7657
  _b = errorCode;
7685
7658
  switch (_b) {
@@ -7703,10 +7676,12 @@ var deserializeAws_restJson1ListSlotsCommandError = function (output, context) {
7703
7676
  case 9: throw _d.sent();
7704
7677
  case 10:
7705
7678
  parsedBody = parsedOutput.body;
7679
+ $metadata = deserializeMetadata(output);
7680
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7706
7681
  response = new __BaseException({
7707
- name: parsedBody.code || parsedBody.Code || errorCode,
7682
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7708
7683
  $fault: "client",
7709
- $metadata: deserializeMetadata(output),
7684
+ $metadata: $metadata,
7710
7685
  });
7711
7686
  throw __decorateServiceException(response, parsedBody);
7712
7687
  }
@@ -7753,7 +7728,7 @@ export var deserializeAws_restJson1ListSlotTypesCommand = function (output, cont
7753
7728
  });
7754
7729
  }); };
7755
7730
  var deserializeAws_restJson1ListSlotTypesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7756
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
7731
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
7757
7732
  var _c;
7758
7733
  return __generator(this, function (_d) {
7759
7734
  switch (_d.label) {
@@ -7763,7 +7738,6 @@ var deserializeAws_restJson1ListSlotTypesCommandError = function (output, contex
7763
7738
  return [4, parseBody(output.body, context)];
7764
7739
  case 1:
7765
7740
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
7766
- errorCode = "UnknownError";
7767
7741
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7768
7742
  _b = errorCode;
7769
7743
  switch (_b) {
@@ -7787,10 +7761,12 @@ var deserializeAws_restJson1ListSlotTypesCommandError = function (output, contex
7787
7761
  case 9: throw _d.sent();
7788
7762
  case 10:
7789
7763
  parsedBody = parsedOutput.body;
7764
+ $metadata = deserializeMetadata(output);
7765
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7790
7766
  response = new __BaseException({
7791
- name: parsedBody.code || parsedBody.Code || errorCode,
7767
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7792
7768
  $fault: "client",
7793
- $metadata: deserializeMetadata(output),
7769
+ $metadata: $metadata,
7794
7770
  });
7795
7771
  throw __decorateServiceException(response, parsedBody);
7796
7772
  }
@@ -7821,7 +7797,7 @@ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output
7821
7797
  });
7822
7798
  }); };
7823
7799
  var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7824
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
7800
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
7825
7801
  var _c;
7826
7802
  return __generator(this, function (_d) {
7827
7803
  switch (_d.label) {
@@ -7831,7 +7807,6 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
7831
7807
  return [4, parseBody(output.body, context)];
7832
7808
  case 1:
7833
7809
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
7834
- errorCode = "UnknownError";
7835
7810
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7836
7811
  _b = errorCode;
7837
7812
  switch (_b) {
@@ -7855,10 +7830,12 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
7855
7830
  case 9: throw _d.sent();
7856
7831
  case 10:
7857
7832
  parsedBody = parsedOutput.body;
7833
+ $metadata = deserializeMetadata(output);
7834
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7858
7835
  response = new __BaseException({
7859
- name: parsedBody.code || parsedBody.Code || errorCode,
7836
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7860
7837
  $fault: "client",
7861
- $metadata: deserializeMetadata(output),
7838
+ $metadata: $metadata,
7862
7839
  });
7863
7840
  throw __decorateServiceException(response, parsedBody);
7864
7841
  }
@@ -7913,7 +7890,7 @@ export var deserializeAws_restJson1SearchAssociatedTranscriptsCommand = function
7913
7890
  });
7914
7891
  }); };
7915
7892
  var deserializeAws_restJson1SearchAssociatedTranscriptsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7916
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
7893
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
7917
7894
  var _c;
7918
7895
  return __generator(this, function (_d) {
7919
7896
  switch (_d.label) {
@@ -7923,7 +7900,6 @@ var deserializeAws_restJson1SearchAssociatedTranscriptsCommandError = function (
7923
7900
  return [4, parseBody(output.body, context)];
7924
7901
  case 1:
7925
7902
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
7926
- errorCode = "UnknownError";
7927
7903
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7928
7904
  _b = errorCode;
7929
7905
  switch (_b) {
@@ -7951,10 +7927,12 @@ var deserializeAws_restJson1SearchAssociatedTranscriptsCommandError = function (
7951
7927
  case 11: throw _d.sent();
7952
7928
  case 12:
7953
7929
  parsedBody = parsedOutput.body;
7930
+ $metadata = deserializeMetadata(output);
7931
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7954
7932
  response = new __BaseException({
7955
- name: parsedBody.code || parsedBody.Code || errorCode,
7933
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7956
7934
  $fault: "client",
7957
- $metadata: deserializeMetadata(output),
7935
+ $metadata: $metadata,
7958
7936
  });
7959
7937
  throw __decorateServiceException(response, parsedBody);
7960
7938
  }
@@ -8013,7 +7991,7 @@ export var deserializeAws_restJson1StartBotRecommendationCommand = function (out
8013
7991
  });
8014
7992
  }); };
8015
7993
  var deserializeAws_restJson1StartBotRecommendationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8016
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
7994
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
8017
7995
  var _c;
8018
7996
  return __generator(this, function (_d) {
8019
7997
  switch (_d.label) {
@@ -8023,7 +8001,6 @@ var deserializeAws_restJson1StartBotRecommendationCommandError = function (outpu
8023
8001
  return [4, parseBody(output.body, context)];
8024
8002
  case 1:
8025
8003
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
8026
- errorCode = "UnknownError";
8027
8004
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8028
8005
  _b = errorCode;
8029
8006
  switch (_b) {
@@ -8059,10 +8036,12 @@ var deserializeAws_restJson1StartBotRecommendationCommandError = function (outpu
8059
8036
  case 15: throw _d.sent();
8060
8037
  case 16:
8061
8038
  parsedBody = parsedOutput.body;
8039
+ $metadata = deserializeMetadata(output);
8040
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8062
8041
  response = new __BaseException({
8063
- name: parsedBody.code || parsedBody.Code || errorCode,
8042
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8064
8043
  $fault: "client",
8065
- $metadata: deserializeMetadata(output),
8044
+ $metadata: $metadata,
8066
8045
  });
8067
8046
  throw __decorateServiceException(response, parsedBody);
8068
8047
  }
@@ -8109,7 +8088,7 @@ export var deserializeAws_restJson1StartImportCommand = function (output, contex
8109
8088
  });
8110
8089
  }); };
8111
8090
  var deserializeAws_restJson1StartImportCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8112
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
8091
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
8113
8092
  var _c;
8114
8093
  return __generator(this, function (_d) {
8115
8094
  switch (_d.label) {
@@ -8119,7 +8098,6 @@ var deserializeAws_restJson1StartImportCommandError = function (output, context)
8119
8098
  return [4, parseBody(output.body, context)];
8120
8099
  case 1:
8121
8100
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
8122
- errorCode = "UnknownError";
8123
8101
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8124
8102
  _b = errorCode;
8125
8103
  switch (_b) {
@@ -8151,10 +8129,12 @@ var deserializeAws_restJson1StartImportCommandError = function (output, context)
8151
8129
  case 13: throw _d.sent();
8152
8130
  case 14:
8153
8131
  parsedBody = parsedOutput.body;
8132
+ $metadata = deserializeMetadata(output);
8133
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8154
8134
  response = new __BaseException({
8155
- name: parsedBody.code || parsedBody.Code || errorCode,
8135
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8156
8136
  $fault: "client",
8157
- $metadata: deserializeMetadata(output),
8137
+ $metadata: $metadata,
8158
8138
  });
8159
8139
  throw __decorateServiceException(response, parsedBody);
8160
8140
  }
@@ -8179,7 +8159,7 @@ export var deserializeAws_restJson1TagResourceCommand = function (output, contex
8179
8159
  });
8180
8160
  }); };
8181
8161
  var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8182
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
8162
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
8183
8163
  var _c;
8184
8164
  return __generator(this, function (_d) {
8185
8165
  switch (_d.label) {
@@ -8189,7 +8169,6 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
8189
8169
  return [4, parseBody(output.body, context)];
8190
8170
  case 1:
8191
8171
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
8192
- errorCode = "UnknownError";
8193
8172
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8194
8173
  _b = errorCode;
8195
8174
  switch (_b) {
@@ -8213,10 +8192,12 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
8213
8192
  case 9: throw _d.sent();
8214
8193
  case 10:
8215
8194
  parsedBody = parsedOutput.body;
8195
+ $metadata = deserializeMetadata(output);
8196
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8216
8197
  response = new __BaseException({
8217
- name: parsedBody.code || parsedBody.Code || errorCode,
8198
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8218
8199
  $fault: "client",
8219
- $metadata: deserializeMetadata(output),
8200
+ $metadata: $metadata,
8220
8201
  });
8221
8202
  throw __decorateServiceException(response, parsedBody);
8222
8203
  }
@@ -8241,7 +8222,7 @@ export var deserializeAws_restJson1UntagResourceCommand = function (output, cont
8241
8222
  });
8242
8223
  }); };
8243
8224
  var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8244
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
8225
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
8245
8226
  var _c;
8246
8227
  return __generator(this, function (_d) {
8247
8228
  switch (_d.label) {
@@ -8251,7 +8232,6 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
8251
8232
  return [4, parseBody(output.body, context)];
8252
8233
  case 1:
8253
8234
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
8254
- errorCode = "UnknownError";
8255
8235
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8256
8236
  _b = errorCode;
8257
8237
  switch (_b) {
@@ -8275,10 +8255,12 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
8275
8255
  case 9: throw _d.sent();
8276
8256
  case 10:
8277
8257
  parsedBody = parsedOutput.body;
8258
+ $metadata = deserializeMetadata(output);
8259
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8278
8260
  response = new __BaseException({
8279
- name: parsedBody.code || parsedBody.Code || errorCode,
8261
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8280
8262
  $fault: "client",
8281
- $metadata: deserializeMetadata(output),
8263
+ $metadata: $metadata,
8282
8264
  });
8283
8265
  throw __decorateServiceException(response, parsedBody);
8284
8266
  }
@@ -8341,7 +8323,7 @@ export var deserializeAws_restJson1UpdateBotCommand = function (output, context)
8341
8323
  });
8342
8324
  }); };
8343
8325
  var deserializeAws_restJson1UpdateBotCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8344
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
8326
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
8345
8327
  var _c;
8346
8328
  return __generator(this, function (_d) {
8347
8329
  switch (_d.label) {
@@ -8351,7 +8333,6 @@ var deserializeAws_restJson1UpdateBotCommandError = function (output, context) {
8351
8333
  return [4, parseBody(output.body, context)];
8352
8334
  case 1:
8353
8335
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
8354
- errorCode = "UnknownError";
8355
8336
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8356
8337
  _b = errorCode;
8357
8338
  switch (_b) {
@@ -8383,10 +8364,12 @@ var deserializeAws_restJson1UpdateBotCommandError = function (output, context) {
8383
8364
  case 13: throw _d.sent();
8384
8365
  case 14:
8385
8366
  parsedBody = parsedOutput.body;
8367
+ $metadata = deserializeMetadata(output);
8368
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8386
8369
  response = new __BaseException({
8387
- name: parsedBody.code || parsedBody.Code || errorCode,
8370
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8388
8371
  $fault: "client",
8389
- $metadata: deserializeMetadata(output),
8372
+ $metadata: $metadata,
8390
8373
  });
8391
8374
  throw __decorateServiceException(response, parsedBody);
8392
8375
  }
@@ -8457,7 +8440,7 @@ export var deserializeAws_restJson1UpdateBotAliasCommand = function (output, con
8457
8440
  });
8458
8441
  }); };
8459
8442
  var deserializeAws_restJson1UpdateBotAliasCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8460
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
8443
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
8461
8444
  var _c;
8462
8445
  return __generator(this, function (_d) {
8463
8446
  switch (_d.label) {
@@ -8467,7 +8450,6 @@ var deserializeAws_restJson1UpdateBotAliasCommandError = function (output, conte
8467
8450
  return [4, parseBody(output.body, context)];
8468
8451
  case 1:
8469
8452
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
8470
- errorCode = "UnknownError";
8471
8453
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8472
8454
  _b = errorCode;
8473
8455
  switch (_b) {
@@ -8499,10 +8481,12 @@ var deserializeAws_restJson1UpdateBotAliasCommandError = function (output, conte
8499
8481
  case 13: throw _d.sent();
8500
8482
  case 14:
8501
8483
  parsedBody = parsedOutput.body;
8484
+ $metadata = deserializeMetadata(output);
8485
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8502
8486
  response = new __BaseException({
8503
- name: parsedBody.code || parsedBody.Code || errorCode,
8487
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8504
8488
  $fault: "client",
8505
- $metadata: deserializeMetadata(output),
8489
+ $metadata: $metadata,
8506
8490
  });
8507
8491
  throw __decorateServiceException(response, parsedBody);
8508
8492
  }
@@ -8577,7 +8561,7 @@ export var deserializeAws_restJson1UpdateBotLocaleCommand = function (output, co
8577
8561
  });
8578
8562
  }); };
8579
8563
  var deserializeAws_restJson1UpdateBotLocaleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8580
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
8564
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
8581
8565
  var _c;
8582
8566
  return __generator(this, function (_d) {
8583
8567
  switch (_d.label) {
@@ -8587,7 +8571,6 @@ var deserializeAws_restJson1UpdateBotLocaleCommandError = function (output, cont
8587
8571
  return [4, parseBody(output.body, context)];
8588
8572
  case 1:
8589
8573
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
8590
- errorCode = "UnknownError";
8591
8574
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8592
8575
  _b = errorCode;
8593
8576
  switch (_b) {
@@ -8619,10 +8602,12 @@ var deserializeAws_restJson1UpdateBotLocaleCommandError = function (output, cont
8619
8602
  case 13: throw _d.sent();
8620
8603
  case 14:
8621
8604
  parsedBody = parsedOutput.body;
8605
+ $metadata = deserializeMetadata(output);
8606
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8622
8607
  response = new __BaseException({
8623
- name: parsedBody.code || parsedBody.Code || errorCode,
8608
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8624
8609
  $fault: "client",
8625
- $metadata: deserializeMetadata(output),
8610
+ $metadata: $metadata,
8626
8611
  });
8627
8612
  throw __decorateServiceException(response, parsedBody);
8628
8613
  }
@@ -8685,7 +8670,7 @@ export var deserializeAws_restJson1UpdateBotRecommendationCommand = function (ou
8685
8670
  });
8686
8671
  }); };
8687
8672
  var deserializeAws_restJson1UpdateBotRecommendationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8688
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
8673
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
8689
8674
  var _c;
8690
8675
  return __generator(this, function (_d) {
8691
8676
  switch (_d.label) {
@@ -8695,7 +8680,6 @@ var deserializeAws_restJson1UpdateBotRecommendationCommandError = function (outp
8695
8680
  return [4, parseBody(output.body, context)];
8696
8681
  case 1:
8697
8682
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
8698
- errorCode = "UnknownError";
8699
8683
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8700
8684
  _b = errorCode;
8701
8685
  switch (_b) {
@@ -8731,10 +8715,12 @@ var deserializeAws_restJson1UpdateBotRecommendationCommandError = function (outp
8731
8715
  case 15: throw _d.sent();
8732
8716
  case 16:
8733
8717
  parsedBody = parsedOutput.body;
8718
+ $metadata = deserializeMetadata(output);
8719
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8734
8720
  response = new __BaseException({
8735
- name: parsedBody.code || parsedBody.Code || errorCode,
8721
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8736
8722
  $fault: "client",
8737
- $metadata: deserializeMetadata(output),
8723
+ $metadata: $metadata,
8738
8724
  });
8739
8725
  throw __decorateServiceException(response, parsedBody);
8740
8726
  }
@@ -8785,7 +8771,7 @@ export var deserializeAws_restJson1UpdateExportCommand = function (output, conte
8785
8771
  });
8786
8772
  }); };
8787
8773
  var deserializeAws_restJson1UpdateExportCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8788
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
8774
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
8789
8775
  var _c;
8790
8776
  return __generator(this, function (_d) {
8791
8777
  switch (_d.label) {
@@ -8795,7 +8781,6 @@ var deserializeAws_restJson1UpdateExportCommandError = function (output, context
8795
8781
  return [4, parseBody(output.body, context)];
8796
8782
  case 1:
8797
8783
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
8798
- errorCode = "UnknownError";
8799
8784
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8800
8785
  _b = errorCode;
8801
8786
  switch (_b) {
@@ -8827,10 +8812,12 @@ var deserializeAws_restJson1UpdateExportCommandError = function (output, context
8827
8812
  case 13: throw _d.sent();
8828
8813
  case 14:
8829
8814
  parsedBody = parsedOutput.body;
8815
+ $metadata = deserializeMetadata(output);
8816
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8830
8817
  response = new __BaseException({
8831
- name: parsedBody.code || parsedBody.Code || errorCode,
8818
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8832
8819
  $fault: "client",
8833
- $metadata: deserializeMetadata(output),
8820
+ $metadata: $metadata,
8834
8821
  });
8835
8822
  throw __decorateServiceException(response, parsedBody);
8836
8823
  }
@@ -8929,7 +8916,7 @@ export var deserializeAws_restJson1UpdateIntentCommand = function (output, conte
8929
8916
  });
8930
8917
  }); };
8931
8918
  var deserializeAws_restJson1UpdateIntentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8932
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
8919
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
8933
8920
  var _c;
8934
8921
  return __generator(this, function (_d) {
8935
8922
  switch (_d.label) {
@@ -8939,7 +8926,6 @@ var deserializeAws_restJson1UpdateIntentCommandError = function (output, context
8939
8926
  return [4, parseBody(output.body, context)];
8940
8927
  case 1:
8941
8928
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
8942
- errorCode = "UnknownError";
8943
8929
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8944
8930
  _b = errorCode;
8945
8931
  switch (_b) {
@@ -8971,10 +8957,12 @@ var deserializeAws_restJson1UpdateIntentCommandError = function (output, context
8971
8957
  case 13: throw _d.sent();
8972
8958
  case 14:
8973
8959
  parsedBody = parsedOutput.body;
8960
+ $metadata = deserializeMetadata(output);
8961
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8974
8962
  response = new __BaseException({
8975
- name: parsedBody.code || parsedBody.Code || errorCode,
8963
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8976
8964
  $fault: "client",
8977
- $metadata: deserializeMetadata(output),
8965
+ $metadata: $metadata,
8978
8966
  });
8979
8967
  throw __decorateServiceException(response, parsedBody);
8980
8968
  }
@@ -9009,7 +8997,7 @@ export var deserializeAws_restJson1UpdateResourcePolicyCommand = function (outpu
9009
8997
  });
9010
8998
  }); };
9011
8999
  var deserializeAws_restJson1UpdateResourcePolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
9012
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
9000
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
9013
9001
  var _c;
9014
9002
  return __generator(this, function (_d) {
9015
9003
  switch (_d.label) {
@@ -9019,7 +9007,6 @@ var deserializeAws_restJson1UpdateResourcePolicyCommandError = function (output,
9019
9007
  return [4, parseBody(output.body, context)];
9020
9008
  case 1:
9021
9009
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
9022
- errorCode = "UnknownError";
9023
9010
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9024
9011
  _b = errorCode;
9025
9012
  switch (_b) {
@@ -9051,10 +9038,12 @@ var deserializeAws_restJson1UpdateResourcePolicyCommandError = function (output,
9051
9038
  case 13: throw _d.sent();
9052
9039
  case 14:
9053
9040
  parsedBody = parsedOutput.body;
9041
+ $metadata = deserializeMetadata(output);
9042
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
9054
9043
  response = new __BaseException({
9055
- name: parsedBody.code || parsedBody.Code || errorCode,
9044
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
9056
9045
  $fault: "client",
9057
- $metadata: deserializeMetadata(output),
9046
+ $metadata: $metadata,
9058
9047
  });
9059
9048
  throw __decorateServiceException(response, parsedBody);
9060
9049
  }
@@ -9133,7 +9122,7 @@ export var deserializeAws_restJson1UpdateSlotCommand = function (output, context
9133
9122
  });
9134
9123
  }); };
9135
9124
  var deserializeAws_restJson1UpdateSlotCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
9136
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
9125
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
9137
9126
  var _c;
9138
9127
  return __generator(this, function (_d) {
9139
9128
  switch (_d.label) {
@@ -9143,7 +9132,6 @@ var deserializeAws_restJson1UpdateSlotCommandError = function (output, context)
9143
9132
  return [4, parseBody(output.body, context)];
9144
9133
  case 1:
9145
9134
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
9146
- errorCode = "UnknownError";
9147
9135
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9148
9136
  _b = errorCode;
9149
9137
  switch (_b) {
@@ -9175,10 +9163,12 @@ var deserializeAws_restJson1UpdateSlotCommandError = function (output, context)
9175
9163
  case 13: throw _d.sent();
9176
9164
  case 14:
9177
9165
  parsedBody = parsedOutput.body;
9166
+ $metadata = deserializeMetadata(output);
9167
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
9178
9168
  response = new __BaseException({
9179
- name: parsedBody.code || parsedBody.Code || errorCode,
9169
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
9180
9170
  $fault: "client",
9181
- $metadata: deserializeMetadata(output),
9171
+ $metadata: $metadata,
9182
9172
  });
9183
9173
  throw __decorateServiceException(response, parsedBody);
9184
9174
  }
@@ -9253,7 +9243,7 @@ export var deserializeAws_restJson1UpdateSlotTypeCommand = function (output, con
9253
9243
  });
9254
9244
  }); };
9255
9245
  var deserializeAws_restJson1UpdateSlotTypeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
9256
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
9246
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
9257
9247
  var _c;
9258
9248
  return __generator(this, function (_d) {
9259
9249
  switch (_d.label) {
@@ -9263,7 +9253,6 @@ var deserializeAws_restJson1UpdateSlotTypeCommandError = function (output, conte
9263
9253
  return [4, parseBody(output.body, context)];
9264
9254
  case 1:
9265
9255
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
9266
- errorCode = "UnknownError";
9267
9256
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9268
9257
  _b = errorCode;
9269
9258
  switch (_b) {
@@ -9295,10 +9284,12 @@ var deserializeAws_restJson1UpdateSlotTypeCommandError = function (output, conte
9295
9284
  case 13: throw _d.sent();
9296
9285
  case 14:
9297
9286
  parsedBody = parsedOutput.body;
9287
+ $metadata = deserializeMetadata(output);
9288
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
9298
9289
  response = new __BaseException({
9299
- name: parsedBody.code || parsedBody.Code || errorCode,
9290
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
9300
9291
  $fault: "client",
9301
- $metadata: deserializeMetadata(output),
9292
+ $metadata: $metadata,
9302
9293
  });
9303
9294
  throw __decorateServiceException(response, parsedBody);
9304
9295
  }
@@ -9392,12 +9383,10 @@ var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput
9392
9383
  });
9393
9384
  }); };
9394
9385
  var serializeAws_restJson1AdvancedRecognitionSetting = function (input, context) {
9395
- return __assign({}, (input.audioRecognitionStrategy !== undefined &&
9396
- input.audioRecognitionStrategy !== null && { audioRecognitionStrategy: input.audioRecognitionStrategy }));
9386
+ return __assign({}, (input.audioRecognitionStrategy != null && { audioRecognitionStrategy: input.audioRecognitionStrategy }));
9397
9387
  };
9398
9388
  var serializeAws_restJson1AggregatedUtterancesFilter = function (input, context) {
9399
- return __assign(__assign(__assign({}, (input.name !== undefined && input.name !== null && { name: input.name })), (input.operator !== undefined && input.operator !== null && { operator: input.operator })), (input.values !== undefined &&
9400
- input.values !== null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
9389
+ return __assign(__assign(__assign({}, (input.name != null && { name: input.name })), (input.operator != null && { operator: input.operator })), (input.values != null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
9401
9390
  };
9402
9391
  var serializeAws_restJson1AggregatedUtterancesFilters = function (input, context) {
9403
9392
  return input
@@ -9410,11 +9399,10 @@ var serializeAws_restJson1AggregatedUtterancesFilters = function (input, context
9410
9399
  });
9411
9400
  };
9412
9401
  var serializeAws_restJson1AggregatedUtterancesSortBy = function (input, context) {
9413
- return __assign(__assign({}, (input.attribute !== undefined && input.attribute !== null && { attribute: input.attribute })), (input.order !== undefined && input.order !== null && { order: input.order }));
9402
+ return __assign(__assign({}, (input.attribute != null && { attribute: input.attribute })), (input.order != null && { order: input.order }));
9414
9403
  };
9415
9404
  var serializeAws_restJson1AssociatedTranscriptFilter = function (input, context) {
9416
- return __assign(__assign({}, (input.name !== undefined && input.name !== null && { name: input.name })), (input.values !== undefined &&
9417
- input.values !== null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
9405
+ return __assign(__assign({}, (input.name != null && { name: input.name })), (input.values != null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
9418
9406
  };
9419
9407
  var serializeAws_restJson1AssociatedTranscriptFilters = function (input, context) {
9420
9408
  return input
@@ -9427,14 +9415,12 @@ var serializeAws_restJson1AssociatedTranscriptFilters = function (input, context
9427
9415
  });
9428
9416
  };
9429
9417
  var serializeAws_restJson1AudioLogDestination = function (input, context) {
9430
- return __assign({}, (input.s3Bucket !== undefined &&
9431
- input.s3Bucket !== null && { s3Bucket: serializeAws_restJson1S3BucketLogDestination(input.s3Bucket, context) }));
9418
+ return __assign({}, (input.s3Bucket != null && { s3Bucket: serializeAws_restJson1S3BucketLogDestination(input.s3Bucket, context) }));
9432
9419
  };
9433
9420
  var serializeAws_restJson1AudioLogSetting = function (input, context) {
9434
- return __assign(__assign({}, (input.destination !== undefined &&
9435
- input.destination !== null && {
9421
+ return __assign(__assign({}, (input.destination != null && {
9436
9422
  destination: serializeAws_restJson1AudioLogDestination(input.destination, context),
9437
- })), (input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled }));
9423
+ })), (input.enabled != null && { enabled: input.enabled }));
9438
9424
  };
9439
9425
  var serializeAws_restJson1AudioLogSettingsList = function (input, context) {
9440
9426
  return input
@@ -9447,10 +9433,9 @@ var serializeAws_restJson1AudioLogSettingsList = function (input, context) {
9447
9433
  });
9448
9434
  };
9449
9435
  var serializeAws_restJson1BotAliasLocaleSettings = function (input, context) {
9450
- return __assign(__assign({}, (input.codeHookSpecification !== undefined &&
9451
- input.codeHookSpecification !== null && {
9436
+ return __assign(__assign({}, (input.codeHookSpecification != null && {
9452
9437
  codeHookSpecification: serializeAws_restJson1CodeHookSpecification(input.codeHookSpecification, context),
9453
- })), (input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled }));
9438
+ })), (input.enabled != null && { enabled: input.enabled }));
9454
9439
  };
9455
9440
  var serializeAws_restJson1BotAliasLocaleSettingsMap = function (input, context) {
9456
9441
  return Object.entries(input).reduce(function (acc, _a) {
@@ -9463,11 +9448,10 @@ var serializeAws_restJson1BotAliasLocaleSettingsMap = function (input, context)
9463
9448
  }, {});
9464
9449
  };
9465
9450
  var serializeAws_restJson1BotExportSpecification = function (input, context) {
9466
- return __assign(__assign({}, (input.botId !== undefined && input.botId !== null && { botId: input.botId })), (input.botVersion !== undefined && input.botVersion !== null && { botVersion: input.botVersion }));
9451
+ return __assign(__assign({}, (input.botId != null && { botId: input.botId })), (input.botVersion != null && { botVersion: input.botVersion }));
9467
9452
  };
9468
9453
  var serializeAws_restJson1BotFilter = function (input, context) {
9469
- return __assign(__assign(__assign({}, (input.name !== undefined && input.name !== null && { name: input.name })), (input.operator !== undefined && input.operator !== null && { operator: input.operator })), (input.values !== undefined &&
9470
- input.values !== null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
9454
+ return __assign(__assign(__assign({}, (input.name != null && { name: input.name })), (input.operator != null && { operator: input.operator })), (input.values != null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
9471
9455
  };
9472
9456
  var serializeAws_restJson1BotFilters = function (input, context) {
9473
9457
  return input
@@ -9480,20 +9464,15 @@ var serializeAws_restJson1BotFilters = function (input, context) {
9480
9464
  });
9481
9465
  };
9482
9466
  var serializeAws_restJson1BotImportSpecification = function (input, context) {
9483
- return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.botName !== undefined && input.botName !== null && { botName: input.botName })), (input.botTags !== undefined &&
9484
- input.botTags !== null && { botTags: serializeAws_restJson1TagMap(input.botTags, context) })), (input.dataPrivacy !== undefined &&
9485
- input.dataPrivacy !== null && { dataPrivacy: serializeAws_restJson1DataPrivacy(input.dataPrivacy, context) })), (input.idleSessionTTLInSeconds !== undefined &&
9486
- input.idleSessionTTLInSeconds !== null && { idleSessionTTLInSeconds: input.idleSessionTTLInSeconds })), (input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn })), (input.testBotAliasTags !== undefined &&
9487
- input.testBotAliasTags !== null && {
9467
+ return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.botName != null && { botName: input.botName })), (input.botTags != null && { botTags: serializeAws_restJson1TagMap(input.botTags, context) })), (input.dataPrivacy != null && { dataPrivacy: serializeAws_restJson1DataPrivacy(input.dataPrivacy, context) })), (input.idleSessionTTLInSeconds != null && { idleSessionTTLInSeconds: input.idleSessionTTLInSeconds })), (input.roleArn != null && { roleArn: input.roleArn })), (input.testBotAliasTags != null && {
9488
9468
  testBotAliasTags: serializeAws_restJson1TagMap(input.testBotAliasTags, context),
9489
9469
  }));
9490
9470
  };
9491
9471
  var serializeAws_restJson1BotLocaleExportSpecification = function (input, context) {
9492
- return __assign(__assign(__assign({}, (input.botId !== undefined && input.botId !== null && { botId: input.botId })), (input.botVersion !== undefined && input.botVersion !== null && { botVersion: input.botVersion })), (input.localeId !== undefined && input.localeId !== null && { localeId: input.localeId }));
9472
+ return __assign(__assign(__assign({}, (input.botId != null && { botId: input.botId })), (input.botVersion != null && { botVersion: input.botVersion })), (input.localeId != null && { localeId: input.localeId }));
9493
9473
  };
9494
9474
  var serializeAws_restJson1BotLocaleFilter = function (input, context) {
9495
- return __assign(__assign(__assign({}, (input.name !== undefined && input.name !== null && { name: input.name })), (input.operator !== undefined && input.operator !== null && { operator: input.operator })), (input.values !== undefined &&
9496
- input.values !== null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
9475
+ return __assign(__assign(__assign({}, (input.name != null && { name: input.name })), (input.operator != null && { operator: input.operator })), (input.values != null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
9497
9476
  };
9498
9477
  var serializeAws_restJson1BotLocaleFilters = function (input, context) {
9499
9478
  return input
@@ -9506,23 +9485,20 @@ var serializeAws_restJson1BotLocaleFilters = function (input, context) {
9506
9485
  });
9507
9486
  };
9508
9487
  var serializeAws_restJson1BotLocaleImportSpecification = function (input, context) {
9509
- return __assign(__assign(__assign(__assign(__assign({}, (input.botId !== undefined && input.botId !== null && { botId: input.botId })), (input.botVersion !== undefined && input.botVersion !== null && { botVersion: input.botVersion })), (input.localeId !== undefined && input.localeId !== null && { localeId: input.localeId })), (input.nluIntentConfidenceThreshold !== undefined &&
9510
- input.nluIntentConfidenceThreshold !== null && {
9488
+ return __assign(__assign(__assign(__assign(__assign({}, (input.botId != null && { botId: input.botId })), (input.botVersion != null && { botVersion: input.botVersion })), (input.localeId != null && { localeId: input.localeId })), (input.nluIntentConfidenceThreshold != null && {
9511
9489
  nluIntentConfidenceThreshold: __serializeFloat(input.nluIntentConfidenceThreshold),
9512
- })), (input.voiceSettings !== undefined &&
9513
- input.voiceSettings !== null && {
9490
+ })), (input.voiceSettings != null && {
9514
9491
  voiceSettings: serializeAws_restJson1VoiceSettings(input.voiceSettings, context),
9515
9492
  }));
9516
9493
  };
9517
9494
  var serializeAws_restJson1BotLocaleSortBy = function (input, context) {
9518
- return __assign(__assign({}, (input.attribute !== undefined && input.attribute !== null && { attribute: input.attribute })), (input.order !== undefined && input.order !== null && { order: input.order }));
9495
+ return __assign(__assign({}, (input.attribute != null && { attribute: input.attribute })), (input.order != null && { order: input.order }));
9519
9496
  };
9520
9497
  var serializeAws_restJson1BotSortBy = function (input, context) {
9521
- return __assign(__assign({}, (input.attribute !== undefined && input.attribute !== null && { attribute: input.attribute })), (input.order !== undefined && input.order !== null && { order: input.order }));
9498
+ return __assign(__assign({}, (input.attribute != null && { attribute: input.attribute })), (input.order != null && { order: input.order }));
9522
9499
  };
9523
9500
  var serializeAws_restJson1BotVersionLocaleDetails = function (input, context) {
9524
- return __assign({}, (input.sourceBotVersion !== undefined &&
9525
- input.sourceBotVersion !== null && { sourceBotVersion: input.sourceBotVersion }));
9501
+ return __assign({}, (input.sourceBotVersion != null && { sourceBotVersion: input.sourceBotVersion }));
9526
9502
  };
9527
9503
  var serializeAws_restJson1BotVersionLocaleSpecification = function (input, context) {
9528
9504
  return Object.entries(input).reduce(function (acc, _a) {
@@ -9535,16 +9511,16 @@ var serializeAws_restJson1BotVersionLocaleSpecification = function (input, conte
9535
9511
  }, {});
9536
9512
  };
9537
9513
  var serializeAws_restJson1BotVersionSortBy = function (input, context) {
9538
- return __assign(__assign({}, (input.attribute !== undefined && input.attribute !== null && { attribute: input.attribute })), (input.order !== undefined && input.order !== null && { order: input.order }));
9514
+ return __assign(__assign({}, (input.attribute != null && { attribute: input.attribute })), (input.order != null && { order: input.order }));
9539
9515
  };
9540
9516
  var serializeAws_restJson1BuiltInIntentSortBy = function (input, context) {
9541
- return __assign(__assign({}, (input.attribute !== undefined && input.attribute !== null && { attribute: input.attribute })), (input.order !== undefined && input.order !== null && { order: input.order }));
9517
+ return __assign(__assign({}, (input.attribute != null && { attribute: input.attribute })), (input.order != null && { order: input.order }));
9542
9518
  };
9543
9519
  var serializeAws_restJson1BuiltInSlotTypeSortBy = function (input, context) {
9544
- return __assign(__assign({}, (input.attribute !== undefined && input.attribute !== null && { attribute: input.attribute })), (input.order !== undefined && input.order !== null && { order: input.order }));
9520
+ return __assign(__assign({}, (input.attribute != null && { attribute: input.attribute })), (input.order != null && { order: input.order }));
9545
9521
  };
9546
9522
  var serializeAws_restJson1Button = function (input, context) {
9547
- return __assign(__assign({}, (input.text !== undefined && input.text !== null && { text: input.text })), (input.value !== undefined && input.value !== null && { value: input.value }));
9523
+ return __assign(__assign({}, (input.text != null && { text: input.text })), (input.value != null && { value: input.value }));
9548
9524
  };
9549
9525
  var serializeAws_restJson1ButtonsList = function (input, context) {
9550
9526
  return input
@@ -9557,12 +9533,10 @@ var serializeAws_restJson1ButtonsList = function (input, context) {
9557
9533
  });
9558
9534
  };
9559
9535
  var serializeAws_restJson1CloudWatchLogGroupLogDestination = function (input, context) {
9560
- return __assign(__assign({}, (input.cloudWatchLogGroupArn !== undefined &&
9561
- input.cloudWatchLogGroupArn !== null && { cloudWatchLogGroupArn: input.cloudWatchLogGroupArn })), (input.logPrefix !== undefined && input.logPrefix !== null && { logPrefix: input.logPrefix }));
9536
+ return __assign(__assign({}, (input.cloudWatchLogGroupArn != null && { cloudWatchLogGroupArn: input.cloudWatchLogGroupArn })), (input.logPrefix != null && { logPrefix: input.logPrefix }));
9562
9537
  };
9563
9538
  var serializeAws_restJson1CodeHookSpecification = function (input, context) {
9564
- return __assign({}, (input.lambdaCodeHook !== undefined &&
9565
- input.lambdaCodeHook !== null && {
9539
+ return __assign({}, (input.lambdaCodeHook != null && {
9566
9540
  lambdaCodeHook: serializeAws_restJson1LambdaCodeHook(input.lambdaCodeHook, context),
9567
9541
  }));
9568
9542
  };
@@ -9587,44 +9561,37 @@ var serializeAws_restJson1ConditionMap = function (input, context) {
9587
9561
  }, {});
9588
9562
  };
9589
9563
  var serializeAws_restJson1ConversationLogSettings = function (input, context) {
9590
- return __assign(__assign({}, (input.audioLogSettings !== undefined &&
9591
- input.audioLogSettings !== null && {
9564
+ return __assign(__assign({}, (input.audioLogSettings != null && {
9592
9565
  audioLogSettings: serializeAws_restJson1AudioLogSettingsList(input.audioLogSettings, context),
9593
- })), (input.textLogSettings !== undefined &&
9594
- input.textLogSettings !== null && {
9566
+ })), (input.textLogSettings != null && {
9595
9567
  textLogSettings: serializeAws_restJson1TextLogSettingsList(input.textLogSettings, context),
9596
9568
  }));
9597
9569
  };
9598
9570
  var serializeAws_restJson1CustomPayload = function (input, context) {
9599
- return __assign({}, (input.value !== undefined && input.value !== null && { value: input.value }));
9571
+ return __assign({}, (input.value != null && { value: input.value }));
9600
9572
  };
9601
9573
  var serializeAws_restJson1CustomVocabularyExportSpecification = function (input, context) {
9602
- return __assign(__assign(__assign({}, (input.botId !== undefined && input.botId !== null && { botId: input.botId })), (input.botVersion !== undefined && input.botVersion !== null && { botVersion: input.botVersion })), (input.localeId !== undefined && input.localeId !== null && { localeId: input.localeId }));
9574
+ return __assign(__assign(__assign({}, (input.botId != null && { botId: input.botId })), (input.botVersion != null && { botVersion: input.botVersion })), (input.localeId != null && { localeId: input.localeId }));
9603
9575
  };
9604
9576
  var serializeAws_restJson1CustomVocabularyImportSpecification = function (input, context) {
9605
- return __assign(__assign(__assign({}, (input.botId !== undefined && input.botId !== null && { botId: input.botId })), (input.botVersion !== undefined && input.botVersion !== null && { botVersion: input.botVersion })), (input.localeId !== undefined && input.localeId !== null && { localeId: input.localeId }));
9577
+ return __assign(__assign(__assign({}, (input.botId != null && { botId: input.botId })), (input.botVersion != null && { botVersion: input.botVersion })), (input.localeId != null && { localeId: input.localeId }));
9606
9578
  };
9607
9579
  var serializeAws_restJson1DataPrivacy = function (input, context) {
9608
- return __assign({}, (input.childDirected !== undefined && input.childDirected !== null && { childDirected: input.childDirected }));
9580
+ return __assign({}, (input.childDirected != null && { childDirected: input.childDirected }));
9609
9581
  };
9610
9582
  var serializeAws_restJson1DateRangeFilter = function (input, context) {
9611
- return __assign(__assign({}, (input.endDateTime !== undefined &&
9612
- input.endDateTime !== null && { endDateTime: Math.round(input.endDateTime.getTime() / 1000) })), (input.startDateTime !== undefined &&
9613
- input.startDateTime !== null && { startDateTime: Math.round(input.startDateTime.getTime() / 1000) }));
9583
+ return __assign(__assign({}, (input.endDateTime != null && { endDateTime: Math.round(input.endDateTime.getTime() / 1000) })), (input.startDateTime != null && { startDateTime: Math.round(input.startDateTime.getTime() / 1000) }));
9614
9584
  };
9615
9585
  var serializeAws_restJson1DialogCodeHookSettings = function (input, context) {
9616
- return __assign({}, (input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled }));
9586
+ return __assign({}, (input.enabled != null && { enabled: input.enabled }));
9617
9587
  };
9618
9588
  var serializeAws_restJson1EncryptionSetting = function (input, context) {
9619
- return __assign(__assign(__assign({}, (input.associatedTranscriptsPassword !== undefined &&
9620
- input.associatedTranscriptsPassword !== null && {
9589
+ return __assign(__assign(__assign({}, (input.associatedTranscriptsPassword != null && {
9621
9590
  associatedTranscriptsPassword: input.associatedTranscriptsPassword,
9622
- })), (input.botLocaleExportPassword !== undefined &&
9623
- input.botLocaleExportPassword !== null && { botLocaleExportPassword: input.botLocaleExportPassword })), (input.kmsKeyArn !== undefined && input.kmsKeyArn !== null && { kmsKeyArn: input.kmsKeyArn }));
9591
+ })), (input.botLocaleExportPassword != null && { botLocaleExportPassword: input.botLocaleExportPassword })), (input.kmsKeyArn != null && { kmsKeyArn: input.kmsKeyArn }));
9624
9592
  };
9625
9593
  var serializeAws_restJson1ExportFilter = function (input, context) {
9626
- return __assign(__assign(__assign({}, (input.name !== undefined && input.name !== null && { name: input.name })), (input.operator !== undefined && input.operator !== null && { operator: input.operator })), (input.values !== undefined &&
9627
- input.values !== null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
9594
+ return __assign(__assign(__assign({}, (input.name != null && { name: input.name })), (input.operator != null && { operator: input.operator })), (input.values != null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
9628
9595
  };
9629
9596
  var serializeAws_restJson1ExportFilters = function (input, context) {
9630
9597
  return input
@@ -9637,23 +9604,19 @@ var serializeAws_restJson1ExportFilters = function (input, context) {
9637
9604
  });
9638
9605
  };
9639
9606
  var serializeAws_restJson1ExportResourceSpecification = function (input, context) {
9640
- return __assign(__assign(__assign({}, (input.botExportSpecification !== undefined &&
9641
- input.botExportSpecification !== null && {
9607
+ return __assign(__assign(__assign({}, (input.botExportSpecification != null && {
9642
9608
  botExportSpecification: serializeAws_restJson1BotExportSpecification(input.botExportSpecification, context),
9643
- })), (input.botLocaleExportSpecification !== undefined &&
9644
- input.botLocaleExportSpecification !== null && {
9609
+ })), (input.botLocaleExportSpecification != null && {
9645
9610
  botLocaleExportSpecification: serializeAws_restJson1BotLocaleExportSpecification(input.botLocaleExportSpecification, context),
9646
- })), (input.customVocabularyExportSpecification !== undefined &&
9647
- input.customVocabularyExportSpecification !== null && {
9611
+ })), (input.customVocabularyExportSpecification != null && {
9648
9612
  customVocabularyExportSpecification: serializeAws_restJson1CustomVocabularyExportSpecification(input.customVocabularyExportSpecification, context),
9649
9613
  }));
9650
9614
  };
9651
9615
  var serializeAws_restJson1ExportSortBy = function (input, context) {
9652
- return __assign(__assign({}, (input.attribute !== undefined && input.attribute !== null && { attribute: input.attribute })), (input.order !== undefined && input.order !== null && { order: input.order }));
9616
+ return __assign(__assign({}, (input.attribute != null && { attribute: input.attribute })), (input.order != null && { order: input.order }));
9653
9617
  };
9654
9618
  var serializeAws_restJson1ExternalSourceSetting = function (input, context) {
9655
- return __assign({}, (input.grammarSlotTypeSetting !== undefined &&
9656
- input.grammarSlotTypeSetting !== null && {
9619
+ return __assign({}, (input.grammarSlotTypeSetting != null && {
9657
9620
  grammarSlotTypeSetting: serializeAws_restJson1GrammarSlotTypeSetting(input.grammarSlotTypeSetting, context),
9658
9621
  }));
9659
9622
  };
@@ -9668,54 +9631,40 @@ var serializeAws_restJson1FilterValues = function (input, context) {
9668
9631
  });
9669
9632
  };
9670
9633
  var serializeAws_restJson1FulfillmentCodeHookSettings = function (input, context) {
9671
- return __assign(__assign(__assign({}, (input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled })), (input.fulfillmentUpdatesSpecification !== undefined &&
9672
- input.fulfillmentUpdatesSpecification !== null && {
9634
+ return __assign(__assign(__assign({}, (input.enabled != null && { enabled: input.enabled })), (input.fulfillmentUpdatesSpecification != null && {
9673
9635
  fulfillmentUpdatesSpecification: serializeAws_restJson1FulfillmentUpdatesSpecification(input.fulfillmentUpdatesSpecification, context),
9674
- })), (input.postFulfillmentStatusSpecification !== undefined &&
9675
- input.postFulfillmentStatusSpecification !== null && {
9636
+ })), (input.postFulfillmentStatusSpecification != null && {
9676
9637
  postFulfillmentStatusSpecification: serializeAws_restJson1PostFulfillmentStatusSpecification(input.postFulfillmentStatusSpecification, context),
9677
9638
  }));
9678
9639
  };
9679
9640
  var serializeAws_restJson1FulfillmentStartResponseSpecification = function (input, context) {
9680
- return __assign(__assign(__assign({}, (input.allowInterrupt !== undefined &&
9681
- input.allowInterrupt !== null && { allowInterrupt: input.allowInterrupt })), (input.delayInSeconds !== undefined &&
9682
- input.delayInSeconds !== null && { delayInSeconds: input.delayInSeconds })), (input.messageGroups !== undefined &&
9683
- input.messageGroups !== null && {
9641
+ return __assign(__assign(__assign({}, (input.allowInterrupt != null && { allowInterrupt: input.allowInterrupt })), (input.delayInSeconds != null && { delayInSeconds: input.delayInSeconds })), (input.messageGroups != null && {
9684
9642
  messageGroups: serializeAws_restJson1MessageGroupsList(input.messageGroups, context),
9685
9643
  }));
9686
9644
  };
9687
9645
  var serializeAws_restJson1FulfillmentUpdateResponseSpecification = function (input, context) {
9688
- return __assign(__assign(__assign({}, (input.allowInterrupt !== undefined &&
9689
- input.allowInterrupt !== null && { allowInterrupt: input.allowInterrupt })), (input.frequencyInSeconds !== undefined &&
9690
- input.frequencyInSeconds !== null && { frequencyInSeconds: input.frequencyInSeconds })), (input.messageGroups !== undefined &&
9691
- input.messageGroups !== null && {
9646
+ return __assign(__assign(__assign({}, (input.allowInterrupt != null && { allowInterrupt: input.allowInterrupt })), (input.frequencyInSeconds != null && { frequencyInSeconds: input.frequencyInSeconds })), (input.messageGroups != null && {
9692
9647
  messageGroups: serializeAws_restJson1MessageGroupsList(input.messageGroups, context),
9693
9648
  }));
9694
9649
  };
9695
9650
  var serializeAws_restJson1FulfillmentUpdatesSpecification = function (input, context) {
9696
- return __assign(__assign(__assign(__assign({}, (input.active !== undefined && input.active !== null && { active: input.active })), (input.startResponse !== undefined &&
9697
- input.startResponse !== null && {
9651
+ return __assign(__assign(__assign(__assign({}, (input.active != null && { active: input.active })), (input.startResponse != null && {
9698
9652
  startResponse: serializeAws_restJson1FulfillmentStartResponseSpecification(input.startResponse, context),
9699
- })), (input.timeoutInSeconds !== undefined &&
9700
- input.timeoutInSeconds !== null && { timeoutInSeconds: input.timeoutInSeconds })), (input.updateResponse !== undefined &&
9701
- input.updateResponse !== null && {
9653
+ })), (input.timeoutInSeconds != null && { timeoutInSeconds: input.timeoutInSeconds })), (input.updateResponse != null && {
9702
9654
  updateResponse: serializeAws_restJson1FulfillmentUpdateResponseSpecification(input.updateResponse, context),
9703
9655
  }));
9704
9656
  };
9705
9657
  var serializeAws_restJson1GrammarSlotTypeSetting = function (input, context) {
9706
- return __assign({}, (input.source !== undefined &&
9707
- input.source !== null && { source: serializeAws_restJson1GrammarSlotTypeSource(input.source, context) }));
9658
+ return __assign({}, (input.source != null && { source: serializeAws_restJson1GrammarSlotTypeSource(input.source, context) }));
9708
9659
  };
9709
9660
  var serializeAws_restJson1GrammarSlotTypeSource = function (input, context) {
9710
- return __assign(__assign(__assign({}, (input.kmsKeyArn !== undefined && input.kmsKeyArn !== null && { kmsKeyArn: input.kmsKeyArn })), (input.s3BucketName !== undefined && input.s3BucketName !== null && { s3BucketName: input.s3BucketName })), (input.s3ObjectKey !== undefined && input.s3ObjectKey !== null && { s3ObjectKey: input.s3ObjectKey }));
9661
+ return __assign(__assign(__assign({}, (input.kmsKeyArn != null && { kmsKeyArn: input.kmsKeyArn })), (input.s3BucketName != null && { s3BucketName: input.s3BucketName })), (input.s3ObjectKey != null && { s3ObjectKey: input.s3ObjectKey }));
9711
9662
  };
9712
9663
  var serializeAws_restJson1ImageResponseCard = function (input, context) {
9713
- return __assign(__assign(__assign(__assign({}, (input.buttons !== undefined &&
9714
- input.buttons !== null && { buttons: serializeAws_restJson1ButtonsList(input.buttons, context) })), (input.imageUrl !== undefined && input.imageUrl !== null && { imageUrl: input.imageUrl })), (input.subtitle !== undefined && input.subtitle !== null && { subtitle: input.subtitle })), (input.title !== undefined && input.title !== null && { title: input.title }));
9664
+ return __assign(__assign(__assign(__assign({}, (input.buttons != null && { buttons: serializeAws_restJson1ButtonsList(input.buttons, context) })), (input.imageUrl != null && { imageUrl: input.imageUrl })), (input.subtitle != null && { subtitle: input.subtitle })), (input.title != null && { title: input.title }));
9715
9665
  };
9716
9666
  var serializeAws_restJson1ImportFilter = function (input, context) {
9717
- return __assign(__assign(__assign({}, (input.name !== undefined && input.name !== null && { name: input.name })), (input.operator !== undefined && input.operator !== null && { operator: input.operator })), (input.values !== undefined &&
9718
- input.values !== null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
9667
+ return __assign(__assign(__assign({}, (input.name != null && { name: input.name })), (input.operator != null && { operator: input.operator })), (input.values != null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
9719
9668
  };
9720
9669
  var serializeAws_restJson1ImportFilters = function (input, context) {
9721
9670
  return input
@@ -9728,22 +9677,19 @@ var serializeAws_restJson1ImportFilters = function (input, context) {
9728
9677
  });
9729
9678
  };
9730
9679
  var serializeAws_restJson1ImportResourceSpecification = function (input, context) {
9731
- return __assign(__assign(__assign({}, (input.botImportSpecification !== undefined &&
9732
- input.botImportSpecification !== null && {
9680
+ return __assign(__assign(__assign({}, (input.botImportSpecification != null && {
9733
9681
  botImportSpecification: serializeAws_restJson1BotImportSpecification(input.botImportSpecification, context),
9734
- })), (input.botLocaleImportSpecification !== undefined &&
9735
- input.botLocaleImportSpecification !== null && {
9682
+ })), (input.botLocaleImportSpecification != null && {
9736
9683
  botLocaleImportSpecification: serializeAws_restJson1BotLocaleImportSpecification(input.botLocaleImportSpecification, context),
9737
- })), (input.customVocabularyImportSpecification !== undefined &&
9738
- input.customVocabularyImportSpecification !== null && {
9684
+ })), (input.customVocabularyImportSpecification != null && {
9739
9685
  customVocabularyImportSpecification: serializeAws_restJson1CustomVocabularyImportSpecification(input.customVocabularyImportSpecification, context),
9740
9686
  }));
9741
9687
  };
9742
9688
  var serializeAws_restJson1ImportSortBy = function (input, context) {
9743
- return __assign(__assign({}, (input.attribute !== undefined && input.attribute !== null && { attribute: input.attribute })), (input.order !== undefined && input.order !== null && { order: input.order }));
9689
+ return __assign(__assign({}, (input.attribute != null && { attribute: input.attribute })), (input.order != null && { order: input.order }));
9744
9690
  };
9745
9691
  var serializeAws_restJson1InputContext = function (input, context) {
9746
- return __assign({}, (input.name !== undefined && input.name !== null && { name: input.name }));
9692
+ return __assign({}, (input.name != null && { name: input.name }));
9747
9693
  };
9748
9694
  var serializeAws_restJson1InputContextsList = function (input, context) {
9749
9695
  return input
@@ -9756,23 +9702,19 @@ var serializeAws_restJson1InputContextsList = function (input, context) {
9756
9702
  });
9757
9703
  };
9758
9704
  var serializeAws_restJson1IntentClosingSetting = function (input, context) {
9759
- return __assign(__assign({}, (input.active !== undefined && input.active !== null && { active: input.active })), (input.closingResponse !== undefined &&
9760
- input.closingResponse !== null && {
9705
+ return __assign(__assign({}, (input.active != null && { active: input.active })), (input.closingResponse != null && {
9761
9706
  closingResponse: serializeAws_restJson1ResponseSpecification(input.closingResponse, context),
9762
9707
  }));
9763
9708
  };
9764
9709
  var serializeAws_restJson1IntentConfirmationSetting = function (input, context) {
9765
- return __assign(__assign(__assign({}, (input.active !== undefined && input.active !== null && { active: input.active })), (input.declinationResponse !== undefined &&
9766
- input.declinationResponse !== null && {
9710
+ return __assign(__assign(__assign({}, (input.active != null && { active: input.active })), (input.declinationResponse != null && {
9767
9711
  declinationResponse: serializeAws_restJson1ResponseSpecification(input.declinationResponse, context),
9768
- })), (input.promptSpecification !== undefined &&
9769
- input.promptSpecification !== null && {
9712
+ })), (input.promptSpecification != null && {
9770
9713
  promptSpecification: serializeAws_restJson1PromptSpecification(input.promptSpecification, context),
9771
9714
  }));
9772
9715
  };
9773
9716
  var serializeAws_restJson1IntentFilter = function (input, context) {
9774
- return __assign(__assign(__assign({}, (input.name !== undefined && input.name !== null && { name: input.name })), (input.operator !== undefined && input.operator !== null && { operator: input.operator })), (input.values !== undefined &&
9775
- input.values !== null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
9717
+ return __assign(__assign(__assign({}, (input.name != null && { name: input.name })), (input.operator != null && { operator: input.operator })), (input.values != null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
9776
9718
  };
9777
9719
  var serializeAws_restJson1IntentFilters = function (input, context) {
9778
9720
  return input
@@ -9785,40 +9727,30 @@ var serializeAws_restJson1IntentFilters = function (input, context) {
9785
9727
  });
9786
9728
  };
9787
9729
  var serializeAws_restJson1IntentSortBy = function (input, context) {
9788
- return __assign(__assign({}, (input.attribute !== undefined && input.attribute !== null && { attribute: input.attribute })), (input.order !== undefined && input.order !== null && { order: input.order }));
9730
+ return __assign(__assign({}, (input.attribute != null && { attribute: input.attribute })), (input.order != null && { order: input.order }));
9789
9731
  };
9790
9732
  var serializeAws_restJson1KendraConfiguration = function (input, context) {
9791
- return __assign(__assign(__assign({}, (input.kendraIndex !== undefined && input.kendraIndex !== null && { kendraIndex: input.kendraIndex })), (input.queryFilterString !== undefined &&
9792
- input.queryFilterString !== null && { queryFilterString: input.queryFilterString })), (input.queryFilterStringEnabled !== undefined &&
9793
- input.queryFilterStringEnabled !== null && { queryFilterStringEnabled: input.queryFilterStringEnabled }));
9733
+ return __assign(__assign(__assign({}, (input.kendraIndex != null && { kendraIndex: input.kendraIndex })), (input.queryFilterString != null && { queryFilterString: input.queryFilterString })), (input.queryFilterStringEnabled != null && { queryFilterStringEnabled: input.queryFilterStringEnabled }));
9794
9734
  };
9795
9735
  var serializeAws_restJson1LambdaCodeHook = function (input, context) {
9796
- return __assign(__assign({}, (input.codeHookInterfaceVersion !== undefined &&
9797
- input.codeHookInterfaceVersion !== null && { codeHookInterfaceVersion: input.codeHookInterfaceVersion })), (input.lambdaARN !== undefined && input.lambdaARN !== null && { lambdaARN: input.lambdaARN }));
9736
+ return __assign(__assign({}, (input.codeHookInterfaceVersion != null && { codeHookInterfaceVersion: input.codeHookInterfaceVersion })), (input.lambdaARN != null && { lambdaARN: input.lambdaARN }));
9798
9737
  };
9799
9738
  var serializeAws_restJson1LexTranscriptFilter = function (input, context) {
9800
- return __assign({}, (input.dateRangeFilter !== undefined &&
9801
- input.dateRangeFilter !== null && {
9739
+ return __assign({}, (input.dateRangeFilter != null && {
9802
9740
  dateRangeFilter: serializeAws_restJson1DateRangeFilter(input.dateRangeFilter, context),
9803
9741
  }));
9804
9742
  };
9805
9743
  var serializeAws_restJson1Message = function (input, context) {
9806
- return __assign(__assign(__assign(__assign({}, (input.customPayload !== undefined &&
9807
- input.customPayload !== null && {
9744
+ return __assign(__assign(__assign(__assign({}, (input.customPayload != null && {
9808
9745
  customPayload: serializeAws_restJson1CustomPayload(input.customPayload, context),
9809
- })), (input.imageResponseCard !== undefined &&
9810
- input.imageResponseCard !== null && {
9746
+ })), (input.imageResponseCard != null && {
9811
9747
  imageResponseCard: serializeAws_restJson1ImageResponseCard(input.imageResponseCard, context),
9812
- })), (input.plainTextMessage !== undefined &&
9813
- input.plainTextMessage !== null && {
9748
+ })), (input.plainTextMessage != null && {
9814
9749
  plainTextMessage: serializeAws_restJson1PlainTextMessage(input.plainTextMessage, context),
9815
- })), (input.ssmlMessage !== undefined &&
9816
- input.ssmlMessage !== null && { ssmlMessage: serializeAws_restJson1SSMLMessage(input.ssmlMessage, context) }));
9750
+ })), (input.ssmlMessage != null && { ssmlMessage: serializeAws_restJson1SSMLMessage(input.ssmlMessage, context) }));
9817
9751
  };
9818
9752
  var serializeAws_restJson1MessageGroup = function (input, context) {
9819
- return __assign(__assign({}, (input.message !== undefined &&
9820
- input.message !== null && { message: serializeAws_restJson1Message(input.message, context) })), (input.variations !== undefined &&
9821
- input.variations !== null && {
9753
+ return __assign(__assign({}, (input.message != null && { message: serializeAws_restJson1Message(input.message, context) })), (input.variations != null && {
9822
9754
  variations: serializeAws_restJson1MessageVariationsList(input.variations, context),
9823
9755
  }));
9824
9756
  };
@@ -9843,12 +9775,10 @@ var serializeAws_restJson1MessageVariationsList = function (input, context) {
9843
9775
  });
9844
9776
  };
9845
9777
  var serializeAws_restJson1MultipleValuesSetting = function (input, context) {
9846
- return __assign({}, (input.allowMultipleValues !== undefined &&
9847
- input.allowMultipleValues !== null && { allowMultipleValues: input.allowMultipleValues }));
9778
+ return __assign({}, (input.allowMultipleValues != null && { allowMultipleValues: input.allowMultipleValues }));
9848
9779
  };
9849
9780
  var serializeAws_restJson1ObfuscationSetting = function (input, context) {
9850
- return __assign({}, (input.obfuscationSettingType !== undefined &&
9851
- input.obfuscationSettingType !== null && { obfuscationSettingType: input.obfuscationSettingType }));
9781
+ return __assign({}, (input.obfuscationSettingType != null && { obfuscationSettingType: input.obfuscationSettingType }));
9852
9782
  };
9853
9783
  var serializeAws_restJson1ObjectPrefixes = function (input, context) {
9854
9784
  return input
@@ -9871,8 +9801,7 @@ var serializeAws_restJson1OperationList = function (input, context) {
9871
9801
  });
9872
9802
  };
9873
9803
  var serializeAws_restJson1OutputContext = function (input, context) {
9874
- return __assign(__assign(__assign({}, (input.name !== undefined && input.name !== null && { name: input.name })), (input.timeToLiveInSeconds !== undefined &&
9875
- input.timeToLiveInSeconds !== null && { timeToLiveInSeconds: input.timeToLiveInSeconds })), (input.turnsToLive !== undefined && input.turnsToLive !== null && { turnsToLive: input.turnsToLive }));
9804
+ return __assign(__assign(__assign({}, (input.name != null && { name: input.name })), (input.timeToLiveInSeconds != null && { timeToLiveInSeconds: input.timeToLiveInSeconds })), (input.turnsToLive != null && { turnsToLive: input.turnsToLive }));
9876
9805
  };
9877
9806
  var serializeAws_restJson1OutputContextsList = function (input, context) {
9878
9807
  return input
@@ -9885,28 +9814,24 @@ var serializeAws_restJson1OutputContextsList = function (input, context) {
9885
9814
  });
9886
9815
  };
9887
9816
  var serializeAws_restJson1PathFormat = function (input, context) {
9888
- return __assign({}, (input.objectPrefixes !== undefined &&
9889
- input.objectPrefixes !== null && {
9817
+ return __assign({}, (input.objectPrefixes != null && {
9890
9818
  objectPrefixes: serializeAws_restJson1ObjectPrefixes(input.objectPrefixes, context),
9891
9819
  }));
9892
9820
  };
9893
9821
  var serializeAws_restJson1PlainTextMessage = function (input, context) {
9894
- return __assign({}, (input.value !== undefined && input.value !== null && { value: input.value }));
9822
+ return __assign({}, (input.value != null && { value: input.value }));
9895
9823
  };
9896
9824
  var serializeAws_restJson1PostFulfillmentStatusSpecification = function (input, context) {
9897
- return __assign(__assign(__assign({}, (input.failureResponse !== undefined &&
9898
- input.failureResponse !== null && {
9825
+ return __assign(__assign(__assign({}, (input.failureResponse != null && {
9899
9826
  failureResponse: serializeAws_restJson1ResponseSpecification(input.failureResponse, context),
9900
- })), (input.successResponse !== undefined &&
9901
- input.successResponse !== null && {
9827
+ })), (input.successResponse != null && {
9902
9828
  successResponse: serializeAws_restJson1ResponseSpecification(input.successResponse, context),
9903
- })), (input.timeoutResponse !== undefined &&
9904
- input.timeoutResponse !== null && {
9829
+ })), (input.timeoutResponse != null && {
9905
9830
  timeoutResponse: serializeAws_restJson1ResponseSpecification(input.timeoutResponse, context),
9906
9831
  }));
9907
9832
  };
9908
9833
  var serializeAws_restJson1Principal = function (input, context) {
9909
- return __assign(__assign({}, (input.arn !== undefined && input.arn !== null && { arn: input.arn })), (input.service !== undefined && input.service !== null && { service: input.service }));
9834
+ return __assign(__assign({}, (input.arn != null && { arn: input.arn })), (input.service != null && { service: input.service }));
9910
9835
  };
9911
9836
  var serializeAws_restJson1PrincipalList = function (input, context) {
9912
9837
  return input
@@ -9919,35 +9844,28 @@ var serializeAws_restJson1PrincipalList = function (input, context) {
9919
9844
  });
9920
9845
  };
9921
9846
  var serializeAws_restJson1PromptSpecification = function (input, context) {
9922
- return __assign(__assign(__assign({}, (input.allowInterrupt !== undefined &&
9923
- input.allowInterrupt !== null && { allowInterrupt: input.allowInterrupt })), (input.maxRetries !== undefined && input.maxRetries !== null && { maxRetries: input.maxRetries })), (input.messageGroups !== undefined &&
9924
- input.messageGroups !== null && {
9847
+ return __assign(__assign(__assign(__assign({}, (input.allowInterrupt != null && { allowInterrupt: input.allowInterrupt })), (input.maxRetries != null && { maxRetries: input.maxRetries })), (input.messageGroups != null && {
9925
9848
  messageGroups: serializeAws_restJson1MessageGroupsList(input.messageGroups, context),
9926
- }));
9849
+ })), (input.messageSelectionStrategy != null && { messageSelectionStrategy: input.messageSelectionStrategy }));
9927
9850
  };
9928
9851
  var serializeAws_restJson1RelativeAggregationDuration = function (input, context) {
9929
- return __assign(__assign({}, (input.timeDimension !== undefined && input.timeDimension !== null && { timeDimension: input.timeDimension })), (input.timeValue !== undefined && input.timeValue !== null && { timeValue: input.timeValue }));
9852
+ return __assign(__assign({}, (input.timeDimension != null && { timeDimension: input.timeDimension })), (input.timeValue != null && { timeValue: input.timeValue }));
9930
9853
  };
9931
9854
  var serializeAws_restJson1ResponseSpecification = function (input, context) {
9932
- return __assign(__assign({}, (input.allowInterrupt !== undefined &&
9933
- input.allowInterrupt !== null && { allowInterrupt: input.allowInterrupt })), (input.messageGroups !== undefined &&
9934
- input.messageGroups !== null && {
9855
+ return __assign(__assign({}, (input.allowInterrupt != null && { allowInterrupt: input.allowInterrupt })), (input.messageGroups != null && {
9935
9856
  messageGroups: serializeAws_restJson1MessageGroupsList(input.messageGroups, context),
9936
9857
  }));
9937
9858
  };
9938
9859
  var serializeAws_restJson1S3BucketLogDestination = function (input, context) {
9939
- return __assign(__assign(__assign({}, (input.kmsKeyArn !== undefined && input.kmsKeyArn !== null && { kmsKeyArn: input.kmsKeyArn })), (input.logPrefix !== undefined && input.logPrefix !== null && { logPrefix: input.logPrefix })), (input.s3BucketArn !== undefined && input.s3BucketArn !== null && { s3BucketArn: input.s3BucketArn }));
9860
+ return __assign(__assign(__assign({}, (input.kmsKeyArn != null && { kmsKeyArn: input.kmsKeyArn })), (input.logPrefix != null && { logPrefix: input.logPrefix })), (input.s3BucketArn != null && { s3BucketArn: input.s3BucketArn }));
9940
9861
  };
9941
9862
  var serializeAws_restJson1S3BucketTranscriptSource = function (input, context) {
9942
- return __assign(__assign(__assign(__assign(__assign({}, (input.kmsKeyArn !== undefined && input.kmsKeyArn !== null && { kmsKeyArn: input.kmsKeyArn })), (input.pathFormat !== undefined &&
9943
- input.pathFormat !== null && { pathFormat: serializeAws_restJson1PathFormat(input.pathFormat, context) })), (input.s3BucketName !== undefined && input.s3BucketName !== null && { s3BucketName: input.s3BucketName })), (input.transcriptFilter !== undefined &&
9944
- input.transcriptFilter !== null && {
9863
+ return __assign(__assign(__assign(__assign(__assign({}, (input.kmsKeyArn != null && { kmsKeyArn: input.kmsKeyArn })), (input.pathFormat != null && { pathFormat: serializeAws_restJson1PathFormat(input.pathFormat, context) })), (input.s3BucketName != null && { s3BucketName: input.s3BucketName })), (input.transcriptFilter != null && {
9945
9864
  transcriptFilter: serializeAws_restJson1TranscriptFilter(input.transcriptFilter, context),
9946
- })), (input.transcriptFormat !== undefined &&
9947
- input.transcriptFormat !== null && { transcriptFormat: input.transcriptFormat }));
9865
+ })), (input.transcriptFormat != null && { transcriptFormat: input.transcriptFormat }));
9948
9866
  };
9949
9867
  var serializeAws_restJson1SampleUtterance = function (input, context) {
9950
- return __assign({}, (input.utterance !== undefined && input.utterance !== null && { utterance: input.utterance }));
9868
+ return __assign({}, (input.utterance != null && { utterance: input.utterance }));
9951
9869
  };
9952
9870
  var serializeAws_restJson1SampleUtterancesList = function (input, context) {
9953
9871
  return input
@@ -9960,14 +9878,13 @@ var serializeAws_restJson1SampleUtterancesList = function (input, context) {
9960
9878
  });
9961
9879
  };
9962
9880
  var serializeAws_restJson1SampleValue = function (input, context) {
9963
- return __assign({}, (input.value !== undefined && input.value !== null && { value: input.value }));
9881
+ return __assign({}, (input.value != null && { value: input.value }));
9964
9882
  };
9965
9883
  var serializeAws_restJson1SentimentAnalysisSettings = function (input, context) {
9966
- return __assign({}, (input.detectSentiment !== undefined &&
9967
- input.detectSentiment !== null && { detectSentiment: input.detectSentiment }));
9884
+ return __assign({}, (input.detectSentiment != null && { detectSentiment: input.detectSentiment }));
9968
9885
  };
9969
9886
  var serializeAws_restJson1SlotDefaultValue = function (input, context) {
9970
- return __assign({}, (input.defaultValue !== undefined && input.defaultValue !== null && { defaultValue: input.defaultValue }));
9887
+ return __assign({}, (input.defaultValue != null && { defaultValue: input.defaultValue }));
9971
9888
  };
9972
9889
  var serializeAws_restJson1SlotDefaultValueList = function (input, context) {
9973
9890
  return input
@@ -9980,14 +9897,12 @@ var serializeAws_restJson1SlotDefaultValueList = function (input, context) {
9980
9897
  });
9981
9898
  };
9982
9899
  var serializeAws_restJson1SlotDefaultValueSpecification = function (input, context) {
9983
- return __assign({}, (input.defaultValueList !== undefined &&
9984
- input.defaultValueList !== null && {
9900
+ return __assign({}, (input.defaultValueList != null && {
9985
9901
  defaultValueList: serializeAws_restJson1SlotDefaultValueList(input.defaultValueList, context),
9986
9902
  }));
9987
9903
  };
9988
9904
  var serializeAws_restJson1SlotFilter = function (input, context) {
9989
- return __assign(__assign(__assign({}, (input.name !== undefined && input.name !== null && { name: input.name })), (input.operator !== undefined && input.operator !== null && { operator: input.operator })), (input.values !== undefined &&
9990
- input.values !== null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
9905
+ return __assign(__assign(__assign({}, (input.name != null && { name: input.name })), (input.operator != null && { operator: input.operator })), (input.values != null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
9991
9906
  };
9992
9907
  var serializeAws_restJson1SlotFilters = function (input, context) {
9993
9908
  return input
@@ -10010,14 +9925,13 @@ var serializeAws_restJson1SlotPrioritiesList = function (input, context) {
10010
9925
  });
10011
9926
  };
10012
9927
  var serializeAws_restJson1SlotPriority = function (input, context) {
10013
- return __assign(__assign({}, (input.priority !== undefined && input.priority !== null && { priority: input.priority })), (input.slotId !== undefined && input.slotId !== null && { slotId: input.slotId }));
9928
+ return __assign(__assign({}, (input.priority != null && { priority: input.priority })), (input.slotId != null && { slotId: input.slotId }));
10014
9929
  };
10015
9930
  var serializeAws_restJson1SlotSortBy = function (input, context) {
10016
- return __assign(__assign({}, (input.attribute !== undefined && input.attribute !== null && { attribute: input.attribute })), (input.order !== undefined && input.order !== null && { order: input.order }));
9931
+ return __assign(__assign({}, (input.attribute != null && { attribute: input.attribute })), (input.order != null && { order: input.order }));
10017
9932
  };
10018
9933
  var serializeAws_restJson1SlotTypeFilter = function (input, context) {
10019
- return __assign(__assign(__assign({}, (input.name !== undefined && input.name !== null && { name: input.name })), (input.operator !== undefined && input.operator !== null && { operator: input.operator })), (input.values !== undefined &&
10020
- input.values !== null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
9934
+ return __assign(__assign(__assign({}, (input.name != null && { name: input.name })), (input.operator != null && { operator: input.operator })), (input.values != null && { values: serializeAws_restJson1FilterValues(input.values, context) }));
10021
9935
  };
10022
9936
  var serializeAws_restJson1SlotTypeFilters = function (input, context) {
10023
9937
  return input
@@ -10030,12 +9944,10 @@ var serializeAws_restJson1SlotTypeFilters = function (input, context) {
10030
9944
  });
10031
9945
  };
10032
9946
  var serializeAws_restJson1SlotTypeSortBy = function (input, context) {
10033
- return __assign(__assign({}, (input.attribute !== undefined && input.attribute !== null && { attribute: input.attribute })), (input.order !== undefined && input.order !== null && { order: input.order }));
9947
+ return __assign(__assign({}, (input.attribute != null && { attribute: input.attribute })), (input.order != null && { order: input.order }));
10034
9948
  };
10035
9949
  var serializeAws_restJson1SlotTypeValue = function (input, context) {
10036
- return __assign(__assign({}, (input.sampleValue !== undefined &&
10037
- input.sampleValue !== null && { sampleValue: serializeAws_restJson1SampleValue(input.sampleValue, context) })), (input.synonyms !== undefined &&
10038
- input.synonyms !== null && { synonyms: serializeAws_restJson1SynonymList(input.synonyms, context) }));
9950
+ return __assign(__assign({}, (input.sampleValue != null && { sampleValue: serializeAws_restJson1SampleValue(input.sampleValue, context) })), (input.synonyms != null && { synonyms: serializeAws_restJson1SynonymList(input.synonyms, context) }));
10039
9951
  };
10040
9952
  var serializeAws_restJson1SlotTypeValues = function (input, context) {
10041
9953
  return input
@@ -10048,45 +9960,33 @@ var serializeAws_restJson1SlotTypeValues = function (input, context) {
10048
9960
  });
10049
9961
  };
10050
9962
  var serializeAws_restJson1SlotValueElicitationSetting = function (input, context) {
10051
- return __assign(__assign(__assign(__assign(__assign({}, (input.defaultValueSpecification !== undefined &&
10052
- input.defaultValueSpecification !== null && {
9963
+ return __assign(__assign(__assign(__assign(__assign({}, (input.defaultValueSpecification != null && {
10053
9964
  defaultValueSpecification: serializeAws_restJson1SlotDefaultValueSpecification(input.defaultValueSpecification, context),
10054
- })), (input.promptSpecification !== undefined &&
10055
- input.promptSpecification !== null && {
9965
+ })), (input.promptSpecification != null && {
10056
9966
  promptSpecification: serializeAws_restJson1PromptSpecification(input.promptSpecification, context),
10057
- })), (input.sampleUtterances !== undefined &&
10058
- input.sampleUtterances !== null && {
9967
+ })), (input.sampleUtterances != null && {
10059
9968
  sampleUtterances: serializeAws_restJson1SampleUtterancesList(input.sampleUtterances, context),
10060
- })), (input.slotConstraint !== undefined &&
10061
- input.slotConstraint !== null && { slotConstraint: input.slotConstraint })), (input.waitAndContinueSpecification !== undefined &&
10062
- input.waitAndContinueSpecification !== null && {
9969
+ })), (input.slotConstraint != null && { slotConstraint: input.slotConstraint })), (input.waitAndContinueSpecification != null && {
10063
9970
  waitAndContinueSpecification: serializeAws_restJson1WaitAndContinueSpecification(input.waitAndContinueSpecification, context),
10064
9971
  }));
10065
9972
  };
10066
9973
  var serializeAws_restJson1SlotValueRegexFilter = function (input, context) {
10067
- return __assign({}, (input.pattern !== undefined && input.pattern !== null && { pattern: input.pattern }));
9974
+ return __assign({}, (input.pattern != null && { pattern: input.pattern }));
10068
9975
  };
10069
9976
  var serializeAws_restJson1SlotValueSelectionSetting = function (input, context) {
10070
- return __assign(__assign(__assign({}, (input.advancedRecognitionSetting !== undefined &&
10071
- input.advancedRecognitionSetting !== null && {
9977
+ return __assign(__assign(__assign({}, (input.advancedRecognitionSetting != null && {
10072
9978
  advancedRecognitionSetting: serializeAws_restJson1AdvancedRecognitionSetting(input.advancedRecognitionSetting, context),
10073
- })), (input.regexFilter !== undefined &&
10074
- input.regexFilter !== null && {
9979
+ })), (input.regexFilter != null && {
10075
9980
  regexFilter: serializeAws_restJson1SlotValueRegexFilter(input.regexFilter, context),
10076
- })), (input.resolutionStrategy !== undefined &&
10077
- input.resolutionStrategy !== null && { resolutionStrategy: input.resolutionStrategy }));
9981
+ })), (input.resolutionStrategy != null && { resolutionStrategy: input.resolutionStrategy }));
10078
9982
  };
10079
9983
  var serializeAws_restJson1SSMLMessage = function (input, context) {
10080
- return __assign({}, (input.value !== undefined && input.value !== null && { value: input.value }));
9984
+ return __assign({}, (input.value != null && { value: input.value }));
10081
9985
  };
10082
9986
  var serializeAws_restJson1StillWaitingResponseSpecification = function (input, context) {
10083
- return __assign(__assign(__assign(__assign({}, (input.allowInterrupt !== undefined &&
10084
- input.allowInterrupt !== null && { allowInterrupt: input.allowInterrupt })), (input.frequencyInSeconds !== undefined &&
10085
- input.frequencyInSeconds !== null && { frequencyInSeconds: input.frequencyInSeconds })), (input.messageGroups !== undefined &&
10086
- input.messageGroups !== null && {
9987
+ return __assign(__assign(__assign(__assign({}, (input.allowInterrupt != null && { allowInterrupt: input.allowInterrupt })), (input.frequencyInSeconds != null && { frequencyInSeconds: input.frequencyInSeconds })), (input.messageGroups != null && {
10087
9988
  messageGroups: serializeAws_restJson1MessageGroupsList(input.messageGroups, context),
10088
- })), (input.timeoutInSeconds !== undefined &&
10089
- input.timeoutInSeconds !== null && { timeoutInSeconds: input.timeoutInSeconds }));
9989
+ })), (input.timeoutInSeconds != null && { timeoutInSeconds: input.timeoutInSeconds }));
10090
9990
  };
10091
9991
  var serializeAws_restJson1SynonymList = function (input, context) {
10092
9992
  return input
@@ -10109,16 +10009,14 @@ var serializeAws_restJson1TagMap = function (input, context) {
10109
10009
  }, {});
10110
10010
  };
10111
10011
  var serializeAws_restJson1TextLogDestination = function (input, context) {
10112
- return __assign({}, (input.cloudWatch !== undefined &&
10113
- input.cloudWatch !== null && {
10012
+ return __assign({}, (input.cloudWatch != null && {
10114
10013
  cloudWatch: serializeAws_restJson1CloudWatchLogGroupLogDestination(input.cloudWatch, context),
10115
10014
  }));
10116
10015
  };
10117
10016
  var serializeAws_restJson1TextLogSetting = function (input, context) {
10118
- return __assign(__assign({}, (input.destination !== undefined &&
10119
- input.destination !== null && {
10017
+ return __assign(__assign({}, (input.destination != null && {
10120
10018
  destination: serializeAws_restJson1TextLogDestination(input.destination, context),
10121
- })), (input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled }));
10019
+ })), (input.enabled != null && { enabled: input.enabled }));
10122
10020
  };
10123
10021
  var serializeAws_restJson1TextLogSettingsList = function (input, context) {
10124
10022
  return input
@@ -10131,35 +10029,29 @@ var serializeAws_restJson1TextLogSettingsList = function (input, context) {
10131
10029
  });
10132
10030
  };
10133
10031
  var serializeAws_restJson1TranscriptFilter = function (input, context) {
10134
- return __assign({}, (input.lexTranscriptFilter !== undefined &&
10135
- input.lexTranscriptFilter !== null && {
10032
+ return __assign({}, (input.lexTranscriptFilter != null && {
10136
10033
  lexTranscriptFilter: serializeAws_restJson1LexTranscriptFilter(input.lexTranscriptFilter, context),
10137
10034
  }));
10138
10035
  };
10139
10036
  var serializeAws_restJson1TranscriptSourceSetting = function (input, context) {
10140
- return __assign({}, (input.s3BucketTranscriptSource !== undefined &&
10141
- input.s3BucketTranscriptSource !== null && {
10037
+ return __assign({}, (input.s3BucketTranscriptSource != null && {
10142
10038
  s3BucketTranscriptSource: serializeAws_restJson1S3BucketTranscriptSource(input.s3BucketTranscriptSource, context),
10143
10039
  }));
10144
10040
  };
10145
10041
  var serializeAws_restJson1UtteranceAggregationDuration = function (input, context) {
10146
- return __assign({}, (input.relativeAggregationDuration !== undefined &&
10147
- input.relativeAggregationDuration !== null && {
10042
+ return __assign({}, (input.relativeAggregationDuration != null && {
10148
10043
  relativeAggregationDuration: serializeAws_restJson1RelativeAggregationDuration(input.relativeAggregationDuration, context),
10149
10044
  }));
10150
10045
  };
10151
10046
  var serializeAws_restJson1VoiceSettings = function (input, context) {
10152
- return __assign(__assign({}, (input.engine !== undefined && input.engine !== null && { engine: input.engine })), (input.voiceId !== undefined && input.voiceId !== null && { voiceId: input.voiceId }));
10047
+ return __assign(__assign({}, (input.engine != null && { engine: input.engine })), (input.voiceId != null && { voiceId: input.voiceId }));
10153
10048
  };
10154
10049
  var serializeAws_restJson1WaitAndContinueSpecification = function (input, context) {
10155
- return __assign(__assign(__assign(__assign({}, (input.active !== undefined && input.active !== null && { active: input.active })), (input.continueResponse !== undefined &&
10156
- input.continueResponse !== null && {
10050
+ return __assign(__assign(__assign(__assign({}, (input.active != null && { active: input.active })), (input.continueResponse != null && {
10157
10051
  continueResponse: serializeAws_restJson1ResponseSpecification(input.continueResponse, context),
10158
- })), (input.stillWaitingResponse !== undefined &&
10159
- input.stillWaitingResponse !== null && {
10052
+ })), (input.stillWaitingResponse != null && {
10160
10053
  stillWaitingResponse: serializeAws_restJson1StillWaitingResponseSpecification(input.stillWaitingResponse, context),
10161
- })), (input.waitingResponse !== undefined &&
10162
- input.waitingResponse !== null && {
10054
+ })), (input.waitingResponse != null && {
10163
10055
  waitingResponse: serializeAws_restJson1ResponseSpecification(input.waitingResponse, context),
10164
10056
  }));
10165
10057
  };
@@ -10174,12 +10066,10 @@ var deserializeAws_restJson1AggregatedUtterancesSummary = function (output, cont
10174
10066
  hitCount: __expectInt32(output.hitCount),
10175
10067
  missedCount: __expectInt32(output.missedCount),
10176
10068
  utterance: __expectString(output.utterance),
10177
- utteranceFirstRecordedInAggregationDuration: output.utteranceFirstRecordedInAggregationDuration !== undefined &&
10178
- output.utteranceFirstRecordedInAggregationDuration !== null
10069
+ utteranceFirstRecordedInAggregationDuration: output.utteranceFirstRecordedInAggregationDuration != null
10179
10070
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.utteranceFirstRecordedInAggregationDuration)))
10180
10071
  : undefined,
10181
- utteranceLastRecordedInAggregationDuration: output.utteranceLastRecordedInAggregationDuration !== undefined &&
10182
- output.utteranceLastRecordedInAggregationDuration !== null
10072
+ utteranceLastRecordedInAggregationDuration: output.utteranceLastRecordedInAggregationDuration != null
10183
10073
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.utteranceLastRecordedInAggregationDuration)))
10184
10074
  : undefined,
10185
10075
  };
@@ -10213,16 +10103,12 @@ var deserializeAws_restJson1AssociatedTranscriptList = function (output, context
10213
10103
  };
10214
10104
  var deserializeAws_restJson1AudioLogDestination = function (output, context) {
10215
10105
  return {
10216
- s3Bucket: output.s3Bucket !== undefined && output.s3Bucket !== null
10217
- ? deserializeAws_restJson1S3BucketLogDestination(output.s3Bucket, context)
10218
- : undefined,
10106
+ s3Bucket: output.s3Bucket != null ? deserializeAws_restJson1S3BucketLogDestination(output.s3Bucket, context) : undefined,
10219
10107
  };
10220
10108
  };
10221
10109
  var deserializeAws_restJson1AudioLogSetting = function (output, context) {
10222
10110
  return {
10223
- destination: output.destination !== undefined && output.destination !== null
10224
- ? deserializeAws_restJson1AudioLogDestination(output.destination, context)
10225
- : undefined,
10111
+ destination: output.destination != null ? deserializeAws_restJson1AudioLogDestination(output.destination, context) : undefined,
10226
10112
  enabled: __expectBoolean(output.enabled),
10227
10113
  };
10228
10114
  };
@@ -10240,12 +10126,8 @@ var deserializeAws_restJson1AudioLogSettingsList = function (output, context) {
10240
10126
  var deserializeAws_restJson1BotAliasHistoryEvent = function (output, context) {
10241
10127
  return {
10242
10128
  botVersion: __expectString(output.botVersion),
10243
- endDate: output.endDate !== undefined && output.endDate !== null
10244
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endDate)))
10245
- : undefined,
10246
- startDate: output.startDate !== undefined && output.startDate !== null
10247
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDate)))
10248
- : undefined,
10129
+ endDate: output.endDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endDate))) : undefined,
10130
+ startDate: output.startDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDate))) : undefined,
10249
10131
  };
10250
10132
  };
10251
10133
  var deserializeAws_restJson1BotAliasHistoryEventsList = function (output, context) {
@@ -10261,7 +10143,7 @@ var deserializeAws_restJson1BotAliasHistoryEventsList = function (output, contex
10261
10143
  };
10262
10144
  var deserializeAws_restJson1BotAliasLocaleSettings = function (output, context) {
10263
10145
  return {
10264
- codeHookSpecification: output.codeHookSpecification !== undefined && output.codeHookSpecification !== null
10146
+ codeHookSpecification: output.codeHookSpecification != null
10265
10147
  ? deserializeAws_restJson1CodeHookSpecification(output.codeHookSpecification, context)
10266
10148
  : undefined,
10267
10149
  enabled: __expectBoolean(output.enabled),
@@ -10283,11 +10165,11 @@ var deserializeAws_restJson1BotAliasSummary = function (output, context) {
10283
10165
  botAliasName: __expectString(output.botAliasName),
10284
10166
  botAliasStatus: __expectString(output.botAliasStatus),
10285
10167
  botVersion: __expectString(output.botVersion),
10286
- creationDateTime: output.creationDateTime !== undefined && output.creationDateTime !== null
10168
+ creationDateTime: output.creationDateTime != null
10287
10169
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime)))
10288
10170
  : undefined,
10289
10171
  description: __expectString(output.description),
10290
- lastUpdatedDateTime: output.lastUpdatedDateTime !== undefined && output.lastUpdatedDateTime !== null
10172
+ lastUpdatedDateTime: output.lastUpdatedDateTime != null
10291
10173
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime)))
10292
10174
  : undefined,
10293
10175
  };
@@ -10312,17 +10194,11 @@ var deserializeAws_restJson1BotExportSpecification = function (output, context)
10312
10194
  var deserializeAws_restJson1BotImportSpecification = function (output, context) {
10313
10195
  return {
10314
10196
  botName: __expectString(output.botName),
10315
- botTags: output.botTags !== undefined && output.botTags !== null
10316
- ? deserializeAws_restJson1TagMap(output.botTags, context)
10317
- : undefined,
10318
- dataPrivacy: output.dataPrivacy !== undefined && output.dataPrivacy !== null
10319
- ? deserializeAws_restJson1DataPrivacy(output.dataPrivacy, context)
10320
- : undefined,
10197
+ botTags: output.botTags != null ? deserializeAws_restJson1TagMap(output.botTags, context) : undefined,
10198
+ dataPrivacy: output.dataPrivacy != null ? deserializeAws_restJson1DataPrivacy(output.dataPrivacy, context) : undefined,
10321
10199
  idleSessionTTLInSeconds: __expectInt32(output.idleSessionTTLInSeconds),
10322
10200
  roleArn: __expectString(output.roleArn),
10323
- testBotAliasTags: output.testBotAliasTags !== undefined && output.testBotAliasTags !== null
10324
- ? deserializeAws_restJson1TagMap(output.testBotAliasTags, context)
10325
- : undefined,
10201
+ testBotAliasTags: output.testBotAliasTags != null ? deserializeAws_restJson1TagMap(output.testBotAliasTags, context) : undefined,
10326
10202
  };
10327
10203
  };
10328
10204
  var deserializeAws_restJson1BotLocaleExportSpecification = function (output, context) {
@@ -10335,9 +10211,7 @@ var deserializeAws_restJson1BotLocaleExportSpecification = function (output, con
10335
10211
  var deserializeAws_restJson1BotLocaleHistoryEvent = function (output, context) {
10336
10212
  return {
10337
10213
  event: __expectString(output.event),
10338
- eventDate: output.eventDate !== undefined && output.eventDate !== null
10339
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.eventDate)))
10340
- : undefined,
10214
+ eventDate: output.eventDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.eventDate))) : undefined,
10341
10215
  };
10342
10216
  };
10343
10217
  var deserializeAws_restJson1BotLocaleHistoryEventsList = function (output, context) {
@@ -10357,19 +10231,17 @@ var deserializeAws_restJson1BotLocaleImportSpecification = function (output, con
10357
10231
  botVersion: __expectString(output.botVersion),
10358
10232
  localeId: __expectString(output.localeId),
10359
10233
  nluIntentConfidenceThreshold: __limitedParseDouble(output.nluIntentConfidenceThreshold),
10360
- voiceSettings: output.voiceSettings !== undefined && output.voiceSettings !== null
10361
- ? deserializeAws_restJson1VoiceSettings(output.voiceSettings, context)
10362
- : undefined,
10234
+ voiceSettings: output.voiceSettings != null ? deserializeAws_restJson1VoiceSettings(output.voiceSettings, context) : undefined,
10363
10235
  };
10364
10236
  };
10365
10237
  var deserializeAws_restJson1BotLocaleSummary = function (output, context) {
10366
10238
  return {
10367
10239
  botLocaleStatus: __expectString(output.botLocaleStatus),
10368
10240
  description: __expectString(output.description),
10369
- lastBuildSubmittedDateTime: output.lastBuildSubmittedDateTime !== undefined && output.lastBuildSubmittedDateTime !== null
10241
+ lastBuildSubmittedDateTime: output.lastBuildSubmittedDateTime != null
10370
10242
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastBuildSubmittedDateTime)))
10371
10243
  : undefined,
10372
- lastUpdatedDateTime: output.lastUpdatedDateTime !== undefined && output.lastUpdatedDateTime !== null
10244
+ lastUpdatedDateTime: output.lastUpdatedDateTime != null
10373
10245
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime)))
10374
10246
  : undefined,
10375
10247
  localeId: __expectString(output.localeId),
@@ -10391,29 +10263,25 @@ var deserializeAws_restJson1BotRecommendationResults = function (output, context
10391
10263
  return {
10392
10264
  associatedTranscriptsUrl: __expectString(output.associatedTranscriptsUrl),
10393
10265
  botLocaleExportUrl: __expectString(output.botLocaleExportUrl),
10394
- statistics: output.statistics !== undefined && output.statistics !== null
10266
+ statistics: output.statistics != null
10395
10267
  ? deserializeAws_restJson1BotRecommendationResultStatistics(output.statistics, context)
10396
10268
  : undefined,
10397
10269
  };
10398
10270
  };
10399
10271
  var deserializeAws_restJson1BotRecommendationResultStatistics = function (output, context) {
10400
10272
  return {
10401
- intents: output.intents !== undefined && output.intents !== null
10402
- ? deserializeAws_restJson1IntentStatistics(output.intents, context)
10403
- : undefined,
10404
- slotTypes: output.slotTypes !== undefined && output.slotTypes !== null
10405
- ? deserializeAws_restJson1SlotTypeStatistics(output.slotTypes, context)
10406
- : undefined,
10273
+ intents: output.intents != null ? deserializeAws_restJson1IntentStatistics(output.intents, context) : undefined,
10274
+ slotTypes: output.slotTypes != null ? deserializeAws_restJson1SlotTypeStatistics(output.slotTypes, context) : undefined,
10407
10275
  };
10408
10276
  };
10409
10277
  var deserializeAws_restJson1BotRecommendationSummary = function (output, context) {
10410
10278
  return {
10411
10279
  botRecommendationId: __expectString(output.botRecommendationId),
10412
10280
  botRecommendationStatus: __expectString(output.botRecommendationStatus),
10413
- creationDateTime: output.creationDateTime !== undefined && output.creationDateTime !== null
10281
+ creationDateTime: output.creationDateTime != null
10414
10282
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime)))
10415
10283
  : undefined,
10416
- lastUpdatedDateTime: output.lastUpdatedDateTime !== undefined && output.lastUpdatedDateTime !== null
10284
+ lastUpdatedDateTime: output.lastUpdatedDateTime != null
10417
10285
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime)))
10418
10286
  : undefined,
10419
10287
  };
@@ -10435,7 +10303,7 @@ var deserializeAws_restJson1BotSummary = function (output, context) {
10435
10303
  botName: __expectString(output.botName),
10436
10304
  botStatus: __expectString(output.botStatus),
10437
10305
  description: __expectString(output.description),
10438
- lastUpdatedDateTime: output.lastUpdatedDateTime !== undefined && output.lastUpdatedDateTime !== null
10306
+ lastUpdatedDateTime: output.lastUpdatedDateTime != null
10439
10307
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime)))
10440
10308
  : undefined,
10441
10309
  latestBotVersion: __expectString(output.latestBotVersion),
@@ -10472,7 +10340,7 @@ var deserializeAws_restJson1BotVersionSummary = function (output, context) {
10472
10340
  botName: __expectString(output.botName),
10473
10341
  botStatus: __expectString(output.botStatus),
10474
10342
  botVersion: __expectString(output.botVersion),
10475
- creationDateTime: output.creationDateTime !== undefined && output.creationDateTime !== null
10343
+ creationDateTime: output.creationDateTime != null
10476
10344
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime)))
10477
10345
  : undefined,
10478
10346
  description: __expectString(output.description),
@@ -10548,17 +10416,17 @@ var deserializeAws_restJson1CloudWatchLogGroupLogDestination = function (output,
10548
10416
  };
10549
10417
  var deserializeAws_restJson1CodeHookSpecification = function (output, context) {
10550
10418
  return {
10551
- lambdaCodeHook: output.lambdaCodeHook !== undefined && output.lambdaCodeHook !== null
10419
+ lambdaCodeHook: output.lambdaCodeHook != null
10552
10420
  ? deserializeAws_restJson1LambdaCodeHook(output.lambdaCodeHook, context)
10553
10421
  : undefined,
10554
10422
  };
10555
10423
  };
10556
10424
  var deserializeAws_restJson1ConversationLogSettings = function (output, context) {
10557
10425
  return {
10558
- audioLogSettings: output.audioLogSettings !== undefined && output.audioLogSettings !== null
10426
+ audioLogSettings: output.audioLogSettings != null
10559
10427
  ? deserializeAws_restJson1AudioLogSettingsList(output.audioLogSettings, context)
10560
10428
  : undefined,
10561
- textLogSettings: output.textLogSettings !== undefined && output.textLogSettings !== null
10429
+ textLogSettings: output.textLogSettings != null
10562
10430
  ? deserializeAws_restJson1TextLogSettingsList(output.textLogSettings, context)
10563
10431
  : undefined,
10564
10432
  };
@@ -10589,10 +10457,10 @@ var deserializeAws_restJson1DataPrivacy = function (output, context) {
10589
10457
  };
10590
10458
  var deserializeAws_restJson1DateRangeFilter = function (output, context) {
10591
10459
  return {
10592
- endDateTime: output.endDateTime !== undefined && output.endDateTime !== null
10460
+ endDateTime: output.endDateTime != null
10593
10461
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endDateTime)))
10594
10462
  : undefined,
10595
- startDateTime: output.startDateTime !== undefined && output.startDateTime !== null
10463
+ startDateTime: output.startDateTime != null
10596
10464
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDateTime)))
10597
10465
  : undefined,
10598
10466
  };
@@ -10611,29 +10479,29 @@ var deserializeAws_restJson1EncryptionSetting = function (output, context) {
10611
10479
  };
10612
10480
  var deserializeAws_restJson1ExportResourceSpecification = function (output, context) {
10613
10481
  return {
10614
- botExportSpecification: output.botExportSpecification !== undefined && output.botExportSpecification !== null
10482
+ botExportSpecification: output.botExportSpecification != null
10615
10483
  ? deserializeAws_restJson1BotExportSpecification(output.botExportSpecification, context)
10616
10484
  : undefined,
10617
- botLocaleExportSpecification: output.botLocaleExportSpecification !== undefined && output.botLocaleExportSpecification !== null
10485
+ botLocaleExportSpecification: output.botLocaleExportSpecification != null
10618
10486
  ? deserializeAws_restJson1BotLocaleExportSpecification(output.botLocaleExportSpecification, context)
10619
10487
  : undefined,
10620
- customVocabularyExportSpecification: output.customVocabularyExportSpecification !== undefined && output.customVocabularyExportSpecification !== null
10488
+ customVocabularyExportSpecification: output.customVocabularyExportSpecification != null
10621
10489
  ? deserializeAws_restJson1CustomVocabularyExportSpecification(output.customVocabularyExportSpecification, context)
10622
10490
  : undefined,
10623
10491
  };
10624
10492
  };
10625
10493
  var deserializeAws_restJson1ExportSummary = function (output, context) {
10626
10494
  return {
10627
- creationDateTime: output.creationDateTime !== undefined && output.creationDateTime !== null
10495
+ creationDateTime: output.creationDateTime != null
10628
10496
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime)))
10629
10497
  : undefined,
10630
10498
  exportId: __expectString(output.exportId),
10631
10499
  exportStatus: __expectString(output.exportStatus),
10632
10500
  fileFormat: __expectString(output.fileFormat),
10633
- lastUpdatedDateTime: output.lastUpdatedDateTime !== undefined && output.lastUpdatedDateTime !== null
10501
+ lastUpdatedDateTime: output.lastUpdatedDateTime != null
10634
10502
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime)))
10635
10503
  : undefined,
10636
- resourceSpecification: output.resourceSpecification !== undefined && output.resourceSpecification !== null
10504
+ resourceSpecification: output.resourceSpecification != null
10637
10505
  ? deserializeAws_restJson1ExportResourceSpecification(output.resourceSpecification, context)
10638
10506
  : undefined,
10639
10507
  };
@@ -10651,7 +10519,7 @@ var deserializeAws_restJson1ExportSummaryList = function (output, context) {
10651
10519
  };
10652
10520
  var deserializeAws_restJson1ExternalSourceSetting = function (output, context) {
10653
10521
  return {
10654
- grammarSlotTypeSetting: output.grammarSlotTypeSetting !== undefined && output.grammarSlotTypeSetting !== null
10522
+ grammarSlotTypeSetting: output.grammarSlotTypeSetting != null
10655
10523
  ? deserializeAws_restJson1GrammarSlotTypeSetting(output.grammarSlotTypeSetting, context)
10656
10524
  : undefined,
10657
10525
  };
@@ -10670,10 +10538,10 @@ var deserializeAws_restJson1FailureReasons = function (output, context) {
10670
10538
  var deserializeAws_restJson1FulfillmentCodeHookSettings = function (output, context) {
10671
10539
  return {
10672
10540
  enabled: __expectBoolean(output.enabled),
10673
- fulfillmentUpdatesSpecification: output.fulfillmentUpdatesSpecification !== undefined && output.fulfillmentUpdatesSpecification !== null
10541
+ fulfillmentUpdatesSpecification: output.fulfillmentUpdatesSpecification != null
10674
10542
  ? deserializeAws_restJson1FulfillmentUpdatesSpecification(output.fulfillmentUpdatesSpecification, context)
10675
10543
  : undefined,
10676
- postFulfillmentStatusSpecification: output.postFulfillmentStatusSpecification !== undefined && output.postFulfillmentStatusSpecification !== null
10544
+ postFulfillmentStatusSpecification: output.postFulfillmentStatusSpecification != null
10677
10545
  ? deserializeAws_restJson1PostFulfillmentStatusSpecification(output.postFulfillmentStatusSpecification, context)
10678
10546
  : undefined,
10679
10547
  };
@@ -10682,7 +10550,7 @@ var deserializeAws_restJson1FulfillmentStartResponseSpecification = function (ou
10682
10550
  return {
10683
10551
  allowInterrupt: __expectBoolean(output.allowInterrupt),
10684
10552
  delayInSeconds: __expectInt32(output.delayInSeconds),
10685
- messageGroups: output.messageGroups !== undefined && output.messageGroups !== null
10553
+ messageGroups: output.messageGroups != null
10686
10554
  ? deserializeAws_restJson1MessageGroupsList(output.messageGroups, context)
10687
10555
  : undefined,
10688
10556
  };
@@ -10691,7 +10559,7 @@ var deserializeAws_restJson1FulfillmentUpdateResponseSpecification = function (o
10691
10559
  return {
10692
10560
  allowInterrupt: __expectBoolean(output.allowInterrupt),
10693
10561
  frequencyInSeconds: __expectInt32(output.frequencyInSeconds),
10694
- messageGroups: output.messageGroups !== undefined && output.messageGroups !== null
10562
+ messageGroups: output.messageGroups != null
10695
10563
  ? deserializeAws_restJson1MessageGroupsList(output.messageGroups, context)
10696
10564
  : undefined,
10697
10565
  };
@@ -10699,20 +10567,18 @@ var deserializeAws_restJson1FulfillmentUpdateResponseSpecification = function (o
10699
10567
  var deserializeAws_restJson1FulfillmentUpdatesSpecification = function (output, context) {
10700
10568
  return {
10701
10569
  active: __expectBoolean(output.active),
10702
- startResponse: output.startResponse !== undefined && output.startResponse !== null
10570
+ startResponse: output.startResponse != null
10703
10571
  ? deserializeAws_restJson1FulfillmentStartResponseSpecification(output.startResponse, context)
10704
10572
  : undefined,
10705
10573
  timeoutInSeconds: __expectInt32(output.timeoutInSeconds),
10706
- updateResponse: output.updateResponse !== undefined && output.updateResponse !== null
10574
+ updateResponse: output.updateResponse != null
10707
10575
  ? deserializeAws_restJson1FulfillmentUpdateResponseSpecification(output.updateResponse, context)
10708
10576
  : undefined,
10709
10577
  };
10710
10578
  };
10711
10579
  var deserializeAws_restJson1GrammarSlotTypeSetting = function (output, context) {
10712
10580
  return {
10713
- source: output.source !== undefined && output.source !== null
10714
- ? deserializeAws_restJson1GrammarSlotTypeSource(output.source, context)
10715
- : undefined,
10581
+ source: output.source != null ? deserializeAws_restJson1GrammarSlotTypeSource(output.source, context) : undefined,
10716
10582
  };
10717
10583
  };
10718
10584
  var deserializeAws_restJson1GrammarSlotTypeSource = function (output, context) {
@@ -10724,9 +10590,7 @@ var deserializeAws_restJson1GrammarSlotTypeSource = function (output, context) {
10724
10590
  };
10725
10591
  var deserializeAws_restJson1ImageResponseCard = function (output, context) {
10726
10592
  return {
10727
- buttons: output.buttons !== undefined && output.buttons !== null
10728
- ? deserializeAws_restJson1ButtonsList(output.buttons, context)
10729
- : undefined,
10593
+ buttons: output.buttons != null ? deserializeAws_restJson1ButtonsList(output.buttons, context) : undefined,
10730
10594
  imageUrl: __expectString(output.imageUrl),
10731
10595
  subtitle: __expectString(output.subtitle),
10732
10596
  title: __expectString(output.title),
@@ -10734,20 +10598,20 @@ var deserializeAws_restJson1ImageResponseCard = function (output, context) {
10734
10598
  };
10735
10599
  var deserializeAws_restJson1ImportResourceSpecification = function (output, context) {
10736
10600
  return {
10737
- botImportSpecification: output.botImportSpecification !== undefined && output.botImportSpecification !== null
10601
+ botImportSpecification: output.botImportSpecification != null
10738
10602
  ? deserializeAws_restJson1BotImportSpecification(output.botImportSpecification, context)
10739
10603
  : undefined,
10740
- botLocaleImportSpecification: output.botLocaleImportSpecification !== undefined && output.botLocaleImportSpecification !== null
10604
+ botLocaleImportSpecification: output.botLocaleImportSpecification != null
10741
10605
  ? deserializeAws_restJson1BotLocaleImportSpecification(output.botLocaleImportSpecification, context)
10742
10606
  : undefined,
10743
- customVocabularyImportSpecification: output.customVocabularyImportSpecification !== undefined && output.customVocabularyImportSpecification !== null
10607
+ customVocabularyImportSpecification: output.customVocabularyImportSpecification != null
10744
10608
  ? deserializeAws_restJson1CustomVocabularyImportSpecification(output.customVocabularyImportSpecification, context)
10745
10609
  : undefined,
10746
10610
  };
10747
10611
  };
10748
10612
  var deserializeAws_restJson1ImportSummary = function (output, context) {
10749
10613
  return {
10750
- creationDateTime: output.creationDateTime !== undefined && output.creationDateTime !== null
10614
+ creationDateTime: output.creationDateTime != null
10751
10615
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime)))
10752
10616
  : undefined,
10753
10617
  importId: __expectString(output.importId),
@@ -10755,7 +10619,7 @@ var deserializeAws_restJson1ImportSummary = function (output, context) {
10755
10619
  importedResourceId: __expectString(output.importedResourceId),
10756
10620
  importedResourceName: __expectString(output.importedResourceName),
10757
10621
  importedResourceType: __expectString(output.importedResourceType),
10758
- lastUpdatedDateTime: output.lastUpdatedDateTime !== undefined && output.lastUpdatedDateTime !== null
10622
+ lastUpdatedDateTime: output.lastUpdatedDateTime != null
10759
10623
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime)))
10760
10624
  : undefined,
10761
10625
  mergeStrategy: __expectString(output.mergeStrategy),
@@ -10791,7 +10655,7 @@ var deserializeAws_restJson1InputContextsList = function (output, context) {
10791
10655
  var deserializeAws_restJson1IntentClosingSetting = function (output, context) {
10792
10656
  return {
10793
10657
  active: __expectBoolean(output.active),
10794
- closingResponse: output.closingResponse !== undefined && output.closingResponse !== null
10658
+ closingResponse: output.closingResponse != null
10795
10659
  ? deserializeAws_restJson1ResponseSpecification(output.closingResponse, context)
10796
10660
  : undefined,
10797
10661
  };
@@ -10799,10 +10663,10 @@ var deserializeAws_restJson1IntentClosingSetting = function (output, context) {
10799
10663
  var deserializeAws_restJson1IntentConfirmationSetting = function (output, context) {
10800
10664
  return {
10801
10665
  active: __expectBoolean(output.active),
10802
- declinationResponse: output.declinationResponse !== undefined && output.declinationResponse !== null
10666
+ declinationResponse: output.declinationResponse != null
10803
10667
  ? deserializeAws_restJson1ResponseSpecification(output.declinationResponse, context)
10804
10668
  : undefined,
10805
- promptSpecification: output.promptSpecification !== undefined && output.promptSpecification !== null
10669
+ promptSpecification: output.promptSpecification != null
10806
10670
  ? deserializeAws_restJson1PromptSpecification(output.promptSpecification, context)
10807
10671
  : undefined,
10808
10672
  };
@@ -10815,15 +10679,15 @@ var deserializeAws_restJson1IntentStatistics = function (output, context) {
10815
10679
  var deserializeAws_restJson1IntentSummary = function (output, context) {
10816
10680
  return {
10817
10681
  description: __expectString(output.description),
10818
- inputContexts: output.inputContexts !== undefined && output.inputContexts !== null
10682
+ inputContexts: output.inputContexts != null
10819
10683
  ? deserializeAws_restJson1InputContextsList(output.inputContexts, context)
10820
10684
  : undefined,
10821
10685
  intentId: __expectString(output.intentId),
10822
10686
  intentName: __expectString(output.intentName),
10823
- lastUpdatedDateTime: output.lastUpdatedDateTime !== undefined && output.lastUpdatedDateTime !== null
10687
+ lastUpdatedDateTime: output.lastUpdatedDateTime != null
10824
10688
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime)))
10825
10689
  : undefined,
10826
- outputContexts: output.outputContexts !== undefined && output.outputContexts !== null
10690
+ outputContexts: output.outputContexts != null
10827
10691
  ? deserializeAws_restJson1OutputContextsList(output.outputContexts, context)
10828
10692
  : undefined,
10829
10693
  parentIntentSignature: __expectString(output.parentIntentSignature),
@@ -10855,35 +10719,27 @@ var deserializeAws_restJson1LambdaCodeHook = function (output, context) {
10855
10719
  };
10856
10720
  var deserializeAws_restJson1LexTranscriptFilter = function (output, context) {
10857
10721
  return {
10858
- dateRangeFilter: output.dateRangeFilter !== undefined && output.dateRangeFilter !== null
10722
+ dateRangeFilter: output.dateRangeFilter != null
10859
10723
  ? deserializeAws_restJson1DateRangeFilter(output.dateRangeFilter, context)
10860
10724
  : undefined,
10861
10725
  };
10862
10726
  };
10863
10727
  var deserializeAws_restJson1Message = function (output, context) {
10864
10728
  return {
10865
- customPayload: output.customPayload !== undefined && output.customPayload !== null
10866
- ? deserializeAws_restJson1CustomPayload(output.customPayload, context)
10867
- : undefined,
10868
- imageResponseCard: output.imageResponseCard !== undefined && output.imageResponseCard !== null
10729
+ customPayload: output.customPayload != null ? deserializeAws_restJson1CustomPayload(output.customPayload, context) : undefined,
10730
+ imageResponseCard: output.imageResponseCard != null
10869
10731
  ? deserializeAws_restJson1ImageResponseCard(output.imageResponseCard, context)
10870
10732
  : undefined,
10871
- plainTextMessage: output.plainTextMessage !== undefined && output.plainTextMessage !== null
10733
+ plainTextMessage: output.plainTextMessage != null
10872
10734
  ? deserializeAws_restJson1PlainTextMessage(output.plainTextMessage, context)
10873
10735
  : undefined,
10874
- ssmlMessage: output.ssmlMessage !== undefined && output.ssmlMessage !== null
10875
- ? deserializeAws_restJson1SSMLMessage(output.ssmlMessage, context)
10876
- : undefined,
10736
+ ssmlMessage: output.ssmlMessage != null ? deserializeAws_restJson1SSMLMessage(output.ssmlMessage, context) : undefined,
10877
10737
  };
10878
10738
  };
10879
10739
  var deserializeAws_restJson1MessageGroup = function (output, context) {
10880
10740
  return {
10881
- message: output.message !== undefined && output.message !== null
10882
- ? deserializeAws_restJson1Message(output.message, context)
10883
- : undefined,
10884
- variations: output.variations !== undefined && output.variations !== null
10885
- ? deserializeAws_restJson1MessageVariationsList(output.variations, context)
10886
- : undefined,
10741
+ message: output.message != null ? deserializeAws_restJson1Message(output.message, context) : undefined,
10742
+ variations: output.variations != null ? deserializeAws_restJson1MessageVariationsList(output.variations, context) : undefined,
10887
10743
  };
10888
10744
  };
10889
10745
  var deserializeAws_restJson1MessageGroupsList = function (output, context) {
@@ -10949,7 +10805,7 @@ var deserializeAws_restJson1OutputContextsList = function (output, context) {
10949
10805
  };
10950
10806
  var deserializeAws_restJson1PathFormat = function (output, context) {
10951
10807
  return {
10952
- objectPrefixes: output.objectPrefixes !== undefined && output.objectPrefixes !== null
10808
+ objectPrefixes: output.objectPrefixes != null
10953
10809
  ? deserializeAws_restJson1ObjectPrefixes(output.objectPrefixes, context)
10954
10810
  : undefined,
10955
10811
  };
@@ -10961,13 +10817,13 @@ var deserializeAws_restJson1PlainTextMessage = function (output, context) {
10961
10817
  };
10962
10818
  var deserializeAws_restJson1PostFulfillmentStatusSpecification = function (output, context) {
10963
10819
  return {
10964
- failureResponse: output.failureResponse !== undefined && output.failureResponse !== null
10820
+ failureResponse: output.failureResponse != null
10965
10821
  ? deserializeAws_restJson1ResponseSpecification(output.failureResponse, context)
10966
10822
  : undefined,
10967
- successResponse: output.successResponse !== undefined && output.successResponse !== null
10823
+ successResponse: output.successResponse != null
10968
10824
  ? deserializeAws_restJson1ResponseSpecification(output.successResponse, context)
10969
10825
  : undefined,
10970
- timeoutResponse: output.timeoutResponse !== undefined && output.timeoutResponse !== null
10826
+ timeoutResponse: output.timeoutResponse != null
10971
10827
  ? deserializeAws_restJson1ResponseSpecification(output.timeoutResponse, context)
10972
10828
  : undefined,
10973
10829
  };
@@ -10976,9 +10832,10 @@ var deserializeAws_restJson1PromptSpecification = function (output, context) {
10976
10832
  return {
10977
10833
  allowInterrupt: __expectBoolean(output.allowInterrupt),
10978
10834
  maxRetries: __expectInt32(output.maxRetries),
10979
- messageGroups: output.messageGroups !== undefined && output.messageGroups !== null
10835
+ messageGroups: output.messageGroups != null
10980
10836
  ? deserializeAws_restJson1MessageGroupsList(output.messageGroups, context)
10981
10837
  : undefined,
10838
+ messageSelectionStrategy: __expectString(output.messageSelectionStrategy),
10982
10839
  };
10983
10840
  };
10984
10841
  var deserializeAws_restJson1RecommendedActions = function (output, context) {
@@ -11019,7 +10876,7 @@ var deserializeAws_restJson1RelativeAggregationDuration = function (output, cont
11019
10876
  var deserializeAws_restJson1ResponseSpecification = function (output, context) {
11020
10877
  return {
11021
10878
  allowInterrupt: __expectBoolean(output.allowInterrupt),
11022
- messageGroups: output.messageGroups !== undefined && output.messageGroups !== null
10879
+ messageGroups: output.messageGroups != null
11023
10880
  ? deserializeAws_restJson1MessageGroupsList(output.messageGroups, context)
11024
10881
  : undefined,
11025
10882
  };
@@ -11034,11 +10891,9 @@ var deserializeAws_restJson1S3BucketLogDestination = function (output, context)
11034
10891
  var deserializeAws_restJson1S3BucketTranscriptSource = function (output, context) {
11035
10892
  return {
11036
10893
  kmsKeyArn: __expectString(output.kmsKeyArn),
11037
- pathFormat: output.pathFormat !== undefined && output.pathFormat !== null
11038
- ? deserializeAws_restJson1PathFormat(output.pathFormat, context)
11039
- : undefined,
10894
+ pathFormat: output.pathFormat != null ? deserializeAws_restJson1PathFormat(output.pathFormat, context) : undefined,
11040
10895
  s3BucketName: __expectString(output.s3BucketName),
11041
- transcriptFilter: output.transcriptFilter !== undefined && output.transcriptFilter !== null
10896
+ transcriptFilter: output.transcriptFilter != null
11042
10897
  ? deserializeAws_restJson1TranscriptFilter(output.transcriptFilter, context)
11043
10898
  : undefined,
11044
10899
  transcriptFormat: __expectString(output.transcriptFormat),
@@ -11088,7 +10943,7 @@ var deserializeAws_restJson1SlotDefaultValueList = function (output, context) {
11088
10943
  };
11089
10944
  var deserializeAws_restJson1SlotDefaultValueSpecification = function (output, context) {
11090
10945
  return {
11091
- defaultValueList: output.defaultValueList !== undefined && output.defaultValueList !== null
10946
+ defaultValueList: output.defaultValueList != null
11092
10947
  ? deserializeAws_restJson1SlotDefaultValueList(output.defaultValueList, context)
11093
10948
  : undefined,
11094
10949
  };
@@ -11113,14 +10968,14 @@ var deserializeAws_restJson1SlotPriority = function (output, context) {
11113
10968
  var deserializeAws_restJson1SlotSummary = function (output, context) {
11114
10969
  return {
11115
10970
  description: __expectString(output.description),
11116
- lastUpdatedDateTime: output.lastUpdatedDateTime !== undefined && output.lastUpdatedDateTime !== null
10971
+ lastUpdatedDateTime: output.lastUpdatedDateTime != null
11117
10972
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime)))
11118
10973
  : undefined,
11119
10974
  slotConstraint: __expectString(output.slotConstraint),
11120
10975
  slotId: __expectString(output.slotId),
11121
10976
  slotName: __expectString(output.slotName),
11122
10977
  slotTypeId: __expectString(output.slotTypeId),
11123
- valueElicitationPromptSpecification: output.valueElicitationPromptSpecification !== undefined && output.valueElicitationPromptSpecification !== null
10978
+ valueElicitationPromptSpecification: output.valueElicitationPromptSpecification != null
11124
10979
  ? deserializeAws_restJson1PromptSpecification(output.valueElicitationPromptSpecification, context)
11125
10980
  : undefined,
11126
10981
  };
@@ -11144,7 +10999,7 @@ var deserializeAws_restJson1SlotTypeStatistics = function (output, context) {
11144
10999
  var deserializeAws_restJson1SlotTypeSummary = function (output, context) {
11145
11000
  return {
11146
11001
  description: __expectString(output.description),
11147
- lastUpdatedDateTime: output.lastUpdatedDateTime !== undefined && output.lastUpdatedDateTime !== null
11002
+ lastUpdatedDateTime: output.lastUpdatedDateTime != null
11148
11003
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime)))
11149
11004
  : undefined,
11150
11005
  parentSlotTypeSignature: __expectString(output.parentSlotTypeSignature),
@@ -11166,12 +11021,8 @@ var deserializeAws_restJson1SlotTypeSummaryList = function (output, context) {
11166
11021
  };
11167
11022
  var deserializeAws_restJson1SlotTypeValue = function (output, context) {
11168
11023
  return {
11169
- sampleValue: output.sampleValue !== undefined && output.sampleValue !== null
11170
- ? deserializeAws_restJson1SampleValue(output.sampleValue, context)
11171
- : undefined,
11172
- synonyms: output.synonyms !== undefined && output.synonyms !== null
11173
- ? deserializeAws_restJson1SynonymList(output.synonyms, context)
11174
- : undefined,
11024
+ sampleValue: output.sampleValue != null ? deserializeAws_restJson1SampleValue(output.sampleValue, context) : undefined,
11025
+ synonyms: output.synonyms != null ? deserializeAws_restJson1SynonymList(output.synonyms, context) : undefined,
11175
11026
  };
11176
11027
  };
11177
11028
  var deserializeAws_restJson1SlotTypeValues = function (output, context) {
@@ -11187,17 +11038,17 @@ var deserializeAws_restJson1SlotTypeValues = function (output, context) {
11187
11038
  };
11188
11039
  var deserializeAws_restJson1SlotValueElicitationSetting = function (output, context) {
11189
11040
  return {
11190
- defaultValueSpecification: output.defaultValueSpecification !== undefined && output.defaultValueSpecification !== null
11041
+ defaultValueSpecification: output.defaultValueSpecification != null
11191
11042
  ? deserializeAws_restJson1SlotDefaultValueSpecification(output.defaultValueSpecification, context)
11192
11043
  : undefined,
11193
- promptSpecification: output.promptSpecification !== undefined && output.promptSpecification !== null
11044
+ promptSpecification: output.promptSpecification != null
11194
11045
  ? deserializeAws_restJson1PromptSpecification(output.promptSpecification, context)
11195
11046
  : undefined,
11196
- sampleUtterances: output.sampleUtterances !== undefined && output.sampleUtterances !== null
11047
+ sampleUtterances: output.sampleUtterances != null
11197
11048
  ? deserializeAws_restJson1SampleUtterancesList(output.sampleUtterances, context)
11198
11049
  : undefined,
11199
11050
  slotConstraint: __expectString(output.slotConstraint),
11200
- waitAndContinueSpecification: output.waitAndContinueSpecification !== undefined && output.waitAndContinueSpecification !== null
11051
+ waitAndContinueSpecification: output.waitAndContinueSpecification != null
11201
11052
  ? deserializeAws_restJson1WaitAndContinueSpecification(output.waitAndContinueSpecification, context)
11202
11053
  : undefined,
11203
11054
  };
@@ -11209,10 +11060,10 @@ var deserializeAws_restJson1SlotValueRegexFilter = function (output, context) {
11209
11060
  };
11210
11061
  var deserializeAws_restJson1SlotValueSelectionSetting = function (output, context) {
11211
11062
  return {
11212
- advancedRecognitionSetting: output.advancedRecognitionSetting !== undefined && output.advancedRecognitionSetting !== null
11063
+ advancedRecognitionSetting: output.advancedRecognitionSetting != null
11213
11064
  ? deserializeAws_restJson1AdvancedRecognitionSetting(output.advancedRecognitionSetting, context)
11214
11065
  : undefined,
11215
- regexFilter: output.regexFilter !== undefined && output.regexFilter !== null
11066
+ regexFilter: output.regexFilter != null
11216
11067
  ? deserializeAws_restJson1SlotValueRegexFilter(output.regexFilter, context)
11217
11068
  : undefined,
11218
11069
  resolutionStrategy: __expectString(output.resolutionStrategy),
@@ -11227,7 +11078,7 @@ var deserializeAws_restJson1StillWaitingResponseSpecification = function (output
11227
11078
  return {
11228
11079
  allowInterrupt: __expectBoolean(output.allowInterrupt),
11229
11080
  frequencyInSeconds: __expectInt32(output.frequencyInSeconds),
11230
- messageGroups: output.messageGroups !== undefined && output.messageGroups !== null
11081
+ messageGroups: output.messageGroups != null
11231
11082
  ? deserializeAws_restJson1MessageGroupsList(output.messageGroups, context)
11232
11083
  : undefined,
11233
11084
  timeoutInSeconds: __expectInt32(output.timeoutInSeconds),
@@ -11256,16 +11107,14 @@ var deserializeAws_restJson1TagMap = function (output, context) {
11256
11107
  };
11257
11108
  var deserializeAws_restJson1TextLogDestination = function (output, context) {
11258
11109
  return {
11259
- cloudWatch: output.cloudWatch !== undefined && output.cloudWatch !== null
11110
+ cloudWatch: output.cloudWatch != null
11260
11111
  ? deserializeAws_restJson1CloudWatchLogGroupLogDestination(output.cloudWatch, context)
11261
11112
  : undefined,
11262
11113
  };
11263
11114
  };
11264
11115
  var deserializeAws_restJson1TextLogSetting = function (output, context) {
11265
11116
  return {
11266
- destination: output.destination !== undefined && output.destination !== null
11267
- ? deserializeAws_restJson1TextLogDestination(output.destination, context)
11268
- : undefined,
11117
+ destination: output.destination != null ? deserializeAws_restJson1TextLogDestination(output.destination, context) : undefined,
11269
11118
  enabled: __expectBoolean(output.enabled),
11270
11119
  };
11271
11120
  };
@@ -11282,21 +11131,21 @@ var deserializeAws_restJson1TextLogSettingsList = function (output, context) {
11282
11131
  };
11283
11132
  var deserializeAws_restJson1TranscriptFilter = function (output, context) {
11284
11133
  return {
11285
- lexTranscriptFilter: output.lexTranscriptFilter !== undefined && output.lexTranscriptFilter !== null
11134
+ lexTranscriptFilter: output.lexTranscriptFilter != null
11286
11135
  ? deserializeAws_restJson1LexTranscriptFilter(output.lexTranscriptFilter, context)
11287
11136
  : undefined,
11288
11137
  };
11289
11138
  };
11290
11139
  var deserializeAws_restJson1TranscriptSourceSetting = function (output, context) {
11291
11140
  return {
11292
- s3BucketTranscriptSource: output.s3BucketTranscriptSource !== undefined && output.s3BucketTranscriptSource !== null
11141
+ s3BucketTranscriptSource: output.s3BucketTranscriptSource != null
11293
11142
  ? deserializeAws_restJson1S3BucketTranscriptSource(output.s3BucketTranscriptSource, context)
11294
11143
  : undefined,
11295
11144
  };
11296
11145
  };
11297
11146
  var deserializeAws_restJson1UtteranceAggregationDuration = function (output, context) {
11298
11147
  return {
11299
- relativeAggregationDuration: output.relativeAggregationDuration !== undefined && output.relativeAggregationDuration !== null
11148
+ relativeAggregationDuration: output.relativeAggregationDuration != null
11300
11149
  ? deserializeAws_restJson1RelativeAggregationDuration(output.relativeAggregationDuration, context)
11301
11150
  : undefined,
11302
11151
  };
@@ -11310,13 +11159,13 @@ var deserializeAws_restJson1VoiceSettings = function (output, context) {
11310
11159
  var deserializeAws_restJson1WaitAndContinueSpecification = function (output, context) {
11311
11160
  return {
11312
11161
  active: __expectBoolean(output.active),
11313
- continueResponse: output.continueResponse !== undefined && output.continueResponse !== null
11162
+ continueResponse: output.continueResponse != null
11314
11163
  ? deserializeAws_restJson1ResponseSpecification(output.continueResponse, context)
11315
11164
  : undefined,
11316
- stillWaitingResponse: output.stillWaitingResponse !== undefined && output.stillWaitingResponse !== null
11165
+ stillWaitingResponse: output.stillWaitingResponse != null
11317
11166
  ? deserializeAws_restJson1StillWaitingResponseSpecification(output.stillWaitingResponse, context)
11318
11167
  : undefined,
11319
- waitingResponse: output.waitingResponse !== undefined && output.waitingResponse !== null
11168
+ waitingResponse: output.waitingResponse != null
11320
11169
  ? deserializeAws_restJson1ResponseSpecification(output.waitingResponse, context)
11321
11170
  : undefined,
11322
11171
  };
@@ -11377,5 +11226,4 @@ var loadRestJsonErrorCode = function (output, data) {
11377
11226
  if (data["__type"] !== undefined) {
11378
11227
  return sanitizeErrorCode(data["__type"]);
11379
11228
  }
11380
- return "";
11381
11229
  };