@aws-sdk/client-opensearchserverless 3.310.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,283 +1,190 @@
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
- const headers = {
8
- "content-type": "application/x-amz-json-1.0",
9
- "x-amz-target": "OpenSearchServerless.BatchGetCollection",
10
- };
7
+ const headers = sharedHeaders("BatchGetCollection");
11
8
  let body;
12
- body = JSON.stringify(se_BatchGetCollectionRequest(input, context));
9
+ body = JSON.stringify(_json(input));
13
10
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
11
  };
15
12
  export const se_BatchGetVpcEndpointCommand = async (input, context) => {
16
- const headers = {
17
- "content-type": "application/x-amz-json-1.0",
18
- "x-amz-target": "OpenSearchServerless.BatchGetVpcEndpoint",
19
- };
13
+ const headers = sharedHeaders("BatchGetVpcEndpoint");
20
14
  let body;
21
- body = JSON.stringify(se_BatchGetVpcEndpointRequest(input, context));
15
+ body = JSON.stringify(_json(input));
22
16
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
17
  };
24
18
  export const se_CreateAccessPolicyCommand = async (input, context) => {
25
- const headers = {
26
- "content-type": "application/x-amz-json-1.0",
27
- "x-amz-target": "OpenSearchServerless.CreateAccessPolicy",
28
- };
19
+ const headers = sharedHeaders("CreateAccessPolicy");
29
20
  let body;
30
21
  body = JSON.stringify(se_CreateAccessPolicyRequest(input, context));
31
22
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
32
23
  };
33
24
  export const se_CreateCollectionCommand = async (input, context) => {
34
- const headers = {
35
- "content-type": "application/x-amz-json-1.0",
36
- "x-amz-target": "OpenSearchServerless.CreateCollection",
37
- };
25
+ const headers = sharedHeaders("CreateCollection");
38
26
  let body;
39
27
  body = JSON.stringify(se_CreateCollectionRequest(input, context));
40
28
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
29
  };
42
30
  export const se_CreateSecurityConfigCommand = async (input, context) => {
43
- const headers = {
44
- "content-type": "application/x-amz-json-1.0",
45
- "x-amz-target": "OpenSearchServerless.CreateSecurityConfig",
46
- };
31
+ const headers = sharedHeaders("CreateSecurityConfig");
47
32
  let body;
48
33
  body = JSON.stringify(se_CreateSecurityConfigRequest(input, context));
49
34
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
50
35
  };
51
36
  export const se_CreateSecurityPolicyCommand = async (input, context) => {
52
- const headers = {
53
- "content-type": "application/x-amz-json-1.0",
54
- "x-amz-target": "OpenSearchServerless.CreateSecurityPolicy",
55
- };
37
+ const headers = sharedHeaders("CreateSecurityPolicy");
56
38
  let body;
57
39
  body = JSON.stringify(se_CreateSecurityPolicyRequest(input, context));
58
40
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
41
  };
60
42
  export const se_CreateVpcEndpointCommand = async (input, context) => {
61
- const headers = {
62
- "content-type": "application/x-amz-json-1.0",
63
- "x-amz-target": "OpenSearchServerless.CreateVpcEndpoint",
64
- };
43
+ const headers = sharedHeaders("CreateVpcEndpoint");
65
44
  let body;
66
45
  body = JSON.stringify(se_CreateVpcEndpointRequest(input, context));
67
46
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
68
47
  };
69
48
  export const se_DeleteAccessPolicyCommand = async (input, context) => {
70
- const headers = {
71
- "content-type": "application/x-amz-json-1.0",
72
- "x-amz-target": "OpenSearchServerless.DeleteAccessPolicy",
73
- };
49
+ const headers = sharedHeaders("DeleteAccessPolicy");
74
50
  let body;
75
51
  body = JSON.stringify(se_DeleteAccessPolicyRequest(input, context));
76
52
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
53
  };
78
54
  export const se_DeleteCollectionCommand = async (input, context) => {
79
- const headers = {
80
- "content-type": "application/x-amz-json-1.0",
81
- "x-amz-target": "OpenSearchServerless.DeleteCollection",
82
- };
55
+ const headers = sharedHeaders("DeleteCollection");
83
56
  let body;
84
57
  body = JSON.stringify(se_DeleteCollectionRequest(input, context));
85
58
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
86
59
  };
87
60
  export const se_DeleteSecurityConfigCommand = async (input, context) => {
88
- const headers = {
89
- "content-type": "application/x-amz-json-1.0",
90
- "x-amz-target": "OpenSearchServerless.DeleteSecurityConfig",
91
- };
61
+ const headers = sharedHeaders("DeleteSecurityConfig");
92
62
  let body;
93
63
  body = JSON.stringify(se_DeleteSecurityConfigRequest(input, context));
94
64
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
65
  };
96
66
  export const se_DeleteSecurityPolicyCommand = async (input, context) => {
97
- const headers = {
98
- "content-type": "application/x-amz-json-1.0",
99
- "x-amz-target": "OpenSearchServerless.DeleteSecurityPolicy",
100
- };
67
+ const headers = sharedHeaders("DeleteSecurityPolicy");
101
68
  let body;
102
69
  body = JSON.stringify(se_DeleteSecurityPolicyRequest(input, context));
103
70
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
104
71
  };
105
72
  export const se_DeleteVpcEndpointCommand = async (input, context) => {
106
- const headers = {
107
- "content-type": "application/x-amz-json-1.0",
108
- "x-amz-target": "OpenSearchServerless.DeleteVpcEndpoint",
109
- };
73
+ const headers = sharedHeaders("DeleteVpcEndpoint");
110
74
  let body;
111
75
  body = JSON.stringify(se_DeleteVpcEndpointRequest(input, context));
112
76
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
77
  };
114
78
  export const se_GetAccessPolicyCommand = async (input, context) => {
115
- const headers = {
116
- "content-type": "application/x-amz-json-1.0",
117
- "x-amz-target": "OpenSearchServerless.GetAccessPolicy",
118
- };
79
+ const headers = sharedHeaders("GetAccessPolicy");
119
80
  let body;
120
- body = JSON.stringify(se_GetAccessPolicyRequest(input, context));
81
+ body = JSON.stringify(_json(input));
121
82
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
122
83
  };
123
84
  export const se_GetAccountSettingsCommand = async (input, context) => {
124
- const headers = {
125
- "content-type": "application/x-amz-json-1.0",
126
- "x-amz-target": "OpenSearchServerless.GetAccountSettings",
127
- };
85
+ const headers = sharedHeaders("GetAccountSettings");
128
86
  let body;
129
- body = JSON.stringify(se_GetAccountSettingsRequest(input, context));
87
+ body = JSON.stringify(_json(input));
130
88
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
131
89
  };
132
90
  export const se_GetPoliciesStatsCommand = async (input, context) => {
133
- const headers = {
134
- "content-type": "application/x-amz-json-1.0",
135
- "x-amz-target": "OpenSearchServerless.GetPoliciesStats",
136
- };
91
+ const headers = sharedHeaders("GetPoliciesStats");
137
92
  let body;
138
- body = JSON.stringify(se_GetPoliciesStatsRequest(input, context));
93
+ body = JSON.stringify(_json(input));
139
94
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
140
95
  };
141
96
  export const se_GetSecurityConfigCommand = async (input, context) => {
142
- const headers = {
143
- "content-type": "application/x-amz-json-1.0",
144
- "x-amz-target": "OpenSearchServerless.GetSecurityConfig",
145
- };
97
+ const headers = sharedHeaders("GetSecurityConfig");
146
98
  let body;
147
- body = JSON.stringify(se_GetSecurityConfigRequest(input, context));
99
+ body = JSON.stringify(_json(input));
148
100
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
149
101
  };
150
102
  export const se_GetSecurityPolicyCommand = async (input, context) => {
151
- const headers = {
152
- "content-type": "application/x-amz-json-1.0",
153
- "x-amz-target": "OpenSearchServerless.GetSecurityPolicy",
154
- };
103
+ const headers = sharedHeaders("GetSecurityPolicy");
155
104
  let body;
156
- body = JSON.stringify(se_GetSecurityPolicyRequest(input, context));
105
+ body = JSON.stringify(_json(input));
157
106
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
158
107
  };
159
108
  export const se_ListAccessPoliciesCommand = async (input, context) => {
160
- const headers = {
161
- "content-type": "application/x-amz-json-1.0",
162
- "x-amz-target": "OpenSearchServerless.ListAccessPolicies",
163
- };
109
+ const headers = sharedHeaders("ListAccessPolicies");
164
110
  let body;
165
- body = JSON.stringify(se_ListAccessPoliciesRequest(input, context));
111
+ body = JSON.stringify(_json(input));
166
112
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
167
113
  };
168
114
  export const se_ListCollectionsCommand = async (input, context) => {
169
- const headers = {
170
- "content-type": "application/x-amz-json-1.0",
171
- "x-amz-target": "OpenSearchServerless.ListCollections",
172
- };
115
+ const headers = sharedHeaders("ListCollections");
173
116
  let body;
174
- body = JSON.stringify(se_ListCollectionsRequest(input, context));
117
+ body = JSON.stringify(_json(input));
175
118
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
176
119
  };
177
120
  export const se_ListSecurityConfigsCommand = async (input, context) => {
178
- const headers = {
179
- "content-type": "application/x-amz-json-1.0",
180
- "x-amz-target": "OpenSearchServerless.ListSecurityConfigs",
181
- };
121
+ const headers = sharedHeaders("ListSecurityConfigs");
182
122
  let body;
183
- body = JSON.stringify(se_ListSecurityConfigsRequest(input, context));
123
+ body = JSON.stringify(_json(input));
184
124
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
185
125
  };
186
126
  export const se_ListSecurityPoliciesCommand = async (input, context) => {
187
- const headers = {
188
- "content-type": "application/x-amz-json-1.0",
189
- "x-amz-target": "OpenSearchServerless.ListSecurityPolicies",
190
- };
127
+ const headers = sharedHeaders("ListSecurityPolicies");
191
128
  let body;
192
- body = JSON.stringify(se_ListSecurityPoliciesRequest(input, context));
129
+ body = JSON.stringify(_json(input));
193
130
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
194
131
  };
195
132
  export const se_ListTagsForResourceCommand = async (input, context) => {
196
- const headers = {
197
- "content-type": "application/x-amz-json-1.0",
198
- "x-amz-target": "OpenSearchServerless.ListTagsForResource",
199
- };
133
+ const headers = sharedHeaders("ListTagsForResource");
200
134
  let body;
201
- body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
135
+ body = JSON.stringify(_json(input));
202
136
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
203
137
  };
204
138
  export const se_ListVpcEndpointsCommand = async (input, context) => {
205
- const headers = {
206
- "content-type": "application/x-amz-json-1.0",
207
- "x-amz-target": "OpenSearchServerless.ListVpcEndpoints",
208
- };
139
+ const headers = sharedHeaders("ListVpcEndpoints");
209
140
  let body;
210
- body = JSON.stringify(se_ListVpcEndpointsRequest(input, context));
141
+ body = JSON.stringify(_json(input));
211
142
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
212
143
  };
