@aws-sdk/client-comprehend 3.28.0 → 3.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { expectInt as __expectInt, expectString as __expectString, limitedParseFloat as __limitedParseFloat, } from "@aws-sdk/smithy-client";
3
+ import { expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, } from "@aws-sdk/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
5
  export var serializeAws_json1_1BatchDetectDominantLanguageCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
6
6
  var headers, body;
@@ -5948,10 +5948,12 @@ var serializeAws_json1_1AttributeNamesList = function (input, context) {
5948
5948
  });
5949
5949
  };
5950
5950
  var serializeAws_json1_1AugmentedManifestsListItem = function (input, context) {
5951
- return __assign(__assign({}, (input.AttributeNames !== undefined &&
5951
+ return __assign(__assign(__assign(__assign(__assign({}, (input.AnnotationDataS3Uri !== undefined &&
5952
+ input.AnnotationDataS3Uri !== null && { AnnotationDataS3Uri: input.AnnotationDataS3Uri })), (input.AttributeNames !== undefined &&
5952
5953
  input.AttributeNames !== null && {
5953
5954
  AttributeNames: serializeAws_json1_1AttributeNamesList(input.AttributeNames, context),
5954
- })), (input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri }));
5955
+ })), (input.DocumentType !== undefined && input.DocumentType !== null && { DocumentType: input.DocumentType })), (input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri })), (input.SourceDocumentsS3Uri !== undefined &&
5956
+ input.SourceDocumentsS3Uri !== null && { SourceDocumentsS3Uri: input.SourceDocumentsS3Uri }));
5955
5957
  };
