@aws-sdk/client-route53-recovery-cluster 3.312.0 → 3.315.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.
@@ -8,28 +8,28 @@ const Route53RecoveryClusterServiceException_1 = require("../models/Route53Recov
8
8
  const se_GetRoutingControlStateCommand = async (input, context) => {
9
9
  const headers = sharedHeaders("GetRoutingControlState");
10
10
  let body;
11
- body = JSON.stringify(se_GetRoutingControlStateRequest(input, context));
11
+ body = JSON.stringify((0, smithy_client_1._json)(input));
12
12
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
13
  };
14
14
  exports.se_GetRoutingControlStateCommand = se_GetRoutingControlStateCommand;
15
15
  const se_ListRoutingControlsCommand = async (input, context) => {
16
16
  const headers = sharedHeaders("ListRoutingControls");
17
17
  let body;
18
- body = JSON.stringify(se_ListRoutingControlsRequest(input, context));
18
+ body = JSON.stringify((0, smithy_client_1._json)(input));
19
19
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
20
20
  };
21
21
  exports.se_ListRoutingControlsCommand = se_ListRoutingControlsCommand;
22
22
  const se_UpdateRoutingControlStateCommand = async (input, context) => {
23
23
  const headers = sharedHeaders("UpdateRoutingControlState");
24
24
  let body;
25
- body = JSON.stringify(se_UpdateRoutingControlStateRequest(input, context));
25
+ body = JSON.stringify((0, smithy_client_1._json)(input));
26
26
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
27
27
  };
28
28
  exports.se_UpdateRoutingControlStateCommand = se_UpdateRoutingControlStateCommand;
29
29
  const se_UpdateRoutingControlStatesCommand = async (input, context) => {
30
30
  const headers = sharedHeaders("UpdateRoutingControlStates");
31
31
  let body;
32
- body = JSON.stringify(se_UpdateRoutingControlStatesRequest(input, context));
32
+ body = JSON.stringify((0, smithy_client_1._json)(input));
33
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
34
34
  };
35
35
  exports.se_UpdateRoutingControlStatesCommand = se_UpdateRoutingControlStatesCommand;
@@ -39,12 +39,12 @@ const de_GetRoutingControlStateCommand = async (output, context) => {
39
39
  }
40
40
  const data = await parseBody(output.body, context);
41
41
  let contents = {};
42
- contents = de_GetRoutingControlStateResponse(data, context);
42
+ contents = (0, smithy_client_1._json)(data);
43
43
  const response = {
44
44
  $metadata: deserializeMetadata(output),
45
45
  ...contents,
46
46
  };
47
- return Promise.resolve(response);
47
+ return response;
48
48
  };
49
49
  exports.de_GetRoutingControlStateCommand = de_GetRoutingControlStateCommand;
