@aws-sdk/client-opensearchserverless 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,18 +1,18 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectString as __expectString, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectString as __expectString, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { ConflictException, InternalServerException, OcuLimitExceededException, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
5
5
  import { OpenSearchServerlessServiceException as __BaseException } from "../models/OpenSearchServerlessServiceException";
6
6
  export const se_BatchGetCollectionCommand = async (input, context) => {
7
7
  const headers = sharedHeaders("BatchGetCollection");
8
8
  let body;
9
- body = JSON.stringify(se_BatchGetCollectionRequest(input, context));
9
+ body = JSON.stringify(_json(input));
10
10
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
11
11
  };
12
12
  export const se_BatchGetVpcEndpointCommand = async (input, context) => {
13
13
  const headers = sharedHeaders("BatchGetVpcEndpoint");
14
14
  let body;
15
- body = JSON.stringify(se_BatchGetVpcEndpointRequest(input, context));
15
+ body = JSON.stringify(_json(input));
16
16
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
17
  };
18
18
  export const se_CreateAccessPolicyCommand = async (input, context) => {
@@ -78,79 +78,79 @@ export const se_DeleteVpcEndpointCommand = async (input, context) => {
78
78
  export const se_GetAccessPolicyCommand = async (input, context) => {
79
79
  const headers = sharedHeaders("GetAccessPolicy");
80
80
  let body;
81
- body = JSON.stringify(se_GetAccessPolicyRequest(input, context));
81
+ body = JSON.stringify(_json(input));
82
82
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
83
83
  };
84
84
  export const se_GetAccountSettingsCommand = async (input, context) => {
85
85
  const headers = sharedHeaders("GetAccountSettings");
86
86
  let body;
87
- body = JSON.stringify(se_GetAccountSettingsRequest(input, context));
87
+ body = JSON.stringify(_json(input));
88
88
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
89
89
  };
90
90
  export const se_GetPoliciesStatsCommand = async (input, context) => {
91
91
  const headers = sharedHeaders("GetPoliciesStats");
92
92
  let body;
93
- body = JSON.stringify(se_GetPoliciesStatsRequest(input, context));
93
+ body = JSON.stringify(_json(input));
94
94
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
95
  };
96
96
  export const se_GetSecurityConfigCommand = async (input, context) => {
97
97
  const headers = sharedHeaders("GetSecurityConfig");
98
98
  let body;
99
- body = JSON.stringify(se_GetSecurityConfigRequest(input, context));
99
+ body = JSON.stringify(_json(input));
100
100
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
101
101
  };
102
102
  export const se_GetSecurityPolicyCommand = async (input, context) => {
103
103
  const headers = sharedHeaders("GetSecurityPolicy");
104
104
  let body;
105
- body = JSON.stringify(se_GetSecurityPolicyRequest(input, context));
105
+ body = JSON.stringify(_json(input));
106
106
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
107
  };
108
108
  export const se_ListAccessPoliciesCommand = async (input, context) => {
109
109
  const headers = sharedHeaders("ListAccessPolicies");
110
110
  let body;
111
- body = JSON.stringify(se_ListAccessPoliciesRequest(input, context));
111
+ body = JSON.stringify(_json(input));
112
112
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
113
  };
114
114
  export const se_ListCollectionsCommand = async (input, context) => {
115
115
  const headers = sharedHeaders("ListCollections");
116
116
  let body;
117
- body = JSON.stringify(se_ListCollectionsRequest(input, context));
117
+ body = JSON.stringify(_json(input));
118
118
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
119
  };
120
120
  export const se_ListSecurityConfigsCommand = async (input, context) => {
121
121
  const headers = sharedHeaders("ListSecurityConfigs");
122
122
  let body;
123
- body = JSON.stringify(se_ListSecurityConfigsRequest(input, context));
123
+ body = JSON.stringify(_json(input));
124
124
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
125
125
  };
126
126
  export const se_ListSecurityPoliciesCommand = async (input, context) => {
127
127
  const headers = sharedHeaders("ListSecurityPolicies");
128
128
  let body;
129
- body = JSON.stringify(se_ListSecurityPoliciesRequest(input, context));
129
+ body = JSON.stringify(_json(input));
130
130
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
131
131
  };
132
132
  export const se_ListTagsForResourceCommand = async (input, context) => {
133
133
  const headers = sharedHeaders("ListTagsForResource");
134
134
  let body;
135
- body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
135
+ body = JSON.stringify(_json(input));
136
136
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
137
137
  };
138
138
  export const se_ListVpcEndpointsCommand = async (input, context) => {
139
139
  const headers = sharedHeaders("ListVpcEndpoints");
140
140
  let body;
141
- body = JSON.stringify(se_ListVpcEndpointsRequest(input, context));
141
+ body = JSON.stringify(_json(input));
142
142
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
143
143
  };
144
144
  export const se_TagResourceCommand = async (input, context) => {
145
145
  const headers = sharedHeaders("TagResource");
146
146
  let body;
147
- body = JSON.stringify(se_TagResourceRequest(input, context));
147
+ body = JSON.stringify(_json(input));
148
148
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
149
149
  };
150
150
  export const se_UntagResourceCommand = async (input, context) => {
151
151
  const headers = sharedHeaders("UntagResource");
152
152
  let body;
153
- body = JSON.stringify(se_UntagResourceRequest(input, context));
153
+ body = JSON.stringify(_json(input));
154
154
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
155
155
  };
156
156
  export const se_UpdateAccessPolicyCommand = async (input, context) => {
@@ -162,7 +162,7 @@ export const se_UpdateAccessPolicyCommand = async (input, context) => {
162
162
  export const se_UpdateAccountSettingsCommand = async (input, context) => {
163
163
  const headers = sharedHeaders("UpdateAccountSettings");
164
164
  let body;
165
- body = JSON.stringify(se_UpdateAccountSettingsRequest(input, context));
165
+ body = JSON.stringify(_json(input));
166
166
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
167
167
  };
168
168
  export const se_UpdateCollectionCommand = async (input, context) => {
@@ -195,12 +195,12 @@ export const de_BatchGetCollectionCommand = async (output, context) => {
195
195
  }
196
196
  const data = await parseBody(output.body, context);
197
197
  let contents = {};
198
- contents = de_BatchGetCollectionResponse(data, context);
198
+ contents = _json(data);
199
199
  const response = {
200
200
  $metadata: deserializeMetadata(output),
201
201
  ...contents,
202
202
  };
203
- return Promise.resolve(response);
203
+ return response;
204
204
  };
205
205
  const de_BatchGetCollectionCommandError = async (output, context) => {
206
206
  const parsedOutput = {
@@ -217,10 +217,9 @@ const de_BatchGetCollectionCommandError = async (output, context) => {
217
217
  throw await de_ValidationExceptionRes(parsedOutput, context);
218
218
  default:
219
219
  const parsedBody = parsedOutput.body;
220
- throwDefaultError({
220
+ return throwDefaultError({
221
221
  output,
222
222
  parsedBody,
223
- exceptionCtor: __BaseException,
224
223
  errorCode,
225
224
  });
226
225
  }
@@ -231,12 +230,12 @@ export const de_BatchGetVpcEndpointCommand = async (output, context) => {
231
230
  }
232
231
  const data = await parseBody(output.body, context);
233
232
  let contents = {};
234
- contents = de_BatchGetVpcEndpointResponse(data, context);
233
+ contents = _json(data);
235
234
  const response = {
236
235
  $metadata: deserializeMetadata(output),
237
236
  ...contents,
238
237
  };
239
- return Promise.resolve(response);
238
+ return response;
240
239
  };
241
240
  const de_BatchGetVpcEndpointCommandError = async (output, context) => {
242
241
  const parsedOutput = {
@@ -253,10 +252,9 @@ const de_BatchGetVpcEndpointCommandError = async (output, context) => {
253
252
  throw await de_ValidationExceptionRes(parsedOutput, context);
254
253
  default:
255
254
  const parsedBody = parsedOutput.body;
256
- throwDefaultError({
255
+ return throwDefaultError({
257
256
  output,
258
257
  parsedBody,
259
- exceptionCtor: __BaseException,
260
258
  errorCode,
261
259
  });
262
260
  }
@@ -272,7 +270,7 @@ export const de_CreateAccessPolicyCommand = async (output, context) => {
272
270
  $metadata: deserializeMetadata(output),
273
271
  ...contents,
274
272
  };
275
- return Promise.resolve(response);
273
+ return response;
276
274
  };
277
275
  const de_CreateAccessPolicyCommandError = async (output, context) => {
278
276
  const parsedOutput = {
@@ -295,10 +293,9 @@ const de_CreateAccessPolicyCommandError = async (output, context) => {
295
293
  throw await de_ValidationExceptionRes(parsedOutput, context);
296
294
  default:
297
295
  const parsedBody = parsedOutput.body;
298
- throwDefaultError({
296
+ return throwDefaultError({
299
297
  output,
300
298
  parsedBody,
301
- exceptionCtor: __BaseException,
302
299
  errorCode,
303
300
  });
304
301
  }
@@ -309,12 +306,12 @@ export const de_CreateCollectionCommand = async (output, context) => {
309
306
  }
310
307
  const data = await parseBody(output.body, context);
311
308
  let contents = {};
312
- contents = de_CreateCollectionResponse(data, context);
309
+ contents = _json(data);
313
310
  const response = {
314
311
  $metadata: deserializeMetadata(output),
315
312
  ...contents,
316
313
  };
317
- return Promise.resolve(response);
314
+ return response;
318
315
  };
319
316
  const de_CreateCollectionCommandError = async (output, context) => {
320
317
  const parsedOutput = {
@@ -340,10 +337,9 @@ const de_CreateCollectionCommandError = async (output, context) => {
340
337
  throw await de_ValidationExceptionRes(parsedOutput, context);
341
338
  default:
342
339
  const parsedBody = parsedOutput.body;
343
- throwDefaultError({
340
+ return throwDefaultError({
344
341
  output,
345
342
  parsedBody,
346
- exceptionCtor: __BaseException,
347
343
  errorCode,
348
344
  });
349
345
  }
@@ -354,12 +350,12 @@ export const de_CreateSecurityConfigCommand = async (output, context) => {
354
350
  }
355
351
  const data = await parseBody(output.body, context);
356
352
  let contents = {};
357
- contents = de_CreateSecurityConfigResponse(data, context);
353
+ contents = _json(data);
358
354
  const response = {
359
355
  $metadata: deserializeMetadata(output),
360
356
  ...contents,
361
357
  };
362
- return Promise.resolve(response);
358
+ return response;
363
359
  };
364
360
  const de_CreateSecurityConfigCommandError = async (output, context) => {
365
361
  const parsedOutput = {
@@ -382,10 +378,9 @@ const de_CreateSecurityConfigCommandError = async (output, context) => {
382
378
  throw await de_ValidationExceptionRes(parsedOutput, context);
383
379
  default:
384
380
  const parsedBody = parsedOutput.body;
385
- throwDefaultError({
381
+ return throwDefaultError({
386
382
  output,
387
383
  parsedBody,
388
- exceptionCtor: __BaseException,
389
384
  errorCode,
390
385
  });
391
386
  }
@@ -401,7 +396,7 @@ export const de_CreateSecurityPolicyCommand = async (output, context) => {
401
396
  $metadata: deserializeMetadata(output),
402
397
  ...contents,
403
398
  };
404
- return Promise.resolve(response);
399
+ return response;
405
400
  };
406
401
  const de_CreateSecurityPolicyCommandError = async (output, context) => {
407
402
  const parsedOutput = {
@@ -424,10 +419,9 @@ const de_CreateSecurityPolicyCommandError = async (output, context) => {
424
419
  throw await de_ValidationExceptionRes(parsedOutput, context);
425
420
  default:
426
421
  const parsedBody = parsedOutput.body;
427
- throwDefaultError({
422
+ return throwDefaultError({
428
423
  output,
429
424
  parsedBody,
430
- exceptionCtor: __BaseException,
431
425
  errorCode,
432
426
  });
433
427
  }
@@ -438,12 +432,12 @@ export const de_CreateVpcEndpointCommand = async (output, context) => {
438
432
  }
439
433
  const data = await parseBody(output.body, context);
440
434
  let contents = {};
441
- contents = de_CreateVpcEndpointResponse(data, context);
435
+ contents = _json(data);
442
436
  const response = {
443
437
  $metadata: deserializeMetadata(output),
444
438
  ...contents,
445
439
  };
446
- return Promise.resolve(response);
440
+ return response;
447
441
  };
448
442
  const de_CreateVpcEndpointCommandError = async (output, context) => {
449
443
  const parsedOutput = {
@@ -466,10 +460,9 @@ const de_CreateVpcEndpointCommandError = async (output, context) => {
466
460
  throw await de_ValidationExceptionRes(parsedOutput, context);
467
461
  default:
468
462
  const parsedBody = parsedOutput.body;
469
- throwDefaultError({
463
+ return throwDefaultError({
470
464
  output,
471
465
  parsedBody,
472
- exceptionCtor: __BaseException,
473
466
  errorCode,
474
467
  });
475
468
  }
@@ -480,12 +473,12 @@ export const de_DeleteAccessPolicyCommand = async (output, context) => {
480
473
  }
481
474
  const data = await parseBody(output.body, context);
482
475
  let contents = {};
483
- contents = de_DeleteAccessPolicyResponse(data, context);
476
+ contents = _json(data);
484
477
  const response = {
485
478
  $metadata: deserializeMetadata(output),
486
479
  ...contents,
487
480
  };
488
- return Promise.resolve(response);
481
+ return response;
489
482
  };
490
483
  const de_DeleteAccessPolicyCommandError = async (output, context) => {
491
484
  const parsedOutput = {
@@ -508,10 +501,9 @@ const de_DeleteAccessPolicyCommandError = async (output, context) => {
508
501
  throw await de_ValidationExceptionRes(parsedOutput, context);
509
502
  default:
510
503
  const parsedBody = parsedOutput.body;
511
- throwDefaultError({
504
+ return throwDefaultError({
512
505
  output,
513
506
  parsedBody,
514
- exceptionCtor: __BaseException,
515
507
  errorCode,
516
508
  });
517
509
  }
@@ -522,12 +514,12 @@ export const de_DeleteCollectionCommand = async (output, context) => {
522
514
  }
523
515
  const data = await parseBody(output.body, context);
524
516
  let contents = {};
525
- contents = de_DeleteCollectionResponse(data, context);
517
+ contents = _json(data);
526
518
  const response = {
527
519
  $metadata: deserializeMetadata(output),
528
520
  ...contents,
529
521
  };
530
- return Promise.resolve(response);
522
+ return response;
531
523
  };
532
524
  const de_DeleteCollectionCommandError = async (output, context) => {
533
525
  const parsedOutput = {
@@ -550,10 +542,9 @@ const de_DeleteCollectionCommandError = async (output, context) => {
550
542
  throw await de_ValidationExceptionRes(parsedOutput, context);
551
543
  default:
552
544
  const parsedBody = parsedOutput.body;
553
- throwDefaultError({
545
+ return throwDefaultError({
554
546
  output,
555
547
  parsedBody,
556
- exceptionCtor: __BaseException,
557
548
  errorCode,
558
549
  });
559
550
  }
@@ -564,12 +555,12 @@ export const de_DeleteSecurityConfigCommand = async (output, context) => {
564
555
  }
565
556
  const data = await parseBody(output.body, context);
566
557
  let contents = {};
567
- contents = de_DeleteSecurityConfigResponse(data, context);
558
+ contents = _json(data);
568
559
  const response = {
569
560
  $metadata: deserializeMetadata(output),
570
561
  ...contents,
571
562
  };
572
- return Promise.resolve(response);
563
+ return response;
573
564
  };
574
565
  const de_DeleteSecurityConfigCommandError = async (output, context) => {
575
566
  const parsedOutput = {
@@ -592,10 +583,9 @@ const de_DeleteSecurityConfigCommandError = async (output, context) => {
592
583
  throw await de_ValidationExceptionRes(parsedOutput, context);
593
584
  default:
594
585
  const parsedBody = parsedOutput.body;
595
- throwDefaultError({
586
+ return throwDefaultError({
596
587
  output,
597
588
  parsedBody,
598
- exceptionCtor: __BaseException,
599
589
  errorCode,
600
590
  });
601
591
  }
@@ -606,12 +596,12 @@ export const de_DeleteSecurityPolicyCommand = async (output, context) => {
606
596
  }
607
597
  const data = await parseBody(output.body, context);
608
598
  let contents = {};
609
- contents = de_DeleteSecurityPolicyResponse(data, context);
599
+ contents = _json(data);
610
600
  const response = {
611
601
  $metadata: deserializeMetadata(output),
612
602
  ...contents,
613
603
  };
614
- return Promise.resolve(response);
604
+ return response;
615
605
  };
616
606
  const de_DeleteSecurityPolicyCommandError = async (output, context) => {
617
607
  const parsedOutput = {
@@ -634,10 +624,9 @@ const de_DeleteSecurityPolicyCommandError = async (output, context) => {
634
624
  throw await de_ValidationExceptionRes(parsedOutput, context);
635
625
  default:
636
626
  const parsedBody = parsedOutput.body;
637
- throwDefaultError({
627
+ return throwDefaultError({
638
628
  output,
639
629
  parsedBody,
640
- exceptionCtor: __BaseException,
641
630
  errorCode,
642
631
  });
643
632
  }
@@ -648,12 +637,12 @@ export const de_DeleteVpcEndpointCommand = async (output, context) => {
648
637
  }
649
638
  const data = await parseBody(output.body, context);
650
639
  let contents = {};
651
- contents = de_DeleteVpcEndpointResponse(data, context);
640
+ contents = _json(data);
652
641
  const response = {
653
642
  $metadata: deserializeMetadata(output),
654
643
  ...contents,
655
644
  };
656
- return Promise.resolve(response);
645
+ return response;
657
646
  };
658
647
  const de_DeleteVpcEndpointCommandError = async (output, context) => {
659
648
  const parsedOutput = {
@@ -676,10 +665,9 @@ const de_DeleteVpcEndpointCommandError = async (output, context) => {
676
665
  throw await de_ValidationExceptionRes(parsedOutput, context);
677
666
  default:
678
667
  const parsedBody = parsedOutput.body;
679
- throwDefaultError({
668
+ return throwDefaultError({
680
669
  output,
681
670
  parsedBody,
682
- exceptionCtor: __BaseException,
683
671
  errorCode,
684
672
  });
685
673
  }
@@ -695,7 +683,7 @@ export const de_GetAccessPolicyCommand = async (output, context) => {
695
683
  $metadata: deserializeMetadata(output),
696
684
  ...contents,
697
685
  };
698
- return Promise.resolve(response);
686
+ return response;
699
687
  };
700
688
  const de_GetAccessPolicyCommandError = async (output, context) => {
701
689
  const parsedOutput = {
@@ -715,10 +703,9 @@ const de_GetAccessPolicyCommandError = async (output, context) => {
715
703
  throw await de_ValidationExceptionRes(parsedOutput, context);
716
704
  default:
717
705
  const parsedBody = parsedOutput.body;
718
- throwDefaultError({
706
+ return throwDefaultError({
719
707
  output,
720
708
  parsedBody,
721
- exceptionCtor: __BaseException,
722
709
  errorCode,
723
710
  });
724
711
  }
@@ -729,12 +716,12 @@ export const de_GetAccountSettingsCommand = async (output, context) => {
729
716
  }
730
717
  const data = await parseBody(output.body, context);
731
718
  let contents = {};
732
- contents = de_GetAccountSettingsResponse(data, context);
719
+ contents = _json(data);
733
720
  const response = {
734
721
  $metadata: deserializeMetadata(output),
735
722
  ...contents,
736
723
  };
737
- return Promise.resolve(response);
724
+ return response;
738
725
  };
739
726
  const de_GetAccountSettingsCommandError = async (output, context) => {
740
727
  const parsedOutput = {
@@ -751,10 +738,9 @@ const de_GetAccountSettingsCommandError = async (output, context) => {
751
738
  throw await de_ValidationExceptionRes(parsedOutput, context);
752
739
  default:
753
740
  const parsedBody = parsedOutput.body;
754
- throwDefaultError({
741
+ return throwDefaultError({
755
742
  output,
756
743
  parsedBody,
757
- exceptionCtor: __BaseException,
758
744
  errorCode,
759
745
  });
760
746
  }
@@ -765,12 +751,12 @@ export const de_GetPoliciesStatsCommand = async (output, context) => {
765
751
  }
766
752
  const data = await parseBody(output.body, context);
767
753
  let contents = {};
768
- contents = de_GetPoliciesStatsResponse(data, context);
754
+ contents = _json(data);
769
755
  const response = {
770
756
  $metadata: deserializeMetadata(output),
771
757
  ...contents,
772
758
  };
773
- return Promise.resolve(response);
759
+ return response;
774
760
  };
775
761
  const de_GetPoliciesStatsCommandError = async (output, context) => {
776
762
  const parsedOutput = {
@@ -784,10 +770,9 @@ const de_GetPoliciesStatsCommandError = async (output, context) => {
784
770
  throw await de_InternalServerExceptionRes(parsedOutput, context);
785
771
  default:
786
772
  const parsedBody = parsedOutput.body;
787
- throwDefaultError({
773
+ return throwDefaultError({
788
774
  output,
789
775
  parsedBody,
790
- exceptionCtor: __BaseException,
791
776
  errorCode,
792
777
  });
793
778
  }
@@ -798,12 +783,12 @@ export const de_GetSecurityConfigCommand = async (output, context) => {
798
783
  }
799
784
  const data = await parseBody(output.body, context);
800
785
  let contents = {};
801
- contents = de_GetSecurityConfigResponse(data, context);
786
+ contents = _json(data);
802
787
  const response = {
803
788
  $metadata: deserializeMetadata(output),
804
789
  ...contents,
805
790
  };
806
- return Promise.resolve(response);
791
+ return response;
807
792
  };
808
793
  const de_GetSecurityConfigCommandError = async (output, context) => {
809
794
  const parsedOutput = {
@@ -823,10 +808,9 @@ const de_GetSecurityConfigCommandError = async (output, context) => {
823
808
  throw await de_ValidationExceptionRes(parsedOutput, context);
824
809
  default:
825
810
  const parsedBody = parsedOutput.body;
826
- throwDefaultError({
811
+ return throwDefaultError({
827
812
  output,
828
813
  parsedBody,
829
- exceptionCtor: __BaseException,
830
814
  errorCode,
831
815
  });
832
816
  }
@@ -842,7 +826,7 @@ export const de_GetSecurityPolicyCommand = async (output, context) => {
842
826
  $metadata: deserializeMetadata(output),
843
827
  ...contents,
844
828
  };
845
- return Promise.resolve(response);
829
+ return response;
846
830
  };
847
831
  const de_GetSecurityPolicyCommandError = async (output, context) => {
848
832
  const parsedOutput = {
@@ -862,10 +846,9 @@ const de_GetSecurityPolicyCommandError = async (output, context) => {
862
846
  throw await de_ValidationExceptionRes(parsedOutput, context);
863
847
  default:
864
848
  const parsedBody = parsedOutput.body;
865
- throwDefaultError({
849
+ return throwDefaultError({
866
850
  output,
867
851
  parsedBody,
868
- exceptionCtor: __BaseException,
869
852
  errorCode,
870
853
  });
871
854
  }
@@ -876,12 +859,12 @@ export const de_ListAccessPoliciesCommand = async (output, context) => {
876
859
  }
877
860
  const data = await parseBody(output.body, context);
878
861
  let contents = {};
879
- contents = de_ListAccessPoliciesResponse(data, context);
862
+ contents = _json(data);
880
863
  const response = {
881
864
  $metadata: deserializeMetadata(output),
882
865
  ...contents,
883
866
  };
884
- return Promise.resolve(response);
867
+ return response;
885
868
  };
886
869
  const de_ListAccessPoliciesCommandError = async (output, context) => {
887
870
  const parsedOutput = {
@@ -898,10 +881,9 @@ const de_ListAccessPoliciesCommandError = async (output, context) => {
898
881
  throw await de_ValidationExceptionRes(parsedOutput, context);
899
882
  default:
900
883
  const parsedBody = parsedOutput.body;
901
- throwDefaultError({
884
+ return throwDefaultError({
902
885
  output,
903
886
  parsedBody,
904
- exceptionCtor: __BaseException,
905
887
  errorCode,
906
888
  });
907
889
  }
@@ -912,12 +894,12 @@ export const de_ListCollectionsCommand = async (output, context) => {
912
894
  }
913
895
  const data = await parseBody(output.body, context);
914
896
  let contents = {};
915
- contents = de_ListCollectionsResponse(data, context);
897
+ contents = _json(data);
916
898
  const response = {
917
899
  $metadata: deserializeMetadata(output),
918
900
  ...contents,
919
901
  };
920
- return Promise.resolve(response);
902
+ return response;
921
903
  };
922
904
  const de_ListCollectionsCommandError = async (output, context) => {
923
905
  const parsedOutput = {
@@ -934,10 +916,9 @@ const de_ListCollectionsCommandError = async (output, context) => {
934
916
  throw await de_ValidationExceptionRes(parsedOutput, context);
935
917
  default:
936
918
  const parsedBody = parsedOutput.body;
937
- throwDefaultError({
919
+ return throwDefaultError({
938
920
  output,
939
921
  parsedBody,
940
- exceptionCtor: __BaseException,
941
922
  errorCode,
942
923
  });
943
924
  }
@@ -948,12 +929,12 @@ export const de_ListSecurityConfigsCommand = async (output, context) => {
948
929
  }
949
930
  const data = await parseBody(output.body, context);
950
931
  let contents = {};
951
- contents = de_ListSecurityConfigsResponse(data, context);
932
+ contents = _json(data);
952
933
  const response = {
953
934
  $metadata: deserializeMetadata(output),
954
935
  ...contents,
955
936
  };
956
- return Promise.resolve(response);
937
+ return response;
957
938
  };
958
939
  const de_ListSecurityConfigsCommandError = async (output, context) => {
959
940
  const parsedOutput = {
@@ -970,10 +951,9 @@ const de_ListSecurityConfigsCommandError = async (output, context) => {
970
951
  throw await de_ValidationExceptionRes(parsedOutput, context);
971
952
  default:
972
953
  const parsedBody = parsedOutput.body;
973
- throwDefaultError({
954
+ return throwDefaultError({
974
955
  output,
975
956
  parsedBody,
976
- exceptionCtor: __BaseException,
977
957
  errorCode,
978
958
  });
979
959
  }
@@ -984,12 +964,12 @@ export const de_ListSecurityPoliciesCommand = async (output, context) => {
984
964
  }
985
965
  const data = await parseBody(output.body, context);
986
966
  let contents = {};
987
- contents = de_ListSecurityPoliciesResponse(data, context);
967
+ contents = _json(data);
988
968
  const response = {
989
969
  $metadata: deserializeMetadata(output),
990
970
  ...contents,
991
971
  };
992
- return Promise.resolve(response);
972
+ return response;
993
973
  };
994
974
  const de_ListSecurityPoliciesCommandError = async (output, context) => {
995
975
  const parsedOutput = {
@@ -1006,10 +986,9 @@ const de_ListSecurityPoliciesCommandError = async (output, context) => {
1006
986
  throw await de_ValidationExceptionRes(parsedOutput, context);
1007
987
  default:
1008
988
  const parsedBody = parsedOutput.body;
1009
- throwDefaultError({
989
+ return throwDefaultError({
1010
990
  output,
1011
991
  parsedBody,
1012
- exceptionCtor: __BaseException,
1013
992
  errorCode,
1014
993
  });
1015
994
  }
@@ -1020,12 +999,12 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1020
999
  }
1021
1000
  const data = await parseBody(output.body, context);
1022
1001
  let contents = {};
1023
- contents = de_ListTagsForResourceResponse(data, context);
1002
+ contents = _json(data);
1024
1003
  const response = {
1025
1004
  $metadata: deserializeMetadata(output),
1026
1005
  ...contents,
1027
1006
  };
1028
- return Promise.resolve(response);
1007
+ return response;
1029
1008
  };
1030
1009
  const de_ListTagsForResourceCommandError = async (output, context) => {
1031
1010
  const parsedOutput = {
@@ -1045,10 +1024,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1045
1024
  throw await de_ValidationExceptionRes(parsedOutput, context);
1046
1025
  default:
1047
1026
  const parsedBody = parsedOutput.body;
1048
- throwDefaultError({
1027
+ return throwDefaultError({
1049
1028
  output,
1050
1029
  parsedBody,
1051
- exceptionCtor: __BaseException,
1052
1030
  errorCode,
1053
1031
  });
1054
1032
  }
@@ -1059,12 +1037,12 @@ export const de_ListVpcEndpointsCommand = async (output, context) => {
1059
1037
  }
1060
1038
  const data = await parseBody(output.body, context);
1061
1039
  let contents = {};
1062
- contents = de_ListVpcEndpointsResponse(data, context);
1040
+ contents = _json(data);
1063
1041
  const response = {
1064
1042
  $metadata: deserializeMetadata(output),
1065
1043
  ...contents,
1066
1044
  };
1067
- return Promise.resolve(response);
1045
+ return response;
1068
1046
  };
1069
1047
  const de_ListVpcEndpointsCommandError = async (output, context) => {
1070
1048
  const parsedOutput = {
@@ -1081,10 +1059,9 @@ const de_ListVpcEndpointsCommandError = async (output, context) => {
1081
1059
  throw await de_ValidationExceptionRes(parsedOutput, context);
1082
1060
  default:
1083
1061
  const parsedBody = parsedOutput.body;
1084
- throwDefaultError({
1062
+ return throwDefaultError({
1085
1063
  output,
1086
1064
  parsedBody,
1087
- exceptionCtor: __BaseException,
1088
1065
  errorCode,
1089
1066
  });
1090
1067
  }
@@ -1095,12 +1072,12 @@ export const de_TagResourceCommand = async (output, context) => {
1095
1072
  }
1096
1073
  const data = await parseBody(output.body, context);
1097
1074
  let contents = {};
1098
- contents = de_TagResourceResponse(data, context);
1075
+ contents = _json(data);
1099
1076
  const response = {
1100
1077
  $metadata: deserializeMetadata(output),
1101
1078
  ...contents,
1102
1079
  };
1103
- return Promise.resolve(response);
1080
+ return response;
1104
1081
  };
1105
1082
  const de_TagResourceCommandError = async (output, context) => {
1106
1083
  const parsedOutput = {
@@ -1126,10 +1103,9 @@ const de_TagResourceCommandError = async (output, context) => {
1126
1103
  throw await de_ValidationExceptionRes(parsedOutput, context);
1127
1104
  default:
1128
1105
  const parsedBody = parsedOutput.body;
1129
- throwDefaultError({
1106
+ return throwDefaultError({
1130
1107
  output,
1131
1108
  parsedBody,
1132
- exceptionCtor: __BaseException,
1133
1109
  errorCode,
1134
1110
  });
1135
1111
  }
@@ -1140,12 +1116,12 @@ export const de_UntagResourceCommand = async (output, context) => {
1140
1116
  }
1141
1117
  const data = await parseBody(output.body, context);
1142
1118
  let contents = {};
1143
- contents = de_UntagResourceResponse(data, context);
1119
+ contents = _json(data);
1144
1120
  const response = {
1145
1121
  $metadata: deserializeMetadata(output),
1146
1122
  ...contents,
1147
1123
  };
1148
- return Promise.resolve(response);
1124
+ return response;
1149
1125
  };
1150
1126
  const de_UntagResourceCommandError = async (output, context) => {
1151
1127
  const parsedOutput = {
@@ -1168,10 +1144,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1168
1144
  throw await de_ValidationExceptionRes(parsedOutput, context);
1169
1145
  default:
1170
1146
  const parsedBody = parsedOutput.body;
1171
- throwDefaultError({
1147
+ return throwDefaultError({
1172
1148
  output,
1173
1149
  parsedBody,
1174
- exceptionCtor: __BaseException,
1175
1150
  errorCode,
1176
1151
  });
1177
1152
  }
@@ -1187,7 +1162,7 @@ export const de_UpdateAccessPolicyCommand = async (output, context) => {
1187
1162
  $metadata: deserializeMetadata(output),
1188
1163
  ...contents,
1189
1164
  };
1190
- return Promise.resolve(response);
1165
+ return response;
1191
1166
  };
1192
1167
  const de_UpdateAccessPolicyCommandError = async (output, context) => {
1193
1168
  const parsedOutput = {
@@ -1210,10 +1185,9 @@ const de_UpdateAccessPolicyCommandError = async (output, context) => {
1210
1185
  throw await de_ValidationExceptionRes(parsedOutput, context);
1211
1186
  default:
1212
1187
  const parsedBody = parsedOutput.body;
1213
- throwDefaultError({
1188
+ return throwDefaultError({
1214
1189
  output,
1215
1190
  parsedBody,
1216
- exceptionCtor: __BaseException,
1217
1191
  errorCode,
1218
1192
  });
1219
1193
  }
@@ -1224,12 +1198,12 @@ export const de_UpdateAccountSettingsCommand = async (output, context) => {
1224
1198
  }
1225
1199
  const data = await parseBody(output.body, context);
1226
1200
  let contents = {};
1227
- contents = de_UpdateAccountSettingsResponse(data, context);
1201
+ contents = _json(data);
1228
1202
  const response = {
1229
1203
  $metadata: deserializeMetadata(output),
1230
1204
  ...contents,
1231
1205
  };
1232
- return Promise.resolve(response);
1206
+ return response;
1233
1207
  };
1234
1208
  const de_UpdateAccountSettingsCommandError = async (output, context) => {
1235
1209
  const parsedOutput = {
@@ -1246,10 +1220,9 @@ const de_UpdateAccountSettingsCommandError = async (output, context) => {
1246
1220
  throw await de_ValidationExceptionRes(parsedOutput, context);
1247
1221
  default:
1248
1222
  const parsedBody = parsedOutput.body;
1249
- throwDefaultError({
1223
+ return throwDefaultError({
1250
1224
  output,
1251
1225
  parsedBody,
1252
- exceptionCtor: __BaseException,
1253
1226
  errorCode,
1254
1227
  });
1255
1228
  }
@@ -1260,12 +1233,12 @@ export const de_UpdateCollectionCommand = async (output, context) => {
1260
1233
  }
1261
1234
  const data = await parseBody(output.body, context);
1262
1235
  let contents = {};
1263
- contents = de_UpdateCollectionResponse(data, context);
1236
+ contents = _json(data);
1264
1237
  const response = {
1265
1238
  $metadata: deserializeMetadata(output),
1266
1239
  ...contents,
1267
1240
  };
1268
- return Promise.resolve(response);
1241
+ return response;
1269
1242
  };
1270
1243
  const de_UpdateCollectionCommandError = async (output, context) => {
1271
1244
  const parsedOutput = {
@@ -1285,10 +1258,9 @@ const de_UpdateCollectionCommandError = async (output, context) => {
1285
1258
  throw await de_ValidationExceptionRes(parsedOutput, context);
1286
1259
  default:
1287
1260
  const parsedBody = parsedOutput.body;
1288
- throwDefaultError({
1261
+ return throwDefaultError({
1289
1262
  output,
1290
1263
  parsedBody,
1291
- exceptionCtor: __BaseException,
1292
1264
  errorCode,
1293
1265
  });
1294
1266
  }
@@ -1299,12 +1271,12 @@ export const de_UpdateSecurityConfigCommand = async (output, context) => {
1299
1271
  }
1300
1272
  const data = await parseBody(output.body, context);
1301
1273
  let contents = {};
1302
- contents = de_UpdateSecurityConfigResponse(data, context);
1274
+ contents = _json(data);
1303
1275
  const response = {
1304
1276
  $metadata: deserializeMetadata(output),
1305
1277
  ...contents,
1306
1278
  };
1307
- return Promise.resolve(response);
1279
+ return response;
1308
1280
  };
1309
1281
  const de_UpdateSecurityConfigCommandError = async (output, context) => {
1310
1282
  const parsedOutput = {
@@ -1327,10 +1299,9 @@ const de_UpdateSecurityConfigCommandError = async (output, context) => {
1327
1299
  throw await de_ValidationExceptionRes(parsedOutput, context);
1328
1300
  default:
1329
1301
  const parsedBody = parsedOutput.body;
1330
- throwDefaultError({
1302
+ return throwDefaultError({
1331
1303
  output,
1332
1304
  parsedBody,
1333
- exceptionCtor: __BaseException,
1334
1305
  errorCode,
1335
1306
  });
1336
1307
  }
@@ -1346,7 +1317,7 @@ export const de_UpdateSecurityPolicyCommand = async (output, context) => {
1346
1317
  $metadata: deserializeMetadata(output),
1347
1318
  ...contents,
1348
1319
  };
1349
- return Promise.resolve(response);
1320
+ return response;
1350
1321
  };
1351
1322
  const de_UpdateSecurityPolicyCommandError = async (output, context) => {
1352
1323
  const parsedOutput = {
@@ -1372,10 +1343,9 @@ const de_UpdateSecurityPolicyCommandError = async (output, context) => {
1372
1343
  throw await de_ValidationExceptionRes(parsedOutput, context);
1373
1344
  default:
1374
1345
  const parsedBody = parsedOutput.body;
1375
- throwDefaultError({
1346
+ return throwDefaultError({
1376
1347
  output,
1377
1348
  parsedBody,
1378
- exceptionCtor: __BaseException,
1379
1349
  errorCode,
1380
1350
  });
1381
1351
  }
@@ -1386,12 +1356,12 @@ export const de_UpdateVpcEndpointCommand = async (output, context) => {
1386
1356
  }
1387
1357
  const data = await parseBody(output.body, context);
1388
1358
  let contents = {};
1389
- contents = de_UpdateVpcEndpointResponse(data, context);
1359
+ contents = _json(data);
1390
1360
  const response = {
1391
1361
  $metadata: deserializeMetadata(output),
1392
1362
  ...contents,
1393
1363
  };
1394
- return Promise.resolve(response);
1364
+ return response;
1395
1365
  };
1396
1366
  const de_UpdateVpcEndpointCommandError = async (output, context) => {
1397
1367
  const parsedOutput = {
@@ -1411,17 +1381,16 @@ const de_UpdateVpcEndpointCommandError = async (output, context) => {
1411
1381
  throw await de_ValidationExceptionRes(parsedOutput, context);
1412
1382
  default:
1413
1383
  const parsedBody = parsedOutput.body;
1414
- throwDefaultError({
1384
+ return throwDefaultError({
1415
1385
  output,
1416
1386
  parsedBody,
1417
- exceptionCtor: __BaseException,
1418
1387
  errorCode,
1419
1388
  });
1420
1389
  }
1421
1390
  };
1422
1391
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
1423
1392
  const body = parsedOutput.body;
1424
- const deserialized = de_ConflictException(body, context);
1393
+ const deserialized = _json(body);
1425
1394
  const exception = new ConflictException({
1426
1395
  $metadata: deserializeMetadata(parsedOutput),
1427
1396
  ...deserialized,
@@ -1430,7 +1399,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1430
1399
  };
1431
1400
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1432
1401
  const body = parsedOutput.body;
1433
- const deserialized = de_InternalServerException(body, context);
1402
+ const deserialized = _json(body);
1434
1403
  const exception = new InternalServerException({
1435
1404
  $metadata: deserializeMetadata(parsedOutput),
1436
1405
  ...deserialized,
@@ -1439,7 +1408,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1439
1408
  };
1440
1409
  const de_OcuLimitExceededExceptionRes = async (parsedOutput, context) => {
1441
1410
  const body = parsedOutput.body;
1442
- const deserialized = de_OcuLimitExceededException(body, context);
1411
+ const deserialized = _json(body);
1443
1412
  const exception = new OcuLimitExceededException({
1444
1413
  $metadata: deserializeMetadata(parsedOutput),
1445
1414
  ...deserialized,
@@ -1448,7 +1417,7 @@ const de_OcuLimitExceededExceptionRes = async (parsedOutput, context) => {
1448
1417
  };
1449
1418
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1450
1419
  const body = parsedOutput.body;
1451
- const deserialized = de_ResourceNotFoundException(body, context);
1420
+ const deserialized = _json(body);
1452
1421
  const exception = new ResourceNotFoundException({
1453
1422
  $metadata: deserializeMetadata(parsedOutput),
1454
1423
  ...deserialized,
@@ -1457,7 +1426,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1457
1426
  };
1458
1427
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1459
1428
  const body = parsedOutput.body;
1460
- const deserialized = de_ServiceQuotaExceededException(body, context);
1429
+ const deserialized = _json(body);
1461
1430
  const exception = new ServiceQuotaExceededException({
1462
1431
  $metadata: deserializeMetadata(parsedOutput),
1463
1432
  ...deserialized,
@@ -1466,886 +1435,187 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1466
1435
  };
1467
1436
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
1468
1437
  const body = parsedOutput.body;
1469
- const deserialized = de_ValidationException(body, context);
1438
+ const deserialized = _json(body);
1470
1439
  const exception = new ValidationException({
1471
1440
  $metadata: deserializeMetadata(parsedOutput),
1472
1441
  ...deserialized,
1473
1442
  });
1474
1443
  return __decorateServiceException(exception, body);
1475
1444
  };
1476
- const se_BatchGetCollectionRequest = (input, context) => {
1477
- return {
1478
- ...(input.ids != null && { ids: se_CollectionIds(input.ids, context) }),
1479
- ...(input.names != null && { names: se_CollectionNames(input.names, context) }),
1480
- };
1481
- };
1482
- const se_BatchGetVpcEndpointRequest = (input, context) => {
1483
- return {
1484
- ...(input.ids != null && { ids: se_VpcEndpointIds(input.ids, context) }),
1485
- };
1486
- };
1487
- const se_CapacityLimits = (input, context) => {
1488
- return {
1489
- ...(input.maxIndexingCapacityInOCU != null && { maxIndexingCapacityInOCU: input.maxIndexingCapacityInOCU }),
1490
- ...(input.maxSearchCapacityInOCU != null && { maxSearchCapacityInOCU: input.maxSearchCapacityInOCU }),
1491
- };
1492
- };
1493
- const se_CollectionFilters = (input, context) => {
1494
- return {
1495
- ...(input.name != null && { name: input.name }),
1496
- ...(input.status != null && { status: input.status }),
1497
- };
1498
- };
1499
- const se_CollectionIds = (input, context) => {
1500
- return input
1501
- .filter((e) => e != null)
1502
- .map((entry) => {
1503
- return entry;
1504
- });
1505
- };
1506
- const se_CollectionNames = (input, context) => {
1507
- return input
1508
- .filter((e) => e != null)
1509
- .map((entry) => {
1510
- return entry;
1511
- });
1512
- };
1513
1445
  const se_CreateAccessPolicyRequest = (input, context) => {
1514
- return {
1515
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1516
- ...(input.description != null && { description: input.description }),
1517
- ...(input.name != null && { name: input.name }),
1518
- ...(input.policy != null && { policy: input.policy }),
1519
- ...(input.type != null && { type: input.type }),
1520
- };
1446
+ return take(input, {
1447
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1448
+ description: [],
1449
+ name: [],
1450
+ policy: [],
1451
+ type: [],
1452
+ });
1521
1453
  };
1522
1454
  const se_CreateCollectionRequest = (input, context) => {
1523
- return {
1524
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1525
- ...(input.description != null && { description: input.description }),
1526
- ...(input.name != null && { name: input.name }),
1527
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
1528
- ...(input.type != null && { type: input.type }),
1529
- };
1455
+ return take(input, {
1456
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1457
+ description: [],
1458
+ name: [],
1459
+ tags: _json,
1460
+ type: [],
1461
+ });
1530
1462
  };
1531
1463
  const se_CreateSecurityConfigRequest = (input, context) => {
1532
- return {
1533
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1534
- ...(input.description != null && { description: input.description }),
1535
- ...(input.name != null && { name: input.name }),
1536
- ...(input.samlOptions != null && { samlOptions: se_SamlConfigOptions(input.samlOptions, context) }),
1537
- ...(input.type != null && { type: input.type }),
1538
- };
1464
+ return take(input, {
1465
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1466
+ description: [],
1467
+ name: [],
1468
+ samlOptions: _json,
1469
+ type: [],
1470
+ });
1539
1471
  };
1540
1472
  const se_CreateSecurityPolicyRequest = (input, context) => {
1541
- return {
1542
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1543
- ...(input.description != null && { description: input.description }),
1544
- ...(input.name != null && { name: input.name }),
1545
- ...(input.policy != null && { policy: input.policy }),
1546
- ...(input.type != null && { type: input.type }),
1547
- };
1473
+ return take(input, {
1474
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1475
+ description: [],
1476
+ name: [],
1477
+ policy: [],
1478
+ type: [],
1479
+ });
1548
1480
  };
1549
1481
  const se_CreateVpcEndpointRequest = (input, context) => {
1550
- return {
1551
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1552
- ...(input.name != null && { name: input.name }),
1553
- ...(input.securityGroupIds != null && { securityGroupIds: se_SecurityGroupIds(input.securityGroupIds, context) }),
1554
- ...(input.subnetIds != null && { subnetIds: se_SubnetIds(input.subnetIds, context) }),
1555
- ...(input.vpcId != null && { vpcId: input.vpcId }),
1556
- };
1482
+ return take(input, {
1483
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1484
+ name: [],
1485
+ securityGroupIds: _json,
1486
+ subnetIds: _json,
1487
+ vpcId: [],
1488
+ });
1557
1489
  };
1558
1490
  const se_DeleteAccessPolicyRequest = (input, context) => {
1559
- return {
1560
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1561
- ...(input.name != null && { name: input.name }),
1562
- ...(input.type != null && { type: input.type }),
1563
- };
1564
- };
1565
- const se_DeleteCollectionRequest = (input, context) => {
1566
- return {
1567
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1568
- ...(input.id != null && { id: input.id }),
1569
- };
1570
- };
1571
- const se_DeleteSecurityConfigRequest = (input, context) => {
1572
- return {
1573
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1574
- ...(input.id != null && { id: input.id }),
1575
- };
1576
- };
1577
- const se_DeleteSecurityPolicyRequest = (input, context) => {
1578
- return {
1579
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1580
- ...(input.name != null && { name: input.name }),
1581
- ...(input.type != null && { type: input.type }),
1582
- };
1583
- };
1584
- const se_DeleteVpcEndpointRequest = (input, context) => {
1585
- return {
1586
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1587
- ...(input.id != null && { id: input.id }),
1588
- };
1589
- };
1590
- const se_GetAccessPolicyRequest = (input, context) => {
1591
- return {
1592
- ...(input.name != null && { name: input.name }),
1593
- ...(input.type != null && { type: input.type }),
1594
- };
1595
- };
1596
- const se_GetAccountSettingsRequest = (input, context) => {
1597
- return {};
1598
- };
1599
- const se_GetPoliciesStatsRequest = (input, context) => {
1600
- return {};
1601
- };
1602
- const se_GetSecurityConfigRequest = (input, context) => {
1603
- return {
1604
- ...(input.id != null && { id: input.id }),
1605
- };
1606
- };
1607
- const se_GetSecurityPolicyRequest = (input, context) => {
1608
- return {
1609
- ...(input.name != null && { name: input.name }),
1610
- ...(input.type != null && { type: input.type }),
1611
- };
1612
- };
1613
- const se_ListAccessPoliciesRequest = (input, context) => {
1614
- return {
1615
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1616
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1617
- ...(input.resource != null && { resource: se_ResourceFilter(input.resource, context) }),
1618
- ...(input.type != null && { type: input.type }),
1619
- };
1620
- };
1621
- const se_ListCollectionsRequest = (input, context) => {
1622
- return {
1623
- ...(input.collectionFilters != null && {
1624
- collectionFilters: se_CollectionFilters(input.collectionFilters, context),
1625
- }),
1626
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1627
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1628
- };
1629
- };
1630
- const se_ListSecurityConfigsRequest = (input, context) => {
1631
- return {
1632
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1633
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1634
- ...(input.type != null && { type: input.type }),
1635
- };
1636
- };
1637
- const se_ListSecurityPoliciesRequest = (input, context) => {
1638
- return {
1639
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1640
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1641
- ...(input.resource != null && { resource: se_ResourceFilter(input.resource, context) }),
1642
- ...(input.type != null && { type: input.type }),
1643
- };
1644
- };
1645
- const se_ListTagsForResourceRequest = (input, context) => {
1646
- return {
1647
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
1648
- };
1649
- };
1650
- const se_ListVpcEndpointsRequest = (input, context) => {
1651
- return {
1652
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1653
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1654
- ...(input.vpcEndpointFilters != null && {
1655
- vpcEndpointFilters: se_VpcEndpointFilters(input.vpcEndpointFilters, context),
1656
- }),
1657
- };
1658
- };
1659
- const se_ResourceFilter = (input, context) => {
1660
- return input
1661
- .filter((e) => e != null)
1662
- .map((entry) => {
1663
- return entry;
1491
+ return take(input, {
1492
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1493
+ name: [],
1494
+ type: [],
1664
1495
  });
1665
1496
  };
1666
- const se_SamlConfigOptions = (input, context) => {
1667
- return {
1668
- ...(input.groupAttribute != null && { groupAttribute: input.groupAttribute }),
1669
- ...(input.metadata != null && { metadata: input.metadata }),
1670
- ...(input.sessionTimeout != null && { sessionTimeout: input.sessionTimeout }),
1671
- ...(input.userAttribute != null && { userAttribute: input.userAttribute }),
1672
- };
1673
- };
1674
- const se_SecurityGroupIds = (input, context) => {
1675
- return input
1676
- .filter((e) => e != null)
1677
- .map((entry) => {
1678
- return entry;
1497
+ const se_DeleteCollectionRequest = (input, context) => {
1498
+ return take(input, {
1499
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1500
+ id: [],
1679
1501
  });
1680
1502
  };
1681
- const se_SubnetIds = (input, context) => {
1682
- return input
1683
- .filter((e) => e != null)
1684
- .map((entry) => {
1685
- return entry;
1503
+ const se_DeleteSecurityConfigRequest = (input, context) => {
1504
+ return take(input, {
1505
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1506
+ id: [],
1686
1507
  });
1687
1508
  };
1688
- const se_Tag = (input, context) => {
1689
- return {
1690
- ...(input.key != null && { key: input.key }),
1691
- ...(input.value != null && { value: input.value }),
1692
- };
1693
- };
1694
- const se_TagKeys = (input, context) => {
1695
- return input
1696
- .filter((e) => e != null)
1697
- .map((entry) => {
1698
- return entry;
1509
+ const se_DeleteSecurityPolicyRequest = (input, context) => {
1510
+ return take(input, {
1511
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1512
+ name: [],
1513
+ type: [],
1699
1514
  });
1700
1515
  };
1701
- const se_TagResourceRequest = (input, context) => {
1702
- return {
1703
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
1704
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
1705
- };
1706
- };
1707
- const se_Tags = (input, context) => {
1708
- return input
1709
- .filter((e) => e != null)
1710
- .map((entry) => {
1711
- return se_Tag(entry, context);
1516
+ const se_DeleteVpcEndpointRequest = (input, context) => {
1517
+ return take(input, {
1518
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1519
+ id: [],
1712
1520
  });
1713
1521
  };
1714
- const se_UntagResourceRequest = (input, context) => {
1715
- return {
1716
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
1717
- ...(input.tagKeys != null && { tagKeys: se_TagKeys(input.tagKeys, context) }),
1718
- };
1719
- };
1720
1522
  const se_UpdateAccessPolicyRequest = (input, context) => {
1721
- return {
1722
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1723
- ...(input.description != null && { description: input.description }),
1724
- ...(input.name != null && { name: input.name }),
1725
- ...(input.policy != null && { policy: input.policy }),
1726
- ...(input.policyVersion != null && { policyVersion: input.policyVersion }),
1727
- ...(input.type != null && { type: input.type }),
1728
- };
1729
- };
1730
- const se_UpdateAccountSettingsRequest = (input, context) => {
1731
- return {
1732
- ...(input.capacityLimits != null && { capacityLimits: se_CapacityLimits(input.capacityLimits, context) }),
1733
- };
1523
+ return take(input, {
1524
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1525
+ description: [],
1526
+ name: [],
1527
+ policy: [],
1528
+ policyVersion: [],
1529
+ type: [],
1530
+ });
1734
1531
  };
1735
1532
  const se_UpdateCollectionRequest = (input, context) => {
1736
- return {
1737
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1738
- ...(input.description != null && { description: input.description }),
1739
- ...(input.id != null && { id: input.id }),
1740
- };
1533
+ return take(input, {
1534
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1535
+ description: [],
1536
+ id: [],
1537
+ });
1741
1538
  };
1742
1539
  const se_UpdateSecurityConfigRequest = (input, context) => {
1743
- return {
1744
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1745
- ...(input.configVersion != null && { configVersion: input.configVersion }),
1746
- ...(input.description != null && { description: input.description }),
1747
- ...(input.id != null && { id: input.id }),
1748
- ...(input.samlOptions != null && { samlOptions: se_SamlConfigOptions(input.samlOptions, context) }),
1749
- };
1540
+ return take(input, {
1541
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1542
+ configVersion: [],
1543
+ description: [],
1544
+ id: [],
1545
+ samlOptions: _json,
1546
+ });
1750
1547
  };
1751
1548
  const se_UpdateSecurityPolicyRequest = (input, context) => {
1752
- return {
1753
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1754
- ...(input.description != null && { description: input.description }),
1755
- ...(input.name != null && { name: input.name }),
1756
- ...(input.policy != null && { policy: input.policy }),
1757
- ...(input.policyVersion != null && { policyVersion: input.policyVersion }),
1758
- ...(input.type != null && { type: input.type }),
1759
- };
1549
+ return take(input, {
1550
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1551
+ description: [],
1552
+ name: [],
1553
+ policy: [],
1554
+ policyVersion: [],
1555
+ type: [],
1556
+ });
1760
1557
  };
1761
1558
  const se_UpdateVpcEndpointRequest = (input, context) => {
1762
- return {
1763
- ...(input.addSecurityGroupIds != null && {
1764
- addSecurityGroupIds: se_SecurityGroupIds(input.addSecurityGroupIds, context),
1765
- }),
1766
- ...(input.addSubnetIds != null && { addSubnetIds: se_SubnetIds(input.addSubnetIds, context) }),
1767
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1768
- ...(input.id != null && { id: input.id }),
1769
- ...(input.removeSecurityGroupIds != null && {
1770
- removeSecurityGroupIds: se_SecurityGroupIds(input.removeSecurityGroupIds, context),
1771
- }),
1772
- ...(input.removeSubnetIds != null && { removeSubnetIds: se_SubnetIds(input.removeSubnetIds, context) }),
1773
- };
1774
- };
1775
- const se_VpcEndpointFilters = (input, context) => {
1776
- return {
1777
- ...(input.status != null && { status: input.status }),
1778
- };
1779
- };
1780
- const se_VpcEndpointIds = (input, context) => {
1781
- return input
1782
- .filter((e) => e != null)
1783
- .map((entry) => {
1784
- return entry;
1559
+ return take(input, {
1560
+ addSecurityGroupIds: _json,
1561
+ addSubnetIds: _json,
1562
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1563
+ id: [],
1564
+ removeSecurityGroupIds: _json,
1565
+ removeSubnetIds: _json,
1785
1566
  });
1786
1567
  };
1787
1568
  const de_AccessPolicyDetail = (output, context) => {
1788
- return {
1789
- createdDate: __expectLong(output.createdDate),
1790
- description: __expectString(output.description),
1791
- lastModifiedDate: __expectLong(output.lastModifiedDate),
1792
- name: __expectString(output.name),
1793
- policy: output.policy != null ? de_Document(output.policy, context) : undefined,
1794
- policyVersion: __expectString(output.policyVersion),
1795
- type: __expectString(output.type),
1796
- };
1797
- };
1798
- const de_AccessPolicyStats = (output, context) => {
1799
- return {
1800
- DataPolicyCount: __expectLong(output.DataPolicyCount),
1801
- };
1802
- };
1803
- const de_AccessPolicySummaries = (output, context) => {
1804
- const retVal = (output || [])
1805
- .filter((e) => e != null)
1806
- .map((entry) => {
1807
- if (entry === null) {
1808
- return null;
1809
- }
1810
- return de_AccessPolicySummary(entry, context);
1811
- });
1812
- return retVal;
1813
- };
1814
- const de_AccessPolicySummary = (output, context) => {
1815
- return {
1816
- createdDate: __expectLong(output.createdDate),
1817
- description: __expectString(output.description),
1818
- lastModifiedDate: __expectLong(output.lastModifiedDate),
1819
- name: __expectString(output.name),
1820
- policyVersion: __expectString(output.policyVersion),
1821
- type: __expectString(output.type),
1822
- };
1823
- };
1824
- const de_AccountSettingsDetail = (output, context) => {
1825
- return {
1826
- capacityLimits: output.capacityLimits != null ? de_CapacityLimits(output.capacityLimits, context) : undefined,
1827
- };
1828
- };
1829
- const de_BatchGetCollectionResponse = (output, context) => {
1830
- return {
1831
- collectionDetails: output.collectionDetails != null ? de_CollectionDetails(output.collectionDetails, context) : undefined,
1832
- collectionErrorDetails: output.collectionErrorDetails != null
1833
- ? de_CollectionErrorDetails(output.collectionErrorDetails, context)
1834
- : undefined,
1835
- };
1836
- };
1837
- const de_BatchGetVpcEndpointResponse = (output, context) => {
1838
- return {
1839
- vpcEndpointDetails: output.vpcEndpointDetails != null ? de_VpcEndpointDetails(output.vpcEndpointDetails, context) : undefined,
1840
- vpcEndpointErrorDetails: output.vpcEndpointErrorDetails != null
1841
- ? de_VpcEndpointErrorDetails(output.vpcEndpointErrorDetails, context)
1842
- : undefined,
1843
- };
1844
- };
1845
- const de_CapacityLimits = (output, context) => {
1846
- return {
1847
- maxIndexingCapacityInOCU: __expectInt32(output.maxIndexingCapacityInOCU),
1848
- maxSearchCapacityInOCU: __expectInt32(output.maxSearchCapacityInOCU),
1849
- };
1850
- };
1851
- const de_CollectionDetail = (output, context) => {
1852
- return {
1853
- arn: __expectString(output.arn),
1854
- collectionEndpoint: __expectString(output.collectionEndpoint),
1855
- createdDate: __expectLong(output.createdDate),
1856
- dashboardEndpoint: __expectString(output.dashboardEndpoint),
1857
- description: __expectString(output.description),
1858
- id: __expectString(output.id),
1859
- kmsKeyArn: __expectString(output.kmsKeyArn),
1860
- lastModifiedDate: __expectLong(output.lastModifiedDate),
1861
- name: __expectString(output.name),
1862
- status: __expectString(output.status),
1863
- type: __expectString(output.type),
1864
- };
1865
- };
1866
- const de_CollectionDetails = (output, context) => {
1867
- const retVal = (output || [])
1868
- .filter((e) => e != null)
1869
- .map((entry) => {
1870
- if (entry === null) {
1871
- return null;
1872
- }
1873
- return de_CollectionDetail(entry, context);
1874
- });
1875
- return retVal;
1876
- };
1877
- const de_CollectionErrorDetail = (output, context) => {
1878
- return {
1879
- errorCode: __expectString(output.errorCode),
1880
- errorMessage: __expectString(output.errorMessage),
1881
- id: __expectString(output.id),
1882
- name: __expectString(output.name),
1883
- };
1884
- };
1885
- const de_CollectionErrorDetails = (output, context) => {
1886
- const retVal = (output || [])
1887
- .filter((e) => e != null)
1888
- .map((entry) => {
1889
- if (entry === null) {
1890
- return null;
1891
- }
1892
- return de_CollectionErrorDetail(entry, context);
1893
- });
1894
- return retVal;
1895
- };
1896
- const de_CollectionSummaries = (output, context) => {
1897
- const retVal = (output || [])
1898
- .filter((e) => e != null)
1899
- .map((entry) => {
1900
- if (entry === null) {
1901
- return null;
1902
- }
1903
- return de_CollectionSummary(entry, context);
1569
+ return take(output, {
1570
+ createdDate: __expectLong,
1571
+ description: __expectString,
1572
+ lastModifiedDate: __expectLong,
1573
+ name: __expectString,
1574
+ policy: (_) => de_Document(_, context),
1575
+ policyVersion: __expectString,
1576
+ type: __expectString,
1904
1577
  });
1905
- return retVal;
1906
- };
1907
- const de_CollectionSummary = (output, context) => {
1908
- return {
1909
- arn: __expectString(output.arn),
1910
- id: __expectString(output.id),
1911
- name: __expectString(output.name),
1912
- status: __expectString(output.status),
1913
- };
1914
- };
1915
- const de_ConflictException = (output, context) => {
1916
- return {
1917
- message: __expectString(output.message),
1918
- };
1919
1578
  };
1920
1579
  const de_CreateAccessPolicyResponse = (output, context) => {
1921
- return {
1922
- accessPolicyDetail: output.accessPolicyDetail != null ? de_AccessPolicyDetail(output.accessPolicyDetail, context) : undefined,
1923
- };
1924
- };
1925
- const de_CreateCollectionDetail = (output, context) => {
1926
- return {
1927
- arn: __expectString(output.arn),
1928
- createdDate: __expectLong(output.createdDate),
1929
- description: __expectString(output.description),
1930
- id: __expectString(output.id),
1931
- kmsKeyArn: __expectString(output.kmsKeyArn),
1932
- lastModifiedDate: __expectLong(output.lastModifiedDate),
1933
- name: __expectString(output.name),
1934
- status: __expectString(output.status),
1935
- type: __expectString(output.type),
1936
- };
1937
- };
1938
- const de_CreateCollectionResponse = (output, context) => {
1939
- return {
1940
- createCollectionDetail: output.createCollectionDetail != null
1941
- ? de_CreateCollectionDetail(output.createCollectionDetail, context)
1942
- : undefined,
1943
- };
1944
- };
1945
- const de_CreateSecurityConfigResponse = (output, context) => {
1946
- return {
1947
- securityConfigDetail: output.securityConfigDetail != null ? de_SecurityConfigDetail(output.securityConfigDetail, context) : undefined,
1948
- };
1580
+ return take(output, {
1581
+ accessPolicyDetail: (_) => de_AccessPolicyDetail(_, context),
1582
+ });
1949
1583
  };
1950
1584
  const de_CreateSecurityPolicyResponse = (output, context) => {
1951
- return {
1952
- securityPolicyDetail: output.securityPolicyDetail != null ? de_SecurityPolicyDetail(output.securityPolicyDetail, context) : undefined,
1953
- };
1954
- };
1955
- const de_CreateVpcEndpointDetail = (output, context) => {
1956
- return {
1957
- id: __expectString(output.id),
1958
- name: __expectString(output.name),
1959
- status: __expectString(output.status),
1960
- };
1961
- };
1962
- const de_CreateVpcEndpointResponse = (output, context) => {
1963
- return {
1964
- createVpcEndpointDetail: output.createVpcEndpointDetail != null
1965
- ? de_CreateVpcEndpointDetail(output.createVpcEndpointDetail, context)
1966
- : undefined,
1967
- };
1968
- };
1969
- const de_DeleteAccessPolicyResponse = (output, context) => {
1970
- return {};
1971
- };
1972
- const de_DeleteCollectionDetail = (output, context) => {
1973
- return {
1974
- id: __expectString(output.id),
1975
- name: __expectString(output.name),
1976
- status: __expectString(output.status),
1977
- };
1978
- };
1979
- const de_DeleteCollectionResponse = (output, context) => {
1980
- return {
1981
- deleteCollectionDetail: output.deleteCollectionDetail != null
1982
- ? de_DeleteCollectionDetail(output.deleteCollectionDetail, context)
1983
- : undefined,
1984
- };
1985
- };
1986
- const de_DeleteSecurityConfigResponse = (output, context) => {
1987
- return {};
1988
- };
1989
- const de_DeleteSecurityPolicyResponse = (output, context) => {
1990
- return {};
1991
- };
1992
- const de_DeleteVpcEndpointDetail = (output, context) => {
1993
- return {
1994
- id: __expectString(output.id),
1995
- name: __expectString(output.name),
1996
- status: __expectString(output.status),
1997
- };
1998
- };
1999
- const de_DeleteVpcEndpointResponse = (output, context) => {
2000
- return {
2001
- deleteVpcEndpointDetail: output.deleteVpcEndpointDetail != null
2002
- ? de_DeleteVpcEndpointDetail(output.deleteVpcEndpointDetail, context)
2003
- : undefined,
2004
- };
1585
+ return take(output, {
1586
+ securityPolicyDetail: (_) => de_SecurityPolicyDetail(_, context),
1587
+ });
2005
1588
  };
2006
1589
  const de_GetAccessPolicyResponse = (output, context) => {
2007
- return {
2008
- accessPolicyDetail: output.accessPolicyDetail != null ? de_AccessPolicyDetail(output.accessPolicyDetail, context) : undefined,
2009
- };
2010
- };
2011
- const de_GetAccountSettingsResponse = (output, context) => {
2012
- return {
2013
- accountSettingsDetail: output.accountSettingsDetail != null
2014
- ? de_AccountSettingsDetail(output.accountSettingsDetail, context)
2015
- : undefined,
2016
- };
2017
- };
2018
- const de_GetPoliciesStatsResponse = (output, context) => {
2019
- return {
2020
- AccessPolicyStats: output.AccessPolicyStats != null ? de_AccessPolicyStats(output.AccessPolicyStats, context) : undefined,
2021
- SecurityConfigStats: output.SecurityConfigStats != null ? de_SecurityConfigStats(output.SecurityConfigStats, context) : undefined,
2022
- SecurityPolicyStats: output.SecurityPolicyStats != null ? de_SecurityPolicyStats(output.SecurityPolicyStats, context) : undefined,
2023
- TotalPolicyCount: __expectLong(output.TotalPolicyCount),
2024
- };
2025
- };
2026
- const de_GetSecurityConfigResponse = (output, context) => {
2027
- return {
2028
- securityConfigDetail: output.securityConfigDetail != null ? de_SecurityConfigDetail(output.securityConfigDetail, context) : undefined,
2029
- };
2030
- };
2031
- const de_GetSecurityPolicyResponse = (output, context) => {
2032
- return {
2033
- securityPolicyDetail: output.securityPolicyDetail != null ? de_SecurityPolicyDetail(output.securityPolicyDetail, context) : undefined,
2034
- };
2035
- };
2036
- const de_InternalServerException = (output, context) => {
2037
- return {
2038
- message: __expectString(output.message),
2039
- };
2040
- };
2041
- const de_ListAccessPoliciesResponse = (output, context) => {
2042
- return {
2043
- accessPolicySummaries: output.accessPolicySummaries != null
2044
- ? de_AccessPolicySummaries(output.accessPolicySummaries, context)
2045
- : undefined,
2046
- nextToken: __expectString(output.nextToken),
2047
- };
2048
- };
2049
- const de_ListCollectionsResponse = (output, context) => {
2050
- return {
2051
- collectionSummaries: output.collectionSummaries != null ? de_CollectionSummaries(output.collectionSummaries, context) : undefined,
2052
- nextToken: __expectString(output.nextToken),
2053
- };
2054
- };
2055
- const de_ListSecurityConfigsResponse = (output, context) => {
2056
- return {
2057
- nextToken: __expectString(output.nextToken),
2058
- securityConfigSummaries: output.securityConfigSummaries != null
2059
- ? de_SecurityConfigSummaries(output.securityConfigSummaries, context)
2060
- : undefined,
2061
- };
2062
- };
2063
- const de_ListSecurityPoliciesResponse = (output, context) => {
2064
- return {
2065
- nextToken: __expectString(output.nextToken),
2066
- securityPolicySummaries: output.securityPolicySummaries != null
2067
- ? de_SecurityPolicySummaries(output.securityPolicySummaries, context)
2068
- : undefined,
2069
- };
2070
- };
2071
- const de_ListTagsForResourceResponse = (output, context) => {
2072
- return {
2073
- tags: output.tags != null ? de_Tags(output.tags, context) : undefined,
2074
- };
2075
- };
2076
- const de_ListVpcEndpointsResponse = (output, context) => {
2077
- return {
2078
- nextToken: __expectString(output.nextToken),
2079
- vpcEndpointSummaries: output.vpcEndpointSummaries != null ? de_VpcEndpointSummaries(output.vpcEndpointSummaries, context) : undefined,
2080
- };
2081
- };
2082
- const de_OcuLimitExceededException = (output, context) => {
2083
- return {
2084
- message: __expectString(output.message),
2085
- };
2086
- };
2087
- const de_ResourceNotFoundException = (output, context) => {
2088
- return {
2089
- message: __expectString(output.message),
2090
- };
2091
- };
2092
- const de_SamlConfigOptions = (output, context) => {
2093
- return {
2094
- groupAttribute: __expectString(output.groupAttribute),
2095
- metadata: __expectString(output.metadata),
2096
- sessionTimeout: __expectInt32(output.sessionTimeout),
2097
- userAttribute: __expectString(output.userAttribute),
2098
- };
2099
- };
2100
- const de_SecurityConfigDetail = (output, context) => {
2101
- return {
2102
- configVersion: __expectString(output.configVersion),
2103
- createdDate: __expectLong(output.createdDate),
2104
- description: __expectString(output.description),
2105
- id: __expectString(output.id),
2106
- lastModifiedDate: __expectLong(output.lastModifiedDate),
2107
- samlOptions: output.samlOptions != null ? de_SamlConfigOptions(output.samlOptions, context) : undefined,
2108
- type: __expectString(output.type),
2109
- };
2110
- };
2111
- const de_SecurityConfigStats = (output, context) => {
2112
- return {
2113
- SamlConfigCount: __expectLong(output.SamlConfigCount),
2114
- };
2115
- };
2116
- const de_SecurityConfigSummaries = (output, context) => {
2117
- const retVal = (output || [])
2118
- .filter((e) => e != null)
2119
- .map((entry) => {
2120
- if (entry === null) {
2121
- return null;
2122
- }
2123
- return de_SecurityConfigSummary(entry, context);
1590
+ return take(output, {
1591
+ accessPolicyDetail: (_) => de_AccessPolicyDetail(_, context),
2124
1592
  });
2125
- return retVal;
2126
1593
  };
2127
- const de_SecurityConfigSummary = (output, context) => {
2128
- return {
2129
- configVersion: __expectString(output.configVersion),
2130
- createdDate: __expectLong(output.createdDate),
2131
- description: __expectString(output.description),
2132
- id: __expectString(output.id),
2133
- lastModifiedDate: __expectLong(output.lastModifiedDate),
2134
- type: __expectString(output.type),
2135
- };
2136
- };
2137
- const de_SecurityGroupIds = (output, context) => {
2138
- const retVal = (output || [])
2139
- .filter((e) => e != null)
2140
- .map((entry) => {
2141
- if (entry === null) {
2142
- return null;
2143
- }
2144
- return __expectString(entry);
1594
+ const de_GetSecurityPolicyResponse = (output, context) => {
1595
+ return take(output, {
1596
+ securityPolicyDetail: (_) => de_SecurityPolicyDetail(_, context),
2145
1597
  });
2146
- return retVal;
2147
1598
  };
2148
1599
  const de_SecurityPolicyDetail = (output, context) => {
2149
- return {
2150
- createdDate: __expectLong(output.createdDate),
2151
- description: __expectString(output.description),
2152
- lastModifiedDate: __expectLong(output.lastModifiedDate),
2153
- name: __expectString(output.name),
2154
- policy: output.policy != null ? de_Document(output.policy, context) : undefined,
2155
- policyVersion: __expectString(output.policyVersion),
2156
- type: __expectString(output.type),
2157
- };
2158
- };
2159
- const de_SecurityPolicyStats = (output, context) => {
2160
- return {
2161
- EncryptionPolicyCount: __expectLong(output.EncryptionPolicyCount),
2162
- NetworkPolicyCount: __expectLong(output.NetworkPolicyCount),
2163
- };
2164
- };
2165
- const de_SecurityPolicySummaries = (output, context) => {
2166
- const retVal = (output || [])
2167
- .filter((e) => e != null)
2168
- .map((entry) => {
2169
- if (entry === null) {
2170
- return null;
2171
- }
2172
- return de_SecurityPolicySummary(entry, context);
1600
+ return take(output, {
1601
+ createdDate: __expectLong,
1602
+ description: __expectString,
1603
+ lastModifiedDate: __expectLong,
1604
+ name: __expectString,
1605
+ policy: (_) => de_Document(_, context),
1606
+ policyVersion: __expectString,
1607
+ type: __expectString,
2173
1608
  });
2174
- return retVal;
2175
- };
2176
- const de_SecurityPolicySummary = (output, context) => {
2177
- return {
2178
- createdDate: __expectLong(output.createdDate),
2179
- description: __expectString(output.description),
2180
- lastModifiedDate: __expectLong(output.lastModifiedDate),
2181
- name: __expectString(output.name),
2182
- policyVersion: __expectString(output.policyVersion),
2183
- type: __expectString(output.type),
2184
- };
2185
- };
2186
- const de_ServiceQuotaExceededException = (output, context) => {
2187
- return {
2188
- message: __expectString(output.message),
2189
- quotaCode: __expectString(output.quotaCode),
2190
- resourceId: __expectString(output.resourceId),
2191
- resourceType: __expectString(output.resourceType),
2192
- serviceCode: __expectString(output.serviceCode),
2193
- };
2194
- };
2195
- const de_SubnetIds = (output, context) => {
2196
- const retVal = (output || [])
2197
- .filter((e) => e != null)
2198
- .map((entry) => {
2199
- if (entry === null) {
2200
- return null;
2201
- }
2202
- return __expectString(entry);
2203
- });
2204
- return retVal;
2205
- };
2206
- const de_Tag = (output, context) => {
2207
- return {
2208
- key: __expectString(output.key),
2209
- value: __expectString(output.value),
2210
- };
2211
- };
2212
- const de_TagResourceResponse = (output, context) => {
2213
- return {};
2214
- };
2215
- const de_Tags = (output, context) => {
2216
- const retVal = (output || [])
2217
- .filter((e) => e != null)
2218
- .map((entry) => {
2219
- if (entry === null) {
2220
- return null;
2221
- }
2222
- return de_Tag(entry, context);
2223
- });
2224
- return retVal;
2225
- };
2226
- const de_UntagResourceResponse = (output, context) => {
2227
- return {};
2228
1609
  };
2229
1610
  const de_UpdateAccessPolicyResponse = (output, context) => {
2230
- return {
2231
- accessPolicyDetail: output.accessPolicyDetail != null ? de_AccessPolicyDetail(output.accessPolicyDetail, context) : undefined,
2232
- };
2233
- };
2234
- const de_UpdateAccountSettingsResponse = (output, context) => {
2235
- return {
2236
- accountSettingsDetail: output.accountSettingsDetail != null
2237
- ? de_AccountSettingsDetail(output.accountSettingsDetail, context)
2238
- : undefined,
2239
- };
2240
- };
2241
- const de_UpdateCollectionDetail = (output, context) => {
2242
- return {
2243
- arn: __expectString(output.arn),
2244
- createdDate: __expectLong(output.createdDate),
2245
- description: __expectString(output.description),
2246
- id: __expectString(output.id),
2247
- lastModifiedDate: __expectLong(output.lastModifiedDate),
2248
- name: __expectString(output.name),
2249
- status: __expectString(output.status),
2250
- type: __expectString(output.type),
2251
- };
2252
- };
2253
- const de_UpdateCollectionResponse = (output, context) => {
2254
- return {
2255
- updateCollectionDetail: output.updateCollectionDetail != null
2256
- ? de_UpdateCollectionDetail(output.updateCollectionDetail, context)
2257
- : undefined,
2258
- };
2259
- };
2260
- const de_UpdateSecurityConfigResponse = (output, context) => {
2261
- return {
2262
- securityConfigDetail: output.securityConfigDetail != null ? de_SecurityConfigDetail(output.securityConfigDetail, context) : undefined,
2263
- };
2264
- };
2265
- const de_UpdateSecurityPolicyResponse = (output, context) => {
2266
- return {
2267
- securityPolicyDetail: output.securityPolicyDetail != null ? de_SecurityPolicyDetail(output.securityPolicyDetail, context) : undefined,
2268
- };
2269
- };
2270
- const de_UpdateVpcEndpointDetail = (output, context) => {
2271
- return {
2272
- id: __expectString(output.id),
2273
- lastModifiedDate: __expectLong(output.lastModifiedDate),
2274
- name: __expectString(output.name),
2275
- securityGroupIds: output.securityGroupIds != null ? de_SecurityGroupIds(output.securityGroupIds, context) : undefined,
2276
- status: __expectString(output.status),
2277
- subnetIds: output.subnetIds != null ? de_SubnetIds(output.subnetIds, context) : undefined,
2278
- };
2279
- };
2280
- const de_UpdateVpcEndpointResponse = (output, context) => {
2281
- return {
2282
- UpdateVpcEndpointDetail: output.UpdateVpcEndpointDetail != null
2283
- ? de_UpdateVpcEndpointDetail(output.UpdateVpcEndpointDetail, context)
2284
- : undefined,
2285
- };
2286
- };
2287
- const de_ValidationException = (output, context) => {
2288
- return {
2289
- message: __expectString(output.message),
2290
- };
2291
- };
2292
- const de_VpcEndpointDetail = (output, context) => {
2293
- return {
2294
- createdDate: __expectLong(output.createdDate),
2295
- id: __expectString(output.id),
2296
- name: __expectString(output.name),
2297
- securityGroupIds: output.securityGroupIds != null ? de_SecurityGroupIds(output.securityGroupIds, context) : undefined,
2298
- status: __expectString(output.status),
2299
- subnetIds: output.subnetIds != null ? de_SubnetIds(output.subnetIds, context) : undefined,
2300
- vpcId: __expectString(output.vpcId),
2301
- };
2302
- };
2303
- const de_VpcEndpointDetails = (output, context) => {
2304
- const retVal = (output || [])
2305
- .filter((e) => e != null)
2306
- .map((entry) => {
2307
- if (entry === null) {
2308
- return null;
2309
- }
2310
- return de_VpcEndpointDetail(entry, context);
1611
+ return take(output, {
1612
+ accessPolicyDetail: (_) => de_AccessPolicyDetail(_, context),
2311
1613
  });
2312
- return retVal;
2313
1614
  };
2314
- const de_VpcEndpointErrorDetail = (output, context) => {
2315
- return {
2316
- errorCode: __expectString(output.errorCode),
2317
- errorMessage: __expectString(output.errorMessage),
2318
- id: __expectString(output.id),
2319
- };
2320
- };
2321
- const de_VpcEndpointErrorDetails = (output, context) => {
2322
- const retVal = (output || [])
2323
- .filter((e) => e != null)
2324
- .map((entry) => {
2325
- if (entry === null) {
2326
- return null;
2327
- }
2328
- return de_VpcEndpointErrorDetail(entry, context);
2329
- });
2330
- return retVal;
2331
- };
2332
- const de_VpcEndpointSummaries = (output, context) => {
2333
- const retVal = (output || [])
2334
- .filter((e) => e != null)
2335
- .map((entry) => {
2336
- if (entry === null) {
2337
- return null;
2338
- }
2339
- return de_VpcEndpointSummary(entry, context);
1615
+ const de_UpdateSecurityPolicyResponse = (output, context) => {
1616
+ return take(output, {
1617
+ securityPolicyDetail: (_) => de_SecurityPolicyDetail(_, context),
2340
1618
  });
2341
- return retVal;
2342
- };
2343
- const de_VpcEndpointSummary = (output, context) => {
2344
- return {
2345
- id: __expectString(output.id),
2346
- name: __expectString(output.name),
2347
- status: __expectString(output.status),
2348
- };
2349
1619
  };
2350
1620
  const de_Document = (output, context) => {
2351
1621
  return output;
@@ -2363,6 +1633,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
2363
1633
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2364
1634
  };
2365
1635
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1636
+ const throwDefaultError = withBaseException(__BaseException);
2366
1637
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2367
1638
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2368
1639
  const contents = {