213
144
  export const se_TagResourceCommand = async (input, context) => {
214
- const headers = {
215
- "content-type": "application/x-amz-json-1.0",
216
- "x-amz-target": "OpenSearchServerless.TagResource",
217
- };
145
+ const headers = sharedHeaders("TagResource");
218
146
  let body;
219
- body = JSON.stringify(se_TagResourceRequest(input, context));
147
+ body = JSON.stringify(_json(input));
220
148
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
221
149
  };
222
150
  export const se_UntagResourceCommand = async (input, context) => {
223
- const headers = {
224
- "content-type": "application/x-amz-json-1.0",
225
- "x-amz-target": "OpenSearchServerless.UntagResource",
226
- };
151
+ const headers = sharedHeaders("UntagResource");
227
152
  let body;
228
- body = JSON.stringify(se_UntagResourceRequest(input, context));
153
+ body = JSON.stringify(_json(input));
229
154
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
230
155
  };
231
156
  export const se_UpdateAccessPolicyCommand = async (input, context) => {
232
- const headers = {
233
- "content-type": "application/x-amz-json-1.0",
234
- "x-amz-target": "OpenSearchServerless.UpdateAccessPolicy",
235
- };
157
+ const headers = sharedHeaders("UpdateAccessPolicy");
236
158
  let body;
237
159
  body = JSON.stringify(se_UpdateAccessPolicyRequest(input, context));
238
160
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
239
161
  };
240
162
  export const se_UpdateAccountSettingsCommand = async (input, context) => {
241
- const headers = {
242
- "content-type": "application/x-amz-json-1.0",
243
- "x-amz-target": "OpenSearchServerless.UpdateAccountSettings",
244
- };
163
+ const headers = sharedHeaders("UpdateAccountSettings");
245
164
  let body;
246
- body = JSON.stringify(se_UpdateAccountSettingsRequest(input, context));
165
+ body = JSON.stringify(_json(input));
247
166
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
248
167
  };
249
168
  export const se_UpdateCollectionCommand = async (input, context) => {
250
- const headers = {
251
- "content-type": "application/x-amz-json-1.0",
252
- "x-amz-target": "OpenSearchServerless.UpdateCollection",
253
- };
169
+ const headers = sharedHeaders("UpdateCollection");
254
170
  let body;
255
171
  body = JSON.stringify(se_UpdateCollectionRequest(input, context));
256
172
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
257
173
  };
258
174
  export const se_UpdateSecurityConfigCommand = async (input, context) => {
259
- const headers = {
260
- "content-type": "application/x-amz-json-1.0",
261
- "x-amz-target": "OpenSearchServerless.UpdateSecurityConfig",
262
- };
175
+ const headers = sharedHeaders("UpdateSecurityConfig");
263
176
  let body;
264
177
  body = JSON.stringify(se_UpdateSecurityConfigRequest(input, context));
265
178
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
266
179
  };
267
180
  export const se_UpdateSecurityPolicyCommand = async (input, context) => {
268
- const headers = {
269
- "content-type": "application/x-amz-json-1.0",
270
- "x-amz-target": "OpenSearchServerless.UpdateSecurityPolicy",
271
- };
181
+ const headers = sharedHeaders("UpdateSecurityPolicy");
272
182
  let body;
273
183
  body = JSON.stringify(se_UpdateSecurityPolicyRequest(input, context));
274
184
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
275
185
  };
276
186
  export const se_UpdateVpcEndpointCommand = async (input, context) => {
277
- const headers = {
278
- "content-type": "application/x-amz-json-1.0",
279
- "x-amz-target": "OpenSearchServerless.UpdateVpcEndpoint",
280
- };
187
+ const headers = sharedHeaders("UpdateVpcEndpoint");
281
188
  let body;
282
189
  body = JSON.stringify(se_UpdateVpcEndpointRequest(input, context));
283
190
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
@@ -288,12 +195,12 @@ export const de_BatchGetCollectionCommand = async (output, context) => {
288
195
  }
289
196
  const data = await parseBody(output.body, context);
290
197
  let contents = {};
291
- contents = de_BatchGetCollectionResponse(data, context);
198
+ contents = _json(data);
292
199
  const response = {
293
200
  $metadata: deserializeMetadata(output),
294
201
  ...contents,
295
202
  };
296
- return Promise.resolve(response);
203
+ return response;
297
204
  };