50
50
  const de_GetRoutingControlStateCommandError = async (output, context) => {
@@ -74,10 +74,9 @@ const de_GetRoutingControlStateCommandError = async (output, context) => {
74
74
  throw await de_ValidationExceptionRes(parsedOutput, context);
75
75
  default:
76
76
  const parsedBody = parsedOutput.body;
77
- (0, smithy_client_1.throwDefaultError)({
77
+ return throwDefaultError({
78
78
  output,
79
79
  parsedBody,
80
- exceptionCtor: Route53RecoveryClusterServiceException_1.Route53RecoveryClusterServiceException,
81
80
  errorCode,
82
81
  });
83
82
  }
@@ -88,12 +87,12 @@ const de_ListRoutingControlsCommand = async (output, context) => {
88
87
  }
89
88
  const data = await parseBody(output.body, context);
90
89
  let contents = {};
91
- contents = de_ListRoutingControlsResponse(data, context);
90
+ contents = (0, smithy_client_1._json)(data);
92
91
  const response = {
93
92
  $metadata: deserializeMetadata(output),
94
93
  ...contents,
95
94
  };
96
- return Promise.resolve(response);
95
+ return response;
97
96
  };
98
97
  exports.de_ListRoutingControlsCommand = de_ListRoutingControlsCommand;
99
98
  const de_ListRoutingControlsCommandError = async (output, context) => {
@@ -123,10 +122,9 @@ const de_ListRoutingControlsCommandError = async (output, context) => {
123
122
  throw await de_ValidationExceptionRes(parsedOutput, context);
124
123
  default:
125
124
  const parsedBody = parsedOutput.body;
126
- (0, smithy_client_1.throwDefaultError)({
125
+ return throwDefaultError({
127
126
  output,
128
127
  parsedBody,
129
- exceptionCtor: Route53RecoveryClusterServiceException_1.Route53RecoveryClusterServiceException,
130
128
  errorCode,
131
129
  });
132
130
  }
@@ -137,12 +135,12 @@ const de_UpdateRoutingControlStateCommand = async (output, context) => {
137
135
  }
138
136
  const data = await parseBody(output.body, context);
139
137
  let contents = {};
140
- contents = de_UpdateRoutingControlStateResponse(data, context);
138
+ contents = (0, smithy_client_1._json)(data);
141
139
  const response = {
142
140
  $metadata: deserializeMetadata(output),
143
141
  ...contents,
144
142
  };
145
- return Promise.resolve(response);
143
+ return response;
146
144
  };
147
145
  exports.de_UpdateRoutingControlStateCommand = de_UpdateRoutingControlStateCommand;
148
146
  const de_UpdateRoutingControlStateCommandError = async (output, context) => {
@@ -175,10 +173,9 @@ const de_UpdateRoutingControlStateCommandError = async (output, context) => {
175
173
  throw await de_ValidationExceptionRes(parsedOutput, context);
176
174
  default:
177
175
  const parsedBody = parsedOutput.body;
178
- (0, smithy_client_1.throwDefaultError)({
176
+ return throwDefaultError({
179
177
  output,
180
178
  parsedBody,
181
- exceptionCtor: Route53RecoveryClusterServiceException_1.Route53RecoveryClusterServiceException,
182
179
  errorCode,
183
180
  });
184
181
  }
@@ -189,12 +186,12 @@ const de_UpdateRoutingControlStatesCommand = async (output, context) => {
189
186
  }
190
187
  const data = await parseBody(output.body, context);
191
188
  let contents = {};
192
- contents = de_UpdateRoutingControlStatesResponse(data, context);
189
+ contents = (0, smithy_client_1._json)(data);
193
190
  const response = {
194
191
  $metadata: deserializeMetadata(output),
195
192
  ...contents,
196
193
  };
197
- return Promise.resolve(response);
194
+ return response;
198
195
  };
199
196
  exports.de_UpdateRoutingControlStatesCommand = de_UpdateRoutingControlStatesCommand;
200
197
  const de_UpdateRoutingControlStatesCommandError = async (output, context) => {
@@ -230,17 +227,16 @@ const de_UpdateRoutingControlStatesCommandError = async (output, context) => {
230
227
  throw await de_ValidationExceptionRes(parsedOutput, context);
231
228
  default:
232
229
  const parsedBody = parsedOutput.body;
233
- (0, smithy_client_1.throwDefaultError)({
230
+ return throwDefaultError({
234
231
  output,
235
232
  parsedBody,
236
- exceptionCtor: Route53RecoveryClusterServiceException_1.Route53RecoveryClusterServiceException,
237
233
  errorCode,
238
234
  });
239
235
  }
240
236
  };
241
237
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
242
238
  const body = parsedOutput.body;
243
- const deserialized = de_AccessDeniedException(body, context);
239
+ const deserialized = (0, smithy_client_1._json)(body);
244
240
  const exception = new models_0_1.AccessDeniedException({
245
241
  $metadata: deserializeMetadata(parsedOutput),
246
242
  ...deserialized,
@@ -249,7 +245,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
249
245
  };
250
246
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
251
247
  const body = parsedOutput.body;
252
- const deserialized = de_ConflictException(body, context);
248
+ const deserialized = (0, smithy_client_1._json)(body);
253
249
  const exception = new models_0_1.ConflictException({
254
250
  $metadata: deserializeMetadata(parsedOutput),
255
251
  ...deserialized,
@@ -258,7 +254,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
258
254
  };
259
255
  const de_EndpointTemporarilyUnavailableExceptionRes = async (parsedOutput, context) => {
260
256
  const body = parsedOutput.body;
261
- const deserialized = de_EndpointTemporarilyUnavailableException(body, context);
257
+ const deserialized = (0, smithy_client_1._json)(body);
262
258
  const exception = new models_0_1.EndpointTemporarilyUnavailableException({
263
259
  $metadata: deserializeMetadata(parsedOutput),
264
260
  ...deserialized,
@@ -267,7 +263,7 @@ const de_EndpointTemporarilyUnavailableExceptionRes = async (parsedOutput, conte
267
263
  };
268
264
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
269
265
  const body = parsedOutput.body;
270
- const deserialized = de_InternalServerException(body, context);
266
+ const deserialized = (0, smithy_client_1._json)(body);
271
267
  const exception = new models_0_1.InternalServerException({
272
268
  $metadata: deserializeMetadata(parsedOutput),
273
269
  ...deserialized,
@@ -276,7 +272,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
276
272
  };
277
273
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
278
274
  const body = parsedOutput.body;
279
- const deserialized = de_ResourceNotFoundException(body, context);
275
+ const deserialized = (0, smithy_client_1._json)(body);
280
276
  const exception = new models_0_1.ResourceNotFoundException({
281
277
  $metadata: deserializeMetadata(parsedOutput),
282
278
  ...deserialized,
@@ -285,7 +281,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
285
281
  };
286
282
  const de_ServiceLimitExceededExceptionRes = async (parsedOutput, context) => {
287
283
  const body = parsedOutput.body;
288
- const deserialized = de_ServiceLimitExceededException(body, context);
284
+ const deserialized = (0, smithy_client_1._json)(body);
289
285
  const exception = new models_0_1.ServiceLimitExceededException({
290
286
  $metadata: deserializeMetadata(parsedOutput),
291
287
  ...deserialized,
@@ -294,7 +290,7 @@ const de_ServiceLimitExceededExceptionRes = async (parsedOutput, context) => {
294
290
  };
295
291
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
296
292
  const body = parsedOutput.body;
297
- const deserialized = de_ThrottlingException(body, context);
293
+ const deserialized = (0, smithy_client_1._json)(body);
298
294
  const exception = new models_0_1.ThrottlingException({
299
295
  $metadata: deserializeMetadata(parsedOutput),
300
296
  ...deserialized,
@@ -303,172 +299,13 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
303
299
  };
304
300
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
305
301
  const body = parsedOutput.body;
306
- const deserialized = de_ValidationException(body, context);
302
+ const deserialized = (0, smithy_client_1._json)(body);
307
303
  const exception = new models_0_1.ValidationException({
308
304
  $metadata: deserializeMetadata(parsedOutput),
309
305
  ...deserialized,
310
306
  });
311
307
  return (0, smithy_client_1.decorateServiceException)(exception, body);
312
308
  };
313
- const se_Arns = (input, context) => {
314
- return input
315
- .filter((e) => e != null)
316
- .map((entry) => {
317
- return entry;
318
- });
319
- };
320
- const se_GetRoutingControlStateRequest = (input, context) => {
321
- return {
322
- ...(input.RoutingControlArn != null && { RoutingControlArn: input.RoutingControlArn }),
323
- };
324
- };
325
- const se_ListRoutingControlsRequest = (input, context) => {
326
- return {
327
- ...(input.ControlPanelArn != null && { ControlPanelArn: input.ControlPanelArn }),
328
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
329
- ...(input.NextToken != null && { NextToken: input.NextToken }),
330
- };
331
- };
332
- const se_UpdateRoutingControlStateEntries = (input, context) => {
333
- return input
334
- .filter((e) => e != null)
335
- .map((entry) => {
336
- return se_UpdateRoutingControlStateEntry(entry, context);
337
- });
338
- };
339
- const se_UpdateRoutingControlStateEntry = (input, context) => {
340
- return {
341
- ...(input.RoutingControlArn != null && { RoutingControlArn: input.RoutingControlArn }),
342
- ...(input.RoutingControlState != null && { RoutingControlState: input.RoutingControlState }),
343
- };
344
- };
345
- const se_UpdateRoutingControlStateRequest = (input, context) => {
346
- return {
347
- ...(input.RoutingControlArn != null && { RoutingControlArn: input.RoutingControlArn }),
348
- ...(input.RoutingControlState != null && { RoutingControlState: input.RoutingControlState }),
349
- ...(input.SafetyRulesToOverride != null && {
350
- SafetyRulesToOverride: se_Arns(input.SafetyRulesToOverride, context),
351
- }),
352
- };
353
- };
354
- const se_UpdateRoutingControlStatesRequest = (input, context) => {
355
- return {
356
- ...(input.SafetyRulesToOverride != null && {
357
- SafetyRulesToOverride: se_Arns(input.SafetyRulesToOverride, context),
358
- }),
359
- ...(input.UpdateRoutingControlStateEntries != null && {
360
- UpdateRoutingControlStateEntries: se_UpdateRoutingControlStateEntries(input.UpdateRoutingControlStateEntries, context),
361
- }),
362
- };
363
- };
364
- const de_AccessDeniedException = (output, context) => {
365
- return {
366
- message: (0, smithy_client_1.expectString)(output.message),
367
- };
368
- };
369
- const de_ConflictException = (output, context) => {
370
- return {
371
- message: (0, smithy_client_1.expectString)(output.message),
372
- resourceId: (0, smithy_client_1.expectString)(output.resourceId),
373
- resourceType: (0, smithy_client_1.expectString)(output.resourceType),
374
- };
375
- };
376
- const de_EndpointTemporarilyUnavailableException = (output, context) => {
377
- return {
378
- message: (0, smithy_client_1.expectString)(output.message),
379
- };
380
- };
381
- const de_GetRoutingControlStateResponse = (output, context) => {
382
- return {
383
- RoutingControlArn: (0, smithy_client_1.expectString)(output.RoutingControlArn),
384
- RoutingControlName: (0, smithy_client_1.expectString)(output.RoutingControlName),
385
- RoutingControlState: (0, smithy_client_1.expectString)(output.RoutingControlState),
386
- };
387
- };
388
- const de_InternalServerException = (output, context) => {
389
- return {
390
- message: (0, smithy_client_1.expectString)(output.message),
391
- retryAfterSeconds: (0, smithy_client_1.expectInt32)(output.retryAfterSeconds),
392
- };
393
- };
394
- const de_ListRoutingControlsResponse = (output, context) => {
395
- return {
396
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
397
- RoutingControls: output.RoutingControls != null ? de_RoutingControls(output.RoutingControls, context) : undefined,
398
- };
399
- };
400
- const de_ResourceNotFoundException = (output, context) => {
401
- return {
402
- message: (0, smithy_client_1.expectString)(output.message),
403
- resourceId: (0, smithy_client_1.expectString)(output.resourceId),
404
- resourceType: (0, smithy_client_1.expectString)(output.resourceType),
405
- };
406
- };
407
- const de_RoutingControl = (output, context) => {
408
- return {
409
- ControlPanelArn: (0, smithy_client_1.expectString)(output.ControlPanelArn),
410
- ControlPanelName: (0, smithy_client_1.expectString)(output.ControlPanelName),
411
- RoutingControlArn: (0, smithy_client_1.expectString)(output.RoutingControlArn),
412
- RoutingControlName: (0, smithy_client_1.expectString)(output.RoutingControlName),
413
- RoutingControlState: (0, smithy_client_1.expectString)(output.RoutingControlState),
414
- };
415
- };
416
- const de_RoutingControls = (output, context) => {
417
- const retVal = (output || [])
418
- .filter((e) => e != null)
419
- .map((entry) => {
420
- if (entry === null) {
421
- return null;
422
- }
423
- return de_RoutingControl(entry, context);
424
- });
425
- return retVal;
426
- };
427
- const de_ServiceLimitExceededException = (output, context) => {
428
- return {
429
- limitCode: (0, smithy_client_1.expectString)(output.limitCode),
430
- message: (0, smithy_client_1.expectString)(output.message),
431
- resourceId: (0, smithy_client_1.expectString)(output.resourceId),
432
- resourceType: (0, smithy_client_1.expectString)(output.resourceType),
433
- serviceCode: (0, smithy_client_1.expectString)(output.serviceCode),
434
- };
435
- };
436
- const de_ThrottlingException = (output, context) => {
437
- return {
438
- message: (0, smithy_client_1.expectString)(output.message),
439
- retryAfterSeconds: (0, smithy_client_1.expectInt32)(output.retryAfterSeconds),
440
- };
441
- };
442
- const de_UpdateRoutingControlStateResponse = (output, context) => {
443
- return {};
444
- };
445
- const de_UpdateRoutingControlStatesResponse = (output, context) => {
446
- return {};
447
- };
448
- const de_ValidationException = (output, context) => {
449
- return {
450
- fields: output.fields != null ? de_ValidationExceptionFieldList(output.fields, context) : undefined,
451
- message: (0, smithy_client_1.expectString)(output.message),
452
- reason: (0, smithy_client_1.expectString)(output.reason),
453
- };
454
- };
455
- const de_ValidationExceptionField = (output, context) => {
456
- return {
457
- message: (0, smithy_client_1.expectString)(output.message),
458
- name: (0, smithy_client_1.expectString)(output.name),
459
- };
460
- };
461
- const de_ValidationExceptionFieldList = (output, context) => {
462
- const retVal = (output || [])
463
- .filter((e) => e != null)
464
- .map((entry) => {
465
- if (entry === null) {
466
- return null;
467
- }
468
- return de_ValidationExceptionField(entry, context);
469
- });
470
- return retVal;
471
- };
472
309
  const deserializeMetadata = (output) => ({
473
310
  httpStatusCode: output.statusCode,
474
311
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -482,6 +319,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
482
319
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
483
320
  };
484
321
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
322
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(Route53RecoveryClusterServiceException_1.Route53RecoveryClusterServiceException);
485
323
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
486
324
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
487
325
  const contents = {
@@ -1,29 +1,29 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectString as __expectString, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { AccessDeniedException, ConflictException, EndpointTemporarilyUnavailableException, InternalServerException, ResourceNotFoundException, ServiceLimitExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
4
4
  import { Route53RecoveryClusterServiceException as __BaseException } from "../models/Route53RecoveryClusterServiceException";
5
5
  export const se_GetRoutingControlStateCommand = async (input, context) => {
6
6
  const headers = sharedHeaders("GetRoutingControlState");
7
7
  let body;
8
- body = JSON.stringify(se_GetRoutingControlStateRequest(input, context));
8
+ body = JSON.stringify(_json(input));
9
9
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
10
10
  };
11
11
  export const se_ListRoutingControlsCommand = async (input, context) => {
12
12
  const headers = sharedHeaders("ListRoutingControls");
13
13
  let body;
14
- body = JSON.stringify(se_ListRoutingControlsRequest(input, context));
14
+ body = JSON.stringify(_json(input));
15
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
16
  };
17
17
  export const se_UpdateRoutingControlStateCommand = async (input, context) => {
18
18
  const headers = sharedHeaders("UpdateRoutingControlState");
19
19
  let body;
20
- body = JSON.stringify(se_UpdateRoutingControlStateRequest(input, context));
20
+ body = JSON.stringify(_json(input));
21
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
22
  };
23
23
  export const se_UpdateRoutingControlStatesCommand = async (input, context) => {
24
24
  const headers = sharedHeaders("UpdateRoutingControlStates");
25
25
  let body;
26
- body = JSON.stringify(se_UpdateRoutingControlStatesRequest(input, context));
26
+ body = JSON.stringify(_json(input));
27
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
28
  };
29
29
  export const de_GetRoutingControlStateCommand = async (output, context) => {
@@ -32,12 +32,12 @@ export const de_GetRoutingControlStateCommand = async (output, context) => {
32
32
  }
33
33
  const data = await parseBody(output.body, context);
34
34
  let contents = {};
35
- contents = de_GetRoutingControlStateResponse(data, context);
35
+ contents = _json(data);
36
36
  const response = {
37
37
  $metadata: deserializeMetadata(output),
38
38
  ...contents,
39
39
  };
40
- return Promise.resolve(response);
40
+ return response;
41
41
  };
42
42
  const de_GetRoutingControlStateCommandError = async (output, context) => {
43
43
  const parsedOutput = {
@@ -66,10 +66,9 @@ const de_GetRoutingControlStateCommandError = async (output, context) => {
66
66
  throw await de_ValidationExceptionRes(parsedOutput, context);
67
67
  default:
68
68
  const parsedBody = parsedOutput.body;
69
- throwDefaultError({
69
+ return throwDefaultError({
70
70
  output,
71
71
  parsedBody,
72
- exceptionCtor: __BaseException,
73
72
  errorCode,
74
73
  });
75
74
  }
@@ -80,12 +79,12 @@ export const de_ListRoutingControlsCommand = async (output, context) => {
80
79
  }
81
80
  const data = await parseBody(output.body, context);
82
81
  let contents = {};
83
- contents = de_ListRoutingControlsResponse(data, context);
82
+ contents = _json(data);
84
83
  const response = {
85
84
  $metadata: deserializeMetadata(output),
86
85
  ...contents,
87
86
  };
88
- return Promise.resolve(response);
87
+ return response;
89
88
  };
90
89
  const de_ListRoutingControlsCommandError = async (output, context) => {
91
90
  const parsedOutput = {
@@ -114,10 +113,9 @@ const de_ListRoutingControlsCommandError = async (output, context) => {
114
113
  throw await de_ValidationExceptionRes(parsedOutput, context);
115
114
  default:
116
115
  const parsedBody = parsedOutput.body;
117
- throwDefaultError({
116
+ return throwDefaultError({
118
117
  output,
119
118
  parsedBody,
120
- exceptionCtor: __BaseException,
121
119
  errorCode,
122
120
  });
123
121
  }
@@ -128,12 +126,12 @@ export const de_UpdateRoutingControlStateCommand = async (output, context) => {
128
126
  }
129
127
  const data = await parseBody(output.body, context);
130
128
  let contents = {};
131
- contents = de_UpdateRoutingControlStateResponse(data, context);
129
+ contents = _json(data);
132
130
  const response = {
133
131
  $metadata: deserializeMetadata(output),
134
132
  ...contents,
135
133
  };
136
- return Promise.resolve(response);
134
+ return response;
137
135
  };
138
136
  const de_UpdateRoutingControlStateCommandError = async (output, context) => {
139
137
  const parsedOutput = {
@@ -165,10 +163,9 @@ const de_UpdateRoutingControlStateCommandError = async (output, context) => {
165
163
  throw await de_ValidationExceptionRes(parsedOutput, context);
166
164
  default:
167
165
  const parsedBody = parsedOutput.body;
168
- throwDefaultError({
166
+ return throwDefaultError({
169
167
  output,
170
168
  parsedBody,
171
- exceptionCtor: __BaseException,
172
169
  errorCode,
173
170
  });
174
171
  }
@@ -179,12 +176,12 @@ export const de_UpdateRoutingControlStatesCommand = async (output, context) => {
179
176
  }
180
177
  const data = await parseBody(output.body, context);
181
178
  let contents = {};
182
- contents = de_UpdateRoutingControlStatesResponse(data, context);
179
+ contents = _json(data);
183
180
  const response = {
184
181
  $metadata: deserializeMetadata(output),
185
182
  ...contents,
186
183
  };
187
- return Promise.resolve(response);
184
+ return response;
188
185
  };
189
186
  const de_UpdateRoutingControlStatesCommandError = async (output, context) => {
190
187
  const parsedOutput = {
@@ -219,17 +216,16 @@ const de_UpdateRoutingControlStatesCommandError = async (output, context) => {
219
216
  throw await de_ValidationExceptionRes(parsedOutput, context);
220
217
  default:
221
218
  const parsedBody = parsedOutput.body;
222
- throwDefaultError({
219
+ return throwDefaultError({
223
220
  output,
224
221
  parsedBody,
225
- exceptionCtor: __BaseException,
226
222
  errorCode,
227
223
  });
228
224
  }
229
225
  };
230
226
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
231
227
  const body = parsedOutput.body;
232
- const deserialized = de_AccessDeniedException(body, context);
228
+ const deserialized = _json(body);
233
229
  const exception = new AccessDeniedException({
234
230
  $metadata: deserializeMetadata(parsedOutput),
235
231
  ...deserialized,
@@ -238,7 +234,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
238
234
  };
239
235
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
240
236
  const body = parsedOutput.body;
241
- const deserialized = de_ConflictException(body, context);
237
+ const deserialized = _json(body);
242
238
  const exception = new ConflictException({
243
239
  $metadata: deserializeMetadata(parsedOutput),
244
240
  ...deserialized,
@@ -247,7 +243,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
247
243
  };
248
244
  const de_EndpointTemporarilyUnavailableExceptionRes = async (parsedOutput, context) => {
249
245
  const body = parsedOutput.body;
250
- const deserialized = de_EndpointTemporarilyUnavailableException(body, context);
246
+ const deserialized = _json(body);
251
247
  const exception = new EndpointTemporarilyUnavailableException({
252
248
  $metadata: deserializeMetadata(parsedOutput),
253
249
  ...deserialized,
@@ -256,7 +252,7 @@ const de_EndpointTemporarilyUnavailableExceptionRes = async (parsedOutput, conte
256
252
  };
257
253
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
258
254
  const body = parsedOutput.body;
259
- const deserialized = de_InternalServerException(body, context);
255
+ const deserialized = _json(body);
260
256
  const exception = new InternalServerException({
261
257
  $metadata: deserializeMetadata(parsedOutput),
262
258
  ...deserialized,
@@ -265,7 +261,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
265
261
  };
266
262
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
267
263
  const body = parsedOutput.body;
268
- const deserialized = de_ResourceNotFoundException(body, context);
264
+ const deserialized = _json(body);
269
265
  const exception = new ResourceNotFoundException({
270
266
  $metadata: deserializeMetadata(parsedOutput),
271
267
  ...deserialized,
@@ -274,7 +270,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
274
270
  };
275
271
  const de_ServiceLimitExceededExceptionRes = async (parsedOutput, context) => {
276
272
  const body = parsedOutput.body;
277
- const deserialized = de_ServiceLimitExceededException(body, context);
273
+ const deserialized = _json(body);
278
274
  const exception = new ServiceLimitExceededException({
279
275
  $metadata: deserializeMetadata(parsedOutput),
280
276
  ...deserialized,
@@ -283,7 +279,7 @@ const de_ServiceLimitExceededExceptionRes = async (parsedOutput, context) => {
283
279
  };
284
280
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
285
281
  const body = parsedOutput.body;
286
- const deserialized = de_ThrottlingException(body, context);
282
+ const deserialized = _json(body);
287
283
  const exception = new ThrottlingException({
288
284
  $metadata: deserializeMetadata(parsedOutput),
289
285
  ...deserialized,
@@ -292,172 +288,13 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
292
288
  };
293
289
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
294
290
  const body = parsedOutput.body;
295
- const deserialized = de_ValidationException(body, context);
291
+ const deserialized = _json(body);
296
292
  const exception = new ValidationException({
297
293
  $metadata: deserializeMetadata(parsedOutput),
298
294
  ...deserialized,
299
295
  });
300
296
  return __decorateServiceException(exception, body);
301
297
  };
302
- const se_Arns = (input, context) => {
303
- return input
304
- .filter((e) => e != null)
305
- .map((entry) => {
306
- return entry;
307
- });
308
- };
309
- const se_GetRoutingControlStateRequest = (input, context) => {
310
- return {
311
- ...(input.RoutingControlArn != null && { RoutingControlArn: input.RoutingControlArn }),
312
- };
313
- };
314
- const se_ListRoutingControlsRequest = (input, context) => {
315
- return {
316
- ...(input.ControlPanelArn != null && { ControlPanelArn: input.ControlPanelArn }),
317
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
318
- ...(input.NextToken != null && { NextToken: input.NextToken }),
319
- };
320
- };
321
- const se_UpdateRoutingControlStateEntries = (input, context) => {
322
- return input
323
- .filter((e) => e != null)
324
- .map((entry) => {
325
- return se_UpdateRoutingControlStateEntry(entry, context);
326
- });
327
- };
328
- const se_UpdateRoutingControlStateEntry = (input, context) => {
329
- return {
330
- ...(input.RoutingControlArn != null && { RoutingControlArn: input.RoutingControlArn }),
331
- ...(input.RoutingControlState != null && { RoutingControlState: input.RoutingControlState }),
332
- };
333
- };
334
- const se_UpdateRoutingControlStateRequest = (input, context) => {
335
- return {
336
- ...(input.RoutingControlArn != null && { RoutingControlArn: input.RoutingControlArn }),
337
- ...(input.RoutingControlState != null && { RoutingControlState: input.RoutingControlState }),
338
- ...(input.SafetyRulesToOverride != null && {
339
- SafetyRulesToOverride: se_Arns(input.SafetyRulesToOverride, context),
340
- }),
341
- };
342
- };
343
- const se_UpdateRoutingControlStatesRequest = (input, context) => {
344
- return {
345
- ...(input.SafetyRulesToOverride != null && {
346
- SafetyRulesToOverride: se_Arns(input.SafetyRulesToOverride, context),
347
- }),
348
- ...(input.UpdateRoutingControlStateEntries != null && {
349
- UpdateRoutingControlStateEntries: se_UpdateRoutingControlStateEntries(input.UpdateRoutingControlStateEntries, context),
350
- }),
351
- };
352
- };
353
- const de_AccessDeniedException = (output, context) => {
354
- return {
355
- message: __expectString(output.message),
356
- };
357
- };
358
- const de_ConflictException = (output, context) => {
359
- return {
360
- message: __expectString(output.message),
361
- resourceId: __expectString(output.resourceId),
362
- resourceType: __expectString(output.resourceType),
363
- };
364
- };
365
- const de_EndpointTemporarilyUnavailableException = (output, context) => {
366
- return {
367
- message: __expectString(output.message),
368
- };
369
- };
370
- const de_GetRoutingControlStateResponse = (output, context) => {
371
- return {
372
- RoutingControlArn: __expectString(output.RoutingControlArn),
373
- RoutingControlName: __expectString(output.RoutingControlName),
374
- RoutingControlState: __expectString(output.RoutingControlState),
375
- };
376
- };
377
- const de_InternalServerException = (output, context) => {
378
- return {
379
- message: __expectString(output.message),
380
- retryAfterSeconds: __expectInt32(output.retryAfterSeconds),
381
- };
382
- };
383
- const de_ListRoutingControlsResponse = (output, context) => {
384
- return {
385
- NextToken: __expectString(output.NextToken),
386
- RoutingControls: output.RoutingControls != null ? de_RoutingControls(output.RoutingControls, context) : undefined,
387
- };
388
- };
389
- const de_ResourceNotFoundException = (output, context) => {
390
- return {
391
- message: __expectString(output.message),
392
- resourceId: __expectString(output.resourceId),
393
- resourceType: __expectString(output.resourceType),
394
- };
395
- };
396
- const de_RoutingControl = (output, context) => {
397
- return {
398
- ControlPanelArn: __expectString(output.ControlPanelArn),
399
- ControlPanelName: __expectString(output.ControlPanelName),
400
- RoutingControlArn: __expectString(output.RoutingControlArn),
401
- RoutingControlName: __expectString(output.RoutingControlName),
402
- RoutingControlState: __expectString(output.RoutingControlState),
403
- };
404
- };
405
- const de_RoutingControls = (output, context) => {
406
- const retVal = (output || [])
407
- .filter((e) => e != null)
408
- .map((entry) => {
409
- if (entry === null) {
410
- return null;
411
- }
412
- return de_RoutingControl(entry, context);
413
- });
414
- return retVal;
415
- };
416
- const de_ServiceLimitExceededException = (output, context) => {
417
- return {
418
- limitCode: __expectString(output.limitCode),
419
- message: __expectString(output.message),
420
- resourceId: __expectString(output.resourceId),
421
- resourceType: __expectString(output.resourceType),
422
- serviceCode: __expectString(output.serviceCode),
423
- };
424
- };
425
- const de_ThrottlingException = (output, context) => {
426
- return {
427
- message: __expectString(output.message),
428
- retryAfterSeconds: __expectInt32(output.retryAfterSeconds),
429
- };
430
- };
431
- const de_UpdateRoutingControlStateResponse = (output, context) => {
432
- return {};
433
- };
434
- const de_UpdateRoutingControlStatesResponse = (output, context) => {
435
- return {};
436
- };
437
- const de_ValidationException = (output, context) => {
438
- return {
439
- fields: output.fields != null ? de_ValidationExceptionFieldList(output.fields, context) : undefined,
440
- message: __expectString(output.message),
441
- reason: __expectString(output.reason),
442
- };
443
- };
444
- const de_ValidationExceptionField = (output, context) => {
445
- return {
446
- message: __expectString(output.message),
447
- name: __expectString(output.name),
448
- };
449
- };
450
- const de_ValidationExceptionFieldList = (output, context) => {
451
- const retVal = (output || [])
452
- .filter((e) => e != null)
453
- .map((entry) => {
454
- if (entry === null) {
455
- return null;
456
- }
457
- return de_ValidationExceptionField(entry, context);
458
- });
459
- return retVal;
460
- };
461
298
  const deserializeMetadata = (output) => ({
462
299
  httpStatusCode: output.statusCode,
463
300
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -471,6 +308,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
471
308
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
472
309
  };
473
310
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
311
+ const throwDefaultError = withBaseException(__BaseException);
474
312
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
475
313
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
476
314
  const contents = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-route53-recovery-cluster",
3
3
  "description": "AWS SDK for JavaScript Route53 Recovery Cluster Client for Node.js, Browser and React Native",
4
- "version": "3.312.0",
4
+ "version": "3.315.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -21,9 +21,9 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.312.0",
24
+ "@aws-sdk/client-sts": "3.315.0",
25
25
  "@aws-sdk/config-resolver": "3.310.0",
26
- "@aws-sdk/credential-provider-node": "3.310.0",
26
+ "@aws-sdk/credential-provider-node": "3.315.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.310.0",
28
28
  "@aws-sdk/hash-node": "3.310.0",
29
29
  "@aws-sdk/invalid-dependency": "3.310.0",
@@ -40,14 +40,14 @@
40
40
  "@aws-sdk/node-config-provider": "3.310.0",
41
41
  "@aws-sdk/node-http-handler": "3.310.0",
42
42
  "@aws-sdk/protocol-http": "3.310.0",
43
- "@aws-sdk/smithy-client": "3.310.0",
43
+ "@aws-sdk/smithy-client": "3.315.0",
44
44
  "@aws-sdk/types": "3.310.0",
45
45
  "@aws-sdk/url-parser": "3.310.0",
46
46
  "@aws-sdk/util-base64": "3.310.0",
47
47
  "@aws-sdk/util-body-length-browser": "3.310.0",
48
48
  "@aws-sdk/util-body-length-node": "3.310.0",
49
- "@aws-sdk/util-defaults-mode-browser": "3.310.0",
50
- "@aws-sdk/util-defaults-mode-node": "3.310.0",
49
+ "@aws-sdk/util-defaults-mode-browser": "3.315.0",
50
+ "@aws-sdk/util-defaults-mode-node": "3.315.0",
51
51
  "@aws-sdk/util-endpoints": "3.310.0",
52
52
  "@aws-sdk/util-retry": "3.310.0",
53
53
  "@aws-sdk/util-user-agent-browser": "3.310.0",