@aws-sdk/client-rbin 3.118.1 → 3.128.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,33 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.128.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.127.0...v3.128.0) (2022-07-12)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-rbin
9
+
10
+
11
+
12
+
13
+
14
+ # [3.127.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.126.0...v3.127.0) (2022-07-11)
15
+
16
+ **Note:** Version bump only for package @aws-sdk/client-rbin
17
+
18
+
19
+
20
+
21
+
22
+ # [3.121.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.120.0...v3.121.0) (2022-06-30)
23
+
24
+
25
+ ### Features
26
+
27
+ * **clients:** fallback to status code for unmodeled errors ([#3752](https://github.com/aws/aws-sdk-js-v3/issues/3752)) ([49bcc4f](https://github.com/aws/aws-sdk-js-v3/commit/49bcc4f153e890e798a8e82fd5fc397b2dcc449f))
28
+
29
+
30
+
31
+
32
+
6
33
  ## [3.118.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.118.0...v3.118.1) (2022-06-27)
7
34
 
8
35
  **Note:** Version bump only for package @aws-sdk/client-rbin
@@ -13,16 +13,15 @@ const serializeAws_restJson1CreateRuleCommand = async (input, context) => {
13
13
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/rules";
14
14
  let body;
15
15
  body = JSON.stringify({
16
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
17
- ...(input.ResourceTags !== undefined &&
18
- input.ResourceTags !== null && { ResourceTags: serializeAws_restJson1ResourceTags(input.ResourceTags, context) }),
19
- ...(input.ResourceType !== undefined && input.ResourceType !== null && { ResourceType: input.ResourceType }),
20
- ...(input.RetentionPeriod !== undefined &&
21
- input.RetentionPeriod !== null && {
16
+ ...(input.Description != null && { Description: input.Description }),
17
+ ...(input.ResourceTags != null && {
18
+ ResourceTags: serializeAws_restJson1ResourceTags(input.ResourceTags, context),
19
+ }),
20
+ ...(input.ResourceType != null && { ResourceType: input.ResourceType }),
21
+ ...(input.RetentionPeriod != null && {
22
22
  RetentionPeriod: serializeAws_restJson1RetentionPeriod(input.RetentionPeriod, context),
23
23
  }),
24
- ...(input.Tags !== undefined &&
25
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
24
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
26
25
  });
27
26
  return new protocol_http_1.HttpRequest({
28
27
  protocol,
@@ -95,11 +94,12 @@ const serializeAws_restJson1ListRulesCommand = async (input, context) => {
95
94
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/list-rules";
96
95
  let body;
97
96
  body = JSON.stringify({
98
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
99
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
100
- ...(input.ResourceTags !== undefined &&
101
- input.ResourceTags !== null && { ResourceTags: serializeAws_restJson1ResourceTags(input.ResourceTags, context) }),
102
- ...(input.ResourceType !== undefined && input.ResourceType !== null && { ResourceType: input.ResourceType }),
97
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
98
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
99
+ ...(input.ResourceTags != null && {
100
+ ResourceTags: serializeAws_restJson1ResourceTags(input.ResourceTags, context),
101
+ }),
102
+ ...(input.ResourceType != null && { ResourceType: input.ResourceType }),
103
103
  });
104
104
  return new protocol_http_1.HttpRequest({
105
105
  protocol,
@@ -156,8 +156,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
156
156
  }
157
157
  let body;
158
158
  body = JSON.stringify({
159
- ...(input.Tags !== undefined &&
160
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
159
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
161
160
  });
162
161
  return new protocol_http_1.HttpRequest({
163
162
  protocol,
@@ -218,12 +217,12 @@ const serializeAws_restJson1UpdateRuleCommand = async (input, context) => {
218
217
  }
219
218
  let body;
220
219
  body = JSON.stringify({
221
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
222
- ...(input.ResourceTags !== undefined &&
223
- input.ResourceTags !== null && { ResourceTags: serializeAws_restJson1ResourceTags(input.ResourceTags, context) }),
224
- ...(input.ResourceType !== undefined && input.ResourceType !== null && { ResourceType: input.ResourceType }),
225
- ...(input.RetentionPeriod !== undefined &&
226
- input.RetentionPeriod !== null && {
220
+ ...(input.Description != null && { Description: input.Description }),
221
+ ...(input.ResourceTags != null && {
222
+ ResourceTags: serializeAws_restJson1ResourceTags(input.ResourceTags, context),
223
+ }),
224
+ ...(input.ResourceType != null && { ResourceType: input.ResourceType }),
225
+ ...(input.RetentionPeriod != null && {
227
226
  RetentionPeriod: serializeAws_restJson1RetentionPeriod(input.RetentionPeriod, context),
228
227
  }),
229
228
  });
@@ -283,8 +282,7 @@ const deserializeAws_restJson1CreateRuleCommandError = async (output, context) =
283
282
  body: await parseBody(output.body, context),
284
283
  };
285
284
  let response;
286
- let errorCode = "UnknownError";
287
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
285
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
288
286
  switch (errorCode) {
289
287
  case "InternalServerException":
290
288
  case "com.amazonaws.rbin#InternalServerException":
@@ -297,10 +295,12 @@ const deserializeAws_restJson1CreateRuleCommandError = async (output, context) =
297
295
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
298
296
  default:
299
297
  const parsedBody = parsedOutput.body;
298
+ const $metadata = deserializeMetadata(output);
299
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
300
300
  response = new RbinServiceException_1.RbinServiceException({
301
- name: parsedBody.code || parsedBody.Code || errorCode,
301
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
302
302
  $fault: "client",
303
- $metadata: deserializeMetadata(output),
303
+ $metadata,
304
304
  });
305
305
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
306
306
  }
@@ -322,8 +322,7 @@ const deserializeAws_restJson1DeleteRuleCommandError = async (output, context) =
322
322
  body: await parseBody(output.body, context),
323
323
  };
324
324
  let response;
325
- let errorCode = "UnknownError";
326
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
325
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
327
326
  switch (errorCode) {
328
327
  case "InternalServerException":
329
328
  case "com.amazonaws.rbin#InternalServerException":
@@ -336,10 +335,12 @@ const deserializeAws_restJson1DeleteRuleCommandError = async (output, context) =
336
335
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
337
336
  default:
338
337
  const parsedBody = parsedOutput.body;
338
+ const $metadata = deserializeMetadata(output);
339
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
339
340
  response = new RbinServiceException_1.RbinServiceException({
340
- name: parsedBody.code || parsedBody.Code || errorCode,
341
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
341
342
  $fault: "client",
342
- $metadata: deserializeMetadata(output),
343
+ $metadata,
343
344
  });
344
345
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
345
346
  }
@@ -385,8 +386,7 @@ const deserializeAws_restJson1GetRuleCommandError = async (output, context) => {
385
386
  body: await parseBody(output.body, context),
386
387
  };
387
388
  let response;
388
- let errorCode = "UnknownError";
389
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
389
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
390
390
  switch (errorCode) {
391
391
  case "InternalServerException":
392
392
  case "com.amazonaws.rbin#InternalServerException":
@@ -399,10 +399,12 @@ const deserializeAws_restJson1GetRuleCommandError = async (output, context) => {
399
399
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
400
400
  default:
401
401
  const parsedBody = parsedOutput.body;
402
+ const $metadata = deserializeMetadata(output);
403
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
402
404
  response = new RbinServiceException_1.RbinServiceException({
403
- name: parsedBody.code || parsedBody.Code || errorCode,
405
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
404
406
  $fault: "client",
405
- $metadata: deserializeMetadata(output),
407
+ $metadata,
406
408
  });
407
409
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
408
410
  }
@@ -432,8 +434,7 @@ const deserializeAws_restJson1ListRulesCommandError = async (output, context) =>
432
434
  body: await parseBody(output.body, context),
433
435
  };
434
436
  let response;
435
- let errorCode = "UnknownError";
436
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
437
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
437
438
  switch (errorCode) {
438
439
  case "InternalServerException":
439
440
  case "com.amazonaws.rbin#InternalServerException":
@@ -443,10 +444,12 @@ const deserializeAws_restJson1ListRulesCommandError = async (output, context) =>
443
444
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
444
445
  default:
445
446
  const parsedBody = parsedOutput.body;
447
+ const $metadata = deserializeMetadata(output);
448
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
446
449
  response = new RbinServiceException_1.RbinServiceException({
447
- name: parsedBody.code || parsedBody.Code || errorCode,
450
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
448
451
  $fault: "client",
449
- $metadata: deserializeMetadata(output),
452
+ $metadata,
450
453
  });
451
454
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
452
455
  }
@@ -472,8 +475,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
472
475
  body: await parseBody(output.body, context),
473
476
  };
474
477
  let response;
475
- let errorCode = "UnknownError";
476
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
478
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
477
479
  switch (errorCode) {
478
480
  case "InternalServerException":
479
481
  case "com.amazonaws.rbin#InternalServerException":
@@ -486,10 +488,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
486
488
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
487
489
  default:
488
490
  const parsedBody = parsedOutput.body;
491
+ const $metadata = deserializeMetadata(output);
492
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
489
493
  response = new RbinServiceException_1.RbinServiceException({
490
- name: parsedBody.code || parsedBody.Code || errorCode,
494
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
491
495
  $fault: "client",
492
- $metadata: deserializeMetadata(output),
496
+ $metadata,
493
497
  });
494
498
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
495
499
  }
@@ -511,8 +515,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
511
515
  body: await parseBody(output.body, context),
512
516
  };
513
517
  let response;
514
- let errorCode = "UnknownError";
515
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
518
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
516
519
  switch (errorCode) {
517
520
  case "InternalServerException":
518
521
  case "com.amazonaws.rbin#InternalServerException":
@@ -528,10 +531,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
528
531
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
529
532
  default:
530
533
  const parsedBody = parsedOutput.body;
534
+ const $metadata = deserializeMetadata(output);
535
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
531
536
  response = new RbinServiceException_1.RbinServiceException({
532
- name: parsedBody.code || parsedBody.Code || errorCode,
537
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
533
538
  $fault: "client",
534
- $metadata: deserializeMetadata(output),
539
+ $metadata,
535
540
  });
536
541
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
537
542
  }
@@ -553,8 +558,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
553
558
  body: await parseBody(output.body, context),
554
559
  };
555
560
  let response;
556
- let errorCode = "UnknownError";
557
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
561
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
558
562
  switch (errorCode) {
559
563
  case "InternalServerException":
560
564
  case "com.amazonaws.rbin#InternalServerException":
@@ -567,10 +571,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
567
571
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
568
572
  default:
569
573
  const parsedBody = parsedOutput.body;
574
+ const $metadata = deserializeMetadata(output);
575
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
570
576
  response = new RbinServiceException_1.RbinServiceException({
571
- name: parsedBody.code || parsedBody.Code || errorCode,
577
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
572
578
  $fault: "client",
573
- $metadata: deserializeMetadata(output),
579
+ $metadata,
574
580
  });
575
581
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
576
582
  }
@@ -616,8 +622,7 @@ const deserializeAws_restJson1UpdateRuleCommandError = async (output, context) =
616
622
  body: await parseBody(output.body, context),
617
623
  };
618
624
  let response;
619
- let errorCode = "UnknownError";
620
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
625
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
621
626
  switch (errorCode) {
622
627
  case "InternalServerException":
623
628
  case "com.amazonaws.rbin#InternalServerException":
@@ -630,10 +635,12 @@ const deserializeAws_restJson1UpdateRuleCommandError = async (output, context) =
630
635
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
631
636
  default:
632
637
  const parsedBody = parsedOutput.body;
638
+ const $metadata = deserializeMetadata(output);
639
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
633
640
  response = new RbinServiceException_1.RbinServiceException({
634
- name: parsedBody.code || parsedBody.Code || errorCode,
641
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
635
642
  $fault: "client",
636
- $metadata: deserializeMetadata(output),
643
+ $metadata,
637
644
  });
638
645
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
639
646
  }
@@ -697,10 +704,8 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
697
704
  };
698
705
  const serializeAws_restJson1ResourceTag = (input, context) => {
699
706
  return {
700
- ...(input.ResourceTagKey !== undefined &&
701
- input.ResourceTagKey !== null && { ResourceTagKey: input.ResourceTagKey }),
702
- ...(input.ResourceTagValue !== undefined &&
703
- input.ResourceTagValue !== null && { ResourceTagValue: input.ResourceTagValue }),
707
+ ...(input.ResourceTagKey != null && { ResourceTagKey: input.ResourceTagKey }),
708
+ ...(input.ResourceTagValue != null && { ResourceTagValue: input.ResourceTagValue }),
704
709
  };
705
710
  };
706
711
  const serializeAws_restJson1ResourceTags = (input, context) => {
@@ -715,16 +720,14 @@ const serializeAws_restJson1ResourceTags = (input, context) => {
715
720
  };
716
721
  const serializeAws_restJson1RetentionPeriod = (input, context) => {
717
722
  return {
718
- ...(input.RetentionPeriodUnit !== undefined &&
719
- input.RetentionPeriodUnit !== null && { RetentionPeriodUnit: input.RetentionPeriodUnit }),
720
- ...(input.RetentionPeriodValue !== undefined &&
721
- input.RetentionPeriodValue !== null && { RetentionPeriodValue: input.RetentionPeriodValue }),
723
+ ...(input.RetentionPeriodUnit != null && { RetentionPeriodUnit: input.RetentionPeriodUnit }),
724
+ ...(input.RetentionPeriodValue != null && { RetentionPeriodValue: input.RetentionPeriodValue }),
722
725
  };
723
726
  };
724
727
  const serializeAws_restJson1Tag = (input, context) => {
725
728
  return {
726
- ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
727
- ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
729
+ ...(input.Key != null && { Key: input.Key }),
730
+ ...(input.Value != null && { Value: input.Value }),
728
731
  };
729
732
  };
730
733
  const serializeAws_restJson1TagList = (input, context) => {
@@ -764,7 +767,7 @@ const deserializeAws_restJson1RuleSummary = (output, context) => {
764
767
  return {
765
768
  Description: (0, smithy_client_1.expectString)(output.Description),
766
769
  Identifier: (0, smithy_client_1.expectString)(output.Identifier),
767
- RetentionPeriod: output.RetentionPeriod !== undefined && output.RetentionPeriod !== null
770
+ RetentionPeriod: output.RetentionPeriod != null
768
771
  ? deserializeAws_restJson1RetentionPeriod(output.RetentionPeriod, context)
769
772
  : undefined,
770
773
  };
@@ -846,5 +849,4 @@ const loadRestJsonErrorCode = (output, data) => {
846
849
  if (data["__type"] !== undefined) {
847
850
  return sanitizeErrorCode(data["__type"]);
848
851
  }
849
- return "";
850
852
  };
@@ -14,12 +14,11 @@ export var serializeAws_restJson1CreateRuleCommand = function (input, context) {
14
14
  "content-type": "application/json",
15
15
  };
16
16
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/rules";
17
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.ResourceTags !== undefined &&
18
- input.ResourceTags !== null && { ResourceTags: serializeAws_restJson1ResourceTags(input.ResourceTags, context) })), (input.ResourceType !== undefined && input.ResourceType !== null && { ResourceType: input.ResourceType })), (input.RetentionPeriod !== undefined &&
19
- input.RetentionPeriod !== null && {
17
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.Description != null && { Description: input.Description })), (input.ResourceTags != null && {
18
+ ResourceTags: serializeAws_restJson1ResourceTags(input.ResourceTags, context),
19
+ })), (input.ResourceType != null && { ResourceType: input.ResourceType })), (input.RetentionPeriod != null && {
20
20
  RetentionPeriod: serializeAws_restJson1RetentionPeriod(input.RetentionPeriod, context),
21
- })), (input.Tags !== undefined &&
22
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })));
21
+ })), (input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })));
23
22
  return [2, new __HttpRequest({
24
23
  protocol: protocol,
25
24
  hostname: hostname,
@@ -105,8 +104,9 @@ export var serializeAws_restJson1ListRulesCommand = function (input, context) {
105
104
  "content-type": "application/json",
106
105
  };
107
106
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/list-rules";
108
- body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken })), (input.ResourceTags !== undefined &&
109
- input.ResourceTags !== null && { ResourceTags: serializeAws_restJson1ResourceTags(input.ResourceTags, context) })), (input.ResourceType !== undefined && input.ResourceType !== null && { ResourceType: input.ResourceType })));
107
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.ResourceTags != null && {
108
+ ResourceTags: serializeAws_restJson1ResourceTags(input.ResourceTags, context),
109
+ })), (input.ResourceType != null && { ResourceType: input.ResourceType })));
110
110
  return [2, new __HttpRequest({
111
111
  protocol: protocol,
112
112
  hostname: hostname,
@@ -171,8 +171,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
171
171
  else {
172
172
  throw new Error("No value provided for input HTTP label: ResourceArn.");
173
173
  }
174
- body = JSON.stringify(__assign({}, (input.Tags !== undefined &&
175
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })));
174
+ body = JSON.stringify(__assign({}, (input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })));
176
175
  return [2, new __HttpRequest({
177
176
  protocol: protocol,
178
177
  hostname: hostname,
@@ -239,9 +238,9 @@ export var serializeAws_restJson1UpdateRuleCommand = function (input, context) {
239
238
  else {
240
239
  throw new Error("No value provided for input HTTP label: Identifier.");
241
240
  }
242
- body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.ResourceTags !== undefined &&
243
- input.ResourceTags !== null && { ResourceTags: serializeAws_restJson1ResourceTags(input.ResourceTags, context) })), (input.ResourceType !== undefined && input.ResourceType !== null && { ResourceType: input.ResourceType })), (input.RetentionPeriod !== undefined &&
244
- input.RetentionPeriod !== null && {
241
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.Description != null && { Description: input.Description })), (input.ResourceTags != null && {
242
+ ResourceTags: serializeAws_restJson1ResourceTags(input.ResourceTags, context),
243
+ })), (input.ResourceType != null && { ResourceType: input.ResourceType })), (input.RetentionPeriod != null && {
245
244
  RetentionPeriod: serializeAws_restJson1RetentionPeriod(input.RetentionPeriod, context),
246
245
  })));
