@aws-sdk/client-lex-models-v2 3.163.0 → 3.169.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.
@@ -285,11 +285,13 @@ export var serializeAws_restJson1CreateSlotCommand = function (input, context) {
285
285
  resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", function () { return input.botVersion; }, "{botVersion}", false);
286
286
  resolvedPath = __resolvedPath(resolvedPath, input, "localeId", function () { return input.localeId; }, "{localeId}", false);
287
287
  resolvedPath = __resolvedPath(resolvedPath, input, "intentId", function () { return input.intentId; }, "{intentId}", false);
288
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description != null && { description: input.description })), (input.multipleValuesSetting != null && {
288
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description != null && { description: input.description })), (input.multipleValuesSetting != null && {
289
289
  multipleValuesSetting: serializeAws_restJson1MultipleValuesSetting(input.multipleValuesSetting, context),
290
290
  })), (input.obfuscationSetting != null && {
291
291
  obfuscationSetting: serializeAws_restJson1ObfuscationSetting(input.obfuscationSetting, context),
292
- })), (input.slotName != null && { slotName: input.slotName })), (input.slotTypeId != null && { slotTypeId: input.slotTypeId })), (input.valueElicitationSetting != null && {
292
+ })), (input.slotName != null && { slotName: input.slotName })), (input.slotTypeId != null && { slotTypeId: input.slotTypeId })), (input.subSlotSetting != null && {
293
+ subSlotSetting: serializeAws_restJson1SubSlotSetting(input.subSlotSetting, context),
294
+ })), (input.valueElicitationSetting != null && {
293
295
  valueElicitationSetting: serializeAws_restJson1SlotValueElicitationSetting(input.valueElicitationSetting, context),
294
296
  })));
295
297
  return [2, new __HttpRequest({
@@ -319,7 +321,9 @@ export var serializeAws_restJson1CreateSlotTypeCommand = function (input, contex
319
321
  resolvedPath = __resolvedPath(resolvedPath, input, "botId", function () { return input.botId; }, "{botId}", false);
320
322
  resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", function () { return input.botVersion; }, "{botVersion}", false);
321
323
  resolvedPath = __resolvedPath(resolvedPath, input, "localeId", function () { return input.localeId; }, "{localeId}", false);
322
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description != null && { description: input.description })), (input.externalSourceSetting != null && {
324
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.compositeSlotTypeSetting != null && {
325
+ compositeSlotTypeSetting: serializeAws_restJson1CompositeSlotTypeSetting(input.compositeSlotTypeSetting, context),
326
+ })), (input.description != null && { description: input.description })), (input.externalSourceSetting != null && {
323
327
  externalSourceSetting: serializeAws_restJson1ExternalSourceSetting(input.externalSourceSetting, context),
324
328
  })), (input.parentSlotTypeSignature != null && { parentSlotTypeSignature: input.parentSlotTypeSignature })), (input.slotTypeName != null && { slotTypeName: input.slotTypeName })), (input.slotTypeValues != null && {
325
329
  slotTypeValues: serializeAws_restJson1SlotTypeValues(input.slotTypeValues, context),
@@ -1799,11 +1803,13 @@ export var serializeAws_restJson1UpdateSlotCommand = function (input, context) {
1799
1803
  resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", function () { return input.botVersion; }, "{botVersion}", false);
1800
1804
  resolvedPath = __resolvedPath(resolvedPath, input, "localeId", function () { return input.localeId; }, "{localeId}", false);
1801
1805
  resolvedPath = __resolvedPath(resolvedPath, input, "intentId", function () { return input.intentId; }, "{intentId}", false);
1802
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description != null && { description: input.description })), (input.multipleValuesSetting != null && {
1806
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description != null && { description: input.description })), (input.multipleValuesSetting != null && {
1803
1807
  multipleValuesSetting: serializeAws_restJson1MultipleValuesSetting(input.multipleValuesSetting, context),
1804
1808
  })), (input.obfuscationSetting != null && {
1805
1809
  obfuscationSetting: serializeAws_restJson1ObfuscationSetting(input.obfuscationSetting, context),
1806
- })), (input.slotName != null && { slotName: input.slotName })), (input.slotTypeId != null && { slotTypeId: input.slotTypeId })), (input.valueElicitationSetting != null && {
1810
+ })), (input.slotName != null && { slotName: input.slotName })), (input.slotTypeId != null && { slotTypeId: input.slotTypeId })), (input.subSlotSetting != null && {
1811
+ subSlotSetting: serializeAws_restJson1SubSlotSetting(input.subSlotSetting, context),
1812
+ })), (input.valueElicitationSetting != null && {
1807
1813
  valueElicitationSetting: serializeAws_restJson1SlotValueElicitationSetting(input.valueElicitationSetting, context),
1808
1814
  })));
