@aws-sdk/client-resource-groups 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.
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { BadRequestException, ForbiddenException, InternalServerErrorException, MethodNotAllowedException, NotFoundException, TooManyRequestsException, UnauthorizedException, } from "../models/models_0";
4
4
  import { ResourceGroupsServiceException as __BaseException } from "../models/ResourceGroupsServiceException";
5
5
  export const se_CreateGroupCommand = async (input, context) => {
@@ -9,13 +9,13 @@ export const se_CreateGroupCommand = async (input, context) => {
9
9
  };
10
10
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/groups";
11
11
  let body;
12
- body = JSON.stringify({
13
- ...(input.Configuration != null && { Configuration: se_GroupConfigurationList(input.Configuration, context) }),
14
- ...(input.Description != null && { Description: input.Description }),
15
- ...(input.Name != null && { Name: input.Name }),
16
- ...(input.ResourceQuery != null && { ResourceQuery: se_ResourceQuery(input.ResourceQuery, context) }),
17
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
18
- });
12
+ body = JSON.stringify(take(input, {
13
+ Configuration: (_) => _json(_),
14
+ Description: [],
15
+ Name: [],
16
+ ResourceQuery: (_) => _json(_),
17
+ Tags: (_) => _json(_),
18
+ }));
19
19
  return new __HttpRequest({
20
20
  protocol,
21
21
  hostname,
@@ -33,10 +33,10 @@ export const se_DeleteGroupCommand = async (input, context) => {
33
33
  };
34
34
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-group";
35
35
  let body;
36
- body = JSON.stringify({
37
- ...(input.Group != null && { Group: input.Group }),
38
- ...(input.GroupName != null && { GroupName: input.GroupName }),
39
- });
36
+ body = JSON.stringify(take(input, {
37
+ Group: [],
38
+ GroupName: [],
39
+ }));
40
40
  return new __HttpRequest({
41
41
  protocol,
42
42
  hostname,
@@ -72,10 +72,10 @@ export const se_GetGroupCommand = async (input, context) => {
72
72
  };
73
73
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-group";
74
74
  let body;
75
- body = JSON.stringify({
76
- ...(input.Group != null && { Group: input.Group }),
77
- ...(input.GroupName != null && { GroupName: input.GroupName }),
78
- });
75
+ body = JSON.stringify(take(input, {
76
+ Group: [],
77
+ GroupName: [],
78
+ }));
79
79
  return new __HttpRequest({
80
80
  protocol,
81
81
  hostname,
@@ -93,9 +93,9 @@ export const se_GetGroupConfigurationCommand = async (input, context) => {
93
93
  };
94
94
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-group-configuration";
95
95
  let body;
96
- body = JSON.stringify({
97
- ...(input.Group != null && { Group: input.Group }),
98
- });
96
+ body = JSON.stringify(take(input, {
97
+ Group: [],
98
+ }));
99
99
  return new __HttpRequest({
100
100
  protocol,
101
101
  hostname,
@@ -113,10 +113,10 @@ export const se_GetGroupQueryCommand = async (input, context) => {
113
113
  };
114
114
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-group-query";
115
115
  let body;
116
- body = JSON.stringify({
117
- ...(input.Group != null && { Group: input.Group }),
118
- ...(input.GroupName != null && { GroupName: input.GroupName }),
119
- });
116
+ body = JSON.stringify(take(input, {
117
+ Group: [],
118
+ GroupName: [],
119
+ }));
120
120
  return new __HttpRequest({
121
121
  protocol,
122
122
  hostname,
@@ -150,10 +150,10 @@ export const se_GroupResourcesCommand = async (input, context) => {
150
150
  };
151
151
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/group-resources";
152
152
  let body;
153
- body = JSON.stringify({
154
- ...(input.Group != null && { Group: input.Group }),
155
- ...(input.ResourceArns != null && { ResourceArns: se_ResourceArnList(input.ResourceArns, context) }),
156
- });
153
+ body = JSON.stringify(take(input, {
154
+ Group: [],
155
+ ResourceArns: (_) => _json(_),
156
+ }));
157
157
  return new __HttpRequest({
158
158
  protocol,
159
159
  hostname,
@@ -171,13 +171,13 @@ export const se_ListGroupResourcesCommand = async (input, context) => {
171
171
  };
172
172
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-group-resources";
173
173
  let body;
174
- body = JSON.stringify({
175
- ...(input.Filters != null && { Filters: se_ResourceFilterList(input.Filters, context) }),
176
- ...(input.Group != null && { Group: input.Group }),
177
- ...(input.GroupName != null && { GroupName: input.GroupName }),
178
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
179
- ...(input.NextToken != null && { NextToken: input.NextToken }),
180
- });
174
+ body = JSON.stringify(take(input, {
175
+ Filters: (_) => _json(_),
176
+ Group: [],
177
+ GroupName: [],
178
+ MaxResults: [],
179
+ NextToken: [],
180
+ }));
181
181
  return new __HttpRequest({
182
182
  protocol,
183
183
  hostname,
@@ -199,9 +199,9 @@ export const se_ListGroupsCommand = async (input, context) => {
199
199
  nextToken: [, input.NextToken],
200
200
  });
201
201
  let body;
202
- body = JSON.stringify({
203
- ...(input.Filters != null && { Filters: se_GroupFilterList(input.Filters, context) }),
204
- });
202
+ body = JSON.stringify(take(input, {
203
+ Filters: (_) => _json(_),
204
+ }));
205
205
  return new __HttpRequest({
206
206
  protocol,
207
207
  hostname,
@@ -220,10 +220,10 @@ export const se_PutGroupConfigurationCommand = async (input, context) => {
220
220
  };
221
221
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/put-group-configuration";
222
222
  let body;
223
- body = JSON.stringify({
224
- ...(input.Configuration != null && { Configuration: se_GroupConfigurationList(input.Configuration, context) }),
225
- ...(input.Group != null && { Group: input.Group }),
226
- });
223
+ body = JSON.stringify(take(input, {
224
+ Configuration: (_) => _json(_),
225
+ Group: [],
226
+ }));
227
227
  return new __HttpRequest({
228
228
  protocol,
229
229
  hostname,
@@ -241,11 +241,11 @@ export const se_SearchResourcesCommand = async (input, context) => {
241
241
  };
242
242
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resources/search";
243
243
  let body;
244
- body = JSON.stringify({
245
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
246
- ...(input.NextToken != null && { NextToken: input.NextToken }),
247
- ...(input.ResourceQuery != null && { ResourceQuery: se_ResourceQuery(input.ResourceQuery, context) }),
248
- });
244
+ body = JSON.stringify(take(input, {
245
+ MaxResults: [],
246
+ NextToken: [],
247
+ ResourceQuery: (_) => _json(_),
248
+ }));
249
249
  return new __HttpRequest({
250
250
  protocol,
251
251
  hostname,
@@ -264,9 +264,9 @@ export const se_TagCommand = async (input, context) => {
264
264
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resources/{Arn}/tags";
265
265
  resolvedPath = __resolvedPath(resolvedPath, input, "Arn", () => input.Arn, "{Arn}", false);
266
266
  let body;
267
- body = JSON.stringify({
268
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
269
- });
267
+ body = JSON.stringify(take(input, {
268
+ Tags: (_) => _json(_),
269
+ }));
270
270
  return new __HttpRequest({
271
271
  protocol,
272
272
  hostname,
@@ -284,10 +284,10 @@ export const se_UngroupResourcesCommand = async (input, context) => {
284
284
  };
285
285
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ungroup-resources";
286
286
  let body;
287
- body = JSON.stringify({
288
- ...(input.Group != null && { Group: input.Group }),
289
- ...(input.ResourceArns != null && { ResourceArns: se_ResourceArnList(input.ResourceArns, context) }),
290
- });
287
+ body = JSON.stringify(take(input, {
288
+ Group: [],
289
+ ResourceArns: (_) => _json(_),
290
+ }));
291
291
  return new __HttpRequest({
292
292
  protocol,
293
293
  hostname,
@@ -306,9 +306,9 @@ export const se_UntagCommand = async (input, context) => {
306
306
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resources/{Arn}/tags";
307
307
  resolvedPath = __resolvedPath(resolvedPath, input, "Arn", () => input.Arn, "{Arn}", false);
308
308
  let body;
309
- body = JSON.stringify({
310
- ...(input.Keys != null && { Keys: se_TagKeyList(input.Keys, context) }),
311
- });
309
+ body = JSON.stringify(take(input, {
310
+ Keys: (_) => _json(_),
311
+ }));
312
312
  return new __HttpRequest({
313
313
  protocol,
314
314
  hostname,
@@ -326,11 +326,9 @@ export const se_UpdateAccountSettingsCommand = async (input, context) => {
326
326
  };
327
327
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-account-settings";
328
328
  let body;
329
- body = JSON.stringify({
330
- ...(input.GroupLifecycleEventsDesiredStatus != null && {
331
- GroupLifecycleEventsDesiredStatus: input.GroupLifecycleEventsDesiredStatus,
332
- }),
333
- });
329
+ body = JSON.stringify(take(input, {
330
+ GroupLifecycleEventsDesiredStatus: [],
331
+ }));
334
332
  return new __HttpRequest({
335
333
  protocol,
336
334
  hostname,
@@ -348,11 +346,11 @@ export const se_UpdateGroupCommand = async (input, context) => {
348
346
  };
349
347
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-group";
350
348
  let body;
351
- body = JSON.stringify({
352
- ...(input.Description != null && { Description: input.Description }),
353
- ...(input.Group != null && { Group: input.Group }),
354
- ...(input.GroupName != null && { GroupName: input.GroupName }),
355
- });
349
+ body = JSON.stringify(take(input, {
350
+ Description: [],
351
+ Group: [],
352
+ GroupName: [],
353
+ }));
356
354
  return new __HttpRequest({
357
355
  protocol,
358
356
  hostname,
@@ -370,11 +368,11 @@ export const se_UpdateGroupQueryCommand = async (input, context) => {
370
368
  };
371
369
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-group-query";
372
370
  let body;
373
- body = JSON.stringify({
374
- ...(input.Group != null && { Group: input.Group }),
375
- ...(input.GroupName != null && { GroupName: input.GroupName }),
376
- ...(input.ResourceQuery != null && { ResourceQuery: se_ResourceQuery(input.ResourceQuery, context) }),
377
- });
371
+ body = JSON.stringify(take(input, {
372
+ Group: [],
373
+ GroupName: [],
374
+ ResourceQuery: (_) => _json(_),
375
+ }));
378
376
  return new __HttpRequest({
379
377
  protocol,
380
378
  hostname,
@@ -393,18 +391,13 @@ export const de_CreateGroupCommand = async (output, context) => {
393
391
  $metadata: deserializeMetadata(output),
394
392
  });
395
393
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
396
- if (data.Group != null) {
397
- contents.Group = de_Group(data.Group, context);
398
- }
399
- if (data.GroupConfiguration != null) {
400
- contents.GroupConfiguration = de_GroupConfiguration(data.GroupConfiguration, context);
401
- }
402
- if (data.ResourceQuery != null) {
403
- contents.ResourceQuery = de_ResourceQuery(data.ResourceQuery, context);
404
- }
405
- if (data.Tags != null) {
406
- contents.Tags = de_Tags(data.Tags, context);
407
- }
394
+ const doc = take(data, {
395
+ Group: _json,
396
+ GroupConfiguration: _json,
397
+ ResourceQuery: _json,
398
+ Tags: _json,
399
+ });
400
+ Object.assign(contents, doc);
408
401
  return contents;
409
402
  };
410
403
  const de_CreateGroupCommandError = async (output, context) => {
@@ -431,10 +424,9 @@ const de_CreateGroupCommandError = async (output, context) => {
431
424
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
432
425
  default:
433
426
  const parsedBody = parsedOutput.body;
434
- throwDefaultError({
427
+ return throwDefaultError({
435
428
  output,
436
429
  parsedBody,
437
- exceptionCtor: __BaseException,
438
430
  errorCode,
439
431
  });
440
432
  }
@@ -447,9 +439,10 @@ export const de_DeleteGroupCommand = async (output, context) => {
447
439
  $metadata: deserializeMetadata(output),
448
440
  });
449
441
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
450
- if (data.Group != null) {
451
- contents.Group = de_Group(data.Group, context);
452
- }
442
+ const doc = take(data, {
443
+ Group: _json,
444
+ });
445
+ Object.assign(contents, doc);
453
446
  return contents;
454
447
  };
455
448
  const de_DeleteGroupCommandError = async (output, context) => {
@@ -479,10 +472,9 @@ const de_DeleteGroupCommandError = async (output, context) => {
479
472
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
480
473
  default:
481
474
  const parsedBody = parsedOutput.body;
482
- throwDefaultError({
475
+ return throwDefaultError({
483
476
  output,
484
477
  parsedBody,
485
- exceptionCtor: __BaseException,
486
478
  errorCode,
487
479
  });
488
480
  }
@@ -495,9 +487,10 @@ export const de_GetAccountSettingsCommand = async (output, context) => {
495
487
  $metadata: deserializeMetadata(output),
496
488
  });
497
489
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
498
- if (data.AccountSettings != null) {
499
- contents.AccountSettings = de_AccountSettings(data.AccountSettings, context);
500
- }
490
+ const doc = take(data, {
491
+ AccountSettings: _json,
492
+ });
493
+ Object.assign(contents, doc);
501
494
  return contents;
502
495
  };
503
496
  const de_GetAccountSettingsCommandError = async (output, context) => {
@@ -524,10 +517,9 @@ const de_GetAccountSettingsCommandError = async (output, context) => {
524
517
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
525
518
  default:
526
519
  const parsedBody = parsedOutput.body;
527
- throwDefaultError({
520
+ return throwDefaultError({
528
521
  output,
529
522
  parsedBody,
530
- exceptionCtor: __BaseException,
531
523
  errorCode,
532
524
  });
533
525
  }
@@ -540,9 +532,10 @@ export const de_GetGroupCommand = async (output, context) => {
540
532
  $metadata: deserializeMetadata(output),
541
533
  });
542
534
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
543
- if (data.Group != null) {
544
- contents.Group = de_Group(data.Group, context);
545
- }
535
+ const doc = take(data, {
536
+ Group: _json,
537
+ });
538
+ Object.assign(contents, doc);
546
539
  return contents;
547
540
  };
548
541
  const de_GetGroupCommandError = async (output, context) => {
@@ -572,10 +565,9 @@ const de_GetGroupCommandError = async (output, context) => {
572
565
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
573
566
  default:
574
567
  const parsedBody = parsedOutput.body;
575
- throwDefaultError({
568
+ return throwDefaultError({
576
569
  output,
577
570
  parsedBody,
578
- exceptionCtor: __BaseException,
579
571
  errorCode,
580
572
  });
581
573
  }
@@ -588,9 +580,10 @@ export const de_GetGroupConfigurationCommand = async (output, context) => {
588
580
  $metadata: deserializeMetadata(output),
589
581
  });
590
582
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
591
- if (data.GroupConfiguration != null) {
592
- contents.GroupConfiguration = de_GroupConfiguration(data.GroupConfiguration, context);
593
- }
583
+ const doc = take(data, {
584
+ GroupConfiguration: _json,
585
+ });
586
+ Object.assign(contents, doc);
594
587
  return contents;
595
588
  };
596
589
  const de_GetGroupConfigurationCommandError = async (output, context) => {
@@ -620,10 +613,9 @@ const de_GetGroupConfigurationCommandError = async (output, context) => {
620
613
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
621
614
  default:
622
615
  const parsedBody = parsedOutput.body;
623
- throwDefaultError({
616
+ return throwDefaultError({
624
617
  output,
625
618
  parsedBody,
626
- exceptionCtor: __BaseException,
627
619
  errorCode,
628
620
  });
629
621
  }
@@ -636,9 +628,10 @@ export const de_GetGroupQueryCommand = async (output, context) => {
636
628
  $metadata: deserializeMetadata(output),
637
629
  });
638
630
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
639
- if (data.GroupQuery != null) {
640
- contents.GroupQuery = de_GroupQuery(data.GroupQuery, context);
641
- }
631
+ const doc = take(data, {
632
+ GroupQuery: _json,
633
+ });
634
+ Object.assign(contents, doc);
642
635
  return contents;
643
636
  };
644
637
  const de_GetGroupQueryCommandError = async (output, context) => {
@@ -668,10 +661,9 @@ const de_GetGroupQueryCommandError = async (output, context) => {
668
661
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
669
662
  default:
670
663
  const parsedBody = parsedOutput.body;
671
- throwDefaultError({
664
+ return throwDefaultError({
672
665
  output,
673
666
  parsedBody,
674
- exceptionCtor: __BaseException,
675
667
  errorCode,
676
668
  });
677
669
  }
@@ -684,12 +676,11 @@ export const de_GetTagsCommand = async (output, context) => {
684
676
  $metadata: deserializeMetadata(output),
685
677
  });
686
678
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
687
- if (data.Arn != null) {
688
- contents.Arn = __expectString(data.Arn);
689
- }
690
- if (data.Tags != null) {
691
- contents.Tags = de_Tags(data.Tags, context);
692
- }
679
+ const doc = take(data, {
680
+ Arn: __expectString,
681
+ Tags: _json,
682
+ });
683
+ Object.assign(contents, doc);
693
684
  return contents;
694
685
  };
695
686
  const de_GetTagsCommandError = async (output, context) => {
@@ -719,10 +710,9 @@ const de_GetTagsCommandError = async (output, context) => {
719
710
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
720
711
  default:
721
712
  const parsedBody = parsedOutput.body;
722
- throwDefaultError({
713
+ return throwDefaultError({
723
714
  output,
724
715
  parsedBody,
725
- exceptionCtor: __BaseException,
726
716
  errorCode,
727
717
  });
728
718
  }
@@ -735,15 +725,12 @@ export const de_GroupResourcesCommand = async (output, context) => {
735
725
  $metadata: deserializeMetadata(output),
736
726
  });
737
727
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
738
- if (data.Failed != null) {
739
- contents.Failed = de_FailedResourceList(data.Failed, context);
740
- }
741
- if (data.Pending != null) {
742
- contents.Pending = de_PendingResourceList(data.Pending, context);
743
- }
744
- if (data.Succeeded != null) {
745
- contents.Succeeded = de_ResourceArnList(data.Succeeded, context);
746
- }
728
+ const doc = take(data, {
729
+ Failed: _json,
730
+ Pending: _json,
731
+ Succeeded: _json,
732
+ });
733
+ Object.assign(contents, doc);
747
734
  return contents;
748
735
  };
749
736
  const de_GroupResourcesCommandError = async (output, context) => {
@@ -773,10 +760,9 @@ const de_GroupResourcesCommandError = async (output, context) => {
773
760
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
774
761
  default:
775
762
  const parsedBody = parsedOutput.body;
776
- throwDefaultError({
763
+ return throwDefaultError({
777
764
  output,
778
765
  parsedBody,
779
- exceptionCtor: __BaseException,
780
766
  errorCode,
781
767
  });
782
768
  }
@@ -789,18 +775,13 @@ export const de_ListGroupResourcesCommand = async (output, context) => {
789
775
  $metadata: deserializeMetadata(output),
790
776
  });
791
777
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
792
- if (data.NextToken != null) {
793
- contents.NextToken = __expectString(data.NextToken);
794
- }
795
- if (data.QueryErrors != null) {
796
- contents.QueryErrors = de_QueryErrorList(data.QueryErrors, context);
797
- }
798
- if (data.ResourceIdentifiers != null) {
799
- contents.ResourceIdentifiers = de_ResourceIdentifierList(data.ResourceIdentifiers, context);
800
- }
801
- if (data.Resources != null) {
802
- contents.Resources = de_ListGroupResourcesItemList(data.Resources, context);
803
- }
778
+ const doc = take(data, {
779
+ NextToken: __expectString,
780
+ QueryErrors: _json,
781
+ ResourceIdentifiers: _json,
782
+ Resources: _json,
783
+ });
784
+ Object.assign(contents, doc);
804
785
  return contents;
805
786
  };
806
787
  const de_ListGroupResourcesCommandError = async (output, context) => {
@@ -833,10 +814,9 @@ const de_ListGroupResourcesCommandError = async (output, context) => {
833
814
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
834
815
  default:
835
816
  const parsedBody = parsedOutput.body;
836
- throwDefaultError({
817
+ return throwDefaultError({
837
818
  output,
838
819
  parsedBody,
839
- exceptionCtor: __BaseException,
840
820
  errorCode,
841
821
  });
842
822
  }
@@ -849,15 +829,12 @@ export const de_ListGroupsCommand = async (output, context) => {
849
829
  $metadata: deserializeMetadata(output),
850
830
  });
851
831
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
852
- if (data.GroupIdentifiers != null) {
853
- contents.GroupIdentifiers = de_GroupIdentifierList(data.GroupIdentifiers, context);
854
- }
855
- if (data.Groups != null) {
856
- contents.Groups = de_GroupList(data.Groups, context);
857
- }
858
- if (data.NextToken != null) {
859
- contents.NextToken = __expectString(data.NextToken);
860
- }
832
+ const doc = take(data, {
833
+ GroupIdentifiers: _json,
834
+ Groups: _json,
835
+ NextToken: __expectString,
836
+ });
837
+ Object.assign(contents, doc);
861
838
  return contents;
862
839
  };
863
840
  const de_ListGroupsCommandError = async (output, context) => {
@@ -884,10 +861,9 @@ const de_ListGroupsCommandError = async (output, context) => {
884
861
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
885
862
  default:
886
863
  const parsedBody = parsedOutput.body;
887
- throwDefaultError({
864
+ return throwDefaultError({
888
865
  output,
889
866
  parsedBody,
890
- exceptionCtor: __BaseException,
891
867
  errorCode,
892
868
  });
893
869
  }
@@ -929,10 +905,9 @@ const de_PutGroupConfigurationCommandError = async (output, context) => {
929
905
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
930
906
  default:
931
907
  const parsedBody = parsedOutput.body;
932
- throwDefaultError({
908
+ return throwDefaultError({
933
909
  output,
934
910
  parsedBody,
935
- exceptionCtor: __BaseException,
936
911
  errorCode,
937
912
  });
938
913
  }
@@ -945,15 +920,12 @@ export const de_SearchResourcesCommand = async (output, context) => {
945
920
  $metadata: deserializeMetadata(output),
946
921
  });
947
922
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
948
- if (data.NextToken != null) {
949
- contents.NextToken = __expectString(data.NextToken);
950
- }
951
- if (data.QueryErrors != null) {
952
- contents.QueryErrors = de_QueryErrorList(data.QueryErrors, context);
953
- }
954
- if (data.ResourceIdentifiers != null) {
955
- contents.ResourceIdentifiers = de_ResourceIdentifierList(data.ResourceIdentifiers, context);
956
- }
923
+ const doc = take(data, {
924
+ NextToken: __expectString,
925
+ QueryErrors: _json,
926
+ ResourceIdentifiers: _json,
927
+ });
928
+ Object.assign(contents, doc);
957
929
  return contents;
958
930
  };
959
931
  const de_SearchResourcesCommandError = async (output, context) => {
@@ -983,10 +955,9 @@ const de_SearchResourcesCommandError = async (output, context) => {
983
955
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
984
956
  default:
985
957
  const parsedBody = parsedOutput.body;
986
- throwDefaultError({
958
+ return throwDefaultError({
987
959
  output,
988
960
  parsedBody,
989
- exceptionCtor: __BaseException,
990
961
  errorCode,
991
962
  });
992
963
  }
@@ -999,12 +970,11 @@ export const de_TagCommand = async (output, context) => {
999
970
  $metadata: deserializeMetadata(output),
1000
971
  });
1001
972
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1002
- if (data.Arn != null) {
1003
- contents.Arn = __expectString(data.Arn);
1004
- }
1005
- if (data.Tags != null) {
1006
- contents.Tags = de_Tags(data.Tags, context);
1007
- }
973
+ const doc = take(data, {
974
+ Arn: __expectString,
975
+ Tags: _json,
976
+ });
977
+ Object.assign(contents, doc);
1008
978
  return contents;
1009
979
  };
1010
980
  const de_TagCommandError = async (output, context) => {
@@ -1034,10 +1004,9 @@ const de_TagCommandError = async (output, context) => {
1034
1004
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1035
1005
  default:
1036
1006
  const parsedBody = parsedOutput.body;
1037
- throwDefaultError({
1007
+ return throwDefaultError({
1038
1008
  output,
1039
1009
  parsedBody,
1040
- exceptionCtor: __BaseException,
1041
1010
  errorCode,
1042
1011
  });
1043
1012
  }
@@ -1050,15 +1019,12 @@ export const de_UngroupResourcesCommand = async (output, context) => {
1050
1019
  $metadata: deserializeMetadata(output),
1051
1020
  });
1052
1021
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1053
- if (data.Failed != null) {
1054
- contents.Failed = de_FailedResourceList(data.Failed, context);
1055
- }
1056
- if (data.Pending != null) {
1057
- contents.Pending = de_PendingResourceList(data.Pending, context);
1058
- }
1059
- if (data.Succeeded != null) {
1060
- contents.Succeeded = de_ResourceArnList(data.Succeeded, context);
1061
- }
1022
+ const doc = take(data, {
1023
+ Failed: _json,
1024
+ Pending: _json,
1025
+ Succeeded: _json,
1026
+ });
1027
+ Object.assign(contents, doc);
1062
1028
  return contents;
1063
1029
  };
1064
1030
  const de_UngroupResourcesCommandError = async (output, context) => {
@@ -1088,10 +1054,9 @@ const de_UngroupResourcesCommandError = async (output, context) => {
1088
1054
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1089
1055
  default:
1090
1056
  const parsedBody = parsedOutput.body;
1091
- throwDefaultError({
1057
+ return throwDefaultError({
1092
1058
  output,
1093
1059
  parsedBody,
1094
- exceptionCtor: __BaseException,
1095
1060
  errorCode,
1096
1061
  });
1097
1062
  }
@@ -1104,12 +1069,11 @@ export const de_UntagCommand = async (output, context) => {
1104
1069
  $metadata: deserializeMetadata(output),
1105
1070
  });
1106
1071
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1107
- if (data.Arn != null) {
1108
- contents.Arn = __expectString(data.Arn);
1109
- }
1110
- if (data.Keys != null) {
1111
- contents.Keys = de_TagKeyList(data.Keys, context);
1112
- }
1072
+ const doc = take(data, {
1073
+ Arn: __expectString,
1074
+ Keys: _json,
1075
+ });
1076
+ Object.assign(contents, doc);
1113
1077
  return contents;
1114
1078
  };
1115
1079
  const de_UntagCommandError = async (output, context) => {
@@ -1139,10 +1103,9 @@ const de_UntagCommandError = async (output, context) => {
1139
1103
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1140
1104
  default:
1141
1105
  const parsedBody = parsedOutput.body;
1142
- throwDefaultError({
1106
+ return throwDefaultError({
1143
1107
  output,
1144
1108
  parsedBody,
1145
- exceptionCtor: __BaseException,
1146
1109
  errorCode,
1147
1110
  });
1148
1111
  }
@@ -1155,9 +1118,10 @@ export const de_UpdateAccountSettingsCommand = async (output, context) => {
1155
1118
  $metadata: deserializeMetadata(output),
1156
1119
  });
1157
1120
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1158
- if (data.AccountSettings != null) {
1159
- contents.AccountSettings = de_AccountSettings(data.AccountSettings, context);
1160
- }
1121
+ const doc = take(data, {
1122
+ AccountSettings: _json,
1123
+ });
1124
+ Object.assign(contents, doc);
1161
1125
  return contents;
1162
1126
  };
1163
1127
  const de_UpdateAccountSettingsCommandError = async (output, context) => {
@@ -1184,10 +1148,9 @@ const de_UpdateAccountSettingsCommandError = async (output, context) => {
1184
1148
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1185
1149
  default:
1186
1150
  const parsedBody = parsedOutput.body;
1187
- throwDefaultError({
1151
+ return throwDefaultError({
1188
1152
  output,
1189
1153
  parsedBody,
1190
- exceptionCtor: __BaseException,
1191
1154
  errorCode,
1192
1155
  });
1193
1156
  }
@@ -1200,9 +1163,10 @@ export const de_UpdateGroupCommand = async (output, context) => {
1200
1163
  $metadata: deserializeMetadata(output),
1201
1164
  });
1202
1165
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1203
- if (data.Group != null) {
1204
- contents.Group = de_Group(data.Group, context);
1205
- }
1166
+ const doc = take(data, {
1167
+ Group: _json,
1168
+ });
1169
+ Object.assign(contents, doc);
1206
1170
  return contents;
1207
1171
  };
1208
1172
  const de_UpdateGroupCommandError = async (output, context) => {
@@ -1232,10 +1196,9 @@ const de_UpdateGroupCommandError = async (output, context) => {
1232
1196
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1233
1197
  default:
1234
1198
  const parsedBody = parsedOutput.body;
1235
- throwDefaultError({
1199
+ return throwDefaultError({
1236
1200
  output,
1237
1201
  parsedBody,
1238
- exceptionCtor: __BaseException,
1239
1202
  errorCode,
1240
1203
  });
1241
1204
  }
@@ -1248,9 +1211,10 @@ export const de_UpdateGroupQueryCommand = async (output, context) => {
1248
1211
  $metadata: deserializeMetadata(output),
1249
1212
  });
1250
1213
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1251
- if (data.GroupQuery != null) {
1252
- contents.GroupQuery = de_GroupQuery(data.GroupQuery, context);
1253
- }
1214
+ const doc = take(data, {
1215
+ GroupQuery: _json,
1216
+ });
1217
+ Object.assign(contents, doc);
1254
1218
  return contents;
1255
1219
  };
1256
1220
  const de_UpdateGroupQueryCommandError = async (output, context) => {
@@ -1280,21 +1244,21 @@ const de_UpdateGroupQueryCommandError = async (output, context) => {
1280
1244
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1281
1245
  default:
1282
1246
  const parsedBody = parsedOutput.body;
1283
- throwDefaultError({
1247
+ return throwDefaultError({
1284
1248
  output,
1285
1249
  parsedBody,
1286
- exceptionCtor: __BaseException,
1287
1250
  errorCode,
1288
1251
  });
1289
1252
  }
1290
1253
  };
1291
- const map = __map;
1254
+ const throwDefaultError = withBaseException(__BaseException);
1292
1255
  const de_BadRequestExceptionRes = async (parsedOutput, context) => {
1293
1256
  const contents = map({});
1294
1257
  const data = parsedOutput.body;
1295
- if (data.Message != null) {
1296
- contents.Message = __expectString(data.Message);
1297
- }
1258
+ const doc = take(data, {
1259
+ Message: __expectString,
1260
+ });
1261
+ Object.assign(contents, doc);
1298
1262
  const exception = new BadRequestException({
1299
1263
  $metadata: deserializeMetadata(parsedOutput),
1300
1264
  ...contents,
@@ -1304,9 +1268,10 @@ const de_BadRequestExceptionRes = async (parsedOutput, context) => {
1304
1268
  const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
1305
1269
  const contents = map({});
1306
1270
  const data = parsedOutput.body;
1307
- if (data.Message != null) {
1308
- contents.Message = __expectString(data.Message);
1309
- }
1271
+ const doc = take(data, {
1272
+ Message: __expectString,
1273
+ });
1274
+ Object.assign(contents, doc);
1310
1275
  const exception = new ForbiddenException({
1311
1276
  $metadata: deserializeMetadata(parsedOutput),
1312
1277
  ...contents,
@@ -1316,9 +1281,10 @@ const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
1316
1281
  const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
1317
1282
  const contents = map({});
1318
1283
  const data = parsedOutput.body;
1319
- if (data.Message != null) {
1320
- contents.Message = __expectString(data.Message);
1321
- }
1284
+ const doc = take(data, {
1285
+ Message: __expectString,
1286
+ });
1287
+ Object.assign(contents, doc);
1322
1288
  const exception = new InternalServerErrorException({
1323
1289
  $metadata: deserializeMetadata(parsedOutput),
1324
1290
  ...contents,
@@ -1328,9 +1294,10 @@ const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
1328
1294
  const de_MethodNotAllowedExceptionRes = async (parsedOutput, context) => {
1329
1295
  const contents = map({});
1330
1296
  const data = parsedOutput.body;
1331
- if (data.Message != null) {
1332
- contents.Message = __expectString(data.Message);
1333
- }
1297
+ const doc = take(data, {
1298
+ Message: __expectString,
1299
+ });
1300
+ Object.assign(contents, doc);
1334
1301
  const exception = new MethodNotAllowedException({
1335
1302
  $metadata: deserializeMetadata(parsedOutput),
1336
1303
  ...contents,
@@ -1340,9 +1307,10 @@ const de_MethodNotAllowedExceptionRes = async (parsedOutput, context) => {
1340
1307
  const de_NotFoundExceptionRes = async (parsedOutput, context) => {
1341
1308
  const contents = map({});
1342
1309
  const data = parsedOutput.body;
1343
- if (data.Message != null) {
1344
- contents.Message = __expectString(data.Message);
1345
- }
1310
+ const doc = take(data, {
1311
+ Message: __expectString,
1312
+ });
1313
+ Object.assign(contents, doc);
1346
1314
  const exception = new NotFoundException({
1347
1315
  $metadata: deserializeMetadata(parsedOutput),
1348
1316
  ...contents,
@@ -1352,9 +1320,10 @@ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
1352
1320
  const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
1353
1321
  const contents = map({});
1354
1322
  const data = parsedOutput.body;
1355
- if (data.Message != null) {
1356
- contents.Message = __expectString(data.Message);
1357
- }
1323
+ const doc = take(data, {
1324
+ Message: __expectString,
1325
+ });
1326
+ Object.assign(contents, doc);
1358
1327
  const exception = new TooManyRequestsException({
1359
1328
  $metadata: deserializeMetadata(parsedOutput),
1360
1329
  ...contents,
@@ -1364,347 +1333,16 @@ const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
1364
1333
  const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
1365
1334
  const contents = map({});
1366
1335
  const data = parsedOutput.body;
1367
- if (data.Message != null) {
1368
- contents.Message = __expectString(data.Message);
1369
- }
1336
+ const doc = take(data, {
1337
+ Message: __expectString,
1338
+ });
1339
+ Object.assign(contents, doc);
1370
1340
  const exception = new UnauthorizedException({
1371
1341
  $metadata: deserializeMetadata(parsedOutput),
1372
1342
  ...contents,
1373
1343
  });
1374
1344
  return __decorateServiceException(exception, parsedOutput.body);
1375
1345
  };
1376
- const se_GroupConfigurationItem = (input, context) => {
1377
- return {
1378
- ...(input.Parameters != null && { Parameters: se_GroupParameterList(input.Parameters, context) }),
1379
- ...(input.Type != null && { Type: input.Type }),
1380
- };
1381
- };
1382
- const se_GroupConfigurationList = (input, context) => {
1383
- return input
1384
- .filter((e) => e != null)
1385
- .map((entry) => {
1386
- return se_GroupConfigurationItem(entry, context);
1387
- });
1388
- };
1389
- const se_GroupConfigurationParameter = (input, context) => {
1390
- return {
1391
- ...(input.Name != null && { Name: input.Name }),
1392
- ...(input.Values != null && { Values: se_GroupConfigurationParameterValueList(input.Values, context) }),
1393
- };
1394
- };
1395
- const se_GroupConfigurationParameterValueList = (input, context) => {
1396
- return input
1397
- .filter((e) => e != null)
1398
- .map((entry) => {
1399
- return entry;
1400
- });
1401
- };
1402
- const se_GroupFilter = (input, context) => {
1403
- return {
1404
- ...(input.Name != null && { Name: input.Name }),
1405
- ...(input.Values != null && { Values: se_GroupFilterValues(input.Values, context) }),
1406
- };
1407
- };
1408
- const se_GroupFilterList = (input, context) => {
1409
- return input
1410
- .filter((e) => e != null)
1411
- .map((entry) => {
1412
- return se_GroupFilter(entry, context);
1413
- });
1414
- };
1415
- const se_GroupFilterValues = (input, context) => {
1416
- return input
1417
- .filter((e) => e != null)
1418
- .map((entry) => {
1419
- return entry;
1420
- });
1421
- };
1422
- const se_GroupParameterList = (input, context) => {
1423
- return input
1424
- .filter((e) => e != null)
1425
- .map((entry) => {
1426
- return se_GroupConfigurationParameter(entry, context);
1427
- });
1428
- };
1429
- const se_ResourceArnList = (input, context) => {
1430
- return input
1431
- .filter((e) => e != null)
1432
- .map((entry) => {
1433
- return entry;
1434
- });
1435
- };
1436
- const se_ResourceFilter = (input, context) => {
1437
- return {
1438
- ...(input.Name != null && { Name: input.Name }),
1439
- ...(input.Values != null && { Values: se_ResourceFilterValues(input.Values, context) }),
1440
- };
1441
- };
1442
- const se_ResourceFilterList = (input, context) => {
1443
- return input
1444
- .filter((e) => e != null)
1445
- .map((entry) => {
1446
- return se_ResourceFilter(entry, context);
1447
- });
1448
- };
1449
- const se_ResourceFilterValues = (input, context) => {
1450
- return input
1451
- .filter((e) => e != null)
1452
- .map((entry) => {
1453
- return entry;
1454
- });
1455
- };
1456
- const se_ResourceQuery = (input, context) => {
1457
- return {
1458
- ...(input.Query != null && { Query: input.Query }),
1459
- ...(input.Type != null && { Type: input.Type }),
1460
- };
1461
- };
1462
- const se_TagKeyList = (input, context) => {
1463
- return input
1464
- .filter((e) => e != null)
1465
- .map((entry) => {
1466
- return entry;
1467
- });
1468
- };
1469
- const se_Tags = (input, context) => {
1470
- return Object.entries(input).reduce((acc, [key, value]) => {
1471
- if (value === null) {
1472
- return acc;
1473
- }
1474
- acc[key] = value;
1475
- return acc;
1476
- }, {});
1477
- };
1478
- const de_AccountSettings = (output, context) => {
1479
- return {
1480
- GroupLifecycleEventsDesiredStatus: __expectString(output.GroupLifecycleEventsDesiredStatus),
1481
- GroupLifecycleEventsStatus: __expectString(output.GroupLifecycleEventsStatus),
1482
- GroupLifecycleEventsStatusMessage: __expectString(output.GroupLifecycleEventsStatusMessage),
1483
- };
1484
- };
1485
- const de_FailedResource = (output, context) => {
1486
- return {
1487
- ErrorCode: __expectString(output.ErrorCode),
1488
- ErrorMessage: __expectString(output.ErrorMessage),
1489
- ResourceArn: __expectString(output.ResourceArn),
1490
- };
1491
- };
1492
- const de_FailedResourceList = (output, context) => {
1493
- const retVal = (output || [])
1494
- .filter((e) => e != null)
1495
- .map((entry) => {
1496
- if (entry === null) {
1497
- return null;
1498
- }
1499
- return de_FailedResource(entry, context);
1500
- });
1501
- return retVal;
1502
- };
1503
- const de_Group = (output, context) => {
1504
- return {
1505
- Description: __expectString(output.Description),
1506
- GroupArn: __expectString(output.GroupArn),
1507
- Name: __expectString(output.Name),
1508
- };
1509
- };
1510
- const de_GroupConfiguration = (output, context) => {
1511
- return {
1512
- Configuration: output.Configuration != null ? de_GroupConfigurationList(output.Configuration, context) : undefined,
1513
- FailureReason: __expectString(output.FailureReason),
1514
- ProposedConfiguration: output.ProposedConfiguration != null
1515
- ? de_GroupConfigurationList(output.ProposedConfiguration, context)
1516
- : undefined,
1517
- Status: __expectString(output.Status),
1518
- };
1519
- };
1520
- const de_GroupConfigurationItem = (output, context) => {
1521
- return {
1522
- Parameters: output.Parameters != null ? de_GroupParameterList(output.Parameters, context) : undefined,
1523
- Type: __expectString(output.Type),
1524
- };
1525
- };
1526
- const de_GroupConfigurationList = (output, context) => {
1527
- const retVal = (output || [])
1528
- .filter((e) => e != null)
1529
- .map((entry) => {
1530
- if (entry === null) {
1531
- return null;
1532
- }
1533
- return de_GroupConfigurationItem(entry, context);
1534
- });
1535
- return retVal;
1536
- };
1537
- const de_GroupConfigurationParameter = (output, context) => {
1538
- return {
1539
- Name: __expectString(output.Name),
1540
- Values: output.Values != null ? de_GroupConfigurationParameterValueList(output.Values, context) : undefined,
1541
- };
1542
- };
1543
- const de_GroupConfigurationParameterValueList = (output, context) => {
1544
- const retVal = (output || [])
1545
- .filter((e) => e != null)
1546
- .map((entry) => {
1547
- if (entry === null) {
1548
- return null;
1549
- }
1550
- return __expectString(entry);
1551
- });
1552
- return retVal;
1553
- };
1554
- const de_GroupIdentifier = (output, context) => {
1555
- return {
1556
- GroupArn: __expectString(output.GroupArn),
1557
- GroupName: __expectString(output.GroupName),
1558
- };
1559
- };
1560
- const de_GroupIdentifierList = (output, context) => {
1561
- const retVal = (output || [])
1562
- .filter((e) => e != null)
1563
- .map((entry) => {
1564
- if (entry === null) {
1565
- return null;
1566
- }
1567
- return de_GroupIdentifier(entry, context);
1568
- });
1569
- return retVal;
1570
- };
1571
- const de_GroupList = (output, context) => {
1572
- const retVal = (output || [])
1573
- .filter((e) => e != null)
1574
- .map((entry) => {
1575
- if (entry === null) {
1576
- return null;
1577
- }
1578
- return de_Group(entry, context);
1579
- });
1580
- return retVal;
1581
- };
1582
- const de_GroupParameterList = (output, context) => {
1583
- const retVal = (output || [])
1584
- .filter((e) => e != null)
1585
- .map((entry) => {
1586
- if (entry === null) {
1587
- return null;
1588
- }
1589
- return de_GroupConfigurationParameter(entry, context);
1590
- });
1591
- return retVal;
1592
- };
1593
- const de_GroupQuery = (output, context) => {
1594
- return {
1595
- GroupName: __expectString(output.GroupName),
1596
- ResourceQuery: output.ResourceQuery != null ? de_ResourceQuery(output.ResourceQuery, context) : undefined,
1597
- };
1598
- };
1599
- const de_ListGroupResourcesItem = (output, context) => {
1600
- return {
1601
- Identifier: output.Identifier != null ? de_ResourceIdentifier(output.Identifier, context) : undefined,
1602
- Status: output.Status != null ? de_ResourceStatus(output.Status, context) : undefined,
1603
- };
1604
- };
1605
- const de_ListGroupResourcesItemList = (output, context) => {
1606
- const retVal = (output || [])
1607
- .filter((e) => e != null)
1608
- .map((entry) => {
1609
- if (entry === null) {
1610
- return null;
1611
- }
1612
- return de_ListGroupResourcesItem(entry, context);
1613
- });
1614
- return retVal;
1615
- };
1616
- const de_PendingResource = (output, context) => {
1617
- return {
1618
- ResourceArn: __expectString(output.ResourceArn),
1619
- };
1620
- };
1621
- const de_PendingResourceList = (output, context) => {
1622
- const retVal = (output || [])
1623
- .filter((e) => e != null)
1624
- .map((entry) => {
1625
- if (entry === null) {
1626
- return null;
1627
- }
1628
- return de_PendingResource(entry, context);
1629
- });
1630
- return retVal;
1631
- };
1632
- const de_QueryError = (output, context) => {
1633
- return {
1634
- ErrorCode: __expectString(output.ErrorCode),
1635
- Message: __expectString(output.Message),
1636
- };
1637
- };
1638
- const de_QueryErrorList = (output, context) => {
1639
- const retVal = (output || [])
1640
- .filter((e) => e != null)
1641
- .map((entry) => {
1642
- if (entry === null) {
1643
- return null;
1644
- }
1645
- return de_QueryError(entry, context);
1646
- });
1647
- return retVal;
1648
- };
1649
- const de_ResourceArnList = (output, context) => {
1650
- const retVal = (output || [])
1651
- .filter((e) => e != null)
1652
- .map((entry) => {
1653
- if (entry === null) {
1654
- return null;
1655
- }
1656
- return __expectString(entry);
1657
- });
1658
- return retVal;
1659
- };
1660
- const de_ResourceIdentifier = (output, context) => {
1661
- return {
1662
- ResourceArn: __expectString(output.ResourceArn),
1663
- ResourceType: __expectString(output.ResourceType),
1664
- };
1665
- };
1666
- const de_ResourceIdentifierList = (output, context) => {
1667
- const retVal = (output || [])
1668
- .filter((e) => e != null)
1669
- .map((entry) => {
1670
- if (entry === null) {
1671
- return null;
1672
- }
1673
- return de_ResourceIdentifier(entry, context);
1674
- });
1675
- return retVal;
1676
- };
1677
- const de_ResourceQuery = (output, context) => {
1678
- return {
1679
- Query: __expectString(output.Query),
1680
- Type: __expectString(output.Type),
1681
- };
1682
- };
1683
- const de_ResourceStatus = (output, context) => {
1684
- return {
1685
- Name: __expectString(output.Name),
1686
- };
1687
- };
1688
- const de_TagKeyList = (output, context) => {
1689
- const retVal = (output || [])
1690
- .filter((e) => e != null)
1691
- .map((entry) => {
1692
- if (entry === null) {
1693
- return null;
1694
- }
1695
- return __expectString(entry);
1696
- });
1697
- return retVal;
1698
- };
1699
- const de_Tags = (output, context) => {
1700
- return Object.entries(output).reduce((acc, [key, value]) => {
1701
- if (value === null) {
1702
- return acc;
1703
- }
1704
- acc[key] = __expectString(value);
1705
- return acc;
1706
- }, {});
1707
- };
1708
1346
  const deserializeMetadata = (output) => ({
1709
1347
  httpStatusCode: output.statusCode,
1710
1348
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],