247
246
  return [2, new __HttpRequest({
@@ -305,7 +304,7 @@ export var deserializeAws_restJson1CreateRuleCommand = function (output, context
305
304
  });
306
305
  }); };
307
306
  var deserializeAws_restJson1CreateRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
308
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
307
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
309
308
  var _c;
310
309
  return __generator(this, function (_d) {
311
310
  switch (_d.label) {
@@ -315,7 +314,6 @@ var deserializeAws_restJson1CreateRuleCommandError = function (output, context)
315
314
  return [4, parseBody(output.body, context)];
316
315
  case 1:
317
316
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
318
- errorCode = "UnknownError";
319
317
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
320
318
  _b = errorCode;
321
319
  switch (_b) {
@@ -335,10 +333,12 @@ var deserializeAws_restJson1CreateRuleCommandError = function (output, context)
335
333
  case 7: throw _d.sent();
336
334
  case 8:
337
335
  parsedBody = parsedOutput.body;
336
+ $metadata = deserializeMetadata(output);
337
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
338
338
  response = new __BaseException({
339
- name: parsedBody.code || parsedBody.Code || errorCode,
339
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
340
340
  $fault: "client",
341
- $metadata: deserializeMetadata(output),
341
+ $metadata: $metadata,
342
342
  });
343
343
  throw __decorateServiceException(response, parsedBody);
344
344
  }
@@ -363,7 +363,7 @@ export var deserializeAws_restJson1DeleteRuleCommand = function (output, context
363
363
  });
364
364
  }); };
