@aws-sdk/client-support 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.
@@ -165,8 +165,7 @@ const deserializeAws_json1_1AddAttachmentsToSetCommandError = async (output, con
165
165
  body: await parseBody(output.body, context),
166
166
  };
167
167
  let response;
168
- let errorCode = "UnknownError";
169
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
168
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
170
169
  switch (errorCode) {
171
170
  case "AttachmentLimitExceeded":
172
171
  case "com.amazonaws.support#AttachmentLimitExceeded":
@@ -185,10 +184,12 @@ const deserializeAws_json1_1AddAttachmentsToSetCommandError = async (output, con
185
184
  throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
186
185
  default:
187
186
  const parsedBody = parsedOutput.body;
187
+ const $metadata = deserializeMetadata(output);
188
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
188
189
  response = new SupportServiceException_1.SupportServiceException({
189
- name: parsedBody.code || parsedBody.Code || errorCode,
190
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
190
191
  $fault: "client",
191
- $metadata: deserializeMetadata(output),
192
+ $metadata,
192
193
  });
193
194
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
194
195
  }
@@ -213,8 +214,7 @@ const deserializeAws_json1_1AddCommunicationToCaseCommandError = async (output,
213
214
  body: await parseBody(output.body, context),
214
215
  };
215
216
  let response;
216
- let errorCode = "UnknownError";
217
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
217
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
218
218
  switch (errorCode) {
219
219
  case "AttachmentSetExpired":
220
220
  case "com.amazonaws.support#AttachmentSetExpired":
@@ -230,10 +230,12 @@ const deserializeAws_json1_1AddCommunicationToCaseCommandError = async (output,
230
230
  throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
231
231
  default:
232
232
  const parsedBody = parsedOutput.body;
233
+ const $metadata = deserializeMetadata(output);
234
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
233
235
  response = new SupportServiceException_1.SupportServiceException({
234
- name: parsedBody.code || parsedBody.Code || errorCode,
236
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
235
237
  $fault: "client",
236
- $metadata: deserializeMetadata(output),
238
+ $metadata,
237
239
  });
238
240
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
239
241
  }
@@ -258,8 +260,7 @@ const deserializeAws_json1_1CreateCaseCommandError = async (output, context) =>
258
260
  body: await parseBody(output.body, context),
259
261
  };
260
262
  let response;
261
- let errorCode = "UnknownError";
262
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
263
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
263
264
  switch (errorCode) {
264
265
  case "AttachmentSetExpired":
265
266
  case "com.amazonaws.support#AttachmentSetExpired":
@@ -275,10 +276,12 @@ const deserializeAws_json1_1CreateCaseCommandError = async (output, context) =>
275
276
  throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
276
277
  default:
277
278
  const parsedBody = parsedOutput.body;
279
+ const $metadata = deserializeMetadata(output);
280
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
278
281
  response = new SupportServiceException_1.SupportServiceException({
279
- name: parsedBody.code || parsedBody.Code || errorCode,
282
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
280
283
  $fault: "client",
281
- $metadata: deserializeMetadata(output),
284
+ $metadata,
282
285
  });
283
286
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
284
287
  }
@@ -303,8 +306,7 @@ const deserializeAws_json1_1DescribeAttachmentCommandError = async (output, cont
303
306
  body: await parseBody(output.body, context),
304
307
  };
305
308
  let response;
306
- let errorCode = "UnknownError";
307
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
309
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
308
310
  switch (errorCode) {
309
311
  case "AttachmentIdNotFound":
310
312
  case "com.amazonaws.support#AttachmentIdNotFound":
@@ -317,10 +319,12 @@ const deserializeAws_json1_1DescribeAttachmentCommandError = async (output, cont
317
319
  throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
318
320
  default:
319
321
  const parsedBody = parsedOutput.body;
322
+ const $metadata = deserializeMetadata(output);
323
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
320
324
  response = new SupportServiceException_1.SupportServiceException({
321
- name: parsedBody.code || parsedBody.Code || errorCode,
325
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
322
326
  $fault: "client",
323
- $metadata: deserializeMetadata(output),
327
+ $metadata,
324
328
  });
325
329
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
326
330
  }
@@ -345,8 +349,7 @@ const deserializeAws_json1_1DescribeCasesCommandError = async (output, context)
345
349
  body: await parseBody(output.body, context),
346
350
  };
347
351
  let response;
348
- let errorCode = "UnknownError";
349
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
352
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
350
353
  switch (errorCode) {
351
354
  case "CaseIdNotFound":
352
355
  case "com.amazonaws.support#CaseIdNotFound":
@@ -356,10 +359,12 @@ const deserializeAws_json1_1DescribeCasesCommandError = async (output, context)
356
359
  throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
357
360
  default:
358
361
  const parsedBody = parsedOutput.body;
362
+ const $metadata = deserializeMetadata(output);
363
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
359
364
  response = new SupportServiceException_1.SupportServiceException({
360
- name: parsedBody.code || parsedBody.Code || errorCode,
365
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
361
366
  $fault: "client",
362
- $metadata: deserializeMetadata(output),
367
+ $metadata,
363
368
  });
364
369
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
365
370
  }
@@ -384,8 +389,7 @@ const deserializeAws_json1_1DescribeCommunicationsCommandError = async (output,
384
389
  body: await parseBody(output.body, context),
385
390
  };
386
391
  let response;
387
- let errorCode = "UnknownError";
388
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
392
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
389
393
  switch (errorCode) {
390
394
  case "CaseIdNotFound":
391
395
  case "com.amazonaws.support#CaseIdNotFound":
@@ -395,10 +399,12 @@ const deserializeAws_json1_1DescribeCommunicationsCommandError = async (output,
395
399
  throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
396
400
  default:
397
401
  const parsedBody = parsedOutput.body;
402
+ const $metadata = deserializeMetadata(output);
403
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
398
404
  response = new SupportServiceException_1.SupportServiceException({
399
- name: parsedBody.code || parsedBody.Code || errorCode,
405
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
400
406
  $fault: "client",
401
- $metadata: deserializeMetadata(output),
407
+ $metadata,
402
408
  });
403
409
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
404
410
  }
@@ -423,18 +429,19 @@ const deserializeAws_json1_1DescribeServicesCommandError = async (output, contex
423
429
  body: await parseBody(output.body, context),
424
430
  };
425
431
  let response;
426
- let errorCode = "UnknownError";
427
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
432
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
428
433
  switch (errorCode) {
429
434
  case "InternalServerError":
430
435
  case "com.amazonaws.support#InternalServerError":
431
436
  throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
432
437
  default:
433
438
  const parsedBody = parsedOutput.body;
439
+ const $metadata = deserializeMetadata(output);
440
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
434
441
  response = new SupportServiceException_1.SupportServiceException({
435
- name: parsedBody.code || parsedBody.Code || errorCode,
442
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
436
443
  $fault: "client",
437
- $metadata: deserializeMetadata(output),
444
+ $metadata,
438
445
  });
439
446
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
440
447
  }
@@ -459,18 +466,19 @@ const deserializeAws_json1_1DescribeSeverityLevelsCommandError = async (output,
459
466
  body: await parseBody(output.body, context),
460
467
  };
461
468
  let response;
462
- let errorCode = "UnknownError";
463
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
469
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
464
470
  switch (errorCode) {
465
471
  case "InternalServerError":
466
472
  case "com.amazonaws.support#InternalServerError":
467
473
  throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
468
474
  default:
469
475
  const parsedBody = parsedOutput.body;
476
+ const $metadata = deserializeMetadata(output);
477
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
470
478
  response = new SupportServiceException_1.SupportServiceException({
471
- name: parsedBody.code || parsedBody.Code || errorCode,
479
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
472
480
  $fault: "client",
473
- $metadata: deserializeMetadata(output),
481
+ $metadata,
474
482
  });
475
483
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
476
484
  }
@@ -495,18 +503,19 @@ const deserializeAws_json1_1DescribeTrustedAdvisorCheckRefreshStatusesCommandErr
495
503
  body: await parseBody(output.body, context),
496
504
  };
497
505
  let response;
498
- let errorCode = "UnknownError";
499
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
506
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
500
507
  switch (errorCode) {
501
508
  case "InternalServerError":
502
509
  case "com.amazonaws.support#InternalServerError":
503
510
  throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
504
511
  default:
505
512
  const parsedBody = parsedOutput.body;
513
+ const $metadata = deserializeMetadata(output);
514
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
506
515
  response = new SupportServiceException_1.SupportServiceException({
507
- name: parsedBody.code || parsedBody.Code || errorCode,
516
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
508
517
  $fault: "client",
509
- $metadata: deserializeMetadata(output),
518
+ $metadata,
510
519
  });
511
520
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
512
521
  }
@@ -531,18 +540,19 @@ const deserializeAws_json1_1DescribeTrustedAdvisorCheckResultCommandError = asyn
531
540
  body: await parseBody(output.body, context),
532
541
  };
