@aws-sdk/client-mq 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.
@@ -15,48 +15,35 @@ const serializeAws_restJson1CreateBrokerCommand = async (input, context) => {
15
15
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers";
16
16
  let body;
17
17
  body = JSON.stringify({
18
- ...(input.AuthenticationStrategy !== undefined &&
19
- input.AuthenticationStrategy !== null && { authenticationStrategy: input.AuthenticationStrategy }),
20
- ...(input.AutoMinorVersionUpgrade !== undefined &&
21
- input.AutoMinorVersionUpgrade !== null && { autoMinorVersionUpgrade: input.AutoMinorVersionUpgrade }),
22
- ...(input.BrokerName !== undefined && input.BrokerName !== null && { brokerName: input.BrokerName }),
23
- ...(input.Configuration !== undefined &&
24
- input.Configuration !== null && {
18
+ ...(input.AuthenticationStrategy != null && { authenticationStrategy: input.AuthenticationStrategy }),
19
+ ...(input.AutoMinorVersionUpgrade != null && { autoMinorVersionUpgrade: input.AutoMinorVersionUpgrade }),
20
+ ...(input.BrokerName != null && { brokerName: input.BrokerName }),
21
+ ...(input.Configuration != null && {
25
22
  configuration: serializeAws_restJson1ConfigurationId(input.Configuration, context),
26
23
  }),
27
24
  creatorRequestId: (_a = input.CreatorRequestId) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
28
- ...(input.DeploymentMode !== undefined &&
29
- input.DeploymentMode !== null && { deploymentMode: input.DeploymentMode }),
30
- ...(input.EncryptionOptions !== undefined &&
31
- input.EncryptionOptions !== null && {
25
+ ...(input.DeploymentMode != null && { deploymentMode: input.DeploymentMode }),
26
+ ...(input.EncryptionOptions != null && {
32
27
  encryptionOptions: serializeAws_restJson1EncryptionOptions(input.EncryptionOptions, context),
33
28
  }),
34
- ...(input.EngineType !== undefined && input.EngineType !== null && { engineType: input.EngineType }),
35
- ...(input.EngineVersion !== undefined && input.EngineVersion !== null && { engineVersion: input.EngineVersion }),
36
- ...(input.HostInstanceType !== undefined &&
37
- input.HostInstanceType !== null && { hostInstanceType: input.HostInstanceType }),
38
- ...(input.LdapServerMetadata !== undefined &&
39
- input.LdapServerMetadata !== null && {
29
+ ...(input.EngineType != null && { engineType: input.EngineType }),
30
+ ...(input.EngineVersion != null && { engineVersion: input.EngineVersion }),
31
+ ...(input.HostInstanceType != null && { hostInstanceType: input.HostInstanceType }),
32
+ ...(input.LdapServerMetadata != null && {
40
33
  ldapServerMetadata: serializeAws_restJson1LdapServerMetadataInput(input.LdapServerMetadata, context),
41
34
  }),
42
- ...(input.Logs !== undefined && input.Logs !== null && { logs: serializeAws_restJson1Logs(input.Logs, context) }),
43
- ...(input.MaintenanceWindowStartTime !== undefined &&
44
- input.MaintenanceWindowStartTime !== null && {
35
+ ...(input.Logs != null && { logs: serializeAws_restJson1Logs(input.Logs, context) }),
36
+ ...(input.MaintenanceWindowStartTime != null && {
45
37
  maintenanceWindowStartTime: serializeAws_restJson1WeeklyStartTime(input.MaintenanceWindowStartTime, context),
46
38
  }),
47
- ...(input.PubliclyAccessible !== undefined &&
48
- input.PubliclyAccessible !== null && { publiclyAccessible: input.PubliclyAccessible }),
49
- ...(input.SecurityGroups !== undefined &&
50
- input.SecurityGroups !== null && {
39
+ ...(input.PubliclyAccessible != null && { publiclyAccessible: input.PubliclyAccessible }),
40
+ ...(input.SecurityGroups != null && {
51
41
  securityGroups: serializeAws_restJson1__listOf__string(input.SecurityGroups, context),
52
42
  }),
53
- ...(input.StorageType !== undefined && input.StorageType !== null && { storageType: input.StorageType }),
54
- ...(input.SubnetIds !== undefined &&
55
- input.SubnetIds !== null && { subnetIds: serializeAws_restJson1__listOf__string(input.SubnetIds, context) }),
56
- ...(input.Tags !== undefined &&
57
- input.Tags !== null && { tags: serializeAws_restJson1__mapOf__string(input.Tags, context) }),
58
- ...(input.Users !== undefined &&
59
- input.Users !== null && { users: serializeAws_restJson1__listOfUser(input.Users, context) }),
43
+ ...(input.StorageType != null && { storageType: input.StorageType }),
44
+ ...(input.SubnetIds != null && { subnetIds: serializeAws_restJson1__listOf__string(input.SubnetIds, context) }),
45
+ ...(input.Tags != null && { tags: serializeAws_restJson1__mapOf__string(input.Tags, context) }),
46
+ ...(input.Users != null && { users: serializeAws_restJson1__listOfUser(input.Users, context) }),
60
47
  });
61
48
  return new protocol_http_1.HttpRequest({
62
49
  protocol,
@@ -77,13 +64,11 @@ const serializeAws_restJson1CreateConfigurationCommand = async (input, context)
77
64
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/configurations";
78
65
  let body;
79
66
  body = JSON.stringify({
80
- ...(input.AuthenticationStrategy !== undefined &&
81
- input.AuthenticationStrategy !== null && { authenticationStrategy: input.AuthenticationStrategy }),
82
- ...(input.EngineType !== undefined && input.EngineType !== null && { engineType: input.EngineType }),
83
- ...(input.EngineVersion !== undefined && input.EngineVersion !== null && { engineVersion: input.EngineVersion }),
84
- ...(input.Name !== undefined && input.Name !== null && { name: input.Name }),
85
- ...(input.Tags !== undefined &&
86
- input.Tags !== null && { tags: serializeAws_restJson1__mapOf__string(input.Tags, context) }),
67
+ ...(input.AuthenticationStrategy != null && { authenticationStrategy: input.AuthenticationStrategy }),
68
+ ...(input.EngineType != null && { engineType: input.EngineType }),
69
+ ...(input.EngineVersion != null && { engineVersion: input.EngineVersion }),
70
+ ...(input.Name != null && { name: input.Name }),
71
+ ...(input.Tags != null && { tags: serializeAws_restJson1__mapOf__string(input.Tags, context) }),
87
72
  });
88
73
  return new protocol_http_1.HttpRequest({
89
74
  protocol,
@@ -114,8 +99,7 @@ const serializeAws_restJson1CreateTagsCommand = async (input, context) => {
114
99
  }
115
100
  let body;
116
101
  body = JSON.stringify({
117
- ...(input.Tags !== undefined &&
118
- input.Tags !== null && { tags: serializeAws_restJson1__mapOf__string(input.Tags, context) }),
102
+ ...(input.Tags != null && { tags: serializeAws_restJson1__mapOf__string(input.Tags, context) }),
119
103
  });
120
104
  return new protocol_http_1.HttpRequest({
121
105
  protocol,
@@ -156,10 +140,9 @@ const serializeAws_restJson1CreateUserCommand = async (input, context) => {
156
140
  }
157
141
  let body;
158
142
  body = JSON.stringify({
159
- ...(input.ConsoleAccess !== undefined && input.ConsoleAccess !== null && { consoleAccess: input.ConsoleAccess }),
160
- ...(input.Groups !== undefined &&
161
- input.Groups !== null && { groups: serializeAws_restJson1__listOf__string(input.Groups, context) }),
162
- ...(input.Password !== undefined && input.Password !== null && { password: input.Password }),
143
+ ...(input.ConsoleAccess != null && { consoleAccess: input.ConsoleAccess }),
144
+ ...(input.Groups != null && { groups: serializeAws_restJson1__listOf__string(input.Groups, context) }),
145
+ ...(input.Password != null && { password: input.Password }),
163
146
  });
164
147
  return new protocol_http_1.HttpRequest({
165
148
  protocol,
@@ -610,28 +593,21 @@ const serializeAws_restJson1UpdateBrokerCommand = async (input, context) => {
610
593
  }
611
594
  let body;
612
595
  body = JSON.stringify({
613
- ...(input.AuthenticationStrategy !== undefined &&
614
- input.AuthenticationStrategy !== null && { authenticationStrategy: input.AuthenticationStrategy }),
615
- ...(input.AutoMinorVersionUpgrade !== undefined &&
616
- input.AutoMinorVersionUpgrade !== null && { autoMinorVersionUpgrade: input.AutoMinorVersionUpgrade }),
617
- ...(input.Configuration !== undefined &&
618
- input.Configuration !== null && {
596
+ ...(input.AuthenticationStrategy != null && { authenticationStrategy: input.AuthenticationStrategy }),
597
+ ...(input.AutoMinorVersionUpgrade != null && { autoMinorVersionUpgrade: input.AutoMinorVersionUpgrade }),
598
+ ...(input.Configuration != null && {
619
599
  configuration: serializeAws_restJson1ConfigurationId(input.Configuration, context),
620
600
  }),
621
- ...(input.EngineVersion !== undefined && input.EngineVersion !== null && { engineVersion: input.EngineVersion }),
622
- ...(input.HostInstanceType !== undefined &&
623
- input.HostInstanceType !== null && { hostInstanceType: input.HostInstanceType }),
624
- ...(input.LdapServerMetadata !== undefined &&
625
- input.LdapServerMetadata !== null && {
601
+ ...(input.EngineVersion != null && { engineVersion: input.EngineVersion }),
602
+ ...(input.HostInstanceType != null && { hostInstanceType: input.HostInstanceType }),
603
+ ...(input.LdapServerMetadata != null && {
626
604
  ldapServerMetadata: serializeAws_restJson1LdapServerMetadataInput(input.LdapServerMetadata, context),
627
605
  }),
628
- ...(input.Logs !== undefined && input.Logs !== null && { logs: serializeAws_restJson1Logs(input.Logs, context) }),
629
- ...(input.MaintenanceWindowStartTime !== undefined &&
630
- input.MaintenanceWindowStartTime !== null && {
606
+ ...(input.Logs != null && { logs: serializeAws_restJson1Logs(input.Logs, context) }),
607
+ ...(input.MaintenanceWindowStartTime != null && {
631
608
  maintenanceWindowStartTime: serializeAws_restJson1WeeklyStartTime(input.MaintenanceWindowStartTime, context),
632
609
  }),
633
- ...(input.SecurityGroups !== undefined &&
634
- input.SecurityGroups !== null && {
610
+ ...(input.SecurityGroups != null && {
635
611
  securityGroups: serializeAws_restJson1__listOf__string(input.SecurityGroups, context),
636
612
  }),
637
613
  });
@@ -664,8 +640,8 @@ const serializeAws_restJson1UpdateConfigurationCommand = async (input, context)
664
640
  }
665
641
  let body;
666
642
  body = JSON.stringify({
667
- ...(input.Data !== undefined && input.Data !== null && { data: input.Data }),
668
- ...(input.Description !== undefined && input.Description !== null && { description: input.Description }),
643
+ ...(input.Data != null && { data: input.Data }),
644
+ ...(input.Description != null && { description: input.Description }),
669
645
  });
670
646
  return new protocol_http_1.HttpRequest({
671
647
  protocol,
@@ -706,10 +682,9 @@ const serializeAws_restJson1UpdateUserCommand = async (input, context) => {
706
682
  }
707
683
  let body;
708
684
  body = JSON.stringify({
709
- ...(input.ConsoleAccess !== undefined && input.ConsoleAccess !== null && { consoleAccess: input.ConsoleAccess }),
710
- ...(input.Groups !== undefined &&
711
- input.Groups !== null && { groups: serializeAws_restJson1__listOf__string(input.Groups, context) }),
712
- ...(input.Password !== undefined && input.Password !== null && { password: input.Password }),
685
+ ...(input.ConsoleAccess != null && { consoleAccess: input.ConsoleAccess }),
686
+ ...(input.Groups != null && { groups: serializeAws_restJson1__listOf__string(input.Groups, context) }),
687
+ ...(input.Password != null && { password: input.Password }),
713
688
  });
714
689
  return new protocol_http_1.HttpRequest({
715
690
  protocol,
@@ -747,8 +722,7 @@ const deserializeAws_restJson1CreateBrokerCommandError = async (output, context)
747
722
  body: await parseBody(output.body, context),
748
723
  };
749
724
  let response;
750
- let errorCode = "UnknownError";
751
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
725
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
752
726
  switch (errorCode) {
753
727
  case "BadRequestException":
754
728
  case "com.amazonaws.mq#BadRequestException":
@@ -767,10 +741,12 @@ const deserializeAws_restJson1CreateBrokerCommandError = async (output, context)
767
741
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
768
742
  default:
769
743
  const parsedBody = parsedOutput.body;
744
+ const $metadata = deserializeMetadata(output);
745
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
770
746
  response = new MqServiceException_1.MqServiceException({
771
- name: parsedBody.code || parsedBody.Code || errorCode,
747
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
772
748
  $fault: "client",
773
- $metadata: deserializeMetadata(output),
749
+ $metadata,
774
750
  });
775
751
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
776
752
  }
@@ -816,8 +792,7 @@ const deserializeAws_restJson1CreateConfigurationCommandError = async (output, c
816
792
  body: await parseBody(output.body, context),
817
793
  };
818
794
  let response;
819
- let errorCode = "UnknownError";
820
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
795
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
821
796
  switch (errorCode) {
822
797
  case "BadRequestException":
823
798
  case "com.amazonaws.mq#BadRequestException":
@@ -833,10 +808,12 @@ const deserializeAws_restJson1CreateConfigurationCommandError = async (output, c
833
808
  throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
834
809
  default:
835
810
  const parsedBody = parsedOutput.body;
811
+ const $metadata = deserializeMetadata(output);
812
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
836
813
  response = new MqServiceException_1.MqServiceException({
837
- name: parsedBody.code || parsedBody.Code || errorCode,
814
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
838
815
  $fault: "client",
839
- $metadata: deserializeMetadata(output),
816
+ $metadata,
840
817
  });
841
818
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
842
819
  }
@@ -858,8 +835,7 @@ const deserializeAws_restJson1CreateTagsCommandError = async (output, context) =
858
835
  body: await parseBody(output.body, context),
859
836
  };
860
837
  let response;
861
- let errorCode = "UnknownError";
862
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
838
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
863
839
  switch (errorCode) {
864
840
  case "BadRequestException":
865
841
  case "com.amazonaws.mq#BadRequestException":
@@ -875,10 +851,12 @@ const deserializeAws_restJson1CreateTagsCommandError = async (output, context) =
875
851
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
876
852
  default:
877
853
  const parsedBody = parsedOutput.body;
854
+ const $metadata = deserializeMetadata(output);
855
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
878
856
  response = new MqServiceException_1.MqServiceException({
879
- name: parsedBody.code || parsedBody.Code || errorCode,
857
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
880
858
  $fault: "client",
881
- $metadata: deserializeMetadata(output),
859
+ $metadata,
882
860
  });
883
861
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
884
862
  }
@@ -900,8 +878,7 @@ const deserializeAws_restJson1CreateUserCommandError = async (output, context) =
900
878
  body: await parseBody(output.body, context),
901
879
  };
902
880
  let response;
903
- let errorCode = "UnknownError";
904
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
881
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
905
882
  switch (errorCode) {
906
883
  case "BadRequestException":
907
884
  case "com.amazonaws.mq#BadRequestException":
@@ -920,10 +897,12 @@ const deserializeAws_restJson1CreateUserCommandError = async (output, context) =
920
897
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
921
898
  default:
922
899
  const parsedBody = parsedOutput.body;
900
+ const $metadata = deserializeMetadata(output);
901
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
923
902
  response = new MqServiceException_1.MqServiceException({
924
- name: parsedBody.code || parsedBody.Code || errorCode,
903
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
925
904
  $fault: "client",
926
- $metadata: deserializeMetadata(output),
905
+ $metadata,
927
906
  });
928
907
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
929
908
  }
@@ -949,8 +928,7 @@ const deserializeAws_restJson1DeleteBrokerCommandError = async (output, context)
949
928
  body: await parseBody(output.body, context),
950
929
  };
951
930
  let response;
952
- let errorCode = "UnknownError";
953
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
931
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
954
932
  switch (errorCode) {
955
933
  case "BadRequestException":
956
934
  case "com.amazonaws.mq#BadRequestException":
@@ -966,10 +944,12 @@ const deserializeAws_restJson1DeleteBrokerCommandError = async (output, context)
966
944
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
967
945
  default:
968
946
  const parsedBody = parsedOutput.body;
947
+ const $metadata = deserializeMetadata(output);
948
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
969
949
  response = new MqServiceException_1.MqServiceException({
970
- name: parsedBody.code || parsedBody.Code || errorCode,
950
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
971
951
  $fault: "client",
972
- $metadata: deserializeMetadata(output),
952
+ $metadata,
973
953
  });
974
954
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
975
955
  }
@@ -991,8 +971,7 @@ const deserializeAws_restJson1DeleteTagsCommandError = async (output, context) =
991
971
  body: await parseBody(output.body, context),
992
972
  };
993
973
  let response;
994
- let errorCode = "UnknownError";
995
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
974
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
996
975
  switch (errorCode) {
997
976
  case "BadRequestException":
998
977
  case "com.amazonaws.mq#BadRequestException":
@@ -1008,10 +987,12 @@ const deserializeAws_restJson1DeleteTagsCommandError = async (output, context) =
1008
987
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1009
988
  default:
1010
989
  const parsedBody = parsedOutput.body;
990
+ const $metadata = deserializeMetadata(output);
991
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1011
992
  response = new MqServiceException_1.MqServiceException({
1012
- name: parsedBody.code || parsedBody.Code || errorCode,
993
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1013
994
  $fault: "client",
1014
- $metadata: deserializeMetadata(output),
995
+ $metadata,
1015
996
  });
1016
997
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1017
998
  }
@@ -1033,8 +1014,7 @@ const deserializeAws_restJson1DeleteUserCommandError = async (output, context) =
1033
1014
  body: await parseBody(output.body, context),
1034
1015
  };
1035
1016
  let response;
1036
- let errorCode = "UnknownError";
1037
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1017
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1038
1018
  switch (errorCode) {
1039
1019
  case "BadRequestException":
1040
1020
  case "com.amazonaws.mq#BadRequestException":
@@ -1050,10 +1030,12 @@ const deserializeAws_restJson1DeleteUserCommandError = async (output, context) =
1050
1030
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1051
1031
  default:
1052
1032
  const parsedBody = parsedOutput.body;
1033
+ const $metadata = deserializeMetadata(output);
1034
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1053
1035
  response = new MqServiceException_1.MqServiceException({
1054
- name: parsedBody.code || parsedBody.Code || errorCode,
1036
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1055
1037
  $fault: "client",
1056
- $metadata: deserializeMetadata(output),
1038
+ $metadata,
1057
1039
  });
1058
1040
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1059
1041
  }
@@ -1191,8 +1173,7 @@ const deserializeAws_restJson1DescribeBrokerCommandError = async (output, contex
1191
1173
  body: await parseBody(output.body, context),
1192
1174
  };
1193
1175
  let response;
1194
- let errorCode = "UnknownError";
1195
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1176
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1196
1177
  switch (errorCode) {
1197
1178
  case "BadRequestException":
1198
1179
  case "com.amazonaws.mq#BadRequestException":
@@ -1208,10 +1189,12 @@ const deserializeAws_restJson1DescribeBrokerCommandError = async (output, contex
1208
1189
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1209
1190
  default:
1210
1191
  const parsedBody = parsedOutput.body;
1192
+ const $metadata = deserializeMetadata(output);
1193
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1211
1194
  response = new MqServiceException_1.MqServiceException({
1212
- name: parsedBody.code || parsedBody.Code || errorCode,
1195
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1213
1196
  $fault: "client",
1214
- $metadata: deserializeMetadata(output),
1197
+ $metadata,
1215
1198
  });
1216
1199
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1217
1200
  }
@@ -1245,8 +1228,7 @@ const deserializeAws_restJson1DescribeBrokerEngineTypesCommandError = async (out
1245
1228
  body: await parseBody(output.body, context),
1246
1229
  };
1247
1230
  let response;
1248
- let errorCode = "UnknownError";
1249
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1231
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1250
1232
  switch (errorCode) {
1251
1233
  case "BadRequestException":
1252
1234
  case "com.amazonaws.mq#BadRequestException":
@@ -1259,10 +1241,12 @@ const deserializeAws_restJson1DescribeBrokerEngineTypesCommandError = async (out
1259
1241
  throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1260
1242
  default:
1261
1243
  const parsedBody = parsedOutput.body;
1244
+ const $metadata = deserializeMetadata(output);
1245
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1262
1246
  response = new MqServiceException_1.MqServiceException({
1263
- name: parsedBody.code || parsedBody.Code || errorCode,
1247
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1264
1248
  $fault: "client",
1265
- $metadata: deserializeMetadata(output),
1249
+ $metadata,
1266
1250
  });
1267
1251
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1268
1252
  }
@@ -1296,8 +1280,7 @@ const deserializeAws_restJson1DescribeBrokerInstanceOptionsCommandError = async
1296
1280
  body: await parseBody(output.body, context),
1297
1281
  };
1298
1282
  let response;
1299
- let errorCode = "UnknownError";
1300
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1283
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1301
1284
  switch (errorCode) {
1302
1285
  case "BadRequestException":
1303
1286
  case "com.amazonaws.mq#BadRequestException":
@@ -1310,10 +1293,12 @@ const deserializeAws_restJson1DescribeBrokerInstanceOptionsCommandError = async
1310
1293
  throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1311
1294
  default:
1312
1295
  const parsedBody = parsedOutput.body;
1296
+ const $metadata = deserializeMetadata(output);
1297
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1313
1298
  response = new MqServiceException_1.MqServiceException({
1314
- name: parsedBody.code || parsedBody.Code || errorCode,
1299
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1315
1300
  $fault: "client",
1316
- $metadata: deserializeMetadata(output),
1301
+ $metadata,
1317
1302
  });
1318
1303
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1319
1304
  }
@@ -1375,8 +1360,7 @@ const deserializeAws_restJson1DescribeConfigurationCommandError = async (output,
1375
1360
  body: await parseBody(output.body, context),
1376
1361
  };
1377
1362
  let response;
1378
- let errorCode = "UnknownError";
1379
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1363
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1380
1364
  switch (errorCode) {
1381
1365
  case "BadRequestException":
1382
1366
  case "com.amazonaws.mq#BadRequestException":
@@ -1392,10 +1376,12 @@ const deserializeAws_restJson1DescribeConfigurationCommandError = async (output,
1392
1376
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1393
1377
  default:
1394
1378
  const parsedBody = parsedOutput.body;
1379
+ const $metadata = deserializeMetadata(output);
1380
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1395
1381
  response = new MqServiceException_1.MqServiceException({
1396
- name: parsedBody.code || parsedBody.Code || errorCode,
1382
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1397
1383
  $fault: "client",
1398
- $metadata: deserializeMetadata(output),
1384
+ $metadata,
1399
1385
  });
1400
1386
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1401
1387
  }
@@ -1433,8 +1419,7 @@ const deserializeAws_restJson1DescribeConfigurationRevisionCommandError = async
1433
1419
  body: await parseBody(output.body, context),
1434
1420
  };
1435
1421
  let response;
1436
- let errorCode = "UnknownError";
1437
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1422
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1438
1423
  switch (errorCode) {
1439
1424
  case "BadRequestException":
1440
1425
  case "com.amazonaws.mq#BadRequestException":
@@ -1450,10 +1435,12 @@ const deserializeAws_restJson1DescribeConfigurationRevisionCommandError = async
1450
1435
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1451
1436
  default:
1452
1437
  const parsedBody = parsedOutput.body;
1438
+ const $metadata = deserializeMetadata(output);
1439
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1453
1440
  response = new MqServiceException_1.MqServiceException({
1454
- name: parsedBody.code || parsedBody.Code || errorCode,
1441
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1455
1442
  $fault: "client",
1456
- $metadata: deserializeMetadata(output),
1443
+ $metadata,
1457
1444
  });
1458
1445
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1459
1446
  }
@@ -1495,8 +1482,7 @@ const deserializeAws_restJson1DescribeUserCommandError = async (output, context)
1495
1482
  body: await parseBody(output.body, context),
1496
1483
  };
1497
1484
  let response;
1498
- let errorCode = "UnknownError";
1499
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1485
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1500
1486
  switch (errorCode) {
1501
1487
  case "BadRequestException":
1502
1488
  case "com.amazonaws.mq#BadRequestException":
@@ -1512,10 +1498,12 @@ const deserializeAws_restJson1DescribeUserCommandError = async (output, context)
1512
1498
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1513
1499
  default:
1514
1500
  const parsedBody = parsedOutput.body;
1501
+ const $metadata = deserializeMetadata(output);
1502
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1515
1503
  response = new MqServiceException_1.MqServiceException({
1516
- name: parsedBody.code || parsedBody.Code || errorCode,
1504
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1517
1505
  $fault: "client",
1518
- $metadata: deserializeMetadata(output),
1506
+ $metadata,
1519
1507
  });
1520
1508
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1521
1509
  }
@@ -1545,8 +1533,7 @@ const deserializeAws_restJson1ListBrokersCommandError = async (output, context)
1545
1533
  body: await parseBody(output.body, context),
1546
1534
  };
1547
1535
  let response;
1548
- let errorCode = "UnknownError";
1549
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1536
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1550
1537
  switch (errorCode) {
1551
1538
  case "BadRequestException":
1552
1539
  case "com.amazonaws.mq#BadRequestException":
@@ -1559,10 +1546,12 @@ const deserializeAws_restJson1ListBrokersCommandError = async (output, context)
1559
1546
  throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1560
1547
  default:
1561
1548
  const parsedBody = parsedOutput.body;
1549
+ const $metadata = deserializeMetadata(output);
1550
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1562
1551
  response = new MqServiceException_1.MqServiceException({
1563
- name: parsedBody.code || parsedBody.Code || errorCode,
1552
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1564
1553
  $fault: "client",
1565
- $metadata: deserializeMetadata(output),
1554
+ $metadata,
1566
1555
  });
1567
1556
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1568
1557
  }
@@ -1600,8 +1589,7 @@ const deserializeAws_restJson1ListConfigurationRevisionsCommandError = async (ou
1600
1589
  body: await parseBody(output.body, context),
1601
1590
  };
1602
1591
  let response;
1603
- let errorCode = "UnknownError";
1604
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1592
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1605
1593
  switch (errorCode) {
1606
1594
  case "BadRequestException":
1607
1595
  case "com.amazonaws.mq#BadRequestException":
@@ -1617,10 +1605,12 @@ const deserializeAws_restJson1ListConfigurationRevisionsCommandError = async (ou
1617
1605
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1618
1606
  default:
1619
1607
  const parsedBody = parsedOutput.body;
1608
+ const $metadata = deserializeMetadata(output);
1609
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1620
1610
  response = new MqServiceException_1.MqServiceException({
1621
- name: parsedBody.code || parsedBody.Code || errorCode,
1611
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1622
1612
  $fault: "client",
1623
- $metadata: deserializeMetadata(output),
1613
+ $metadata,
1624
1614
  });
1625
1615
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1626
1616
  }
@@ -1654,8 +1644,7 @@ const deserializeAws_restJson1ListConfigurationsCommandError = async (output, co
1654
1644
  body: await parseBody(output.body, context),
1655
1645
  };
1656
1646
  let response;
1657
- let errorCode = "UnknownError";
1658
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1647
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1659
1648
  switch (errorCode) {
1660
1649
  case "BadRequestException":
1661
1650
  case "com.amazonaws.mq#BadRequestException":
@@ -1668,10 +1657,12 @@ const deserializeAws_restJson1ListConfigurationsCommandError = async (output, co
1668
1657
  throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1669
1658
  default:
1670
1659
  const parsedBody = parsedOutput.body;
1660
+ const $metadata = deserializeMetadata(output);
1661
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1671
1662
  response = new MqServiceException_1.MqServiceException({
1672
- name: parsedBody.code || parsedBody.Code || errorCode,
1663
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1673
1664
  $fault: "client",
1674
- $metadata: deserializeMetadata(output),
1665
+ $metadata,
1675
1666
  });
1676
1667
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1677
1668
  }
@@ -1697,8 +1688,7 @@ const deserializeAws_restJson1ListTagsCommandError = async (output, context) =>
1697
1688
  body: await parseBody(output.body, context),
1698
1689
  };
1699
1690
  let response;
1700
- let errorCode = "UnknownError";
1701
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1691
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1702
1692
  switch (errorCode) {
1703
1693
  case "BadRequestException":
1704
1694
  case "com.amazonaws.mq#BadRequestException":
@@ -1714,10 +1704,12 @@ const deserializeAws_restJson1ListTagsCommandError = async (output, context) =>
1714
1704
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1715
1705
  default:
1716
1706
  const parsedBody = parsedOutput.body;
1707
+ const $metadata = deserializeMetadata(output);
1708
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1717
1709
  response = new MqServiceException_1.MqServiceException({
1718
- name: parsedBody.code || parsedBody.Code || errorCode,
1710
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1719
1711
  $fault: "client",
1720
- $metadata: deserializeMetadata(output),
1712
+ $metadata,
1721
1713
  });
1722
1714
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1723
1715
  }
@@ -1755,8 +1747,7 @@ const deserializeAws_restJson1ListUsersCommandError = async (output, context) =>
1755
1747
  body: await parseBody(output.body, context),
1756
1748
  };
1757
1749
  let response;
1758
- let errorCode = "UnknownError";
1759
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1750
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1760
1751
  switch (errorCode) {
1761
1752
  case "BadRequestException":
1762
1753
  case "com.amazonaws.mq#BadRequestException":
@@ -1772,10 +1763,12 @@ const deserializeAws_restJson1ListUsersCommandError = async (output, context) =>
1772
1763
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1773
1764
  default:
1774
1765
  const parsedBody = parsedOutput.body;
1766
+ const $metadata = deserializeMetadata(output);
1767
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1775
1768
  response = new MqServiceException_1.MqServiceException({
1776
- name: parsedBody.code || parsedBody.Code || errorCode,
1769
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1777
1770
  $fault: "client",
1778
- $metadata: deserializeMetadata(output),
1771
+ $metadata,
1779
1772
  });
1780
1773
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1781
1774
  }
@@ -1797,8 +1790,7 @@ const deserializeAws_restJson1RebootBrokerCommandError = async (output, context)
1797
1790
  body: await parseBody(output.body, context),
1798
1791
  };
1799
1792
  let response;
1800
- let errorCode = "UnknownError";
1801
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1793
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1802
1794
  switch (errorCode) {
1803
1795
  case "BadRequestException":
1804
1796
  case "com.amazonaws.mq#BadRequestException":
@@ -1814,10 +1806,12 @@ const deserializeAws_restJson1RebootBrokerCommandError = async (output, context)
1814
1806
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1815
1807
  default:
1816
1808
  const parsedBody = parsedOutput.body;
1809
+ const $metadata = deserializeMetadata(output);
1810
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1817
1811
  response = new MqServiceException_1.MqServiceException({
1818
- name: parsedBody.code || parsedBody.Code || errorCode,
1812
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1819
1813
  $fault: "client",
1820
- $metadata: deserializeMetadata(output),
1814
+ $metadata,
1821
1815
  });
1822
1816
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1823
1817
  }
@@ -1879,8 +1873,7 @@ const deserializeAws_restJson1UpdateBrokerCommandError = async (output, context)
1879
1873
  body: await parseBody(output.body, context),
1880
1874
  };
1881
1875
  let response;
1882
- let errorCode = "UnknownError";
1883
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1876
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1884
1877
  switch (errorCode) {
1885
1878
  case "BadRequestException":
1886
1879
  case "com.amazonaws.mq#BadRequestException":
@@ -1899,10 +1892,12 @@ const deserializeAws_restJson1UpdateBrokerCommandError = async (output, context)
1899
1892
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1900
1893
  default:
1901
1894
  const parsedBody = parsedOutput.body;
1895
+ const $metadata = deserializeMetadata(output);
1896
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1902
1897
  response = new MqServiceException_1.MqServiceException({
1903
- name: parsedBody.code || parsedBody.Code || errorCode,
1898
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1904
1899
  $fault: "client",
1905
- $metadata: deserializeMetadata(output),
1900
+ $metadata,
1906
1901
  });
1907
1902
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1908
1903
  }
@@ -1948,8 +1943,7 @@ const deserializeAws_restJson1UpdateConfigurationCommandError = async (output, c
1948
1943
  body: await parseBody(output.body, context),
1949
1944
  };
1950
1945
  let response;
1951
- let errorCode = "UnknownError";
1952
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1946
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1953
1947
  switch (errorCode) {
1954
1948
  case "BadRequestException":
1955
1949
  case "com.amazonaws.mq#BadRequestException":
@@ -1968,10 +1962,12 @@ const deserializeAws_restJson1UpdateConfigurationCommandError = async (output, c
1968
1962
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1969
1963
  default:
1970
1964
  const parsedBody = parsedOutput.body;
1965
+ const $metadata = deserializeMetadata(output);
1966
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1971
1967
  response = new MqServiceException_1.MqServiceException({
1972
- name: parsedBody.code || parsedBody.Code || errorCode,
1968
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1973
1969
  $fault: "client",
1974
- $metadata: deserializeMetadata(output),
1970
+ $metadata,
1975
1971
  });
1976
1972
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1977
1973
  }
@@ -1993,8 +1989,7 @@ const deserializeAws_restJson1UpdateUserCommandError = async (output, context) =
1993
1989
  body: await parseBody(output.body, context),
1994
1990
  };
1995
1991
  let response;
1996
- let errorCode = "UnknownError";
1997
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1992
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1998
1993
  switch (errorCode) {
1999
1994
  case "BadRequestException":
2000
1995
  case "com.amazonaws.mq#BadRequestException":
@@ -2013,10 +2008,12 @@ const deserializeAws_restJson1UpdateUserCommandError = async (output, context) =
2013
2008
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
2014
2009
  default:
2015
2010
  const parsedBody = parsedOutput.body;
2011
+ const $metadata = deserializeMetadata(output);
2012
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2016
2013
  response = new MqServiceException_1.MqServiceException({
2017
- name: parsedBody.code || parsedBody.Code || errorCode,
2014
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2018
2015
  $fault: "client",
2019
- $metadata: deserializeMetadata(output),
2016
+ $metadata,
2020
2017
  });
2021
2018
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2022
2019
  }
@@ -2144,59 +2141,50 @@ const serializeAws_restJson1__mapOf__string = (input, context) => {
2144
2141
  };
2145
2142
  const serializeAws_restJson1ConfigurationId = (input, context) => {
2146
2143
  return {
2147
- ...(input.Id !== undefined && input.Id !== null && { id: input.Id }),
2148
- ...(input.Revision !== undefined && input.Revision !== null && { revision: input.Revision }),
2144
+ ...(input.Id != null && { id: input.Id }),
2145
+ ...(input.Revision != null && { revision: input.Revision }),
2149
2146
  };
2150
2147
  };
2151
2148
  const serializeAws_restJson1EncryptionOptions = (input, context) => {
2152
2149
  return {
2153
- ...(input.KmsKeyId !== undefined && input.KmsKeyId !== null && { kmsKeyId: input.KmsKeyId }),
2154
- ...(input.UseAwsOwnedKey !== undefined &&
2155
- input.UseAwsOwnedKey !== null && { useAwsOwnedKey: input.UseAwsOwnedKey }),
2150
+ ...(input.KmsKeyId != null && { kmsKeyId: input.KmsKeyId }),
2151
+ ...(input.UseAwsOwnedKey != null && { useAwsOwnedKey: input.UseAwsOwnedKey }),
2156
2152
  };
2157
2153
  };
2158
2154
  const serializeAws_restJson1LdapServerMetadataInput = (input, context) => {
2159
2155
  return {
2160
- ...(input.Hosts !== undefined &&
2161
- input.Hosts !== null && { hosts: serializeAws_restJson1__listOf__string(input.Hosts, context) }),
2162
- ...(input.RoleBase !== undefined && input.RoleBase !== null && { roleBase: input.RoleBase }),
2163
- ...(input.RoleName !== undefined && input.RoleName !== null && { roleName: input.RoleName }),
2164
- ...(input.RoleSearchMatching !== undefined &&
2165
- input.RoleSearchMatching !== null && { roleSearchMatching: input.RoleSearchMatching }),
2166
- ...(input.RoleSearchSubtree !== undefined &&
2167
- input.RoleSearchSubtree !== null && { roleSearchSubtree: input.RoleSearchSubtree }),
2168
- ...(input.ServiceAccountPassword !== undefined &&
2169
- input.ServiceAccountPassword !== null && { serviceAccountPassword: input.ServiceAccountPassword }),
2170
- ...(input.ServiceAccountUsername !== undefined &&
2171
- input.ServiceAccountUsername !== null && { serviceAccountUsername: input.ServiceAccountUsername }),
2172
- ...(input.UserBase !== undefined && input.UserBase !== null && { userBase: input.UserBase }),
2173
- ...(input.UserRoleName !== undefined && input.UserRoleName !== null && { userRoleName: input.UserRoleName }),
2174
- ...(input.UserSearchMatching !== undefined &&
2175
- input.UserSearchMatching !== null && { userSearchMatching: input.UserSearchMatching }),
2176
- ...(input.UserSearchSubtree !== undefined &&
2177
- input.UserSearchSubtree !== null && { userSearchSubtree: input.UserSearchSubtree }),
2156
+ ...(input.Hosts != null && { hosts: serializeAws_restJson1__listOf__string(input.Hosts, context) }),
2157
+ ...(input.RoleBase != null && { roleBase: input.RoleBase }),
2158
+ ...(input.RoleName != null && { roleName: input.RoleName }),
2159
+ ...(input.RoleSearchMatching != null && { roleSearchMatching: input.RoleSearchMatching }),
2160
+ ...(input.RoleSearchSubtree != null && { roleSearchSubtree: input.RoleSearchSubtree }),
2161
+ ...(input.ServiceAccountPassword != null && { serviceAccountPassword: input.ServiceAccountPassword }),
2162
+ ...(input.ServiceAccountUsername != null && { serviceAccountUsername: input.ServiceAccountUsername }),
2163
+ ...(input.UserBase != null && { userBase: input.UserBase }),
2164
+ ...(input.UserRoleName != null && { userRoleName: input.UserRoleName }),
2165
+ ...(input.UserSearchMatching != null && { userSearchMatching: input.UserSearchMatching }),
2166
+ ...(input.UserSearchSubtree != null && { userSearchSubtree: input.UserSearchSubtree }),
2178
2167
  };
2179
2168
  };
2180
2169
  const serializeAws_restJson1Logs = (input, context) => {
2181
2170
  return {
2182
- ...(input.Audit !== undefined && input.Audit !== null && { audit: input.Audit }),
2183
- ...(input.General !== undefined && input.General !== null && { general: input.General }),
2171
+ ...(input.Audit != null && { audit: input.Audit }),
2172
+ ...(input.General != null && { general: input.General }),
2184
2173
  };
2185
2174
  };
2186
2175
  const serializeAws_restJson1User = (input, context) => {
2187
2176
  return {
2188
- ...(input.ConsoleAccess !== undefined && input.ConsoleAccess !== null && { consoleAccess: input.ConsoleAccess }),
2189
- ...(input.Groups !== undefined &&
2190
- input.Groups !== null && { groups: serializeAws_restJson1__listOf__string(input.Groups, context) }),
2191
- ...(input.Password !== undefined && input.Password !== null && { password: input.Password }),
2192
- ...(input.Username !== undefined && input.Username !== null && { username: input.Username }),
2177
+ ...(input.ConsoleAccess != null && { consoleAccess: input.ConsoleAccess }),
2178
+ ...(input.Groups != null && { groups: serializeAws_restJson1__listOf__string(input.Groups, context) }),
2179
+ ...(input.Password != null && { password: input.Password }),
2180
+ ...(input.Username != null && { username: input.Username }),
2193
2181
  };
2194
2182
  };
2195
2183
  const serializeAws_restJson1WeeklyStartTime = (input, context) => {
2196
2184
  return {
2197
- ...(input.DayOfWeek !== undefined && input.DayOfWeek !== null && { dayOfWeek: input.DayOfWeek }),
2198
- ...(input.TimeOfDay !== undefined && input.TimeOfDay !== null && { timeOfDay: input.TimeOfDay }),
2199
- ...(input.TimeZone !== undefined && input.TimeZone !== null && { timeZone: input.TimeZone }),
2185
+ ...(input.DayOfWeek != null && { dayOfWeek: input.DayOfWeek }),
2186
+ ...(input.TimeOfDay != null && { timeOfDay: input.TimeOfDay }),
2187
+ ...(input.TimeZone != null && { timeZone: input.TimeZone }),
2200
2188
  };
2201
2189
  };
2202
2190
  const deserializeAws_restJson1__listOf__string = (output, context) => {
@@ -2378,7 +2366,7 @@ const deserializeAws_restJson1AvailabilityZone = (output, context) => {
2378
2366
  const deserializeAws_restJson1BrokerEngineType = (output, context) => {
2379
2367
  return {
2380
2368
  EngineType: (0, smithy_client_1.expectString)(output.engineType),
2381
- EngineVersions: output.engineVersions !== undefined && output.engineVersions !== null
2369
+ EngineVersions: output.engineVersions != null
2382
2370
  ? deserializeAws_restJson1__listOfEngineVersion(output.engineVersions, context)
2383
2371
  : undefined,
2384
2372
  };
@@ -2386,24 +2374,22 @@ const deserializeAws_restJson1BrokerEngineType = (output, context) => {
2386
2374
  const deserializeAws_restJson1BrokerInstance = (output, context) => {
2387
2375
  return {
2388
2376
  ConsoleURL: (0, smithy_client_1.expectString)(output.consoleURL),
2389
- Endpoints: output.endpoints !== undefined && output.endpoints !== null
2390
- ? deserializeAws_restJson1__listOf__string(output.endpoints, context)
2391
- : undefined,
2377
+ Endpoints: output.endpoints != null ? deserializeAws_restJson1__listOf__string(output.endpoints, context) : undefined,
2392
2378
  IpAddress: (0, smithy_client_1.expectString)(output.ipAddress),
2393
2379
  };
2394
2380
  };
2395
2381
  const deserializeAws_restJson1BrokerInstanceOption = (output, context) => {
2396
2382
  return {
2397
- AvailabilityZones: output.availabilityZones !== undefined && output.availabilityZones !== null
2383
+ AvailabilityZones: output.availabilityZones != null
2398
2384
  ? deserializeAws_restJson1__listOfAvailabilityZone(output.availabilityZones, context)
2399
2385
  : undefined,
2400
2386
  EngineType: (0, smithy_client_1.expectString)(output.engineType),
2401
2387
  HostInstanceType: (0, smithy_client_1.expectString)(output.hostInstanceType),
2402
2388
  StorageType: (0, smithy_client_1.expectString)(output.storageType),
2403
- SupportedDeploymentModes: output.supportedDeploymentModes !== undefined && output.supportedDeploymentModes !== null
2389
+ SupportedDeploymentModes: output.supportedDeploymentModes != null
2404
2390
  ? deserializeAws_restJson1__listOfDeploymentMode(output.supportedDeploymentModes, context)
2405
2391
  : undefined,
2406
- SupportedEngineVersions: output.supportedEngineVersions !== undefined && output.supportedEngineVersions !== null
2392
+ SupportedEngineVersions: output.supportedEngineVersions != null
2407
2393
  ? deserializeAws_restJson1__listOf__string(output.supportedEngineVersions, context)
2408
2394
  : undefined,
2409
2395
  };
@@ -2414,9 +2400,7 @@ const deserializeAws_restJson1BrokerSummary = (output, context) => {
2414
2400
  BrokerId: (0, smithy_client_1.expectString)(output.brokerId),
2415
2401
  BrokerName: (0, smithy_client_1.expectString)(output.brokerName),
2416
2402
  BrokerState: (0, smithy_client_1.expectString)(output.brokerState),
2417
- Created: output.created !== undefined && output.created !== null
2418
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.created))
2419
- : undefined,
2403
+ Created: output.created != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.created)) : undefined,
2420
2404
  DeploymentMode: (0, smithy_client_1.expectString)(output.deploymentMode),
2421
2405
  EngineType: (0, smithy_client_1.expectString)(output.engineType),
2422
2406
  HostInstanceType: (0, smithy_client_1.expectString)(output.hostInstanceType),
@@ -2426,20 +2410,16 @@ const deserializeAws_restJson1Configuration = (output, context) => {
2426
2410
  return {
2427
2411
  Arn: (0, smithy_client_1.expectString)(output.arn),
2428
2412
  AuthenticationStrategy: (0, smithy_client_1.expectString)(output.authenticationStrategy),
2429
- Created: output.created !== undefined && output.created !== null
2430
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.created))
2431
- : undefined,
2413
+ Created: output.created != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.created)) : undefined,
2432
2414
  Description: (0, smithy_client_1.expectString)(output.description),
2433
2415
  EngineType: (0, smithy_client_1.expectString)(output.engineType),
2434
2416
  EngineVersion: (0, smithy_client_1.expectString)(output.engineVersion),
2435
2417
  Id: (0, smithy_client_1.expectString)(output.id),
2436
- LatestRevision: output.latestRevision !== undefined && output.latestRevision !== null
2418
+ LatestRevision: output.latestRevision != null
2437
2419
  ? deserializeAws_restJson1ConfigurationRevision(output.latestRevision, context)
2438
2420
  : undefined,
2439
2421
  Name: (0, smithy_client_1.expectString)(output.name),
2440
- Tags: output.tags !== undefined && output.tags !== null
2441
- ? deserializeAws_restJson1__mapOf__string(output.tags, context)
2442
- : undefined,
2422
+ Tags: output.tags != null ? deserializeAws_restJson1__mapOf__string(output.tags, context) : undefined,
2443
2423
  };
2444
2424
  };
2445
2425
  const deserializeAws_restJson1ConfigurationId = (output, context) => {
@@ -2450,24 +2430,16 @@ const deserializeAws_restJson1ConfigurationId = (output, context) => {
2450
2430
  };
2451
2431
  const deserializeAws_restJson1ConfigurationRevision = (output, context) => {
2452
2432
  return {
2453
- Created: output.created !== undefined && output.created !== null
2454
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.created))
2455
- : undefined,
2433
+ Created: output.created != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.created)) : undefined,
2456
2434
  Description: (0, smithy_client_1.expectString)(output.description),
2457
2435
  Revision: (0, smithy_client_1.expectInt32)(output.revision),
2458
2436
  };
2459
2437
  };
2460
2438
  const deserializeAws_restJson1Configurations = (output, context) => {
2461
2439
  return {
2462
- Current: output.current !== undefined && output.current !== null
2463
- ? deserializeAws_restJson1ConfigurationId(output.current, context)
2464
- : undefined,
2465
- History: output.history !== undefined && output.history !== null
2466
- ? deserializeAws_restJson1__listOfConfigurationId(output.history, context)
2467
- : undefined,
2468
- Pending: output.pending !== undefined && output.pending !== null
2469
- ? deserializeAws_restJson1ConfigurationId(output.pending, context)
2470
- : undefined,
2440
+ Current: output.current != null ? deserializeAws_restJson1ConfigurationId(output.current, context) : undefined,
2441
+ History: output.history != null ? deserializeAws_restJson1__listOfConfigurationId(output.history, context) : undefined,
2442
+ Pending: output.pending != null ? deserializeAws_restJson1ConfigurationId(output.pending, context) : undefined,
2471
2443
  };
2472
2444
  };
2473
2445
  const deserializeAws_restJson1EncryptionOptions = (output, context) => {
@@ -2483,9 +2455,7 @@ const deserializeAws_restJson1EngineVersion = (output, context) => {
2483
2455
  };
2484
2456
  const deserializeAws_restJson1LdapServerMetadataOutput = (output, context) => {
2485
2457
  return {
2486
- Hosts: output.hosts !== undefined && output.hosts !== null
2487
- ? deserializeAws_restJson1__listOf__string(output.hosts, context)
2488
- : undefined,
2458
+ Hosts: output.hosts != null ? deserializeAws_restJson1__listOf__string(output.hosts, context) : undefined,
2489
2459
  RoleBase: (0, smithy_client_1.expectString)(output.roleBase),
2490
2460
  RoleName: (0, smithy_client_1.expectString)(output.roleName),
2491
2461
  RoleSearchMatching: (0, smithy_client_1.expectString)(output.roleSearchMatching),
@@ -2509,9 +2479,7 @@ const deserializeAws_restJson1LogsSummary = (output, context) => {
2509
2479
  AuditLogGroup: (0, smithy_client_1.expectString)(output.auditLogGroup),
2510
2480
  General: (0, smithy_client_1.expectBoolean)(output.general),
2511
2481
  GeneralLogGroup: (0, smithy_client_1.expectString)(output.generalLogGroup),
2512
- Pending: output.pending !== undefined && output.pending !== null
2513
- ? deserializeAws_restJson1PendingLogs(output.pending, context)
2514
- : undefined,
2482
+ Pending: output.pending != null ? deserializeAws_restJson1PendingLogs(output.pending, context) : undefined,
2515
2483
  };
2516
2484
  };
2517
2485
  const deserializeAws_restJson1PendingLogs = (output, context) => {
@@ -2530,9 +2498,7 @@ const deserializeAws_restJson1SanitizationWarning = (output, context) => {
2530
2498
  const deserializeAws_restJson1UserPendingChanges = (output, context) => {
2531
2499
  return {
2532
2500
  ConsoleAccess: (0, smithy_client_1.expectBoolean)(output.consoleAccess),
2533
- Groups: output.groups !== undefined && output.groups !== null
2534
- ? deserializeAws_restJson1__listOf__string(output.groups, context)
2535
- : undefined,
2501
+ Groups: output.groups != null ? deserializeAws_restJson1__listOf__string(output.groups, context) : undefined,
2536
2502
  PendingChange: (0, smithy_client_1.expectString)(output.pendingChange),
2537
2503
  };
2538
2504
  };
@@ -2598,5 +2564,4 @@ const loadRestJsonErrorCode = (output, data) => {
2598
2564
  if (data["__type"] !== undefined) {
2599
2565
  return sanitizeErrorCode(data["__type"]);
2600
2566
  }
2601
- return "";
2602
2567
  };