365
365
  var deserializeAws_restJson1DeleteRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
366
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
366
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
367
367
  var _c;
368
368
  return __generator(this, function (_d) {
369
369
  switch (_d.label) {
@@ -373,7 +373,6 @@ var deserializeAws_restJson1DeleteRuleCommandError = function (output, context)
373
373
  return [4, parseBody(output.body, context)];
374
374
  case 1:
375
375
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
376
- errorCode = "UnknownError";
377
376
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
378
377
  _b = errorCode;
379
378
  switch (_b) {
@@ -393,10 +392,12 @@ var deserializeAws_restJson1DeleteRuleCommandError = function (output, context)
393
392
  case 7: throw _d.sent();
394
393
  case 8:
395
394
  parsedBody = parsedOutput.body;
395
+ $metadata = deserializeMetadata(output);
396
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
396
397
  response = new __BaseException({
397
- name: parsedBody.code || parsedBody.Code || errorCode,
398
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
398
399
  $fault: "client",
399
- $metadata: deserializeMetadata(output),
400
+ $metadata: $metadata,
400
401
  });
401
402
  throw __decorateServiceException(response, parsedBody);
402
403
  }
@@ -447,7 +448,7 @@ export var deserializeAws_restJson1GetRuleCommand = function (output, context) {
447
448
  });
448
449
  }); };
