@aws-sdk/client-mq 3.489.0 → 3.495.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.
Files changed (38) hide show
  1. package/dist-cjs/Mq.js +1 -57
  2. package/dist-cjs/MqClient.js +1 -43
  3. package/dist-cjs/commands/CreateBrokerCommand.js +1 -28
  4. package/dist-cjs/commands/CreateConfigurationCommand.js +1 -28
  5. package/dist-cjs/commands/CreateTagsCommand.js +1 -28
  6. package/dist-cjs/commands/CreateUserCommand.js +1 -28
  7. package/dist-cjs/commands/DeleteBrokerCommand.js +1 -28
  8. package/dist-cjs/commands/DeleteTagsCommand.js +1 -28
  9. package/dist-cjs/commands/DeleteUserCommand.js +1 -28
  10. package/dist-cjs/commands/DescribeBrokerCommand.js +1 -28
  11. package/dist-cjs/commands/DescribeBrokerEngineTypesCommand.js +1 -28
  12. package/dist-cjs/commands/DescribeBrokerInstanceOptionsCommand.js +1 -28
  13. package/dist-cjs/commands/DescribeConfigurationCommand.js +1 -28
  14. package/dist-cjs/commands/DescribeConfigurationRevisionCommand.js +1 -28
  15. package/dist-cjs/commands/DescribeUserCommand.js +1 -28
  16. package/dist-cjs/commands/ListBrokersCommand.js +1 -28
  17. package/dist-cjs/commands/ListConfigurationRevisionsCommand.js +1 -28
  18. package/dist-cjs/commands/ListConfigurationsCommand.js +1 -28
  19. package/dist-cjs/commands/ListTagsCommand.js +1 -28
  20. package/dist-cjs/commands/ListUsersCommand.js +1 -28
  21. package/dist-cjs/commands/PromoteCommand.js +1 -28
  22. package/dist-cjs/commands/RebootBrokerCommand.js +1 -28
  23. package/dist-cjs/commands/UpdateBrokerCommand.js +1 -28
  24. package/dist-cjs/commands/UpdateConfigurationCommand.js +1 -28
  25. package/dist-cjs/commands/UpdateUserCommand.js +1 -28
  26. package/dist-cjs/commands/index.js +1 -26
  27. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  28. package/dist-cjs/extensionConfiguration.js +1 -2
  29. package/dist-cjs/index.js +2635 -11
  30. package/dist-cjs/models/MqServiceException.js +1 -12
  31. package/dist-cjs/models/index.js +1 -4
  32. package/dist-cjs/models/models_0.js +1 -147
  33. package/dist-cjs/pagination/Interfaces.js +1 -2
  34. package/dist-cjs/pagination/ListBrokersPaginator.js +1 -7
  35. package/dist-cjs/pagination/index.js +1 -5
  36. package/dist-cjs/protocols/Aws_restJson1.js +1 -1879
  37. package/dist-cjs/runtimeExtensions.js +1 -22
  38. package/package.json +40 -40
