@aws-sdk/client-textract 3.118.0 → 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.
@@ -125,8 +125,7 @@ const deserializeAws_json1_1AnalyzeDocumentCommandError = async (output, context
125
125
  body: await parseBody(output.body, context),
126
126
  };
127
127
  let response;
128
- let errorCode = "UnknownError";
129
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
128
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
130
129
  switch (errorCode) {
131
130
  case "AccessDeniedException":
132
131
  case "com.amazonaws.textract#AccessDeniedException":
@@ -160,10 +159,12 @@ const deserializeAws_json1_1AnalyzeDocumentCommandError = async (output, context
160
159
  throw await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context);
161
160
  default:
162
161
  const parsedBody = parsedOutput.body;
162
+ const $metadata = deserializeMetadata(output);
163
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
163
164
  response = new TextractServiceException_1.TextractServiceException({
164
- name: parsedBody.code || parsedBody.Code || errorCode,
165
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
165
166
  $fault: "client",
166
- $metadata: deserializeMetadata(output),
167
+ $metadata,
167
168
  });
168
169
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
169
170
  }
@@ -188,8 +189,7 @@ const deserializeAws_json1_1AnalyzeExpenseCommandError = async (output, context)
188
189
  body: await parseBody(output.body, context),
189
190
  };
190
191
  let response;
191
- let errorCode = "UnknownError";
192
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
192
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
193
193
  switch (errorCode) {
194
194
  case "AccessDeniedException":
195
195
  case "com.amazonaws.textract#AccessDeniedException":
@@ -220,10 +220,12 @@ const deserializeAws_json1_1AnalyzeExpenseCommandError = async (output, context)
220
220
  throw await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context);
221
221
  default:
222
222
  const parsedBody = parsedOutput.body;
223
+ const $metadata = deserializeMetadata(output);
224
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
223
225
  response = new TextractServiceException_1.TextractServiceException({
224
- name: parsedBody.code || parsedBody.Code || errorCode,
226
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
225
227
  $fault: "client",
226
- $metadata: deserializeMetadata(output),
228
+ $metadata,
227
229
  });
228
230
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
229
231
  }
@@ -248,8 +250,7 @@ const deserializeAws_json1_1AnalyzeIDCommandError = async (output, context) => {
248
250
  body: await parseBody(output.body, context),
249
251
  };
250
252
  let response;
251
- let errorCode = "UnknownError";
252
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
253
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
253
254
  switch (errorCode) {
254
255
  case "AccessDeniedException":
255
256
  case "com.amazonaws.textract#AccessDeniedException":
@@ -280,10 +281,12 @@ const deserializeAws_json1_1AnalyzeIDCommandError = async (output, context) => {
280
281
  throw await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context);
281
282
  default:
282
283
  const parsedBody = parsedOutput.body;
284
+ const $metadata = deserializeMetadata(output);
285
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
283
286
  response = new TextractServiceException_1.TextractServiceException({
284
- name: parsedBody.code || parsedBody.Code || errorCode,
287
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
285
288
  $fault: "client",
286
- $metadata: deserializeMetadata(output),
289
+ $metadata,
287
290
  });
288
291
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
289
292
  }
@@ -308,8 +311,7 @@ const deserializeAws_json1_1DetectDocumentTextCommandError = async (output, cont
308
311
  body: await parseBody(output.body, context),
309
312
  };
310
313
  let response;
311
- let errorCode = "UnknownError";
312
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
314
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
313
315
  switch (errorCode) {
314
316
  case "AccessDeniedException":
315
317
  case "com.amazonaws.textract#AccessDeniedException":
@@ -340,10 +342,12 @@ const deserializeAws_json1_1DetectDocumentTextCommandError = async (output, cont
340
342
  throw await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context);
341
343
  default:
342
344
  const parsedBody = parsedOutput.body;
345
+ const $metadata = deserializeMetadata(output);
346
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
343
347
  response = new TextractServiceException_1.TextractServiceException({
344
- name: parsedBody.code || parsedBody.Code || errorCode,
348
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
345
349
  $fault: "client",
346
- $metadata: deserializeMetadata(output),
350
+ $metadata,
347
351
  });
348
352
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
349
353
  }
@@ -368,8 +372,7 @@ const deserializeAws_json1_1GetDocumentAnalysisCommandError = async (output, con
368
372
  body: await parseBody(output.body, context),
369
373
  };
370
374
  let response;