533
542
  let response;
534
- let errorCode = "UnknownError";
535
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
543
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
536
544
  switch (errorCode) {
537
545
  case "InternalServerError":
538
546
  case "com.amazonaws.support#InternalServerError":
539
547
  throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
540
548
  default:
541
549
  const parsedBody = parsedOutput.body;
550
+ const $metadata = deserializeMetadata(output);
551
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
542
552
  response = new SupportServiceException_1.SupportServiceException({
543
- name: parsedBody.code || parsedBody.Code || errorCode,
553
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
544
554
  $fault: "client",
545
- $metadata: deserializeMetadata(output),
555
+ $metadata,
546
556
  });
547
557
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
548
558
  }
@@ -567,18 +577,19 @@ const deserializeAws_json1_1DescribeTrustedAdvisorChecksCommandError = async (ou
567
577
  body: await parseBody(output.body, context),
568
578
  };
569
579
  let response;
570
- let errorCode = "UnknownError";
571
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
580
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
572
581
  switch (errorCode) {
573
582
  case "InternalServerError":
574
583
  case "com.amazonaws.support#InternalServerError":
575
584
  throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
576
585
  default:
577
586
  const parsedBody = parsedOutput.body;
587
+ const $metadata = deserializeMetadata(output);
588
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
578
589
  response = new SupportServiceException_1.SupportServiceException({
579
- name: parsedBody.code || parsedBody.Code || errorCode,
590
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
580
591
  $fault: "client",
581
- $metadata: deserializeMetadata(output),
592
+ $metadata,
582
593
  });
583
594
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
584
595
  }