449
450
  var deserializeAws_restJson1GetRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
450
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
451
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
451
452
  var _c;
452
453
  return __generator(this, function (_d) {
453
454
  switch (_d.label) {
@@ -457,7 +458,6 @@ var deserializeAws_restJson1GetRuleCommandError = function (output, context) { r
457
458
  return [4, parseBody(output.body, context)];
458
459
  case 1:
459
460
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
460
- errorCode = "UnknownError";
461
461
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
462
462
  _b = errorCode;
463
463
  switch (_b) {
@@ -477,10 +477,12 @@ var deserializeAws_restJson1GetRuleCommandError = function (output, context) { r
477
477
  case 7: throw _d.sent();
478
478
  case 8:
479
479
  parsedBody = parsedOutput.body;
480
+ $metadata = deserializeMetadata(output);
481
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
480
482
  response = new __BaseException({
481
- name: parsedBody.code || parsedBody.Code || errorCode,
483
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
482
484
  $fault: "client",
483
- $metadata: deserializeMetadata(output),
485
+ $metadata: $metadata,
484
486
  });
485
487
  throw __decorateServiceException(response, parsedBody);
486
488
  }
@@ -515,7 +517,7 @@ export var deserializeAws_restJson1ListRulesCommand = function (output, context)
515
517
  });
516
518
  }); };