1809
1815
  return [2, new __HttpRequest({
@@ -1834,7 +1840,9 @@ export var serializeAws_restJson1UpdateSlotTypeCommand = function (input, contex
1834
1840
  resolvedPath = __resolvedPath(resolvedPath, input, "botId", function () { return input.botId; }, "{botId}", false);
1835
1841
  resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", function () { return input.botVersion; }, "{botVersion}", false);
1836
1842
  resolvedPath = __resolvedPath(resolvedPath, input, "localeId", function () { return input.localeId; }, "{localeId}", false);
1837
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description != null && { description: input.description })), (input.externalSourceSetting != null && {
1843
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.compositeSlotTypeSetting != null && {
1844
+ compositeSlotTypeSetting: serializeAws_restJson1CompositeSlotTypeSetting(input.compositeSlotTypeSetting, context),
1845
+ })), (input.description != null && { description: input.description })), (input.externalSourceSetting != null && {
1838
1846
  externalSourceSetting: serializeAws_restJson1ExternalSourceSetting(input.externalSourceSetting, context),
1839
1847
  })), (input.parentSlotTypeSignature != null && { parentSlotTypeSignature: input.parentSlotTypeSignature })), (input.slotTypeName != null && { slotTypeName: input.slotTypeName })), (input.slotTypeValues != null && {
1840
1848
  slotTypeValues: serializeAws_restJson1SlotTypeValues(input.slotTypeValues, context),
@@ -2764,6 +2772,9 @@ export var deserializeAws_restJson1CreateSlotCommand = function (output, context
2764
2772
  if (data.slotTypeId != null) {
2765
2773
  contents.slotTypeId = __expectString(data.slotTypeId);
2766
2774
  }
2775
+ if (data.subSlotSetting != null) {
2776
+ contents.subSlotSetting = deserializeAws_restJson1SubSlotSetting(data.subSlotSetting, context);
2777
+ }
2767
2778
  if (data.valueElicitationSetting != null) {
2768
2779
  contents.valueElicitationSetting = deserializeAws_restJson1SlotValueElicitationSetting(data.valueElicitationSetting, context);
2769
2780
  }
@@ -2846,6 +2857,9 @@ export var deserializeAws_restJson1CreateSlotTypeCommand = function (output, con
2846
2857
  if (data.botVersion != null) {
2847
2858
  contents.botVersion = __expectString(data.botVersion);
2848
2859
  }
2860
+ if (data.compositeSlotTypeSetting != null) {
2861
+ contents.compositeSlotTypeSetting = deserializeAws_restJson1CompositeSlotTypeSetting(data.compositeSlotTypeSetting, context);
2862
+ }
2849
2863
  if (data.creationDateTime != null) {
2850
2864
  contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime)));
2851
2865
  }
@@ -5013,6 +5027,9 @@ export var deserializeAws_restJson1DescribeSlotCommand = function (output, conte
5013
5027
  if (data.slotTypeId != null) {
5014
5028
  contents.slotTypeId = __expectString(data.slotTypeId);
5015
5029
  }
5030
+ if (data.subSlotSetting != null) {
5031
+ contents.subSlotSetting = deserializeAws_restJson1SubSlotSetting(data.subSlotSetting, context);
5032
+ }
5016
5033
  if (data.valueElicitationSetting != null) {
5017
5034
  contents.valueElicitationSetting = deserializeAws_restJson1SlotValueElicitationSetting(data.valueElicitationSetting, context);
5018
5035
  }
@@ -5091,6 +5108,9 @@ export var deserializeAws_restJson1DescribeSlotTypeCommand = function (output, c
5091
5108
  if (data.botVersion != null) {
5092
5109
  contents.botVersion = __expectString(data.botVersion);
5093
5110
  }
5111
+ if (data.compositeSlotTypeSetting != null) {
5112
+ contents.compositeSlotTypeSetting = deserializeAws_restJson1CompositeSlotTypeSetting(data.compositeSlotTypeSetting, context);
5113
+ }
5094
5114
  if (data.creationDateTime != null) {
5095
5115
  contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime)));
5096
5116
  }