@@ -603,18 +614,19 @@ const deserializeAws_json1_1DescribeTrustedAdvisorCheckSummariesCommandError = a
603
614
  body: await parseBody(output.body, context),
604
615
  };
605
616
  let response;
606
- let errorCode = "UnknownError";
607
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
617
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
608
618
  switch (errorCode) {
609
619
  case "InternalServerError":
610
620
  case "com.amazonaws.support#InternalServerError":
611
621
  throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
612
622
  default:
613
623
  const parsedBody = parsedOutput.body;
624
+ const $metadata = deserializeMetadata(output);
625
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
614
626
  response = new SupportServiceException_1.SupportServiceException({
615
- name: parsedBody.code || parsedBody.Code || errorCode,
627
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
616
628
  $fault: "client",
617
- $metadata: deserializeMetadata(output),
629
+ $metadata,
618
630
  });
619
631
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
620
632
  }
@@ -639,18 +651,19 @@ const deserializeAws_json1_1RefreshTrustedAdvisorCheckCommandError = async (outp
639
651
  body: await parseBody(output.body, context),
640
652
  };
641
653
  let response;
642
- let errorCode = "UnknownError";
643
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
654
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
644
655
  switch (errorCode) {
645
656
  case "InternalServerError":
646
657
  case "com.amazonaws.support#InternalServerError":
647
658
  throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
648
659
  default:
649
660
  const parsedBody = parsedOutput.body;
661
+ const $metadata = deserializeMetadata(output);
662
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
650
663
  response = new SupportServiceException_1.SupportServiceException({
651
- name: parsedBody.code || parsedBody.Code || errorCode,
664
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
652
665
  $fault: "client",
653
- $metadata: deserializeMetadata(output),
666
+ $metadata,
654
667
  });
655
668
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
656
669
  }
@@ -675,8 +688,7 @@ const deserializeAws_json1_1ResolveCaseCommandError = async (output, context) =>
675
688
  body: await parseBody(output.body, context),
676
689
  };
677
690
  let response;
678
- let errorCode = "UnknownError";
679
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
691
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
680
692
  switch (errorCode) {
681
693
  case "CaseIdNotFound":
682
694
  case "com.amazonaws.support#CaseIdNotFound":
@@ -686,10 +698,12 @@ const deserializeAws_json1_1ResolveCaseCommandError = async (output, context) =>
686
698
  throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
687
699
  default:
688
700
  const parsedBody = parsedOutput.body;
701
+ const $metadata = deserializeMetadata(output);
702
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
689
703
  response = new SupportServiceException_1.SupportServiceException({
690
- name: parsedBody.code || parsedBody.Code || errorCode,
704
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
691
705
  $fault: "client",
692
- $metadata: deserializeMetadata(output),
706
+ $metadata,
693
707
  });
694
708
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
695
709
  }
@@ -777,29 +791,24 @@ const deserializeAws_json1_1InternalServerErrorResponse = async (parsedOutput, c
777
791
  };
778
792
  const serializeAws_json1_1AddAttachmentsToSetRequest = (input, context) => {
779
793
  return {
780
- ...(input.attachmentSetId !== undefined &&
781
- input.attachmentSetId !== null && { attachmentSetId: input.attachmentSetId }),
782
- ...(input.attachments !== undefined &&
783
- input.attachments !== null && { attachments: serializeAws_json1_1Attachments(input.attachments, context) }),
794
+ ...(input.attachmentSetId != null && { attachmentSetId: input.attachmentSetId }),
795
+ ...(input.attachments != null && { attachments: serializeAws_json1_1Attachments(input.attachments, context) }),
784
796
  };
785
797
  };
