@aws-sdk/client-scheduler 3.312.0 → 3.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,21 +14,19 @@ const se_CreateScheduleCommand = async (input, context) => {
14
14
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedules/{Name}";
15
15
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
16
16
  let body;
17
- body = JSON.stringify({
18
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
19
- ...(input.Description != null && { Description: input.Description }),
20
- ...(input.EndDate != null && { EndDate: Math.round(input.EndDate.getTime() / 1000) }),
21
- ...(input.FlexibleTimeWindow != null && {
22
- FlexibleTimeWindow: se_FlexibleTimeWindow(input.FlexibleTimeWindow, context),
23
- }),
24
- ...(input.GroupName != null && { GroupName: input.GroupName }),
25
- ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }),
26
- ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }),
27
- ...(input.ScheduleExpressionTimezone != null && { ScheduleExpressionTimezone: input.ScheduleExpressionTimezone }),
28
- ...(input.StartDate != null && { StartDate: Math.round(input.StartDate.getTime() / 1000) }),
29
- ...(input.State != null && { State: input.State }),
30
- ...(input.Target != null && { Target: se_Target(input.Target, context) }),
31
- });
17
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
18
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
19
+ Description: [],
20
+ EndDate: (_) => Math.round(_.getTime() / 1000),
21
+ FlexibleTimeWindow: (_) => (0, smithy_client_1._json)(_),
22
+ GroupName: [],
23
+ KmsKeyArn: [],
24
+ ScheduleExpression: [],
25
+ ScheduleExpressionTimezone: [],
26
+ StartDate: (_) => Math.round(_.getTime() / 1000),
27
+ State: [],
28
+ Target: (_) => (0, smithy_client_1._json)(_),
29
+ }));
32
30
  return new protocol_http_1.HttpRequest({
33
31
  protocol,
34
32
  hostname,
@@ -48,10 +46,10 @@ const se_CreateScheduleGroupCommand = async (input, context) => {
48
46
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedule-groups/{Name}";
49
47
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
50
48
  let body;
51
- body = JSON.stringify({
52
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
53
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
54
- });
49
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
50
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
51
+ Tags: (_) => (0, smithy_client_1._json)(_),
52
+ }));
55
53
  return new protocol_http_1.HttpRequest({
56
54
  protocol,
57
55
  hostname,
@@ -68,7 +66,7 @@ const se_DeleteScheduleCommand = async (input, context) => {
68
66
  const headers = {};
69
67
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedules/{Name}";
70
68
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
71
- const query = map({
69
+ const query = (0, smithy_client_1.map)({
72
70
  groupName: [, input.GroupName],
73
71
  clientToken: [, input.ClientToken ?? (0, uuid_1.v4)()],
74
72
  });
@@ -90,7 +88,7 @@ const se_DeleteScheduleGroupCommand = async (input, context) => {
90
88
  const headers = {};
91
89
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedule-groups/{Name}";
92
90
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
93
- const query = map({
91
+ const query = (0, smithy_client_1.map)({
94
92
  clientToken: [, input.ClientToken ?? (0, uuid_1.v4)()],
95
93
  });
96
94
  let body;
@@ -111,7 +109,7 @@ const se_GetScheduleCommand = async (input, context) => {
111
109
  const headers = {};
112
110
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedules/{Name}";
113
111
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
114
- const query = map({
112
+ const query = (0, smithy_client_1.map)({
115
113
  groupName: [, input.GroupName],
116
114
  });
117
115
  let body;
@@ -148,7 +146,7 @@ const se_ListScheduleGroupsCommand = async (input, context) => {
148
146
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
149
147
  const headers = {};
150
148
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedule-groups";
151
- const query = map({
149
+ const query = (0, smithy_client_1.map)({
152
150
  NamePrefix: [, input.NamePrefix],
153
151
  NextToken: [, input.NextToken],
154
152
  MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -170,7 +168,7 @@ const se_ListSchedulesCommand = async (input, context) => {
170
168
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
171
169
  const headers = {};
172
170
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedules";
173
- const query = map({
171
+ const query = (0, smithy_client_1.map)({
174
172
  ScheduleGroup: [, input.GroupName],
175
173
  NamePrefix: [, input.NamePrefix],
176
174
  State: [, input.State],
@@ -215,9 +213,9 @@ const se_TagResourceCommand = async (input, context) => {
215
213
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
216
214
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
217
215
  let body;
218
- body = JSON.stringify({
219
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
220
- });
216
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
217
+ Tags: (_) => (0, smithy_client_1._json)(_),
218
+ }));
221
219
  return new protocol_http_1.HttpRequest({
222
220
  protocol,
223
221
  hostname,
@@ -234,7 +232,7 @@ const se_UntagResourceCommand = async (input, context) => {
234
232
  const headers = {};
235
233
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
236
234
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
237
- const query = map({
235
+ const query = (0, smithy_client_1.map)({
238
236
  TagKeys: [
239
237
  (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
240
238
  () => (input.TagKeys || []).map((_entry) => _entry),
@@ -261,21 +259,19 @@ const se_UpdateScheduleCommand = async (input, context) => {
261
259
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedules/{Name}";
262
260
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
263
261
  let body;
264
- body = JSON.stringify({
265
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
266
- ...(input.Description != null && { Description: input.Description }),
267
- ...(input.EndDate != null && { EndDate: Math.round(input.EndDate.getTime() / 1000) }),
268
- ...(input.FlexibleTimeWindow != null && {
269
- FlexibleTimeWindow: se_FlexibleTimeWindow(input.FlexibleTimeWindow, context),
270
- }),
271
- ...(input.GroupName != null && { GroupName: input.GroupName }),
272
- ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }),
273
- ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }),
274
- ...(input.ScheduleExpressionTimezone != null && { ScheduleExpressionTimezone: input.ScheduleExpressionTimezone }),
275
- ...(input.StartDate != null && { StartDate: Math.round(input.StartDate.getTime() / 1000) }),
276
- ...(input.State != null && { State: input.State }),
277
- ...(input.Target != null && { Target: se_Target(input.Target, context) }),
278
- });
262
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
263
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
264
+ Description: [],
265
+ EndDate: (_) => Math.round(_.getTime() / 1000),
266
+ FlexibleTimeWindow: (_) => (0, smithy_client_1._json)(_),
267
+ GroupName: [],
268
+ KmsKeyArn: [],
269
+ ScheduleExpression: [],
270
+ ScheduleExpressionTimezone: [],
271
+ StartDate: (_) => Math.round(_.getTime() / 1000),
272
+ State: [],
273
+ Target: (_) => (0, smithy_client_1._json)(_),
274
+ }));
279
275
  return new protocol_http_1.HttpRequest({
280
276
  protocol,
281
277
  hostname,
@@ -291,13 +287,14 @@ const de_CreateScheduleCommand = async (output, context) => {
291
287
  if (output.statusCode !== 200 && output.statusCode >= 300) {
292
288
  return de_CreateScheduleCommandError(output, context);
293
289
  }
294
- const contents = map({
290
+ const contents = (0, smithy_client_1.map)({
295
291
  $metadata: deserializeMetadata(output),
296
292
  });
297
293
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
298
- if (data.ScheduleArn != null) {
299
- contents.ScheduleArn = (0, smithy_client_1.expectString)(data.ScheduleArn);
300
- }
294
+ const doc = (0, smithy_client_1.take)(data, {
295
+ ScheduleArn: smithy_client_1.expectString,
296
+ });
297
+ Object.assign(contents, doc);
301
298
  return contents;
302
299
  };
303
300
  exports.de_CreateScheduleCommand = de_CreateScheduleCommand;
@@ -328,10 +325,9 @@ const de_CreateScheduleCommandError = async (output, context) => {
328
325
  throw await de_ValidationExceptionRes(parsedOutput, context);
329
326
  default:
330
327
  const parsedBody = parsedOutput.body;
331
- (0, smithy_client_1.throwDefaultError)({
328
+ return throwDefaultError({
332
329
  output,
333
330
  parsedBody,
334
- exceptionCtor: SchedulerServiceException_1.SchedulerServiceException,
335
331
  errorCode,
336
332
  });
337
333
  }
@@ -340,13 +336,14 @@ const de_CreateScheduleGroupCommand = async (output, context) => {
340
336
  if (output.statusCode !== 200 && output.statusCode >= 300) {
341
337
  return de_CreateScheduleGroupCommandError(output, context);
342
338
  }
343
- const contents = map({
339
+ const contents = (0, smithy_client_1.map)({
344
340
  $metadata: deserializeMetadata(output),
345
341
  });
346
342
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
347
- if (data.ScheduleGroupArn != null) {
348
- contents.ScheduleGroupArn = (0, smithy_client_1.expectString)(data.ScheduleGroupArn);
349
- }
343
+ const doc = (0, smithy_client_1.take)(data, {
344
+ ScheduleGroupArn: smithy_client_1.expectString,
345
+ });
346
+ Object.assign(contents, doc);
350
347
  return contents;
351
348
  };
352
349
  exports.de_CreateScheduleGroupCommand = de_CreateScheduleGroupCommand;
@@ -374,10 +371,9 @@ const de_CreateScheduleGroupCommandError = async (output, context) => {
374
371
  throw await de_ValidationExceptionRes(parsedOutput, context);
375
372
  default:
376
373
  const parsedBody = parsedOutput.body;
377
- (0, smithy_client_1.throwDefaultError)({
374
+ return throwDefaultError({
378
375
  output,
379
376
  parsedBody,
380
- exceptionCtor: SchedulerServiceException_1.SchedulerServiceException,
381
377
  errorCode,
382
378
  });
383
379
  }
@@ -386,7 +382,7 @@ const de_DeleteScheduleCommand = async (output, context) => {
386
382
  if (output.statusCode !== 200 && output.statusCode >= 300) {
387
383
  return de_DeleteScheduleCommandError(output, context);
388
384
  }
389
- const contents = map({
385
+ const contents = (0, smithy_client_1.map)({
390
386
  $metadata: deserializeMetadata(output),
391
387
  });
392
388
  await collectBody(output.body, context);
@@ -417,10 +413,9 @@ const de_DeleteScheduleCommandError = async (output, context) => {
417
413
  throw await de_ValidationExceptionRes(parsedOutput, context);
418
414
  default:
419
415
  const parsedBody = parsedOutput.body;
420
- (0, smithy_client_1.throwDefaultError)({
416
+ return throwDefaultError({
421
417
  output,
422
418
  parsedBody,
423
- exceptionCtor: SchedulerServiceException_1.SchedulerServiceException,
424
419
  errorCode,
425
420
  });
426
421
  }
@@ -429,7 +424,7 @@ const de_DeleteScheduleGroupCommand = async (output, context) => {
429
424
  if (output.statusCode !== 200 && output.statusCode >= 300) {
430
425
  return de_DeleteScheduleGroupCommandError(output, context);
431
426
  }
432
- const contents = map({
427
+ const contents = (0, smithy_client_1.map)({
433
428
  $metadata: deserializeMetadata(output),
434
429
  });
435
430
  await collectBody(output.body, context);
@@ -460,10 +455,9 @@ const de_DeleteScheduleGroupCommandError = async (output, context) => {
460
455
  throw await de_ValidationExceptionRes(parsedOutput, context);
461
456
  default:
462
457
  const parsedBody = parsedOutput.body;
463
- (0, smithy_client_1.throwDefaultError)({
458
+ return throwDefaultError({
464
459
  output,
465
460
  parsedBody,
466
- exceptionCtor: SchedulerServiceException_1.SchedulerServiceException,
467
461
  errorCode,
468
462
  });
469
463
  }
@@ -472,52 +466,27 @@ const de_GetScheduleCommand = async (output, context) => {
472
466
  if (output.statusCode !== 200 && output.statusCode >= 300) {
473
467
  return de_GetScheduleCommandError(output, context);
474
468
  }
475
- const contents = map({
469
+ const contents = (0, smithy_client_1.map)({
476
470
  $metadata: deserializeMetadata(output),
477
471
  });
478
472
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
479
- if (data.Arn != null) {
480
- contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
481
- }
482
- if (data.CreationDate != null) {
483
- contents.CreationDate = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationDate)));
484
- }
485
- if (data.Description != null) {
486
- contents.Description = (0, smithy_client_1.expectString)(data.Description);
487
- }
488
- if (data.EndDate != null) {
489
- contents.EndDate = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.EndDate)));
490
- }
491
- if (data.FlexibleTimeWindow != null) {
492
- contents.FlexibleTimeWindow = de_FlexibleTimeWindow(data.FlexibleTimeWindow, context);
493
- }
494
- if (data.GroupName != null) {
495
- contents.GroupName = (0, smithy_client_1.expectString)(data.GroupName);
496
- }
497
- if (data.KmsKeyArn != null) {
498
- contents.KmsKeyArn = (0, smithy_client_1.expectString)(data.KmsKeyArn);
499
- }
500
- if (data.LastModificationDate != null) {
501
- contents.LastModificationDate = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastModificationDate)));
502
- }
503
- if (data.Name != null) {
504
- contents.Name = (0, smithy_client_1.expectString)(data.Name);
505
- }
506
- if (data.ScheduleExpression != null) {
507
- contents.ScheduleExpression = (0, smithy_client_1.expectString)(data.ScheduleExpression);
508
- }
509
- if (data.ScheduleExpressionTimezone != null) {
510
- contents.ScheduleExpressionTimezone = (0, smithy_client_1.expectString)(data.ScheduleExpressionTimezone);
511
- }
512
- if (data.StartDate != null) {
513
- contents.StartDate = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.StartDate)));
514
- }
515
- if (data.State != null) {
516
- contents.State = (0, smithy_client_1.expectString)(data.State);
517
- }
518
- if (data.Target != null) {
519
- contents.Target = de_Target(data.Target, context);
520
- }
473
+ const doc = (0, smithy_client_1.take)(data, {
474
+ Arn: smithy_client_1.expectString,
475
+ CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
476
+ Description: smithy_client_1.expectString,
477
+ EndDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
478
+ FlexibleTimeWindow: smithy_client_1._json,
479
+ GroupName: smithy_client_1.expectString,
480
+ KmsKeyArn: smithy_client_1.expectString,
481
+ LastModificationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
482
+ Name: smithy_client_1.expectString,
483
+ ScheduleExpression: smithy_client_1.expectString,
484
+ ScheduleExpressionTimezone: smithy_client_1.expectString,
485
+ StartDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
486
+ State: smithy_client_1.expectString,
487
+ Target: smithy_client_1._json,
488
+ });
489
+ Object.assign(contents, doc);
521
490
  return contents;
522
491
  };
523
492
  exports.de_GetScheduleCommand = de_GetScheduleCommand;
@@ -542,10 +511,9 @@ const de_GetScheduleCommandError = async (output, context) => {
542
511
  throw await de_ValidationExceptionRes(parsedOutput, context);
543
512
  default:
544
513
  const parsedBody = parsedOutput.body;
545
- (0, smithy_client_1.throwDefaultError)({
514
+ return throwDefaultError({
546
515
  output,
547
516
  parsedBody,
548
- exceptionCtor: SchedulerServiceException_1.SchedulerServiceException,
549
517
  errorCode,
550
518
  });
551
519
  }
@@ -554,25 +522,18 @@ const de_GetScheduleGroupCommand = async (output, context) => {
554
522
  if (output.statusCode !== 200 && output.statusCode >= 300) {
555
523
  return de_GetScheduleGroupCommandError(output, context);
556
524
  }
557
- const contents = map({
525
+ const contents = (0, smithy_client_1.map)({
558
526
  $metadata: deserializeMetadata(output),
559
527
  });
560
528
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
561
- if (data.Arn != null) {
562
- contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
563
- }
564
- if (data.CreationDate != null) {
565
- contents.CreationDate = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationDate)));
566
- }
567
- if (data.LastModificationDate != null) {
568
- contents.LastModificationDate = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastModificationDate)));
569
- }
570
- if (data.Name != null) {
571
- contents.Name = (0, smithy_client_1.expectString)(data.Name);
572
- }
573
- if (data.State != null) {
574
- contents.State = (0, smithy_client_1.expectString)(data.State);
575
- }
529
+ const doc = (0, smithy_client_1.take)(data, {
530
+ Arn: smithy_client_1.expectString,
531
+ CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
532
+ LastModificationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
533
+ Name: smithy_client_1.expectString,
534
+ State: smithy_client_1.expectString,
535
+ });
536
+ Object.assign(contents, doc);
576
537
  return contents;
577
538
  };
578
539
  exports.de_GetScheduleGroupCommand = de_GetScheduleGroupCommand;
@@ -597,10 +558,9 @@ const de_GetScheduleGroupCommandError = async (output, context) => {
597
558
  throw await de_ValidationExceptionRes(parsedOutput, context);
598
559
  default:
599
560
  const parsedBody = parsedOutput.body;
600
- (0, smithy_client_1.throwDefaultError)({
561
+ return throwDefaultError({
601
562
  output,
602
563
  parsedBody,
603
- exceptionCtor: SchedulerServiceException_1.SchedulerServiceException,
604
564
  errorCode,
605
565
  });
606
566
  }
@@ -609,16 +569,15 @@ const de_ListScheduleGroupsCommand = async (output, context) => {
609
569
  if (output.statusCode !== 200 && output.statusCode >= 300) {
610
570
  return de_ListScheduleGroupsCommandError(output, context);
611
571
  }
612
- const contents = map({
572
+ const contents = (0, smithy_client_1.map)({
613
573
  $metadata: deserializeMetadata(output),
614
574
  });
615
575
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
616
- if (data.NextToken != null) {
617
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
618
- }
619
- if (data.ScheduleGroups != null) {
620
- contents.ScheduleGroups = de_ScheduleGroupList(data.ScheduleGroups, context);
621
- }
576
+ const doc = (0, smithy_client_1.take)(data, {
577
+ NextToken: smithy_client_1.expectString,
578
+ ScheduleGroups: (_) => de_ScheduleGroupList(_, context),
579
+ });
580
+ Object.assign(contents, doc);
622
581
  return contents;
623
582
  };
624
583
  exports.de_ListScheduleGroupsCommand = de_ListScheduleGroupsCommand;
@@ -640,10 +599,9 @@ const de_ListScheduleGroupsCommandError = async (output, context) => {
640
599
  throw await de_ValidationExceptionRes(parsedOutput, context);
641
600
  default:
642
601
  const parsedBody = parsedOutput.body;
643
- (0, smithy_client_1.throwDefaultError)({
602
+ return throwDefaultError({
644
603
  output,
645
604
  parsedBody,
646
- exceptionCtor: SchedulerServiceException_1.SchedulerServiceException,
647
605
  errorCode,
648
606
  });
649
607
  }
@@ -652,16 +610,15 @@ const de_ListSchedulesCommand = async (output, context) => {
652
610
  if (output.statusCode !== 200 && output.statusCode >= 300) {
653
611
  return de_ListSchedulesCommandError(output, context);
654
612
  }
655
- const contents = map({
613
+ const contents = (0, smithy_client_1.map)({
656
614
  $metadata: deserializeMetadata(output),
657
615
  });
658
616
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
659
- if (data.NextToken != null) {
660
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
661
- }
662
- if (data.Schedules != null) {
663
- contents.Schedules = de_ScheduleList(data.Schedules, context);
664
- }
617
+ const doc = (0, smithy_client_1.take)(data, {
618
+ NextToken: smithy_client_1.expectString,
619
+ Schedules: (_) => de_ScheduleList(_, context),
620
+ });
621
+ Object.assign(contents, doc);
665
622
  return contents;
666
623
  };
667
624
  exports.de_ListSchedulesCommand = de_ListSchedulesCommand;
@@ -686,10 +643,9 @@ const de_ListSchedulesCommandError = async (output, context) => {
686
643
  throw await de_ValidationExceptionRes(parsedOutput, context);
687
644
  default:
688
645
  const parsedBody = parsedOutput.body;
689
- (0, smithy_client_1.throwDefaultError)({
646
+ return throwDefaultError({
690
647
  output,
691
648
  parsedBody,
692
- exceptionCtor: SchedulerServiceException_1.SchedulerServiceException,
693
649
  errorCode,
694
650
  });
695
651
  }
@@ -698,13 +654,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
698
654
  if (output.statusCode !== 200 && output.statusCode >= 300) {
699
655
  return de_ListTagsForResourceCommandError(output, context);
700
656
  }
701
- const contents = map({
657
+ const contents = (0, smithy_client_1.map)({
702
658
  $metadata: deserializeMetadata(output),
703
659
  });
704
660
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
705
- if (data.Tags != null) {
706
- contents.Tags = de_TagList(data.Tags, context);
707
- }
661
+ const doc = (0, smithy_client_1.take)(data, {
662
+ Tags: smithy_client_1._json,
663
+ });
664
+ Object.assign(contents, doc);
708
665
  return contents;
709
666
  };
710
667
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -729,10 +686,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
729
686
  throw await de_ValidationExceptionRes(parsedOutput, context);
730
687
  default:
731
688
  const parsedBody = parsedOutput.body;
732
- (0, smithy_client_1.throwDefaultError)({
689
+ return throwDefaultError({
733
690
  output,
734
691
  parsedBody,
735
- exceptionCtor: SchedulerServiceException_1.SchedulerServiceException,
736
692
  errorCode,
737
693
  });
738
694
  }
@@ -741,7 +697,7 @@ const de_TagResourceCommand = async (output, context) => {
741
697
  if (output.statusCode !== 200 && output.statusCode >= 300) {
742
698
  return de_TagResourceCommandError(output, context);
743
699
  }
744
- const contents = map({
700
+ const contents = (0, smithy_client_1.map)({
745
701
  $metadata: deserializeMetadata(output),
746
702
  });
747
703
  await collectBody(output.body, context);
@@ -772,10 +728,9 @@ const de_TagResourceCommandError = async (output, context) => {
772
728
  throw await de_ValidationExceptionRes(parsedOutput, context);
773
729
  default:
774
730
  const parsedBody = parsedOutput.body;
775
- (0, smithy_client_1.throwDefaultError)({
731
+ return throwDefaultError({
776
732
  output,
777
733
  parsedBody,
778
- exceptionCtor: SchedulerServiceException_1.SchedulerServiceException,
779
734
  errorCode,
780
735
  });
781
736
  }
@@ -784,7 +739,7 @@ const de_UntagResourceCommand = async (output, context) => {
784
739
  if (output.statusCode !== 200 && output.statusCode >= 300) {
785
740
  return de_UntagResourceCommandError(output, context);
786
741
  }
787
- const contents = map({
742
+ const contents = (0, smithy_client_1.map)({
788
743
  $metadata: deserializeMetadata(output),
789
744
  });
790
745
  await collectBody(output.body, context);
@@ -815,10 +770,9 @@ const de_UntagResourceCommandError = async (output, context) => {
815
770
  throw await de_ValidationExceptionRes(parsedOutput, context);
816
771
  default:
817
772
  const parsedBody = parsedOutput.body;
818
- (0, smithy_client_1.throwDefaultError)({
773
+ return throwDefaultError({
819
774
  output,
820
775
  parsedBody,
821
- exceptionCtor: SchedulerServiceException_1.SchedulerServiceException,
822
776
  errorCode,
823
777
  });
824
778
  }
@@ -827,13 +781,14 @@ const de_UpdateScheduleCommand = async (output, context) => {
827
781
  if (output.statusCode !== 200 && output.statusCode >= 300) {
828
782
  return de_UpdateScheduleCommandError(output, context);
829
783
  }
830
- const contents = map({
784
+ const contents = (0, smithy_client_1.map)({
831
785
  $metadata: deserializeMetadata(output),
832
786
  });
833
787
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
834
- if (data.ScheduleArn != null) {
835
- contents.ScheduleArn = (0, smithy_client_1.expectString)(data.ScheduleArn);
836
- }
788
+ const doc = (0, smithy_client_1.take)(data, {
789
+ ScheduleArn: smithy_client_1.expectString,
790
+ });
791
+ Object.assign(contents, doc);
837
792
  return contents;
838
793
  };
839
794
  exports.de_UpdateScheduleCommand = de_UpdateScheduleCommand;
@@ -861,21 +816,21 @@ const de_UpdateScheduleCommandError = async (output, context) => {
861
816
  throw await de_ValidationExceptionRes(parsedOutput, context);
862
817
  default:
863
818
  const parsedBody = parsedOutput.body;
864
- (0, smithy_client_1.throwDefaultError)({
819
+ return throwDefaultError({
865
820
  output,
866
821
  parsedBody,
867
- exceptionCtor: SchedulerServiceException_1.SchedulerServiceException,
868
822
  errorCode,
869
823
  });
870
824
  }
871
825
  };
872
- const map = smithy_client_1.map;
826
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(SchedulerServiceException_1.SchedulerServiceException);
873
827
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
874
- const contents = map({});
828
+ const contents = (0, smithy_client_1.map)({});
875
829
  const data = parsedOutput.body;
876
- if (data.Message != null) {
877
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
878
- }
830
+ const doc = (0, smithy_client_1.take)(data, {
831
+ Message: smithy_client_1.expectString,
832
+ });
833
+ Object.assign(contents, doc);
879
834
  const exception = new models_0_1.ConflictException({
880
835
  $metadata: deserializeMetadata(parsedOutput),
881
836
  ...contents,
@@ -883,11 +838,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
883
838
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
884
839
  };
885
840
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
886
- const contents = map({});
841
+ const contents = (0, smithy_client_1.map)({});
887
842
  const data = parsedOutput.body;
888
- if (data.Message != null) {
889
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
890
- }
843
+ const doc = (0, smithy_client_1.take)(data, {
844
+ Message: smithy_client_1.expectString,
845
+ });
846
+ Object.assign(contents, doc);
891
847
  const exception = new models_0_1.InternalServerException({
892
848
  $metadata: deserializeMetadata(parsedOutput),
893
849
  ...contents,
@@ -895,11 +851,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
895
851
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
896
852
  };
897
853
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
898
- const contents = map({});
854
+ const contents = (0, smithy_client_1.map)({});
899
855
  const data = parsedOutput.body;
900
- if (data.Message != null) {
901
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
902
- }
856
+ const doc = (0, smithy_client_1.take)(data, {
857
+ Message: smithy_client_1.expectString,
858
+ });
859
+ Object.assign(contents, doc);
903
860
  const exception = new models_0_1.ResourceNotFoundException({
904
861
  $metadata: deserializeMetadata(parsedOutput),
905
862
  ...contents,
@@ -907,11 +864,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
907
864
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
908
865
  };
909
866
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
910
- const contents = map({});
867
+ const contents = (0, smithy_client_1.map)({});
911
868
  const data = parsedOutput.body;
912
- if (data.Message != null) {
913
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
914
- }
869
+ const doc = (0, smithy_client_1.take)(data, {
870
+ Message: smithy_client_1.expectString,
871
+ });
872
+ Object.assign(contents, doc);
915
873
  const exception = new models_0_1.ServiceQuotaExceededException({
916
874
  $metadata: deserializeMetadata(parsedOutput),
917
875
  ...contents,
@@ -919,11 +877,12 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
919
877
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
920
878
  };
921
879
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
922
- const contents = map({});
880
+ const contents = (0, smithy_client_1.map)({});
923
881
  const data = parsedOutput.body;
924
- if (data.Message != null) {
925
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
926
- }
882
+ const doc = (0, smithy_client_1.take)(data, {
883
+ Message: smithy_client_1.expectString,
884
+ });
885
+ Object.assign(contents, doc);
927
886
  const exception = new models_0_1.ThrottlingException({
928
887
  $metadata: deserializeMetadata(parsedOutput),
929
888
  ...contents,
@@ -931,485 +890,53 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
931
890
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
932
891
  };
933
892
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
934
- const contents = map({});
893
+ const contents = (0, smithy_client_1.map)({});
935
894
  const data = parsedOutput.body;
936
- if (data.Message != null) {
937
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
938
- }
895
+ const doc = (0, smithy_client_1.take)(data, {
896
+ Message: smithy_client_1.expectString,
897
+ });
898
+ Object.assign(contents, doc);
939
899
  const exception = new models_0_1.ValidationException({
940
900
  $metadata: deserializeMetadata(parsedOutput),
941
901
  ...contents,
942
902
  });
943
903
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
944
904
  };
945
- const se_AwsVpcConfiguration = (input, context) => {
946
- return {
947
- ...(input.AssignPublicIp != null && { AssignPublicIp: input.AssignPublicIp }),
948
- ...(input.SecurityGroups != null && { SecurityGroups: se_SecurityGroups(input.SecurityGroups, context) }),
949
- ...(input.Subnets != null && { Subnets: se_Subnets(input.Subnets, context) }),
950
- };
951
- };
952
- const se_CapacityProviderStrategy = (input, context) => {
953
- return input
954
- .filter((e) => e != null)
955
- .map((entry) => {
956
- return se_CapacityProviderStrategyItem(entry, context);
957
- });
958
- };
959
- const se_CapacityProviderStrategyItem = (input, context) => {
960
- return {
961
- ...(input.base != null && { base: input.base }),
962
- ...(input.capacityProvider != null && { capacityProvider: input.capacityProvider }),
963
- ...(input.weight != null && { weight: input.weight }),
964
- };
965
- };
966
- const se_DeadLetterConfig = (input, context) => {
967
- return {
968
- ...(input.Arn != null && { Arn: input.Arn }),
969
- };
970
- };
971
- const se_EcsParameters = (input, context) => {
972
- return {
973
- ...(input.CapacityProviderStrategy != null && {
974
- CapacityProviderStrategy: se_CapacityProviderStrategy(input.CapacityProviderStrategy, context),
975
- }),
976
- ...(input.EnableECSManagedTags != null && { EnableECSManagedTags: input.EnableECSManagedTags }),
977
- ...(input.EnableExecuteCommand != null && { EnableExecuteCommand: input.EnableExecuteCommand }),
978
- ...(input.Group != null && { Group: input.Group }),
979
- ...(input.LaunchType != null && { LaunchType: input.LaunchType }),
980
- ...(input.NetworkConfiguration != null && {
981
- NetworkConfiguration: se_NetworkConfiguration(input.NetworkConfiguration, context),
982
- }),
983
- ...(input.PlacementConstraints != null && {
984
- PlacementConstraints: se_PlacementConstraints(input.PlacementConstraints, context),
985
- }),
986
- ...(input.PlacementStrategy != null && {
987
- PlacementStrategy: se_PlacementStrategies(input.PlacementStrategy, context),
988
- }),
989
- ...(input.PlatformVersion != null && { PlatformVersion: input.PlatformVersion }),
990
- ...(input.PropagateTags != null && { PropagateTags: input.PropagateTags }),
991
- ...(input.ReferenceId != null && { ReferenceId: input.ReferenceId }),
992
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
993
- ...(input.TaskCount != null && { TaskCount: input.TaskCount }),
994
- ...(input.TaskDefinitionArn != null && { TaskDefinitionArn: input.TaskDefinitionArn }),
995
- };
996
- };
997
- const se_EventBridgeParameters = (input, context) => {
998
- return {
999
- ...(input.DetailType != null && { DetailType: input.DetailType }),
1000
- ...(input.Source != null && { Source: input.Source }),
1001
- };
1002
- };
1003
- const se_FlexibleTimeWindow = (input, context) => {
1004
- return {
1005
- ...(input.MaximumWindowInMinutes != null && { MaximumWindowInMinutes: input.MaximumWindowInMinutes }),
1006
- ...(input.Mode != null && { Mode: input.Mode }),
1007
- };
1008
- };
1009
- const se_KinesisParameters = (input, context) => {
1010
- return {
1011
- ...(input.PartitionKey != null && { PartitionKey: input.PartitionKey }),
1012
- };
1013
- };
1014
- const se_NetworkConfiguration = (input, context) => {
1015
- return {
1016
- ...(input.awsvpcConfiguration != null && {
1017
- awsvpcConfiguration: se_AwsVpcConfiguration(input.awsvpcConfiguration, context),
1018
- }),
1019
- };
1020
- };
1021
- const se_PlacementConstraint = (input, context) => {
1022
- return {
1023
- ...(input.expression != null && { expression: input.expression }),
1024
- ...(input.type != null && { type: input.type }),
1025
- };
1026
- };
1027
- const se_PlacementConstraints = (input, context) => {
1028
- return input
1029
- .filter((e) => e != null)
1030
- .map((entry) => {
1031
- return se_PlacementConstraint(entry, context);
1032
- });
1033
- };
1034
- const se_PlacementStrategies = (input, context) => {
1035
- return input
1036
- .filter((e) => e != null)
1037
- .map((entry) => {
1038
- return se_PlacementStrategy(entry, context);
1039
- });
1040
- };
1041
- const se_PlacementStrategy = (input, context) => {
1042
- return {
1043
- ...(input.field != null && { field: input.field }),
1044
- ...(input.type != null && { type: input.type }),
1045
- };
1046
- };
1047
- const se_RetryPolicy = (input, context) => {
1048
- return {
1049
- ...(input.MaximumEventAgeInSeconds != null && { MaximumEventAgeInSeconds: input.MaximumEventAgeInSeconds }),
1050
- ...(input.MaximumRetryAttempts != null && { MaximumRetryAttempts: input.MaximumRetryAttempts }),
1051
- };
1052
- };
1053
- const se_SageMakerPipelineParameter = (input, context) => {
1054
- return {
1055
- ...(input.Name != null && { Name: input.Name }),
1056
- ...(input.Value != null && { Value: input.Value }),
1057
- };
1058
- };
1059
- const se_SageMakerPipelineParameterList = (input, context) => {
1060
- return input
1061
- .filter((e) => e != null)
1062
- .map((entry) => {
1063
- return se_SageMakerPipelineParameter(entry, context);
1064
- });
1065
- };
1066
- const se_SageMakerPipelineParameters = (input, context) => {
1067
- return {
1068
- ...(input.PipelineParameterList != null && {
1069
- PipelineParameterList: se_SageMakerPipelineParameterList(input.PipelineParameterList, context),
1070
- }),
1071
- };
1072
- };
1073
- const se_SecurityGroups = (input, context) => {
1074
- return input
1075
- .filter((e) => e != null)
1076
- .map((entry) => {
1077
- return entry;
1078
- });
1079
- };
1080
- const se_SqsParameters = (input, context) => {
1081
- return {
1082
- ...(input.MessageGroupId != null && { MessageGroupId: input.MessageGroupId }),
1083
- };
1084
- };
1085
- const se_Subnets = (input, context) => {
1086
- return input
1087
- .filter((e) => e != null)
1088
- .map((entry) => {
1089
- return entry;
1090
- });
1091
- };
1092
- const se_Tag = (input, context) => {
1093
- return {
1094
- ...(input.Key != null && { Key: input.Key }),
1095
- ...(input.Value != null && { Value: input.Value }),
1096
- };
1097
- };
1098
- const se_TagList = (input, context) => {
1099
- return input
1100
- .filter((e) => e != null)
1101
- .map((entry) => {
1102
- return se_Tag(entry, context);
1103
- });
1104
- };
1105
- const se_TagMap = (input, context) => {
1106
- return Object.entries(input).reduce((acc, [key, value]) => {
1107
- if (value === null) {
1108
- return acc;
1109
- }
1110
- acc[key] = value;
1111
- return acc;
1112
- }, {});
1113
- };
1114
- const se_Tags = (input, context) => {
1115
- return input
1116
- .filter((e) => e != null)
1117
- .map((entry) => {
1118
- return se_TagMap(entry, context);
1119
- });
1120
- };
1121
- const se_Target = (input, context) => {
1122
- return {
1123
- ...(input.Arn != null && { Arn: input.Arn }),
1124
- ...(input.DeadLetterConfig != null && { DeadLetterConfig: se_DeadLetterConfig(input.DeadLetterConfig, context) }),
1125
- ...(input.EcsParameters != null && { EcsParameters: se_EcsParameters(input.EcsParameters, context) }),
1126
- ...(input.EventBridgeParameters != null && {
1127
- EventBridgeParameters: se_EventBridgeParameters(input.EventBridgeParameters, context),
1128
- }),
1129
- ...(input.Input != null && { Input: input.Input }),
1130
- ...(input.KinesisParameters != null && {
1131
- KinesisParameters: se_KinesisParameters(input.KinesisParameters, context),
1132
- }),
1133
- ...(input.RetryPolicy != null && { RetryPolicy: se_RetryPolicy(input.RetryPolicy, context) }),
1134
- ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
1135
- ...(input.SageMakerPipelineParameters != null && {
1136
- SageMakerPipelineParameters: se_SageMakerPipelineParameters(input.SageMakerPipelineParameters, context),
1137
- }),
1138
- ...(input.SqsParameters != null && { SqsParameters: se_SqsParameters(input.SqsParameters, context) }),
1139
- };
1140
- };
1141
- const de_AwsVpcConfiguration = (output, context) => {
1142
- return {
1143
- AssignPublicIp: (0, smithy_client_1.expectString)(output.AssignPublicIp),
1144
- SecurityGroups: output.SecurityGroups != null ? de_SecurityGroups(output.SecurityGroups, context) : undefined,
1145
- Subnets: output.Subnets != null ? de_Subnets(output.Subnets, context) : undefined,
1146
- };
1147
- };
1148
- const de_CapacityProviderStrategy = (output, context) => {
1149
- const retVal = (output || [])
1150
- .filter((e) => e != null)
1151
- .map((entry) => {
1152
- if (entry === null) {
1153
- return null;
1154
- }
1155
- return de_CapacityProviderStrategyItem(entry, context);
1156
- });
1157
- return retVal;
1158
- };
1159
- const de_CapacityProviderStrategyItem = (output, context) => {
1160
- return {
1161
- base: (0, smithy_client_1.expectInt32)(output.base),
1162
- capacityProvider: (0, smithy_client_1.expectString)(output.capacityProvider),
1163
- weight: (0, smithy_client_1.expectInt32)(output.weight),
1164
- };
1165
- };
1166
- const de_DeadLetterConfig = (output, context) => {
1167
- return {
1168
- Arn: (0, smithy_client_1.expectString)(output.Arn),
1169
- };
1170
- };
1171
- const de_EcsParameters = (output, context) => {
1172
- return {
1173
- CapacityProviderStrategy: output.CapacityProviderStrategy != null
1174
- ? de_CapacityProviderStrategy(output.CapacityProviderStrategy, context)
1175
- : undefined,
1176
- EnableECSManagedTags: (0, smithy_client_1.expectBoolean)(output.EnableECSManagedTags),
1177
- EnableExecuteCommand: (0, smithy_client_1.expectBoolean)(output.EnableExecuteCommand),
1178
- Group: (0, smithy_client_1.expectString)(output.Group),
1179
- LaunchType: (0, smithy_client_1.expectString)(output.LaunchType),
1180
- NetworkConfiguration: output.NetworkConfiguration != null ? de_NetworkConfiguration(output.NetworkConfiguration, context) : undefined,
1181
- PlacementConstraints: output.PlacementConstraints != null ? de_PlacementConstraints(output.PlacementConstraints, context) : undefined,
1182
- PlacementStrategy: output.PlacementStrategy != null ? de_PlacementStrategies(output.PlacementStrategy, context) : undefined,
1183
- PlatformVersion: (0, smithy_client_1.expectString)(output.PlatformVersion),
1184
- PropagateTags: (0, smithy_client_1.expectString)(output.PropagateTags),
1185
- ReferenceId: (0, smithy_client_1.expectString)(output.ReferenceId),
1186
- Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined,
1187
- TaskCount: (0, smithy_client_1.expectInt32)(output.TaskCount),
1188
- TaskDefinitionArn: (0, smithy_client_1.expectString)(output.TaskDefinitionArn),
1189
- };
1190
- };
1191
- const de_EventBridgeParameters = (output, context) => {
1192
- return {
1193
- DetailType: (0, smithy_client_1.expectString)(output.DetailType),
1194
- Source: (0, smithy_client_1.expectString)(output.Source),
1195
- };
1196
- };
1197
- const de_FlexibleTimeWindow = (output, context) => {
1198
- return {
1199
- MaximumWindowInMinutes: (0, smithy_client_1.expectInt32)(output.MaximumWindowInMinutes),
1200
- Mode: (0, smithy_client_1.expectString)(output.Mode),
1201
- };
1202
- };
1203
- const de_KinesisParameters = (output, context) => {
1204
- return {
1205
- PartitionKey: (0, smithy_client_1.expectString)(output.PartitionKey),
1206
- };
1207
- };
1208
- const de_NetworkConfiguration = (output, context) => {
1209
- return {
1210
- awsvpcConfiguration: output.awsvpcConfiguration != null ? de_AwsVpcConfiguration(output.awsvpcConfiguration, context) : undefined,
1211
- };
1212
- };
1213
- const de_PlacementConstraint = (output, context) => {
1214
- return {
1215
- expression: (0, smithy_client_1.expectString)(output.expression),
1216
- type: (0, smithy_client_1.expectString)(output.type),
1217
- };
1218
- };
1219
- const de_PlacementConstraints = (output, context) => {
1220
- const retVal = (output || [])
1221
- .filter((e) => e != null)
1222
- .map((entry) => {
1223
- if (entry === null) {
1224
- return null;
1225
- }
1226
- return de_PlacementConstraint(entry, context);
1227
- });
1228
- return retVal;
1229
- };
1230
- const de_PlacementStrategies = (output, context) => {
1231
- const retVal = (output || [])
1232
- .filter((e) => e != null)
1233
- .map((entry) => {
1234
- if (entry === null) {
1235
- return null;
1236
- }
1237
- return de_PlacementStrategy(entry, context);
1238
- });
1239
- return retVal;
1240
- };
1241
- const de_PlacementStrategy = (output, context) => {
1242
- return {
1243
- field: (0, smithy_client_1.expectString)(output.field),
1244
- type: (0, smithy_client_1.expectString)(output.type),
1245
- };
1246
- };
1247
- const de_RetryPolicy = (output, context) => {
1248
- return {
1249
- MaximumEventAgeInSeconds: (0, smithy_client_1.expectInt32)(output.MaximumEventAgeInSeconds),
1250
- MaximumRetryAttempts: (0, smithy_client_1.expectInt32)(output.MaximumRetryAttempts),
1251
- };
1252
- };
1253
- const de_SageMakerPipelineParameter = (output, context) => {
1254
- return {
1255
- Name: (0, smithy_client_1.expectString)(output.Name),
1256
- Value: (0, smithy_client_1.expectString)(output.Value),
1257
- };
1258
- };
1259
- const de_SageMakerPipelineParameterList = (output, context) => {
1260
- const retVal = (output || [])
1261
- .filter((e) => e != null)
1262
- .map((entry) => {
1263
- if (entry === null) {
1264
- return null;
1265
- }
1266
- return de_SageMakerPipelineParameter(entry, context);
1267
- });
1268
- return retVal;
1269
- };
1270
- const de_SageMakerPipelineParameters = (output, context) => {
1271
- return {
1272
- PipelineParameterList: output.PipelineParameterList != null
1273
- ? de_SageMakerPipelineParameterList(output.PipelineParameterList, context)
1274
- : undefined,
1275
- };
1276
- };
1277
905
  const de_ScheduleGroupList = (output, context) => {
1278
906
  const retVal = (output || [])
1279
907
  .filter((e) => e != null)
1280
908
  .map((entry) => {
1281
- if (entry === null) {
1282
- return null;
1283
- }
1284
909
  return de_ScheduleGroupSummary(entry, context);
1285
910
  });
1286
911
  return retVal;
1287
912
  };
1288
913
  const de_ScheduleGroupSummary = (output, context) => {
1289
- return {
1290
- Arn: (0, smithy_client_1.expectString)(output.Arn),
1291
- CreationDate: output.CreationDate != null
1292
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationDate)))
1293
- : undefined,
1294
- LastModificationDate: output.LastModificationDate != null
1295
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastModificationDate)))
1296
- : undefined,
1297
- Name: (0, smithy_client_1.expectString)(output.Name),
1298
- State: (0, smithy_client_1.expectString)(output.State),
1299
- };
914
+ return (0, smithy_client_1.take)(output, {
915
+ Arn: smithy_client_1.expectString,
916
+ CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
917
+ LastModificationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
918
+ Name: smithy_client_1.expectString,
919
+ State: smithy_client_1.expectString,
920
+ });
1300
921
  };
1301
922
  const de_ScheduleList = (output, context) => {
1302
923
  const retVal = (output || [])
1303
924
  .filter((e) => e != null)
1304
925
  .map((entry) => {
1305
- if (entry === null) {
1306
- return null;
1307
- }
1308
926
  return de_ScheduleSummary(entry, context);
1309
927
  });
1310
928
  return retVal;
1311
929
  };
1312
930
  const de_ScheduleSummary = (output, context) => {
1313
- return {
1314
- Arn: (0, smithy_client_1.expectString)(output.Arn),
1315
- CreationDate: output.CreationDate != null
1316
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationDate)))
1317
- : undefined,
1318
- GroupName: (0, smithy_client_1.expectString)(output.GroupName),
1319
- LastModificationDate: output.LastModificationDate != null
1320
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastModificationDate)))
1321
- : undefined,
1322
- Name: (0, smithy_client_1.expectString)(output.Name),
1323
- State: (0, smithy_client_1.expectString)(output.State),
1324
- Target: output.Target != null ? de_TargetSummary(output.Target, context) : undefined,
1325
- };
1326
- };
1327
- const de_SecurityGroups = (output, context) => {
1328
- const retVal = (output || [])
1329
- .filter((e) => e != null)
1330
- .map((entry) => {
1331
- if (entry === null) {
1332
- return null;
1333
- }
1334
- return (0, smithy_client_1.expectString)(entry);
1335
- });
1336
- return retVal;
1337
- };
1338
- const de_SqsParameters = (output, context) => {
1339
- return {
1340
- MessageGroupId: (0, smithy_client_1.expectString)(output.MessageGroupId),
1341
- };
1342
- };
1343
- const de_Subnets = (output, context) => {
1344
- const retVal = (output || [])
1345
- .filter((e) => e != null)
1346
- .map((entry) => {
1347
- if (entry === null) {
1348
- return null;
1349
- }
1350
- return (0, smithy_client_1.expectString)(entry);
1351
- });
1352
- return retVal;
1353
- };
1354
- const de_Tag = (output, context) => {
1355
- return {
1356
- Key: (0, smithy_client_1.expectString)(output.Key),
1357
- Value: (0, smithy_client_1.expectString)(output.Value),
1358
- };
1359
- };
1360
- const de_TagList = (output, context) => {
1361
- const retVal = (output || [])
1362
- .filter((e) => e != null)
1363
- .map((entry) => {
1364
- if (entry === null) {
1365
- return null;
1366
- }
1367
- return de_Tag(entry, context);
1368
- });
1369
- return retVal;
1370
- };
1371
- const de_TagMap = (output, context) => {
1372
- return Object.entries(output).reduce((acc, [key, value]) => {
1373
- if (value === null) {
1374
- return acc;
1375
- }
1376
- acc[key] = (0, smithy_client_1.expectString)(value);
1377
- return acc;
1378
- }, {});
1379
- };
1380
- const de_Tags = (output, context) => {
1381
- const retVal = (output || [])
1382
- .filter((e) => e != null)
1383
- .map((entry) => {
1384
- if (entry === null) {
1385
- return null;
1386
- }
1387
- return de_TagMap(entry, context);
931
+ return (0, smithy_client_1.take)(output, {
932
+ Arn: smithy_client_1.expectString,
933
+ CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
934
+ GroupName: smithy_client_1.expectString,
935
+ LastModificationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
936
+ Name: smithy_client_1.expectString,
937
+ State: smithy_client_1.expectString,
938
+ Target: smithy_client_1._json,
1388
939
  });
1389
- return retVal;
1390
- };
1391
- const de_Target = (output, context) => {
1392
- return {
1393
- Arn: (0, smithy_client_1.expectString)(output.Arn),
1394
- DeadLetterConfig: output.DeadLetterConfig != null ? de_DeadLetterConfig(output.DeadLetterConfig, context) : undefined,
1395
- EcsParameters: output.EcsParameters != null ? de_EcsParameters(output.EcsParameters, context) : undefined,
1396
- EventBridgeParameters: output.EventBridgeParameters != null
1397
- ? de_EventBridgeParameters(output.EventBridgeParameters, context)
1398
- : undefined,
1399
- Input: (0, smithy_client_1.expectString)(output.Input),
1400
- KinesisParameters: output.KinesisParameters != null ? de_KinesisParameters(output.KinesisParameters, context) : undefined,
1401
- RetryPolicy: output.RetryPolicy != null ? de_RetryPolicy(output.RetryPolicy, context) : undefined,
1402
- RoleArn: (0, smithy_client_1.expectString)(output.RoleArn),
1403
- SageMakerPipelineParameters: output.SageMakerPipelineParameters != null
1404
- ? de_SageMakerPipelineParameters(output.SageMakerPipelineParameters, context)
1405
- : undefined,
1406
- SqsParameters: output.SqsParameters != null ? de_SqsParameters(output.SqsParameters, context) : undefined,
1407
- };
1408
- };
1409
- const de_TargetSummary = (output, context) => {
1410
- return {
1411
- Arn: (0, smithy_client_1.expectString)(output.Arn),
1412
- };
1413
940
  };
1414
941
  const deserializeMetadata = (output) => ({
1415
942
  httpStatusCode: output.statusCode,