5956
5958
  var serializeAws_json1_1BatchDetectDominantLanguageRequest = function (input, context) {
5957
5959
  return __assign({}, (input.TextList !== undefined &&
@@ -6114,6 +6116,14 @@ var serializeAws_json1_1DocumentClassifierInputDataConfig = function (input, con
6114
6116
  var serializeAws_json1_1DocumentClassifierOutputDataConfig = function (input, context) {
6115
6117
  return __assign(__assign({}, (input.KmsKeyId !== undefined && input.KmsKeyId !== null && { KmsKeyId: input.KmsKeyId })), (input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri }));
6116
6118
  };
6119
+ var serializeAws_json1_1DocumentReaderConfig = function (input, context) {
6120
+ return __assign(__assign(__assign({}, (input.DocumentReadAction !== undefined &&
6121
+ input.DocumentReadAction !== null && { DocumentReadAction: input.DocumentReadAction })), (input.DocumentReadMode !== undefined &&
6122
+ input.DocumentReadMode !== null && { DocumentReadMode: input.DocumentReadMode })), (input.FeatureTypes !== undefined &&
6123
+ input.FeatureTypes !== null && {
6124
+ FeatureTypes: serializeAws_json1_1ListOfDocumentReadFeatureTypes(input.FeatureTypes, context),
6125
+ }));
6126
+ };
6117
6127
  var serializeAws_json1_1DominantLanguageDetectionJobFilter = function (input, context) {
6118
6128
  return __assign(__assign(__assign(__assign({}, (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.JobStatus !== undefined && input.JobStatus !== null && { JobStatus: input.JobStatus })), (input.SubmitTimeAfter !== undefined &&
6119
6129
  input.SubmitTimeAfter !== null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore !== undefined &&
@@ -6190,7 +6200,10 @@ var serializeAws_json1_1EventsDetectionJobFilter = function (input, context) {
6190
6200
  input.SubmitTimeBefore !== null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
6191
6201
  };
6192
6202
  var serializeAws_json1_1InputDataConfig = function (input, context) {
6193
- return __assign(__assign({}, (input.InputFormat !== undefined && input.InputFormat !== null && { InputFormat: input.InputFormat })), (input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri }));
6203
+ return __assign(__assign(__assign({}, (input.DocumentReaderConfig !== undefined &&
6204
+ input.DocumentReaderConfig !== null && {
6205
+ DocumentReaderConfig: serializeAws_json1_1DocumentReaderConfig(input.DocumentReaderConfig, context),
6206
+ })), (input.InputFormat !== undefined && input.InputFormat !== null && { InputFormat: input.InputFormat })), (input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri }));
6194
6207
  };
6195
6208
  var serializeAws_json1_1KeyPhrasesDetectionJobFilter = function (input, context) {
6196
6209
  return __assign(__assign(__assign(__assign({}, (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.JobStatus !== undefined && input.JobStatus !== null && { JobStatus: input.JobStatus })), (input.SubmitTimeAfter !== undefined &&
@@ -6231,6 +6244,16 @@ var serializeAws_json1_1ListKeyPhrasesDetectionJobsRequest = function (input, co
6231
6244
  return __assign(__assign(__assign({}, (input.Filter !== undefined &&
6232
6245
  input.Filter !== null && { Filter: serializeAws_json1_1KeyPhrasesDetectionJobFilter(input.Filter, context) })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
6233
6246
  };
6247
+ var serializeAws_json1_1ListOfDocumentReadFeatureTypes = function (input, context) {
6248
+ return input
6249
+ .filter(function (e) { return e != null; })
6250
+ .map(function (entry) {
6251
+ if (entry === null) {
6252
+ return null;
6253
+ }
6254
+ return entry;
6255
+ });
6256
+ };
6234
6257
  var serializeAws_json1_1ListOfPiiEntityTypes = function (input, context) {
6235
6258
  return input
6236
6259
  .filter(function (e) { return e != null; })
@@ -6498,15 +6521,18 @@ var deserializeAws_json1_1AttributeNamesList = function (output, context) {
6498
6521
  };
6499
6522
  var deserializeAws_json1_1AugmentedManifestsListItem = function (output, context) {
6500
6523
  return {
6524
+ AnnotationDataS3Uri: __expectString(output.AnnotationDataS3Uri),
6501
6525
  AttributeNames: output.AttributeNames !== undefined && output.AttributeNames !== null
6502
6526
  ? deserializeAws_json1_1AttributeNamesList(output.AttributeNames, context)
6503
6527
  : undefined,
6528
+ DocumentType: __expectString(output.DocumentType),
6504
6529
  S3Uri: __expectString(output.S3Uri),
6530
+ SourceDocumentsS3Uri: __expectString(output.SourceDocumentsS3Uri),
6505
6531
  };
6506
6532
  };
6507
6533
  var deserializeAws_json1_1BatchDetectDominantLanguageItemResult = function (output, context) {
6508
6534
  return {
6509
- Index: __expectInt(output.Index),
6535
+ Index: __expectInt32(output.Index),
6510
6536
  Languages: output.Languages !== undefined && output.Languages !== null
6511
6537
  ? deserializeAws_json1_1ListOfDominantLanguages(output.Languages, context)
6512
6538
  : undefined,
@@ -6527,7 +6553,7 @@ var deserializeAws_json1_1BatchDetectEntitiesItemResult = function (output, cont
6527
6553
  Entities: output.Entities !== undefined && output.Entities !== null
6528
6554
  ? deserializeAws_json1_1ListOfEntities(output.Entities, context)
6529
6555
  : undefined,
6530
- Index: __expectInt(output.Index),
6556
+ Index: __expectInt32(output.Index),
6531
6557
  };
6532
6558
  };
6533
6559
  var deserializeAws_json1_1BatchDetectEntitiesResponse = function (output, context) {
@@ -6542,7 +6568,7 @@ var deserializeAws_json1_1BatchDetectEntitiesResponse = function (output, contex
6542
6568
  };
6543
6569
  var deserializeAws_json1_1BatchDetectKeyPhrasesItemResult = function (output, context) {
6544
6570
  return {
6545
- Index: __expectInt(output.Index),
6571
+ Index: __expectInt32(output.Index),
6546
6572
  KeyPhrases: output.KeyPhrases !== undefined && output.KeyPhrases !== null
6547
6573
  ? deserializeAws_json1_1ListOfKeyPhrases(output.KeyPhrases, context)
6548
6574
  : undefined,
@@ -6560,7 +6586,7 @@ var deserializeAws_json1_1BatchDetectKeyPhrasesResponse = function (output, cont
6560
6586
  };
6561
6587
  var deserializeAws_json1_1BatchDetectSentimentItemResult = function (output, context) {
6562
6588
  return {
6563
- Index: __expectInt(output.Index),
6589
+ Index: __expectInt32(output.Index),
6564
6590
  Sentiment: __expectString(output.Sentiment),
6565
6591
  SentimentScore: output.SentimentScore !== undefined && output.SentimentScore !== null
6566
6592
  ? deserializeAws_json1_1SentimentScore(output.SentimentScore, context)
@@ -6579,7 +6605,7 @@ var deserializeAws_json1_1BatchDetectSentimentResponse = function (output, conte
6579
6605
  };
6580
6606
  var deserializeAws_json1_1BatchDetectSyntaxItemResult = function (output, context) {
6581
6607
  return {
6582
- Index: __expectInt(output.Index),
6608
+ Index: __expectInt32(output.Index),
6583
6609
  SyntaxTokens: output.SyntaxTokens !== undefined && output.SyntaxTokens !== null
6584
6610
  ? deserializeAws_json1_1ListOfSyntaxTokens(output.SyntaxTokens, context)
6585
6611
  : undefined,
@@ -6599,7 +6625,7 @@ var deserializeAws_json1_1BatchItemError = function (output, context) {
6599
6625
  return {
6600
6626
  ErrorCode: __expectString(output.ErrorCode),
6601
6627
  ErrorMessage: __expectString(output.ErrorMessage),
6602
- Index: __expectInt(output.Index),
6628
+ Index: __expectInt32(output.Index),
6603
6629
  };
6604
6630
  };
6605
6631
  var deserializeAws_json1_1BatchItemErrorList = function (output, context) {
@@ -6619,14 +6645,14 @@ var deserializeAws_json1_1BatchSizeLimitExceededException = function (output, co
6619
6645
  };
6620
6646
  var deserializeAws_json1_1ClassifierEvaluationMetrics = function (output, context) {
6621
6647
  return {
6622
- Accuracy: __limitedParseFloat(output.Accuracy),
6623
- F1Score: __limitedParseFloat(output.F1Score),
6624
- HammingLoss: __limitedParseFloat(output.HammingLoss),
6625
- MicroF1Score: __limitedParseFloat(output.MicroF1Score),
6626
- MicroPrecision: __limitedParseFloat(output.MicroPrecision),
6627
- MicroRecall: __limitedParseFloat(output.MicroRecall),
6628
- Precision: __limitedParseFloat(output.Precision),
6629
- Recall: __limitedParseFloat(output.Recall),
6648
+ Accuracy: __limitedParseDouble(output.Accuracy),
6649
+ F1Score: __limitedParseDouble(output.F1Score),
6650
+ HammingLoss: __limitedParseDouble(output.HammingLoss),
6651
+ MicroF1Score: __limitedParseDouble(output.MicroF1Score),
6652
+ MicroPrecision: __limitedParseDouble(output.MicroPrecision),
6653
+ MicroRecall: __limitedParseDouble(output.MicroRecall),
6654
+ Precision: __limitedParseDouble(output.Precision),
6655
+ Recall: __limitedParseDouble(output.Recall),
6630
6656
  };
6631
6657
  };
6632
6658
  var deserializeAws_json1_1ClassifierMetadata = function (output, context) {
@@ -6634,9 +6660,9 @@ var deserializeAws_json1_1ClassifierMetadata = function (output, context) {
6634
6660
  EvaluationMetrics: output.EvaluationMetrics !== undefined && output.EvaluationMetrics !== null
6635
6661
  ? deserializeAws_json1_1ClassifierEvaluationMetrics(output.EvaluationMetrics, context)
6636
6662
  : undefined,
6637
- NumberOfLabels: __expectInt(output.NumberOfLabels),
6638
- NumberOfTestDocuments: __expectInt(output.NumberOfTestDocuments),
6639
- NumberOfTrainedDocuments: __expectInt(output.NumberOfTrainedDocuments),
6663
+ NumberOfLabels: __expectInt32(output.NumberOfLabels),
6664
+ NumberOfTestDocuments: __expectInt32(output.NumberOfTestDocuments),
6665
+ NumberOfTrainedDocuments: __expectInt32(output.NumberOfTrainedDocuments),
6640
6666
  };
6641
6667
  };
6642
6668
  var deserializeAws_json1_1ClassifyDocumentResponse = function (output, context) {
@@ -6809,14 +6835,16 @@ var deserializeAws_json1_1DetectSyntaxResponse = function (output, context) {
6809
6835
  var deserializeAws_json1_1DocumentClass = function (output, context) {
6810
6836
  return {
6811
6837
  Name: __expectString(output.Name),
6812
- Score: __limitedParseFloat(output.Score),
6838
+ Score: __limitedParseFloat32(output.Score),
6813
6839
  };
6814
6840
  };
6815
6841
  var deserializeAws_json1_1DocumentClassificationJobProperties = function (output, context) {
6816
6842
  return {
6817
6843
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
6818
6844
  DocumentClassifierArn: __expectString(output.DocumentClassifierArn),
6819
- EndTime: output.EndTime !== undefined && output.EndTime !== null ? new Date(Math.round(output.EndTime * 1000)) : undefined,
6845
+ EndTime: output.EndTime !== undefined && output.EndTime !== null
6846
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
6847
+ : undefined,
6820
6848
  InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
6821
6849
  ? deserializeAws_json1_1InputDataConfig(output.InputDataConfig, context)
6822
6850
  : undefined,
@@ -6829,7 +6857,7 @@ var deserializeAws_json1_1DocumentClassificationJobProperties = function (output
6829
6857
  ? deserializeAws_json1_1OutputDataConfig(output.OutputDataConfig, context)
6830
6858
  : undefined,
6831
6859
  SubmitTime: output.SubmitTime !== undefined && output.SubmitTime !== null
6832
- ? new Date(Math.round(output.SubmitTime * 1000))
6860
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime)))
6833
6861
  : undefined,
6834
6862
  VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId),
6835
6863
  VpcConfig: output.VpcConfig !== undefined && output.VpcConfig !== null
@@ -6880,7 +6908,9 @@ var deserializeAws_json1_1DocumentClassifierProperties = function (output, conte
6880
6908
  : undefined,
6881
6909
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
6882
6910
  DocumentClassifierArn: __expectString(output.DocumentClassifierArn),
6883
- EndTime: output.EndTime !== undefined && output.EndTime !== null ? new Date(Math.round(output.EndTime * 1000)) : undefined,
6911
+ EndTime: output.EndTime !== undefined && output.EndTime !== null
6912
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
6913
+ : undefined,
6884
6914
  InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
6885
6915
  ? deserializeAws_json1_1DocumentClassifierInputDataConfig(output.InputDataConfig, context)
6886
6916
  : undefined,
@@ -6893,13 +6923,13 @@ var deserializeAws_json1_1DocumentClassifierProperties = function (output, conte
6893
6923
  : undefined,
6894
6924
  Status: __expectString(output.Status),
6895
6925
  SubmitTime: output.SubmitTime !== undefined && output.SubmitTime !== null
6896
- ? new Date(Math.round(output.SubmitTime * 1000))
6926
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime)))
6897
6927
  : undefined,
6898
6928
  TrainingEndTime: output.TrainingEndTime !== undefined && output.TrainingEndTime !== null
6899
- ? new Date(Math.round(output.TrainingEndTime * 1000))
6929
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingEndTime)))
6900
6930
  : undefined,
6901
6931
  TrainingStartTime: output.TrainingStartTime !== undefined && output.TrainingStartTime !== null
6902
- ? new Date(Math.round(output.TrainingStartTime * 1000))
6932
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingStartTime)))
6903
6933
  : undefined,
6904
6934
  VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId),
6905
6935
  VpcConfig: output.VpcConfig !== undefined && output.VpcConfig !== null
@@ -6920,19 +6950,30 @@ var deserializeAws_json1_1DocumentClassifierPropertiesList = function (output, c
6920
6950
  var deserializeAws_json1_1DocumentLabel = function (output, context) {
6921
6951
  return {
6922
6952
  Name: __expectString(output.Name),
6923
- Score: __limitedParseFloat(output.Score),
6953
+ Score: __limitedParseFloat32(output.Score),
6954
+ };
6955
+ };
6956
+ var deserializeAws_json1_1DocumentReaderConfig = function (output, context) {
6957
+ return {
6958
+ DocumentReadAction: __expectString(output.DocumentReadAction),
6959
+ DocumentReadMode: __expectString(output.DocumentReadMode),
6960
+ FeatureTypes: output.FeatureTypes !== undefined && output.FeatureTypes !== null
6961
+ ? deserializeAws_json1_1ListOfDocumentReadFeatureTypes(output.FeatureTypes, context)
6962
+ : undefined,
6924
6963
  };
6925
6964
  };
6926
6965
  var deserializeAws_json1_1DominantLanguage = function (output, context) {
6927
6966
  return {
6928
6967
  LanguageCode: __expectString(output.LanguageCode),
6929
- Score: __limitedParseFloat(output.Score),
6968
+ Score: __limitedParseFloat32(output.Score),
6930
6969
  };
6931
6970
  };
6932
6971
  var deserializeAws_json1_1DominantLanguageDetectionJobProperties = function (output, context) {
6933
6972
  return {
6934
6973
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
6935
- EndTime: output.EndTime !== undefined && output.EndTime !== null ? new Date(Math.round(output.EndTime * 1000)) : undefined,
6974
+ EndTime: output.EndTime !== undefined && output.EndTime !== null
6975
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
6976
+ : undefined,
6936
6977
  InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
6937
6978
  ? deserializeAws_json1_1InputDataConfig(output.InputDataConfig, context)
6938
6979
  : undefined,
@@ -6945,7 +6986,7 @@ var deserializeAws_json1_1DominantLanguageDetectionJobProperties = function (out
6945
6986
  ? deserializeAws_json1_1OutputDataConfig(output.OutputDataConfig, context)
6946
6987
  : undefined,
6947
6988
  SubmitTime: output.SubmitTime !== undefined && output.SubmitTime !== null
6948
- ? new Date(Math.round(output.SubmitTime * 1000))
6989
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime)))
6949
6990
  : undefined,
6950
6991
  VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId),
6951
6992
  VpcConfig: output.VpcConfig !== undefined && output.VpcConfig !== null
@@ -6966,14 +7007,14 @@ var deserializeAws_json1_1DominantLanguageDetectionJobPropertiesList = function
6966
7007
  var deserializeAws_json1_1EndpointProperties = function (output, context) {
6967
7008
  return {
6968
7009
  CreationTime: output.CreationTime !== undefined && output.CreationTime !== null
6969
- ? new Date(Math.round(output.CreationTime * 1000))
7010
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
6970
7011
  : undefined,
6971
- CurrentInferenceUnits: __expectInt(output.CurrentInferenceUnits),
7012
+ CurrentInferenceUnits: __expectInt32(output.CurrentInferenceUnits),
6972
7013
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
6973
- DesiredInferenceUnits: __expectInt(output.DesiredInferenceUnits),
7014
+ DesiredInferenceUnits: __expectInt32(output.DesiredInferenceUnits),
6974
7015
  EndpointArn: __expectString(output.EndpointArn),
6975
7016
  LastModifiedTime: output.LastModifiedTime !== undefined && output.LastModifiedTime !== null
6976
- ? new Date(Math.round(output.LastModifiedTime * 1000))
7017
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime)))
6977
7018
  : undefined,
6978
7019
  Message: __expectString(output.Message),
6979
7020
  ModelArn: __expectString(output.ModelArn),
@@ -6993,7 +7034,9 @@ var deserializeAws_json1_1EndpointPropertiesList = function (output, context) {
6993
7034
  var deserializeAws_json1_1EntitiesDetectionJobProperties = function (output, context) {
6994
7035
  return {
6995
7036
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
6996
- EndTime: output.EndTime !== undefined && output.EndTime !== null ? new Date(Math.round(output.EndTime * 1000)) : undefined,
7037
+ EndTime: output.EndTime !== undefined && output.EndTime !== null
7038
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
7039
+ : undefined,
6997
7040
  EntityRecognizerArn: __expectString(output.EntityRecognizerArn),
6998
7041
  InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
6999
7042
  ? deserializeAws_json1_1InputDataConfig(output.InputDataConfig, context)
@@ -7008,7 +7051,7 @@ var deserializeAws_json1_1EntitiesDetectionJobProperties = function (output, con
7008
7051
  ? deserializeAws_json1_1OutputDataConfig(output.OutputDataConfig, context)
7009
7052
  : undefined,
7010
7053
  SubmitTime: output.SubmitTime !== undefined && output.SubmitTime !== null
7011
- ? new Date(Math.round(output.SubmitTime * 1000))
7054
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime)))
7012
7055
  : undefined,
7013
7056
  VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId),
7014
7057
  VpcConfig: output.VpcConfig !== undefined && output.VpcConfig !== null
@@ -7028,9 +7071,9 @@ var deserializeAws_json1_1EntitiesDetectionJobPropertiesList = function (output,
7028
7071
  };
7029
7072
  var deserializeAws_json1_1Entity = function (output, context) {
7030
7073
  return {
7031
- BeginOffset: __expectInt(output.BeginOffset),
7032
- EndOffset: __expectInt(output.EndOffset),
7033
- Score: __limitedParseFloat(output.Score),
7074
+ BeginOffset: __expectInt32(output.BeginOffset),
7075
+ EndOffset: __expectInt32(output.EndOffset),
7076
+ Score: __limitedParseFloat32(output.Score),
7034
7077
  Text: __expectString(output.Text),
7035
7078
  Type: __expectString(output.Type),
7036
7079
  };
@@ -7038,7 +7081,7 @@ var deserializeAws_json1_1Entity = function (output, context) {
7038
7081
  var deserializeAws_json1_1EntityLabel = function (output, context) {
7039
7082
  return {
7040
7083
  Name: __expectString(output.Name),
7041
- Score: __limitedParseFloat(output.Score),
7084
+ Score: __limitedParseFloat32(output.Score),
7042
7085
  };
7043
7086
  };
7044
7087
  var deserializeAws_json1_1EntityRecognizerAnnotations = function (output, context) {
@@ -7068,9 +7111,9 @@ var deserializeAws_json1_1EntityRecognizerEntityList = function (output, context
7068
7111
  };
7069
7112
  var deserializeAws_json1_1EntityRecognizerEvaluationMetrics = function (output, context) {
7070
7113
  return {
7071
- F1Score: __limitedParseFloat(output.F1Score),
7072
- Precision: __limitedParseFloat(output.Precision),
7073
- Recall: __limitedParseFloat(output.Recall),
7114
+ F1Score: __limitedParseDouble(output.F1Score),
7115
+ Precision: __limitedParseDouble(output.Precision),
7116
+ Recall: __limitedParseDouble(output.Recall),
7074
7117
  };
7075
7118
  };
7076
7119
  var deserializeAws_json1_1EntityRecognizerInputDataConfig = function (output, context) {
@@ -7101,8 +7144,8 @@ var deserializeAws_json1_1EntityRecognizerMetadata = function (output, context)
7101
7144
  EvaluationMetrics: output.EvaluationMetrics !== undefined && output.EvaluationMetrics !== null
7102
7145
  ? deserializeAws_json1_1EntityRecognizerEvaluationMetrics(output.EvaluationMetrics, context)
7103
7146
  : undefined,
7104
- NumberOfTestDocuments: __expectInt(output.NumberOfTestDocuments),
7105
- NumberOfTrainedDocuments: __expectInt(output.NumberOfTrainedDocuments),
7147
+ NumberOfTestDocuments: __expectInt32(output.NumberOfTestDocuments),
7148
+ NumberOfTrainedDocuments: __expectInt32(output.NumberOfTrainedDocuments),
7106
7149
  };
7107
7150
  };
7108
7151
  var deserializeAws_json1_1EntityRecognizerMetadataEntityTypesList = function (output, context) {
@@ -7120,14 +7163,16 @@ var deserializeAws_json1_1EntityRecognizerMetadataEntityTypesListItem = function
7120
7163
  EvaluationMetrics: output.EvaluationMetrics !== undefined && output.EvaluationMetrics !== null
7121
7164
  ? deserializeAws_json1_1EntityTypesEvaluationMetrics(output.EvaluationMetrics, context)
7122
7165
  : undefined,
7123
- NumberOfTrainMentions: __expectInt(output.NumberOfTrainMentions),
7166
+ NumberOfTrainMentions: __expectInt32(output.NumberOfTrainMentions),
7124
7167
  Type: __expectString(output.Type),
7125
7168
  };
7126
7169
  };
7127
7170
  var deserializeAws_json1_1EntityRecognizerProperties = function (output, context) {
7128
7171
  return {
7129
7172
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
7130
- EndTime: output.EndTime !== undefined && output.EndTime !== null ? new Date(Math.round(output.EndTime * 1000)) : undefined,
7173
+ EndTime: output.EndTime !== undefined && output.EndTime !== null
7174
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
7175
+ : undefined,
7131
7176
  EntityRecognizerArn: __expectString(output.EntityRecognizerArn),
7132
7177
  InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
7133
7178
  ? deserializeAws_json1_1EntityRecognizerInputDataConfig(output.InputDataConfig, context)
@@ -7140,13 +7185,13 @@ var deserializeAws_json1_1EntityRecognizerProperties = function (output, context
7140
7185
  : undefined,
7141
7186
  Status: __expectString(output.Status),
7142
7187
  SubmitTime: output.SubmitTime !== undefined && output.SubmitTime !== null
7143
- ? new Date(Math.round(output.SubmitTime * 1000))
7188
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime)))
7144
7189
  : undefined,
7145
7190
  TrainingEndTime: output.TrainingEndTime !== undefined && output.TrainingEndTime !== null
7146
- ? new Date(Math.round(output.TrainingEndTime * 1000))
7191
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingEndTime)))
7147
7192
  : undefined,
7148
7193
  TrainingStartTime: output.TrainingStartTime !== undefined && output.TrainingStartTime !== null
7149
- ? new Date(Math.round(output.TrainingStartTime * 1000))
7194
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingStartTime)))
7150
7195
  : undefined,
7151
7196
  VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId),
7152
7197
  VpcConfig: output.VpcConfig !== undefined && output.VpcConfig !== null
@@ -7166,9 +7211,9 @@ var deserializeAws_json1_1EntityRecognizerPropertiesList = function (output, con
7166
7211
  };
7167
7212
  var deserializeAws_json1_1EntityTypesEvaluationMetrics = function (output, context) {
7168
7213
  return {
7169
- F1Score: __limitedParseFloat(output.F1Score),
7170
- Precision: __limitedParseFloat(output.Precision),
7171
- Recall: __limitedParseFloat(output.Recall),
7214
+ F1Score: __limitedParseDouble(output.F1Score),
7215
+ Precision: __limitedParseDouble(output.Precision),
7216
+ Recall: __limitedParseDouble(output.Recall),
7172
7217
  };
7173
7218
  };
7174
7219
  var deserializeAws_json1_1EntityTypesList = function (output, context) {
@@ -7189,7 +7234,9 @@ var deserializeAws_json1_1EntityTypesListItem = function (output, context) {
7189
7234
  var deserializeAws_json1_1EventsDetectionJobProperties = function (output, context) {
7190
7235
  return {
7191
7236
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
7192
- EndTime: output.EndTime !== undefined && output.EndTime !== null ? new Date(Math.round(output.EndTime * 1000)) : undefined,
7237
+ EndTime: output.EndTime !== undefined && output.EndTime !== null
7238
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
7239
+ : undefined,
7193
7240
  InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
7194
7241
  ? deserializeAws_json1_1InputDataConfig(output.InputDataConfig, context)
7195
7242
  : undefined,
@@ -7203,7 +7250,7 @@ var deserializeAws_json1_1EventsDetectionJobProperties = function (output, conte
7203
7250
  ? deserializeAws_json1_1OutputDataConfig(output.OutputDataConfig, context)
7204
7251
  : undefined,
7205
7252
  SubmitTime: output.SubmitTime !== undefined && output.SubmitTime !== null
7206
- ? new Date(Math.round(output.SubmitTime * 1000))
7253
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime)))
7207
7254
  : undefined,
7208
7255
  TargetEventTypes: output.TargetEventTypes !== undefined && output.TargetEventTypes !== null
7209
7256
  ? deserializeAws_json1_1TargetEventTypes(output.TargetEventTypes, context)
@@ -7222,6 +7269,9 @@ var deserializeAws_json1_1EventsDetectionJobPropertiesList = function (output, c
7222
7269
  };
7223
7270
  var deserializeAws_json1_1InputDataConfig = function (output, context) {
7224
7271
  return {
7272
+ DocumentReaderConfig: output.DocumentReaderConfig !== undefined && output.DocumentReaderConfig !== null
7273
+ ? deserializeAws_json1_1DocumentReaderConfig(output.DocumentReaderConfig, context)
7274
+ : undefined,
7225
7275
  InputFormat: __expectString(output.InputFormat),
7226
7276
  S3Uri: __expectString(output.S3Uri),
7227
7277
  };
@@ -7248,16 +7298,18 @@ var deserializeAws_json1_1JobNotFoundException = function (output, context) {
7248
7298
  };
7249
7299
  var deserializeAws_json1_1KeyPhrase = function (output, context) {
7250
7300
  return {
7251
- BeginOffset: __expectInt(output.BeginOffset),
7252
- EndOffset: __expectInt(output.EndOffset),
7253
- Score: __limitedParseFloat(output.Score),
7301
+ BeginOffset: __expectInt32(output.BeginOffset),
7302
+ EndOffset: __expectInt32(output.EndOffset),
7303
+ Score: __limitedParseFloat32(output.Score),
7254
7304
  Text: __expectString(output.Text),
7255
7305
  };
7256
7306
  };
7257
7307
  var deserializeAws_json1_1KeyPhrasesDetectionJobProperties = function (output, context) {
7258
7308
  return {
7259
7309
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
7260
- EndTime: output.EndTime !== undefined && output.EndTime !== null ? new Date(Math.round(output.EndTime * 1000)) : undefined,
7310
+ EndTime: output.EndTime !== undefined && output.EndTime !== null
7311
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
7312
+ : undefined,
7261
7313
  InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
7262
7314
  ? deserializeAws_json1_1InputDataConfig(output.InputDataConfig, context)
7263
7315
  : undefined,
@@ -7271,7 +7323,7 @@ var deserializeAws_json1_1KeyPhrasesDetectionJobProperties = function (output, c
7271
7323
  ? deserializeAws_json1_1OutputDataConfig(output.OutputDataConfig, context)
7272
7324
  : undefined,
7273
7325
  SubmitTime: output.SubmitTime !== undefined && output.SubmitTime !== null
7274
- ? new Date(Math.round(output.SubmitTime * 1000))
7326
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime)))
7275
7327
  : undefined,
7276
7328
  VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId),
7277
7329
  VpcConfig: output.VpcConfig !== undefined && output.VpcConfig !== null
@@ -7420,6 +7472,16 @@ var deserializeAws_json1_1ListOfDetectSyntaxResult = function (output, context)
7420
7472
  return deserializeAws_json1_1BatchDetectSyntaxItemResult(entry, context);
7421
7473
  });
7422
7474
  };
7475
+ var deserializeAws_json1_1ListOfDocumentReadFeatureTypes = function (output, context) {
7476
+ return (output || [])
7477
+ .filter(function (e) { return e != null; })
7478
+ .map(function (entry) {
7479
+ if (entry === null) {
7480
+ return null;
7481
+ }
7482
+ return __expectString(entry);
7483
+ });
7484
+ };
7423
7485
  var deserializeAws_json1_1ListOfDominantLanguages = function (output, context) {
7424
7486
  return (output || [])
7425
7487
  .filter(function (e) { return e != null; })
@@ -7541,14 +7603,16 @@ var deserializeAws_json1_1OutputDataConfig = function (output, context) {
7541
7603
  };
7542
7604
  var deserializeAws_json1_1PartOfSpeechTag = function (output, context) {
7543
7605
  return {
7544
- Score: __limitedParseFloat(output.Score),
7606
+ Score: __limitedParseFloat32(output.Score),
7545
7607
  Tag: __expectString(output.Tag),
7546
7608
  };
7547
7609
  };
7548
7610
  var deserializeAws_json1_1PiiEntitiesDetectionJobProperties = function (output, context) {
7549
7611
  return {
7550
7612
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
7551
- EndTime: output.EndTime !== undefined && output.EndTime !== null ? new Date(Math.round(output.EndTime * 1000)) : undefined,
7613
+ EndTime: output.EndTime !== undefined && output.EndTime !== null
7614
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
7615
+ : undefined,
7552
7616
  InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
7553
7617
  ? deserializeAws_json1_1InputDataConfig(output.InputDataConfig, context)
7554
7618
  : undefined,
@@ -7566,7 +7630,7 @@ var deserializeAws_json1_1PiiEntitiesDetectionJobProperties = function (output,
7566
7630
  ? deserializeAws_json1_1RedactionConfig(output.RedactionConfig, context)
7567
7631
  : undefined,
7568
7632
  SubmitTime: output.SubmitTime !== undefined && output.SubmitTime !== null
7569
- ? new Date(Math.round(output.SubmitTime * 1000))
7633
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime)))
7570
7634
  : undefined,
7571
7635
  };
7572
7636
  };
@@ -7582,9 +7646,9 @@ var deserializeAws_json1_1PiiEntitiesDetectionJobPropertiesList = function (outp
7582
7646
  };
7583
7647
  var deserializeAws_json1_1PiiEntity = function (output, context) {
7584
7648
  return {
7585
- BeginOffset: __expectInt(output.BeginOffset),
7586
- EndOffset: __expectInt(output.EndOffset),
7587
- Score: __limitedParseFloat(output.Score),
7649
+ BeginOffset: __expectInt32(output.BeginOffset),
7650
+ EndOffset: __expectInt32(output.EndOffset),
7651
+ Score: __limitedParseFloat32(output.Score),
7588
7652
  Type: __expectString(output.Type),
7589
7653
  };
7590
7654
  };
@@ -7636,7 +7700,9 @@ var deserializeAws_json1_1SecurityGroupIds = function (output, context) {
7636
7700
  var deserializeAws_json1_1SentimentDetectionJobProperties = function (output, context) {
7637
7701
  return {
7638
7702
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
7639
- EndTime: output.EndTime !== undefined && output.EndTime !== null ? new Date(Math.round(output.EndTime * 1000)) : undefined,
7703
+ EndTime: output.EndTime !== undefined && output.EndTime !== null
7704
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
7705
+ : undefined,
7640
7706
  InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
7641
7707
  ? deserializeAws_json1_1InputDataConfig(output.InputDataConfig, context)
7642
7708
  : undefined,
@@ -7650,7 +7716,7 @@ var deserializeAws_json1_1SentimentDetectionJobProperties = function (output, co
7650
7716
  ? deserializeAws_json1_1OutputDataConfig(output.OutputDataConfig, context)
7651
7717
  : undefined,
7652
7718
  SubmitTime: output.SubmitTime !== undefined && output.SubmitTime !== null
7653
- ? new Date(Math.round(output.SubmitTime * 1000))
7719
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime)))
7654
7720
  : undefined,
7655
7721
  VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId),
7656
7722
  VpcConfig: output.VpcConfig !== undefined && output.VpcConfig !== null
@@ -7670,10 +7736,10 @@ var deserializeAws_json1_1SentimentDetectionJobPropertiesList = function (output
7670
7736
  };
7671
7737
  var deserializeAws_json1_1SentimentScore = function (output, context) {
7672
7738
  return {
7673
- Mixed: __limitedParseFloat(output.Mixed),
7674
- Negative: __limitedParseFloat(output.Negative),
7675
- Neutral: __limitedParseFloat(output.Neutral),
7676
- Positive: __limitedParseFloat(output.Positive),
7739
+ Mixed: __limitedParseFloat32(output.Mixed),
7740
+ Negative: __limitedParseFloat32(output.Negative),
7741
+ Neutral: __limitedParseFloat32(output.Neutral),
7742
+ Positive: __limitedParseFloat32(output.Positive),
7677
7743
  };
7678
7744
  };
7679
7745
  var deserializeAws_json1_1StartDocumentClassificationJobResponse = function (output, context) {
@@ -7786,13 +7852,13 @@ var deserializeAws_json1_1Subnets = function (output, context) {
7786
7852
  };
7787
7853
  var deserializeAws_json1_1SyntaxToken = function (output, context) {
7788
7854
  return {
7789
- BeginOffset: __expectInt(output.BeginOffset),
7790
- EndOffset: __expectInt(output.EndOffset),
7855
+ BeginOffset: __expectInt32(output.BeginOffset),
7856
+ EndOffset: __expectInt32(output.EndOffset),
7791
7857
  PartOfSpeech: output.PartOfSpeech !== undefined && output.PartOfSpeech !== null
7792
7858
  ? deserializeAws_json1_1PartOfSpeechTag(output.PartOfSpeech, context)
7793
7859
  : undefined,
7794
7860
  Text: __expectString(output.Text),
7795
- TokenId: __expectInt(output.TokenId),
7861
+ TokenId: __expectInt32(output.TokenId),
7796
7862
  };
7797
7863
  };
7798
7864
  var deserializeAws_json1_1Tag = function (output, context) {
@@ -7847,7 +7913,9 @@ var deserializeAws_json1_1TooManyTagsException = function (output, context) {
7847
7913
  var deserializeAws_json1_1TopicsDetectionJobProperties = function (output, context) {
7848
7914
  return {
7849
7915
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
7850
- EndTime: output.EndTime !== undefined && output.EndTime !== null ? new Date(Math.round(output.EndTime * 1000)) : undefined,
7916
+ EndTime: output.EndTime !== undefined && output.EndTime !== null
7917
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
7918
+ : undefined,
7851
7919
  InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
7852
7920
  ? deserializeAws_json1_1InputDataConfig(output.InputDataConfig, context)
7853
7921
  : undefined,
@@ -7856,12 +7924,12 @@ var deserializeAws_json1_1TopicsDetectionJobProperties = function (output, conte
7856
7924
  JobName: __expectString(output.JobName),
7857
7925
  JobStatus: __expectString(output.JobStatus),
7858
7926
  Message: __expectString(output.Message),
7859
- NumberOfTopics: __expectInt(output.NumberOfTopics),
7927
+ NumberOfTopics: __expectInt32(output.NumberOfTopics),
7860
7928
  OutputDataConfig: output.OutputDataConfig !== undefined && output.OutputDataConfig !== null
7861
7929
  ? deserializeAws_json1_1OutputDataConfig(output.OutputDataConfig, context)
7862
7930
  : undefined,
7863
7931
  SubmitTime: output.SubmitTime !== undefined && output.SubmitTime !== null
7864
- ? new Date(Math.round(output.SubmitTime * 1000))
7932
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime)))
7865
7933
  : undefined,
7866
7934
  VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId),
7867
7935
  VpcConfig: output.VpcConfig !== undefined && output.VpcConfig !== null