@aws-sdk/client-applicationcostprofiler 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,16 +9,7 @@ const serializeAws_restJson1DeleteReportDefinitionCommand = async (input, contex
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 || ""}` + "/reportDefinition/{reportId}";
12
- if (input.reportId !== undefined) {
13
- const labelValue = input.reportId;
14
- if (labelValue.length <= 0) {
15
- throw new Error("Empty value provided for input HTTP label: reportId.");
16
- }
17
- resolvedPath = resolvedPath.replace("{reportId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
18
- }
19
- else {
20
- throw new Error("No value provided for input HTTP label: reportId.");
21
- }
12
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "reportId", () => input.reportId, "{reportId}", false);
22
13
  let body;
23
14
  return new protocol_http_1.HttpRequest({
24
15
  protocol,
@@ -35,16 +26,7 @@ const serializeAws_restJson1GetReportDefinitionCommand = async (input, context)
35
26
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
36
27
  const headers = {};
37
28
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition/{reportId}";
38
- if (input.reportId !== undefined) {
39
- const labelValue = input.reportId;
40
- if (labelValue.length <= 0) {
41
- throw new Error("Empty value provided for input HTTP label: reportId.");
42
- }
43
- resolvedPath = resolvedPath.replace("{reportId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
44
- }
45
- else {
46
- throw new Error("No value provided for input HTTP label: reportId.");
47
- }
29
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "reportId", () => input.reportId, "{reportId}", false);
48
30
  let body;
49
31
  return new protocol_http_1.HttpRequest({
50
32
  protocol,
@@ -84,10 +66,10 @@ const serializeAws_restJson1ListReportDefinitionsCommand = async (input, context
84
66
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
85
67
  const headers = {};
86
68
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition";
87
- const query = {
88
- ...(input.nextToken !== undefined && { nextToken: input.nextToken }),
89
- ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
90
- };
69
+ const query = map({
70
+ nextToken: [, input.nextToken],
71
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
72
+ });
91
73
  let body;
92
74
  return new protocol_http_1.HttpRequest({
93
75
  protocol,
@@ -134,16 +116,7 @@ const serializeAws_restJson1UpdateReportDefinitionCommand = async (input, contex
134
116
  "content-type": "application/json",
135
117
  };
136
118
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition/{reportId}";
137
- if (input.reportId !== undefined) {
138
- const labelValue = input.reportId;
139
- if (labelValue.length <= 0) {
140
- throw new Error("Empty value provided for input HTTP label: reportId.");
141
- }
142
- resolvedPath = resolvedPath.replace("{reportId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
143
- }
144
- else {
145
- throw new Error("No value provided for input HTTP label: reportId.");
146
- }
119
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "reportId", () => input.reportId, "{reportId}", false);
147
120
  let body;
148
121
  body = JSON.stringify({
149
122
  ...(input.destinationS3Location != null && {
@@ -168,15 +141,14 @@ const deserializeAws_restJson1DeleteReportDefinitionCommand = async (output, con
168
141
  if (output.statusCode !== 200 && output.statusCode >= 300) {
169
142
  return deserializeAws_restJson1DeleteReportDefinitionCommandError(output, context);
170
143
  }
171
- const contents = {
144
+ const contents = map({
172
145
  $metadata: deserializeMetadata(output),
173
- reportId: undefined,
174
- };
146
+ });
175
147
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
176
- if (data.reportId !== undefined && data.reportId !== null) {
148
+ if (data.reportId != null) {
177
149
  contents.reportId = (0, smithy_client_1.expectString)(data.reportId);
178
150
  }
179
- return Promise.resolve(contents);
151
+ return contents;
180
152
  };
181
153
  exports.deserializeAws_restJson1DeleteReportDefinitionCommand = deserializeAws_restJson1DeleteReportDefinitionCommand;
182
154
  const deserializeAws_restJson1DeleteReportDefinitionCommandError = async (output, context) => {
@@ -184,7 +156,6 @@ const deserializeAws_restJson1DeleteReportDefinitionCommandError = async (output
184
156
  ...output,
185
157
  body: await parseBody(output.body, context),
186
158
  };
187
- let response;
188
159
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
189
160
  switch (errorCode) {
190
161
  case "AccessDeniedException":
@@ -201,53 +172,44 @@ const deserializeAws_restJson1DeleteReportDefinitionCommandError = async (output
201
172
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
202
173
  default:
203
174
  const parsedBody = parsedOutput.body;
204
- const $metadata = deserializeMetadata(output);
205
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
206
- response = new ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException({
207
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
208
- $fault: "client",
209
- $metadata,
175
+ (0, smithy_client_1.throwDefaultError)({
176
+ output,
177
+ parsedBody,
178
+ exceptionCtor: ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException,
179
+ errorCode,
210
180
  });
211
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
212
181
  }
213
182
  };
214
183
  const deserializeAws_restJson1GetReportDefinitionCommand = async (output, context) => {
215
184
  if (output.statusCode !== 200 && output.statusCode >= 300) {
216
185
  return deserializeAws_restJson1GetReportDefinitionCommandError(output, context);
217
186
  }
218
- const contents = {
187
+ const contents = map({
219
188
  $metadata: deserializeMetadata(output),
220
- createdAt: undefined,
221
- destinationS3Location: undefined,
222
- format: undefined,
223
- lastUpdated: undefined,
224
- reportDescription: undefined,
225
- reportFrequency: undefined,
226
- reportId: undefined,
227
- };
189
+ });
228
190
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
229
- if (data.createdAt !== undefined && data.createdAt !== null) {
191
+ if (data.createdAt != null) {
230
192
  contents.createdAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.createdAt)));
231
193
  }
232
- if (data.destinationS3Location !== undefined && data.destinationS3Location !== null) {
194
+ if (data.destinationS3Location != null) {
233
195
  contents.destinationS3Location = deserializeAws_restJson1S3Location(data.destinationS3Location, context);
234
196
  }
235
- if (data.format !== undefined && data.format !== null) {
197
+ if (data.format != null) {
236
198
  contents.format = (0, smithy_client_1.expectString)(data.format);
237
199
  }
238
- if (data.lastUpdated !== undefined && data.lastUpdated !== null) {
200
+ if (data.lastUpdated != null) {
239
201
  contents.lastUpdated = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastUpdated)));
240
202
  }
241
- if (data.reportDescription !== undefined && data.reportDescription !== null) {
203
+ if (data.reportDescription != null) {
242
204
  contents.reportDescription = (0, smithy_client_1.expectString)(data.reportDescription);
243
205
  }
244
- if (data.reportFrequency !== undefined && data.reportFrequency !== null) {
206
+ if (data.reportFrequency != null) {
245
207
  contents.reportFrequency = (0, smithy_client_1.expectString)(data.reportFrequency);
246
208
  }
247
- if (data.reportId !== undefined && data.reportId !== null) {
209
+ if (data.reportId != null) {
248
210
  contents.reportId = (0, smithy_client_1.expectString)(data.reportId);
249
211
  }
250
- return Promise.resolve(contents);
212
+ return contents;
251
213
  };
252
214
  exports.deserializeAws_restJson1GetReportDefinitionCommand = deserializeAws_restJson1GetReportDefinitionCommand;
253
215
  const deserializeAws_restJson1GetReportDefinitionCommandError = async (output, context) => {
@@ -255,7 +217,6 @@ const deserializeAws_restJson1GetReportDefinitionCommandError = async (output, c
255
217
  ...output,
256
218
  body: await parseBody(output.body, context),
257
219
  };
258
- let response;
259
220
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
260
221
  switch (errorCode) {
261
222
  case "AccessDeniedException":
@@ -272,29 +233,26 @@ const deserializeAws_restJson1GetReportDefinitionCommandError = async (output, c
272
233
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
273
234
  default:
274
235
  const parsedBody = parsedOutput.body;
275
- const $metadata = deserializeMetadata(output);
276
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
277
- response = new ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException({
278
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
279
- $fault: "client",
280
- $metadata,
236
+ (0, smithy_client_1.throwDefaultError)({
237
+ output,
238
+ parsedBody,
239
+ exceptionCtor: ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException,
240
+ errorCode,
281
241
  });
282
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
283
242
  }
284
243
  };
285
244
  const deserializeAws_restJson1ImportApplicationUsageCommand = async (output, context) => {
286
245
  if (output.statusCode !== 200 && output.statusCode >= 300) {
287
246
  return deserializeAws_restJson1ImportApplicationUsageCommandError(output, context);
288
247
  }
289
- const contents = {
248
+ const contents = map({
290
249
  $metadata: deserializeMetadata(output),
291
- importId: undefined,
292
- };
250
+ });
293
251
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
294
- if (data.importId !== undefined && data.importId !== null) {
252
+ if (data.importId != null) {
295
253
  contents.importId = (0, smithy_client_1.expectString)(data.importId);
296
254
  }
297
- return Promise.resolve(contents);
255
+ return contents;
298
256
  };
299
257
  exports.deserializeAws_restJson1ImportApplicationUsageCommand = deserializeAws_restJson1ImportApplicationUsageCommand;
300
258
  const deserializeAws_restJson1ImportApplicationUsageCommandError = async (output, context) => {
@@ -302,7 +260,6 @@ const deserializeAws_restJson1ImportApplicationUsageCommandError = async (output
302
260
  ...output,
303
261
  body: await parseBody(output.body, context),
304
262
  };
305
- let response;
306
263
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
307
264
  switch (errorCode) {
308
265
  case "AccessDeniedException":
@@ -319,33 +276,29 @@ const deserializeAws_restJson1ImportApplicationUsageCommandError = async (output
319
276
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
320
277
  default:
321
278
  const parsedBody = parsedOutput.body;
322
- const $metadata = deserializeMetadata(output);
323
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
324
- response = new ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException({
325
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
326
- $fault: "client",
327
- $metadata,
279
+ (0, smithy_client_1.throwDefaultError)({
280
+ output,
281
+ parsedBody,
282
+ exceptionCtor: ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException,
283
+ errorCode,
328
284
  });
329
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
330
285
  }
331
286
  };
332
287
  const deserializeAws_restJson1ListReportDefinitionsCommand = async (output, context) => {
333
288
  if (output.statusCode !== 200 && output.statusCode >= 300) {
334
289
  return deserializeAws_restJson1ListReportDefinitionsCommandError(output, context);
335
290
  }
336
- const contents = {
291
+ const contents = map({
337
292
  $metadata: deserializeMetadata(output),
338
- nextToken: undefined,
339
- reportDefinitions: undefined,
340
- };
293
+ });
341
294
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
342
- if (data.nextToken !== undefined && data.nextToken !== null) {
295
+ if (data.nextToken != null) {
343
296
  contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
344
297
  }
345
- if (data.reportDefinitions !== undefined && data.reportDefinitions !== null) {
298
+ if (data.reportDefinitions != null) {
346
299
  contents.reportDefinitions = deserializeAws_restJson1ReportDefinitionList(data.reportDefinitions, context);
347
300
  }
348
- return Promise.resolve(contents);
301
+ return contents;
349
302
  };
350
303
  exports.deserializeAws_restJson1ListReportDefinitionsCommand = deserializeAws_restJson1ListReportDefinitionsCommand;
351
304
  const deserializeAws_restJson1ListReportDefinitionsCommandError = async (output, context) => {
@@ -353,7 +306,6 @@ const deserializeAws_restJson1ListReportDefinitionsCommandError = async (output,
353
306
  ...output,
354
307
  body: await parseBody(output.body, context),
355
308
  };
356
- let response;
357
309
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
358
310
  switch (errorCode) {
359
311
  case "AccessDeniedException":
@@ -370,29 +322,26 @@ const deserializeAws_restJson1ListReportDefinitionsCommandError = async (output,
370
322
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
371
323
  default:
372
324
  const parsedBody = parsedOutput.body;
373
- const $metadata = deserializeMetadata(output);
374
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
375
- response = new ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException({
376
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
377
- $fault: "client",
378
- $metadata,
325
+ (0, smithy_client_1.throwDefaultError)({
326
+ output,
327
+ parsedBody,
328
+ exceptionCtor: ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException,
329
+ errorCode,
379
330
  });
380
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
381
331
  }
382
332
  };
383
333
  const deserializeAws_restJson1PutReportDefinitionCommand = async (output, context) => {
384
334
  if (output.statusCode !== 200 && output.statusCode >= 300) {
385
335
  return deserializeAws_restJson1PutReportDefinitionCommandError(output, context);
386
336
  }
387
- const contents = {
337
+ const contents = map({
388
338
  $metadata: deserializeMetadata(output),
389
- reportId: undefined,
390
- };
339
+ });
391
340
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
392
- if (data.reportId !== undefined && data.reportId !== null) {
341
+ if (data.reportId != null) {
393
342
  contents.reportId = (0, smithy_client_1.expectString)(data.reportId);
394
343
  }
395
- return Promise.resolve(contents);
344
+ return contents;
396
345
  };
397
346
  exports.deserializeAws_restJson1PutReportDefinitionCommand = deserializeAws_restJson1PutReportDefinitionCommand;
398
347
  const deserializeAws_restJson1PutReportDefinitionCommandError = async (output, context) => {
@@ -400,7 +349,6 @@ const deserializeAws_restJson1PutReportDefinitionCommandError = async (output, c
400
349
  ...output,
401
350
  body: await parseBody(output.body, context),
402
351
  };
403
- let response;
404
352
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
405
353
  switch (errorCode) {
406
354
  case "AccessDeniedException":
@@ -420,29 +368,26 @@ const deserializeAws_restJson1PutReportDefinitionCommandError = async (output, c
420
368
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
421
369
  default:
422
370
  const parsedBody = parsedOutput.body;
423
- const $metadata = deserializeMetadata(output);
424
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
425
- response = new ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException({
426
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
427
- $fault: "client",
428
- $metadata,
371
+ (0, smithy_client_1.throwDefaultError)({
372
+ output,
373
+ parsedBody,
374
+ exceptionCtor: ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException,
375
+ errorCode,
429
376
  });
430
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
431
377
  }
432
378
  };
433
379
  const deserializeAws_restJson1UpdateReportDefinitionCommand = async (output, context) => {
434
380
  if (output.statusCode !== 200 && output.statusCode >= 300) {
435
381
  return deserializeAws_restJson1UpdateReportDefinitionCommandError(output, context);
436
382
  }
437
- const contents = {
383
+ const contents = map({
438
384
  $metadata: deserializeMetadata(output),
439
- reportId: undefined,
440
- };
385
+ });
441
386
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
442
- if (data.reportId !== undefined && data.reportId !== null) {
387
+ if (data.reportId != null) {
443
388
  contents.reportId = (0, smithy_client_1.expectString)(data.reportId);
444
389
  }
445
- return Promise.resolve(contents);
390
+ return contents;
446
391
  };
447
392
  exports.deserializeAws_restJson1UpdateReportDefinitionCommand = deserializeAws_restJson1UpdateReportDefinitionCommand;
448
393
  const deserializeAws_restJson1UpdateReportDefinitionCommandError = async (output, context) => {
@@ -450,7 +395,6 @@ const deserializeAws_restJson1UpdateReportDefinitionCommandError = async (output
450
395
  ...output,
451
396
  body: await parseBody(output.body, context),
452
397
  };
453
- let response;
454
398
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
455
399
  switch (errorCode) {
456
400
  case "AccessDeniedException":
@@ -467,20 +411,19 @@ const deserializeAws_restJson1UpdateReportDefinitionCommandError = async (output
467
411
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
468
412
  default:
469
413
  const parsedBody = parsedOutput.body;
470
- const $metadata = deserializeMetadata(output);
471
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
472
- response = new ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException({
473
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
474
- $fault: "client",
475
- $metadata,
414
+ (0, smithy_client_1.throwDefaultError)({
415
+ output,
416
+ parsedBody,
417
+ exceptionCtor: ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException,
418
+ errorCode,
476
419
  });
477
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
478
420
  }
479
421
  };
422
+ const map = smithy_client_1.map;
480
423
  const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
481
- const contents = {};
424
+ const contents = map({});
482
425
  const data = parsedOutput.body;
483
- if (data.message !== undefined && data.message !== null) {
426
+ if (data.message != null) {
484
427
  contents.message = (0, smithy_client_1.expectString)(data.message);
485
428
  }
486
429
  const exception = new models_0_1.AccessDeniedException({
@@ -490,9 +433,9 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
490
433
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
491
434
  };
492
435
  const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
493
- const contents = {};
436
+ const contents = map({});
494
437
  const data = parsedOutput.body;
495
- if (data.message !== undefined && data.message !== null) {
438
+ if (data.message != null) {
496
439
  contents.message = (0, smithy_client_1.expectString)(data.message);
497
440
  }
498
441
  const exception = new models_0_1.InternalServerException({
@@ -502,9 +445,9 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
502
445
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
503
446
  };
504
447
  const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
505
- const contents = {};
448
+ const contents = map({});
506
449
  const data = parsedOutput.body;
507
- if (data.message !== undefined && data.message !== null) {
450
+ if (data.message != null) {
508
451
  contents.message = (0, smithy_client_1.expectString)(data.message);
509
452
  }
510
453
  const exception = new models_0_1.ServiceQuotaExceededException({
@@ -514,9 +457,9 @@ const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (par
514
457
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
515
458
  };
516
459
  const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
517
- const contents = {};
460
+ const contents = map({});
518
461
  const data = parsedOutput.body;
519
- if (data.message !== undefined && data.message !== null) {
462
+ if (data.message != null) {
520
463
  contents.message = (0, smithy_client_1.expectString)(data.message);
521
464
  }
522
465
  const exception = new models_0_1.ThrottlingException({
@@ -526,9 +469,9 @@ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput,
526
469
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
527
470
  };
528
471
  const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
529
- const contents = {};
472
+ const contents = map({});
530
473
  const data = parsedOutput.body;
531
- if (data.message !== undefined && data.message !== null) {
474
+ if (data.message != null) {
532
475
  contents.message = (0, smithy_client_1.expectString)(data.message);
533
476
  }
534
477
  const exception = new models_0_1.ValidationException({
@@ -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 { DeleteReportDefinitionRequest, DeleteReportDefinitionResult } from "../models/models_0";
4
+ import { DeleteReportDefinitionRequestFilterSensitiveLog, DeleteReportDefinitionResultFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_restJson1DeleteReportDefinitionCommand, serializeAws_restJson1DeleteReportDefinitionCommand, } from "../protocols/Aws_restJson1";
6
6
  var DeleteReportDefinitionCommand = (function (_super) {
7
7
  __extends(DeleteReportDefinitionCommand, _super);
@@ -20,8 +20,8 @@ var DeleteReportDefinitionCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: DeleteReportDefinitionRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: DeleteReportDefinitionResult.filterSensitiveLog,
23
+ inputFilterSensitiveLog: DeleteReportDefinitionRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: DeleteReportDefinitionResultFilterSensitiveLog,
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 { GetReportDefinitionRequest, GetReportDefinitionResult } from "../models/models_0";
4
+ import { GetReportDefinitionRequestFilterSensitiveLog, GetReportDefinitionResultFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_restJson1GetReportDefinitionCommand, serializeAws_restJson1GetReportDefinitionCommand, } from "../protocols/Aws_restJson1";
6
6
  var GetReportDefinitionCommand = (function (_super) {
7
7
  __extends(GetReportDefinitionCommand, _super);
@@ -20,8 +20,8 @@ var GetReportDefinitionCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: GetReportDefinitionRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: GetReportDefinitionResult.filterSensitiveLog,
23
+ inputFilterSensitiveLog: GetReportDefinitionRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: GetReportDefinitionResultFilterSensitiveLog,
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 { ImportApplicationUsageRequest, ImportApplicationUsageResult } from "../models/models_0";
4
+ import { ImportApplicationUsageRequestFilterSensitiveLog, ImportApplicationUsageResultFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_restJson1ImportApplicationUsageCommand, serializeAws_restJson1ImportApplicationUsageCommand, } from "../protocols/Aws_restJson1";
6
6
  var ImportApplicationUsageCommand = (function (_super) {
7
7
  __extends(ImportApplicationUsageCommand, _super);
@@ -20,8 +20,8 @@ var ImportApplicationUsageCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: ImportApplicationUsageRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: ImportApplicationUsageResult.filterSensitiveLog,
23
+ inputFilterSensitiveLog: ImportApplicationUsageRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: ImportApplicationUsageResultFilterSensitiveLog,
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 { ListReportDefinitionsRequest, ListReportDefinitionsResult } from "../models/models_0";
4
+ import { ListReportDefinitionsRequestFilterSensitiveLog, ListReportDefinitionsResultFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_restJson1ListReportDefinitionsCommand, serializeAws_restJson1ListReportDefinitionsCommand, } from "../protocols/Aws_restJson1";
6
6
  var ListReportDefinitionsCommand = (function (_super) {
7
7
  __extends(ListReportDefinitionsCommand, _super);
@@ -20,8 +20,8 @@ var ListReportDefinitionsCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: ListReportDefinitionsRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: ListReportDefinitionsResult.filterSensitiveLog,
23
+ inputFilterSensitiveLog: ListReportDefinitionsRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: ListReportDefinitionsResultFilterSensitiveLog,
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 { PutReportDefinitionRequest, PutReportDefinitionResult } from "../models/models_0";
4
+ import { PutReportDefinitionRequestFilterSensitiveLog, PutReportDefinitionResultFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_restJson1PutReportDefinitionCommand, serializeAws_restJson1PutReportDefinitionCommand, } from "../protocols/Aws_restJson1";
6
6
  var PutReportDefinitionCommand = (function (_super) {
7
7
  __extends(PutReportDefinitionCommand, _super);
@@ -20,8 +20,8 @@ var PutReportDefinitionCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: PutReportDefinitionRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: PutReportDefinitionResult.filterSensitiveLog,
23
+ inputFilterSensitiveLog: PutReportDefinitionRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: PutReportDefinitionResultFilterSensitiveLog,
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 { UpdateReportDefinitionRequest, UpdateReportDefinitionResult } from "../models/models_0";
4
+ import { UpdateReportDefinitionRequestFilterSensitiveLog, UpdateReportDefinitionResultFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_restJson1UpdateReportDefinitionCommand, serializeAws_restJson1UpdateReportDefinitionCommand, } from "../protocols/Aws_restJson1";
6
6
  var UpdateReportDefinitionCommand = (function (_super) {
7
7
  __extends(UpdateReportDefinitionCommand, _super);
@@ -20,8 +20,8 @@ var UpdateReportDefinitionCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: UpdateReportDefinitionRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: UpdateReportDefinitionResult.filterSensitiveLog,
23
+ inputFilterSensitiveLog: UpdateReportDefinitionRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: UpdateReportDefinitionResultFilterSensitiveLog,
25
25
  };
26
26
  var requestHandler = configuration.requestHandler;
27
27
  return stack.resolve(function (request) {