517
519
  var deserializeAws_restJson1ListRulesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
518
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
520
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
519
521
  var _c;
520
522
  return __generator(this, function (_d) {
521
523
  switch (_d.label) {
@@ -525,7 +527,6 @@ var deserializeAws_restJson1ListRulesCommandError = function (output, context) {
525
527
  return [4, parseBody(output.body, context)];
526
528
  case 1:
527
529
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
528
- errorCode = "UnknownError";
529
530
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
530
531
  _b = errorCode;
531
532
  switch (_b) {
@@ -541,10 +542,12 @@ var deserializeAws_restJson1ListRulesCommandError = function (output, context) {
541
542
  case 5: throw _d.sent();
542
543
  case 6:
543
544
  parsedBody = parsedOutput.body;
545
+ $metadata = deserializeMetadata(output);
546
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
544
547
  response = new __BaseException({
545
- name: parsedBody.code || parsedBody.Code || errorCode,
548
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
546
549
  $fault: "client",
547
- $metadata: deserializeMetadata(output),
550
+ $metadata: $metadata,
548
551
  });
549
552
  throw __decorateServiceException(response, parsedBody);
550
553
  }
@@ -575,7 +578,7 @@ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output
575
578
  });
576
579
  }); };
577
580
  var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
578
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
581
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
579
582
  var _c;