@@ -1,1879 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UpdateUserCommand = exports.de_UpdateConfigurationCommand = exports.de_UpdateBrokerCommand = exports.de_RebootBrokerCommand = exports.de_PromoteCommand = exports.de_ListUsersCommand = exports.de_ListTagsCommand = exports.de_ListConfigurationsCommand = exports.de_ListConfigurationRevisionsCommand = exports.de_ListBrokersCommand = exports.de_DescribeUserCommand = exports.de_DescribeConfigurationRevisionCommand = exports.de_DescribeConfigurationCommand = exports.de_DescribeBrokerInstanceOptionsCommand = exports.de_DescribeBrokerEngineTypesCommand = exports.de_DescribeBrokerCommand = exports.de_DeleteUserCommand = exports.de_DeleteTagsCommand = exports.de_DeleteBrokerCommand = exports.de_CreateUserCommand = exports.de_CreateTagsCommand = exports.de_CreateConfigurationCommand = exports.de_CreateBrokerCommand = exports.se_UpdateUserCommand = exports.se_UpdateConfigurationCommand = exports.se_UpdateBrokerCommand = exports.se_RebootBrokerCommand = exports.se_PromoteCommand = exports.se_ListUsersCommand = exports.se_ListTagsCommand = exports.se_ListConfigurationsCommand = exports.se_ListConfigurationRevisionsCommand = exports.se_ListBrokersCommand = exports.se_DescribeUserCommand = exports.se_DescribeConfigurationRevisionCommand = exports.se_DescribeConfigurationCommand = exports.se_DescribeBrokerInstanceOptionsCommand = exports.se_DescribeBrokerEngineTypesCommand = exports.se_DescribeBrokerCommand = exports.se_DeleteUserCommand = exports.se_DeleteTagsCommand = exports.se_DeleteBrokerCommand = exports.se_CreateUserCommand = exports.se_CreateTagsCommand = exports.se_CreateConfigurationCommand = exports.se_CreateBrokerCommand = void 0;
4
- const core_1 = require("@smithy/core");
5
- const smithy_client_1 = require("@smithy/smithy-client");
6
- const uuid_1 = require("uuid");
7
- const models_0_1 = require("../models/models_0");
8
- const MqServiceException_1 = require("../models/MqServiceException");
9
- const se_CreateBrokerCommand = async (input, context) => {
10
- const b = (0, core_1.requestBuilder)(input, context);
11
- const headers = {
12
- "content-type": "application/json",
13
- };
14
- b.bp("/v1/brokers");
15
- let body;
16
- body = JSON.stringify((0, smithy_client_1.take)(input, {
17
- authenticationStrategy: [, , `AuthenticationStrategy`],
18
- autoMinorVersionUpgrade: [, , `AutoMinorVersionUpgrade`],
19
- brokerName: [, , `BrokerName`],
20
- configuration: [, (_) => se_ConfigurationId(_, context), `Configuration`],
21
- creatorRequestId: [true, (_) => _ ?? (0, uuid_1.v4)(), `CreatorRequestId`],
22
- dataReplicationMode: [, , `DataReplicationMode`],
23
- dataReplicationPrimaryBrokerArn: [, , `DataReplicationPrimaryBrokerArn`],
24
- deploymentMode: [, , `DeploymentMode`],
25
- encryptionOptions: [, (_) => se_EncryptionOptions(_, context), `EncryptionOptions`],
26
- engineType: [, , `EngineType`],
27
- engineVersion: [, , `EngineVersion`],
28
- hostInstanceType: [, , `HostInstanceType`],
29
- ldapServerMetadata: [, (_) => se_LdapServerMetadataInput(_, context), `LdapServerMetadata`],
30
- logs: [, (_) => se_Logs(_, context), `Logs`],
31
- maintenanceWindowStartTime: [, (_) => se_WeeklyStartTime(_, context), `MaintenanceWindowStartTime`],
32
- publiclyAccessible: [, , `PubliclyAccessible`],
33
- securityGroups: [, (_) => (0, smithy_client_1._json)(_), `SecurityGroups`],
34
- storageType: [, , `StorageType`],
35
- subnetIds: [, (_) => (0, smithy_client_1._json)(_), `SubnetIds`],
36
- tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
37
- users: [, (_) => se___listOfUser(_, context), `Users`],
38
- }));
39
- b.m("POST").h(headers).b(body);
40
- return b.build();
41
- };
42
- exports.se_CreateBrokerCommand = se_CreateBrokerCommand;
43
- const se_CreateConfigurationCommand = async (input, context) => {
44
- const b = (0, core_1.requestBuilder)(input, context);
45
- const headers = {
46
- "content-type": "application/json",
47
- };
48
- b.bp("/v1/configurations");
49
- let body;
50
- body = JSON.stringify((0, smithy_client_1.take)(input, {
51
- authenticationStrategy: [, , `AuthenticationStrategy`],
52
- engineType: [, , `EngineType`],
53
- engineVersion: [, , `EngineVersion`],
54
- name: [, , `Name`],
55
- tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
56
- }));
57
- b.m("POST").h(headers).b(body);
58
- return b.build();
59
- };
60
- exports.se_CreateConfigurationCommand = se_CreateConfigurationCommand;
61
- const se_CreateTagsCommand = async (input, context) => {
62
- const b = (0, core_1.requestBuilder)(input, context);
63
- const headers = {
64
- "content-type": "application/json",
65
- };
66
- b.bp("/v1/tags/{ResourceArn}");
67
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
68
- let body;
69
- body = JSON.stringify((0, smithy_client_1.take)(input, {
70
- tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
71
- }));
72
- b.m("POST").h(headers).b(body);
73
- return b.build();
74
- };
75
- exports.se_CreateTagsCommand = se_CreateTagsCommand;
76
- const se_CreateUserCommand = async (input, context) => {
77
- const b = (0, core_1.requestBuilder)(input, context);
78
- const headers = {
79
- "content-type": "application/json",
80
- };
81
- b.bp("/v1/brokers/{BrokerId}/users/{Username}");
82
- b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
83
- b.p("Username", () => input.Username, "{Username}", false);
84
- let body;
85
- body = JSON.stringify((0, smithy_client_1.take)(input, {
86
- consoleAccess: [, , `ConsoleAccess`],
87
- groups: [, (_) => (0, smithy_client_1._json)(_), `Groups`],
88
- password: [, , `Password`],
89
- replicationUser: [, , `ReplicationUser`],
90
- }));
91
- b.m("POST").h(headers).b(body);
92
- return b.build();
93
- };
94
- exports.se_CreateUserCommand = se_CreateUserCommand;
95
- const se_DeleteBrokerCommand = async (input, context) => {
96
- const b = (0, core_1.requestBuilder)(input, context);
97
- const headers = {};
98
- b.bp("/v1/brokers/{BrokerId}");
99
- b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
100
- let body;
101
- b.m("DELETE").h(headers).b(body);
102
- return b.build();
103
- };
104
- exports.se_DeleteBrokerCommand = se_DeleteBrokerCommand;
105
- const se_DeleteTagsCommand = async (input, context) => {
106
- const b = (0, core_1.requestBuilder)(input, context);
107
- const headers = {};
108
- b.bp("/v1/tags/{ResourceArn}");
109
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
110
- const query = (0, smithy_client_1.map)({
111
- [_tK]: [
112
- (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
113
- () => (input[_TK] || []).map((_entry) => _entry),
114
- ],
115
- });
116
- let body;
117
- b.m("DELETE").h(headers).q(query).b(body);
118
- return b.build();
119
- };
120
- exports.se_DeleteTagsCommand = se_DeleteTagsCommand;
121
- const se_DeleteUserCommand = async (input, context) => {
122
- const b = (0, core_1.requestBuilder)(input, context);
123
- const headers = {};
124
- b.bp("/v1/brokers/{BrokerId}/users/{Username}");
125
- b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
126
- b.p("Username", () => input.Username, "{Username}", false);
127
- let body;
128
- b.m("DELETE").h(headers).b(body);
129
- return b.build();
130
- };
131
- exports.se_DeleteUserCommand = se_DeleteUserCommand;
132
- const se_DescribeBrokerCommand = async (input, context) => {
133
- const b = (0, core_1.requestBuilder)(input, context);
134
- const headers = {};
135
- b.bp("/v1/brokers/{BrokerId}");
136
- b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
137
- let body;
138
- b.m("GET").h(headers).b(body);
139
- return b.build();
140
- };
141
- exports.se_DescribeBrokerCommand = se_DescribeBrokerCommand;
142
- const se_DescribeBrokerEngineTypesCommand = async (input, context) => {
143
- const b = (0, core_1.requestBuilder)(input, context);
144
- const headers = {};
145
- b.bp("/v1/broker-engine-types");
146
- const query = (0, smithy_client_1.map)({
147
- [_eT]: [, input[_ET]],
148
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
149
- [_nT]: [, input[_NT]],
150
- });
151
- let body;
152
- b.m("GET").h(headers).q(query).b(body);
153
- return b.build();
154
- };
155
- exports.se_DescribeBrokerEngineTypesCommand = se_DescribeBrokerEngineTypesCommand;
156
- const se_DescribeBrokerInstanceOptionsCommand = async (input, context) => {
157
- const b = (0, core_1.requestBuilder)(input, context);
158
- const headers = {};
159
- b.bp("/v1/broker-instance-options");
160
- const query = (0, smithy_client_1.map)({
161
- [_eT]: [, input[_ET]],
162
- [_hIT]: [, input[_HIT]],
163
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
164
- [_nT]: [, input[_NT]],
165
- [_sT]: [, input[_ST]],
166
- });
167
- let body;
168
- b.m("GET").h(headers).q(query).b(body);
169
- return b.build();
170
- };
171
- exports.se_DescribeBrokerInstanceOptionsCommand = se_DescribeBrokerInstanceOptionsCommand;
172
- const se_DescribeConfigurationCommand = async (input, context) => {
173
- const b = (0, core_1.requestBuilder)(input, context);
174
- const headers = {};
175
- b.bp("/v1/configurations/{ConfigurationId}");
176
- b.p("ConfigurationId", () => input.ConfigurationId, "{ConfigurationId}", false);
177
- let body;
178
- b.m("GET").h(headers).b(body);
179
- return b.build();
180
- };
181
- exports.se_DescribeConfigurationCommand = se_DescribeConfigurationCommand;
182
- const se_DescribeConfigurationRevisionCommand = async (input, context) => {
183
- const b = (0, core_1.requestBuilder)(input, context);
184
- const headers = {};
185
- b.bp("/v1/configurations/{ConfigurationId}/revisions/{ConfigurationRevision}");
186
- b.p("ConfigurationId", () => input.ConfigurationId, "{ConfigurationId}", false);
187
- b.p("ConfigurationRevision", () => input.ConfigurationRevision, "{ConfigurationRevision}", false);
188
- let body;
189
- b.m("GET").h(headers).b(body);
190
- return b.build();
191
- };
192
- exports.se_DescribeConfigurationRevisionCommand = se_DescribeConfigurationRevisionCommand;
193
- const se_DescribeUserCommand = async (input, context) => {
194
- const b = (0, core_1.requestBuilder)(input, context);
195
- const headers = {};
196
- b.bp("/v1/brokers/{BrokerId}/users/{Username}");
197
- b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
198
- b.p("Username", () => input.Username, "{Username}", false);
199
- let body;
200
- b.m("GET").h(headers).b(body);
201
- return b.build();
202
- };
203
- exports.se_DescribeUserCommand = se_DescribeUserCommand;
204
- const se_ListBrokersCommand = async (input, context) => {
205
- const b = (0, core_1.requestBuilder)(input, context);
206
- const headers = {};
207
- b.bp("/v1/brokers");
208
- const query = (0, smithy_client_1.map)({
209
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
210
- [_nT]: [, input[_NT]],
211
- });
212
- let body;
213
- b.m("GET").h(headers).q(query).b(body);
214
- return b.build();
215
- };
216
- exports.se_ListBrokersCommand = se_ListBrokersCommand;
217
- const se_ListConfigurationRevisionsCommand = async (input, context) => {
218
- const b = (0, core_1.requestBuilder)(input, context);
219
- const headers = {};
220
- b.bp("/v1/configurations/{ConfigurationId}/revisions");
221
- b.p("ConfigurationId", () => input.ConfigurationId, "{ConfigurationId}", false);
222
- const query = (0, smithy_client_1.map)({
223
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
224
- [_nT]: [, input[_NT]],
225
- });
226
- let body;
227
- b.m("GET").h(headers).q(query).b(body);
228
- return b.build();
229
- };
230
- exports.se_ListConfigurationRevisionsCommand = se_ListConfigurationRevisionsCommand;
231
- const se_ListConfigurationsCommand = async (input, context) => {
232
- const b = (0, core_1.requestBuilder)(input, context);
233
- const headers = {};
234
- b.bp("/v1/configurations");
235
- const query = (0, smithy_client_1.map)({
236
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
237
- [_nT]: [, input[_NT]],
238
- });
239
- let body;
240
- b.m("GET").h(headers).q(query).b(body);
241
- return b.build();
242
- };
243
- exports.se_ListConfigurationsCommand = se_ListConfigurationsCommand;
244
- const se_ListTagsCommand = async (input, context) => {
245
- const b = (0, core_1.requestBuilder)(input, context);
246
- const headers = {};
247
- b.bp("/v1/tags/{ResourceArn}");
248
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
249
- let body;
250
- b.m("GET").h(headers).b(body);
251
- return b.build();
252
- };
253
- exports.se_ListTagsCommand = se_ListTagsCommand;
254
- const se_ListUsersCommand = async (input, context) => {
255
- const b = (0, core_1.requestBuilder)(input, context);
256
- const headers = {};
257
- b.bp("/v1/brokers/{BrokerId}/users");
258
- b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
259
- const query = (0, smithy_client_1.map)({
260
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
261
- [_nT]: [, input[_NT]],
262
- });
263
- let body;
264
- b.m("GET").h(headers).q(query).b(body);
265
- return b.build();
266
- };
267
- exports.se_ListUsersCommand = se_ListUsersCommand;
268
- const se_PromoteCommand = async (input, context) => {
269
- const b = (0, core_1.requestBuilder)(input, context);
270
- const headers = {
271
- "content-type": "application/json",
272
- };
273
- b.bp("/v1/brokers/{BrokerId}/promote");
274
- b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
275
- let body;
276
- body = JSON.stringify((0, smithy_client_1.take)(input, {
277
- mode: [, , `Mode`],
278
- }));
279
- b.m("POST").h(headers).b(body);
280
- return b.build();
281
- };
282
- exports.se_PromoteCommand = se_PromoteCommand;
283
- const se_RebootBrokerCommand = async (input, context) => {
284
- const b = (0, core_1.requestBuilder)(input, context);
285
- const headers = {};
286
- b.bp("/v1/brokers/{BrokerId}/reboot");
287
- b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
288
- let body;
289
- b.m("POST").h(headers).b(body);
290
- return b.build();
291
- };
292
- exports.se_RebootBrokerCommand = se_RebootBrokerCommand;
293
- const se_UpdateBrokerCommand = async (input, context) => {
294
- const b = (0, core_1.requestBuilder)(input, context);
295
- const headers = {
296
- "content-type": "application/json",
297
- };
298
- b.bp("/v1/brokers/{BrokerId}");
299
- b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
300
- let body;
301
- body = JSON.stringify((0, smithy_client_1.take)(input, {
302
- authenticationStrategy: [, , `AuthenticationStrategy`],
303
- autoMinorVersionUpgrade: [, , `AutoMinorVersionUpgrade`],
304
- configuration: [, (_) => se_ConfigurationId(_, context), `Configuration`],
305
- dataReplicationMode: [, , `DataReplicationMode`],
306
- engineVersion: [, , `EngineVersion`],
307
- hostInstanceType: [, , `HostInstanceType`],
308
- ldapServerMetadata: [, (_) => se_LdapServerMetadataInput(_, context), `LdapServerMetadata`],
309
- logs: [, (_) => se_Logs(_, context), `Logs`],
310
- maintenanceWindowStartTime: [, (_) => se_WeeklyStartTime(_, context), `MaintenanceWindowStartTime`],
311
- securityGroups: [, (_) => (0, smithy_client_1._json)(_), `SecurityGroups`],
312
- }));
313
- b.m("PUT").h(headers).b(body);
314
- return b.build();
315
- };
316
- exports.se_UpdateBrokerCommand = se_UpdateBrokerCommand;
317
- const se_UpdateConfigurationCommand = async (input, context) => {
318
- const b = (0, core_1.requestBuilder)(input, context);
319
- const headers = {
320
- "content-type": "application/json",
321
- };
322
- b.bp("/v1/configurations/{ConfigurationId}");
323
- b.p("ConfigurationId", () => input.ConfigurationId, "{ConfigurationId}", false);
324
- let body;
325
- body = JSON.stringify((0, smithy_client_1.take)(input, {
326
- data: [, , `Data`],
327
- description: [, , `Description`],
328
- }));
329
- b.m("PUT").h(headers).b(body);
330
- return b.build();
331
- };
332
- exports.se_UpdateConfigurationCommand = se_UpdateConfigurationCommand;
333
- const se_UpdateUserCommand = async (input, context) => {
334
- const b = (0, core_1.requestBuilder)(input, context);
335
- const headers = {
336
- "content-type": "application/json",
337
- };
338
- b.bp("/v1/brokers/{BrokerId}/users/{Username}");
339
- b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
340
- b.p("Username", () => input.Username, "{Username}", false);
341
- let body;
342
- body = JSON.stringify((0, smithy_client_1.take)(input, {
343
- consoleAccess: [, , `ConsoleAccess`],
344
- groups: [, (_) => (0, smithy_client_1._json)(_), `Groups`],
345
- password: [, , `Password`],
346
- replicationUser: [, , `ReplicationUser`],
347
- }));
348
- b.m("PUT").h(headers).b(body);
349
- return b.build();
350
- };
351
- exports.se_UpdateUserCommand = se_UpdateUserCommand;
352
- const de_CreateBrokerCommand = async (output, context) => {
353
- if (output.statusCode !== 200 && output.statusCode >= 300) {
354
- return de_CreateBrokerCommandError(output, context);
355
- }
356
- const contents = (0, smithy_client_1.map)({
357
- $metadata: deserializeMetadata(output),
358
- });
359
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
360
- const doc = (0, smithy_client_1.take)(data, {
361
- BrokerArn: [, smithy_client_1.expectString, `brokerArn`],
362
- BrokerId: [, smithy_client_1.expectString, `brokerId`],
363
- });
364
- Object.assign(contents, doc);
365
- return contents;
366
- };
367
- exports.de_CreateBrokerCommand = de_CreateBrokerCommand;
368
- const de_CreateBrokerCommandError = async (output, context) => {
369
- const parsedOutput = {
370
- ...output,
371
- body: await parseErrorBody(output.body, context),
372
- };
373
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
374
- switch (errorCode) {
375
- case "BadRequestException":
376
- case "com.amazonaws.mq#BadRequestException":
377
- throw await de_BadRequestExceptionRes(parsedOutput, context);
378
- case "ConflictException":
379
- case "com.amazonaws.mq#ConflictException":
380
- throw await de_ConflictExceptionRes(parsedOutput, context);
381
- case "ForbiddenException":
382
- case "com.amazonaws.mq#ForbiddenException":
383
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
384
- case "InternalServerErrorException":
385
- case "com.amazonaws.mq#InternalServerErrorException":
386
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
387
- case "UnauthorizedException":
388
- case "com.amazonaws.mq#UnauthorizedException":
389
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
390
- default:
391
- const parsedBody = parsedOutput.body;
392
- return throwDefaultError({
393
- output,
394
- parsedBody,
395
- errorCode,
396
- });
397
- }
398
- };
399
- const de_CreateConfigurationCommand = async (output, context) => {
400
- if (output.statusCode !== 200 && output.statusCode >= 300) {
401
- return de_CreateConfigurationCommandError(output, context);
402
- }
403
- const contents = (0, smithy_client_1.map)({
404
- $metadata: deserializeMetadata(output),
405
- });
406
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
407
- const doc = (0, smithy_client_1.take)(data, {
408
- Arn: [, smithy_client_1.expectString, `arn`],
409
- AuthenticationStrategy: [, smithy_client_1.expectString, `authenticationStrategy`],
410
- Created: [, (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)), `created`],
411
- Id: [, smithy_client_1.expectString, `id`],
412
- LatestRevision: [, (_) => de_ConfigurationRevision(_, context), `latestRevision`],
413
- Name: [, smithy_client_1.expectString, `name`],
414
- });
415
- Object.assign(contents, doc);
416
- return contents;
417
- };
418
- exports.de_CreateConfigurationCommand = de_CreateConfigurationCommand;
419
- const de_CreateConfigurationCommandError = async (output, context) => {
420
- const parsedOutput = {
421
- ...output,
422
- body: await parseErrorBody(output.body, context),
423
- };
424
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
425
- switch (errorCode) {
426
- case "BadRequestException":
427
- case "com.amazonaws.mq#BadRequestException":
428
- throw await de_BadRequestExceptionRes(parsedOutput, context);
429
- case "ConflictException":
430
- case "com.amazonaws.mq#ConflictException":
431
- throw await de_ConflictExceptionRes(parsedOutput, context);
432
- case "ForbiddenException":
433
- case "com.amazonaws.mq#ForbiddenException":
434
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
435
- case "InternalServerErrorException":
436
- case "com.amazonaws.mq#InternalServerErrorException":
437
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
438
- default:
439
- const parsedBody = parsedOutput.body;
440
- return throwDefaultError({
441
- output,
442
- parsedBody,
443
- errorCode,
444
- });
445
- }
446
- };
447
- const de_CreateTagsCommand = async (output, context) => {
448
- if (output.statusCode !== 204 && output.statusCode >= 300) {
449
- return de_CreateTagsCommandError(output, context);
450
- }
451
- const contents = (0, smithy_client_1.map)({
452
- $metadata: deserializeMetadata(output),
453
- });
454
- await (0, smithy_client_1.collectBody)(output.body, context);
455
- return contents;
456
- };
457
- exports.de_CreateTagsCommand = de_CreateTagsCommand;
458
- const de_CreateTagsCommandError = async (output, context) => {
459
- const parsedOutput = {
460
- ...output,
461
- body: await parseErrorBody(output.body, context),
462
- };
463
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
464
- switch (errorCode) {
465
- case "BadRequestException":
466
- case "com.amazonaws.mq#BadRequestException":
467
- throw await de_BadRequestExceptionRes(parsedOutput, context);
468
- case "ForbiddenException":
469
- case "com.amazonaws.mq#ForbiddenException":
470
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
471
- case "InternalServerErrorException":
472
- case "com.amazonaws.mq#InternalServerErrorException":
473
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
474
- case "NotFoundException":
475
- case "com.amazonaws.mq#NotFoundException":
476
- throw await de_NotFoundExceptionRes(parsedOutput, context);
477
- default:
478
- const parsedBody = parsedOutput.body;
479
- return throwDefaultError({
480
- output,
481
- parsedBody,
482
- errorCode,
483
- });
484
- }
485
- };
486
- const de_CreateUserCommand = async (output, context) => {
487
- if (output.statusCode !== 200 && output.statusCode >= 300) {
488
- return de_CreateUserCommandError(output, context);
489
- }
490
- const contents = (0, smithy_client_1.map)({
491
- $metadata: deserializeMetadata(output),
492
- });
493
- await (0, smithy_client_1.collectBody)(output.body, context);
494
- return contents;
495
- };
496
- exports.de_CreateUserCommand = de_CreateUserCommand;
497
- const de_CreateUserCommandError = async (output, context) => {
498
- const parsedOutput = {
499
- ...output,
500
- body: await parseErrorBody(output.body, context),
501
- };
502
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
503
- switch (errorCode) {
504
- case "BadRequestException":
505
- case "com.amazonaws.mq#BadRequestException":
506
- throw await de_BadRequestExceptionRes(parsedOutput, context);
507
- case "ConflictException":
508
- case "com.amazonaws.mq#ConflictException":
509
- throw await de_ConflictExceptionRes(parsedOutput, context);
510
- case "ForbiddenException":
511
- case "com.amazonaws.mq#ForbiddenException":
512
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
513
- case "InternalServerErrorException":
514
- case "com.amazonaws.mq#InternalServerErrorException":
515
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
516
- case "NotFoundException":
517
- case "com.amazonaws.mq#NotFoundException":
518
- throw await de_NotFoundExceptionRes(parsedOutput, context);
519
- default:
520
- const parsedBody = parsedOutput.body;
521
- return throwDefaultError({
522
- output,
523
- parsedBody,
524
- errorCode,
525
- });
526
- }
527
- };
528
- const de_DeleteBrokerCommand = async (output, context) => {
529
- if (output.statusCode !== 200 && output.statusCode >= 300) {
530
- return de_DeleteBrokerCommandError(output, context);
531
- }
532
- const contents = (0, smithy_client_1.map)({
533
- $metadata: deserializeMetadata(output),
534
- });
535
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
536
- const doc = (0, smithy_client_1.take)(data, {
537
- BrokerId: [, smithy_client_1.expectString, `brokerId`],
538
- });
539
- Object.assign(contents, doc);
540
- return contents;
541
- };
542
- exports.de_DeleteBrokerCommand = de_DeleteBrokerCommand;
543
- const de_DeleteBrokerCommandError = async (output, context) => {
544
- const parsedOutput = {
545
- ...output,
546
- body: await parseErrorBody(output.body, context),
547
- };
548
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
549
- switch (errorCode) {
550
- case "BadRequestException":
551
- case "com.amazonaws.mq#BadRequestException":
552
- throw await de_BadRequestExceptionRes(parsedOutput, context);
553
- case "ForbiddenException":
554
- case "com.amazonaws.mq#ForbiddenException":
555
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
556
- case "InternalServerErrorException":
557
- case "com.amazonaws.mq#InternalServerErrorException":
558
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
559
- case "NotFoundException":
560
- case "com.amazonaws.mq#NotFoundException":
561
- throw await de_NotFoundExceptionRes(parsedOutput, context);
562
- default:
563
- const parsedBody = parsedOutput.body;
564
- return throwDefaultError({
565
- output,
566
- parsedBody,
567
- errorCode,
568
- });
569
- }
570
- };
571
- const de_DeleteTagsCommand = async (output, context) => {
572
- if (output.statusCode !== 204 && output.statusCode >= 300) {
573
- return de_DeleteTagsCommandError(output, context);
574
- }
575
- const contents = (0, smithy_client_1.map)({
576
- $metadata: deserializeMetadata(output),
577
- });
578
- await (0, smithy_client_1.collectBody)(output.body, context);
579
- return contents;
580
- };
581
- exports.de_DeleteTagsCommand = de_DeleteTagsCommand;
582
- const de_DeleteTagsCommandError = async (output, context) => {
583
- const parsedOutput = {
584
- ...output,
585
- body: await parseErrorBody(output.body, context),
586
- };
587
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
588
- switch (errorCode) {
589
- case "BadRequestException":
590
- case "com.amazonaws.mq#BadRequestException":
591
- throw await de_BadRequestExceptionRes(parsedOutput, context);
592
- case "ForbiddenException":
593
- case "com.amazonaws.mq#ForbiddenException":
594
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
595
- case "InternalServerErrorException":
596
- case "com.amazonaws.mq#InternalServerErrorException":
597
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
598
- case "NotFoundException":
599
- case "com.amazonaws.mq#NotFoundException":
600
- throw await de_NotFoundExceptionRes(parsedOutput, context);
601
- default:
602
- const parsedBody = parsedOutput.body;
603
- return throwDefaultError({
604
- output,
605
- parsedBody,
606
- errorCode,
607
- });
608
- }
609
- };
610
- const de_DeleteUserCommand = async (output, context) => {
611
- if (output.statusCode !== 200 && output.statusCode >= 300) {
612
- return de_DeleteUserCommandError(output, context);
613
- }
614
- const contents = (0, smithy_client_1.map)({
615
- $metadata: deserializeMetadata(output),
616
- });
617
- await (0, smithy_client_1.collectBody)(output.body, context);
618
- return contents;
619
- };
620
- exports.de_DeleteUserCommand = de_DeleteUserCommand;
621
- const de_DeleteUserCommandError = async (output, context) => {
622
- const parsedOutput = {
623
- ...output,
624
- body: await parseErrorBody(output.body, context),
625
- };
626
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
627
- switch (errorCode) {
628
- case "BadRequestException":
629
- case "com.amazonaws.mq#BadRequestException":
630
- throw await de_BadRequestExceptionRes(parsedOutput, context);
631
- case "ForbiddenException":
632
- case "com.amazonaws.mq#ForbiddenException":
633
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
634
- case "InternalServerErrorException":
635
- case "com.amazonaws.mq#InternalServerErrorException":
636
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
637
- case "NotFoundException":
638
- case "com.amazonaws.mq#NotFoundException":
639
- throw await de_NotFoundExceptionRes(parsedOutput, context);
640
- default:
641
- const parsedBody = parsedOutput.body;
642
- return throwDefaultError({
643
- output,
644
- parsedBody,
645
- errorCode,
646
- });
647
- }
648
- };
649
- const de_DescribeBrokerCommand = async (output, context) => {
650
- if (output.statusCode !== 200 && output.statusCode >= 300) {
651
- return de_DescribeBrokerCommandError(output, context);
652
- }
653
- const contents = (0, smithy_client_1.map)({
654
- $metadata: deserializeMetadata(output),
655
- });
656
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
657
- const doc = (0, smithy_client_1.take)(data, {
658
- ActionsRequired: [, (_) => de___listOfActionRequired(_, context), `actionsRequired`],
659
- AuthenticationStrategy: [, smithy_client_1.expectString, `authenticationStrategy`],
660
- AutoMinorVersionUpgrade: [, smithy_client_1.expectBoolean, `autoMinorVersionUpgrade`],
661
- BrokerArn: [, smithy_client_1.expectString, `brokerArn`],
662
- BrokerId: [, smithy_client_1.expectString, `brokerId`],
663
- BrokerInstances: [, (_) => de___listOfBrokerInstance(_, context), `brokerInstances`],
664
- BrokerName: [, smithy_client_1.expectString, `brokerName`],
665
- BrokerState: [, smithy_client_1.expectString, `brokerState`],
666
- Configurations: [, (_) => de_Configurations(_, context), `configurations`],
667
- Created: [, (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)), `created`],
668
- DataReplicationMetadata: [, (_) => de_DataReplicationMetadataOutput(_, context), `dataReplicationMetadata`],
669
- DataReplicationMode: [, smithy_client_1.expectString, `dataReplicationMode`],
670
- DeploymentMode: [, smithy_client_1.expectString, `deploymentMode`],
671
- EncryptionOptions: [, (_) => de_EncryptionOptions(_, context), `encryptionOptions`],
672
- EngineType: [, smithy_client_1.expectString, `engineType`],
673
- EngineVersion: [, smithy_client_1.expectString, `engineVersion`],
674
- HostInstanceType: [, smithy_client_1.expectString, `hostInstanceType`],
675
- LdapServerMetadata: [, (_) => de_LdapServerMetadataOutput(_, context), `ldapServerMetadata`],
676
- Logs: [, (_) => de_LogsSummary(_, context), `logs`],
677
- MaintenanceWindowStartTime: [, (_) => de_WeeklyStartTime(_, context), `maintenanceWindowStartTime`],
678
- PendingAuthenticationStrategy: [, smithy_client_1.expectString, `pendingAuthenticationStrategy`],
679
- PendingDataReplicationMetadata: [
680
- ,
681
- (_) => de_DataReplicationMetadataOutput(_, context),
682
- `pendingDataReplicationMetadata`,
683
- ],
684
- PendingDataReplicationMode: [, smithy_client_1.expectString, `pendingDataReplicationMode`],
685
- PendingEngineVersion: [, smithy_client_1.expectString, `pendingEngineVersion`],
686
- PendingHostInstanceType: [, smithy_client_1.expectString, `pendingHostInstanceType`],
687
- PendingLdapServerMetadata: [, (_) => de_LdapServerMetadataOutput(_, context), `pendingLdapServerMetadata`],
688
- PendingSecurityGroups: [, smithy_client_1._json, `pendingSecurityGroups`],
689
- PubliclyAccessible: [, smithy_client_1.expectBoolean, `publiclyAccessible`],
690
- SecurityGroups: [, smithy_client_1._json, `securityGroups`],
691
- StorageType: [, smithy_client_1.expectString, `storageType`],
692
- SubnetIds: [, smithy_client_1._json, `subnetIds`],
693
- Tags: [, smithy_client_1._json, `tags`],
694
- Users: [, (_) => de___listOfUserSummary(_, context), `users`],
695
- });
696
- Object.assign(contents, doc);
697
- return contents;
698
- };
699
- exports.de_DescribeBrokerCommand = de_DescribeBrokerCommand;
700
- const de_DescribeBrokerCommandError = async (output, context) => {
701
- const parsedOutput = {
702
- ...output,
703
- body: await parseErrorBody(output.body, context),
704
- };
705
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
706
- switch (errorCode) {
707
- case "BadRequestException":
708
- case "com.amazonaws.mq#BadRequestException":
709
- throw await de_BadRequestExceptionRes(parsedOutput, context);
710
- case "ForbiddenException":
711
- case "com.amazonaws.mq#ForbiddenException":
712
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
713
- case "InternalServerErrorException":
714
- case "com.amazonaws.mq#InternalServerErrorException":
715
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
716
- case "NotFoundException":
717
- case "com.amazonaws.mq#NotFoundException":
718
- throw await de_NotFoundExceptionRes(parsedOutput, context);
719
- default:
720
- const parsedBody = parsedOutput.body;
721
- return throwDefaultError({
722
- output,
723
- parsedBody,
724
- errorCode,
725
- });
726
- }
727
- };
728
- const de_DescribeBrokerEngineTypesCommand = async (output, context) => {
729
- if (output.statusCode !== 200 && output.statusCode >= 300) {
730
- return de_DescribeBrokerEngineTypesCommandError(output, context);
731
- }
732
- const contents = (0, smithy_client_1.map)({
733
- $metadata: deserializeMetadata(output),
734
- });
735
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
736
- const doc = (0, smithy_client_1.take)(data, {
737
- BrokerEngineTypes: [, (_) => de___listOfBrokerEngineType(_, context), `brokerEngineTypes`],
738
- MaxResults: [, smithy_client_1.expectInt32, `maxResults`],
739
- NextToken: [, smithy_client_1.expectString, `nextToken`],
740
- });
741
- Object.assign(contents, doc);
742
- return contents;
743
- };
744
- exports.de_DescribeBrokerEngineTypesCommand = de_DescribeBrokerEngineTypesCommand;
745
- const de_DescribeBrokerEngineTypesCommandError = async (output, context) => {
746
- const parsedOutput = {
747
- ...output,
748
- body: await parseErrorBody(output.body, context),
749
- };
750
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
751
- switch (errorCode) {
752
- case "BadRequestException":
753
- case "com.amazonaws.mq#BadRequestException":
754
- throw await de_BadRequestExceptionRes(parsedOutput, context);
755
- case "ForbiddenException":
756
- case "com.amazonaws.mq#ForbiddenException":
757
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
758
- case "InternalServerErrorException":
759
- case "com.amazonaws.mq#InternalServerErrorException":
760
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
761
- default:
762
- const parsedBody = parsedOutput.body;
763
- return throwDefaultError({
764
- output,
765
- parsedBody,
766
- errorCode,
767
- });
768
- }
769
- };
770
- const de_DescribeBrokerInstanceOptionsCommand = async (output, context) => {
771
- if (output.statusCode !== 200 && output.statusCode >= 300) {
772
- return de_DescribeBrokerInstanceOptionsCommandError(output, context);
773
- }
774
- const contents = (0, smithy_client_1.map)({
775
- $metadata: deserializeMetadata(output),
776
- });
777
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
778
- const doc = (0, smithy_client_1.take)(data, {
779
- BrokerInstanceOptions: [, (_) => de___listOfBrokerInstanceOption(_, context), `brokerInstanceOptions`],
780
- MaxResults: [, smithy_client_1.expectInt32, `maxResults`],
781
- NextToken: [, smithy_client_1.expectString, `nextToken`],
782
- });
783
- Object.assign(contents, doc);
784
- return contents;
785
- };
786
- exports.de_DescribeBrokerInstanceOptionsCommand = de_DescribeBrokerInstanceOptionsCommand;
787
- const de_DescribeBrokerInstanceOptionsCommandError = async (output, context) => {
788
- const parsedOutput = {
789
- ...output,
790
- body: await parseErrorBody(output.body, context),
791
- };
792
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
793
- switch (errorCode) {
794
- case "BadRequestException":
795
- case "com.amazonaws.mq#BadRequestException":
796
- throw await de_BadRequestExceptionRes(parsedOutput, context);
797
- case "ForbiddenException":
798
- case "com.amazonaws.mq#ForbiddenException":
799
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
800
- case "InternalServerErrorException":
801
- case "com.amazonaws.mq#InternalServerErrorException":
802
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
803
- default:
804
- const parsedBody = parsedOutput.body;
805
- return throwDefaultError({
806
- output,
807
- parsedBody,
808
- errorCode,
809
- });
810
- }
811
- };
812
- const de_DescribeConfigurationCommand = async (output, context) => {
813
- if (output.statusCode !== 200 && output.statusCode >= 300) {
814
- return de_DescribeConfigurationCommandError(output, context);
815
- }
816
- const contents = (0, smithy_client_1.map)({
817
- $metadata: deserializeMetadata(output),
818
- });
819
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
820
- const doc = (0, smithy_client_1.take)(data, {
821
- Arn: [, smithy_client_1.expectString, `arn`],
822
- AuthenticationStrategy: [, smithy_client_1.expectString, `authenticationStrategy`],
823
- Created: [, (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)), `created`],
824
- Description: [, smithy_client_1.expectString, `description`],
825
- EngineType: [, smithy_client_1.expectString, `engineType`],
826
- EngineVersion: [, smithy_client_1.expectString, `engineVersion`],
827
- Id: [, smithy_client_1.expectString, `id`],
828
- LatestRevision: [, (_) => de_ConfigurationRevision(_, context), `latestRevision`],
829
- Name: [, smithy_client_1.expectString, `name`],
830
- Tags: [, smithy_client_1._json, `tags`],
831
- });
832
- Object.assign(contents, doc);
833
- return contents;
834
- };
835
- exports.de_DescribeConfigurationCommand = de_DescribeConfigurationCommand;
836
- const de_DescribeConfigurationCommandError = async (output, context) => {
837
- const parsedOutput = {
838
- ...output,
839
- body: await parseErrorBody(output.body, context),
840
- };
841
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
842
- switch (errorCode) {
843
- case "BadRequestException":
844
- case "com.amazonaws.mq#BadRequestException":
845
- throw await de_BadRequestExceptionRes(parsedOutput, context);
846
- case "ForbiddenException":
847
- case "com.amazonaws.mq#ForbiddenException":
848
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
849
- case "InternalServerErrorException":
850
- case "com.amazonaws.mq#InternalServerErrorException":
851
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
852
- case "NotFoundException":
853
- case "com.amazonaws.mq#NotFoundException":
854
- throw await de_NotFoundExceptionRes(parsedOutput, context);
855
- default:
856
- const parsedBody = parsedOutput.body;
857
- return throwDefaultError({
858
- output,
859
- parsedBody,
860
- errorCode,
861
- });
862
- }
863
- };
864
- const de_DescribeConfigurationRevisionCommand = async (output, context) => {
865
- if (output.statusCode !== 200 && output.statusCode >= 300) {
866
- return de_DescribeConfigurationRevisionCommandError(output, context);
867
- }
868
- const contents = (0, smithy_client_1.map)({
869
- $metadata: deserializeMetadata(output),
870
- });
871
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
872
- const doc = (0, smithy_client_1.take)(data, {
873
- ConfigurationId: [, smithy_client_1.expectString, `configurationId`],
874
- Created: [, (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)), `created`],
875
- Data: [, smithy_client_1.expectString, `data`],
876
- Description: [, smithy_client_1.expectString, `description`],
877
- });
878
- Object.assign(contents, doc);
879
- return contents;
880
- };
881
- exports.de_DescribeConfigurationRevisionCommand = de_DescribeConfigurationRevisionCommand;
882
- const de_DescribeConfigurationRevisionCommandError = async (output, context) => {
883
- const parsedOutput = {
884
- ...output,
885
- body: await parseErrorBody(output.body, context),
886
- };
887
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
888
- switch (errorCode) {
889
- case "BadRequestException":
890
- case "com.amazonaws.mq#BadRequestException":
891
- throw await de_BadRequestExceptionRes(parsedOutput, context);
892
- case "ForbiddenException":
893
- case "com.amazonaws.mq#ForbiddenException":
894
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
895
- case "InternalServerErrorException":
896
- case "com.amazonaws.mq#InternalServerErrorException":
897
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
898
- case "NotFoundException":
899
- case "com.amazonaws.mq#NotFoundException":
900
- throw await de_NotFoundExceptionRes(parsedOutput, context);
901
- default:
902
- const parsedBody = parsedOutput.body;
903
- return throwDefaultError({
904
- output,
905
- parsedBody,
906
- errorCode,
907
- });
908
- }
909
- };
910
- const de_DescribeUserCommand = async (output, context) => {
911
- if (output.statusCode !== 200 && output.statusCode >= 300) {
912
- return de_DescribeUserCommandError(output, context);
913
- }
914
- const contents = (0, smithy_client_1.map)({
915
- $metadata: deserializeMetadata(output),
916
- });
917
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
918
- const doc = (0, smithy_client_1.take)(data, {
919
- BrokerId: [, smithy_client_1.expectString, `brokerId`],
920
- ConsoleAccess: [, smithy_client_1.expectBoolean, `consoleAccess`],
921
- Groups: [, smithy_client_1._json, `groups`],
922
- Pending: [, (_) => de_UserPendingChanges(_, context), `pending`],
923
- ReplicationUser: [, smithy_client_1.expectBoolean, `replicationUser`],
924
- Username: [, smithy_client_1.expectString, `username`],
925
- });
926
- Object.assign(contents, doc);
927
- return contents;
928
- };
929
- exports.de_DescribeUserCommand = de_DescribeUserCommand;
930
- const de_DescribeUserCommandError = async (output, context) => {
931
- const parsedOutput = {
932
- ...output,
933
- body: await parseErrorBody(output.body, context),
934
- };
935
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
936
- switch (errorCode) {
937
- case "BadRequestException":
938
- case "com.amazonaws.mq#BadRequestException":
939
- throw await de_BadRequestExceptionRes(parsedOutput, context);
940
- case "ForbiddenException":
941
- case "com.amazonaws.mq#ForbiddenException":
942
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
943
- case "InternalServerErrorException":
944
- case "com.amazonaws.mq#InternalServerErrorException":
945
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
946
- case "NotFoundException":
947
- case "com.amazonaws.mq#NotFoundException":
948
- throw await de_NotFoundExceptionRes(parsedOutput, context);
949
- default:
950
- const parsedBody = parsedOutput.body;
951
- return throwDefaultError({
952
- output,
953
- parsedBody,
954
- errorCode,
955
- });
956
- }
957
- };
958
- const de_ListBrokersCommand = async (output, context) => {
959
- if (output.statusCode !== 200 && output.statusCode >= 300) {
960
- return de_ListBrokersCommandError(output, context);
961
- }
962
- const contents = (0, smithy_client_1.map)({
963
- $metadata: deserializeMetadata(output),
964
- });
965
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
966
- const doc = (0, smithy_client_1.take)(data, {
967
- BrokerSummaries: [, (_) => de___listOfBrokerSummary(_, context), `brokerSummaries`],
968
- NextToken: [, smithy_client_1.expectString, `nextToken`],
969
- });
970
- Object.assign(contents, doc);
971
- return contents;
972
- };
973
- exports.de_ListBrokersCommand = de_ListBrokersCommand;
974
- const de_ListBrokersCommandError = async (output, context) => {
975
- const parsedOutput = {
976
- ...output,
977
- body: await parseErrorBody(output.body, context),
978
- };
979
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
980
- switch (errorCode) {
981
- case "BadRequestException":
982
- case "com.amazonaws.mq#BadRequestException":
983
- throw await de_BadRequestExceptionRes(parsedOutput, context);
984
- case "ForbiddenException":
985
- case "com.amazonaws.mq#ForbiddenException":
986
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
987
- case "InternalServerErrorException":
988
- case "com.amazonaws.mq#InternalServerErrorException":
989
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
990
- default:
991
- const parsedBody = parsedOutput.body;
992
- return throwDefaultError({
993
- output,
994
- parsedBody,
995
- errorCode,
996
- });
997
- }
998
- };
999
- const de_ListConfigurationRevisionsCommand = async (output, context) => {
1000
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1001
- return de_ListConfigurationRevisionsCommandError(output, context);
1002
- }
1003
- const contents = (0, smithy_client_1.map)({
1004
- $metadata: deserializeMetadata(output),
1005
- });
1006
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1007
- const doc = (0, smithy_client_1.take)(data, {
1008
- ConfigurationId: [, smithy_client_1.expectString, `configurationId`],
1009
- MaxResults: [, smithy_client_1.expectInt32, `maxResults`],
1010
- NextToken: [, smithy_client_1.expectString, `nextToken`],
1011
- Revisions: [, (_) => de___listOfConfigurationRevision(_, context), `revisions`],
1012
- });
1013
- Object.assign(contents, doc);
1014
- return contents;
1015
- };
1016
- exports.de_ListConfigurationRevisionsCommand = de_ListConfigurationRevisionsCommand;
1017
- const de_ListConfigurationRevisionsCommandError = async (output, context) => {
1018
- const parsedOutput = {
1019
- ...output,
1020
- body: await parseErrorBody(output.body, context),
1021
- };
1022
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1023
- switch (errorCode) {
1024
- case "BadRequestException":
1025
- case "com.amazonaws.mq#BadRequestException":
1026
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1027
- case "ForbiddenException":
1028
- case "com.amazonaws.mq#ForbiddenException":
1029
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1030
- case "InternalServerErrorException":
1031
- case "com.amazonaws.mq#InternalServerErrorException":
1032
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1033
- case "NotFoundException":
1034
- case "com.amazonaws.mq#NotFoundException":
1035
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1036
- default:
1037
- const parsedBody = parsedOutput.body;
1038
- return throwDefaultError({
1039
- output,
1040
- parsedBody,
1041
- errorCode,
1042
- });
1043
- }
1044
- };
1045
- const de_ListConfigurationsCommand = async (output, context) => {
1046
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1047
- return de_ListConfigurationsCommandError(output, context);
1048
- }
1049
- const contents = (0, smithy_client_1.map)({
1050
- $metadata: deserializeMetadata(output),
1051
- });
1052
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1053
- const doc = (0, smithy_client_1.take)(data, {
1054
- Configurations: [, (_) => de___listOfConfiguration(_, context), `configurations`],
1055
- MaxResults: [, smithy_client_1.expectInt32, `maxResults`],
1056
- NextToken: [, smithy_client_1.expectString, `nextToken`],
1057
- });
1058
- Object.assign(contents, doc);
1059
- return contents;
1060
- };
1061
- exports.de_ListConfigurationsCommand = de_ListConfigurationsCommand;
1062
- const de_ListConfigurationsCommandError = async (output, context) => {
1063
- const parsedOutput = {
1064
- ...output,
1065
- body: await parseErrorBody(output.body, context),
1066
- };
1067
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1068
- switch (errorCode) {
1069
- case "BadRequestException":
1070
- case "com.amazonaws.mq#BadRequestException":
1071
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1072
- case "ForbiddenException":
1073
- case "com.amazonaws.mq#ForbiddenException":
1074
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1075
- case "InternalServerErrorException":
1076
- case "com.amazonaws.mq#InternalServerErrorException":
1077
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1078
- default:
1079
- const parsedBody = parsedOutput.body;
1080
- return throwDefaultError({
1081
- output,
1082
- parsedBody,
1083
- errorCode,
1084
- });
1085
- }
1086
- };
1087
- const de_ListTagsCommand = async (output, context) => {
1088
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1089
- return de_ListTagsCommandError(output, context);
1090
- }
1091
- const contents = (0, smithy_client_1.map)({
1092
- $metadata: deserializeMetadata(output),
1093
- });
1094
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1095
- const doc = (0, smithy_client_1.take)(data, {
1096
- Tags: [, smithy_client_1._json, `tags`],
1097
- });
1098
- Object.assign(contents, doc);
1099
- return contents;
1100
- };
1101
- exports.de_ListTagsCommand = de_ListTagsCommand;
1102
- const de_ListTagsCommandError = async (output, context) => {
1103
- const parsedOutput = {
1104
- ...output,
1105
- body: await parseErrorBody(output.body, context),
1106
- };
1107
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1108
- switch (errorCode) {
1109
- case "BadRequestException":
1110
- case "com.amazonaws.mq#BadRequestException":
1111
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1112
- case "ForbiddenException":
1113
- case "com.amazonaws.mq#ForbiddenException":
1114
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1115
- case "InternalServerErrorException":
1116
- case "com.amazonaws.mq#InternalServerErrorException":
1117
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1118
- case "NotFoundException":
1119
- case "com.amazonaws.mq#NotFoundException":
1120
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1121
- default:
1122
- const parsedBody = parsedOutput.body;
1123
- return throwDefaultError({
1124
- output,
1125
- parsedBody,
1126
- errorCode,
1127
- });
1128
- }
1129
- };
1130
- const de_ListUsersCommand = async (output, context) => {
1131
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1132
- return de_ListUsersCommandError(output, context);
1133
- }
1134
- const contents = (0, smithy_client_1.map)({
1135
- $metadata: deserializeMetadata(output),
1136
- });
1137
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1138
- const doc = (0, smithy_client_1.take)(data, {
1139
- BrokerId: [, smithy_client_1.expectString, `brokerId`],
1140
- MaxResults: [, smithy_client_1.expectInt32, `maxResults`],
1141
- NextToken: [, smithy_client_1.expectString, `nextToken`],
1142
- Users: [, (_) => de___listOfUserSummary(_, context), `users`],
1143
- });
1144
- Object.assign(contents, doc);
1145
- return contents;
1146
- };
1147
- exports.de_ListUsersCommand = de_ListUsersCommand;
1148
- const de_ListUsersCommandError = async (output, context) => {
1149
- const parsedOutput = {
1150
- ...output,
1151
- body: await parseErrorBody(output.body, context),
1152
- };
1153
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1154
- switch (errorCode) {
1155
- case "BadRequestException":
1156
- case "com.amazonaws.mq#BadRequestException":
1157
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1158
- case "ForbiddenException":
1159
- case "com.amazonaws.mq#ForbiddenException":
1160
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1161
- case "InternalServerErrorException":
1162
- case "com.amazonaws.mq#InternalServerErrorException":
1163
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1164
- case "NotFoundException":
1165
- case "com.amazonaws.mq#NotFoundException":
1166
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1167
- default:
1168
- const parsedBody = parsedOutput.body;
1169
- return throwDefaultError({
1170
- output,
1171
- parsedBody,
1172
- errorCode,
1173
- });
1174
- }
1175
- };
1176
- const de_PromoteCommand = async (output, context) => {
1177
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1178
- return de_PromoteCommandError(output, context);
1179
- }
1180
- const contents = (0, smithy_client_1.map)({
1181
- $metadata: deserializeMetadata(output),
1182
- });
1183
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1184
- const doc = (0, smithy_client_1.take)(data, {
1185
- BrokerId: [, smithy_client_1.expectString, `brokerId`],
1186
- });
1187
- Object.assign(contents, doc);
1188
- return contents;
1189
- };
1190
- exports.de_PromoteCommand = de_PromoteCommand;
1191
- const de_PromoteCommandError = async (output, context) => {
1192
- const parsedOutput = {
1193
- ...output,
1194
- body: await parseErrorBody(output.body, context),
1195
- };
1196
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1197
- switch (errorCode) {
1198
- case "BadRequestException":
1199
- case "com.amazonaws.mq#BadRequestException":
1200
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1201
- case "ForbiddenException":
1202
- case "com.amazonaws.mq#ForbiddenException":
1203
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1204
- case "InternalServerErrorException":
1205
- case "com.amazonaws.mq#InternalServerErrorException":
1206
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1207
- case "NotFoundException":
1208
- case "com.amazonaws.mq#NotFoundException":
1209
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1210
- default:
1211
- const parsedBody = parsedOutput.body;
1212
- return throwDefaultError({
1213
- output,
1214
- parsedBody,
1215
- errorCode,
1216
- });
1217
- }
1218
- };
1219
- const de_RebootBrokerCommand = async (output, context) => {
1220
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1221
- return de_RebootBrokerCommandError(output, context);
1222
- }
1223
- const contents = (0, smithy_client_1.map)({
1224
- $metadata: deserializeMetadata(output),
1225
- });
1226
- await (0, smithy_client_1.collectBody)(output.body, context);
1227
- return contents;
1228
- };
1229
- exports.de_RebootBrokerCommand = de_RebootBrokerCommand;
1230
- const de_RebootBrokerCommandError = async (output, context) => {
1231
- const parsedOutput = {
1232
- ...output,
1233
- body: await parseErrorBody(output.body, context),
1234
- };
1235
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1236
- switch (errorCode) {
1237
- case "BadRequestException":
1238
- case "com.amazonaws.mq#BadRequestException":
1239
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1240
- case "ForbiddenException":
1241
- case "com.amazonaws.mq#ForbiddenException":
1242
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1243
- case "InternalServerErrorException":
1244
- case "com.amazonaws.mq#InternalServerErrorException":
1245
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1246
- case "NotFoundException":
1247
- case "com.amazonaws.mq#NotFoundException":
1248
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1249
- default:
1250
- const parsedBody = parsedOutput.body;
1251
- return throwDefaultError({
1252
- output,
1253
- parsedBody,
1254
- errorCode,
1255
- });
1256
- }
1257
- };
1258
- const de_UpdateBrokerCommand = async (output, context) => {
1259
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1260
- return de_UpdateBrokerCommandError(output, context);
1261
- }
1262
- const contents = (0, smithy_client_1.map)({
1263
- $metadata: deserializeMetadata(output),
1264
- });
1265
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1266
- const doc = (0, smithy_client_1.take)(data, {
1267
- AuthenticationStrategy: [, smithy_client_1.expectString, `authenticationStrategy`],
1268
- AutoMinorVersionUpgrade: [, smithy_client_1.expectBoolean, `autoMinorVersionUpgrade`],
1269
- BrokerId: [, smithy_client_1.expectString, `brokerId`],
1270
- Configuration: [, (_) => de_ConfigurationId(_, context), `configuration`],
1271
- DataReplicationMetadata: [, (_) => de_DataReplicationMetadataOutput(_, context), `dataReplicationMetadata`],
1272
- DataReplicationMode: [, smithy_client_1.expectString, `dataReplicationMode`],
1273
- EngineVersion: [, smithy_client_1.expectString, `engineVersion`],
1274
- HostInstanceType: [, smithy_client_1.expectString, `hostInstanceType`],
1275
- LdapServerMetadata: [, (_) => de_LdapServerMetadataOutput(_, context), `ldapServerMetadata`],
1276
- Logs: [, (_) => de_Logs(_, context), `logs`],
1277
- MaintenanceWindowStartTime: [, (_) => de_WeeklyStartTime(_, context), `maintenanceWindowStartTime`],
1278
- PendingDataReplicationMetadata: [
1279
- ,
1280
- (_) => de_DataReplicationMetadataOutput(_, context),
1281
- `pendingDataReplicationMetadata`,
1282
- ],
1283
- PendingDataReplicationMode: [, smithy_client_1.expectString, `pendingDataReplicationMode`],
1284
- SecurityGroups: [, smithy_client_1._json, `securityGroups`],
1285
- });
1286
- Object.assign(contents, doc);
1287
- return contents;
1288
- };
1289
- exports.de_UpdateBrokerCommand = de_UpdateBrokerCommand;
1290
- const de_UpdateBrokerCommandError = async (output, context) => {
1291
- const parsedOutput = {
1292
- ...output,
1293
- body: await parseErrorBody(output.body, context),
1294
- };
1295
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1296
- switch (errorCode) {
1297
- case "BadRequestException":
1298
- case "com.amazonaws.mq#BadRequestException":
1299
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1300
- case "ConflictException":
1301
- case "com.amazonaws.mq#ConflictException":
1302
- throw await de_ConflictExceptionRes(parsedOutput, context);
1303
- case "ForbiddenException":
1304
- case "com.amazonaws.mq#ForbiddenException":
1305
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1306
- case "InternalServerErrorException":
1307
- case "com.amazonaws.mq#InternalServerErrorException":
1308
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1309
- case "NotFoundException":
1310
- case "com.amazonaws.mq#NotFoundException":
1311
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1312
- default:
1313
- const parsedBody = parsedOutput.body;
1314
- return throwDefaultError({
1315
- output,
1316
- parsedBody,
1317
- errorCode,
1318
- });
1319
- }
1320
- };
1321
- const de_UpdateConfigurationCommand = async (output, context) => {
1322
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1323
- return de_UpdateConfigurationCommandError(output, context);
1324
- }
1325
- const contents = (0, smithy_client_1.map)({
1326
- $metadata: deserializeMetadata(output),
1327
- });
1328
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1329
- const doc = (0, smithy_client_1.take)(data, {
1330
- Arn: [, smithy_client_1.expectString, `arn`],
1331
- Created: [, (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)), `created`],
1332
- Id: [, smithy_client_1.expectString, `id`],
1333
- LatestRevision: [, (_) => de_ConfigurationRevision(_, context), `latestRevision`],
1334
- Name: [, smithy_client_1.expectString, `name`],
1335
- Warnings: [, (_) => de___listOfSanitizationWarning(_, context), `warnings`],
1336
- });
1337
- Object.assign(contents, doc);
1338
- return contents;
1339
- };
1340
- exports.de_UpdateConfigurationCommand = de_UpdateConfigurationCommand;
1341
- const de_UpdateConfigurationCommandError = async (output, context) => {
1342
- const parsedOutput = {
1343
- ...output,
1344
- body: await parseErrorBody(output.body, context),
1345
- };
1346
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1347
- switch (errorCode) {
1348
- case "BadRequestException":
1349
- case "com.amazonaws.mq#BadRequestException":
1350
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1351
- case "ConflictException":
1352
- case "com.amazonaws.mq#ConflictException":
1353
- throw await de_ConflictExceptionRes(parsedOutput, context);
1354
- case "ForbiddenException":
1355
- case "com.amazonaws.mq#ForbiddenException":
1356
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1357
- case "InternalServerErrorException":
1358
- case "com.amazonaws.mq#InternalServerErrorException":
1359
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1360
- case "NotFoundException":
1361
- case "com.amazonaws.mq#NotFoundException":
1362
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1363
- default:
1364
- const parsedBody = parsedOutput.body;
1365
- return throwDefaultError({
1366
- output,
1367
- parsedBody,
1368
- errorCode,
1369
- });
1370
- }
1371
- };
1372
- const de_UpdateUserCommand = async (output, context) => {
1373
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1374
- return de_UpdateUserCommandError(output, context);
1375
- }
1376
- const contents = (0, smithy_client_1.map)({
1377
- $metadata: deserializeMetadata(output),
1378
- });
1379
- await (0, smithy_client_1.collectBody)(output.body, context);
1380
- return contents;
1381
- };
1382
- exports.de_UpdateUserCommand = de_UpdateUserCommand;
1383
- const de_UpdateUserCommandError = async (output, context) => {
1384
- const parsedOutput = {
1385
- ...output,
1386
- body: await parseErrorBody(output.body, context),
1387
- };
1388
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1389
- switch (errorCode) {
1390
- case "BadRequestException":
1391
- case "com.amazonaws.mq#BadRequestException":
1392
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1393
- case "ConflictException":
1394
- case "com.amazonaws.mq#ConflictException":
1395
- throw await de_ConflictExceptionRes(parsedOutput, context);
1396
- case "ForbiddenException":
1397
- case "com.amazonaws.mq#ForbiddenException":
1398
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1399
- case "InternalServerErrorException":
1400
- case "com.amazonaws.mq#InternalServerErrorException":
1401
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1402
- case "NotFoundException":
1403
- case "com.amazonaws.mq#NotFoundException":
1404
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1405
- default:
1406
- const parsedBody = parsedOutput.body;
1407
- return throwDefaultError({
1408
- output,
1409
- parsedBody,
1410
- errorCode,
1411
- });
1412
- }
1413
- };
1414
- const throwDefaultError = (0, smithy_client_1.withBaseException)(MqServiceException_1.MqServiceException);
1415
- const de_BadRequestExceptionRes = async (parsedOutput, context) => {
1416
- const contents = (0, smithy_client_1.map)({});
1417
- const data = parsedOutput.body;
1418
- const doc = (0, smithy_client_1.take)(data, {
1419
- ErrorAttribute: [, smithy_client_1.expectString, `errorAttribute`],
1420
- Message: [, smithy_client_1.expectString, `message`],
1421
- });
1422
- Object.assign(contents, doc);
1423
- const exception = new models_0_1.BadRequestException({
1424
- $metadata: deserializeMetadata(parsedOutput),
1425
- ...contents,
1426
- });
1427
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1428
- };
1429
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
1430
- const contents = (0, smithy_client_1.map)({});
1431
- const data = parsedOutput.body;
1432
- const doc = (0, smithy_client_1.take)(data, {
1433
- ErrorAttribute: [, smithy_client_1.expectString, `errorAttribute`],
1434
- Message: [, smithy_client_1.expectString, `message`],
1435
- });
1436
- Object.assign(contents, doc);
1437
- const exception = new models_0_1.ConflictException({
1438
- $metadata: deserializeMetadata(parsedOutput),
1439
- ...contents,
1440
- });
1441
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1442
- };
1443
- const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
1444
- const contents = (0, smithy_client_1.map)({});
1445
- const data = parsedOutput.body;
1446
- const doc = (0, smithy_client_1.take)(data, {
1447
- ErrorAttribute: [, smithy_client_1.expectString, `errorAttribute`],
1448
- Message: [, smithy_client_1.expectString, `message`],
1449
- });
1450
- Object.assign(contents, doc);
1451
- const exception = new models_0_1.ForbiddenException({
1452
- $metadata: deserializeMetadata(parsedOutput),
1453
- ...contents,
1454
- });
1455
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1456
- };
1457
- const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
1458
- const contents = (0, smithy_client_1.map)({});
1459
- const data = parsedOutput.body;
1460
- const doc = (0, smithy_client_1.take)(data, {
1461
- ErrorAttribute: [, smithy_client_1.expectString, `errorAttribute`],
1462
- Message: [, smithy_client_1.expectString, `message`],
1463
- });
1464
- Object.assign(contents, doc);
1465
- const exception = new models_0_1.InternalServerErrorException({
1466
- $metadata: deserializeMetadata(parsedOutput),
1467
- ...contents,
1468
- });
1469
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1470
- };
1471
- const de_NotFoundExceptionRes = async (parsedOutput, context) => {
1472
- const contents = (0, smithy_client_1.map)({});
1473
- const data = parsedOutput.body;
1474
- const doc = (0, smithy_client_1.take)(data, {
1475
- ErrorAttribute: [, smithy_client_1.expectString, `errorAttribute`],
1476
- Message: [, smithy_client_1.expectString, `message`],
1477
- });
1478
- Object.assign(contents, doc);
1479
- const exception = new models_0_1.NotFoundException({
1480
- $metadata: deserializeMetadata(parsedOutput),
1481
- ...contents,
1482
- });
1483
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1484
- };
1485
- const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
1486
- const contents = (0, smithy_client_1.map)({});
1487
- const data = parsedOutput.body;
1488
- const doc = (0, smithy_client_1.take)(data, {
1489
- ErrorAttribute: [, smithy_client_1.expectString, `errorAttribute`],
1490
- Message: [, smithy_client_1.expectString, `message`],
1491
- });
1492
- Object.assign(contents, doc);
1493
- const exception = new models_0_1.UnauthorizedException({
1494
- $metadata: deserializeMetadata(parsedOutput),
1495
- ...contents,
1496
- });
1497
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1498
- };
1499
- const se___listOfUser = (input, context) => {
1500
- return input
1501
- .filter((e) => e != null)
1502
- .map((entry) => {
1503
- return se_User(entry, context);
1504
- });
1505
- };
1506
- const se_ConfigurationId = (input, context) => {
1507
- return (0, smithy_client_1.take)(input, {
1508
- id: [, , `Id`],
1509
- revision: [, , `Revision`],
1510
- });
1511
- };
1512
- const se_EncryptionOptions = (input, context) => {
1513
- return (0, smithy_client_1.take)(input, {
1514
- kmsKeyId: [, , `KmsKeyId`],
1515
- useAwsOwnedKey: [, , `UseAwsOwnedKey`],
1516
- });
1517
- };
1518
- const se_LdapServerMetadataInput = (input, context) => {
1519
- return (0, smithy_client_1.take)(input, {
1520
- hosts: [, smithy_client_1._json, `Hosts`],
1521
- roleBase: [, , `RoleBase`],
1522
- roleName: [, , `RoleName`],
1523
- roleSearchMatching: [, , `RoleSearchMatching`],
1524
- roleSearchSubtree: [, , `RoleSearchSubtree`],
1525
- serviceAccountPassword: [, , `ServiceAccountPassword`],
1526
- serviceAccountUsername: [, , `ServiceAccountUsername`],
1527
- userBase: [, , `UserBase`],
1528
- userRoleName: [, , `UserRoleName`],
1529
- userSearchMatching: [, , `UserSearchMatching`],
1530
- userSearchSubtree: [, , `UserSearchSubtree`],
1531
- });
1532
- };
1533
- const se_Logs = (input, context) => {
1534
- return (0, smithy_client_1.take)(input, {
1535
- audit: [, , `Audit`],
1536
- general: [, , `General`],
1537
- });
1538
- };
1539
- const se_User = (input, context) => {
1540
- return (0, smithy_client_1.take)(input, {
1541
- consoleAccess: [, , `ConsoleAccess`],
1542
- groups: [, smithy_client_1._json, `Groups`],
1543
- password: [, , `Password`],
1544
- replicationUser: [, , `ReplicationUser`],
1545
- username: [, , `Username`],
1546
- });
1547
- };
1548
- const se_WeeklyStartTime = (input, context) => {
1549
- return (0, smithy_client_1.take)(input, {
1550
- dayOfWeek: [, , `DayOfWeek`],
1551
- timeOfDay: [, , `TimeOfDay`],
1552
- timeZone: [, , `TimeZone`],
1553
- });
1554
- };
1555
- const de___listOfActionRequired = (output, context) => {
1556
- const retVal = (output || [])
1557
- .filter((e) => e != null)
1558
- .map((entry) => {
1559
- return de_ActionRequired(entry, context);
1560
- });
1561
- return retVal;
1562
- };
1563
- const de___listOfAvailabilityZone = (output, context) => {
1564
- const retVal = (output || [])
1565
- .filter((e) => e != null)
1566
- .map((entry) => {
1567
- return de_AvailabilityZone(entry, context);
1568
- });
1569
- return retVal;
1570
- };
1571
- const de___listOfBrokerEngineType = (output, context) => {
1572
- const retVal = (output || [])
1573
- .filter((e) => e != null)
1574
- .map((entry) => {
1575
- return de_BrokerEngineType(entry, context);
1576
- });
1577
- return retVal;
1578
- };
1579
- const de___listOfBrokerInstance = (output, context) => {
1580
- const retVal = (output || [])
1581
- .filter((e) => e != null)
1582
- .map((entry) => {
1583
- return de_BrokerInstance(entry, context);
1584
- });
1585
- return retVal;
1586
- };
1587
- const de___listOfBrokerInstanceOption = (output, context) => {
1588
- const retVal = (output || [])
1589
- .filter((e) => e != null)
1590
- .map((entry) => {
1591
- return de_BrokerInstanceOption(entry, context);
1592
- });
1593
- return retVal;
1594
- };
1595
- const de___listOfBrokerSummary = (output, context) => {
1596
- const retVal = (output || [])
1597
- .filter((e) => e != null)
1598
- .map((entry) => {
1599
- return de_BrokerSummary(entry, context);
1600
- });
1601
- return retVal;
1602
- };
1603
- const de___listOfConfiguration = (output, context) => {
1604
- const retVal = (output || [])
1605
- .filter((e) => e != null)
1606
- .map((entry) => {
1607
- return de_Configuration(entry, context);
1608
- });
1609
- return retVal;
1610
- };
1611
- const de___listOfConfigurationId = (output, context) => {
1612
- const retVal = (output || [])
1613
- .filter((e) => e != null)
1614
- .map((entry) => {
1615
- return de_ConfigurationId(entry, context);
1616
- });
1617
- return retVal;
1618
- };
1619
- const de___listOfConfigurationRevision = (output, context) => {
1620
- const retVal = (output || [])
1621
- .filter((e) => e != null)
1622
- .map((entry) => {
1623
- return de_ConfigurationRevision(entry, context);
1624
- });
1625
- return retVal;
1626
- };
1627
- const de___listOfEngineVersion = (output, context) => {
1628
- const retVal = (output || [])
1629
- .filter((e) => e != null)
1630
- .map((entry) => {
1631
- return de_EngineVersion(entry, context);
1632
- });
1633
- return retVal;
1634
- };
1635
- const de___listOfSanitizationWarning = (output, context) => {
1636
- const retVal = (output || [])
1637
- .filter((e) => e != null)
1638
- .map((entry) => {
1639
- return de_SanitizationWarning(entry, context);
1640
- });
1641
- return retVal;
1642
- };
1643
- const de___listOfUserSummary = (output, context) => {
1644
- const retVal = (output || [])
1645
- .filter((e) => e != null)
1646
- .map((entry) => {
1647
- return de_UserSummary(entry, context);
1648
- });
1649
- return retVal;
1650
- };
1651
- const de_ActionRequired = (output, context) => {
1652
- return (0, smithy_client_1.take)(output, {
1653
- ActionRequiredCode: [, smithy_client_1.expectString, `actionRequiredCode`],
1654
- ActionRequiredInfo: [, smithy_client_1.expectString, `actionRequiredInfo`],
1655
- });
1656
- };
1657
- const de_AvailabilityZone = (output, context) => {
1658
- return (0, smithy_client_1.take)(output, {
1659
- Name: [, smithy_client_1.expectString, `name`],
1660
- });
1661
- };
1662
- const de_BrokerEngineType = (output, context) => {
1663
- return (0, smithy_client_1.take)(output, {
1664
- EngineType: [, smithy_client_1.expectString, `engineType`],
1665
- EngineVersions: [, (_) => de___listOfEngineVersion(_, context), `engineVersions`],
1666
- });
1667
- };
1668
- const de_BrokerInstance = (output, context) => {
1669
- return (0, smithy_client_1.take)(output, {
1670
- ConsoleURL: [, smithy_client_1.expectString, `consoleURL`],
1671
- Endpoints: [, smithy_client_1._json, `endpoints`],
1672
- IpAddress: [, smithy_client_1.expectString, `ipAddress`],
1673
- });
1674
- };
1675
- const de_BrokerInstanceOption = (output, context) => {
1676
- return (0, smithy_client_1.take)(output, {
1677
- AvailabilityZones: [, (_) => de___listOfAvailabilityZone(_, context), `availabilityZones`],
1678
- EngineType: [, smithy_client_1.expectString, `engineType`],
1679
- HostInstanceType: [, smithy_client_1.expectString, `hostInstanceType`],
1680
- StorageType: [, smithy_client_1.expectString, `storageType`],
1681
- SupportedDeploymentModes: [, smithy_client_1._json, `supportedDeploymentModes`],
1682
- SupportedEngineVersions: [, smithy_client_1._json, `supportedEngineVersions`],
1683
- });
1684
- };
1685
- const de_BrokerSummary = (output, context) => {
1686
- return (0, smithy_client_1.take)(output, {
1687
- BrokerArn: [, smithy_client_1.expectString, `brokerArn`],
1688
- BrokerId: [, smithy_client_1.expectString, `brokerId`],
1689
- BrokerName: [, smithy_client_1.expectString, `brokerName`],
1690
- BrokerState: [, smithy_client_1.expectString, `brokerState`],
1691
- Created: [, (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)), `created`],
1692
- DeploymentMode: [, smithy_client_1.expectString, `deploymentMode`],
1693
- EngineType: [, smithy_client_1.expectString, `engineType`],
1694
- HostInstanceType: [, smithy_client_1.expectString, `hostInstanceType`],
1695
- });
1696
- };
1697
- const de_Configuration = (output, context) => {
1698
- return (0, smithy_client_1.take)(output, {
1699
- Arn: [, smithy_client_1.expectString, `arn`],
1700
- AuthenticationStrategy: [, smithy_client_1.expectString, `authenticationStrategy`],
1701
- Created: [, (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)), `created`],
1702
- Description: [, smithy_client_1.expectString, `description`],
1703
- EngineType: [, smithy_client_1.expectString, `engineType`],
1704
- EngineVersion: [, smithy_client_1.expectString, `engineVersion`],
1705
- Id: [, smithy_client_1.expectString, `id`],
1706
- LatestRevision: [, (_) => de_ConfigurationRevision(_, context), `latestRevision`],
1707
- Name: [, smithy_client_1.expectString, `name`],
1708
- Tags: [, smithy_client_1._json, `tags`],
1709
- });
1710
- };
1711
- const de_ConfigurationId = (output, context) => {
1712
- return (0, smithy_client_1.take)(output, {
1713
- Id: [, smithy_client_1.expectString, `id`],
1714
- Revision: [, smithy_client_1.expectInt32, `revision`],
1715
- });
1716
- };
1717
- const de_ConfigurationRevision = (output, context) => {
1718
- return (0, smithy_client_1.take)(output, {
1719
- Created: [, (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)), `created`],
1720
- Description: [, smithy_client_1.expectString, `description`],
1721
- Revision: [, smithy_client_1.expectInt32, `revision`],
1722
- });
1723
- };
1724
- const de_Configurations = (output, context) => {
1725
- return (0, smithy_client_1.take)(output, {
1726
- Current: [, (_) => de_ConfigurationId(_, context), `current`],
1727
- History: [, (_) => de___listOfConfigurationId(_, context), `history`],
1728
- Pending: [, (_) => de_ConfigurationId(_, context), `pending`],
1729
- });
1730
- };
1731
- const de_DataReplicationCounterpart = (output, context) => {
1732
- return (0, smithy_client_1.take)(output, {
1733
- BrokerId: [, smithy_client_1.expectString, `brokerId`],
1734
- Region: [, smithy_client_1.expectString, `region`],
1735
- });
1736
- };
1737
- const de_DataReplicationMetadataOutput = (output, context) => {
1738
- return (0, smithy_client_1.take)(output, {
1739
- DataReplicationCounterpart: [, (_) => de_DataReplicationCounterpart(_, context), `dataReplicationCounterpart`],
1740
- DataReplicationRole: [, smithy_client_1.expectString, `dataReplicationRole`],
1741
- });
1742
- };
1743
- const de_EncryptionOptions = (output, context) => {
1744
- return (0, smithy_client_1.take)(output, {
1745
- KmsKeyId: [, smithy_client_1.expectString, `kmsKeyId`],
1746
- UseAwsOwnedKey: [, smithy_client_1.expectBoolean, `useAwsOwnedKey`],
1747
- });
1748
- };
1749
- const de_EngineVersion = (output, context) => {
1750
- return (0, smithy_client_1.take)(output, {
1751
- Name: [, smithy_client_1.expectString, `name`],
1752
- });
1753
- };
1754
- const de_LdapServerMetadataOutput = (output, context) => {
1755
- return (0, smithy_client_1.take)(output, {
1756
- Hosts: [, smithy_client_1._json, `hosts`],
1757
- RoleBase: [, smithy_client_1.expectString, `roleBase`],
1758
- RoleName: [, smithy_client_1.expectString, `roleName`],
1759
- RoleSearchMatching: [, smithy_client_1.expectString, `roleSearchMatching`],
1760
- RoleSearchSubtree: [, smithy_client_1.expectBoolean, `roleSearchSubtree`],
1761
- ServiceAccountUsername: [, smithy_client_1.expectString, `serviceAccountUsername`],
1762
- UserBase: [, smithy_client_1.expectString, `userBase`],
1763
- UserRoleName: [, smithy_client_1.expectString, `userRoleName`],
1764
- UserSearchMatching: [, smithy_client_1.expectString, `userSearchMatching`],
1765
- UserSearchSubtree: [, smithy_client_1.expectBoolean, `userSearchSubtree`],
1766
- });
1767
- };
1768
- const de_Logs = (output, context) => {
1769
- return (0, smithy_client_1.take)(output, {
1770
- Audit: [, smithy_client_1.expectBoolean, `audit`],
1771
- General: [, smithy_client_1.expectBoolean, `general`],
1772
- });
1773
- };
1774
- const de_LogsSummary = (output, context) => {
1775
- return (0, smithy_client_1.take)(output, {
1776
- Audit: [, smithy_client_1.expectBoolean, `audit`],
1777
- AuditLogGroup: [, smithy_client_1.expectString, `auditLogGroup`],
1778
- General: [, smithy_client_1.expectBoolean, `general`],
1779
- GeneralLogGroup: [, smithy_client_1.expectString, `generalLogGroup`],
1780
- Pending: [, (_) => de_PendingLogs(_, context), `pending`],
1781
- });
1782
- };
1783
- const de_PendingLogs = (output, context) => {
1784
- return (0, smithy_client_1.take)(output, {
1785
- Audit: [, smithy_client_1.expectBoolean, `audit`],
1786
- General: [, smithy_client_1.expectBoolean, `general`],
1787
- });
1788
- };
1789
- const de_SanitizationWarning = (output, context) => {
1790
- return (0, smithy_client_1.take)(output, {
1791
- AttributeName: [, smithy_client_1.expectString, `attributeName`],
1792
- ElementName: [, smithy_client_1.expectString, `elementName`],
1793
- Reason: [, smithy_client_1.expectString, `reason`],
1794
- });
1795
- };
1796
- const de_UserPendingChanges = (output, context) => {
1797
- return (0, smithy_client_1.take)(output, {
1798
- ConsoleAccess: [, smithy_client_1.expectBoolean, `consoleAccess`],
1799
- Groups: [, smithy_client_1._json, `groups`],
1800
- PendingChange: [, smithy_client_1.expectString, `pendingChange`],
1801
- });
1802
- };
1803
- const de_UserSummary = (output, context) => {
1804
- return (0, smithy_client_1.take)(output, {
1805
- PendingChange: [, smithy_client_1.expectString, `pendingChange`],
1806
- Username: [, smithy_client_1.expectString, `username`],
1807
- });
1808
- };
1809
- const de_WeeklyStartTime = (output, context) => {
1810
- return (0, smithy_client_1.take)(output, {
1811
- DayOfWeek: [, smithy_client_1.expectString, `dayOfWeek`],
1812
- TimeOfDay: [, smithy_client_1.expectString, `timeOfDay`],
1813
- TimeZone: [, smithy_client_1.expectString, `timeZone`],
1814
- });
1815
- };
1816
- const deserializeMetadata = (output) => ({
1817
- httpStatusCode: output.statusCode,
1818
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1819
- extendedRequestId: output.headers["x-amz-id-2"],
1820
- cfId: output.headers["x-amz-cf-id"],
1821
- });
1822
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
1823
- const isSerializableHeaderValue = (value) => value !== undefined &&
1824
- value !== null &&
1825
- value !== "" &&
1826
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1827
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1828
- const _ET = "EngineType";
1829
- const _HIT = "HostInstanceType";
1830
- const _MR = "MaxResults";
1831
- const _NT = "NextToken";
1832
- const _ST = "StorageType";
1833
- const _TK = "TagKeys";
1834
- const _eT = "engineType";
1835
- const _hIT = "hostInstanceType";
1836
- const _mR = "maxResults";
1837
- const _nT = "nextToken";
1838
- const _sT = "storageType";
1839
- const _tK = "tagKeys";
1840
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1841
- if (encoded.length) {
1842
- return JSON.parse(encoded);
1843
- }
1844
- return {};
1845
- });
1846
- const parseErrorBody = async (errorBody, context) => {
1847
- const value = await parseBody(errorBody, context);
1848
- value.message = value.message ?? value.Message;
1849
- return value;
1850
- };
1851
- const loadRestJsonErrorCode = (output, data) => {
1852
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1853
- const sanitizeErrorCode = (rawValue) => {
1854
- let cleanValue = rawValue;
1855
- if (typeof cleanValue === "number") {
1856
- cleanValue = cleanValue.toString();
1857
- }
1858
- if (cleanValue.indexOf(",") >= 0) {
1859
- cleanValue = cleanValue.split(",")[0];
1860
- }
1861
- if (cleanValue.indexOf(":") >= 0) {
1862
- cleanValue = cleanValue.split(":")[0];
1863
- }
1864
- if (cleanValue.indexOf("#") >= 0) {
1865
- cleanValue = cleanValue.split("#")[1];
1866
- }
1867
- return cleanValue;
1868
- };
1869
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1870
- if (headerKey !== undefined) {
1871
- return sanitizeErrorCode(output.headers[headerKey]);
1872
- }
1873
- if (data.code !== undefined) {
1874
- return sanitizeErrorCode(data.code);
1875
- }
1876
- if (data["__type"] !== undefined) {
1877
- return sanitizeErrorCode(data["__type"]);
1878
- }
1879
- };
1
+ module.exports = require("../index.js");