@aws-sdk/client-dynamodb-streams 3.131.0 → 3.142.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,39 @@
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.142.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.141.0...v3.142.0) (2022-08-02)
7
+
8
+
9
+ ### Features
10
+
11
+ * **codegen:** general data mapping function ([#3830](https://github.com/aws/aws-sdk-js-v3/issues/3830)) ([9417eae](https://github.com/aws/aws-sdk-js-v3/commit/9417eae722806799fb4c15c07921574268c1165c))
12
+
13
+
14
+
15
+
16
+
17
+ # [3.141.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.140.0...v3.141.0) (2022-08-01)
18
+
19
+
20
+ ### Features
21
+
22
+ * **clients:** update client endpoints as of 2022-08-01 ([aaf49f2](https://github.com/aws/aws-sdk-js-v3/commit/aaf49f21b371412e6ea7e00890b71a7b31991b66))
23
+
24
+
25
+
26
+
27
+
28
+ # [3.137.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.136.1...v3.137.0) (2022-07-26)
29
+
30
+
31
+ ### Features
32
+
33
+ * **namespaces:** remove namespaces with only a log filter ([#3823](https://github.com/aws/aws-sdk-js-v3/issues/3823)) ([33e6822](https://github.com/aws/aws-sdk-js-v3/commit/33e68228fb64c53dd8f89e6be76dd5f46edc3cfd))
34
+
35
+
36
+
37
+
38
+
6
39
  # [3.131.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.130.0...v3.131.0) (2022-07-15)
7
40
 
8
41
  **Note:** Version bump only for package @aws-sdk/client-dynamodb-streams
package/README.md CHANGED
@@ -170,7 +170,7 @@ try {
170
170
  const data = await client.send(command);
171
171
  // process data.
172
172
  } catch (error) {
173
- const { requestId, cfId, extendedRequestId } = error.$metadata;
173
+ const { requestId, cfId, extendedRequestId } = error.$$metadata;
174
174
  console.log({ requestId, cfId, extendedRequestId });
175
175
  /**
176
176
  * The keys within exceptions are also parsed.
@@ -20,8 +20,8 @@ class DescribeStreamCommand extends smithy_client_1.Command {
20
20
  logger,
21
21
  clientName,
22
22
  commandName,
23
- inputFilterSensitiveLog: models_0_1.DescribeStreamInput.filterSensitiveLog,
24
- outputFilterSensitiveLog: models_0_1.DescribeStreamOutput.filterSensitiveLog,
23
+ inputFilterSensitiveLog: models_0_1.DescribeStreamInputFilterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.DescribeStreamOutputFilterSensitiveLog,
25
25
  };
26
26
  const { requestHandler } = configuration;
27
27
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -20,8 +20,8 @@ class GetRecordsCommand extends smithy_client_1.Command {
20
20
  logger,
21
21
  clientName,
22
22
  commandName,
23
- inputFilterSensitiveLog: models_0_1.GetRecordsInput.filterSensitiveLog,
24
- outputFilterSensitiveLog: models_0_1.GetRecordsOutput.filterSensitiveLog,
23
+ inputFilterSensitiveLog: models_0_1.GetRecordsInputFilterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.GetRecordsOutputFilterSensitiveLog,
25
25
  };
26
26
  const { requestHandler } = configuration;
27
27
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -20,8 +20,8 @@ class GetShardIteratorCommand extends smithy_client_1.Command {
20
20
  logger,
21
21
  clientName,
22
22
  commandName,
23
- inputFilterSensitiveLog: models_0_1.GetShardIteratorInput.filterSensitiveLog,
24
- outputFilterSensitiveLog: models_0_1.GetShardIteratorOutput.filterSensitiveLog,
23
+ inputFilterSensitiveLog: models_0_1.GetShardIteratorInputFilterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.GetShardIteratorOutputFilterSensitiveLog,
25
25
  };
26
26
  const { requestHandler } = configuration;
27
27
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -20,8 +20,8 @@ class ListStreamsCommand extends smithy_client_1.Command {
20
20
  logger,
21
21
  clientName,
22
22
  commandName,
23
- inputFilterSensitiveLog: models_0_1.ListStreamsInput.filterSensitiveLog,
24
- outputFilterSensitiveLog: models_0_1.ListStreamsOutput.filterSensitiveLog,
23
+ inputFilterSensitiveLog: models_0_1.ListStreamsInputFilterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.ListStreamsOutputFilterSensitiveLog,
25
25
  };
26
26
  const { requestHandler } = configuration;
27
27
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -1,43 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetRecordsOutput = exports._Record = exports.StreamRecord = exports.AttributeValue = exports.ListStreamsOutput = exports._Stream = exports.ListStreamsInput = exports.GetShardIteratorOutput = exports.GetShardIteratorInput = exports.TrimmedDataAccessException = exports.LimitExceededException = exports.Identity = exports.GetRecordsInput = exports.ExpiredIteratorException = exports.ResourceNotFoundException = exports.InternalServerError = exports.DescribeStreamOutput = exports.StreamDescription = exports.Shard = exports.SequenceNumberRange = exports.KeySchemaElement = exports.DescribeStreamInput = void 0;
3
+ exports.GetRecordsOutputFilterSensitiveLog = exports._RecordFilterSensitiveLog = exports.StreamRecordFilterSensitiveLog = exports.AttributeValueFilterSensitiveLog = exports.ListStreamsOutputFilterSensitiveLog = exports._StreamFilterSensitiveLog = exports.ListStreamsInputFilterSensitiveLog = exports.GetShardIteratorOutputFilterSensitiveLog = exports.GetShardIteratorInputFilterSensitiveLog = exports.IdentityFilterSensitiveLog = exports.GetRecordsInputFilterSensitiveLog = exports.DescribeStreamOutputFilterSensitiveLog = exports.StreamDescriptionFilterSensitiveLog = exports.ShardFilterSensitiveLog = exports.SequenceNumberRangeFilterSensitiveLog = exports.KeySchemaElementFilterSensitiveLog = exports.DescribeStreamInputFilterSensitiveLog = exports.AttributeValue = exports.TrimmedDataAccessException = exports.LimitExceededException = exports.ExpiredIteratorException = exports.ResourceNotFoundException = exports.InternalServerError = void 0;
4
4
  const DynamoDBStreamsServiceException_1 = require("./DynamoDBStreamsServiceException");
5
- var DescribeStreamInput;
6
- (function (DescribeStreamInput) {
7
- DescribeStreamInput.filterSensitiveLog = (obj) => ({
8
- ...obj,
9
- });
10
- })(DescribeStreamInput = exports.DescribeStreamInput || (exports.DescribeStreamInput = {}));
11
- var KeySchemaElement;
12
- (function (KeySchemaElement) {
13
- KeySchemaElement.filterSensitiveLog = (obj) => ({
14
- ...obj,
15
- });
16
- })(KeySchemaElement = exports.KeySchemaElement || (exports.KeySchemaElement = {}));
17
- var SequenceNumberRange;
18
- (function (SequenceNumberRange) {
19
- SequenceNumberRange.filterSensitiveLog = (obj) => ({
20
- ...obj,
21
- });
22
- })(SequenceNumberRange = exports.SequenceNumberRange || (exports.SequenceNumberRange = {}));
23
- var Shard;
24
- (function (Shard) {
25
- Shard.filterSensitiveLog = (obj) => ({
26
- ...obj,
27
- });
28
- })(Shard = exports.Shard || (exports.Shard = {}));
29
- var StreamDescription;
30
- (function (StreamDescription) {
31
- StreamDescription.filterSensitiveLog = (obj) => ({
32
- ...obj,
33
- });
34
- })(StreamDescription = exports.StreamDescription || (exports.StreamDescription = {}));
35
- var DescribeStreamOutput;
36
- (function (DescribeStreamOutput) {
37
- DescribeStreamOutput.filterSensitiveLog = (obj) => ({
38
- ...obj,
39
- });
40
- })(DescribeStreamOutput = exports.DescribeStreamOutput || (exports.DescribeStreamOutput = {}));
41
5
  class InternalServerError extends DynamoDBStreamsServiceException_1.DynamoDBStreamsServiceException {
42
6
  constructor(opts) {
43
7
  super({
@@ -77,18 +41,6 @@ class ExpiredIteratorException extends DynamoDBStreamsServiceException_1.DynamoD
77
41
  }
78
42
  }
79
43
  exports.ExpiredIteratorException = ExpiredIteratorException;
80
- var GetRecordsInput;
81
- (function (GetRecordsInput) {
82
- GetRecordsInput.filterSensitiveLog = (obj) => ({
83
- ...obj,
84
- });
85
- })(GetRecordsInput = exports.GetRecordsInput || (exports.GetRecordsInput = {}));
86
- var Identity;
87
- (function (Identity) {
88
- Identity.filterSensitiveLog = (obj) => ({
89
- ...obj,
90
- });
91
- })(Identity = exports.Identity || (exports.Identity = {}));
92
44
  class LimitExceededException extends DynamoDBStreamsServiceException_1.DynamoDBStreamsServiceException {
93
45
  constructor(opts) {
94
46
  super({
@@ -115,36 +67,6 @@ class TrimmedDataAccessException extends DynamoDBStreamsServiceException_1.Dynam
115
67
  }
116
68
  }
117
69
  exports.TrimmedDataAccessException = TrimmedDataAccessException;
118
- var GetShardIteratorInput;
119
- (function (GetShardIteratorInput) {
120
- GetShardIteratorInput.filterSensitiveLog = (obj) => ({
121
- ...obj,
122
- });
123
- })(GetShardIteratorInput = exports.GetShardIteratorInput || (exports.GetShardIteratorInput = {}));
124
- var GetShardIteratorOutput;
125
- (function (GetShardIteratorOutput) {
126
- GetShardIteratorOutput.filterSensitiveLog = (obj) => ({
127
- ...obj,
128
- });
129
- })(GetShardIteratorOutput = exports.GetShardIteratorOutput || (exports.GetShardIteratorOutput = {}));
130
- var ListStreamsInput;
131
- (function (ListStreamsInput) {
132
- ListStreamsInput.filterSensitiveLog = (obj) => ({
133
- ...obj,
134
- });
135
- })(ListStreamsInput = exports.ListStreamsInput || (exports.ListStreamsInput = {}));
136
- var _Stream;
137
- (function (_Stream) {
138
- _Stream.filterSensitiveLog = (obj) => ({
139
- ...obj,
140
- });
141
- })(_Stream = exports._Stream || (exports._Stream = {}));
142
- var ListStreamsOutput;
143
- (function (ListStreamsOutput) {
144
- ListStreamsOutput.filterSensitiveLog = (obj) => ({
145
- ...obj,
146
- });
147
- })(ListStreamsOutput = exports.ListStreamsOutput || (exports.ListStreamsOutput = {}));
148
70
  var AttributeValue;
149
71
  (function (AttributeValue) {
150
72
  AttributeValue.visit = (value, visitor) => {
@@ -170,71 +92,118 @@ var AttributeValue;
170
92
  return visitor.BOOL(value.BOOL);
171
93
  return visitor._(value.$unknown[0], value.$unknown[1]);
172
94
  };
173
- AttributeValue.filterSensitiveLog = (obj) => {
174
- if (obj.S !== undefined)
175
- return { S: obj.S };
176
- if (obj.N !== undefined)
177
- return { N: obj.N };
178
- if (obj.B !== undefined)
179
- return { B: obj.B };
180
- if (obj.SS !== undefined)
181
- return { SS: obj.SS };
182
- if (obj.NS !== undefined)
183
- return { NS: obj.NS };
184
- if (obj.BS !== undefined)
185
- return { BS: obj.BS };
186
- if (obj.M !== undefined)
187
- return {
188
- M: Object.entries(obj.M).reduce((acc, [key, value]) => ({
189
- ...acc,
190
- [key]: AttributeValue.filterSensitiveLog(value),
191
- }), {}),
192
- };
193
- if (obj.L !== undefined)
194
- return { L: obj.L.map((item) => AttributeValue.filterSensitiveLog(item)) };
195
- if (obj.NULL !== undefined)
196
- return { NULL: obj.NULL };
197
- if (obj.BOOL !== undefined)
198
- return { BOOL: obj.BOOL };
199
- if (obj.$unknown !== undefined)
200
- return { [obj.$unknown[0]]: "UNKNOWN" };
201
- };
202
95
  })(AttributeValue = exports.AttributeValue || (exports.AttributeValue = {}));
203
- var StreamRecord;
204
- (function (StreamRecord) {
205
- StreamRecord.filterSensitiveLog = (obj) => ({
206
- ...obj,
207
- ...(obj.Keys && {
208
- Keys: Object.entries(obj.Keys).reduce((acc, [key, value]) => ({
209
- ...acc,
210
- [key]: AttributeValue.filterSensitiveLog(value),
211
- }), {}),
212
- }),
213
- ...(obj.NewImage && {
214
- NewImage: Object.entries(obj.NewImage).reduce((acc, [key, value]) => ({
215
- ...acc,
216
- [key]: AttributeValue.filterSensitiveLog(value),
217
- }), {}),
218
- }),
219
- ...(obj.OldImage && {
220
- OldImage: Object.entries(obj.OldImage).reduce((acc, [key, value]) => ({
96
+ const DescribeStreamInputFilterSensitiveLog = (obj) => ({
97
+ ...obj,
98
+ });
99
+ exports.DescribeStreamInputFilterSensitiveLog = DescribeStreamInputFilterSensitiveLog;
100
+ const KeySchemaElementFilterSensitiveLog = (obj) => ({
101
+ ...obj,
102
+ });
103
+ exports.KeySchemaElementFilterSensitiveLog = KeySchemaElementFilterSensitiveLog;
104
+ const SequenceNumberRangeFilterSensitiveLog = (obj) => ({
105
+ ...obj,
106
+ });
107
+ exports.SequenceNumberRangeFilterSensitiveLog = SequenceNumberRangeFilterSensitiveLog;
108
+ const ShardFilterSensitiveLog = (obj) => ({
109
+ ...obj,
110
+ });
111
+ exports.ShardFilterSensitiveLog = ShardFilterSensitiveLog;
112
+ const StreamDescriptionFilterSensitiveLog = (obj) => ({
113
+ ...obj,
114
+ });
115
+ exports.StreamDescriptionFilterSensitiveLog = StreamDescriptionFilterSensitiveLog;
116
+ const DescribeStreamOutputFilterSensitiveLog = (obj) => ({
117
+ ...obj,
118
+ });
119
+ exports.DescribeStreamOutputFilterSensitiveLog = DescribeStreamOutputFilterSensitiveLog;
120
+ const GetRecordsInputFilterSensitiveLog = (obj) => ({
121
+ ...obj,
122
+ });
123
+ exports.GetRecordsInputFilterSensitiveLog = GetRecordsInputFilterSensitiveLog;
124
+ const IdentityFilterSensitiveLog = (obj) => ({
125
+ ...obj,
126
+ });
127
+ exports.IdentityFilterSensitiveLog = IdentityFilterSensitiveLog;
128
+ const GetShardIteratorInputFilterSensitiveLog = (obj) => ({
129
+ ...obj,
130
+ });
131
+ exports.GetShardIteratorInputFilterSensitiveLog = GetShardIteratorInputFilterSensitiveLog;
132
+ const GetShardIteratorOutputFilterSensitiveLog = (obj) => ({
133
+ ...obj,
134
+ });
135
+ exports.GetShardIteratorOutputFilterSensitiveLog = GetShardIteratorOutputFilterSensitiveLog;
136
+ const ListStreamsInputFilterSensitiveLog = (obj) => ({
137
+ ...obj,
138
+ });
139
+ exports.ListStreamsInputFilterSensitiveLog = ListStreamsInputFilterSensitiveLog;
140
+ const _StreamFilterSensitiveLog = (obj) => ({
141
+ ...obj,
142
+ });
143
+ exports._StreamFilterSensitiveLog = _StreamFilterSensitiveLog;
144
+ const ListStreamsOutputFilterSensitiveLog = (obj) => ({
145
+ ...obj,
146
+ });
147
+ exports.ListStreamsOutputFilterSensitiveLog = ListStreamsOutputFilterSensitiveLog;
148
+ const AttributeValueFilterSensitiveLog = (obj) => {
149
+ if (obj.S !== undefined)
150
+ return { S: obj.S };
151
+ if (obj.N !== undefined)
152
+ return { N: obj.N };
153
+ if (obj.B !== undefined)
154
+ return { B: obj.B };
155
+ if (obj.SS !== undefined)
156
+ return { SS: obj.SS };
157
+ if (obj.NS !== undefined)
158
+ return { NS: obj.NS };
159
+ if (obj.BS !== undefined)
160
+ return { BS: obj.BS };
161
+ if (obj.M !== undefined)
162
+ return {
163
+ M: Object.entries(obj.M).reduce((acc, [key, value]) => ({
221
164
  ...acc,
222
- [key]: AttributeValue.filterSensitiveLog(value),
165
+ [key]: (0, exports.AttributeValueFilterSensitiveLog)(value),
223
166
  }), {}),
224
- }),
225
- });
226
- })(StreamRecord = exports.StreamRecord || (exports.StreamRecord = {}));
227
- var _Record;
228
- (function (_Record) {
229
- _Record.filterSensitiveLog = (obj) => ({
230
- ...obj,
231
- ...(obj.dynamodb && { dynamodb: StreamRecord.filterSensitiveLog(obj.dynamodb) }),
232
- });
233
- })(_Record = exports._Record || (exports._Record = {}));
234
- var GetRecordsOutput;
235
- (function (GetRecordsOutput) {
236
- GetRecordsOutput.filterSensitiveLog = (obj) => ({
237
- ...obj,
238
- ...(obj.Records && { Records: obj.Records.map((item) => _Record.filterSensitiveLog(item)) }),
239
- });
240
- })(GetRecordsOutput = exports.GetRecordsOutput || (exports.GetRecordsOutput = {}));
167
+ };
168
+ if (obj.L !== undefined)
169
+ return { L: obj.L.map((item) => (0, exports.AttributeValueFilterSensitiveLog)(item)) };
170
+ if (obj.NULL !== undefined)
171
+ return { NULL: obj.NULL };
172
+ if (obj.BOOL !== undefined)
173
+ return { BOOL: obj.BOOL };
174
+ if (obj.$unknown !== undefined)
175
+ return { [obj.$unknown[0]]: "UNKNOWN" };
176
+ };
177
+ exports.AttributeValueFilterSensitiveLog = AttributeValueFilterSensitiveLog;
178
+ const StreamRecordFilterSensitiveLog = (obj) => ({
179
+ ...obj,
180
+ ...(obj.Keys && {
181
+ Keys: Object.entries(obj.Keys).reduce((acc, [key, value]) => ({
182
+ ...acc,
183
+ [key]: (0, exports.AttributeValueFilterSensitiveLog)(value),
184
+ }), {}),
185
+ }),
186
+ ...(obj.NewImage && {
187
+ NewImage: Object.entries(obj.NewImage).reduce((acc, [key, value]) => ({
188
+ ...acc,
189
+ [key]: (0, exports.AttributeValueFilterSensitiveLog)(value),
190
+ }), {}),
191
+ }),
192
+ ...(obj.OldImage && {
193
+ OldImage: Object.entries(obj.OldImage).reduce((acc, [key, value]) => ({
194
+ ...acc,
195
+ [key]: (0, exports.AttributeValueFilterSensitiveLog)(value),
196
+ }), {}),
197
+ }),
198
+ });
199
+ exports.StreamRecordFilterSensitiveLog = StreamRecordFilterSensitiveLog;
200
+ const _RecordFilterSensitiveLog = (obj) => ({
201
+ ...obj,
202
+ ...(obj.dynamodb && { dynamodb: (0, exports.StreamRecordFilterSensitiveLog)(obj.dynamodb) }),
203
+ });
204
+ exports._RecordFilterSensitiveLog = _RecordFilterSensitiveLog;
205
+ const GetRecordsOutputFilterSensitiveLog = (obj) => ({
206
+ ...obj,
207
+ ...(obj.Records && { Records: obj.Records.map((item) => (0, exports._RecordFilterSensitiveLog)(item)) }),
208
+ });
209
+ exports.GetRecordsOutputFilterSensitiveLog = GetRecordsOutputFilterSensitiveLog;
@@ -64,7 +64,6 @@ const deserializeAws_json1_0DescribeStreamCommandError = async (output, context)
64
64
  ...output,
65
65
  body: await parseBody(output.body, context),
66
66
  };
67
- let response;
68
67
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
69
68
  switch (errorCode) {
70
69
  case "InternalServerError":
@@ -75,14 +74,12 @@ const deserializeAws_json1_0DescribeStreamCommandError = async (output, context)
75
74
  throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
76
75
  default:
77
76
  const parsedBody = parsedOutput.body;
78
- const $metadata = deserializeMetadata(output);
79
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
80
- response = new DynamoDBStreamsServiceException_1.DynamoDBStreamsServiceException({
81
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
82
- $fault: "client",
83
- $metadata,
77
+ (0, smithy_client_1.throwDefaultError)({
78
+ output,
79
+ parsedBody,
80
+ exceptionCtor: DynamoDBStreamsServiceException_1.DynamoDBStreamsServiceException,
81
+ errorCode,
84
82
  });
85
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
86
83
  }
87
84
  };
88
85
  const deserializeAws_json1_0GetRecordsCommand = async (output, context) => {
@@ -104,7 +101,6 @@ const deserializeAws_json1_0GetRecordsCommandError = async (output, context) =>
104
101
  ...output,
105
102
  body: await parseBody(output.body, context),
106
103
  };
107
- let response;
108
104
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
109
105
  switch (errorCode) {
110
106
  case "ExpiredIteratorException":
@@ -124,14 +120,12 @@ const deserializeAws_json1_0GetRecordsCommandError = async (output, context) =>
124
120
  throw await deserializeAws_json1_0TrimmedDataAccessExceptionResponse(parsedOutput, context);
125
121
  default:
126
122
  const parsedBody = parsedOutput.body;
127
- const $metadata = deserializeMetadata(output);
128
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
129
- response = new DynamoDBStreamsServiceException_1.DynamoDBStreamsServiceException({
130
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
131
- $fault: "client",
132
- $metadata,
123
+ (0, smithy_client_1.throwDefaultError)({
124
+ output,
125
+ parsedBody,
126
+ exceptionCtor: DynamoDBStreamsServiceException_1.DynamoDBStreamsServiceException,
127
+ errorCode,
133
128
  });
134
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
135
129
  }
136
130
  };
137
131
  const deserializeAws_json1_0GetShardIteratorCommand = async (output, context) => {
@@ -153,7 +147,6 @@ const deserializeAws_json1_0GetShardIteratorCommandError = async (output, contex
153
147
  ...output,
154
148
  body: await parseBody(output.body, context),
155
149
  };
156
- let response;
157
150
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
158
151
  switch (errorCode) {
159
152
  case "InternalServerError":
@@ -167,14 +160,12 @@ const deserializeAws_json1_0GetShardIteratorCommandError = async (output, contex
167
160
  throw await deserializeAws_json1_0TrimmedDataAccessExceptionResponse(parsedOutput, context);
168
161
  default:
169
162
  const parsedBody = parsedOutput.body;
170
- const $metadata = deserializeMetadata(output);
171
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
172
- response = new DynamoDBStreamsServiceException_1.DynamoDBStreamsServiceException({
173
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
174
- $fault: "client",
175
- $metadata,
163
+ (0, smithy_client_1.throwDefaultError)({
164
+ output,
165
+ parsedBody,
166
+ exceptionCtor: DynamoDBStreamsServiceException_1.DynamoDBStreamsServiceException,
167
+ errorCode,
176
168
  });
177
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
178
169
  }
179
170
  };
180
171
  const deserializeAws_json1_0ListStreamsCommand = async (output, context) => {
@@ -196,7 +187,6 @@ const deserializeAws_json1_0ListStreamsCommandError = async (output, context) =>
196
187
  ...output,
197
188
  body: await parseBody(output.body, context),
198
189
  };
199
- let response;
200
190
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
201
191
  switch (errorCode) {
202
192
  case "InternalServerError":
@@ -207,14 +197,12 @@ const deserializeAws_json1_0ListStreamsCommandError = async (output, context) =>
207
197
  throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
208
198
  default:
209
199
  const parsedBody = parsedOutput.body;
210
- const $metadata = deserializeMetadata(output);
211
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
212
- response = new DynamoDBStreamsServiceException_1.DynamoDBStreamsServiceException({
213
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
214
- $fault: "client",
215
- $metadata,
200
+ (0, smithy_client_1.throwDefaultError)({
201
+ output,
202
+ parsedBody,
203
+ exceptionCtor: DynamoDBStreamsServiceException_1.DynamoDBStreamsServiceException,
204
+ errorCode,
216
205
  });
217
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
218
206
  }
219
207
  };
220
208
  const deserializeAws_json1_0ExpiredIteratorExceptionResponse = async (parsedOutput, context) => {
@@ -302,7 +290,7 @@ const deserializeAws_json1_0AttributeMap = (output, context) => {
302
290
  }, {});
303
291
  };
304
292
  const deserializeAws_json1_0AttributeValue = (output, context) => {
305
- if (output.B !== undefined && output.B !== null) {
293
+ if (output.B != null) {
306
294
  return {
307
295
  B: context.base64Decoder(output.B),
308
296
  };
@@ -310,17 +298,17 @@ const deserializeAws_json1_0AttributeValue = (output, context) => {
310
298
  if ((0, smithy_client_1.expectBoolean)(output.BOOL) !== undefined) {
311
299
  return { BOOL: (0, smithy_client_1.expectBoolean)(output.BOOL) };
312
300
  }
313
- if (output.BS !== undefined && output.BS !== null) {
301
+ if (output.BS != null) {
314
302
  return {
315
303
  BS: deserializeAws_json1_0BinarySetAttributeValue(output.BS, context),
316
304
  };
317
305
  }
318
- if (output.L !== undefined && output.L !== null) {
306
+ if (output.L != null) {
319
307
  return {
320
308
  L: deserializeAws_json1_0ListAttributeValue(output.L, context),
321
309
  };
322
310
  }
323
- if (output.M !== undefined && output.M !== null) {
311
+ if (output.M != null) {
324
312
  return {
325
313
  M: deserializeAws_json1_0MapAttributeValue(output.M, context),
326
314
  };
@@ -328,7 +316,7 @@ const deserializeAws_json1_0AttributeValue = (output, context) => {
328
316
  if ((0, smithy_client_1.expectString)(output.N) !== undefined) {
329
317
  return { N: (0, smithy_client_1.expectString)(output.N) };
330
318
  }
331
- if (output.NS !== undefined && output.NS !== null) {
319
+ if (output.NS != null) {
332
320
  return {
333
321
  NS: deserializeAws_json1_0NumberSetAttributeValue(output.NS, context),
334
322
  };
@@ -339,7 +327,7 @@ const deserializeAws_json1_0AttributeValue = (output, context) => {
339
327
  if ((0, smithy_client_1.expectString)(output.S) !== undefined) {
340
328
  return { S: (0, smithy_client_1.expectString)(output.S) };
341
329
  }
342
- if (output.SS !== undefined && output.SS !== null) {
330
+ if (output.SS != null) {
343
331
  return {
344
332
  SS: deserializeAws_json1_0StringSetAttributeValue(output.SS, context),
345
333
  };
@@ -1,7 +1,7 @@
1
1
  import { __extends } from "tslib";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import { DescribeStreamInput, DescribeStreamOutput } from "../models/models_0";
4
+ import { DescribeStreamInputFilterSensitiveLog, DescribeStreamOutputFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_json1_0DescribeStreamCommand, serializeAws_json1_0DescribeStreamCommand, } from "../protocols/Aws_json1_0";
6
6
  var DescribeStreamCommand = (function (_super) {
7
7
  __extends(DescribeStreamCommand, _super);
@@ -20,8 +20,8 @@ var DescribeStreamCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: DescribeStreamInput.filterSensitiveLog,
24
- outputFilterSensitiveLog: DescribeStreamOutput.filterSensitiveLog,
23
+ inputFilterSensitiveLog: DescribeStreamInputFilterSensitiveLog,
24
+ outputFilterSensitiveLog: DescribeStreamOutputFilterSensitiveLog,
25
25
  };
26
26
  var requestHandler = configuration.requestHandler;
27
27
  return stack.resolve(function (request) {
@@ -1,7 +1,7 @@
1
1
  import { __extends } from "tslib";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import { GetRecordsInput, GetRecordsOutput } from "../models/models_0";
4
+ import { GetRecordsInputFilterSensitiveLog, GetRecordsOutputFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_json1_0GetRecordsCommand, serializeAws_json1_0GetRecordsCommand, } from "../protocols/Aws_json1_0";
6
6
  var GetRecordsCommand = (function (_super) {
7
7
  __extends(GetRecordsCommand, _super);
@@ -20,8 +20,8 @@ var GetRecordsCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: GetRecordsInput.filterSensitiveLog,
24
- outputFilterSensitiveLog: GetRecordsOutput.filterSensitiveLog,
23
+ inputFilterSensitiveLog: GetRecordsInputFilterSensitiveLog,
24
+ outputFilterSensitiveLog: GetRecordsOutputFilterSensitiveLog,
25
25
  };
26
26
  var requestHandler = configuration.requestHandler;
27
27
  return stack.resolve(function (request) {
@@ -1,7 +1,7 @@
1
1
  import { __extends } from "tslib";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import { GetShardIteratorInput, GetShardIteratorOutput } from "../models/models_0";
4
+ import { GetShardIteratorInputFilterSensitiveLog, GetShardIteratorOutputFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_json1_0GetShardIteratorCommand, serializeAws_json1_0GetShardIteratorCommand, } from "../protocols/Aws_json1_0";
6
6
  var GetShardIteratorCommand = (function (_super) {
7
7
  __extends(GetShardIteratorCommand, _super);
@@ -20,8 +20,8 @@ var GetShardIteratorCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: GetShardIteratorInput.filterSensitiveLog,
24
- outputFilterSensitiveLog: GetShardIteratorOutput.filterSensitiveLog,
23
+ inputFilterSensitiveLog: GetShardIteratorInputFilterSensitiveLog,
24
+ outputFilterSensitiveLog: GetShardIteratorOutputFilterSensitiveLog,
25
25
  };
26
26
  var requestHandler = configuration.requestHandler;
27
27
  return stack.resolve(function (request) {
@@ -1,7 +1,7 @@
1
1
  import { __extends } from "tslib";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import { ListStreamsInput, ListStreamsOutput } from "../models/models_0";
4
+ import { ListStreamsInputFilterSensitiveLog, ListStreamsOutputFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_json1_0ListStreamsCommand, serializeAws_json1_0ListStreamsCommand, } from "../protocols/Aws_json1_0";
6
6
  var ListStreamsCommand = (function (_super) {
7
7
  __extends(ListStreamsCommand, _super);
@@ -20,8 +20,8 @@ var ListStreamsCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: ListStreamsInput.filterSensitiveLog,
24
- outputFilterSensitiveLog: ListStreamsOutput.filterSensitiveLog,
23
+ inputFilterSensitiveLog: ListStreamsInputFilterSensitiveLog,
24
+ outputFilterSensitiveLog: ListStreamsOutputFilterSensitiveLog,
25
25
  };
26
26
  var requestHandler = configuration.requestHandler;
27
27
  return stack.resolve(function (request) {