@@ -7611,6 +7631,9 @@ export var deserializeAws_restJson1UpdateSlotCommand = function (output, context
7611
7631
  if (data.slotTypeId != null) {
7612
7632
  contents.slotTypeId = __expectString(data.slotTypeId);
7613
7633
  }
7634
+ if (data.subSlotSetting != null) {
7635
+ contents.subSlotSetting = deserializeAws_restJson1SubSlotSetting(data.subSlotSetting, context);
7636
+ }
7614
7637
  if (data.valueElicitationSetting != null) {
7615
7638
  contents.valueElicitationSetting = deserializeAws_restJson1SlotValueElicitationSetting(data.valueElicitationSetting, context);
7616
7639
  }
@@ -7693,6 +7716,9 @@ export var deserializeAws_restJson1UpdateSlotTypeCommand = function (output, con
7693
7716
  if (data.botVersion != null) {
7694
7717
  contents.botVersion = __expectString(data.botVersion);
7695
7718
  }
7719
+ if (data.compositeSlotTypeSetting != null) {
7720
+ contents.compositeSlotTypeSetting = deserializeAws_restJson1CompositeSlotTypeSetting(data.compositeSlotTypeSetting, context);
7721
+ }
7696
7722
  if (data.creationDateTime != null) {
7697
7723
  contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime)));
7698
7724
  }
@@ -8010,6 +8036,9 @@ var serializeAws_restJson1CodeHookSpecification = function (input, context) {
8010
8036
  lambdaCodeHook: serializeAws_restJson1LambdaCodeHook(input.lambdaCodeHook, context),
8011
8037
  }));
8012
8038
  };
8039
+ var serializeAws_restJson1CompositeSlotTypeSetting = function (input, context) {
8040
+ return __assign({}, (input.subSlots != null && { subSlots: serializeAws_restJson1SubSlotTypeList(input.subSlots, context) }));
8041
+ };
8013
8042
  var serializeAws_restJson1Condition = function (input, context) {
8014
8043
  return __assign({}, (input.expressionString != null && { expressionString: input.expressionString }));
8015
8044
  };
@@ -8551,6 +8580,11 @@ var serializeAws_restJson1SlotValueSelectionSetting = function (input, context)
8551
8580
  regexFilter: serializeAws_restJson1SlotValueRegexFilter(input.regexFilter, context),
8552
8581
  })), (input.resolutionStrategy != null && { resolutionStrategy: input.resolutionStrategy }));
8553
8582
  };
8583
+ var serializeAws_restJson1Specifications = function (input, context) {
8584
+ return __assign(__assign({}, (input.slotTypeId != null && { slotTypeId: input.slotTypeId })), (input.valueElicitationSetting != null && {
8585
+ valueElicitationSetting: serializeAws_restJson1SubSlotValueElicitationSetting(input.valueElicitationSetting, context),
8586
+ }));
8587
+ };
8554
8588
  var serializeAws_restJson1SSMLMessage = function (input, context) {
8555
8589
  return __assign({}, (input.value != null && { value: input.value }));
8556
8590
  };