786
798
  const serializeAws_json1_1AddCommunicationToCaseRequest = (input, context) => {
787
799
  return {
788
- ...(input.attachmentSetId !== undefined &&
789
- input.attachmentSetId !== null && { attachmentSetId: input.attachmentSetId }),
790
- ...(input.caseId !== undefined && input.caseId !== null && { caseId: input.caseId }),
791
- ...(input.ccEmailAddresses !== undefined &&
792
- input.ccEmailAddresses !== null && {
800
+ ...(input.attachmentSetId != null && { attachmentSetId: input.attachmentSetId }),
801
+ ...(input.caseId != null && { caseId: input.caseId }),
802
+ ...(input.ccEmailAddresses != null && {
793
803
  ccEmailAddresses: serializeAws_json1_1CcEmailAddressList(input.ccEmailAddresses, context),
794
804
  }),
795
- ...(input.communicationBody !== undefined &&
796
- input.communicationBody !== null && { communicationBody: input.communicationBody }),
805
+ ...(input.communicationBody != null && { communicationBody: input.communicationBody }),
797
806
  };
798
807
  };
799
808
  const serializeAws_json1_1Attachment = (input, context) => {
800
809
  return {
801
- ...(input.data !== undefined && input.data !== null && { data: context.base64Encoder(input.data) }),
802
- ...(input.fileName !== undefined && input.fileName !== null && { fileName: input.fileName }),
810
+ ...(input.data != null && { data: context.base64Encoder(input.data) }),
811
+ ...(input.fileName != null && { fileName: input.fileName }),
803
812
  };
804
813
  };
805
814
  const serializeAws_json1_1Attachments = (input, context) => {
@@ -834,97 +843,88 @@ const serializeAws_json1_1CcEmailAddressList = (input, context) => {
834
843
  };
835
844
  const serializeAws_json1_1CreateCaseRequest = (input, context) => {
836
845
  return {
837
- ...(input.attachmentSetId !== undefined &&
838
- input.attachmentSetId !== null && { attachmentSetId: input.attachmentSetId }),
839
- ...(input.categoryCode !== undefined && input.categoryCode !== null && { categoryCode: input.categoryCode }),
840
- ...(input.ccEmailAddresses !== undefined &&
841
- input.ccEmailAddresses !== null && {
846
+ ...(input.attachmentSetId != null && { attachmentSetId: input.attachmentSetId }),
847
+ ...(input.categoryCode != null && { categoryCode: input.categoryCode }),
848
+ ...(input.ccEmailAddresses != null && {
842
849
  ccEmailAddresses: serializeAws_json1_1CcEmailAddressList(input.ccEmailAddresses, context),
843
850
  }),
844
- ...(input.communicationBody !== undefined &&
845
- input.communicationBody !== null && { communicationBody: input.communicationBody }),
846
- ...(input.issueType !== undefined && input.issueType !== null && { issueType: input.issueType }),
847
- ...(input.language !== undefined && input.language !== null && { language: input.language }),
848
- ...(input.serviceCode !== undefined && input.serviceCode !== null && { serviceCode: input.serviceCode }),
849
- ...(input.severityCode !== undefined && input.severityCode !== null && { severityCode: input.severityCode }),
850
- ...(input.subject !== undefined && input.subject !== null && { subject: input.subject }),
851
+ ...(input.communicationBody != null && { communicationBody: input.communicationBody }),
852
+ ...(input.issueType != null && { issueType: input.issueType }),
853
+ ...(input.language != null && { language: input.language }),
854
+ ...(input.serviceCode != null && { serviceCode: input.serviceCode }),
855
+ ...(input.severityCode != null && { severityCode: input.severityCode }),
856
+ ...(input.subject != null && { subject: input.subject }),
851
857
  };
852
858
  };
853
859
  const serializeAws_json1_1DescribeAttachmentRequest = (input, context) => {
854
860
  return {
855
- ...(input.attachmentId !== undefined && input.attachmentId !== null && { attachmentId: input.attachmentId }),
861
+ ...(input.attachmentId != null && { attachmentId: input.attachmentId }),
856
862
  };
857
863
  };
858
864
  const serializeAws_json1_1DescribeCasesRequest = (input, context) => {
859
865
  return {
860
- ...(input.afterTime !== undefined && input.afterTime !== null && { afterTime: input.afterTime }),
861
- ...(input.beforeTime !== undefined && input.beforeTime !== null && { beforeTime: input.beforeTime }),
862
- ...(input.caseIdList !== undefined &&
863
- input.caseIdList !== null && { caseIdList: serializeAws_json1_1CaseIdList(input.caseIdList, context) }),
864
- ...(input.displayId !== undefined && input.displayId !== null && { displayId: input.displayId }),
865
- ...(input.includeCommunications !== undefined &&
866
- input.includeCommunications !== null && { includeCommunications: input.includeCommunications }),
867
- ...(input.includeResolvedCases !== undefined &&
868
- input.includeResolvedCases !== null && { includeResolvedCases: input.includeResolvedCases }),
869
- ...(input.language !== undefined && input.language !== null && { language: input.language }),
870
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
871
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
866
+ ...(input.afterTime != null && { afterTime: input.afterTime }),
867
+ ...(input.beforeTime != null && { beforeTime: input.beforeTime }),
868
+ ...(input.caseIdList != null && { caseIdList: serializeAws_json1_1CaseIdList(input.caseIdList, context) }),
869
+ ...(input.displayId != null && { displayId: input.displayId }),
870
+ ...(input.includeCommunications != null && { includeCommunications: input.includeCommunications }),
871
+ ...(input.includeResolvedCases != null && { includeResolvedCases: input.includeResolvedCases }),
872
+ ...(input.language != null && { language: input.language }),
873
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
874
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
872
875
  };
873
876
  };
874
877
  const serializeAws_json1_1DescribeCommunicationsRequest = (input, context) => {
875
878
  return {
876
- ...(input.afterTime !== undefined && input.afterTime !== null && { afterTime: input.afterTime }),
877
- ...(input.beforeTime !== undefined && input.beforeTime !== null && { beforeTime: input.beforeTime }),
878
- ...(input.caseId !== undefined && input.caseId !== null && { caseId: input.caseId }),
879
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
880
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
879
+ ...(input.afterTime != null && { afterTime: input.afterTime }),
880
+ ...(input.beforeTime != null && { beforeTime: input.beforeTime }),
881
+ ...(input.caseId != null && { caseId: input.caseId }),
882
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
883
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
881
884
  };
882
885
  };
883
886
  const serializeAws_json1_1DescribeServicesRequest = (input, context) => {
884
887
  return {
885
- ...(input.language !== undefined && input.language !== null && { language: input.language }),
886
- ...(input.serviceCodeList !== undefined &&
887
- input.serviceCodeList !== null && {
888
+ ...(input.language != null && { language: input.language }),
889
+ ...(input.serviceCodeList != null && {
888
890
  serviceCodeList: serializeAws_json1_1ServiceCodeList(input.serviceCodeList, context),
889
891
  }),
890
892
  };
891
893
  };
892
894
  const serializeAws_json1_1DescribeSeverityLevelsRequest = (input, context) => {
893
895
  return {
894
- ...(input.language !== undefined && input.language !== null && { language: input.language }),
896
+ ...(input.language != null && { language: input.language }),
895
897
  };
896
898
  };
897
899
  const serializeAws_json1_1DescribeTrustedAdvisorCheckRefreshStatusesRequest = (input, context) => {
898
900
  return {
899
- ...(input.checkIds !== undefined &&
900
- input.checkIds !== null && { checkIds: serializeAws_json1_1StringList(input.checkIds, context) }),
901
+ ...(input.checkIds != null && { checkIds: serializeAws_json1_1StringList(input.checkIds, context) }),
901
902
  };
902
903
  };
903
904
  const serializeAws_json1_1DescribeTrustedAdvisorCheckResultRequest = (input, context) => {
904
905
  return {
905
- ...(input.checkId !== undefined && input.checkId !== null && { checkId: input.checkId }),
906
- ...(input.language !== undefined && input.language !== null && { language: input.language }),
906
+ ...(input.checkId != null && { checkId: input.checkId }),
907
+ ...(input.language != null && { language: input.language }),
907
908
  };
908
909
  };
909
910
  const serializeAws_json1_1DescribeTrustedAdvisorChecksRequest = (input, context) => {
910
911
  return {
911
- ...(input.language !== undefined && input.language !== null && { language: input.language }),
912
+ ...(input.language != null && { language: input.language }),
912
913
  };
913
914
  };
914
915
  const serializeAws_json1_1DescribeTrustedAdvisorCheckSummariesRequest = (input, context) => {
915
916
  return {
916
- ...(input.checkIds !== undefined &&
917
- input.checkIds !== null && { checkIds: serializeAws_json1_1StringList(input.checkIds, context) }),
917
+ ...(input.checkIds != null && { checkIds: serializeAws_json1_1StringList(input.checkIds, context) }),
918
918
  };
919
919
  };
920
920
  const serializeAws_json1_1RefreshTrustedAdvisorCheckRequest = (input, context) => {
921
921
  return {
922
- ...(input.checkId !== undefined && input.checkId !== null && { checkId: input.checkId }),
922
+ ...(input.checkId != null && { checkId: input.checkId }),
923
923
  };
924
924
  };
925
925
  const serializeAws_json1_1ResolveCaseRequest = (input, context) => {
926
926
  return {
927
- ...(input.caseId !== undefined && input.caseId !== null && { caseId: input.caseId }),
927
+ ...(input.caseId != null && { caseId: input.caseId }),
928
928
  };
929
929
  };
930
930
  const serializeAws_json1_1ServiceCodeList = (input, context) => {
@@ -960,7 +960,7 @@ const deserializeAws_json1_1AddCommunicationToCaseResponse = (output, context) =
960
960
  };
961
961
  const deserializeAws_json1_1Attachment = (output, context) => {
962
962
  return {
963
- data: output.data !== undefined && output.data !== null ? context.base64Decoder(output.data) : undefined,
963
+ data: output.data != null ? context.base64Decoder(output.data) : undefined,
964
964
  fileName: (0, smithy_client_1.expectString)(output.fileName),
965
965
  };
966
966
  };
@@ -1015,12 +1015,12 @@ const deserializeAws_json1_1CaseDetails = (output, context) => {
1015
1015
  return {
1016
1016
  caseId: (0, smithy_client_1.expectString)(output.caseId),
1017
1017
  categoryCode: (0, smithy_client_1.expectString)(output.categoryCode),
1018
- ccEmailAddresses: output.ccEmailAddresses !== undefined && output.ccEmailAddresses !== null
1018
+ ccEmailAddresses: output.ccEmailAddresses != null
1019
1019
  ? deserializeAws_json1_1CcEmailAddressList(output.ccEmailAddresses, context)
1020
1020
  : undefined,
1021
1021
  displayId: (0, smithy_client_1.expectString)(output.displayId),
1022
1022
  language: (0, smithy_client_1.expectString)(output.language),
1023
- recentCommunications: output.recentCommunications !== undefined && output.recentCommunications !== null
1023
+ recentCommunications: output.recentCommunications != null
1024
1024
  ? deserializeAws_json1_1RecentCaseCommunications(output.recentCommunications, context)
1025
1025
  : undefined,
1026
1026
  serviceCode: (0, smithy_client_1.expectString)(output.serviceCode),
@@ -1077,9 +1077,7 @@ const deserializeAws_json1_1CcEmailAddressList = (output, context) => {
1077
1077
  };
1078
1078
  const deserializeAws_json1_1Communication = (output, context) => {
1079
1079
  return {
1080
- attachmentSet: output.attachmentSet !== undefined && output.attachmentSet !== null
1081
- ? deserializeAws_json1_1AttachmentSet(output.attachmentSet, context)
1082
- : undefined,
1080
+ attachmentSet: output.attachmentSet != null ? deserializeAws_json1_1AttachmentSet(output.attachmentSet, context) : undefined,
1083
1081
  body: (0, smithy_client_1.expectString)(output.body),
1084
1082
  caseId: (0, smithy_client_1.expectString)(output.caseId),
1085
1083
  submittedBy: (0, smithy_client_1.expectString)(output.submittedBy),
@@ -1109,22 +1107,18 @@ const deserializeAws_json1_1DescribeAttachmentLimitExceeded = (output, context)
1109
1107
  };
1110
1108
  const deserializeAws_json1_1DescribeAttachmentResponse = (output, context) => {
1111
1109
  return {
1112
- attachment: output.attachment !== undefined && output.attachment !== null
1113
- ? deserializeAws_json1_1Attachment(output.attachment, context)
1114
- : undefined,
1110
+ attachment: output.attachment != null ? deserializeAws_json1_1Attachment(output.attachment, context) : undefined,
1115
1111
  };
1116
1112
  };
1117
1113
  const deserializeAws_json1_1DescribeCasesResponse = (output, context) => {
1118
1114
  return {
1119
- cases: output.cases !== undefined && output.cases !== null
1120
- ? deserializeAws_json1_1CaseList(output.cases, context)
1121
- : undefined,
1115
+ cases: output.cases != null ? deserializeAws_json1_1CaseList(output.cases, context) : undefined,
1122
1116
  nextToken: (0, smithy_client_1.expectString)(output.nextToken),
1123
1117
  };
1124
1118
  };
1125
1119
  const deserializeAws_json1_1DescribeCommunicationsResponse = (output, context) => {
1126
1120
  return {
1127
- communications: output.communications !== undefined && output.communications !== null
1121
+ communications: output.communications != null
1128
1122
  ? deserializeAws_json1_1CommunicationList(output.communications, context)
1129
1123
  : undefined,
1130
1124
  nextToken: (0, smithy_client_1.expectString)(output.nextToken),
@@ -1132,42 +1126,36 @@ const deserializeAws_json1_1DescribeCommunicationsResponse = (output, context) =
1132
1126
  };
1133
1127
  const deserializeAws_json1_1DescribeServicesResponse = (output, context) => {
1134
1128
  return {
1135
- services: output.services !== undefined && output.services !== null
1136
- ? deserializeAws_json1_1ServiceList(output.services, context)
1137
- : undefined,
1129
+ services: output.services != null ? deserializeAws_json1_1ServiceList(output.services, context) : undefined,
1138
1130
  };
1139
1131
  };
1140
1132
  const deserializeAws_json1_1DescribeSeverityLevelsResponse = (output, context) => {
1141
1133
  return {
1142
- severityLevels: output.severityLevels !== undefined && output.severityLevels !== null
1134
+ severityLevels: output.severityLevels != null
1143
1135
  ? deserializeAws_json1_1SeverityLevelsList(output.severityLevels, context)
1144
1136
  : undefined,
1145
1137
  };
1146
1138
  };
1147
1139
  const deserializeAws_json1_1DescribeTrustedAdvisorCheckRefreshStatusesResponse = (output, context) => {
1148
1140
  return {
1149
- statuses: output.statuses !== undefined && output.statuses !== null
1141
+ statuses: output.statuses != null
1150
1142
  ? deserializeAws_json1_1TrustedAdvisorCheckRefreshStatusList(output.statuses, context)
1151
1143
  : undefined,
1152
1144
  };
1153
1145
  };
1154
1146
  const deserializeAws_json1_1DescribeTrustedAdvisorCheckResultResponse = (output, context) => {
1155
1147
  return {
1156
- result: output.result !== undefined && output.result !== null
1157
- ? deserializeAws_json1_1TrustedAdvisorCheckResult(output.result, context)
1158
- : undefined,
1148
+ result: output.result != null ? deserializeAws_json1_1TrustedAdvisorCheckResult(output.result, context) : undefined,
1159
1149
  };
1160
1150
  };
1161
1151
  const deserializeAws_json1_1DescribeTrustedAdvisorChecksResponse = (output, context) => {
1162
1152
  return {
1163
- checks: output.checks !== undefined && output.checks !== null
1164
- ? deserializeAws_json1_1TrustedAdvisorCheckList(output.checks, context)
1165
- : undefined,
1153
+ checks: output.checks != null ? deserializeAws_json1_1TrustedAdvisorCheckList(output.checks, context) : undefined,
1166
1154
  };
1167
1155
  };
1168
1156
  const deserializeAws_json1_1DescribeTrustedAdvisorCheckSummariesResponse = (output, context) => {
1169
1157
  return {
1170
- summaries: output.summaries !== undefined && output.summaries !== null
1158
+ summaries: output.summaries != null
1171
1159
  ? deserializeAws_json1_1TrustedAdvisorCheckSummaryList(output.summaries, context)
1172
1160
  : undefined,
1173
1161
  };
@@ -1179,7 +1167,7 @@ const deserializeAws_json1_1InternalServerError = (output, context) => {
1179
1167
  };
1180
1168
  const deserializeAws_json1_1RecentCaseCommunications = (output, context) => {
1181
1169
  return {
1182
- communications: output.communications !== undefined && output.communications !== null
1170
+ communications: output.communications != null
1183
1171
  ? deserializeAws_json1_1CommunicationList(output.communications, context)
1184
1172
  : undefined,
1185
1173
  nextToken: (0, smithy_client_1.expectString)(output.nextToken),
@@ -1187,7 +1175,7 @@ const deserializeAws_json1_1RecentCaseCommunications = (output, context) => {
1187
1175
  };
1188
1176
  const deserializeAws_json1_1RefreshTrustedAdvisorCheckResponse = (output, context) => {
1189
1177
  return {
1190
- status: output.status !== undefined && output.status !== null
1178
+ status: output.status != null
1191
1179
  ? deserializeAws_json1_1TrustedAdvisorCheckRefreshStatus(output.status, context)
1192
1180
  : undefined,
1193
1181
  };
@@ -1200,9 +1188,7 @@ const deserializeAws_json1_1ResolveCaseResponse = (output, context) => {
1200
1188
  };
1201
1189
  const deserializeAws_json1_1Service = (output, context) => {
1202
1190
  return {
1203
- categories: output.categories !== undefined && output.categories !== null
1204
- ? deserializeAws_json1_1CategoryList(output.categories, context)
1205
- : undefined,
1191
+ categories: output.categories != null ? deserializeAws_json1_1CategoryList(output.categories, context) : undefined,
1206
1192
  code: (0, smithy_client_1.expectString)(output.code),
1207
1193
  name: (0, smithy_client_1.expectString)(output.name),
1208
1194
  };
@@ -1248,7 +1234,7 @@ const deserializeAws_json1_1StringList = (output, context) => {
1248
1234
  };
1249
1235
  const deserializeAws_json1_1TrustedAdvisorCategorySpecificSummary = (output, context) => {
1250
1236
  return {
1251
- costOptimizing: output.costOptimizing !== undefined && output.costOptimizing !== null
1237
+ costOptimizing: output.costOptimizing != null
1252
1238
  ? deserializeAws_json1_1TrustedAdvisorCostOptimizingSummary(output.costOptimizing, context)
1253
1239
  : undefined,
1254
1240
  };
@@ -1258,9 +1244,7 @@ const deserializeAws_json1_1TrustedAdvisorCheckDescription = (output, context) =
1258
1244
  category: (0, smithy_client_1.expectString)(output.category),
1259
1245
  description: (0, smithy_client_1.expectString)(output.description),
1260
1246
  id: (0, smithy_client_1.expectString)(output.id),
1261
- metadata: output.metadata !== undefined && output.metadata !== null
1262
- ? deserializeAws_json1_1StringList(output.metadata, context)
1263
- : undefined,
1247
+ metadata: output.metadata != null ? deserializeAws_json1_1StringList(output.metadata, context) : undefined,
1264
1248
  name: (0, smithy_client_1.expectString)(output.name),
1265
1249
  };
1266
1250
  };
@@ -1295,14 +1279,14 @@ const deserializeAws_json1_1TrustedAdvisorCheckRefreshStatusList = (output, cont
1295
1279
  };
1296
1280
  const deserializeAws_json1_1TrustedAdvisorCheckResult = (output, context) => {
1297
1281
  return {
1298
- categorySpecificSummary: output.categorySpecificSummary !== undefined && output.categorySpecificSummary !== null
1282
+ categorySpecificSummary: output.categorySpecificSummary != null
1299
1283
  ? deserializeAws_json1_1TrustedAdvisorCategorySpecificSummary(output.categorySpecificSummary, context)
1300
1284
  : undefined,
1301
1285
  checkId: (0, smithy_client_1.expectString)(output.checkId),
1302
- flaggedResources: output.flaggedResources !== undefined && output.flaggedResources !== null
1286
+ flaggedResources: output.flaggedResources != null
1303
1287
  ? deserializeAws_json1_1TrustedAdvisorResourceDetailList(output.flaggedResources, context)
1304
1288
  : undefined,
1305
- resourcesSummary: output.resourcesSummary !== undefined && output.resourcesSummary !== null
1289
+ resourcesSummary: output.resourcesSummary != null
1306
1290
  ? deserializeAws_json1_1TrustedAdvisorResourcesSummary(output.resourcesSummary, context)
1307
1291
  : undefined,
1308
1292
  status: (0, smithy_client_1.expectString)(output.status),
@@ -1311,12 +1295,12 @@ const deserializeAws_json1_1TrustedAdvisorCheckResult = (output, context) => {
1311
1295
  };
1312
1296
  const deserializeAws_json1_1TrustedAdvisorCheckSummary = (output, context) => {
1313
1297
  return {
1314
- categorySpecificSummary: output.categorySpecificSummary !== undefined && output.categorySpecificSummary !== null
1298
+ categorySpecificSummary: output.categorySpecificSummary != null
1315
1299
  ? deserializeAws_json1_1TrustedAdvisorCategorySpecificSummary(output.categorySpecificSummary, context)
1316
1300
  : undefined,
1317
1301
  checkId: (0, smithy_client_1.expectString)(output.checkId),
1318
1302
  hasFlaggedResources: (0, smithy_client_1.expectBoolean)(output.hasFlaggedResources),
1319
- resourcesSummary: output.resourcesSummary !== undefined && output.resourcesSummary !== null
1303
+ resourcesSummary: output.resourcesSummary != null
1320
1304
  ? deserializeAws_json1_1TrustedAdvisorResourcesSummary(output.resourcesSummary, context)
1321
1305
  : undefined,
1322
1306
  status: (0, smithy_client_1.expectString)(output.status),
@@ -1343,9 +1327,7 @@ const deserializeAws_json1_1TrustedAdvisorCostOptimizingSummary = (output, conte
1343
1327
  const deserializeAws_json1_1TrustedAdvisorResourceDetail = (output, context) => {
1344
1328
  return {
1345
1329
  isSuppressed: (0, smithy_client_1.expectBoolean)(output.isSuppressed),
1346
- metadata: output.metadata !== undefined && output.metadata !== null
1347
- ? deserializeAws_json1_1StringList(output.metadata, context)
1348
- : undefined,
1330
+ metadata: output.metadata != null ? deserializeAws_json1_1StringList(output.metadata, context) : undefined,
1349
1331
  region: (0, smithy_client_1.expectString)(output.region),
1350
1332
  resourceId: (0, smithy_client_1.expectString)(output.resourceId),
1351
1333
  status: (0, smithy_client_1.expectString)(output.status),
@@ -1432,5 +1414,4 @@ const loadRestJsonErrorCode = (output, data) => {
1432
1414
  if (data["__type"] !== undefined) {
1433
1415
  return sanitizeErrorCode(data["__type"]);
1434
1416
  }
1435
- return "";
1436
1417
  };