580
583
  return __generator(this, function (_d) {
581
584
  switch (_d.label) {
@@ -585,7 +588,6 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
585
588
  return [4, parseBody(output.body, context)];
586
589
  case 1:
587
590
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
588
- errorCode = "UnknownError";
589
591
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
590
592
  _b = errorCode;
591
593
  switch (_b) {
@@ -605,10 +607,12 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
605
607
  case 7: throw _d.sent();
606
608
  case 8:
607
609
  parsedBody = parsedOutput.body;
610
+ $metadata = deserializeMetadata(output);
611
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
608
612
  response = new __BaseException({
609
- name: parsedBody.code || parsedBody.Code || errorCode,
613
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
610
614
  $fault: "client",
611
- $metadata: deserializeMetadata(output),
615
+ $metadata: $metadata,
612
616
  });
613
617
  throw __decorateServiceException(response, parsedBody);
614
618
  }
@@ -633,7 +637,7 @@ export var deserializeAws_restJson1TagResourceCommand = function (output, contex
633
637
  });
634
638
  }); };
635
639
  var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
636
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
640
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
637
641
  var _c;
638
642
  return __generator(this, function (_d) {
639
643
  switch (_d.label) {
@@ -643,7 +647,6 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
643
647
  return [4, parseBody(output.body, context)];
644
648
  case 1:
645
649
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
646
- errorCode = "UnknownError";
647
650
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
648
651
  _b = errorCode;
649
652
  switch (_b) {
@@ -667,10 +670,12 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
667
670
  case 9: throw _d.sent();
668
671
  case 10:
669
672
  parsedBody = parsedOutput.body;
673
+ $metadata = deserializeMetadata(output);
674
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
670
675
  response = new __BaseException({
671
- name: parsedBody.code || parsedBody.Code || errorCode,
676
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
672
677
  $fault: "client",
673
- $metadata: deserializeMetadata(output),
678
+ $metadata: $metadata,
674
679
  });
675
680
  throw __decorateServiceException(response, parsedBody);
676
681
  }
@@ -695,7 +700,7 @@ export var deserializeAws_restJson1UntagResourceCommand = function (output, cont
695
700
  });
696
701
  }); };
697
702
  var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
698
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
703
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
699
704
  var _c;
700
705
  return __generator(this, function (_d) {
701
706
  switch (_d.label) {
@@ -705,7 +710,6 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
705
710
  return [4, parseBody(output.body, context)];
706
711
  case 1:
707
712
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
708
- errorCode = "UnknownError";
709
713
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
710
714
  _b = errorCode;
711
715
  switch (_b) {
@@ -725,10 +729,12 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
725
729
  case 7: throw _d.sent();
726
730
  case 8:
727
731
  parsedBody = parsedOutput.body;
732
+ $metadata = deserializeMetadata(output);
733
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
728
734
  response = new __BaseException({
729
- name: parsedBody.code || parsedBody.Code || errorCode,
735
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
730
736
  $fault: "client",
731
- $metadata: deserializeMetadata(output),
737
+ $metadata: $metadata,
732
738
  });
733
739
  throw __decorateServiceException(response, parsedBody);
734
740
  }
@@ -779,7 +785,7 @@ export var deserializeAws_restJson1UpdateRuleCommand = function (output, context
779
785
  });
780
786
  }); };