@@ -8569,6 +8603,42 @@ var serializeAws_restJson1StringMap = function (input, context) {
8569
8603
  return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
8570
8604
  }, {});
8571
8605
  };
8606
+ var serializeAws_restJson1SubSlotSetting = function (input, context) {
8607
+ return __assign(__assign({}, (input.expression != null && { expression: input.expression })), (input.slotSpecifications != null && {
8608
+ slotSpecifications: serializeAws_restJson1SubSlotSpecificationMap(input.slotSpecifications, context),
8609
+ }));
8610
+ };
8611
+ var serializeAws_restJson1SubSlotSpecificationMap = function (input, context) {
8612
+ return Object.entries(input).reduce(function (acc, _a) {
8613
+ var _b;
8614
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
8615
+ if (value === null) {
8616
+ return acc;
8617
+ }
8618
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = serializeAws_restJson1Specifications(value, context), _b));
8619
+ }, {});
8620
+ };
8621
+ var serializeAws_restJson1SubSlotTypeComposition = function (input, context) {
8622
+ return __assign(__assign({}, (input.name != null && { name: input.name })), (input.slotTypeId != null && { slotTypeId: input.slotTypeId }));
8623
+ };
8624
+ var serializeAws_restJson1SubSlotTypeList = function (input, context) {
8625
+ return input
8626
+ .filter(function (e) { return e != null; })
8627
+ .map(function (entry) {
8628
+ return serializeAws_restJson1SubSlotTypeComposition(entry, context);
8629
+ });
8630
+ };
8631
+ var serializeAws_restJson1SubSlotValueElicitationSetting = function (input, context) {
8632
+ return __assign(__assign(__assign(__assign({}, (input.defaultValueSpecification != null && {
8633
+ defaultValueSpecification: serializeAws_restJson1SlotDefaultValueSpecification(input.defaultValueSpecification, context),
8634
+ })), (input.promptSpecification != null && {
8635
+ promptSpecification: serializeAws_restJson1PromptSpecification(input.promptSpecification, context),
8636
+ })), (input.sampleUtterances != null && {
8637
+ sampleUtterances: serializeAws_restJson1SampleUtterancesList(input.sampleUtterances, context),
8638
+ })), (input.waitAndContinueSpecification != null && {
8639
+ waitAndContinueSpecification: serializeAws_restJson1WaitAndContinueSpecification(input.waitAndContinueSpecification, context),
8640
+ }));
8641
+ };
8572
8642
  var serializeAws_restJson1SynonymList = function (input, context) {
8573
8643
  return input
8574
8644
  .filter(function (e) { return e != null; })
@@ -8996,6 +9066,11 @@ var deserializeAws_restJson1CodeHookSpecification = function (output, context) {
8996
9066
  : undefined,
8997
9067
  };
8998
9068
  };