298
205
  const de_BatchGetCollectionCommandError = async (output, context) => {
299
206
  const parsedOutput = {
@@ -310,10 +217,9 @@ const de_BatchGetCollectionCommandError = async (output, context) => {
310
217
  throw await de_ValidationExceptionRes(parsedOutput, context);
311
218
  default:
312
219
  const parsedBody = parsedOutput.body;
313
- throwDefaultError({
220
+ return throwDefaultError({
314
221
  output,
315
222
  parsedBody,
316
- exceptionCtor: __BaseException,
317
223
  errorCode,
318
224
  });
319
225
  }
@@ -324,12 +230,12 @@ export const de_BatchGetVpcEndpointCommand = async (output, context) => {
324
230
  }
325
231
  const data = await parseBody(output.body, context);
326
232
  let contents = {};
327
- contents = de_BatchGetVpcEndpointResponse(data, context);
233
+ contents = _json(data);
328
234
  const response = {
329
235
  $metadata: deserializeMetadata(output),
330
236
  ...contents,
331
237
  };
332
- return Promise.resolve(response);
238
+ return response;
333
239
  };
334
240
  const de_BatchGetVpcEndpointCommandError = async (output, context) => {
335
241
  const parsedOutput = {
@@ -346,10 +252,9 @@ const de_BatchGetVpcEndpointCommandError = async (output, context) => {
346
252
  throw await de_ValidationExceptionRes(parsedOutput, context);
347
253
  default:
348
254
  const parsedBody = parsedOutput.body;
349
- throwDefaultError({
255
+ return throwDefaultError({
350
256
  output,
351
257
  parsedBody,
352
- exceptionCtor: __BaseException,
353
258
  errorCode,
354
259
  });
355
260
  }
@@ -365,7 +270,7 @@ export const de_CreateAccessPolicyCommand = async (output, context) => {
365
270
  $metadata: deserializeMetadata(output),
366
271
  ...contents,
367
272
  };
368
- return Promise.resolve(response);
273
+ return response;
369
274
  };
370
275
  const de_CreateAccessPolicyCommandError = async (output, context) => {
371
276
  const parsedOutput = {
@@ -388,10 +293,9 @@ const de_CreateAccessPolicyCommandError = async (output, context) => {
388
293
  throw await de_ValidationExceptionRes(parsedOutput, context);
389
294
  default:
390
295
  const parsedBody = parsedOutput.body;
391
- throwDefaultError({
296
+ return throwDefaultError({
392
297
  output,
393
298
  parsedBody,
394
- exceptionCtor: __BaseException,
395
299
  errorCode,
396
300
  });
397
301
  }
@@ -402,12 +306,12 @@ export const de_CreateCollectionCommand = async (output, context) => {
402
306
  }
403
307
  const data = await parseBody(output.body, context);
404
308
  let contents = {};
405
- contents = de_CreateCollectionResponse(data, context);
309
+ contents = _json(data);
406
310
  const response = {
407
311
  $metadata: deserializeMetadata(output),
408
312
  ...contents,
409
313
  };
410
- return Promise.resolve(response);
314
+ return response;
411
315
  };
412
316
  const de_CreateCollectionCommandError = async (output, context) => {
413
317
  const parsedOutput = {
@@ -433,10 +337,9 @@ const de_CreateCollectionCommandError = async (output, context) => {
433
337
  throw await de_ValidationExceptionRes(parsedOutput, context);
434
338
  default:
435
339
  const parsedBody = parsedOutput.body;
436
- throwDefaultError({
340
+ return throwDefaultError({
437
341
  output,
438
342
  parsedBody,
439
- exceptionCtor: __BaseException,
440
343
  errorCode,
441
344
  });
442
345
  }
@@ -447,12 +350,12 @@ export const de_CreateSecurityConfigCommand = async (output, context) => {
447
350
  }
448
351
  const data = await parseBody(output.body, context);
449
352
  let contents = {};
450
- contents = de_CreateSecurityConfigResponse(data, context);
353
+ contents = _json(data);
451
354
  const response = {
452
355
  $metadata: deserializeMetadata(output),
453
356
  ...contents,
454
357
  };
455
- return Promise.resolve(response);
358
+ return response;
456
359
  };
457
360
  const de_CreateSecurityConfigCommandError = async (output, context) => {
458
361
  const parsedOutput = {
@@ -475,10 +378,9 @@ const de_CreateSecurityConfigCommandError = async (output, context) => {
475
378
  throw await de_ValidationExceptionRes(parsedOutput, context);
476
379
  default:
477
380
  const parsedBody = parsedOutput.body;
478
- throwDefaultError({
381
+ return throwDefaultError({
479
382
  output,
480
383
  parsedBody,
481
- exceptionCtor: __BaseException,
482
384
  errorCode,
483
385
  });
484
386
  }
@@ -494,7 +396,7 @@ export const de_CreateSecurityPolicyCommand = async (output, context) => {
494
396
  $metadata: deserializeMetadata(output),
495
397
  ...contents,
496
398
  };
497
- return Promise.resolve(response);
399
+ return response;
498
400
  };
499
401
  const de_CreateSecurityPolicyCommandError = async (output, context) => {
500
402
  const parsedOutput = {
@@ -517,10 +419,9 @@ const de_CreateSecurityPolicyCommandError = async (output, context) => {
517
419
  throw await de_ValidationExceptionRes(parsedOutput, context);
518
420
  default:
519
421
  const parsedBody = parsedOutput.body;
520
- throwDefaultError({
422
+ return throwDefaultError({
521
423
  output,
522
424
  parsedBody,
523
- exceptionCtor: __BaseException,
524
425
  errorCode,
525
426
  });
526
427
  }
@@ -531,12 +432,12 @@ export const de_CreateVpcEndpointCommand = async (output, context) => {
531
432
  }
532
433
  const data = await parseBody(output.body, context);
533
434
  let contents = {};
534
- contents = de_CreateVpcEndpointResponse(data, context);
435
+ contents = _json(data);
535
436
  const response = {
536
437
  $metadata: deserializeMetadata(output),
537
438
  ...contents,
538
439
  };
539
- return Promise.resolve(response);
440
+ return response;
540
441
  };
541
442
  const de_CreateVpcEndpointCommandError = async (output, context) => {
542
443
  const parsedOutput = {
@@ -559,10 +460,9 @@ const de_CreateVpcEndpointCommandError = async (output, context) => {
559
460
  throw await de_ValidationExceptionRes(parsedOutput, context);
560
461
  default:
561
462
  const parsedBody = parsedOutput.body;
562
- throwDefaultError({
463
+ return throwDefaultError({
563
464
  output,
564
465
  parsedBody,
565
- exceptionCtor: __BaseException,
566
466
  errorCode,
567
467
  });
568
468
  }
@@ -573,12 +473,12 @@ export const de_DeleteAccessPolicyCommand = async (output, context) => {
573
473
  }
574
474
  const data = await parseBody(output.body, context);
575
475
  let contents = {};
576
- contents = de_DeleteAccessPolicyResponse(data, context);
476
+ contents = _json(data);
577
477
  const response = {
578
478
  $metadata: deserializeMetadata(output),
579
479
  ...contents,
580
480
  };
581
- return Promise.resolve(response);
481
+ return response;
582
482
  };
583
483
  const de_DeleteAccessPolicyCommandError = async (output, context) => {
584
484
  const parsedOutput = {
@@ -601,10 +501,9 @@ const de_DeleteAccessPolicyCommandError = async (output, context) => {
601
501
  throw await de_ValidationExceptionRes(parsedOutput, context);
602
502
  default:
603
503
  const parsedBody = parsedOutput.body;
604
- throwDefaultError({
504
+ return throwDefaultError({
605
505
  output,
606
506
  parsedBody,
607
- exceptionCtor: __BaseException,
608
507
  errorCode,
609
508
  });
610
509
  }
@@ -615,12 +514,12 @@ export const de_DeleteCollectionCommand = async (output, context) => {
615
514
  }
616
515
  const data = await parseBody(output.body, context);
617
516
  let contents = {};
618
- contents = de_DeleteCollectionResponse(data, context);
517
+ contents = _json(data);
619
518
  const response = {
620
519
  $metadata: deserializeMetadata(output),
621
520
  ...contents,
622
521
  };
623
- return Promise.resolve(response);
522
+ return response;
624
523
  };
625
524
  const de_DeleteCollectionCommandError = async (output, context) => {
626
525
  const parsedOutput = {
@@ -643,10 +542,9 @@ const de_DeleteCollectionCommandError = async (output, context) => {
643
542
  throw await de_ValidationExceptionRes(parsedOutput, context);
644
543
  default:
645
544
  const parsedBody = parsedOutput.body;
646
- throwDefaultError({
545
+ return throwDefaultError({
647
546
  output,
648
547
  parsedBody,
649
- exceptionCtor: __BaseException,
650
548
  errorCode,
651
549
  });
652
550
  }
@@ -657,12 +555,12 @@ export const de_DeleteSecurityConfigCommand = async (output, context) => {
657
555
  }
658
556
  const data = await parseBody(output.body, context);
659
557
  let contents = {};
660
- contents = de_DeleteSecurityConfigResponse(data, context);
558
+ contents = _json(data);
661
559
  const response = {
662
560
  $metadata: deserializeMetadata(output),
663
561
  ...contents,
664
562
  };
665
- return Promise.resolve(response);
563
+ return response;
666
564
  };
667
565
  const de_DeleteSecurityConfigCommandError = async (output, context) => {
668
566
  const parsedOutput = {
@@ -685,10 +583,9 @@ const de_DeleteSecurityConfigCommandError = async (output, context) => {
685
583
  throw await de_ValidationExceptionRes(parsedOutput, context);
686
584
  default:
687
585
  const parsedBody = parsedOutput.body;
688
- throwDefaultError({
586
+ return throwDefaultError({
689
587
  output,
690
588
  parsedBody,
691
- exceptionCtor: __BaseException,
692
589
  errorCode,
693
590
  });
694
591
  }
@@ -699,12 +596,12 @@ export const de_DeleteSecurityPolicyCommand = async (output, context) => {
699
596
  }
700
597
  const data = await parseBody(output.body, context);
701
598
  let contents = {};
702
- contents = de_DeleteSecurityPolicyResponse(data, context);
599
+ contents = _json(data);
703
600
  const response = {
704
601
  $metadata: deserializeMetadata(output),
705
602
  ...contents,
706
603
  };
707
- return Promise.resolve(response);
604
+ return response;
708
605
  };
709
606
  const de_DeleteSecurityPolicyCommandError = async (output, context) => {
710
607
  const parsedOutput = {
@@ -727,10 +624,9 @@ const de_DeleteSecurityPolicyCommandError = async (output, context) => {
727
624
  throw await de_ValidationExceptionRes(parsedOutput, context);
728
625
  default:
729
626
  const parsedBody = parsedOutput.body;
730
- throwDefaultError({
627
+ return throwDefaultError({
731
628
  output,
732
629
  parsedBody,
733
- exceptionCtor: __BaseException,
734
630
  errorCode,
735
631
  });
736
632
  }
@@ -741,12 +637,12 @@ export const de_DeleteVpcEndpointCommand = async (output, context) => {
741
637
  }
742
638
  const data = await parseBody(output.body, context);
743
639
  let contents = {};
744
- contents = de_DeleteVpcEndpointResponse(data, context);
640
+ contents = _json(data);
745
641
  const response = {
746
642
  $metadata: deserializeMetadata(output),
747
643
  ...contents,
748
644
  };
749
- return Promise.resolve(response);
645
+ return response;
750
646
  };
751
647
  const de_DeleteVpcEndpointCommandError = async (output, context) => {
752
648
  const parsedOutput = {
@@ -769,10 +665,9 @@ const de_DeleteVpcEndpointCommandError = async (output, context) => {
769
665
  throw await de_ValidationExceptionRes(parsedOutput, context);
770
666
  default:
771
667
  const parsedBody = parsedOutput.body;
772
- throwDefaultError({
668
+ return throwDefaultError({
773
669
  output,
774
670
  parsedBody,
775
- exceptionCtor: __BaseException,
776
671
  errorCode,
777
672
  });
778
673
  }
@@ -788,7 +683,7 @@ export const de_GetAccessPolicyCommand = async (output, context) => {
788
683
  $metadata: deserializeMetadata(output),
789
684
  ...contents,
790
685
  };
791
- return Promise.resolve(response);
686
+ return response;
792
687
  };
793
688
  const de_GetAccessPolicyCommandError = async (output, context) => {
794
689
  const parsedOutput = {
@@ -808,10 +703,9 @@ const de_GetAccessPolicyCommandError = async (output, context) => {
808
703
  throw await de_ValidationExceptionRes(parsedOutput, context);
809
704
  default:
810
705
  const parsedBody = parsedOutput.body;
811
- throwDefaultError({
706
+ return throwDefaultError({
812
707
  output,
813
708
  parsedBody,
814
- exceptionCtor: __BaseException,
815
709
  errorCode,
816
710
  });
817
711
  }
@@ -822,12 +716,12 @@ export const de_GetAccountSettingsCommand = async (output, context) => {
822
716
  }
823
717
  const data = await parseBody(output.body, context);
824
718
  let contents = {};
825
- contents = de_GetAccountSettingsResponse(data, context);
719
+ contents = _json(data);
826
720
  const response = {
827
721
  $metadata: deserializeMetadata(output),
828
722
  ...contents,
829
723
  };
830
- return Promise.resolve(response);
724
+ return response;
831
725
  };
832
726
  const de_GetAccountSettingsCommandError = async (output, context) => {
833
727
  const parsedOutput = {
@@ -844,10 +738,9 @@ const de_GetAccountSettingsCommandError = async (output, context) => {
844
738
  throw await de_ValidationExceptionRes(parsedOutput, context);
845
739
  default:
846
740
  const parsedBody = parsedOutput.body;
847
- throwDefaultError({
741
+ return throwDefaultError({
848
742
  output,
849
743
  parsedBody,
850
- exceptionCtor: __BaseException,
851
744
  errorCode,
852
745
  });
853
746
  }
@@ -858,12 +751,12 @@ export const de_GetPoliciesStatsCommand = async (output, context) => {
858
751
  }
859
752
  const data = await parseBody(output.body, context);
860
753
  let contents = {};
861
- contents = de_GetPoliciesStatsResponse(data, context);
754
+ contents = _json(data);
862
755
  const response = {
863
756
  $metadata: deserializeMetadata(output),
864
757
  ...contents,
865
758
  };
866
- return Promise.resolve(response);
759
+ return response;
867
760
  };
868
761
  const de_GetPoliciesStatsCommandError = async (output, context) => {
869
762
  const parsedOutput = {
@@ -877,10 +770,9 @@ const de_GetPoliciesStatsCommandError = async (output, context) => {
877
770
  throw await de_InternalServerExceptionRes(parsedOutput, context);
878
771
  default:
879
772
  const parsedBody = parsedOutput.body;
880
- throwDefaultError({
773
+ return throwDefaultError({
881
774
  output,
882
775
  parsedBody,
883
- exceptionCtor: __BaseException,
884
776
  errorCode,
885
777
  });
886
778
  }
@@ -891,12 +783,12 @@ export const de_GetSecurityConfigCommand = async (output, context) => {
891
783
  }
892
784
  const data = await parseBody(output.body, context);
893
785
  let contents = {};
894
- contents = de_GetSecurityConfigResponse(data, context);
786
+ contents = _json(data);
895
787
  const response = {
896
788
  $metadata: deserializeMetadata(output),
897
789
  ...contents,
898
790
  };
899
- return Promise.resolve(response);
791
+ return response;
900
792
  };
901
793
  const de_GetSecurityConfigCommandError = async (output, context) => {
902
794
  const parsedOutput = {
@@ -916,10 +808,9 @@ const de_GetSecurityConfigCommandError = async (output, context) => {
916
808
  throw await de_ValidationExceptionRes(parsedOutput, context);
917
809
  default:
918
810
  const parsedBody = parsedOutput.body;
919
- throwDefaultError({
811
+ return throwDefaultError({
920
812
  output,
921
813
  parsedBody,
922
- exceptionCtor: __BaseException,
923
814
  errorCode,
924
815
  });
925
816
  }
@@ -935,7 +826,7 @@ export const de_GetSecurityPolicyCommand = async (output, context) => {
935
826
  $metadata: deserializeMetadata(output),
936
827
  ...contents,
937
828
  };
938
- return Promise.resolve(response);
829
+ return response;
939
830
  };
940
831
  const de_GetSecurityPolicyCommandError = async (output, context) => {
941
832
  const parsedOutput = {
@@ -955,10 +846,9 @@ const de_GetSecurityPolicyCommandError = async (output, context) => {
955
846
  throw await de_ValidationExceptionRes(parsedOutput, context);
956
847
  default:
957
848
  const parsedBody = parsedOutput.body;
958
- throwDefaultError({
849
+ return throwDefaultError({
959
850
  output,
960
851
  parsedBody,
961
- exceptionCtor: __BaseException,
962
852
  errorCode,
963
853
  });
964
854
  }
@@ -969,12 +859,12 @@ export const de_ListAccessPoliciesCommand = async (output, context) => {
969
859
  }
970
860
  const data = await parseBody(output.body, context);
971
861
  let contents = {};
972
- contents = de_ListAccessPoliciesResponse(data, context);
862
+ contents = _json(data);
973
863
  const response = {
974
864
  $metadata: deserializeMetadata(output),
975
865
  ...contents,
976
866
  };
977
- return Promise.resolve(response);
867
+ return response;
978
868
  };
979
869
  const de_ListAccessPoliciesCommandError = async (output, context) => {
980
870
  const parsedOutput = {
@@ -991,10 +881,9 @@ const de_ListAccessPoliciesCommandError = async (output, context) => {
991
881
  throw await de_ValidationExceptionRes(parsedOutput, context);
992
882
  default:
993
883
  const parsedBody = parsedOutput.body;
994
- throwDefaultError({
884
+ return throwDefaultError({
995
885
  output,
996
886
  parsedBody,
997
- exceptionCtor: __BaseException,
998
887
  errorCode,
999
888
  });
1000
889
  }
@@ -1005,12 +894,12 @@ export const de_ListCollectionsCommand = async (output, context) => {
1005
894
  }
1006
895
  const data = await parseBody(output.body, context);
1007
896
  let contents = {};
1008
- contents = de_ListCollectionsResponse(data, context);
897
+ contents = _json(data);
1009
898
  const response = {
1010
899
  $metadata: deserializeMetadata(output),
1011
900
  ...contents,
1012
901
  };
1013
- return Promise.resolve(response);
902
+ return response;
1014
903
  };
1015
904
  const de_ListCollectionsCommandError = async (output, context) => {
1016
905
  const parsedOutput = {
@@ -1027,10 +916,9 @@ const de_ListCollectionsCommandError = async (output, context) => {
1027
916
  throw await de_ValidationExceptionRes(parsedOutput, context);
1028
917
  default:
1029
918
  const parsedBody = parsedOutput.body;
1030
- throwDefaultError({
919
+ return throwDefaultError({
1031
920
  output,
1032
921
  parsedBody,
1033
- exceptionCtor: __BaseException,
1034
922
  errorCode,
1035
923
  });
1036
924
  }
@@ -1041,12 +929,12 @@ export const de_ListSecurityConfigsCommand = async (output, context) => {
1041
929
  }
1042
930
  const data = await parseBody(output.body, context);
1043
931
  let contents = {};
1044
- contents = de_ListSecurityConfigsResponse(data, context);
932
+ contents = _json(data);
1045
933
  const response = {
1046
934
  $metadata: deserializeMetadata(output),
1047
935
  ...contents,
1048
936
  };
1049
- return Promise.resolve(response);
937
+ return response;
1050
938
  };
1051
939
  const de_ListSecurityConfigsCommandError = async (output, context) => {
1052
940
  const parsedOutput = {
@@ -1063,10 +951,9 @@ const de_ListSecurityConfigsCommandError = async (output, context) => {
1063
951
  throw await de_ValidationExceptionRes(parsedOutput, context);
1064
952
  default:
1065
953
  const parsedBody = parsedOutput.body;
1066
- throwDefaultError({
954
+ return throwDefaultError({
1067
955
  output,
1068
956
  parsedBody,
1069
- exceptionCtor: __BaseException,
1070
957
  errorCode,
1071
958
  });
1072
959
  }
@@ -1077,12 +964,12 @@ export const de_ListSecurityPoliciesCommand = async (output, context) => {
1077
964
  }
1078
965
  const data = await parseBody(output.body, context);
1079
966
  let contents = {};
1080
- contents = de_ListSecurityPoliciesResponse(data, context);
967
+ contents = _json(data);
1081
968
  const response = {
1082
969
  $metadata: deserializeMetadata(output),
1083
970
  ...contents,
1084
971
  };
1085
- return Promise.resolve(response);
972
+ return response;
1086
973
  };
1087
974
  const de_ListSecurityPoliciesCommandError = async (output, context) => {
1088
975
  const parsedOutput = {
@@ -1099,10 +986,9 @@ const de_ListSecurityPoliciesCommandError = async (output, context) => {
1099
986
  throw await de_ValidationExceptionRes(parsedOutput, context);
1100
987
  default:
1101
988
  const parsedBody = parsedOutput.body;
1102
- throwDefaultError({
989
+ return throwDefaultError({
1103
990
  output,
1104
991
  parsedBody,
1105
- exceptionCtor: __BaseException,
1106
992
  errorCode,
1107
993
  });
1108
994
  }
@@ -1113,12 +999,12 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1113
999
  }
1114
1000
  const data = await parseBody(output.body, context);
1115
1001
  let contents = {};
1116
- contents = de_ListTagsForResourceResponse(data, context);
1002
+ contents = _json(data);
1117
1003
  const response = {
1118
1004
  $metadata: deserializeMetadata(output),
1119
1005
  ...contents,
1120
1006
  };
1121
- return Promise.resolve(response);
1007
+ return response;
1122
1008
  };
1123
1009
  const de_ListTagsForResourceCommandError = async (output, context) => {
1124
1010
  const parsedOutput = {
@@ -1138,10 +1024,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1138
1024
  throw await de_ValidationExceptionRes(parsedOutput, context);
1139
1025
  default:
1140
1026
  const parsedBody = parsedOutput.body;
1141
- throwDefaultError({
1027
+ return throwDefaultError({
1142
1028
  output,
1143
1029
  parsedBody,
1144
- exceptionCtor: __BaseException,
1145
1030
  errorCode,
1146
1031
  });
1147
1032
  }
@@ -1152,12 +1037,12 @@ export const de_ListVpcEndpointsCommand = async (output, context) => {
1152
1037
  }
1153
1038
  const data = await parseBody(output.body, context);
1154
1039
  let contents = {};
1155
- contents = de_ListVpcEndpointsResponse(data, context);
1040
+ contents = _json(data);
1156
1041
  const response = {
1157
1042
  $metadata: deserializeMetadata(output),
1158
1043
  ...contents,
1159
1044
  };
1160
- return Promise.resolve(response);
1045
+ return response;
1161
1046
  };
1162
1047
  const de_ListVpcEndpointsCommandError = async (output, context) => {
1163
1048
  const parsedOutput = {
@@ -1174,10 +1059,9 @@ const de_ListVpcEndpointsCommandError = async (output, context) => {
1174
1059
  throw await de_ValidationExceptionRes(parsedOutput, context);
1175
1060
  default:
1176
1061
  const parsedBody = parsedOutput.body;
1177
- throwDefaultError({
1062
+ return throwDefaultError({
1178
1063
  output,
1179
1064
  parsedBody,
1180
- exceptionCtor: __BaseException,
1181
1065
  errorCode,
1182
1066
  });
1183
1067
  }
@@ -1188,12 +1072,12 @@ export const de_TagResourceCommand = async (output, context) => {
1188
1072
  }
1189
1073
  const data = await parseBody(output.body, context);
1190
1074
  let contents = {};
1191
- contents = de_TagResourceResponse(data, context);
1075
+ contents = _json(data);
1192
1076
  const response = {
1193
1077
  $metadata: deserializeMetadata(output),
1194
1078
  ...contents,
1195
1079
  };
1196
- return Promise.resolve(response);
1080
+ return response;
1197
1081
  };
1198
1082
  const de_TagResourceCommandError = async (output, context) => {
1199
1083
  const parsedOutput = {
@@ -1219,10 +1103,9 @@ const de_TagResourceCommandError = async (output, context) => {
1219
1103
  throw await de_ValidationExceptionRes(parsedOutput, context);
1220
1104
  default:
1221
1105
  const parsedBody = parsedOutput.body;
1222
- throwDefaultError({
1106
+ return throwDefaultError({
1223
1107
  output,
1224
1108
  parsedBody,
1225
- exceptionCtor: __BaseException,
1226
1109
  errorCode,
1227
1110
  });
1228
1111
  }
@@ -1233,12 +1116,12 @@ export const de_UntagResourceCommand = async (output, context) => {
1233
1116
  }
1234
1117
  const data = await parseBody(output.body, context);
1235
1118
  let contents = {};
1236
- contents = de_UntagResourceResponse(data, context);
1119
+ contents = _json(data);
1237
1120
  const response = {
1238
1121
  $metadata: deserializeMetadata(output),
1239
1122
  ...contents,
1240
1123
  };
1241
- return Promise.resolve(response);
1124
+ return response;
1242
1125
  };
1243
1126
  const de_UntagResourceCommandError = async (output, context) => {
1244
1127
  const parsedOutput = {
@@ -1261,10 +1144,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1261
1144
  throw await de_ValidationExceptionRes(parsedOutput, context);
1262
1145
  default:
1263
1146
  const parsedBody = parsedOutput.body;
1264
- throwDefaultError({
1147
+ return throwDefaultError({
1265
1148
  output,
1266
1149
  parsedBody,
1267
- exceptionCtor: __BaseException,
1268
1150
  errorCode,
1269
1151
  });
1270
1152
  }
@@ -1280,7 +1162,7 @@ export const de_UpdateAccessPolicyCommand = async (output, context) => {
1280
1162
  $metadata: deserializeMetadata(output),
1281
1163
  ...contents,
1282
1164
  };
1283
- return Promise.resolve(response);
1165
+ return response;
1284
1166
  };
1285
1167
  const de_UpdateAccessPolicyCommandError = async (output, context) => {
1286
1168
  const parsedOutput = {
@@ -1303,10 +1185,9 @@ const de_UpdateAccessPolicyCommandError = async (output, context) => {
1303
1185
  throw await de_ValidationExceptionRes(parsedOutput, context);
1304
1186
  default:
1305
1187
  const parsedBody = parsedOutput.body;
1306
- throwDefaultError({
1188
+ return throwDefaultError({
1307
1189
  output,
1308
1190
  parsedBody,
1309
- exceptionCtor: __BaseException,
1310
1191
  errorCode,
1311
1192
  });
1312
1193
  }
@@ -1317,12 +1198,12 @@ export const de_UpdateAccountSettingsCommand = async (output, context) => {
1317
1198
  }
1318
1199
  const data = await parseBody(output.body, context);
1319
1200
  let contents = {};
1320
- contents = de_UpdateAccountSettingsResponse(data, context);
1201
+ contents = _json(data);
1321
1202
  const response = {
1322
1203
  $metadata: deserializeMetadata(output),
1323
1204
  ...contents,
1324
1205
  };
1325
- return Promise.resolve(response);
1206
+ return response;
1326
1207
  };
1327
1208
  const de_UpdateAccountSettingsCommandError = async (output, context) => {
1328
1209
  const parsedOutput = {
@@ -1339,10 +1220,9 @@ const de_UpdateAccountSettingsCommandError = async (output, context) => {
1339
1220
  throw await de_ValidationExceptionRes(parsedOutput, context);
1340
1221
  default:
1341
1222
  const parsedBody = parsedOutput.body;
1342
- throwDefaultError({
1223
+ return throwDefaultError({
1343
1224
  output,
1344
1225
  parsedBody,
1345
- exceptionCtor: __BaseException,
1346
1226
  errorCode,
1347
1227
  });
1348
1228
  }
@@ -1353,12 +1233,12 @@ export const de_UpdateCollectionCommand = async (output, context) => {
1353
1233
  }
1354
1234
  const data = await parseBody(output.body, context);
1355
1235
  let contents = {};
1356
- contents = de_UpdateCollectionResponse(data, context);
1236
+ contents = _json(data);
1357
1237
  const response = {
1358
1238
  $metadata: deserializeMetadata(output),
1359
1239
  ...contents,
1360
1240
  };
1361
- return Promise.resolve(response);
1241
+ return response;
1362
1242
  };
1363
1243
  const de_UpdateCollectionCommandError = async (output, context) => {
1364
1244
  const parsedOutput = {
@@ -1378,10 +1258,9 @@ const de_UpdateCollectionCommandError = async (output, context) => {
1378
1258
  throw await de_ValidationExceptionRes(parsedOutput, context);
1379
1259
  default:
1380
1260
  const parsedBody = parsedOutput.body;
1381
- throwDefaultError({
1261
+ return throwDefaultError({
1382
1262
  output,
1383
1263
  parsedBody,
1384
- exceptionCtor: __BaseException,
1385
1264
  errorCode,
1386
1265
  });
1387
1266
  }
@@ -1392,12 +1271,12 @@ export const de_UpdateSecurityConfigCommand = async (output, context) => {
1392
1271
  }
1393
1272
  const data = await parseBody(output.body, context);
1394
1273
  let contents = {};
1395
- contents = de_UpdateSecurityConfigResponse(data, context);
1274
+ contents = _json(data);
1396
1275
  const response = {
1397
1276
  $metadata: deserializeMetadata(output),
1398
1277
  ...contents,
1399
1278
  };
1400
- return Promise.resolve(response);
1279
+ return response;
1401
1280
  };
1402
1281
  const de_UpdateSecurityConfigCommandError = async (output, context) => {
1403
1282
  const parsedOutput = {
@@ -1420,10 +1299,9 @@ const de_UpdateSecurityConfigCommandError = async (output, context) => {
1420
1299
  throw await de_ValidationExceptionRes(parsedOutput, context);
1421
1300
  default:
1422
1301
  const parsedBody = parsedOutput.body;
1423
- throwDefaultError({
1302
+ return throwDefaultError({
1424
1303
  output,
1425
1304
  parsedBody,
1426
- exceptionCtor: __BaseException,
1427
1305
  errorCode,
1428
1306
  });
1429
1307
  }
@@ -1439,7 +1317,7 @@ export const de_UpdateSecurityPolicyCommand = async (output, context) => {
1439
1317
  $metadata: deserializeMetadata(output),
1440
1318
  ...contents,
1441
1319
  };
1442
- return Promise.resolve(response);
1320
+ return response;
1443
1321
  };
1444
1322
  const de_UpdateSecurityPolicyCommandError = async (output, context) => {
1445
1323
  const parsedOutput = {
@@ -1465,10 +1343,9 @@ const de_UpdateSecurityPolicyCommandError = async (output, context) => {
1465
1343
  throw await de_ValidationExceptionRes(parsedOutput, context);
1466
1344
  default:
1467
1345
  const parsedBody = parsedOutput.body;
1468
- throwDefaultError({
1346
+ return throwDefaultError({
1469
1347
  output,
1470
1348
  parsedBody,
1471
- exceptionCtor: __BaseException,
1472
1349
  errorCode,
1473
1350
  });
1474
1351
  }
@@ -1479,12 +1356,12 @@ export const de_UpdateVpcEndpointCommand = async (output, context) => {
1479
1356
  }
1480
1357
  const data = await parseBody(output.body, context);
1481
1358
  let contents = {};
1482
- contents = de_UpdateVpcEndpointResponse(data, context);
1359
+ contents = _json(data);
1483
1360
  const response = {
1484
1361
  $metadata: deserializeMetadata(output),
1485
1362
  ...contents,
1486
1363
  };
1487
- return Promise.resolve(response);
1364
+ return response;
1488
1365
  };
1489
1366
  const de_UpdateVpcEndpointCommandError = async (output, context) => {
1490
1367
  const parsedOutput = {
@@ -1504,17 +1381,16 @@ const de_UpdateVpcEndpointCommandError = async (output, context) => {
1504
1381
  throw await de_ValidationExceptionRes(parsedOutput, context);
1505
1382
  default:
1506
1383
  const parsedBody = parsedOutput.body;
1507
- throwDefaultError({
1384
+ return throwDefaultError({
1508
1385
  output,
1509
1386
  parsedBody,
1510
- exceptionCtor: __BaseException,
1511
1387
  errorCode,
1512
1388
  });
1513
1389
  }
1514
1390
  };
1515
1391
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
1516
1392
  const body = parsedOutput.body;
1517
- const deserialized = de_ConflictException(body, context);
1393
+ const deserialized = _json(body);
1518
1394
  const exception = new ConflictException({
1519
1395
  $metadata: deserializeMetadata(parsedOutput),
1520
1396
  ...deserialized,
@@ -1523,7 +1399,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1523
1399
  };
1524
1400
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1525
1401
  const body = parsedOutput.body;
1526
- const deserialized = de_InternalServerException(body, context);
1402
+ const deserialized = _json(body);
1527
1403
  const exception = new InternalServerException({
1528
1404
  $metadata: deserializeMetadata(parsedOutput),
1529
1405
  ...deserialized,
@@ -1532,7 +1408,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1532
1408
  };
1533
1409
  const de_OcuLimitExceededExceptionRes = async (parsedOutput, context) => {
1534
1410
  const body = parsedOutput.body;
1535
- const deserialized = de_OcuLimitExceededException(body, context);
1411
+ const deserialized = _json(body);
1536
1412
  const exception = new OcuLimitExceededException({
1537
1413
  $metadata: deserializeMetadata(parsedOutput),
1538
1414
  ...deserialized,
@@ -1541,7 +1417,7 @@ const de_OcuLimitExceededExceptionRes = async (parsedOutput, context) => {
1541
1417
  };
1542
1418
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1543
1419
  const body = parsedOutput.body;
1544
- const deserialized = de_ResourceNotFoundException(body, context);
1420
+ const deserialized = _json(body);
1545
1421
  const exception = new ResourceNotFoundException({
1546
1422
  $metadata: deserializeMetadata(parsedOutput),
1547
1423
  ...deserialized,
@@ -1550,7 +1426,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1550
1426
  };
1551
1427
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1552
1428
  const body = parsedOutput.body;
1553
- const deserialized = de_ServiceQuotaExceededException(body, context);
1429
+ const deserialized = _json(body);
1554
1430
  const exception = new ServiceQuotaExceededException({
1555
1431
  $metadata: deserializeMetadata(parsedOutput),
1556
1432
  ...deserialized,
@@ -1559,886 +1435,187 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1559
1435
  };
1560
1436
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
1561
1437
  const body = parsedOutput.body;
1562
- const deserialized = de_ValidationException(body, context);
1438
+ const deserialized = _json(body);
1563
1439
  const exception = new ValidationException({
1564
1440
  $metadata: deserializeMetadata(parsedOutput),
1565
1441
  ...deserialized,
1566
1442
  });
1567
1443
  return __decorateServiceException(exception, body);
1568
1444
  };
1569
- const se_BatchGetCollectionRequest = (input, context) => {
1570
- return {
1571
- ...(input.ids != null && { ids: se_CollectionIds(input.ids, context) }),
1572
- ...(input.names != null && { names: se_CollectionNames(input.names, context) }),
1573
- };
1574
- };
1575
- const se_BatchGetVpcEndpointRequest = (input, context) => {
1576
- return {
1577
- ...(input.ids != null && { ids: se_VpcEndpointIds(input.ids, context) }),
1578
- };
1579
- };
1580
- const se_CapacityLimits = (input, context) => {
1581
- return {
1582
- ...(input.maxIndexingCapacityInOCU != null && { maxIndexingCapacityInOCU: input.maxIndexingCapacityInOCU }),
1583
- ...(input.maxSearchCapacityInOCU != null && { maxSearchCapacityInOCU: input.maxSearchCapacityInOCU }),
1584
- };
1585
- };
1586
- const se_CollectionFilters = (input, context) => {
1587
- return {
1588
- ...(input.name != null && { name: input.name }),
1589
- ...(input.status != null && { status: input.status }),
1590
- };
1591
- };
1592
- const se_CollectionIds = (input, context) => {
1593
- return input
1594
- .filter((e) => e != null)
1595
- .map((entry) => {
1596
- return entry;
1597
- });
1598
- };
1599
- const se_CollectionNames = (input, context) => {
1600
- return input
1601
- .filter((e) => e != null)
1602
- .map((entry) => {
1603
- return entry;
1604
- });
1605
- };
1606
1445
  const se_CreateAccessPolicyRequest = (input, context) => {
1607
- return {
1608
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1609
- ...(input.description != null && { description: input.description }),
1610
- ...(input.name != null && { name: input.name }),
1611
- ...(input.policy != null && { policy: input.policy }),
1612
- ...(input.type != null && { type: input.type }),
1613
- };
1446
+ return take(input, {
1447
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1448
+ description: [],
1449
+ name: [],
1450
+ policy: [],
1451
+ type: [],
1452
+ });
1614
1453
  };
1615
1454
  const se_CreateCollectionRequest = (input, context) => {
1616
- return {
1617
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1618
- ...(input.description != null && { description: input.description }),
1619
- ...(input.name != null && { name: input.name }),
1620
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
1621
- ...(input.type != null && { type: input.type }),
1622
- };
1455
+ return take(input, {
1456
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1457
+ description: [],
1458
+ name: [],
1459
+ tags: _json,
1460
+ type: [],
1461
+ });
1623
1462
  };
1624
1463
  const se_CreateSecurityConfigRequest = (input, context) => {
1625
- return {
1626
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1627
- ...(input.description != null && { description: input.description }),
1628
- ...(input.name != null && { name: input.name }),
1629
- ...(input.samlOptions != null && { samlOptions: se_SamlConfigOptions(input.samlOptions, context) }),
1630
- ...(input.type != null && { type: input.type }),
1631
- };
1464
+ return take(input, {
1465
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1466
+ description: [],
1467
+ name: [],
1468
+ samlOptions: _json,
1469
+ type: [],
1470
+ });
1632
1471
  };
1633
1472
  const se_CreateSecurityPolicyRequest = (input, context) => {
1634
- return {
1635
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1636
- ...(input.description != null && { description: input.description }),
1637
- ...(input.name != null && { name: input.name }),
1638
- ...(input.policy != null && { policy: input.policy }),
1639
- ...(input.type != null && { type: input.type }),
1640
- };
1473
+ return take(input, {
1474
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1475
+ description: [],
1476
+ name: [],
1477
+ policy: [],
1478
+ type: [],
1479
+ });
1641
1480
  };
1642
1481
  const se_CreateVpcEndpointRequest = (input, context) => {
1643
- return {
1644
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1645
- ...(input.name != null && { name: input.name }),
1646
- ...(input.securityGroupIds != null && { securityGroupIds: se_SecurityGroupIds(input.securityGroupIds, context) }),
1647
- ...(input.subnetIds != null && { subnetIds: se_SubnetIds(input.subnetIds, context) }),
1648
- ...(input.vpcId != null && { vpcId: input.vpcId }),
1649
- };
1482
+ return take(input, {
1483
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1484
+ name: [],
1485
+ securityGroupIds: _json,
1486
+ subnetIds: _json,
1487
+ vpcId: [],
1488
+ });
1650
1489
  };
1651
1490
  const se_DeleteAccessPolicyRequest = (input, context) => {
1652
- return {
1653
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1654
- ...(input.name != null && { name: input.name }),
1655
- ...(input.type != null && { type: input.type }),
1656
- };
1657
- };
1658
- const se_DeleteCollectionRequest = (input, context) => {
1659
- return {
1660
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1661
- ...(input.id != null && { id: input.id }),
1662
- };
1663
- };
1664
- const se_DeleteSecurityConfigRequest = (input, context) => {
1665
- return {
1666
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1667
- ...(input.id != null && { id: input.id }),
1668
- };
1669
- };
1670
- const se_DeleteSecurityPolicyRequest = (input, context) => {
1671
- return {
1672
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1673
- ...(input.name != null && { name: input.name }),
1674
- ...(input.type != null && { type: input.type }),
1675
- };
1676
- };
1677
- const se_DeleteVpcEndpointRequest = (input, context) => {
1678
- return {
1679
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1680
- ...(input.id != null && { id: input.id }),
1681
- };
1682
- };
1683
- const se_GetAccessPolicyRequest = (input, context) => {
1684
- return {
1685
- ...(input.name != null && { name: input.name }),
1686
- ...(input.type != null && { type: input.type }),
1687
- };
1688
- };
1689
- const se_GetAccountSettingsRequest = (input, context) => {
1690
- return {};
1691
- };
1692
- const se_GetPoliciesStatsRequest = (input, context) => {
1693
- return {};
1694
- };
1695
- const se_GetSecurityConfigRequest = (input, context) => {
1696
- return {
1697
- ...(input.id != null && { id: input.id }),
1698
- };
1699
- };
1700
- const se_GetSecurityPolicyRequest = (input, context) => {
1701
- return {
1702
- ...(input.name != null && { name: input.name }),
1703
- ...(input.type != null && { type: input.type }),
1704
- };
1705
- };
1706
- const se_ListAccessPoliciesRequest = (input, context) => {
1707
- return {
1708
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1709
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1710
- ...(input.resource != null && { resource: se_ResourceFilter(input.resource, context) }),
1711
- ...(input.type != null && { type: input.type }),
1712
- };
1713
- };
1714
- const se_ListCollectionsRequest = (input, context) => {
1715
- return {
1716
- ...(input.collectionFilters != null && {
1717
- collectionFilters: se_CollectionFilters(input.collectionFilters, context),
1718
- }),
1719
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1720
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1721
- };
1722
- };
1723
- const se_ListSecurityConfigsRequest = (input, context) => {
1724
- return {
1725
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1726
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1727
- ...(input.type != null && { type: input.type }),
1728
- };
1729
- };
1730
- const se_ListSecurityPoliciesRequest = (input, context) => {
1731
- return {
1732
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1733
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1734
- ...(input.resource != null && { resource: se_ResourceFilter(input.resource, context) }),
1735
- ...(input.type != null && { type: input.type }),
1736
- };
1737
- };
1738
- const se_ListTagsForResourceRequest = (input, context) => {
1739
- return {
1740
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
1741
- };
1742
- };
1743
- const se_ListVpcEndpointsRequest = (input, context) => {
1744
- return {
1745
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1746
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1747
- ...(input.vpcEndpointFilters != null && {
1748
- vpcEndpointFilters: se_VpcEndpointFilters(input.vpcEndpointFilters, context),
1749
- }),
1750
- };
1751
- };
1752
- const se_ResourceFilter = (input, context) => {
1753
- return input
1754
- .filter((e) => e != null)
1755
- .map((entry) => {
1756
- return entry;
1491
+ return take(input, {
1492
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1493
+ name: [],
1494
+ type: [],
1757
1495
  });
1758
1496
  };
1759
- const se_SamlConfigOptions = (input, context) => {
1760
- return {
1761
- ...(input.groupAttribute != null && { groupAttribute: input.groupAttribute }),
1762
- ...(input.metadata != null && { metadata: input.metadata }),
1763
- ...(input.sessionTimeout != null && { sessionTimeout: input.sessionTimeout }),
1764
- ...(input.userAttribute != null && { userAttribute: input.userAttribute }),
1765
- };
1766
- };
1767
- const se_SecurityGroupIds = (input, context) => {
1768
- return input
1769
- .filter((e) => e != null)
1770
- .map((entry) => {
1771
- return entry;
1497
+ const se_DeleteCollectionRequest = (input, context) => {
1498
+ return take(input, {
1499
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1500
+ id: [],
1772
1501
  });
1773
1502
  };
1774
- const se_SubnetIds = (input, context) => {
1775
- return input
1776
- .filter((e) => e != null)
1777
- .map((entry) => {
1778
- return entry;
1503
+ const se_DeleteSecurityConfigRequest = (input, context) => {
1504
+ return take(input, {
1505
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1506
+ id: [],
1779
1507
  });
1780
1508
  };
1781
- const se_Tag = (input, context) => {
1782
- return {
1783
- ...(input.key != null && { key: input.key }),
1784
- ...(input.value != null && { value: input.value }),
1785
- };
1786
- };
1787
- const se_TagKeys = (input, context) => {
1788
- return input
1789
- .filter((e) => e != null)
1790
- .map((entry) => {
1791
- return entry;
1509
+ const se_DeleteSecurityPolicyRequest = (input, context) => {
1510
+ return take(input, {
1511
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1512
+ name: [],
1513
+ type: [],
1792
1514
  });
1793
1515
  };
1794
- const se_TagResourceRequest = (input, context) => {
1795
- return {
1796
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
1797
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
1798
- };
1799
- };
1800
- const se_Tags = (input, context) => {
1801
- return input
1802
- .filter((e) => e != null)
1803
- .map((entry) => {
1804
- return se_Tag(entry, context);
1516
+ const se_DeleteVpcEndpointRequest = (input, context) => {
1517
+ return take(input, {
1518
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1519
+ id: [],
1805
1520
  });
1806
1521
  };
1807
- const se_UntagResourceRequest = (input, context) => {
1808
- return {
1809
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
1810
- ...(input.tagKeys != null && { tagKeys: se_TagKeys(input.tagKeys, context) }),
1811
- };
1812
- };
1813
1522
  const se_UpdateAccessPolicyRequest = (input, context) => {
1814
- return {
1815
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1816
- ...(input.description != null && { description: input.description }),
1817
- ...(input.name != null && { name: input.name }),
1818
- ...(input.policy != null && { policy: input.policy }),
1819
- ...(input.policyVersion != null && { policyVersion: input.policyVersion }),
1820
- ...(input.type != null && { type: input.type }),
1821
- };
1822
- };
1823
- const se_UpdateAccountSettingsRequest = (input, context) => {
1824
- return {
1825
- ...(input.capacityLimits != null && { capacityLimits: se_CapacityLimits(input.capacityLimits, context) }),
1826
- };
1523
+ return take(input, {
1524
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1525
+ description: [],
1526
+ name: [],
1527
+ policy: [],
1528
+ policyVersion: [],
1529
+ type: [],
1530
+ });
1827
1531
  };
1828
1532
  const se_UpdateCollectionRequest = (input, context) => {
1829
- return {
1830
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1831
- ...(input.description != null && { description: input.description }),
1832
- ...(input.id != null && { id: input.id }),
1833
- };
1533
+ return take(input, {
1534
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1535
+ description: [],
1536
+ id: [],
1537
+ });
1834
1538
  };
1835
1539
  const se_UpdateSecurityConfigRequest = (input, context) => {
1836
- return {
1837
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1838
- ...(input.configVersion != null && { configVersion: input.configVersion }),
1839
- ...(input.description != null && { description: input.description }),
1840
- ...(input.id != null && { id: input.id }),
1841
- ...(input.samlOptions != null && { samlOptions: se_SamlConfigOptions(input.samlOptions, context) }),
1842
- };
1540
+ return take(input, {
1541
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1542
+ configVersion: [],
1543
+ description: [],
1544
+ id: [],
1545
+ samlOptions: _json,
1546
+ });
1843
1547
  };
1844
1548
  const se_UpdateSecurityPolicyRequest = (input, context) => {
1845
- return {
1846
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1847
- ...(input.description != null && { description: input.description }),
1848
- ...(input.name != null && { name: input.name }),
1849
- ...(input.policy != null && { policy: input.policy }),
1850
- ...(input.policyVersion != null && { policyVersion: input.policyVersion }),
1851
- ...(input.type != null && { type: input.type }),
1852
- };
1549
+ return take(input, {
1550
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1551
+ description: [],
1552
+ name: [],
1553
+ policy: [],
1554
+ policyVersion: [],
1555
+ type: [],
1556
+ });
1853
1557
  };
1854
1558
  const se_UpdateVpcEndpointRequest = (input, context) => {
1855
- return {
1856
- ...(input.addSecurityGroupIds != null && {
1857
- addSecurityGroupIds: se_SecurityGroupIds(input.addSecurityGroupIds, context),
1858
- }),
1859
- ...(input.addSubnetIds != null && { addSubnetIds: se_SubnetIds(input.addSubnetIds, context) }),
1860
- clientToken: input.clientToken ?? generateIdempotencyToken(),
1861
- ...(input.id != null && { id: input.id }),
1862
- ...(input.removeSecurityGroupIds != null && {
1863
- removeSecurityGroupIds: se_SecurityGroupIds(input.removeSecurityGroupIds, context),
1864
- }),
1865
- ...(input.removeSubnetIds != null && { removeSubnetIds: se_SubnetIds(input.removeSubnetIds, context) }),
1866
- };
1867
- };
1868
- const se_VpcEndpointFilters = (input, context) => {
1869
- return {
1870
- ...(input.status != null && { status: input.status }),
1871
- };
1872
- };
1873
- const se_VpcEndpointIds = (input, context) => {
1874
- return input
1875
- .filter((e) => e != null)
1876
- .map((entry) => {
1877
- return entry;
1559
+ return take(input, {
1560
+ addSecurityGroupIds: _json,
1561
+ addSubnetIds: _json,
1562
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
1563
+ id: [],
1564
+ removeSecurityGroupIds: _json,
1565
+ removeSubnetIds: _json,
1878
1566
  });
1879
1567
  };
1880
1568
  const de_AccessPolicyDetail = (output, context) => {
1881
- return {
1882
- createdDate: __expectLong(output.createdDate),
1883
- description: __expectString(output.description),
1884
- lastModifiedDate: __expectLong(output.lastModifiedDate),
1885
- name: __expectString(output.name),
1886
- policy: output.policy != null ? de_Document(output.policy, context) : undefined,
1887
- policyVersion: __expectString(output.policyVersion),
1888
- type: __expectString(output.type),
1889
- };
1890
- };
1891
- const de_AccessPolicyStats = (output, context) => {
1892
- return {
1893
- DataPolicyCount: __expectLong(output.DataPolicyCount),
1894
- };
1895
- };
1896
- const de_AccessPolicySummaries = (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_AccessPolicySummary(entry, context);
1904
- });
1905
- return retVal;
1906
- };
1907
- const de_AccessPolicySummary = (output, context) => {
1908
- return {
1909
- createdDate: __expectLong(output.createdDate),
1910
- description: __expectString(output.description),
1911
- lastModifiedDate: __expectLong(output.lastModifiedDate),
1912
- name: __expectString(output.name),
1913
- policyVersion: __expectString(output.policyVersion),
1914
- type: __expectString(output.type),
1915
- };
1916
- };
1917
- const de_AccountSettingsDetail = (output, context) => {
1918
- return {
1919
- capacityLimits: output.capacityLimits != null ? de_CapacityLimits(output.capacityLimits, context) : undefined,
1920
- };
1921
- };
1922
- const de_BatchGetCollectionResponse = (output, context) => {
1923
- return {
1924
- collectionDetails: output.collectionDetails != null ? de_CollectionDetails(output.collectionDetails, context) : undefined,
1925
- collectionErrorDetails: output.collectionErrorDetails != null
1926
- ? de_CollectionErrorDetails(output.collectionErrorDetails, context)
1927
- : undefined,
1928
- };
1929
- };
1930
- const de_BatchGetVpcEndpointResponse = (output, context) => {
1931
- return {
1932
- vpcEndpointDetails: output.vpcEndpointDetails != null ? de_VpcEndpointDetails(output.vpcEndpointDetails, context) : undefined,
1933
- vpcEndpointErrorDetails: output.vpcEndpointErrorDetails != null
1934
- ? de_VpcEndpointErrorDetails(output.vpcEndpointErrorDetails, context)
1935
- : undefined,
1936
- };
1937
- };
1938
- const de_CapacityLimits = (output, context) => {
1939
- return {
1940
- maxIndexingCapacityInOCU: __expectInt32(output.maxIndexingCapacityInOCU),
1941
- maxSearchCapacityInOCU: __expectInt32(output.maxSearchCapacityInOCU),
1942
- };
1943
- };
1944
- const de_CollectionDetail = (output, context) => {
1945
- return {
1946
- arn: __expectString(output.arn),
1947
- collectionEndpoint: __expectString(output.collectionEndpoint),
1948
- createdDate: __expectLong(output.createdDate),
1949
- dashboardEndpoint: __expectString(output.dashboardEndpoint),
1950
- description: __expectString(output.description),
1951
- id: __expectString(output.id),
1952
- kmsKeyArn: __expectString(output.kmsKeyArn),
1953
- lastModifiedDate: __expectLong(output.lastModifiedDate),
1954
- name: __expectString(output.name),
1955
- status: __expectString(output.status),
1956
- type: __expectString(output.type),
1957
- };
1958
- };
1959
- const de_CollectionDetails = (output, context) => {
1960
- const retVal = (output || [])
1961
- .filter((e) => e != null)
1962
- .map((entry) => {
1963
- if (entry === null) {
1964
- return null;
1965
- }
1966
- return de_CollectionDetail(entry, context);
1967
- });
1968
- return retVal;
1969
- };
1970
- const de_CollectionErrorDetail = (output, context) => {
1971
- return {
1972
- errorCode: __expectString(output.errorCode),
1973
- errorMessage: __expectString(output.errorMessage),
1974
- id: __expectString(output.id),
1975
- name: __expectString(output.name),
1976
- };
1977
- };
1978
- const de_CollectionErrorDetails = (output, context) => {
1979
- const retVal = (output || [])
1980
- .filter((e) => e != null)
1981
- .map((entry) => {
1982
- if (entry === null) {
1983
- return null;
1984
- }
1985
- return de_CollectionErrorDetail(entry, context);
1986
- });
1987
- return retVal;
1988
- };
1989
- const de_CollectionSummaries = (output, context) => {
1990
- const retVal = (output || [])
1991
- .filter((e) => e != null)
1992
- .map((entry) => {
1993
- if (entry === null) {
1994
- return null;
1995
- }
1996
- 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,
1997
1577
  });
1998
- return retVal;
1999
- };
2000
- const de_CollectionSummary = (output, context) => {
2001
- return {
2002
- arn: __expectString(output.arn),
2003
- id: __expectString(output.id),
2004
- name: __expectString(output.name),
2005
- status: __expectString(output.status),
2006
- };
2007
- };
2008
- const de_ConflictException = (output, context) => {
2009
- return {
2010
- message: __expectString(output.message),
2011
- };
2012
1578
  };
2013
1579
  const de_CreateAccessPolicyResponse = (output, context) => {
2014
- return {
2015
- accessPolicyDetail: output.accessPolicyDetail != null ? de_AccessPolicyDetail(output.accessPolicyDetail, context) : undefined,
2016
- };
2017
- };
2018
- const de_CreateCollectionDetail = (output, context) => {
2019
- return {
2020
- arn: __expectString(output.arn),
2021
- createdDate: __expectLong(output.createdDate),
2022
- description: __expectString(output.description),
2023
- id: __expectString(output.id),
2024
- kmsKeyArn: __expectString(output.kmsKeyArn),
2025
- lastModifiedDate: __expectLong(output.lastModifiedDate),
2026
- name: __expectString(output.name),
2027
- status: __expectString(output.status),
2028
- type: __expectString(output.type),
2029
- };
2030
- };
2031
- const de_CreateCollectionResponse = (output, context) => {
2032
- return {
2033
- createCollectionDetail: output.createCollectionDetail != null
2034
- ? de_CreateCollectionDetail(output.createCollectionDetail, context)
2035
- : undefined,
2036
- };
2037
- };
2038
- const de_CreateSecurityConfigResponse = (output, context) => {
2039
- return {
2040
- securityConfigDetail: output.securityConfigDetail != null ? de_SecurityConfigDetail(output.securityConfigDetail, context) : undefined,
2041
- };
1580
+ return take(output, {
1581
+ accessPolicyDetail: (_) => de_AccessPolicyDetail(_, context),
1582
+ });
2042
1583
  };
2043
1584
  const de_CreateSecurityPolicyResponse = (output, context) => {
2044
- return {
2045
- securityPolicyDetail: output.securityPolicyDetail != null ? de_SecurityPolicyDetail(output.securityPolicyDetail, context) : undefined,
2046
- };
2047
- };
2048
- const de_CreateVpcEndpointDetail = (output, context) => {
2049
- return {
2050
- id: __expectString(output.id),
2051
- name: __expectString(output.name),
2052
- status: __expectString(output.status),
2053
- };
2054
- };
2055
- const de_CreateVpcEndpointResponse = (output, context) => {
2056
- return {
2057
- createVpcEndpointDetail: output.createVpcEndpointDetail != null
2058
- ? de_CreateVpcEndpointDetail(output.createVpcEndpointDetail, context)
2059
- : undefined,
2060
- };
2061
- };
2062
- const de_DeleteAccessPolicyResponse = (output, context) => {
2063
- return {};
2064
- };
2065
- const de_DeleteCollectionDetail = (output, context) => {
2066
- return {
2067
- id: __expectString(output.id),
2068
- name: __expectString(output.name),
2069
- status: __expectString(output.status),
2070
- };
2071
- };
2072
- const de_DeleteCollectionResponse = (output, context) => {
2073
- return {
2074
- deleteCollectionDetail: output.deleteCollectionDetail != null
2075
- ? de_DeleteCollectionDetail(output.deleteCollectionDetail, context)
2076
- : undefined,
2077
- };
2078
- };
2079
- const de_DeleteSecurityConfigResponse = (output, context) => {
2080
- return {};
2081
- };
2082
- const de_DeleteSecurityPolicyResponse = (output, context) => {
2083
- return {};
2084
- };
2085
- const de_DeleteVpcEndpointDetail = (output, context) => {
2086
- return {
2087
- id: __expectString(output.id),
2088
- name: __expectString(output.name),
2089
- status: __expectString(output.status),
2090
- };
2091
- };
2092
- const de_DeleteVpcEndpointResponse = (output, context) => {
2093
- return {
2094
- deleteVpcEndpointDetail: output.deleteVpcEndpointDetail != null
2095
- ? de_DeleteVpcEndpointDetail(output.deleteVpcEndpointDetail, context)
2096
- : undefined,
2097
- };
1585
+ return take(output, {
1586
+ securityPolicyDetail: (_) => de_SecurityPolicyDetail(_, context),
1587
+ });
2098
1588
  };
2099
1589
  const de_GetAccessPolicyResponse = (output, context) => {
2100
- return {
2101
- accessPolicyDetail: output.accessPolicyDetail != null ? de_AccessPolicyDetail(output.accessPolicyDetail, context) : undefined,
2102
- };
2103
- };
2104
- const de_GetAccountSettingsResponse = (output, context) => {
2105
- return {
2106
- accountSettingsDetail: output.accountSettingsDetail != null
2107
- ? de_AccountSettingsDetail(output.accountSettingsDetail, context)
2108
- : undefined,
2109
- };
2110
- };
2111
- const de_GetPoliciesStatsResponse = (output, context) => {
2112
- return {
2113
- AccessPolicyStats: output.AccessPolicyStats != null ? de_AccessPolicyStats(output.AccessPolicyStats, context) : undefined,
2114
- SecurityConfigStats: output.SecurityConfigStats != null ? de_SecurityConfigStats(output.SecurityConfigStats, context) : undefined,
2115
- SecurityPolicyStats: output.SecurityPolicyStats != null ? de_SecurityPolicyStats(output.SecurityPolicyStats, context) : undefined,
2116
- TotalPolicyCount: __expectLong(output.TotalPolicyCount),
2117
- };
2118
- };
2119
- const de_GetSecurityConfigResponse = (output, context) => {
2120
- return {
2121
- securityConfigDetail: output.securityConfigDetail != null ? de_SecurityConfigDetail(output.securityConfigDetail, context) : undefined,
2122
- };
2123
- };
2124
- const de_GetSecurityPolicyResponse = (output, context) => {
2125
- return {
2126
- securityPolicyDetail: output.securityPolicyDetail != null ? de_SecurityPolicyDetail(output.securityPolicyDetail, context) : undefined,
2127
- };
2128
- };
2129
- const de_InternalServerException = (output, context) => {
2130
- return {
2131
- message: __expectString(output.message),
2132
- };
2133
- };
2134
- const de_ListAccessPoliciesResponse = (output, context) => {
2135
- return {
2136
- accessPolicySummaries: output.accessPolicySummaries != null
2137
- ? de_AccessPolicySummaries(output.accessPolicySummaries, context)
2138
- : undefined,
2139
- nextToken: __expectString(output.nextToken),
2140
- };
2141
- };
2142
- const de_ListCollectionsResponse = (output, context) => {
2143
- return {
2144
- collectionSummaries: output.collectionSummaries != null ? de_CollectionSummaries(output.collectionSummaries, context) : undefined,
2145
- nextToken: __expectString(output.nextToken),
2146
- };
2147
- };
2148
- const de_ListSecurityConfigsResponse = (output, context) => {
2149
- return {
2150
- nextToken: __expectString(output.nextToken),
2151
- securityConfigSummaries: output.securityConfigSummaries != null
2152
- ? de_SecurityConfigSummaries(output.securityConfigSummaries, context)
2153
- : undefined,
2154
- };
2155
- };
2156
- const de_ListSecurityPoliciesResponse = (output, context) => {
2157
- return {
2158
- nextToken: __expectString(output.nextToken),
2159
- securityPolicySummaries: output.securityPolicySummaries != null
2160
- ? de_SecurityPolicySummaries(output.securityPolicySummaries, context)
2161
- : undefined,
2162
- };
2163
- };
2164
- const de_ListTagsForResourceResponse = (output, context) => {
2165
- return {
2166
- tags: output.tags != null ? de_Tags(output.tags, context) : undefined,
2167
- };
2168
- };
2169
- const de_ListVpcEndpointsResponse = (output, context) => {
2170
- return {
2171
- nextToken: __expectString(output.nextToken),
2172
- vpcEndpointSummaries: output.vpcEndpointSummaries != null ? de_VpcEndpointSummaries(output.vpcEndpointSummaries, context) : undefined,
2173
- };
2174
- };
2175
- const de_OcuLimitExceededException = (output, context) => {
2176
- return {
2177
- message: __expectString(output.message),
2178
- };
2179
- };
2180
- const de_ResourceNotFoundException = (output, context) => {
2181
- return {
2182
- message: __expectString(output.message),
2183
- };
2184
- };
2185
- const de_SamlConfigOptions = (output, context) => {
2186
- return {
2187
- groupAttribute: __expectString(output.groupAttribute),
2188
- metadata: __expectString(output.metadata),
2189
- sessionTimeout: __expectInt32(output.sessionTimeout),
2190
- userAttribute: __expectString(output.userAttribute),
2191
- };
2192
- };
2193
- const de_SecurityConfigDetail = (output, context) => {
2194
- return {
2195
- configVersion: __expectString(output.configVersion),
2196
- createdDate: __expectLong(output.createdDate),
2197
- description: __expectString(output.description),
2198
- id: __expectString(output.id),
2199
- lastModifiedDate: __expectLong(output.lastModifiedDate),
2200
- samlOptions: output.samlOptions != null ? de_SamlConfigOptions(output.samlOptions, context) : undefined,
2201
- type: __expectString(output.type),
2202
- };
2203
- };
2204
- const de_SecurityConfigStats = (output, context) => {
2205
- return {
2206
- SamlConfigCount: __expectLong(output.SamlConfigCount),
2207
- };
2208
- };
2209
- const de_SecurityConfigSummaries = (output, context) => {
2210
- const retVal = (output || [])
2211
- .filter((e) => e != null)
2212
- .map((entry) => {
2213
- if (entry === null) {
2214
- return null;
2215
- }
2216
- return de_SecurityConfigSummary(entry, context);
1590
+ return take(output, {
1591
+ accessPolicyDetail: (_) => de_AccessPolicyDetail(_, context),
2217
1592
  });
2218
- return retVal;
2219
1593
  };
2220
- const de_SecurityConfigSummary = (output, context) => {
2221
- return {
2222
- configVersion: __expectString(output.configVersion),
2223
- createdDate: __expectLong(output.createdDate),
2224
- description: __expectString(output.description),
2225
- id: __expectString(output.id),
2226
- lastModifiedDate: __expectLong(output.lastModifiedDate),
2227
- type: __expectString(output.type),
2228
- };
2229
- };
2230
- const de_SecurityGroupIds = (output, context) => {
2231
- const retVal = (output || [])
2232
- .filter((e) => e != null)
2233
- .map((entry) => {
2234
- if (entry === null) {
2235
- return null;
2236
- }
2237
- return __expectString(entry);
1594
+ const de_GetSecurityPolicyResponse = (output, context) => {
1595
+ return take(output, {
1596
+ securityPolicyDetail: (_) => de_SecurityPolicyDetail(_, context),
2238
1597
  });
2239
- return retVal;
2240
1598
  };
2241
1599
  const de_SecurityPolicyDetail = (output, context) => {
2242
- return {
2243
- createdDate: __expectLong(output.createdDate),
2244
- description: __expectString(output.description),
2245
- lastModifiedDate: __expectLong(output.lastModifiedDate),
2246
- name: __expectString(output.name),
2247
- policy: output.policy != null ? de_Document(output.policy, context) : undefined,
2248
- policyVersion: __expectString(output.policyVersion),
2249
- type: __expectString(output.type),
2250
- };
2251
- };
2252
- const de_SecurityPolicyStats = (output, context) => {
2253
- return {
2254
- EncryptionPolicyCount: __expectLong(output.EncryptionPolicyCount),
2255
- NetworkPolicyCount: __expectLong(output.NetworkPolicyCount),
2256
- };
2257
- };
2258
- const de_SecurityPolicySummaries = (output, context) => {
2259
- const retVal = (output || [])
2260
- .filter((e) => e != null)
2261
- .map((entry) => {
2262
- if (entry === null) {
2263
- return null;
2264
- }
2265
- 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,
2266
1608
  });
2267
- return retVal;
2268
- };
2269
- const de_SecurityPolicySummary = (output, context) => {
2270
- return {
2271
- createdDate: __expectLong(output.createdDate),
2272
- description: __expectString(output.description),
2273
- lastModifiedDate: __expectLong(output.lastModifiedDate),
2274
- name: __expectString(output.name),
2275
- policyVersion: __expectString(output.policyVersion),
2276
- type: __expectString(output.type),
2277
- };
2278
- };
2279
- const de_ServiceQuotaExceededException = (output, context) => {
2280
- return {
2281
- message: __expectString(output.message),
2282
- quotaCode: __expectString(output.quotaCode),
2283
- resourceId: __expectString(output.resourceId),
2284
- resourceType: __expectString(output.resourceType),
2285
- serviceCode: __expectString(output.serviceCode),
2286
- };
2287
- };
2288
- const de_SubnetIds = (output, context) => {
2289
- const retVal = (output || [])
2290
- .filter((e) => e != null)
2291
- .map((entry) => {
2292
- if (entry === null) {
2293
- return null;
2294
- }
2295
- return __expectString(entry);
2296
- });
2297
- return retVal;
2298
- };
2299
- const de_Tag = (output, context) => {
2300
- return {
2301
- key: __expectString(output.key),
2302
- value: __expectString(output.value),
2303
- };
2304
- };
2305
- const de_TagResourceResponse = (output, context) => {
2306
- return {};
2307
- };
2308
- const de_Tags = (output, context) => {
2309
- const retVal = (output || [])
2310
- .filter((e) => e != null)
2311
- .map((entry) => {
2312
- if (entry === null) {
2313
- return null;
2314
- }
2315
- return de_Tag(entry, context);
2316
- });
2317
- return retVal;
2318
- };
2319
- const de_UntagResourceResponse = (output, context) => {
2320
- return {};
2321
1609
  };
2322
1610
  const de_UpdateAccessPolicyResponse = (output, context) => {
2323
- return {
2324
- accessPolicyDetail: output.accessPolicyDetail != null ? de_AccessPolicyDetail(output.accessPolicyDetail, context) : undefined,
2325
- };
2326
- };
2327
- const de_UpdateAccountSettingsResponse = (output, context) => {
2328
- return {
2329
- accountSettingsDetail: output.accountSettingsDetail != null
2330
- ? de_AccountSettingsDetail(output.accountSettingsDetail, context)
2331
- : undefined,
2332
- };
2333
- };
2334
- const de_UpdateCollectionDetail = (output, context) => {
2335
- return {
2336
- arn: __expectString(output.arn),
2337
- createdDate: __expectLong(output.createdDate),
2338
- description: __expectString(output.description),
2339
- id: __expectString(output.id),
2340
- lastModifiedDate: __expectLong(output.lastModifiedDate),
2341
- name: __expectString(output.name),
2342
- status: __expectString(output.status),
2343
- type: __expectString(output.type),
2344
- };
2345
- };
2346
- const de_UpdateCollectionResponse = (output, context) => {
2347
- return {
2348
- updateCollectionDetail: output.updateCollectionDetail != null
2349
- ? de_UpdateCollectionDetail(output.updateCollectionDetail, context)
2350
- : undefined,
2351
- };
2352
- };
2353
- const de_UpdateSecurityConfigResponse = (output, context) => {
2354
- return {
2355
- securityConfigDetail: output.securityConfigDetail != null ? de_SecurityConfigDetail(output.securityConfigDetail, context) : undefined,
2356
- };
2357
- };
2358
- const de_UpdateSecurityPolicyResponse = (output, context) => {
2359
- return {
2360
- securityPolicyDetail: output.securityPolicyDetail != null ? de_SecurityPolicyDetail(output.securityPolicyDetail, context) : undefined,
2361
- };
2362
- };
2363
- const de_UpdateVpcEndpointDetail = (output, context) => {
2364
- return {
2365
- id: __expectString(output.id),
2366
- lastModifiedDate: __expectLong(output.lastModifiedDate),
2367
- name: __expectString(output.name),
2368
- securityGroupIds: output.securityGroupIds != null ? de_SecurityGroupIds(output.securityGroupIds, context) : undefined,
2369
- status: __expectString(output.status),
2370
- subnetIds: output.subnetIds != null ? de_SubnetIds(output.subnetIds, context) : undefined,
2371
- };
2372
- };
2373
- const de_UpdateVpcEndpointResponse = (output, context) => {
2374
- return {
2375
- UpdateVpcEndpointDetail: output.UpdateVpcEndpointDetail != null
2376
- ? de_UpdateVpcEndpointDetail(output.UpdateVpcEndpointDetail, context)
2377
- : undefined,
2378
- };
2379
- };
2380
- const de_ValidationException = (output, context) => {
2381
- return {
2382
- message: __expectString(output.message),
2383
- };
2384
- };
2385
- const de_VpcEndpointDetail = (output, context) => {
2386
- return {
2387
- createdDate: __expectLong(output.createdDate),
2388
- id: __expectString(output.id),
2389
- name: __expectString(output.name),
2390
- securityGroupIds: output.securityGroupIds != null ? de_SecurityGroupIds(output.securityGroupIds, context) : undefined,
2391
- status: __expectString(output.status),
2392
- subnetIds: output.subnetIds != null ? de_SubnetIds(output.subnetIds, context) : undefined,
2393
- vpcId: __expectString(output.vpcId),
2394
- };
2395
- };
2396
- const de_VpcEndpointDetails = (output, context) => {
2397
- const retVal = (output || [])
2398
- .filter((e) => e != null)
2399
- .map((entry) => {
2400
- if (entry === null) {
2401
- return null;
2402
- }
2403
- return de_VpcEndpointDetail(entry, context);
1611
+ return take(output, {
1612
+ accessPolicyDetail: (_) => de_AccessPolicyDetail(_, context),
2404
1613
  });
2405
- return retVal;
2406
1614
  };
2407
- const de_VpcEndpointErrorDetail = (output, context) => {
2408
- return {
2409
- errorCode: __expectString(output.errorCode),
2410
- errorMessage: __expectString(output.errorMessage),
2411
- id: __expectString(output.id),
2412
- };
2413
- };
2414
- const de_VpcEndpointErrorDetails = (output, context) => {
2415
- const retVal = (output || [])
2416
- .filter((e) => e != null)
2417
- .map((entry) => {
2418
- if (entry === null) {
2419
- return null;
2420
- }
2421
- return de_VpcEndpointErrorDetail(entry, context);
2422
- });
2423
- return retVal;
2424
- };
2425
- const de_VpcEndpointSummaries = (output, context) => {
2426
- const retVal = (output || [])
2427
- .filter((e) => e != null)
2428
- .map((entry) => {
2429
- if (entry === null) {
2430
- return null;
2431
- }
2432
- return de_VpcEndpointSummary(entry, context);
1615
+ const de_UpdateSecurityPolicyResponse = (output, context) => {
1616
+ return take(output, {
1617
+ securityPolicyDetail: (_) => de_SecurityPolicyDetail(_, context),
2433
1618
  });
2434
- return retVal;
2435
- };
2436
- const de_VpcEndpointSummary = (output, context) => {
2437
- return {
2438
- id: __expectString(output.id),
2439
- name: __expectString(output.name),
2440
- status: __expectString(output.status),
2441
- };
2442
1619
  };
2443
1620
  const de_Document = (output, context) => {
2444
1621
  return output;
@@ -2456,6 +1633,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
2456
1633
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2457
1634
  };
2458
1635
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1636
+ const throwDefaultError = withBaseException(__BaseException);
2459
1637
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2460
1638
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2461
1639
  const contents = {
@@ -2474,6 +1652,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
2474
1652
  }
2475
1653
  return new __HttpRequest(contents);
2476
1654
  };
1655
+ function sharedHeaders(operation) {
1656
+ return {
1657
+ "content-type": "application/x-amz-json-1.0",
1658
+ "x-amz-target": `OpenSearchServerless.${operation}`,
1659
+ };
1660
+ }
2477
1661
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2478
1662
  if (encoded.length) {
2479
1663
  return JSON.parse(encoded);