781
787
  var deserializeAws_restJson1UpdateRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
782
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
788
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
783
789
  var _c;
784
790
  return __generator(this, function (_d) {
785
791
  switch (_d.label) {
@@ -789,7 +795,6 @@ var deserializeAws_restJson1UpdateRuleCommandError = function (output, context)
789
795
  return [4, parseBody(output.body, context)];
790
796
  case 1:
791
797
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
792
- errorCode = "UnknownError";
793
798
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
794
799
  _b = errorCode;
795
800
  switch (_b) {
@@ -809,10 +814,12 @@ var deserializeAws_restJson1UpdateRuleCommandError = function (output, context)
809
814
  case 7: throw _d.sent();
810
815
  case 8:
811
816
  parsedBody = parsedOutput.body;
817
+ $metadata = deserializeMetadata(output);
818
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
812
819
  response = new __BaseException({
813
- name: parsedBody.code || parsedBody.Code || errorCode,
820
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
814
821
  $fault: "client",
815
- $metadata: deserializeMetadata(output),
822
+ $metadata: $metadata,
816
823
  });
817
824
  throw __decorateServiceException(response, parsedBody);
818
825
  }
@@ -876,9 +883,7 @@ var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput
876
883
  });
877
884
  }); };
878
885
  var serializeAws_restJson1ResourceTag = function (input, context) {
879
- return __assign(__assign({}, (input.ResourceTagKey !== undefined &&
880
- input.ResourceTagKey !== null && { ResourceTagKey: input.ResourceTagKey })), (input.ResourceTagValue !== undefined &&
881
- input.ResourceTagValue !== null && { ResourceTagValue: input.ResourceTagValue }));
886
+ return __assign(__assign({}, (input.ResourceTagKey != null && { ResourceTagKey: input.ResourceTagKey })), (input.ResourceTagValue != null && { ResourceTagValue: input.ResourceTagValue }));
882
887
  };
883
888
  var serializeAws_restJson1ResourceTags = function (input, context) {
884
889
  return input
@@ -891,12 +896,10 @@ var serializeAws_restJson1ResourceTags = function (input, context) {
891
896
  });
892
897
  };
893
898
  var serializeAws_restJson1RetentionPeriod = function (input, context) {
894
- return __assign(__assign({}, (input.RetentionPeriodUnit !== undefined &&
895
- input.RetentionPeriodUnit !== null && { RetentionPeriodUnit: input.RetentionPeriodUnit })), (input.RetentionPeriodValue !== undefined &&
896
- input.RetentionPeriodValue !== null && { RetentionPeriodValue: input.RetentionPeriodValue }));
899
+ return __assign(__assign({}, (input.RetentionPeriodUnit != null && { RetentionPeriodUnit: input.RetentionPeriodUnit })), (input.RetentionPeriodValue != null && { RetentionPeriodValue: input.RetentionPeriodValue }));
897
900
  };
898
901
  var serializeAws_restJson1Tag = function (input, context) {
899
- return __assign(__assign({}, (input.Key !== undefined && input.Key !== null && { Key: input.Key })), (input.Value !== undefined && input.Value !== null && { Value: input.Value }));
902
+ return __assign(__assign({}, (input.Key != null && { Key: input.Key })), (input.Value != null && { Value: input.Value }));
900
903
  };