9069
+ var deserializeAws_restJson1CompositeSlotTypeSetting = function (output, context) {
9070
+ return {
9071
+ subSlots: output.subSlots != null ? deserializeAws_restJson1SubSlotTypeList(output.subSlots, context) : undefined,
9072
+ };
9073
+ };
8999
9074
  var deserializeAws_restJson1Condition = function (output, context) {
9000
9075
  return {
9001
9076
  expressionString: __expectString(output.expressionString),
@@ -9867,6 +9942,14 @@ var deserializeAws_restJson1SlotValueSelectionSetting = function (output, contex
9867
9942
  resolutionStrategy: __expectString(output.resolutionStrategy),
9868
9943
  };
9869
9944
  };
9945
+ var deserializeAws_restJson1Specifications = function (output, context) {
9946
+ return {
9947
+ slotTypeId: __expectString(output.slotTypeId),
9948
+ valueElicitationSetting: output.valueElicitationSetting != null
9949
+ ? deserializeAws_restJson1SubSlotValueElicitationSetting(output.valueElicitationSetting, context)
9950
+ : undefined,
9951
+ };
9952
+ };
9870
9953
  var deserializeAws_restJson1SSMLMessage = function (output, context) {
9871
9954
  return {
9872
9955
  value: __expectString(output.value),
@@ -9892,6 +9975,57 @@ var deserializeAws_restJson1StringMap = function (output, context) {
9892
9975
  return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
9893
9976
  }, {});
9894
9977
  };
9978
+ var deserializeAws_restJson1SubSlotSetting = function (output, context) {
9979
+ return {
9980
+ expression: __expectString(output.expression),
9981
+ slotSpecifications: output.slotSpecifications != null
9982
+ ? deserializeAws_restJson1SubSlotSpecificationMap(output.slotSpecifications, context)
9983
+ : undefined,
9984
+ };
9985
+ };
9986
+ var deserializeAws_restJson1SubSlotSpecificationMap = function (output, context) {
9987
+ return Object.entries(output).reduce(function (acc, _a) {
9988
+ var _b;
9989
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
9990
+ if (value === null) {
9991
+ return acc;
9992
+ }
9993
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = deserializeAws_restJson1Specifications(value, context), _b));
9994
+ }, {});
9995
+ };
9996
+ var deserializeAws_restJson1SubSlotTypeComposition = function (output, context) {
9997
+ return {
9998
+ name: __expectString(output.name),
9999
+ slotTypeId: __expectString(output.slotTypeId),
10000
+ };
10001
+ };
10002
+ var deserializeAws_restJson1SubSlotTypeList = function (output, context) {
10003
+ var retVal = (output || [])
10004
+ .filter(function (e) { return e != null; })
10005
+ .map(function (entry) {
10006
+ if (entry === null) {
10007
+ return null;
10008
+ }
10009
+ return deserializeAws_restJson1SubSlotTypeComposition(entry, context);
10010
+ });
10011
+ return retVal;
10012
+ };
10013
+ var deserializeAws_restJson1SubSlotValueElicitationSetting = function (output, context) {
10014
+ return {
10015
+ defaultValueSpecification: output.defaultValueSpecification != null
10016
+ ? deserializeAws_restJson1SlotDefaultValueSpecification(output.defaultValueSpecification, context)
10017
+ : undefined,
10018
+ promptSpecification: output.promptSpecification != null
10019
+ ? deserializeAws_restJson1PromptSpecification(output.promptSpecification, context)
10020
+ : undefined,
10021
+ sampleUtterances: output.sampleUtterances != null
10022
+ ? deserializeAws_restJson1SampleUtterancesList(output.sampleUtterances, context)
10023
+ : undefined,
10024
+ waitAndContinueSpecification: output.waitAndContinueSpecification != null
10025
+ ? deserializeAws_restJson1WaitAndContinueSpecification(output.waitAndContinueSpecification, context)
10026
+ : undefined,
10027
+ };
10028
+ };
9895
10029
  var deserializeAws_restJson1SynonymList = function (output, context) {
9896
10030
  var retVal = (output || [])
9897
10031
  .filter(function (e) { return e != null; })
@@ -10019,6 +10153,9 @@ var loadRestJsonErrorCode = function (output, data) {
10019
10153
  if (typeof cleanValue === "number") {
10020
10154
  cleanValue = cleanValue.toString();
10021
10155
  }
10156
+ if (cleanValue.indexOf(",") >= 0) {
10157
+ cleanValue = cleanValue.split(",")[0];
10158
+ }
10022
10159
  if (cleanValue.indexOf(":") >= 0) {
10023
10160
  cleanValue = cleanValue.split(":")[0];
10024
10161
  }