371
- let errorCode = "UnknownError";
372
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
375
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
373
376
  switch (errorCode) {
374
377
  case "AccessDeniedException":
375
378
  case "com.amazonaws.textract#AccessDeniedException":
@@ -397,10 +400,12 @@ const deserializeAws_json1_1GetDocumentAnalysisCommandError = async (output, con
397
400
  throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
398
401
  default:
399
402
  const parsedBody = parsedOutput.body;
403
+ const $metadata = deserializeMetadata(output);
404
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
400
405
  response = new TextractServiceException_1.TextractServiceException({
401
- name: parsedBody.code || parsedBody.Code || errorCode,
406
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
402
407
  $fault: "client",
403
- $metadata: deserializeMetadata(output),
408
+ $metadata,
404
409
  });
405
410
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
406
411
  }
@@ -425,8 +430,7 @@ const deserializeAws_json1_1GetDocumentTextDetectionCommandError = async (output
425
430
  body: await parseBody(output.body, context),
426
431
  };
427
432
  let response;
428
- let errorCode = "UnknownError";
429
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
433
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
430
434
  switch (errorCode) {
431
435
  case "AccessDeniedException":
432
436
  case "com.amazonaws.textract#AccessDeniedException":
@@ -454,10 +458,12 @@ const deserializeAws_json1_1GetDocumentTextDetectionCommandError = async (output
454
458
  throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
455
459
  default:
456
460
  const parsedBody = parsedOutput.body;
461
+ const $metadata = deserializeMetadata(output);
462
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
457
463
  response = new TextractServiceException_1.TextractServiceException({
458
- name: parsedBody.code || parsedBody.Code || errorCode,
464
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
459
465
  $fault: "client",
460
- $metadata: deserializeMetadata(output),
466
+ $metadata,
461
467
  });
462
468
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
463
469
  }
@@ -482,8 +488,7 @@ const deserializeAws_json1_1GetExpenseAnalysisCommandError = async (output, cont
482
488
  body: await parseBody(output.body, context),
483
489
  };
484
490
  let response;
485
- let errorCode = "UnknownError";
486
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
491
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
487
492
  switch (errorCode) {
488
493
  case "AccessDeniedException":
489
494
  case "com.amazonaws.textract#AccessDeniedException":
@@ -511,10 +516,12 @@ const deserializeAws_json1_1GetExpenseAnalysisCommandError = async (output, cont
511
516
  throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
512
517
  default:
513
518
  const parsedBody = parsedOutput.body;
519
+ const $metadata = deserializeMetadata(output);
520
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
514
521
  response = new TextractServiceException_1.TextractServiceException({
515
- name: parsedBody.code || parsedBody.Code || errorCode,
522
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
516
523
  $fault: "client",
517
- $metadata: deserializeMetadata(output),
524
+ $metadata,
518
525
  });
519
526
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
520
527
  }
@@ -539,8 +546,7 @@ const deserializeAws_json1_1StartDocumentAnalysisCommandError = async (output, c
539
546
  body: await parseBody(output.body, context),
540
547
  };
541
548
  let response;
542
- let errorCode = "UnknownError";
543
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
549
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
544
550
  switch (errorCode) {
545
551
  case "AccessDeniedException":
546
552
  case "com.amazonaws.textract#AccessDeniedException":
@@ -580,10 +586,12 @@ const deserializeAws_json1_1StartDocumentAnalysisCommandError = async (output, c
580
586
  throw await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context);
581
587
  default:
582
588
  const parsedBody = parsedOutput.body;
589
+ const $metadata = deserializeMetadata(output);
590
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
583
591
  response = new TextractServiceException_1.TextractServiceException({
584
- name: parsedBody.code || parsedBody.Code || errorCode,
592
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
585
593
  $fault: "client",
586
- $metadata: deserializeMetadata(output),
594
+ $metadata,
587
595
  });
588
596
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
589
597
  }
@@ -608,8 +616,7 @@ const deserializeAws_json1_1StartDocumentTextDetectionCommandError = async (outp
608
616
  body: await parseBody(output.body, context),
609
617
  };
610
618
  let response;
611
- let errorCode = "UnknownError";
612
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
619
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
613
620
  switch (errorCode) {
614
621
  case "AccessDeniedException":
615
622
  case "com.amazonaws.textract#AccessDeniedException":
@@ -649,10 +656,12 @@ const deserializeAws_json1_1StartDocumentTextDetectionCommandError = async (outp
649
656
  throw await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context);
650
657
  default:
651
658
  const parsedBody = parsedOutput.body;
659
+ const $metadata = deserializeMetadata(output);
660
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
652
661
  response = new TextractServiceException_1.TextractServiceException({
653
- name: parsedBody.code || parsedBody.Code || errorCode,
662
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
654
663
  $fault: "client",
655
- $metadata: deserializeMetadata(output),
664
+ $metadata,
656
665
  });
657
666
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
658
667
  }
@@ -677,8 +686,7 @@ const deserializeAws_json1_1StartExpenseAnalysisCommandError = async (output, co
677
686
  body: await parseBody(output.body, context),
678
687
  };
679
688
  let response;
680
- let errorCode = "UnknownError";
681
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
689
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
682
690
  switch (errorCode) {
683
691
  case "AccessDeniedException":
684
692
  case "com.amazonaws.textract#AccessDeniedException":
@@ -718,10 +726,12 @@ const deserializeAws_json1_1StartExpenseAnalysisCommandError = async (output, co
718
726
  throw await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context);
719
727
  default:
720
728
  const parsedBody = parsedOutput.body;
729
+ const $metadata = deserializeMetadata(output);
730
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
721
731
  response = new TextractServiceException_1.TextractServiceException({
722
- name: parsedBody.code || parsedBody.Code || errorCode,
732
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
723
733
  $fault: "client",
724
- $metadata: deserializeMetadata(output),
734
+ $metadata,
725
735
  });
726
736
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
727
737
  }
@@ -854,30 +864,24 @@ const deserializeAws_json1_1UnsupportedDocumentExceptionResponse = async (parsed
854
864
  };
855
865
  const serializeAws_json1_1AnalyzeDocumentRequest = (input, context) => {
856
866
  return {
857
- ...(input.Document !== undefined &&
858
- input.Document !== null && { Document: serializeAws_json1_1Document(input.Document, context) }),
859
- ...(input.FeatureTypes !== undefined &&
860
- input.FeatureTypes !== null && { FeatureTypes: serializeAws_json1_1FeatureTypes(input.FeatureTypes, context) }),
861
- ...(input.HumanLoopConfig !== undefined &&
862
- input.HumanLoopConfig !== null && {
867
+ ...(input.Document != null && { Document: serializeAws_json1_1Document(input.Document, context) }),
868
+ ...(input.FeatureTypes != null && { FeatureTypes: serializeAws_json1_1FeatureTypes(input.FeatureTypes, context) }),
869
+ ...(input.HumanLoopConfig != null && {
863
870
  HumanLoopConfig: serializeAws_json1_1HumanLoopConfig(input.HumanLoopConfig, context),
864
871
  }),
865
- ...(input.QueriesConfig !== undefined &&
866
- input.QueriesConfig !== null && {
872
+ ...(input.QueriesConfig != null && {
867
873
  QueriesConfig: serializeAws_json1_1QueriesConfig(input.QueriesConfig, context),
868
874
  }),
869
875
  };
870
876
  };
871
877
  const serializeAws_json1_1AnalyzeExpenseRequest = (input, context) => {
872
878
  return {
873
- ...(input.Document !== undefined &&
874
- input.Document !== null && { Document: serializeAws_json1_1Document(input.Document, context) }),
879
+ ...(input.Document != null && { Document: serializeAws_json1_1Document(input.Document, context) }),
875
880
  };
876
881
  };
877
882
  const serializeAws_json1_1AnalyzeIDRequest = (input, context) => {
878
883
  return {
879
- ...(input.DocumentPages !== undefined &&
880
- input.DocumentPages !== null && {
884
+ ...(input.DocumentPages != null && {
881
885
  DocumentPages: serializeAws_json1_1DocumentPages(input.DocumentPages, context),
882
886
  }),
883
887
  };
@@ -894,21 +898,18 @@ const serializeAws_json1_1ContentClassifiers = (input, context) => {
894
898
  };
895
899
  const serializeAws_json1_1DetectDocumentTextRequest = (input, context) => {
896
900
  return {
897
- ...(input.Document !== undefined &&
898
- input.Document !== null && { Document: serializeAws_json1_1Document(input.Document, context) }),
901
+ ...(input.Document != null && { Document: serializeAws_json1_1Document(input.Document, context) }),
899
902
  };
900
903
  };
901
904
  const serializeAws_json1_1Document = (input, context) => {
902
905
  return {
903
- ...(input.Bytes !== undefined && input.Bytes !== null && { Bytes: context.base64Encoder(input.Bytes) }),
904
- ...(input.S3Object !== undefined &&
905
- input.S3Object !== null && { S3Object: serializeAws_json1_1S3Object(input.S3Object, context) }),
906
+ ...(input.Bytes != null && { Bytes: context.base64Encoder(input.Bytes) }),
907
+ ...(input.S3Object != null && { S3Object: serializeAws_json1_1S3Object(input.S3Object, context) }),
906
908
  };
907
909
  };
908
910
  const serializeAws_json1_1DocumentLocation = (input, context) => {
909
911
  return {
910
- ...(input.S3Object !== undefined &&
911
- input.S3Object !== null && { S3Object: serializeAws_json1_1S3Object(input.S3Object, context) }),
912
+ ...(input.S3Object != null && { S3Object: serializeAws_json1_1S3Object(input.S3Object, context) }),
912
913
  };
913
914
  };
914
915
  const serializeAws_json1_1DocumentPages = (input, context) => {
@@ -933,54 +934,51 @@ const serializeAws_json1_1FeatureTypes = (input, context) => {
933
934
  };
934
935
  const serializeAws_json1_1GetDocumentAnalysisRequest = (input, context) => {
935
936
  return {
936
- ...(input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }),
937
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
938
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
937
+ ...(input.JobId != null && { JobId: input.JobId }),
938
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
939
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
939
940
  };
940
941
  };
941
942
  const serializeAws_json1_1GetDocumentTextDetectionRequest = (input, context) => {
942
943
  return {
943
- ...(input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }),
944
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
945
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
944
+ ...(input.JobId != null && { JobId: input.JobId }),
945
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
946
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
946
947
  };
947
948
  };
948
949
  const serializeAws_json1_1GetExpenseAnalysisRequest = (input, context) => {
949
950
  return {
950
- ...(input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }),
951
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
952
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
951
+ ...(input.JobId != null && { JobId: input.JobId }),
952
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
953
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
953
954
  };
954
955
  };
955
956
  const serializeAws_json1_1HumanLoopConfig = (input, context) => {
956
957
  return {
957
- ...(input.DataAttributes !== undefined &&
958
- input.DataAttributes !== null && {
958
+ ...(input.DataAttributes != null && {
959
959
  DataAttributes: serializeAws_json1_1HumanLoopDataAttributes(input.DataAttributes, context),
960
960
  }),
961
- ...(input.FlowDefinitionArn !== undefined &&
962
- input.FlowDefinitionArn !== null && { FlowDefinitionArn: input.FlowDefinitionArn }),
963
- ...(input.HumanLoopName !== undefined && input.HumanLoopName !== null && { HumanLoopName: input.HumanLoopName }),
961
+ ...(input.FlowDefinitionArn != null && { FlowDefinitionArn: input.FlowDefinitionArn }),
962
+ ...(input.HumanLoopName != null && { HumanLoopName: input.HumanLoopName }),
964
963
  };
965
964
  };
966
965
  const serializeAws_json1_1HumanLoopDataAttributes = (input, context) => {
967
966
  return {
968
- ...(input.ContentClassifiers !== undefined &&
969
- input.ContentClassifiers !== null && {
967
+ ...(input.ContentClassifiers != null && {
970
968
  ContentClassifiers: serializeAws_json1_1ContentClassifiers(input.ContentClassifiers, context),
971
969
  }),
972
970
  };
973
971
  };
974
972
  const serializeAws_json1_1NotificationChannel = (input, context) => {
975
973
  return {
976
- ...(input.RoleArn !== undefined && input.RoleArn !== null && { RoleArn: input.RoleArn }),
977
- ...(input.SNSTopicArn !== undefined && input.SNSTopicArn !== null && { SNSTopicArn: input.SNSTopicArn }),
974
+ ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
975
+ ...(input.SNSTopicArn != null && { SNSTopicArn: input.SNSTopicArn }),
978
976
  };
979
977
  };
980
978
  const serializeAws_json1_1OutputConfig = (input, context) => {
981
979
  return {
982
- ...(input.S3Bucket !== undefined && input.S3Bucket !== null && { S3Bucket: input.S3Bucket }),
983
- ...(input.S3Prefix !== undefined && input.S3Prefix !== null && { S3Prefix: input.S3Prefix }),
980
+ ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }),
981
+ ...(input.S3Prefix != null && { S3Prefix: input.S3Prefix }),
984
982
  };
985
983
  };
986
984
  const serializeAws_json1_1Queries = (input, context) => {
@@ -995,16 +993,14 @@ const serializeAws_json1_1Queries = (input, context) => {
995
993
  };
996
994
  const serializeAws_json1_1QueriesConfig = (input, context) => {
997
995
  return {
998
- ...(input.Queries !== undefined &&
999
- input.Queries !== null && { Queries: serializeAws_json1_1Queries(input.Queries, context) }),
996
+ ...(input.Queries != null && { Queries: serializeAws_json1_1Queries(input.Queries, context) }),
1000
997
  };
1001
998
  };
1002
999
  const serializeAws_json1_1Query = (input, context) => {
1003
1000
  return {
1004
- ...(input.Alias !== undefined && input.Alias !== null && { Alias: input.Alias }),
1005
- ...(input.Pages !== undefined &&
1006
- input.Pages !== null && { Pages: serializeAws_json1_1QueryPages(input.Pages, context) }),
1007
- ...(input.Text !== undefined && input.Text !== null && { Text: input.Text }),
1001
+ ...(input.Alias != null && { Alias: input.Alias }),
1002
+ ...(input.Pages != null && { Pages: serializeAws_json1_1QueryPages(input.Pages, context) }),
1003
+ ...(input.Text != null && { Text: input.Text }),
1008
1004
  };
1009
1005
  };
1010
1006
  const serializeAws_json1_1QueryPages = (input, context) => {
@@ -1019,69 +1015,55 @@ const serializeAws_json1_1QueryPages = (input, context) => {
1019
1015
  };
1020
1016
  const serializeAws_json1_1S3Object = (input, context) => {
1021
1017
  return {
1022
- ...(input.Bucket !== undefined && input.Bucket !== null && { Bucket: input.Bucket }),
1023
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
1024
- ...(input.Version !== undefined && input.Version !== null && { Version: input.Version }),
1018
+ ...(input.Bucket != null && { Bucket: input.Bucket }),
1019
+ ...(input.Name != null && { Name: input.Name }),
1020
+ ...(input.Version != null && { Version: input.Version }),
1025
1021
  };
1026
1022
  };
1027
1023
  const serializeAws_json1_1StartDocumentAnalysisRequest = (input, context) => {
1028
1024
  return {
1029
- ...(input.ClientRequestToken !== undefined &&
1030
- input.ClientRequestToken !== null && { ClientRequestToken: input.ClientRequestToken }),
1031
- ...(input.DocumentLocation !== undefined &&
1032
- input.DocumentLocation !== null && {
1025
+ ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
1026
+ ...(input.DocumentLocation != null && {
1033
1027
  DocumentLocation: serializeAws_json1_1DocumentLocation(input.DocumentLocation, context),
1034
1028
  }),
1035
- ...(input.FeatureTypes !== undefined &&
1036
- input.FeatureTypes !== null && { FeatureTypes: serializeAws_json1_1FeatureTypes(input.FeatureTypes, context) }),
1037
- ...(input.JobTag !== undefined && input.JobTag !== null && { JobTag: input.JobTag }),
1038
- ...(input.KMSKeyId !== undefined && input.KMSKeyId !== null && { KMSKeyId: input.KMSKeyId }),
1039
- ...(input.NotificationChannel !== undefined &&
1040
- input.NotificationChannel !== null && {
1029
+ ...(input.FeatureTypes != null && { FeatureTypes: serializeAws_json1_1FeatureTypes(input.FeatureTypes, context) }),
1030
+ ...(input.JobTag != null && { JobTag: input.JobTag }),
1031
+ ...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }),
1032
+ ...(input.NotificationChannel != null && {
1041
1033
  NotificationChannel: serializeAws_json1_1NotificationChannel(input.NotificationChannel, context),
1042
1034
  }),
1043
- ...(input.OutputConfig !== undefined &&
1044
- input.OutputConfig !== null && { OutputConfig: serializeAws_json1_1OutputConfig(input.OutputConfig, context) }),
1045
- ...(input.QueriesConfig !== undefined &&
1046
- input.QueriesConfig !== null && {
1035
+ ...(input.OutputConfig != null && { OutputConfig: serializeAws_json1_1OutputConfig(input.OutputConfig, context) }),
1036
+ ...(input.QueriesConfig != null && {
1047
1037
  QueriesConfig: serializeAws_json1_1QueriesConfig(input.QueriesConfig, context),
1048
1038
  }),
1049
1039
  };
1050
1040
  };
1051
1041
  const serializeAws_json1_1StartDocumentTextDetectionRequest = (input, context) => {
1052
1042
  return {
1053
- ...(input.ClientRequestToken !== undefined &&
1054
- input.ClientRequestToken !== null && { ClientRequestToken: input.ClientRequestToken }),
1055
- ...(input.DocumentLocation !== undefined &&
1056
- input.DocumentLocation !== null && {
1043
+ ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
1044
+ ...(input.DocumentLocation != null && {
1057
1045
  DocumentLocation: serializeAws_json1_1DocumentLocation(input.DocumentLocation, context),
1058
1046
  }),
1059
- ...(input.JobTag !== undefined && input.JobTag !== null && { JobTag: input.JobTag }),
1060
- ...(input.KMSKeyId !== undefined && input.KMSKeyId !== null && { KMSKeyId: input.KMSKeyId }),
1061
- ...(input.NotificationChannel !== undefined &&
1062
- input.NotificationChannel !== null && {
1047
+ ...(input.JobTag != null && { JobTag: input.JobTag }),
1048
+ ...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }),
1049
+ ...(input.NotificationChannel != null && {
1063
1050
  NotificationChannel: serializeAws_json1_1NotificationChannel(input.NotificationChannel, context),
1064
1051
  }),
1065
- ...(input.OutputConfig !== undefined &&
1066
- input.OutputConfig !== null && { OutputConfig: serializeAws_json1_1OutputConfig(input.OutputConfig, context) }),
1052
+ ...(input.OutputConfig != null && { OutputConfig: serializeAws_json1_1OutputConfig(input.OutputConfig, context) }),
1067
1053
  };
1068
1054
  };
1069
1055
  const serializeAws_json1_1StartExpenseAnalysisRequest = (input, context) => {
1070
1056
  return {
1071
- ...(input.ClientRequestToken !== undefined &&
1072
- input.ClientRequestToken !== null && { ClientRequestToken: input.ClientRequestToken }),
1073
- ...(input.DocumentLocation !== undefined &&
1074
- input.DocumentLocation !== null && {
1057
+ ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
1058
+ ...(input.DocumentLocation != null && {
1075
1059
  DocumentLocation: serializeAws_json1_1DocumentLocation(input.DocumentLocation, context),
1076
1060
  }),
1077
- ...(input.JobTag !== undefined && input.JobTag !== null && { JobTag: input.JobTag }),
1078
- ...(input.KMSKeyId !== undefined && input.KMSKeyId !== null && { KMSKeyId: input.KMSKeyId }),
1079
- ...(input.NotificationChannel !== undefined &&
1080
- input.NotificationChannel !== null && {
1061
+ ...(input.JobTag != null && { JobTag: input.JobTag }),
1062
+ ...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }),
1063
+ ...(input.NotificationChannel != null && {
1081
1064
  NotificationChannel: serializeAws_json1_1NotificationChannel(input.NotificationChannel, context),
1082
1065
  }),
1083
- ...(input.OutputConfig !== undefined &&
1084
- input.OutputConfig !== null && { OutputConfig: serializeAws_json1_1OutputConfig(input.OutputConfig, context) }),
1066
+ ...(input.OutputConfig != null && { OutputConfig: serializeAws_json1_1OutputConfig(input.OutputConfig, context) }),
1085
1067
  };
1086
1068
  };
1087
1069
  const deserializeAws_json1_1AccessDeniedException = (output, context) => {
@@ -1093,23 +1075,21 @@ const deserializeAws_json1_1AccessDeniedException = (output, context) => {
1093
1075
  const deserializeAws_json1_1AnalyzeDocumentResponse = (output, context) => {
1094
1076
  return {
1095
1077
  AnalyzeDocumentModelVersion: (0, smithy_client_1.expectString)(output.AnalyzeDocumentModelVersion),
1096
- Blocks: output.Blocks !== undefined && output.Blocks !== null
1097
- ? deserializeAws_json1_1BlockList(output.Blocks, context)
1098
- : undefined,
1099
- DocumentMetadata: output.DocumentMetadata !== undefined && output.DocumentMetadata !== null
1078
+ Blocks: output.Blocks != null ? deserializeAws_json1_1BlockList(output.Blocks, context) : undefined,
1079
+ DocumentMetadata: output.DocumentMetadata != null
1100
1080
  ? deserializeAws_json1_1DocumentMetadata(output.DocumentMetadata, context)
1101
1081
  : undefined,
1102
- HumanLoopActivationOutput: output.HumanLoopActivationOutput !== undefined && output.HumanLoopActivationOutput !== null
1082
+ HumanLoopActivationOutput: output.HumanLoopActivationOutput != null
1103
1083
  ? deserializeAws_json1_1HumanLoopActivationOutput(output.HumanLoopActivationOutput, context)
1104
1084
  : undefined,
1105
1085
  };
1106
1086
  };
1107
1087
  const deserializeAws_json1_1AnalyzeExpenseResponse = (output, context) => {
1108
1088
  return {
1109
- DocumentMetadata: output.DocumentMetadata !== undefined && output.DocumentMetadata !== null
1089
+ DocumentMetadata: output.DocumentMetadata != null
1110
1090
  ? deserializeAws_json1_1DocumentMetadata(output.DocumentMetadata, context)
1111
1091
  : undefined,
1112
- ExpenseDocuments: output.ExpenseDocuments !== undefined && output.ExpenseDocuments !== null
1092
+ ExpenseDocuments: output.ExpenseDocuments != null
1113
1093
  ? deserializeAws_json1_1ExpenseDocumentList(output.ExpenseDocuments, context)
1114
1094
  : undefined,
1115
1095
  };
@@ -1117,7 +1097,7 @@ const deserializeAws_json1_1AnalyzeExpenseResponse = (output, context) => {
1117
1097
  const deserializeAws_json1_1AnalyzeIDDetections = (output, context) => {
1118
1098
  return {
1119
1099
  Confidence: (0, smithy_client_1.limitedParseFloat32)(output.Confidence),
1120
- NormalizedValue: output.NormalizedValue !== undefined && output.NormalizedValue !== null
1100
+ NormalizedValue: output.NormalizedValue != null
1121
1101
  ? deserializeAws_json1_1NormalizedValue(output.NormalizedValue, context)
1122
1102
  : undefined,
1123
1103
  Text: (0, smithy_client_1.expectString)(output.Text),
@@ -1126,10 +1106,10 @@ const deserializeAws_json1_1AnalyzeIDDetections = (output, context) => {
1126
1106
  const deserializeAws_json1_1AnalyzeIDResponse = (output, context) => {
1127
1107
  return {
1128
1108
  AnalyzeIDModelVersion: (0, smithy_client_1.expectString)(output.AnalyzeIDModelVersion),
1129
- DocumentMetadata: output.DocumentMetadata !== undefined && output.DocumentMetadata !== null
1109
+ DocumentMetadata: output.DocumentMetadata != null
1130
1110
  ? deserializeAws_json1_1DocumentMetadata(output.DocumentMetadata, context)
1131
1111
  : undefined,
1132
- IdentityDocuments: output.IdentityDocuments !== undefined && output.IdentityDocuments !== null
1112
+ IdentityDocuments: output.IdentityDocuments != null
1133
1113
  ? deserializeAws_json1_1IdentityDocumentList(output.IdentityDocuments, context)
1134
1114
  : undefined,
1135
1115
  };
@@ -1146,20 +1126,12 @@ const deserializeAws_json1_1Block = (output, context) => {
1146
1126
  ColumnIndex: (0, smithy_client_1.expectInt32)(output.ColumnIndex),
1147
1127
  ColumnSpan: (0, smithy_client_1.expectInt32)(output.ColumnSpan),
1148
1128
  Confidence: (0, smithy_client_1.limitedParseFloat32)(output.Confidence),
1149
- EntityTypes: output.EntityTypes !== undefined && output.EntityTypes !== null
1150
- ? deserializeAws_json1_1EntityTypes(output.EntityTypes, context)
1151
- : undefined,
1152
- Geometry: output.Geometry !== undefined && output.Geometry !== null
1153
- ? deserializeAws_json1_1Geometry(output.Geometry, context)
1154
- : undefined,
1129
+ EntityTypes: output.EntityTypes != null ? deserializeAws_json1_1EntityTypes(output.EntityTypes, context) : undefined,
1130
+ Geometry: output.Geometry != null ? deserializeAws_json1_1Geometry(output.Geometry, context) : undefined,
1155
1131
  Id: (0, smithy_client_1.expectString)(output.Id),
1156
1132
  Page: (0, smithy_client_1.expectInt32)(output.Page),
1157
- Query: output.Query !== undefined && output.Query !== null
1158
- ? deserializeAws_json1_1Query(output.Query, context)
1159
- : undefined,
1160
- Relationships: output.Relationships !== undefined && output.Relationships !== null
1161
- ? deserializeAws_json1_1RelationshipList(output.Relationships, context)
1162
- : undefined,
1133
+ Query: output.Query != null ? deserializeAws_json1_1Query(output.Query, context) : undefined,
1134
+ Relationships: output.Relationships != null ? deserializeAws_json1_1RelationshipList(output.Relationships, context) : undefined,
1163
1135
  RowIndex: (0, smithy_client_1.expectInt32)(output.RowIndex),
1164
1136
  RowSpan: (0, smithy_client_1.expectInt32)(output.RowSpan),
1165
1137
  SelectionStatus: (0, smithy_client_1.expectString)(output.SelectionStatus),
@@ -1188,11 +1160,9 @@ const deserializeAws_json1_1BoundingBox = (output, context) => {
1188
1160
  };
1189
1161
  const deserializeAws_json1_1DetectDocumentTextResponse = (output, context) => {
1190
1162
  return {
1191
- Blocks: output.Blocks !== undefined && output.Blocks !== null
1192
- ? deserializeAws_json1_1BlockList(output.Blocks, context)
1193
- : undefined,
1163
+ Blocks: output.Blocks != null ? deserializeAws_json1_1BlockList(output.Blocks, context) : undefined,
1194
1164
  DetectDocumentTextModelVersion: (0, smithy_client_1.expectString)(output.DetectDocumentTextModelVersion),
1195
- DocumentMetadata: output.DocumentMetadata !== undefined && output.DocumentMetadata !== null
1165
+ DocumentMetadata: output.DocumentMetadata != null
1196
1166
  ? deserializeAws_json1_1DocumentMetadata(output.DocumentMetadata, context)
1197
1167
  : undefined,
1198
1168
  };
@@ -1222,21 +1192,17 @@ const deserializeAws_json1_1EntityTypes = (output, context) => {
1222
1192
  const deserializeAws_json1_1ExpenseDetection = (output, context) => {
1223
1193
  return {
1224
1194
  Confidence: (0, smithy_client_1.limitedParseFloat32)(output.Confidence),
1225
- Geometry: output.Geometry !== undefined && output.Geometry !== null
1226
- ? deserializeAws_json1_1Geometry(output.Geometry, context)
1227
- : undefined,
1195
+ Geometry: output.Geometry != null ? deserializeAws_json1_1Geometry(output.Geometry, context) : undefined,
1228
1196
  Text: (0, smithy_client_1.expectString)(output.Text),
1229
1197
  };
1230
1198
  };
1231
1199
  const deserializeAws_json1_1ExpenseDocument = (output, context) => {
1232
1200
  return {
1233
1201
  ExpenseIndex: (0, smithy_client_1.expectInt32)(output.ExpenseIndex),
1234
- LineItemGroups: output.LineItemGroups !== undefined && output.LineItemGroups !== null
1202
+ LineItemGroups: output.LineItemGroups != null
1235
1203
  ? deserializeAws_json1_1LineItemGroupList(output.LineItemGroups, context)
1236
1204
  : undefined,
1237
- SummaryFields: output.SummaryFields !== undefined && output.SummaryFields !== null
1238
- ? deserializeAws_json1_1ExpenseFieldList(output.SummaryFields, context)
1239
- : undefined,
1205
+ SummaryFields: output.SummaryFields != null ? deserializeAws_json1_1ExpenseFieldList(output.SummaryFields, context) : undefined,
1240
1206
  };
1241
1207
  };
1242
1208
  const deserializeAws_json1_1ExpenseDocumentList = (output, context) => {
@@ -1252,14 +1218,12 @@ const deserializeAws_json1_1ExpenseDocumentList = (output, context) => {
1252
1218
  };
1253
1219
  const deserializeAws_json1_1ExpenseField = (output, context) => {
1254
1220
  return {
1255
- LabelDetection: output.LabelDetection !== undefined && output.LabelDetection !== null
1221
+ LabelDetection: output.LabelDetection != null
1256
1222
  ? deserializeAws_json1_1ExpenseDetection(output.LabelDetection, context)
1257
1223
  : undefined,
1258
1224
  PageNumber: (0, smithy_client_1.expectInt32)(output.PageNumber),
1259
- Type: output.Type !== undefined && output.Type !== null
1260
- ? deserializeAws_json1_1ExpenseType(output.Type, context)
1261
- : undefined,
1262
- ValueDetection: output.ValueDetection !== undefined && output.ValueDetection !== null
1225
+ Type: output.Type != null ? deserializeAws_json1_1ExpenseType(output.Type, context) : undefined,
1226
+ ValueDetection: output.ValueDetection != null
1263
1227
  ? deserializeAws_json1_1ExpenseDetection(output.ValueDetection, context)
1264
1228
  : undefined,
1265
1229
  };
@@ -1283,72 +1247,57 @@ const deserializeAws_json1_1ExpenseType = (output, context) => {
1283
1247
  };
1284
1248
  const deserializeAws_json1_1Geometry = (output, context) => {
1285
1249
  return {
1286
- BoundingBox: output.BoundingBox !== undefined && output.BoundingBox !== null
1287
- ? deserializeAws_json1_1BoundingBox(output.BoundingBox, context)
1288
- : undefined,
1289
- Polygon: output.Polygon !== undefined && output.Polygon !== null
1290
- ? deserializeAws_json1_1Polygon(output.Polygon, context)
1291
- : undefined,
1250
+ BoundingBox: output.BoundingBox != null ? deserializeAws_json1_1BoundingBox(output.BoundingBox, context) : undefined,
1251
+ Polygon: output.Polygon != null ? deserializeAws_json1_1Polygon(output.Polygon, context) : undefined,
1292
1252
  };
1293
1253
  };
1294
1254
  const deserializeAws_json1_1GetDocumentAnalysisResponse = (output, context) => {
1295
1255
  return {
1296
1256
  AnalyzeDocumentModelVersion: (0, smithy_client_1.expectString)(output.AnalyzeDocumentModelVersion),
1297
- Blocks: output.Blocks !== undefined && output.Blocks !== null
1298
- ? deserializeAws_json1_1BlockList(output.Blocks, context)
1299
- : undefined,
1300
- DocumentMetadata: output.DocumentMetadata !== undefined && output.DocumentMetadata !== null
1257
+ Blocks: output.Blocks != null ? deserializeAws_json1_1BlockList(output.Blocks, context) : undefined,
1258
+ DocumentMetadata: output.DocumentMetadata != null
1301
1259
  ? deserializeAws_json1_1DocumentMetadata(output.DocumentMetadata, context)
1302
1260
  : undefined,
1303
1261
  JobStatus: (0, smithy_client_1.expectString)(output.JobStatus),
1304
1262
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1305
1263
  StatusMessage: (0, smithy_client_1.expectString)(output.StatusMessage),
1306
- Warnings: output.Warnings !== undefined && output.Warnings !== null
1307
- ? deserializeAws_json1_1Warnings(output.Warnings, context)
1308
- : undefined,
1264
+ Warnings: output.Warnings != null ? deserializeAws_json1_1Warnings(output.Warnings, context) : undefined,
1309
1265
  };
1310
1266
  };
1311
1267
  const deserializeAws_json1_1GetDocumentTextDetectionResponse = (output, context) => {
1312
1268
  return {
1313
- Blocks: output.Blocks !== undefined && output.Blocks !== null
1314
- ? deserializeAws_json1_1BlockList(output.Blocks, context)
1315
- : undefined,
1269
+ Blocks: output.Blocks != null ? deserializeAws_json1_1BlockList(output.Blocks, context) : undefined,
1316
1270
  DetectDocumentTextModelVersion: (0, smithy_client_1.expectString)(output.DetectDocumentTextModelVersion),
1317
- DocumentMetadata: output.DocumentMetadata !== undefined && output.DocumentMetadata !== null
1271
+ DocumentMetadata: output.DocumentMetadata != null
1318
1272
  ? deserializeAws_json1_1DocumentMetadata(output.DocumentMetadata, context)
1319
1273
  : undefined,
1320
1274
  JobStatus: (0, smithy_client_1.expectString)(output.JobStatus),
1321
1275
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1322
1276
  StatusMessage: (0, smithy_client_1.expectString)(output.StatusMessage),
1323
- Warnings: output.Warnings !== undefined && output.Warnings !== null
1324
- ? deserializeAws_json1_1Warnings(output.Warnings, context)
1325
- : undefined,
1277
+ Warnings: output.Warnings != null ? deserializeAws_json1_1Warnings(output.Warnings, context) : undefined,
1326
1278
  };
1327
1279
  };
1328
1280
  const deserializeAws_json1_1GetExpenseAnalysisResponse = (output, context) => {
1329
1281
  return {
1330
1282
  AnalyzeExpenseModelVersion: (0, smithy_client_1.expectString)(output.AnalyzeExpenseModelVersion),
1331
- DocumentMetadata: output.DocumentMetadata !== undefined && output.DocumentMetadata !== null
1283
+ DocumentMetadata: output.DocumentMetadata != null
1332
1284
  ? deserializeAws_json1_1DocumentMetadata(output.DocumentMetadata, context)
1333
1285
  : undefined,
1334
- ExpenseDocuments: output.ExpenseDocuments !== undefined && output.ExpenseDocuments !== null
1286
+ ExpenseDocuments: output.ExpenseDocuments != null
1335
1287
  ? deserializeAws_json1_1ExpenseDocumentList(output.ExpenseDocuments, context)
1336
1288
  : undefined,
1337
1289
  JobStatus: (0, smithy_client_1.expectString)(output.JobStatus),
1338
1290
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1339
1291
  StatusMessage: (0, smithy_client_1.expectString)(output.StatusMessage),
1340
- Warnings: output.Warnings !== undefined && output.Warnings !== null
1341
- ? deserializeAws_json1_1Warnings(output.Warnings, context)
1342
- : undefined,
1292
+ Warnings: output.Warnings != null ? deserializeAws_json1_1Warnings(output.Warnings, context) : undefined,
1343
1293
  };
1344
1294
  };
1345
1295
  const deserializeAws_json1_1HumanLoopActivationOutput = (output, context) => {
1346
1296
  return {
1347
- HumanLoopActivationConditionsEvaluationResults: output.HumanLoopActivationConditionsEvaluationResults !== undefined &&
1348
- output.HumanLoopActivationConditionsEvaluationResults !== null
1297
+ HumanLoopActivationConditionsEvaluationResults: output.HumanLoopActivationConditionsEvaluationResults != null
1349
1298
  ? new smithy_client_1.LazyJsonString(output.HumanLoopActivationConditionsEvaluationResults)
1350
1299
  : undefined,
1351
- HumanLoopActivationReasons: output.HumanLoopActivationReasons !== undefined && output.HumanLoopActivationReasons !== null
1300
+ HumanLoopActivationReasons: output.HumanLoopActivationReasons != null
1352
1301
  ? deserializeAws_json1_1HumanLoopActivationReasons(output.HumanLoopActivationReasons, context)
1353
1302
  : undefined,
1354
1303
  HumanLoopArn: (0, smithy_client_1.expectString)(output.HumanLoopArn),
@@ -1383,17 +1332,15 @@ const deserializeAws_json1_1IdempotentParameterMismatchException = (output, cont
1383
1332
  const deserializeAws_json1_1IdentityDocument = (output, context) => {
1384
1333
  return {
1385
1334
  DocumentIndex: (0, smithy_client_1.expectInt32)(output.DocumentIndex),
1386
- IdentityDocumentFields: output.IdentityDocumentFields !== undefined && output.IdentityDocumentFields !== null
1335
+ IdentityDocumentFields: output.IdentityDocumentFields != null
1387
1336
  ? deserializeAws_json1_1IdentityDocumentFieldList(output.IdentityDocumentFields, context)
1388
1337
  : undefined,
1389
1338
  };
1390
1339
  };
1391
1340
  const deserializeAws_json1_1IdentityDocumentField = (output, context) => {
1392
1341
  return {
1393
- Type: output.Type !== undefined && output.Type !== null
1394
- ? deserializeAws_json1_1AnalyzeIDDetections(output.Type, context)
1395
- : undefined,
1396
- ValueDetection: output.ValueDetection !== undefined && output.ValueDetection !== null
1342
+ Type: output.Type != null ? deserializeAws_json1_1AnalyzeIDDetections(output.Type, context) : undefined,
1343
+ ValueDetection: output.ValueDetection != null
1397
1344
  ? deserializeAws_json1_1AnalyzeIDDetections(output.ValueDetection, context)
1398
1345
  : undefined,
1399
1346
  };
@@ -1469,7 +1416,7 @@ const deserializeAws_json1_1LimitExceededException = (output, context) => {
1469
1416
  };
1470
1417
  const deserializeAws_json1_1LineItemFields = (output, context) => {
1471
1418
  return {
1472
- LineItemExpenseFields: output.LineItemExpenseFields !== undefined && output.LineItemExpenseFields !== null
1419
+ LineItemExpenseFields: output.LineItemExpenseFields != null
1473
1420
  ? deserializeAws_json1_1ExpenseFieldList(output.LineItemExpenseFields, context)
1474
1421
  : undefined,
1475
1422
  };
@@ -1477,9 +1424,7 @@ const deserializeAws_json1_1LineItemFields = (output, context) => {
1477
1424
  const deserializeAws_json1_1LineItemGroup = (output, context) => {
1478
1425
  return {
1479
1426
  LineItemGroupIndex: (0, smithy_client_1.expectInt32)(output.LineItemGroupIndex),
1480
- LineItems: output.LineItems !== undefined && output.LineItems !== null
1481
- ? deserializeAws_json1_1LineItemList(output.LineItems, context)
1482
- : undefined,
1427
+ LineItems: output.LineItems != null ? deserializeAws_json1_1LineItemList(output.LineItems, context) : undefined,
1483
1428
  };
1484
1429
  };
1485
1430
  const deserializeAws_json1_1LineItemGroupList = (output, context) => {
@@ -1547,9 +1492,7 @@ const deserializeAws_json1_1ProvisionedThroughputExceededException = (output, co
1547
1492
  const deserializeAws_json1_1Query = (output, context) => {
1548
1493
  return {
1549
1494
  Alias: (0, smithy_client_1.expectString)(output.Alias),
1550
- Pages: output.Pages !== undefined && output.Pages !== null
1551
- ? deserializeAws_json1_1QueryPages(output.Pages, context)
1552
- : undefined,
1495
+ Pages: output.Pages != null ? deserializeAws_json1_1QueryPages(output.Pages, context) : undefined,
1553
1496
  Text: (0, smithy_client_1.expectString)(output.Text),
1554
1497
  };
1555
1498
  };
@@ -1566,7 +1509,7 @@ const deserializeAws_json1_1QueryPages = (output, context) => {
1566
1509
  };
1567
1510
  const deserializeAws_json1_1Relationship = (output, context) => {
1568
1511
  return {
1569
- Ids: output.Ids !== undefined && output.Ids !== null ? deserializeAws_json1_1IdList(output.Ids, context) : undefined,
1512
+ Ids: output.Ids != null ? deserializeAws_json1_1IdList(output.Ids, context) : undefined,
1570
1513
  Type: (0, smithy_client_1.expectString)(output.Type),
1571
1514
  };
1572
1515
  };
@@ -1611,9 +1554,7 @@ const deserializeAws_json1_1UnsupportedDocumentException = (output, context) =>
1611
1554
  const deserializeAws_json1_1Warning = (output, context) => {
1612
1555
  return {
1613
1556
  ErrorCode: (0, smithy_client_1.expectString)(output.ErrorCode),
1614
- Pages: output.Pages !== undefined && output.Pages !== null
1615
- ? deserializeAws_json1_1Pages(output.Pages, context)
1616
- : undefined,
1557
+ Pages: output.Pages != null ? deserializeAws_json1_1Pages(output.Pages, context) : undefined,
1617
1558
  };
1618
1559
  };
1619
1560
  const deserializeAws_json1_1Warnings = (output, context) => {
@@ -1689,5 +1630,4 @@ const loadRestJsonErrorCode = (output, data) => {
1689
1630
  if (data["__type"] !== undefined) {
1690
1631
  return sanitizeErrorCode(data["__type"]);
1691
1632
  }
1692
- return "";
1693
1633
  };