901
904
  var serializeAws_restJson1TagList = function (input, context) {
902
905
  return input
@@ -935,7 +938,7 @@ var deserializeAws_restJson1RuleSummary = function (output, context) {
935
938
  return {
936
939
  Description: __expectString(output.Description),
937
940
  Identifier: __expectString(output.Identifier),
938
- RetentionPeriod: output.RetentionPeriod !== undefined && output.RetentionPeriod !== null
941
+ RetentionPeriod: output.RetentionPeriod != null
939
942
  ? deserializeAws_restJson1RetentionPeriod(output.RetentionPeriod, context)
940
943
  : undefined,
941
944
  };
@@ -1024,5 +1027,4 @@ var loadRestJsonErrorCode = function (output, data) {
1024
1027
  if (data["__type"] !== undefined) {
1025
1028
  return sanitizeErrorCode(data["__type"]);
1026
1029
  }
1027
- return "";
1028
1030
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-rbin",
3
3
  "description": "AWS SDK for JavaScript Rbin Client for Node.js, Browser and React Native",
4
- "version": "3.118.1",
4
+ "version": "3.128.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",
@@ -18,35 +18,35 @@
18
18
  "dependencies": {
19
19
  "@aws-crypto/sha256-browser": "2.0.0",
20
20
  "@aws-crypto/sha256-js": "2.0.0",
21
- "@aws-sdk/client-sts": "3.118.1",
22
- "@aws-sdk/config-resolver": "3.110.0",
23
- "@aws-sdk/credential-provider-node": "3.118.1",
24
- "@aws-sdk/fetch-http-handler": "3.110.0",
25
- "@aws-sdk/hash-node": "3.110.0",
26
- "@aws-sdk/invalid-dependency": "3.110.0",
27
- "@aws-sdk/middleware-content-length": "3.110.0",
28
- "@aws-sdk/middleware-host-header": "3.110.0",
29
- "@aws-sdk/middleware-logger": "3.110.0",
30
- "@aws-sdk/middleware-recursion-detection": "3.110.0",
31
- "@aws-sdk/middleware-retry": "3.118.1",
32
- "@aws-sdk/middleware-serde": "3.110.0",
33
- "@aws-sdk/middleware-signing": "3.110.0",
34
- "@aws-sdk/middleware-stack": "3.110.0",
35
- "@aws-sdk/middleware-user-agent": "3.110.0",
36
- "@aws-sdk/node-config-provider": "3.110.0",
37
- "@aws-sdk/node-http-handler": "3.118.1",
38
- "@aws-sdk/protocol-http": "3.110.0",
39
- "@aws-sdk/smithy-client": "3.110.0",
40
- "@aws-sdk/types": "3.110.0",
41
- "@aws-sdk/url-parser": "3.110.0",
21
+ "@aws-sdk/client-sts": "3.128.0",
22
+ "@aws-sdk/config-resolver": "3.128.0",
23
+ "@aws-sdk/credential-provider-node": "3.128.0",
24
+ "@aws-sdk/fetch-http-handler": "3.127.0",
25
+ "@aws-sdk/hash-node": "3.127.0",
26
+ "@aws-sdk/invalid-dependency": "3.127.0",
27
+ "@aws-sdk/middleware-content-length": "3.127.0",
28
+ "@aws-sdk/middleware-host-header": "3.127.0",
29
+ "@aws-sdk/middleware-logger": "3.127.0",
30
+ "@aws-sdk/middleware-recursion-detection": "3.127.0",
31
+ "@aws-sdk/middleware-retry": "3.127.0",
32
+ "@aws-sdk/middleware-serde": "3.127.0",
33
+ "@aws-sdk/middleware-signing": "3.128.0",
34
+ "@aws-sdk/middleware-stack": "3.127.0",
35
+ "@aws-sdk/middleware-user-agent": "3.127.0",
36
+ "@aws-sdk/node-config-provider": "3.127.0",
37
+ "@aws-sdk/node-http-handler": "3.127.0",
38
+ "@aws-sdk/protocol-http": "3.127.0",
39
+ "@aws-sdk/smithy-client": "3.127.0",
40
+ "@aws-sdk/types": "3.127.0",
41
+ "@aws-sdk/url-parser": "3.127.0",
42
42
  "@aws-sdk/util-base64-browser": "3.109.0",
43
43
  "@aws-sdk/util-base64-node": "3.55.0",
44
44
  "@aws-sdk/util-body-length-browser": "3.55.0",
45
45
  "@aws-sdk/util-body-length-node": "3.55.0",
46
- "@aws-sdk/util-defaults-mode-browser": "3.110.0",
47
- "@aws-sdk/util-defaults-mode-node": "3.110.0",
48
- "@aws-sdk/util-user-agent-browser": "3.110.0",
49
- "@aws-sdk/util-user-agent-node": "3.118.0",
46
+ "@aws-sdk/util-defaults-mode-browser": "3.127.0",
47
+ "@aws-sdk/util-defaults-mode-node": "3.128.0",
48
+ "@aws-sdk/util-user-agent-browser": "3.127.0",
49
+ "@aws-sdk/util-user-agent-node": "3.127.0",
50
50
  "@aws-sdk/util-utf8-browser": "3.109.0",
51
51
  "@aws-sdk/util-utf8-node": "3.109.0",
52
52
  "tslib": "^2.3.1"