@aws-sdk/client-mediastore-data 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.
@@ -9,19 +9,7 @@ const serializeAws_restJson1DeleteObjectCommand = async (input, context) => {
9
9
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
10
  const headers = {};
11
11
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Path+}";
12
- if (input.Path !== undefined) {
13
- const labelValue = input.Path;
14
- if (labelValue.length <= 0) {
15
- throw new Error("Empty value provided for input HTTP label: Path.");
16
- }
17
- resolvedPath = resolvedPath.replace("{Path+}", labelValue
18
- .split("/")
19
- .map((segment) => (0, smithy_client_1.extendedEncodeURIComponent)(segment))
20
- .join("/"));
21
- }
22
- else {
23
- throw new Error("No value provided for input HTTP label: Path.");
24
- }
12
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Path", () => input.Path, "{Path+}", true);
25
13
  let body;
26
14
  return new protocol_http_1.HttpRequest({
27
15
  protocol,
@@ -38,19 +26,7 @@ const serializeAws_restJson1DescribeObjectCommand = async (input, context) => {
38
26
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
39
27
  const headers = {};
40
28
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Path+}";
41
- if (input.Path !== undefined) {
42
- const labelValue = input.Path;
43
- if (labelValue.length <= 0) {
44
- throw new Error("Empty value provided for input HTTP label: Path.");
45
- }
46
- resolvedPath = resolvedPath.replace("{Path+}", labelValue
47
- .split("/")
48
- .map((segment) => (0, smithy_client_1.extendedEncodeURIComponent)(segment))
49
- .join("/"));
50
- }
51
- else {
52
- throw new Error("No value provided for input HTTP label: Path.");
53
- }
29
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Path", () => input.Path, "{Path+}", true);
54
30
  let body;
55
31
  return new protocol_http_1.HttpRequest({
56
32
  protocol,
@@ -65,23 +41,11 @@ const serializeAws_restJson1DescribeObjectCommand = async (input, context) => {
65
41
  exports.serializeAws_restJson1DescribeObjectCommand = serializeAws_restJson1DescribeObjectCommand;
66
42
  const serializeAws_restJson1GetObjectCommand = async (input, context) => {
67
43
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
68
- const headers = {
69
- ...(isSerializableHeaderValue(input.Range) && { range: input.Range }),
70
- };
44
+ const headers = map({}, isSerializableHeaderValue, {
45
+ range: input.Range,
46
+ });
71
47
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Path+}";
72
- if (input.Path !== undefined) {
73
- const labelValue = input.Path;
74
- if (labelValue.length <= 0) {
75
- throw new Error("Empty value provided for input HTTP label: Path.");
76
- }
77
- resolvedPath = resolvedPath.replace("{Path+}", labelValue
78
- .split("/")
79
- .map((segment) => (0, smithy_client_1.extendedEncodeURIComponent)(segment))
80
- .join("/"));
81
- }
82
- else {
83
- throw new Error("No value provided for input HTTP label: Path.");
84
- }
48
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Path", () => input.Path, "{Path+}", true);
85
49
  let body;
86
50
  return new protocol_http_1.HttpRequest({
87
51
  protocol,
@@ -98,11 +62,11 @@ const serializeAws_restJson1ListItemsCommand = async (input, context) => {
98
62
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
99
63
  const headers = {};
100
64
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/";
101
- const query = {
102
- ...(input.Path !== undefined && { Path: input.Path }),
103
- ...(input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() }),
104
- ...(input.NextToken !== undefined && { NextToken: input.NextToken }),
105
- };
65
+ const query = map({
66
+ Path: [, input.Path],
67
+ MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
68
+ NextToken: [, input.NextToken],
69
+ });
106
70
  let body;
107
71
  return new protocol_http_1.HttpRequest({
108
72
  protocol,
@@ -118,30 +82,15 @@ const serializeAws_restJson1ListItemsCommand = async (input, context) => {
118
82
  exports.serializeAws_restJson1ListItemsCommand = serializeAws_restJson1ListItemsCommand;
119
83
  const serializeAws_restJson1PutObjectCommand = async (input, context) => {
120
84
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
121
- const headers = {
122
- "content-type": "application/octet-stream",
85
+ const headers = map({}, isSerializableHeaderValue, {
123
86
  "x-amz-content-sha256": "UNSIGNED-PAYLOAD",
124
- ...(isSerializableHeaderValue(input.ContentType) && { "content-type": input.ContentType }),
125
- ...(isSerializableHeaderValue(input.CacheControl) && { "cache-control": input.CacheControl }),
126
- ...(isSerializableHeaderValue(input.StorageClass) && { "x-amz-storage-class": input.StorageClass }),
127
- ...(isSerializableHeaderValue(input.UploadAvailability) && {
128
- "x-amz-upload-availability": input.UploadAvailability,
129
- }),
130
- };
87
+ "content-type": input.ContentType || "application/octet-stream",
88
+ "cache-control": input.CacheControl,
89
+ "x-amz-storage-class": input.StorageClass,
90
+ "x-amz-upload-availability": input.UploadAvailability,
91
+ });
131
92
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Path+}";
132
- if (input.Path !== undefined) {
133
- const labelValue = input.Path;
134
- if (labelValue.length <= 0) {
135
- throw new Error("Empty value provided for input HTTP label: Path.");
136
- }
137
- resolvedPath = resolvedPath.replace("{Path+}", labelValue
138
- .split("/")
139
- .map((segment) => (0, smithy_client_1.extendedEncodeURIComponent)(segment))
140
- .join("/"));
141
- }
142
- else {
143
- throw new Error("No value provided for input HTTP label: Path.");
144
- }
93
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Path", () => input.Path, "{Path+}", true);
145
94
  let body;
146
95
  if (input.Body !== undefined) {
147
96
  body = input.Body;
@@ -161,11 +110,11 @@ const deserializeAws_restJson1DeleteObjectCommand = async (output, context) => {
161
110
  if (output.statusCode !== 200 && output.statusCode >= 300) {
162
111
  return deserializeAws_restJson1DeleteObjectCommandError(output, context);
163
112
  }
164
- const contents = {
113
+ const contents = map({
165
114
  $metadata: deserializeMetadata(output),
166
- };
115
+ });
167
116
  await collectBody(output.body, context);
168
- return Promise.resolve(contents);
117
+ return contents;
169
118
  };
170
119
  exports.deserializeAws_restJson1DeleteObjectCommand = deserializeAws_restJson1DeleteObjectCommand;
171
120
  const deserializeAws_restJson1DeleteObjectCommandError = async (output, context) => {
@@ -173,7 +122,6 @@ const deserializeAws_restJson1DeleteObjectCommandError = async (output, context)
173
122
  ...output,
174
123
  body: await parseBody(output.body, context),
175
124
  };
176
- let response;
177
125
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
178
126
  switch (errorCode) {
179
127
  case "ContainerNotFoundException":
@@ -187,45 +135,34 @@ const deserializeAws_restJson1DeleteObjectCommandError = async (output, context)
187
135
  throw await deserializeAws_restJson1ObjectNotFoundExceptionResponse(parsedOutput, context);
188
136
  default:
189
137
  const parsedBody = parsedOutput.body;
190
- const $metadata = deserializeMetadata(output);
191
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
192
- response = new MediaStoreDataServiceException_1.MediaStoreDataServiceException({
193
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
194
- $fault: "client",
195
- $metadata,
138
+ (0, smithy_client_1.throwDefaultError)({
139
+ output,
140
+ parsedBody,
141
+ exceptionCtor: MediaStoreDataServiceException_1.MediaStoreDataServiceException,
142
+ errorCode,
196
143
  });
197
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
198
144
  }
199
145
  };
200
146
  const deserializeAws_restJson1DescribeObjectCommand = async (output, context) => {
201
147
  if (output.statusCode !== 200 && output.statusCode >= 300) {
202
148
  return deserializeAws_restJson1DescribeObjectCommandError(output, context);
203
149
  }
204
- const contents = {
150
+ const contents = map({
205
151
  $metadata: deserializeMetadata(output),
206
- CacheControl: undefined,
207
- ContentLength: undefined,
208
- ContentType: undefined,
209
- ETag: undefined,
210
- LastModified: undefined,
211
- };
212
- if (output.headers["etag"] !== undefined) {
213
- contents.ETag = output.headers["etag"];
214
- }
215
- if (output.headers["content-type"] !== undefined) {
216
- contents.ContentType = output.headers["content-type"];
217
- }
218
- if (output.headers["content-length"] !== undefined) {
219
- contents.ContentLength = (0, smithy_client_1.strictParseLong)(output.headers["content-length"]);
220
- }
221
- if (output.headers["cache-control"] !== undefined) {
222
- contents.CacheControl = output.headers["cache-control"];
223
- }
224
- if (output.headers["last-modified"] !== undefined) {
225
- contents.LastModified = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc7231DateTime)(output.headers["last-modified"]));
226
- }
152
+ ETag: [, output.headers["etag"]],
153
+ ContentType: [, output.headers["content-type"]],
154
+ ContentLength: [
155
+ () => void 0 !== output.headers["content-length"],
156
+ () => (0, smithy_client_1.strictParseLong)(output.headers["content-length"]),
157
+ ],
158
+ CacheControl: [, output.headers["cache-control"]],
159
+ LastModified: [
160
+ () => void 0 !== output.headers["last-modified"],
161
+ () => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc7231DateTime)(output.headers["last-modified"])),
162
+ ],
163
+ });
227
164
  await collectBody(output.body, context);
228
- return Promise.resolve(contents);
165
+ return contents;
229
166
  };
230
167
  exports.deserializeAws_restJson1DescribeObjectCommand = deserializeAws_restJson1DescribeObjectCommand;
231
168
  const deserializeAws_restJson1DescribeObjectCommandError = async (output, context) => {
@@ -233,7 +170,6 @@ const deserializeAws_restJson1DescribeObjectCommandError = async (output, contex
233
170
  ...output,
234
171
  body: await parseBody(output.body, context),
235
172
  };
236
- let response;
237
173
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
238
174
  switch (errorCode) {
239
175
  case "ContainerNotFoundException":
@@ -247,55 +183,39 @@ const deserializeAws_restJson1DescribeObjectCommandError = async (output, contex
247
183
  throw await deserializeAws_restJson1ObjectNotFoundExceptionResponse(parsedOutput, context);
248
184
  default:
249
185
  const parsedBody = parsedOutput.body;
250
- const $metadata = deserializeMetadata(output);
251
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
252
- response = new MediaStoreDataServiceException_1.MediaStoreDataServiceException({
253
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
254
- $fault: "client",
255
- $metadata,
186
+ (0, smithy_client_1.throwDefaultError)({
187
+ output,
188
+ parsedBody,
189
+ exceptionCtor: MediaStoreDataServiceException_1.MediaStoreDataServiceException,
190
+ errorCode,
256
191
  });
257
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
258
192
  }
259
193
  };
260
194
  const deserializeAws_restJson1GetObjectCommand = async (output, context) => {
261
195
  if (output.statusCode !== 200 && output.statusCode >= 300) {
262
196
  return deserializeAws_restJson1GetObjectCommandError(output, context);
263
197
  }
264
- const contents = {
198
+ const contents = map({
265
199
  $metadata: deserializeMetadata(output),
266
- Body: undefined,
267
- CacheControl: undefined,
268
- ContentLength: undefined,
269
- ContentRange: undefined,
270
- ContentType: undefined,
271
- ETag: undefined,
272
- LastModified: undefined,
273
- StatusCode: undefined,
274
- };
275
- if (output.headers["cache-control"] !== undefined) {
276
- contents.CacheControl = output.headers["cache-control"];
277
- }
278
- if (output.headers["content-range"] !== undefined) {
279
- contents.ContentRange = output.headers["content-range"];
280
- }
281
- if (output.headers["content-length"] !== undefined) {
282
- contents.ContentLength = (0, smithy_client_1.strictParseLong)(output.headers["content-length"]);
283
- }
284
- if (output.headers["content-type"] !== undefined) {
285
- contents.ContentType = output.headers["content-type"];
286
- }
287
- if (output.headers["etag"] !== undefined) {
288
- contents.ETag = output.headers["etag"];
289
- }
290
- if (output.headers["last-modified"] !== undefined) {
291
- contents.LastModified = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc7231DateTime)(output.headers["last-modified"]));
292
- }
200
+ CacheControl: [, output.headers["cache-control"]],
201
+ ContentRange: [, output.headers["content-range"]],
202
+ ContentLength: [
203
+ () => void 0 !== output.headers["content-length"],
204
+ () => (0, smithy_client_1.strictParseLong)(output.headers["content-length"]),
205
+ ],
206
+ ContentType: [, output.headers["content-type"]],
207
+ ETag: [, output.headers["etag"]],
208
+ LastModified: [
209
+ () => void 0 !== output.headers["last-modified"],
210
+ () => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc7231DateTime)(output.headers["last-modified"])),
211
+ ],
212
+ });
293
213
  const data = output.body;
294
214
  contents.Body = data;
295
- if (contents.StatusCode === undefined) {
296
- contents.StatusCode = output.statusCode;
297
- }
298
- return Promise.resolve(contents);
215
+ map(contents, {
216
+ StatusCode: [, output.statusCode],
217
+ });
218
+ return contents;
299
219
  };
300
220
  exports.deserializeAws_restJson1GetObjectCommand = deserializeAws_restJson1GetObjectCommand;
301
221
  const deserializeAws_restJson1GetObjectCommandError = async (output, context) => {
@@ -303,7 +223,6 @@ const deserializeAws_restJson1GetObjectCommandError = async (output, context) =>
303
223
  ...output,
304
224
  body: await parseBody(output.body, context),
305
225
  };
306
- let response;
307
226
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
308
227
  switch (errorCode) {
309
228
  case "ContainerNotFoundException":
@@ -320,33 +239,29 @@ const deserializeAws_restJson1GetObjectCommandError = async (output, context) =>
320
239
  throw await deserializeAws_restJson1RequestedRangeNotSatisfiableExceptionResponse(parsedOutput, context);
321
240
  default:
322
241
  const parsedBody = parsedOutput.body;
323
- const $metadata = deserializeMetadata(output);
324
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
325
- response = new MediaStoreDataServiceException_1.MediaStoreDataServiceException({
326
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
327
- $fault: "client",
328
- $metadata,
242
+ (0, smithy_client_1.throwDefaultError)({
243
+ output,
244
+ parsedBody,
245
+ exceptionCtor: MediaStoreDataServiceException_1.MediaStoreDataServiceException,
246
+ errorCode,
329
247
  });
330
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
331
248
  }
332
249
  };
333
250
  const deserializeAws_restJson1ListItemsCommand = async (output, context) => {
334
251
  if (output.statusCode !== 200 && output.statusCode >= 300) {
335
252
  return deserializeAws_restJson1ListItemsCommandError(output, context);
336
253
  }
337
- const contents = {
254
+ const contents = map({
338
255
  $metadata: deserializeMetadata(output),
339
- Items: undefined,
340
- NextToken: undefined,
341
- };
256
+ });
342
257
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
343
- if (data.Items !== undefined && data.Items !== null) {
258
+ if (data.Items != null) {
344
259
  contents.Items = deserializeAws_restJson1ItemList(data.Items, context);
345
260
  }
346
- if (data.NextToken !== undefined && data.NextToken !== null) {
261
+ if (data.NextToken != null) {
347
262
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
348
263
  }
349
- return Promise.resolve(contents);
264
+ return contents;
350
265
  };
351
266
  exports.deserializeAws_restJson1ListItemsCommand = deserializeAws_restJson1ListItemsCommand;
352
267
  const deserializeAws_restJson1ListItemsCommandError = async (output, context) => {
@@ -354,7 +269,6 @@ const deserializeAws_restJson1ListItemsCommandError = async (output, context) =>
354
269
  ...output,
355
270
  body: await parseBody(output.body, context),
356
271
  };
357
- let response;
358
272
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
359
273
  switch (errorCode) {
360
274
  case "ContainerNotFoundException":
@@ -365,37 +279,32 @@ const deserializeAws_restJson1ListItemsCommandError = async (output, context) =>
365
279
  throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
366
280
  default:
367
281
  const parsedBody = parsedOutput.body;
368
- const $metadata = deserializeMetadata(output);
369
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
370
- response = new MediaStoreDataServiceException_1.MediaStoreDataServiceException({
371
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
372
- $fault: "client",
373
- $metadata,
282
+ (0, smithy_client_1.throwDefaultError)({
283
+ output,
284
+ parsedBody,
285
+ exceptionCtor: MediaStoreDataServiceException_1.MediaStoreDataServiceException,
286
+ errorCode,
374
287
  });
375
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
376
288
  }
377
289
  };
378
290
  const deserializeAws_restJson1PutObjectCommand = async (output, context) => {
379
291
  if (output.statusCode !== 200 && output.statusCode >= 300) {
380
292
  return deserializeAws_restJson1PutObjectCommandError(output, context);
381
293
  }
382
- const contents = {
294
+ const contents = map({
383
295
  $metadata: deserializeMetadata(output),
384
- ContentSHA256: undefined,
385
- ETag: undefined,
386
- StorageClass: undefined,
387
- };
296
+ });
388
297
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
389
- if (data.ContentSHA256 !== undefined && data.ContentSHA256 !== null) {
298
+ if (data.ContentSHA256 != null) {
390
299
  contents.ContentSHA256 = (0, smithy_client_1.expectString)(data.ContentSHA256);
391
300
  }
392
- if (data.ETag !== undefined && data.ETag !== null) {
301
+ if (data.ETag != null) {
393
302
  contents.ETag = (0, smithy_client_1.expectString)(data.ETag);
394
303
  }
395
- if (data.StorageClass !== undefined && data.StorageClass !== null) {
304
+ if (data.StorageClass != null) {
396
305
  contents.StorageClass = (0, smithy_client_1.expectString)(data.StorageClass);
397
306
  }
398
- return Promise.resolve(contents);
307
+ return contents;
399
308
  };
400
309
  exports.deserializeAws_restJson1PutObjectCommand = deserializeAws_restJson1PutObjectCommand;
401
310
  const deserializeAws_restJson1PutObjectCommandError = async (output, context) => {
@@ -403,7 +312,6 @@ const deserializeAws_restJson1PutObjectCommandError = async (output, context) =>
403
312
  ...output,
404
313
  body: await parseBody(output.body, context),
405
314
  };
406
- let response;
407
315
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
408
316
  switch (errorCode) {
409
317
  case "ContainerNotFoundException":
@@ -414,20 +322,19 @@ const deserializeAws_restJson1PutObjectCommandError = async (output, context) =>
414
322
  throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
415
323
  default:
416
324
  const parsedBody = parsedOutput.body;
417
- const $metadata = deserializeMetadata(output);
418
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
419
- response = new MediaStoreDataServiceException_1.MediaStoreDataServiceException({
420
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
421
- $fault: "client",
422
- $metadata,
325
+ (0, smithy_client_1.throwDefaultError)({
326
+ output,
327
+ parsedBody,
328
+ exceptionCtor: MediaStoreDataServiceException_1.MediaStoreDataServiceException,
329
+ errorCode,
423
330
  });
424
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
425
331
  }
426
332
  };
333
+ const map = smithy_client_1.map;
427
334
  const deserializeAws_restJson1ContainerNotFoundExceptionResponse = async (parsedOutput, context) => {
428
- const contents = {};
335
+ const contents = map({});
429
336
  const data = parsedOutput.body;
430
- if (data.Message !== undefined && data.Message !== null) {
337
+ if (data.Message != null) {
431
338
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
432
339
  }
433
340
  const exception = new models_0_1.ContainerNotFoundException({
@@ -437,9 +344,9 @@ const deserializeAws_restJson1ContainerNotFoundExceptionResponse = async (parsed
437
344
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
438
345
  };
439
346
  const deserializeAws_restJson1InternalServerErrorResponse = async (parsedOutput, context) => {
440
- const contents = {};
347
+ const contents = map({});
441
348
  const data = parsedOutput.body;
442
- if (data.Message !== undefined && data.Message !== null) {
349
+ if (data.Message != null) {
443
350
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
444
351
  }
445
352
  const exception = new models_0_1.InternalServerError({
@@ -449,9 +356,9 @@ const deserializeAws_restJson1InternalServerErrorResponse = async (parsedOutput,
449
356
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
450
357
  };
451
358
  const deserializeAws_restJson1ObjectNotFoundExceptionResponse = async (parsedOutput, context) => {
452
- const contents = {};
359
+ const contents = map({});
453
360
  const data = parsedOutput.body;
454
- if (data.Message !== undefined && data.Message !== null) {
361
+ if (data.Message != null) {
455
362
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
456
363
  }
457
364
  const exception = new models_0_1.ObjectNotFoundException({
@@ -461,9 +368,9 @@ const deserializeAws_restJson1ObjectNotFoundExceptionResponse = async (parsedOut
461
368
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
462
369
  };
463
370
  const deserializeAws_restJson1RequestedRangeNotSatisfiableExceptionResponse = async (parsedOutput, context) => {
464
- const contents = {};
371
+ const contents = map({});
465
372
  const data = parsedOutput.body;
466
- if (data.Message !== undefined && data.Message !== null) {
373
+ if (data.Message != null) {
467
374
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
468
375
  }
469
376
  const exception = new models_0_1.RequestedRangeNotSatisfiableException({
@@ -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 { DeleteObjectRequest, DeleteObjectResponse } from "../models/models_0";
4
+ import { DeleteObjectRequestFilterSensitiveLog, DeleteObjectResponseFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_restJson1DeleteObjectCommand, serializeAws_restJson1DeleteObjectCommand, } from "../protocols/Aws_restJson1";
6
6
  var DeleteObjectCommand = (function (_super) {
7
7
  __extends(DeleteObjectCommand, _super);
@@ -20,8 +20,8 @@ var DeleteObjectCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: DeleteObjectRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: DeleteObjectResponse.filterSensitiveLog,
23
+ inputFilterSensitiveLog: DeleteObjectRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: DeleteObjectResponseFilterSensitiveLog,
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 { DescribeObjectRequest, DescribeObjectResponse } from "../models/models_0";
4
+ import { DescribeObjectRequestFilterSensitiveLog, DescribeObjectResponseFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_restJson1DescribeObjectCommand, serializeAws_restJson1DescribeObjectCommand, } from "../protocols/Aws_restJson1";
6
6
  var DescribeObjectCommand = (function (_super) {
7
7
  __extends(DescribeObjectCommand, _super);
@@ -20,8 +20,8 @@ var DescribeObjectCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: DescribeObjectRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: DescribeObjectResponse.filterSensitiveLog,
23
+ inputFilterSensitiveLog: DescribeObjectRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: DescribeObjectResponseFilterSensitiveLog,
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 { GetObjectRequest, GetObjectResponse } from "../models/models_0";
4
+ import { GetObjectRequestFilterSensitiveLog, GetObjectResponseFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_restJson1GetObjectCommand, serializeAws_restJson1GetObjectCommand, } from "../protocols/Aws_restJson1";
6
6
  var GetObjectCommand = (function (_super) {
7
7
  __extends(GetObjectCommand, _super);
@@ -20,8 +20,8 @@ var GetObjectCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: GetObjectRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: GetObjectResponse.filterSensitiveLog,
23
+ inputFilterSensitiveLog: GetObjectRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: GetObjectResponseFilterSensitiveLog,
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 { ListItemsRequest, ListItemsResponse } from "../models/models_0";
4
+ import { ListItemsRequestFilterSensitiveLog, ListItemsResponseFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_restJson1ListItemsCommand, serializeAws_restJson1ListItemsCommand, } from "../protocols/Aws_restJson1";
6
6
  var ListItemsCommand = (function (_super) {
7
7
  __extends(ListItemsCommand, _super);
@@ -20,8 +20,8 @@ var ListItemsCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: ListItemsRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: ListItemsResponse.filterSensitiveLog,
23
+ inputFilterSensitiveLog: ListItemsRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: ListItemsResponseFilterSensitiveLog,
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 { PutObjectRequest, PutObjectResponse } from "../models/models_0";
4
+ import { PutObjectRequestFilterSensitiveLog, PutObjectResponseFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_restJson1PutObjectCommand, serializeAws_restJson1PutObjectCommand, } from "../protocols/Aws_restJson1";
6
6
  var PutObjectCommand = (function (_super) {
7
7
  __extends(PutObjectCommand, _super);
@@ -20,8 +20,8 @@ var PutObjectCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: PutObjectRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: PutObjectResponse.filterSensitiveLog,
23
+ inputFilterSensitiveLog: PutObjectRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: PutObjectResponseFilterSensitiveLog,
25
25
  };
26
26
  var requestHandler = configuration.requestHandler;
27
27
  return stack.resolve(function (request) {