@aws-sdk/client-grafana 3.118.1 → 3.128.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.
@@ -52,36 +52,27 @@ const serializeAws_restJson1CreateWorkspaceCommand = async (input, context) => {
52
52
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces";
53
53
  let body;
54
54
  body = JSON.stringify({
55
- ...(input.accountAccessType !== undefined &&
56
- input.accountAccessType !== null && { accountAccessType: input.accountAccessType }),
57
- ...(input.authenticationProviders !== undefined &&
58
- input.authenticationProviders !== null && {
55
+ ...(input.accountAccessType != null && { accountAccessType: input.accountAccessType }),
56
+ ...(input.authenticationProviders != null && {
59
57
  authenticationProviders: serializeAws_restJson1AuthenticationProviders(input.authenticationProviders, context),
60
58
  }),
61
59
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
62
- ...(input.organizationRoleName !== undefined &&
63
- input.organizationRoleName !== null && { organizationRoleName: input.organizationRoleName }),
64
- ...(input.permissionType !== undefined &&
65
- input.permissionType !== null && { permissionType: input.permissionType }),
66
- ...(input.stackSetName !== undefined && input.stackSetName !== null && { stackSetName: input.stackSetName }),
67
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
68
- ...(input.workspaceDataSources !== undefined &&
69
- input.workspaceDataSources !== null && {
60
+ ...(input.organizationRoleName != null && { organizationRoleName: input.organizationRoleName }),
61
+ ...(input.permissionType != null && { permissionType: input.permissionType }),
62
+ ...(input.stackSetName != null && { stackSetName: input.stackSetName }),
63
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
64
+ ...(input.workspaceDataSources != null && {
70
65
  workspaceDataSources: serializeAws_restJson1DataSourceTypesList(input.workspaceDataSources, context),
71
66
  }),
72
- ...(input.workspaceDescription !== undefined &&
73
- input.workspaceDescription !== null && { workspaceDescription: input.workspaceDescription }),
74
- ...(input.workspaceName !== undefined && input.workspaceName !== null && { workspaceName: input.workspaceName }),
75
- ...(input.workspaceNotificationDestinations !== undefined &&
76
- input.workspaceNotificationDestinations !== null && {
67
+ ...(input.workspaceDescription != null && { workspaceDescription: input.workspaceDescription }),
68
+ ...(input.workspaceName != null && { workspaceName: input.workspaceName }),
69
+ ...(input.workspaceNotificationDestinations != null && {
77
70
  workspaceNotificationDestinations: serializeAws_restJson1NotificationDestinationsList(input.workspaceNotificationDestinations, context),
78
71
  }),
79
- ...(input.workspaceOrganizationalUnits !== undefined &&
80
- input.workspaceOrganizationalUnits !== null && {
72
+ ...(input.workspaceOrganizationalUnits != null && {
81
73
  workspaceOrganizationalUnits: serializeAws_restJson1OrganizationalUnitList(input.workspaceOrganizationalUnits, context),
82
74
  }),
83
- ...(input.workspaceRoleArn !== undefined &&
84
- input.workspaceRoleArn !== null && { workspaceRoleArn: input.workspaceRoleArn }),
75
+ ...(input.workspaceRoleArn != null && { workspaceRoleArn: input.workspaceRoleArn }),
85
76
  });
86
77
  return new protocol_http_1.HttpRequest({
87
78
  protocol,
@@ -112,9 +103,9 @@ const serializeAws_restJson1CreateWorkspaceApiKeyCommand = async (input, context
112
103
  }
113
104
  let body;
114
105
  body = JSON.stringify({
115
- ...(input.keyName !== undefined && input.keyName !== null && { keyName: input.keyName }),
116
- ...(input.keyRole !== undefined && input.keyRole !== null && { keyRole: input.keyRole }),
117
- ...(input.secondsToLive !== undefined && input.secondsToLive !== null && { secondsToLive: input.secondsToLive }),
106
+ ...(input.keyName != null && { keyName: input.keyName }),
107
+ ...(input.keyRole != null && { keyRole: input.keyRole }),
108
+ ...(input.secondsToLive != null && { secondsToLive: input.secondsToLive }),
118
109
  });
119
110
  return new protocol_http_1.HttpRequest({
120
111
  protocol,
@@ -378,7 +369,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
378
369
  }
379
370
  let body;
380
371
  body = JSON.stringify({
381
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
372
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
382
373
  });
383
374
  return new protocol_http_1.HttpRequest({
384
375
  protocol,
@@ -439,8 +430,7 @@ const serializeAws_restJson1UpdatePermissionsCommand = async (input, context) =>
439
430
  }
440
431
  let body;
441
432
  body = JSON.stringify({
442
- ...(input.updateInstructionBatch !== undefined &&
443
- input.updateInstructionBatch !== null && {
433
+ ...(input.updateInstructionBatch != null && {
444
434
  updateInstructionBatch: serializeAws_restJson1UpdateInstructionBatch(input.updateInstructionBatch, context),
445
435
  }),
446
436
  });
@@ -473,30 +463,22 @@ const serializeAws_restJson1UpdateWorkspaceCommand = async (input, context) => {
473
463
  }
474
464
  let body;
475
465
  body = JSON.stringify({
476
- ...(input.accountAccessType !== undefined &&
477
- input.accountAccessType !== null && { accountAccessType: input.accountAccessType }),
478
- ...(input.organizationRoleName !== undefined &&
479
- input.organizationRoleName !== null && { organizationRoleName: input.organizationRoleName }),
480
- ...(input.permissionType !== undefined &&
481
- input.permissionType !== null && { permissionType: input.permissionType }),
482
- ...(input.stackSetName !== undefined && input.stackSetName !== null && { stackSetName: input.stackSetName }),
483
- ...(input.workspaceDataSources !== undefined &&
484
- input.workspaceDataSources !== null && {
466
+ ...(input.accountAccessType != null && { accountAccessType: input.accountAccessType }),
467
+ ...(input.organizationRoleName != null && { organizationRoleName: input.organizationRoleName }),
468
+ ...(input.permissionType != null && { permissionType: input.permissionType }),
469
+ ...(input.stackSetName != null && { stackSetName: input.stackSetName }),
470
+ ...(input.workspaceDataSources != null && {
485
471
  workspaceDataSources: serializeAws_restJson1DataSourceTypesList(input.workspaceDataSources, context),
486
472
  }),
487
- ...(input.workspaceDescription !== undefined &&
488
- input.workspaceDescription !== null && { workspaceDescription: input.workspaceDescription }),
489
- ...(input.workspaceName !== undefined && input.workspaceName !== null && { workspaceName: input.workspaceName }),
490
- ...(input.workspaceNotificationDestinations !== undefined &&
491
- input.workspaceNotificationDestinations !== null && {
473
+ ...(input.workspaceDescription != null && { workspaceDescription: input.workspaceDescription }),
474
+ ...(input.workspaceName != null && { workspaceName: input.workspaceName }),
475
+ ...(input.workspaceNotificationDestinations != null && {
492
476
  workspaceNotificationDestinations: serializeAws_restJson1NotificationDestinationsList(input.workspaceNotificationDestinations, context),
493
477
  }),
494
- ...(input.workspaceOrganizationalUnits !== undefined &&
495
- input.workspaceOrganizationalUnits !== null && {
478
+ ...(input.workspaceOrganizationalUnits != null && {
496
479
  workspaceOrganizationalUnits: serializeAws_restJson1OrganizationalUnitList(input.workspaceOrganizationalUnits, context),
497
480
  }),
498
- ...(input.workspaceRoleArn !== undefined &&
499
- input.workspaceRoleArn !== null && { workspaceRoleArn: input.workspaceRoleArn }),
481
+ ...(input.workspaceRoleArn != null && { workspaceRoleArn: input.workspaceRoleArn }),
500
482
  });
501
483
  return new protocol_http_1.HttpRequest({
502
484
  protocol,
@@ -527,12 +509,10 @@ const serializeAws_restJson1UpdateWorkspaceAuthenticationCommand = async (input,
527
509
  }
528
510
  let body;
529
511
  body = JSON.stringify({
530
- ...(input.authenticationProviders !== undefined &&
531
- input.authenticationProviders !== null && {
512
+ ...(input.authenticationProviders != null && {
532
513
  authenticationProviders: serializeAws_restJson1AuthenticationProviders(input.authenticationProviders, context),
533
514
  }),
534
- ...(input.samlConfiguration !== undefined &&
535
- input.samlConfiguration !== null && {
515
+ ...(input.samlConfiguration != null && {
536
516
  samlConfiguration: serializeAws_restJson1SamlConfiguration(input.samlConfiguration, context),
537
517
  }),
538
518
  });
@@ -568,8 +548,7 @@ const deserializeAws_restJson1AssociateLicenseCommandError = async (output, cont
568
548
  body: await parseBody(output.body, context),
569
549
  };
570
550
  let response;
571
- let errorCode = "UnknownError";
572
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
551
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
573
552
  switch (errorCode) {
574
553
  case "AccessDeniedException":
575
554
  case "com.amazonaws.grafana#AccessDeniedException":
@@ -588,10 +567,12 @@ const deserializeAws_restJson1AssociateLicenseCommandError = async (output, cont
588
567
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
589
568
  default:
590
569
  const parsedBody = parsedOutput.body;
570
+ const $metadata = deserializeMetadata(output);
571
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
591
572
  response = new GrafanaServiceException_1.GrafanaServiceException({
592
- name: parsedBody.code || parsedBody.Code || errorCode,
573
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
593
574
  $fault: "client",
594
- $metadata: deserializeMetadata(output),
575
+ $metadata,
595
576
  });
596
577
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
597
578
  }
@@ -617,8 +598,7 @@ const deserializeAws_restJson1CreateWorkspaceCommandError = async (output, conte
617
598
  body: await parseBody(output.body, context),
618
599
  };
619
600
  let response;
620
- let errorCode = "UnknownError";
621
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
601
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
622
602
  switch (errorCode) {
623
603
  case "AccessDeniedException":
624
604
  case "com.amazonaws.grafana#AccessDeniedException":
@@ -640,10 +620,12 @@ const deserializeAws_restJson1CreateWorkspaceCommandError = async (output, conte
640
620
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
641
621
  default:
642
622
  const parsedBody = parsedOutput.body;
623
+ const $metadata = deserializeMetadata(output);
624
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
643
625
  response = new GrafanaServiceException_1.GrafanaServiceException({
644
- name: parsedBody.code || parsedBody.Code || errorCode,
626
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
645
627
  $fault: "client",
646
- $metadata: deserializeMetadata(output),
628
+ $metadata,
647
629
  });
648
630
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
649
631
  }
@@ -677,8 +659,7 @@ const deserializeAws_restJson1CreateWorkspaceApiKeyCommandError = async (output,
677
659
  body: await parseBody(output.body, context),
678
660
  };
679
661
  let response;
680
- let errorCode = "UnknownError";
681
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
662
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
682
663
  switch (errorCode) {
683
664
  case "AccessDeniedException":
684
665
  case "com.amazonaws.grafana#AccessDeniedException":
@@ -703,10 +684,12 @@ const deserializeAws_restJson1CreateWorkspaceApiKeyCommandError = async (output,
703
684
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
704
685
  default:
705
686
  const parsedBody = parsedOutput.body;
687
+ const $metadata = deserializeMetadata(output);
688
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
706
689
  response = new GrafanaServiceException_1.GrafanaServiceException({
707
- name: parsedBody.code || parsedBody.Code || errorCode,
690
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
708
691
  $fault: "client",
709
- $metadata: deserializeMetadata(output),
692
+ $metadata,
710
693
  });
711
694
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
712
695
  }
@@ -732,8 +715,7 @@ const deserializeAws_restJson1DeleteWorkspaceCommandError = async (output, conte
732
715
  body: await parseBody(output.body, context),
733
716
  };
734
717
  let response;
735
- let errorCode = "UnknownError";
736
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
718
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
737
719
  switch (errorCode) {
738
720
  case "AccessDeniedException":
739
721
  case "com.amazonaws.grafana#AccessDeniedException":
@@ -755,10 +737,12 @@ const deserializeAws_restJson1DeleteWorkspaceCommandError = async (output, conte
755
737
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
756
738
  default:
757
739
  const parsedBody = parsedOutput.body;
740
+ const $metadata = deserializeMetadata(output);
741
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
758
742
  response = new GrafanaServiceException_1.GrafanaServiceException({
759
- name: parsedBody.code || parsedBody.Code || errorCode,
743
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
760
744
  $fault: "client",
761
- $metadata: deserializeMetadata(output),
745
+ $metadata,
762
746
  });
763
747
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
764
748
  }
@@ -788,8 +772,7 @@ const deserializeAws_restJson1DeleteWorkspaceApiKeyCommandError = async (output,
788
772
  body: await parseBody(output.body, context),
789
773
  };
790
774
  let response;
791
- let errorCode = "UnknownError";
792
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
775
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
793
776
  switch (errorCode) {
794
777
  case "AccessDeniedException":
795
778
  case "com.amazonaws.grafana#AccessDeniedException":
@@ -811,10 +794,12 @@ const deserializeAws_restJson1DeleteWorkspaceApiKeyCommandError = async (output,
811
794
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
812
795
  default:
813
796
  const parsedBody = parsedOutput.body;
797
+ const $metadata = deserializeMetadata(output);
798
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
814
799
  response = new GrafanaServiceException_1.GrafanaServiceException({
815
- name: parsedBody.code || parsedBody.Code || errorCode,
800
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
816
801
  $fault: "client",
817
- $metadata: deserializeMetadata(output),
802
+ $metadata,
818
803
  });
819
804
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
820
805
  }
@@ -840,8 +825,7 @@ const deserializeAws_restJson1DescribeWorkspaceCommandError = async (output, con
840
825
  body: await parseBody(output.body, context),
841
826
  };
842
827
  let response;
843
- let errorCode = "UnknownError";
844
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
828
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
845
829
  switch (errorCode) {
846
830
  case "AccessDeniedException":
847
831
  case "com.amazonaws.grafana#AccessDeniedException":
@@ -860,10 +844,12 @@ const deserializeAws_restJson1DescribeWorkspaceCommandError = async (output, con
860
844
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
861
845
  default:
862
846
  const parsedBody = parsedOutput.body;
847
+ const $metadata = deserializeMetadata(output);
848
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
863
849
  response = new GrafanaServiceException_1.GrafanaServiceException({
864
- name: parsedBody.code || parsedBody.Code || errorCode,
850
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
865
851
  $fault: "client",
866
- $metadata: deserializeMetadata(output),
852
+ $metadata,
867
853
  });
868
854
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
869
855
  }
@@ -889,8 +875,7 @@ const deserializeAws_restJson1DescribeWorkspaceAuthenticationCommandError = asyn
889
875
  body: await parseBody(output.body, context),
890
876
  };
891
877
  let response;
892
- let errorCode = "UnknownError";
893
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
878
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
894
879
  switch (errorCode) {
895
880
  case "AccessDeniedException":
896
881
  case "com.amazonaws.grafana#AccessDeniedException":
@@ -909,10 +894,12 @@ const deserializeAws_restJson1DescribeWorkspaceAuthenticationCommandError = asyn
909
894
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
910
895
  default:
911
896
  const parsedBody = parsedOutput.body;
897
+ const $metadata = deserializeMetadata(output);
898
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
912
899
  response = new GrafanaServiceException_1.GrafanaServiceException({
913
- name: parsedBody.code || parsedBody.Code || errorCode,
900
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
914
901
  $fault: "client",
915
- $metadata: deserializeMetadata(output),
902
+ $metadata,
916
903
  });
917
904
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
918
905
  }
@@ -938,8 +925,7 @@ const deserializeAws_restJson1DisassociateLicenseCommandError = async (output, c
938
925
  body: await parseBody(output.body, context),
939
926
  };
940
927
  let response;
941
- let errorCode = "UnknownError";
942
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
928
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
943
929
  switch (errorCode) {
944
930
  case "AccessDeniedException":
945
931
  case "com.amazonaws.grafana#AccessDeniedException":
@@ -958,10 +944,12 @@ const deserializeAws_restJson1DisassociateLicenseCommandError = async (output, c
958
944
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
959
945
  default:
960
946
  const parsedBody = parsedOutput.body;
947
+ const $metadata = deserializeMetadata(output);
948
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
961
949
  response = new GrafanaServiceException_1.GrafanaServiceException({
962
- name: parsedBody.code || parsedBody.Code || errorCode,
950
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
963
951
  $fault: "client",
964
- $metadata: deserializeMetadata(output),
952
+ $metadata,
965
953
  });
966
954
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
967
955
  }
@@ -991,8 +979,7 @@ const deserializeAws_restJson1ListPermissionsCommandError = async (output, conte
991
979
  body: await parseBody(output.body, context),
992
980
  };
993
981
  let response;
994
- let errorCode = "UnknownError";
995
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
982
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
996
983
  switch (errorCode) {
997
984
  case "AccessDeniedException":
998
985
  case "com.amazonaws.grafana#AccessDeniedException":
@@ -1011,10 +998,12 @@ const deserializeAws_restJson1ListPermissionsCommandError = async (output, conte
1011
998
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1012
999
  default:
1013
1000
  const parsedBody = parsedOutput.body;
1001
+ const $metadata = deserializeMetadata(output);
1002
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1014
1003
  response = new GrafanaServiceException_1.GrafanaServiceException({
1015
- name: parsedBody.code || parsedBody.Code || errorCode,
1004
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1016
1005
  $fault: "client",
1017
- $metadata: deserializeMetadata(output),
1006
+ $metadata,
1018
1007
  });
1019
1008
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1020
1009
  }
@@ -1040,8 +1029,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
1040
1029
  body: await parseBody(output.body, context),
1041
1030
  };
1042
1031
  let response;
1043
- let errorCode = "UnknownError";
1044
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1032
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1045
1033
  switch (errorCode) {
1046
1034
  case "AccessDeniedException":
1047
1035
  case "com.amazonaws.grafana#AccessDeniedException":
@@ -1060,10 +1048,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
1060
1048
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1061
1049
  default:
1062
1050
  const parsedBody = parsedOutput.body;
1051
+ const $metadata = deserializeMetadata(output);
1052
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1063
1053
  response = new GrafanaServiceException_1.GrafanaServiceException({
1064
- name: parsedBody.code || parsedBody.Code || errorCode,
1054
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1065
1055
  $fault: "client",
1066
- $metadata: deserializeMetadata(output),
1056
+ $metadata,
1067
1057
  });
1068
1058
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1069
1059
  }
@@ -1093,8 +1083,7 @@ const deserializeAws_restJson1ListWorkspacesCommandError = async (output, contex
1093
1083
  body: await parseBody(output.body, context),
1094
1084
  };
1095
1085
  let response;
1096
- let errorCode = "UnknownError";
1097
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1086
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1098
1087
  switch (errorCode) {
1099
1088
  case "AccessDeniedException":
1100
1089
  case "com.amazonaws.grafana#AccessDeniedException":
@@ -1107,10 +1096,12 @@ const deserializeAws_restJson1ListWorkspacesCommandError = async (output, contex
1107
1096
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1108
1097
  default:
1109
1098
  const parsedBody = parsedOutput.body;
1099
+ const $metadata = deserializeMetadata(output);
1100
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1110
1101
  response = new GrafanaServiceException_1.GrafanaServiceException({
1111
- name: parsedBody.code || parsedBody.Code || errorCode,
1102
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1112
1103
  $fault: "client",
1113
- $metadata: deserializeMetadata(output),
1104
+ $metadata,
1114
1105
  });
1115
1106
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1116
1107
  }
@@ -1132,8 +1123,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
1132
1123
  body: await parseBody(output.body, context),
1133
1124
  };
1134
1125
  let response;
1135
- let errorCode = "UnknownError";
1136
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1126
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1137
1127
  switch (errorCode) {
1138
1128
  case "AccessDeniedException":
1139
1129
  case "com.amazonaws.grafana#AccessDeniedException":
@@ -1152,10 +1142,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
1152
1142
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1153
1143
  default:
1154
1144
  const parsedBody = parsedOutput.body;
1145
+ const $metadata = deserializeMetadata(output);
1146
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1155
1147
  response = new GrafanaServiceException_1.GrafanaServiceException({
1156
- name: parsedBody.code || parsedBody.Code || errorCode,
1148
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1157
1149
  $fault: "client",
1158
- $metadata: deserializeMetadata(output),
1150
+ $metadata,
1159
1151
  });
1160
1152
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1161
1153
  }
@@ -1177,8 +1169,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
1177
1169
  body: await parseBody(output.body, context),
1178
1170
  };
1179
1171
  let response;
1180
- let errorCode = "UnknownError";
1181
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1172
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1182
1173
  switch (errorCode) {
1183
1174
  case "AccessDeniedException":
1184
1175
  case "com.amazonaws.grafana#AccessDeniedException":
@@ -1197,10 +1188,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
1197
1188
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1198
1189
  default:
1199
1190
  const parsedBody = parsedOutput.body;
1191
+ const $metadata = deserializeMetadata(output);
1192
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1200
1193
  response = new GrafanaServiceException_1.GrafanaServiceException({
1201
- name: parsedBody.code || parsedBody.Code || errorCode,
1194
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1202
1195
  $fault: "client",
1203
- $metadata: deserializeMetadata(output),
1196
+ $metadata,
1204
1197
  });
1205
1198
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1206
1199
  }
@@ -1226,8 +1219,7 @@ const deserializeAws_restJson1UpdatePermissionsCommandError = async (output, con
1226
1219
  body: await parseBody(output.body, context),
1227
1220
  };
1228
1221
  let response;
1229
- let errorCode = "UnknownError";
1230
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1222
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1231
1223
  switch (errorCode) {
1232
1224
  case "AccessDeniedException":
1233
1225
  case "com.amazonaws.grafana#AccessDeniedException":
@@ -1246,10 +1238,12 @@ const deserializeAws_restJson1UpdatePermissionsCommandError = async (output, con
1246
1238
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1247
1239
  default:
1248
1240
  const parsedBody = parsedOutput.body;
1241
+ const $metadata = deserializeMetadata(output);
1242
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1249
1243
  response = new GrafanaServiceException_1.GrafanaServiceException({
1250
- name: parsedBody.code || parsedBody.Code || errorCode,
1244
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1251
1245
  $fault: "client",
1252
- $metadata: deserializeMetadata(output),
1246
+ $metadata,
1253
1247
  });
1254
1248
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1255
1249
  }
@@ -1275,8 +1269,7 @@ const deserializeAws_restJson1UpdateWorkspaceCommandError = async (output, conte
1275
1269
  body: await parseBody(output.body, context),
1276
1270
  };
1277
1271
  let response;
1278
- let errorCode = "UnknownError";
1279
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1272
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1280
1273
  switch (errorCode) {
1281
1274
  case "AccessDeniedException":
1282
1275
  case "com.amazonaws.grafana#AccessDeniedException":
@@ -1298,10 +1291,12 @@ const deserializeAws_restJson1UpdateWorkspaceCommandError = async (output, conte
1298
1291
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1299
1292
  default:
1300
1293
  const parsedBody = parsedOutput.body;
1294
+ const $metadata = deserializeMetadata(output);
1295
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1301
1296
  response = new GrafanaServiceException_1.GrafanaServiceException({
1302
- name: parsedBody.code || parsedBody.Code || errorCode,
1297
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1303
1298
  $fault: "client",
1304
- $metadata: deserializeMetadata(output),
1299
+ $metadata,
1305
1300
  });
1306
1301
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1307
1302
  }
@@ -1327,8 +1322,7 @@ const deserializeAws_restJson1UpdateWorkspaceAuthenticationCommandError = async
1327
1322
  body: await parseBody(output.body, context),
1328
1323
  };
1329
1324
  let response;
1330
- let errorCode = "UnknownError";
1331
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1325
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1332
1326
  switch (errorCode) {
1333
1327
  case "AccessDeniedException":
1334
1328
  case "com.amazonaws.grafana#AccessDeniedException":
@@ -1350,10 +1344,12 @@ const deserializeAws_restJson1UpdateWorkspaceAuthenticationCommandError = async
1350
1344
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1351
1345
  default:
1352
1346
  const parsedBody = parsedOutput.body;
1347
+ const $metadata = deserializeMetadata(output);
1348
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1353
1349
  response = new GrafanaServiceException_1.GrafanaServiceException({
1354
- name: parsedBody.code || parsedBody.Code || errorCode,
1350
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1355
1351
  $fault: "client",
1356
- $metadata: deserializeMetadata(output),
1352
+ $metadata,
1357
1353
  });
1358
1354
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1359
1355
  }
@@ -1496,12 +1492,12 @@ const serializeAws_restJson1AllowedOrganizations = (input, context) => {
1496
1492
  };
1497
1493
  const serializeAws_restJson1AssertionAttributes = (input, context) => {
1498
1494
  return {
1499
- ...(input.email !== undefined && input.email !== null && { email: input.email }),
1500
- ...(input.groups !== undefined && input.groups !== null && { groups: input.groups }),
1501
- ...(input.login !== undefined && input.login !== null && { login: input.login }),
1502
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
1503
- ...(input.org !== undefined && input.org !== null && { org: input.org }),
1504
- ...(input.role !== undefined && input.role !== null && { role: input.role }),
1495
+ ...(input.email != null && { email: input.email }),
1496
+ ...(input.groups != null && { groups: input.groups }),
1497
+ ...(input.login != null && { login: input.login }),
1498
+ ...(input.name != null && { name: input.name }),
1499
+ ...(input.org != null && { org: input.org }),
1500
+ ...(input.role != null && { role: input.role }),
1505
1501
  };
1506
1502
  };
1507
1503
  const serializeAws_restJson1AuthenticationProviders = (input, context) => {
@@ -1563,28 +1559,21 @@ const serializeAws_restJson1RoleValueList = (input, context) => {
1563
1559
  };
1564
1560
  const serializeAws_restJson1RoleValues = (input, context) => {
1565
1561
  return {
1566
- ...(input.admin !== undefined &&
1567
- input.admin !== null && { admin: serializeAws_restJson1RoleValueList(input.admin, context) }),
1568
- ...(input.editor !== undefined &&
1569
- input.editor !== null && { editor: serializeAws_restJson1RoleValueList(input.editor, context) }),
1562
+ ...(input.admin != null && { admin: serializeAws_restJson1RoleValueList(input.admin, context) }),
1563
+ ...(input.editor != null && { editor: serializeAws_restJson1RoleValueList(input.editor, context) }),
1570
1564
  };
1571
1565
  };
1572
1566
  const serializeAws_restJson1SamlConfiguration = (input, context) => {
1573
1567
  return {
1574
- ...(input.allowedOrganizations !== undefined &&
1575
- input.allowedOrganizations !== null && {
1568
+ ...(input.allowedOrganizations != null && {
1576
1569
  allowedOrganizations: serializeAws_restJson1AllowedOrganizations(input.allowedOrganizations, context),
1577
1570
  }),
1578
- ...(input.assertionAttributes !== undefined &&
1579
- input.assertionAttributes !== null && {
1571
+ ...(input.assertionAttributes != null && {
1580
1572
  assertionAttributes: serializeAws_restJson1AssertionAttributes(input.assertionAttributes, context),
1581
1573
  }),
1582
- ...(input.idpMetadata !== undefined &&
1583
- input.idpMetadata !== null && { idpMetadata: serializeAws_restJson1IdpMetadata(input.idpMetadata, context) }),
1584
- ...(input.loginValidityDuration !== undefined &&
1585
- input.loginValidityDuration !== null && { loginValidityDuration: input.loginValidityDuration }),
1586
- ...(input.roleValues !== undefined &&
1587
- input.roleValues !== null && { roleValues: serializeAws_restJson1RoleValues(input.roleValues, context) }),
1574
+ ...(input.idpMetadata != null && { idpMetadata: serializeAws_restJson1IdpMetadata(input.idpMetadata, context) }),
1575
+ ...(input.loginValidityDuration != null && { loginValidityDuration: input.loginValidityDuration }),
1576
+ ...(input.roleValues != null && { roleValues: serializeAws_restJson1RoleValues(input.roleValues, context) }),
1588
1577
  };
1589
1578
  };
1590
1579
  const serializeAws_restJson1TagMap = (input, context) => {
@@ -1600,10 +1589,9 @@ const serializeAws_restJson1TagMap = (input, context) => {
1600
1589
  };
1601
1590
  const serializeAws_restJson1UpdateInstruction = (input, context) => {
1602
1591
  return {
1603
- ...(input.action !== undefined && input.action !== null && { action: input.action }),
1604
- ...(input.role !== undefined && input.role !== null && { role: input.role }),
1605
- ...(input.users !== undefined &&
1606
- input.users !== null && { users: serializeAws_restJson1UserList(input.users, context) }),
1592
+ ...(input.action != null && { action: input.action }),
1593
+ ...(input.role != null && { role: input.role }),
1594
+ ...(input.users != null && { users: serializeAws_restJson1UserList(input.users, context) }),
1607
1595
  };
1608
1596
  };
1609
1597
  const serializeAws_restJson1UpdateInstructionBatch = (input, context) => {
@@ -1618,8 +1606,8 @@ const serializeAws_restJson1UpdateInstructionBatch = (input, context) => {
1618
1606
  };
1619
1607
  const serializeAws_restJson1User = (input, context) => {
1620
1608
  return {
1621
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
1622
- ...(input.type !== undefined && input.type !== null && { type: input.type }),
1609
+ ...(input.id != null && { id: input.id }),
1610
+ ...(input.type != null && { type: input.type }),
1623
1611
  };
1624
1612
  };
1625
1613
  const serializeAws_restJson1UserList = (input, context) => {
@@ -1655,15 +1643,9 @@ const deserializeAws_restJson1AssertionAttributes = (output, context) => {
1655
1643
  };
1656
1644
  const deserializeAws_restJson1AuthenticationDescription = (output, context) => {
1657
1645
  return {
1658
- awsSso: output.awsSso !== undefined && output.awsSso !== null
1659
- ? deserializeAws_restJson1AwsSsoAuthentication(output.awsSso, context)
1660
- : undefined,
1661
- providers: output.providers !== undefined && output.providers !== null
1662
- ? deserializeAws_restJson1AuthenticationProviders(output.providers, context)
1663
- : undefined,
1664
- saml: output.saml !== undefined && output.saml !== null
1665
- ? deserializeAws_restJson1SamlAuthentication(output.saml, context)
1666
- : undefined,
1646
+ awsSso: output.awsSso != null ? deserializeAws_restJson1AwsSsoAuthentication(output.awsSso, context) : undefined,
1647
+ providers: output.providers != null ? deserializeAws_restJson1AuthenticationProviders(output.providers, context) : undefined,
1648
+ saml: output.saml != null ? deserializeAws_restJson1SamlAuthentication(output.saml, context) : undefined,
1667
1649
  };
1668
1650
  };
1669
1651
  const deserializeAws_restJson1AuthenticationProviders = (output, context) => {
@@ -1679,9 +1661,7 @@ const deserializeAws_restJson1AuthenticationProviders = (output, context) => {
1679
1661
  };
1680
1662
  const deserializeAws_restJson1AuthenticationSummary = (output, context) => {
1681
1663
  return {
1682
- providers: output.providers !== undefined && output.providers !== null
1683
- ? deserializeAws_restJson1AuthenticationProviders(output.providers, context)
1684
- : undefined,
1664
+ providers: output.providers != null ? deserializeAws_restJson1AuthenticationProviders(output.providers, context) : undefined,
1685
1665
  samlConfigurationStatus: (0, smithy_client_1.expectString)(output.samlConfigurationStatus),
1686
1666
  };
1687
1667
  };
@@ -1735,9 +1715,7 @@ const deserializeAws_restJson1OrganizationalUnitList = (output, context) => {
1735
1715
  const deserializeAws_restJson1PermissionEntry = (output, context) => {
1736
1716
  return {
1737
1717
  role: (0, smithy_client_1.expectString)(output.role),
1738
- user: output.user !== undefined && output.user !== null
1739
- ? deserializeAws_restJson1User(output.user, context)
1740
- : undefined,
1718
+ user: output.user != null ? deserializeAws_restJson1User(output.user, context) : undefined,
1741
1719
  };
1742
1720
  };
1743
1721
  const deserializeAws_restJson1PermissionEntryList = (output, context) => {
@@ -1764,17 +1742,13 @@ const deserializeAws_restJson1RoleValueList = (output, context) => {
1764
1742
  };
1765
1743
  const deserializeAws_restJson1RoleValues = (output, context) => {
1766
1744
  return {
1767
- admin: output.admin !== undefined && output.admin !== null
1768
- ? deserializeAws_restJson1RoleValueList(output.admin, context)
1769
- : undefined,
1770
- editor: output.editor !== undefined && output.editor !== null
1771
- ? deserializeAws_restJson1RoleValueList(output.editor, context)
1772
- : undefined,
1745
+ admin: output.admin != null ? deserializeAws_restJson1RoleValueList(output.admin, context) : undefined,
1746
+ editor: output.editor != null ? deserializeAws_restJson1RoleValueList(output.editor, context) : undefined,
1773
1747
  };
1774
1748
  };
1775
1749
  const deserializeAws_restJson1SamlAuthentication = (output, context) => {
1776
1750
  return {
1777
- configuration: output.configuration !== undefined && output.configuration !== null
1751
+ configuration: output.configuration != null
1778
1752
  ? deserializeAws_restJson1SamlConfiguration(output.configuration, context)
1779
1753
  : undefined,
1780
1754
  status: (0, smithy_client_1.expectString)(output.status),
@@ -1782,19 +1756,17 @@ const deserializeAws_restJson1SamlAuthentication = (output, context) => {
1782
1756
  };
1783
1757
  const deserializeAws_restJson1SamlConfiguration = (output, context) => {
1784
1758
  return {
1785
- allowedOrganizations: output.allowedOrganizations !== undefined && output.allowedOrganizations !== null
1759
+ allowedOrganizations: output.allowedOrganizations != null
1786
1760
  ? deserializeAws_restJson1AllowedOrganizations(output.allowedOrganizations, context)
1787
1761
  : undefined,
1788
- assertionAttributes: output.assertionAttributes !== undefined && output.assertionAttributes !== null
1762
+ assertionAttributes: output.assertionAttributes != null
1789
1763
  ? deserializeAws_restJson1AssertionAttributes(output.assertionAttributes, context)
1790
1764
  : undefined,
1791
- idpMetadata: output.idpMetadata !== undefined && output.idpMetadata !== null
1765
+ idpMetadata: output.idpMetadata != null
1792
1766
  ? deserializeAws_restJson1IdpMetadata((0, smithy_client_1.expectUnion)(output.idpMetadata), context)
1793
1767
  : undefined,
1794
1768
  loginValidityDuration: (0, smithy_client_1.expectInt32)(output.loginValidityDuration),
1795
- roleValues: output.roleValues !== undefined && output.roleValues !== null
1796
- ? deserializeAws_restJson1RoleValues(output.roleValues, context)
1797
- : undefined,
1769
+ roleValues: output.roleValues != null ? deserializeAws_restJson1RoleValues(output.roleValues, context) : undefined,
1798
1770
  };
1799
1771
  };
1800
1772
  const deserializeAws_restJson1TagMap = (output, context) => {
@@ -1810,9 +1782,7 @@ const deserializeAws_restJson1TagMap = (output, context) => {
1810
1782
  };
1811
1783
  const deserializeAws_restJson1UpdateError = (output, context) => {
1812
1784
  return {
1813
- causedBy: output.causedBy !== undefined && output.causedBy !== null
1814
- ? deserializeAws_restJson1UpdateInstruction(output.causedBy, context)
1815
- : undefined,
1785
+ causedBy: output.causedBy != null ? deserializeAws_restJson1UpdateInstruction(output.causedBy, context) : undefined,
1816
1786
  code: (0, smithy_client_1.expectInt32)(output.code),
1817
1787
  message: (0, smithy_client_1.expectString)(output.message),
1818
1788
  };
@@ -1832,9 +1802,7 @@ const deserializeAws_restJson1UpdateInstruction = (output, context) => {
1832
1802
  return {
1833
1803
  action: (0, smithy_client_1.expectString)(output.action),
1834
1804
  role: (0, smithy_client_1.expectString)(output.role),
1835
- users: output.users !== undefined && output.users !== null
1836
- ? deserializeAws_restJson1UserList(output.users, context)
1837
- : undefined,
1805
+ users: output.users != null ? deserializeAws_restJson1UserList(output.users, context) : undefined,
1838
1806
  };
1839
1807
  };
1840
1808
  const deserializeAws_restJson1User = (output, context) => {
@@ -1874,44 +1842,36 @@ const deserializeAws_restJson1ValidationExceptionFieldList = (output, context) =
1874
1842
  const deserializeAws_restJson1WorkspaceDescription = (output, context) => {
1875
1843
  return {
1876
1844
  accountAccessType: (0, smithy_client_1.expectString)(output.accountAccessType),
1877
- authentication: output.authentication !== undefined && output.authentication !== null
1845
+ authentication: output.authentication != null
1878
1846
  ? deserializeAws_restJson1AuthenticationSummary(output.authentication, context)
1879
1847
  : undefined,
1880
- created: output.created !== undefined && output.created !== null
1881
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.created)))
1882
- : undefined,
1883
- dataSources: output.dataSources !== undefined && output.dataSources !== null
1884
- ? deserializeAws_restJson1DataSourceTypesList(output.dataSources, context)
1885
- : undefined,
1848
+ created: output.created != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.created))) : undefined,
1849
+ dataSources: output.dataSources != null ? deserializeAws_restJson1DataSourceTypesList(output.dataSources, context) : undefined,
1886
1850
  description: (0, smithy_client_1.expectString)(output.description),
1887
1851
  endpoint: (0, smithy_client_1.expectString)(output.endpoint),
1888
1852
  freeTrialConsumed: (0, smithy_client_1.expectBoolean)(output.freeTrialConsumed),
1889
- freeTrialExpiration: output.freeTrialExpiration !== undefined && output.freeTrialExpiration !== null
1853
+ freeTrialExpiration: output.freeTrialExpiration != null
1890
1854
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.freeTrialExpiration)))
1891
1855
  : undefined,
1892
1856
  grafanaVersion: (0, smithy_client_1.expectString)(output.grafanaVersion),
1893
1857
  id: (0, smithy_client_1.expectString)(output.id),
1894
- licenseExpiration: output.licenseExpiration !== undefined && output.licenseExpiration !== null
1858
+ licenseExpiration: output.licenseExpiration != null
1895
1859
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.licenseExpiration)))
1896
1860
  : undefined,
1897
1861
  licenseType: (0, smithy_client_1.expectString)(output.licenseType),
1898
- modified: output.modified !== undefined && output.modified !== null
1899
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.modified)))
1900
- : undefined,
1862
+ modified: output.modified != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.modified))) : undefined,
1901
1863
  name: (0, smithy_client_1.expectString)(output.name),
1902
- notificationDestinations: output.notificationDestinations !== undefined && output.notificationDestinations !== null
1864
+ notificationDestinations: output.notificationDestinations != null
1903
1865
  ? deserializeAws_restJson1NotificationDestinationsList(output.notificationDestinations, context)
1904
1866
  : undefined,
1905
1867
  organizationRoleName: (0, smithy_client_1.expectString)(output.organizationRoleName),
1906
- organizationalUnits: output.organizationalUnits !== undefined && output.organizationalUnits !== null
1868
+ organizationalUnits: output.organizationalUnits != null
1907
1869
  ? deserializeAws_restJson1OrganizationalUnitList(output.organizationalUnits, context)
1908
1870
  : undefined,
1909
1871
  permissionType: (0, smithy_client_1.expectString)(output.permissionType),
1910
1872
  stackSetName: (0, smithy_client_1.expectString)(output.stackSetName),
1911
1873
  status: (0, smithy_client_1.expectString)(output.status),
1912
- tags: output.tags !== undefined && output.tags !== null
1913
- ? deserializeAws_restJson1TagMap(output.tags, context)
1914
- : undefined,
1874
+ tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
1915
1875
  workspaceRoleArn: (0, smithy_client_1.expectString)(output.workspaceRoleArn),
1916
1876
  };
1917
1877
  };
@@ -1928,27 +1888,21 @@ const deserializeAws_restJson1WorkspaceList = (output, context) => {
1928
1888
  };
1929
1889
  const deserializeAws_restJson1WorkspaceSummary = (output, context) => {
1930
1890
  return {
1931
- authentication: output.authentication !== undefined && output.authentication !== null
1891
+ authentication: output.authentication != null
1932
1892
  ? deserializeAws_restJson1AuthenticationSummary(output.authentication, context)
1933
1893
  : undefined,
1934
- created: output.created !== undefined && output.created !== null
1935
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.created)))
1936
- : undefined,
1894
+ created: output.created != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.created))) : undefined,
1937
1895
  description: (0, smithy_client_1.expectString)(output.description),
1938
1896
  endpoint: (0, smithy_client_1.expectString)(output.endpoint),
1939
1897
  grafanaVersion: (0, smithy_client_1.expectString)(output.grafanaVersion),
1940
1898
  id: (0, smithy_client_1.expectString)(output.id),
1941
- modified: output.modified !== undefined && output.modified !== null
1942
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.modified)))
1943
- : undefined,
1899
+ modified: output.modified != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.modified))) : undefined,
1944
1900
  name: (0, smithy_client_1.expectString)(output.name),
1945
- notificationDestinations: output.notificationDestinations !== undefined && output.notificationDestinations !== null
1901
+ notificationDestinations: output.notificationDestinations != null
1946
1902
  ? deserializeAws_restJson1NotificationDestinationsList(output.notificationDestinations, context)
1947
1903
  : undefined,
1948
1904
  status: (0, smithy_client_1.expectString)(output.status),
1949
- tags: output.tags !== undefined && output.tags !== null
1950
- ? deserializeAws_restJson1TagMap(output.tags, context)
1951
- : undefined,
1905
+ tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
1952
1906
  };
1953
1907
  };
1954
1908
  const deserializeMetadata = (output) => {
@@ -2000,5 +1954,4 @@ const loadRestJsonErrorCode = (output, data) => {
2000
1954
  if (data["__type"] !== undefined) {
2001
1955
  return sanitizeErrorCode(data["__type"]);
2002
1956
  }
2003
- return "";
2004
1957
  };