@aws-sdk/client-mediastore 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.
@@ -6,212 +6,149 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const MediaStoreServiceException_1 = require("../models/MediaStoreServiceException");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const se_CreateContainerCommand = async (input, context) => {
9
- const headers = {
10
- "content-type": "application/x-amz-json-1.1",
11
- "x-amz-target": "MediaStore_20170901.CreateContainer",
12
- };
9
+ const headers = sharedHeaders("CreateContainer");
13
10
  let body;
14
- body = JSON.stringify(se_CreateContainerInput(input, context));
11
+ body = JSON.stringify((0, smithy_client_1._json)(input));
15
12
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
13
  };
17
14
  exports.se_CreateContainerCommand = se_CreateContainerCommand;
18
15
  const se_DeleteContainerCommand = async (input, context) => {
19
- const headers = {
20
- "content-type": "application/x-amz-json-1.1",
21
- "x-amz-target": "MediaStore_20170901.DeleteContainer",
22
- };
16
+ const headers = sharedHeaders("DeleteContainer");
23
17
  let body;
24
- body = JSON.stringify(se_DeleteContainerInput(input, context));
18
+ body = JSON.stringify((0, smithy_client_1._json)(input));
25
19
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
26
20
  };
27
21
  exports.se_DeleteContainerCommand = se_DeleteContainerCommand;
28
22
  const se_DeleteContainerPolicyCommand = async (input, context) => {
29
- const headers = {
30
- "content-type": "application/x-amz-json-1.1",
31
- "x-amz-target": "MediaStore_20170901.DeleteContainerPolicy",
32
- };
23
+ const headers = sharedHeaders("DeleteContainerPolicy");
33
24
  let body;
34
- body = JSON.stringify(se_DeleteContainerPolicyInput(input, context));
25
+ body = JSON.stringify((0, smithy_client_1._json)(input));
35
26
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
36
27
  };
37
28
  exports.se_DeleteContainerPolicyCommand = se_DeleteContainerPolicyCommand;
38
29
  const se_DeleteCorsPolicyCommand = async (input, context) => {
39
- const headers = {
40
- "content-type": "application/x-amz-json-1.1",
41
- "x-amz-target": "MediaStore_20170901.DeleteCorsPolicy",
42
- };
30
+ const headers = sharedHeaders("DeleteCorsPolicy");
43
31
  let body;
44
- body = JSON.stringify(se_DeleteCorsPolicyInput(input, context));
32
+ body = JSON.stringify((0, smithy_client_1._json)(input));
45
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
46
34
  };
47
35
  exports.se_DeleteCorsPolicyCommand = se_DeleteCorsPolicyCommand;
48
36
  const se_DeleteLifecyclePolicyCommand = async (input, context) => {
49
- const headers = {
50
- "content-type": "application/x-amz-json-1.1",
51
- "x-amz-target": "MediaStore_20170901.DeleteLifecyclePolicy",
52
- };
37
+ const headers = sharedHeaders("DeleteLifecyclePolicy");
53
38
  let body;
54
- body = JSON.stringify(se_DeleteLifecyclePolicyInput(input, context));
39
+ body = JSON.stringify((0, smithy_client_1._json)(input));
55
40
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
56
41
  };
57
42
  exports.se_DeleteLifecyclePolicyCommand = se_DeleteLifecyclePolicyCommand;
58
43
  const se_DeleteMetricPolicyCommand = async (input, context) => {
59
- const headers = {
60
- "content-type": "application/x-amz-json-1.1",
61
- "x-amz-target": "MediaStore_20170901.DeleteMetricPolicy",
62
- };
44
+ const headers = sharedHeaders("DeleteMetricPolicy");
63
45
  let body;
64
- body = JSON.stringify(se_DeleteMetricPolicyInput(input, context));
46
+ body = JSON.stringify((0, smithy_client_1._json)(input));
65
47
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
66
48
  };
67
49
  exports.se_DeleteMetricPolicyCommand = se_DeleteMetricPolicyCommand;
68
50
  const se_DescribeContainerCommand = async (input, context) => {
69
- const headers = {
70
- "content-type": "application/x-amz-json-1.1",
71
- "x-amz-target": "MediaStore_20170901.DescribeContainer",
72
- };
51
+ const headers = sharedHeaders("DescribeContainer");
73
52
  let body;
74
- body = JSON.stringify(se_DescribeContainerInput(input, context));
53
+ body = JSON.stringify((0, smithy_client_1._json)(input));
75
54
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
55
  };
77
56
  exports.se_DescribeContainerCommand = se_DescribeContainerCommand;
78
57
  const se_GetContainerPolicyCommand = async (input, context) => {
79
- const headers = {
80
- "content-type": "application/x-amz-json-1.1",
81
- "x-amz-target": "MediaStore_20170901.GetContainerPolicy",
82
- };
58
+ const headers = sharedHeaders("GetContainerPolicy");
83
59
  let body;
84
- body = JSON.stringify(se_GetContainerPolicyInput(input, context));
60
+ body = JSON.stringify((0, smithy_client_1._json)(input));
85
61
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
86
62
  };
87
63
  exports.se_GetContainerPolicyCommand = se_GetContainerPolicyCommand;
88
64
  const se_GetCorsPolicyCommand = async (input, context) => {
89
- const headers = {
90
- "content-type": "application/x-amz-json-1.1",
91
- "x-amz-target": "MediaStore_20170901.GetCorsPolicy",
92
- };
65
+ const headers = sharedHeaders("GetCorsPolicy");
93
66
  let body;
94
- body = JSON.stringify(se_GetCorsPolicyInput(input, context));
67
+ body = JSON.stringify((0, smithy_client_1._json)(input));
95
68
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
96
69
  };
97
70
  exports.se_GetCorsPolicyCommand = se_GetCorsPolicyCommand;
98
71
  const se_GetLifecyclePolicyCommand = async (input, context) => {
99
- const headers = {
100
- "content-type": "application/x-amz-json-1.1",
101
- "x-amz-target": "MediaStore_20170901.GetLifecyclePolicy",
102
- };
72
+ const headers = sharedHeaders("GetLifecyclePolicy");
103
73
  let body;
104
- body = JSON.stringify(se_GetLifecyclePolicyInput(input, context));
74
+ body = JSON.stringify((0, smithy_client_1._json)(input));
105
75
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
106
76
  };
107
77
  exports.se_GetLifecyclePolicyCommand = se_GetLifecyclePolicyCommand;
108
78
  const se_GetMetricPolicyCommand = async (input, context) => {
109
- const headers = {
110
- "content-type": "application/x-amz-json-1.1",
111
- "x-amz-target": "MediaStore_20170901.GetMetricPolicy",
112
- };
79
+ const headers = sharedHeaders("GetMetricPolicy");
113
80
  let body;
114
- body = JSON.stringify(se_GetMetricPolicyInput(input, context));
81
+ body = JSON.stringify((0, smithy_client_1._json)(input));
115
82
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
116
83
  };
117
84
  exports.se_GetMetricPolicyCommand = se_GetMetricPolicyCommand;
118
85
  const se_ListContainersCommand = async (input, context) => {
119
- const headers = {
120
- "content-type": "application/x-amz-json-1.1",
121
- "x-amz-target": "MediaStore_20170901.ListContainers",
122
- };
86
+ const headers = sharedHeaders("ListContainers");
123
87
  let body;
124
- body = JSON.stringify(se_ListContainersInput(input, context));
88
+ body = JSON.stringify((0, smithy_client_1._json)(input));
125
89
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
126
90
  };
127
91
  exports.se_ListContainersCommand = se_ListContainersCommand;
128
92
  const se_ListTagsForResourceCommand = async (input, context) => {
129
- const headers = {
130
- "content-type": "application/x-amz-json-1.1",
131
- "x-amz-target": "MediaStore_20170901.ListTagsForResource",
132
- };
93
+ const headers = sharedHeaders("ListTagsForResource");
133
94
  let body;
134
- body = JSON.stringify(se_ListTagsForResourceInput(input, context));
95
+ body = JSON.stringify((0, smithy_client_1._json)(input));
135
96
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
136
97
  };
137
98
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
138
99
  const se_PutContainerPolicyCommand = async (input, context) => {
139
- const headers = {
140
- "content-type": "application/x-amz-json-1.1",
141
- "x-amz-target": "MediaStore_20170901.PutContainerPolicy",
142
- };
100
+ const headers = sharedHeaders("PutContainerPolicy");
143
101
  let body;
144
- body = JSON.stringify(se_PutContainerPolicyInput(input, context));
102
+ body = JSON.stringify((0, smithy_client_1._json)(input));
145
103
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
146
104
  };
147
105
  exports.se_PutContainerPolicyCommand = se_PutContainerPolicyCommand;
148
106
  const se_PutCorsPolicyCommand = async (input, context) => {
149
- const headers = {
150
- "content-type": "application/x-amz-json-1.1",
151
- "x-amz-target": "MediaStore_20170901.PutCorsPolicy",
152
- };
107
+ const headers = sharedHeaders("PutCorsPolicy");
153
108
  let body;
154
- body = JSON.stringify(se_PutCorsPolicyInput(input, context));
109
+ body = JSON.stringify((0, smithy_client_1._json)(input));
155
110
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
156
111
  };
157
112
  exports.se_PutCorsPolicyCommand = se_PutCorsPolicyCommand;
158
113
  const se_PutLifecyclePolicyCommand = async (input, context) => {
159
- const headers = {
160
- "content-type": "application/x-amz-json-1.1",
161
- "x-amz-target": "MediaStore_20170901.PutLifecyclePolicy",
162
- };
114
+ const headers = sharedHeaders("PutLifecyclePolicy");
163
115
  let body;
164
- body = JSON.stringify(se_PutLifecyclePolicyInput(input, context));
116
+ body = JSON.stringify((0, smithy_client_1._json)(input));
165
117
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
166
118
  };
167
119
  exports.se_PutLifecyclePolicyCommand = se_PutLifecyclePolicyCommand;
168
120
  const se_PutMetricPolicyCommand = async (input, context) => {
169
- const headers = {
170
- "content-type": "application/x-amz-json-1.1",
171
- "x-amz-target": "MediaStore_20170901.PutMetricPolicy",
172
- };
121
+ const headers = sharedHeaders("PutMetricPolicy");
173
122
  let body;
174
- body = JSON.stringify(se_PutMetricPolicyInput(input, context));
123
+ body = JSON.stringify((0, smithy_client_1._json)(input));
175
124
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
176
125
  };
177
126
  exports.se_PutMetricPolicyCommand = se_PutMetricPolicyCommand;
178
127
  const se_StartAccessLoggingCommand = async (input, context) => {
179
- const headers = {
180
- "content-type": "application/x-amz-json-1.1",
181
- "x-amz-target": "MediaStore_20170901.StartAccessLogging",
182
- };
128
+ const headers = sharedHeaders("StartAccessLogging");
183
129
  let body;
184
- body = JSON.stringify(se_StartAccessLoggingInput(input, context));
130
+ body = JSON.stringify((0, smithy_client_1._json)(input));
185
131
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
186
132
  };
187
133
  exports.se_StartAccessLoggingCommand = se_StartAccessLoggingCommand;
188
134
  const se_StopAccessLoggingCommand = async (input, context) => {
189
- const headers = {
190
- "content-type": "application/x-amz-json-1.1",
191
- "x-amz-target": "MediaStore_20170901.StopAccessLogging",
192
- };
135
+ const headers = sharedHeaders("StopAccessLogging");
193
136
  let body;
194
- body = JSON.stringify(se_StopAccessLoggingInput(input, context));
137
+ body = JSON.stringify((0, smithy_client_1._json)(input));
195
138
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
196
139
  };
197
140
  exports.se_StopAccessLoggingCommand = se_StopAccessLoggingCommand;
198
141
  const se_TagResourceCommand = async (input, context) => {
199
- const headers = {
200
- "content-type": "application/x-amz-json-1.1",
201
- "x-amz-target": "MediaStore_20170901.TagResource",
202
- };
142
+ const headers = sharedHeaders("TagResource");
203
143
  let body;
204
- body = JSON.stringify(se_TagResourceInput(input, context));
144
+ body = JSON.stringify((0, smithy_client_1._json)(input));
205
145
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
206
146
  };
207
147
  exports.se_TagResourceCommand = se_TagResourceCommand;
208
148
  const se_UntagResourceCommand = async (input, context) => {
209
- const headers = {
210
- "content-type": "application/x-amz-json-1.1",
211
- "x-amz-target": "MediaStore_20170901.UntagResource",
212
- };
149
+ const headers = sharedHeaders("UntagResource");
213
150
  let body;
214
- body = JSON.stringify(se_UntagResourceInput(input, context));
151
+ body = JSON.stringify((0, smithy_client_1._json)(input));
215
152
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
216
153
  };
217
154
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
@@ -226,7 +163,7 @@ const de_CreateContainerCommand = async (output, context) => {
226
163
  $metadata: deserializeMetadata(output),
227
164
  ...contents,
228
165
  };
229
- return Promise.resolve(response);
166
+ return response;
230
167
  };
231
168
  exports.de_CreateContainerCommand = de_CreateContainerCommand;
232
169
  const de_CreateContainerCommandError = async (output, context) => {
@@ -247,10 +184,9 @@ const de_CreateContainerCommandError = async (output, context) => {
247
184
  throw await de_LimitExceededExceptionRes(parsedOutput, context);
248
185
  default:
249
186
  const parsedBody = parsedOutput.body;
250
- (0, smithy_client_1.throwDefaultError)({
187
+ return throwDefaultError({
251
188
  output,
252
189
  parsedBody,
253
- exceptionCtor: MediaStoreServiceException_1.MediaStoreServiceException,
254
190
  errorCode,
255
191
  });
256
192
  }
@@ -261,12 +197,12 @@ const de_DeleteContainerCommand = async (output, context) => {
261
197
  }
262
198
  const data = await parseBody(output.body, context);
263
199
  let contents = {};
264
- contents = de_DeleteContainerOutput(data, context);
200
+ contents = (0, smithy_client_1._json)(data);
265
201
  const response = {
266
202
  $metadata: deserializeMetadata(output),
267
203
  ...contents,
268
204
  };
269
- return Promise.resolve(response);
205
+ return response;
270
206
  };
271
207
  exports.de_DeleteContainerCommand = de_DeleteContainerCommand;
272
208
  const de_DeleteContainerCommandError = async (output, context) => {
@@ -287,10 +223,9 @@ const de_DeleteContainerCommandError = async (output, context) => {
287
223
  throw await de_InternalServerErrorRes(parsedOutput, context);
288
224
  default:
289
225
  const parsedBody = parsedOutput.body;
290
- (0, smithy_client_1.throwDefaultError)({
226
+ return throwDefaultError({
291
227
  output,
292
228
  parsedBody,
293
- exceptionCtor: MediaStoreServiceException_1.MediaStoreServiceException,
294
229
  errorCode,
295
230
  });
296
231
  }
@@ -301,12 +236,12 @@ const de_DeleteContainerPolicyCommand = async (output, context) => {
301
236
  }
302
237
  const data = await parseBody(output.body, context);
303
238
  let contents = {};
304
- contents = de_DeleteContainerPolicyOutput(data, context);
239
+ contents = (0, smithy_client_1._json)(data);
305
240
  const response = {
306
241
  $metadata: deserializeMetadata(output),
307
242
  ...contents,
308
243
  };
309
- return Promise.resolve(response);
244
+ return response;
310
245
  };
311
246
  exports.de_DeleteContainerPolicyCommand = de_DeleteContainerPolicyCommand;
312
247
  const de_DeleteContainerPolicyCommandError = async (output, context) => {
@@ -330,10 +265,9 @@ const de_DeleteContainerPolicyCommandError = async (output, context) => {
330
265
  throw await de_PolicyNotFoundExceptionRes(parsedOutput, context);
331
266
  default:
332
267
  const parsedBody = parsedOutput.body;
333
- (0, smithy_client_1.throwDefaultError)({
268
+ return throwDefaultError({
334
269
  output,
335
270
  parsedBody,
336
- exceptionCtor: MediaStoreServiceException_1.MediaStoreServiceException,
337
271
  errorCode,
338
272
  });
339
273
  }
@@ -344,12 +278,12 @@ const de_DeleteCorsPolicyCommand = async (output, context) => {
344
278
  }
345
279
  const data = await parseBody(output.body, context);
346
280
  let contents = {};
347
- contents = de_DeleteCorsPolicyOutput(data, context);
281
+ contents = (0, smithy_client_1._json)(data);
348
282
  const response = {
349
283
  $metadata: deserializeMetadata(output),
350
284
  ...contents,
351
285
  };
352
- return Promise.resolve(response);
286
+ return response;
353
287
  };
354
288
  exports.de_DeleteCorsPolicyCommand = de_DeleteCorsPolicyCommand;
355
289
  const de_DeleteCorsPolicyCommandError = async (output, context) => {
@@ -373,10 +307,9 @@ const de_DeleteCorsPolicyCommandError = async (output, context) => {
373
307
  throw await de_InternalServerErrorRes(parsedOutput, context);
374
308
  default:
375
309
  const parsedBody = parsedOutput.body;
376
- (0, smithy_client_1.throwDefaultError)({
310
+ return throwDefaultError({
377
311
  output,
378
312
  parsedBody,
379
- exceptionCtor: MediaStoreServiceException_1.MediaStoreServiceException,
380
313
  errorCode,
381
314
  });
382
315
  }
@@ -387,12 +320,12 @@ const de_DeleteLifecyclePolicyCommand = async (output, context) => {
387
320
  }
388
321
  const data = await parseBody(output.body, context);
389
322
  let contents = {};
390
- contents = de_DeleteLifecyclePolicyOutput(data, context);
323
+ contents = (0, smithy_client_1._json)(data);
391
324
  const response = {
392
325
  $metadata: deserializeMetadata(output),
393
326
  ...contents,
394
327
  };
395
- return Promise.resolve(response);
328
+ return response;
396
329
  };
397
330
  exports.de_DeleteLifecyclePolicyCommand = de_DeleteLifecyclePolicyCommand;
398
331
  const de_DeleteLifecyclePolicyCommandError = async (output, context) => {
@@ -416,10 +349,9 @@ const de_DeleteLifecyclePolicyCommandError = async (output, context) => {
416
349
  throw await de_PolicyNotFoundExceptionRes(parsedOutput, context);
417
350
  default:
418
351
  const parsedBody = parsedOutput.body;
419
- (0, smithy_client_1.throwDefaultError)({
352
+ return throwDefaultError({
420
353
  output,
421
354
  parsedBody,
422
- exceptionCtor: MediaStoreServiceException_1.MediaStoreServiceException,
423
355
  errorCode,
424
356
  });
425
357
  }
@@ -430,12 +362,12 @@ const de_DeleteMetricPolicyCommand = async (output, context) => {
430
362
  }
431
363
  const data = await parseBody(output.body, context);
432
364
  let contents = {};
433
- contents = de_DeleteMetricPolicyOutput(data, context);
365
+ contents = (0, smithy_client_1._json)(data);
434
366
  const response = {
435
367
  $metadata: deserializeMetadata(output),
436
368
  ...contents,
437
369
  };
438
- return Promise.resolve(response);
370
+ return response;
439
371
  };
440
372
  exports.de_DeleteMetricPolicyCommand = de_DeleteMetricPolicyCommand;
441
373
  const de_DeleteMetricPolicyCommandError = async (output, context) => {
@@ -459,10 +391,9 @@ const de_DeleteMetricPolicyCommandError = async (output, context) => {
459
391
  throw await de_PolicyNotFoundExceptionRes(parsedOutput, context);
460
392
  default:
461
393
  const parsedBody = parsedOutput.body;
462
- (0, smithy_client_1.throwDefaultError)({
394
+ return throwDefaultError({
463
395
  output,
464
396
  parsedBody,
465
- exceptionCtor: MediaStoreServiceException_1.MediaStoreServiceException,
466
397
  errorCode,
467
398
  });
468
399
  }
@@ -478,7 +409,7 @@ const de_DescribeContainerCommand = async (output, context) => {
478
409
  $metadata: deserializeMetadata(output),
479
410
  ...contents,
480
411
  };
481
- return Promise.resolve(response);
412
+ return response;
482
413
  };
483
414
  exports.de_DescribeContainerCommand = de_DescribeContainerCommand;
484
415
  const de_DescribeContainerCommandError = async (output, context) => {
@@ -496,10 +427,9 @@ const de_DescribeContainerCommandError = async (output, context) => {
496
427
  throw await de_InternalServerErrorRes(parsedOutput, context);
497
428
  default:
498
429
  const parsedBody = parsedOutput.body;
499
- (0, smithy_client_1.throwDefaultError)({
430
+ return throwDefaultError({
500
431
  output,
501
432
  parsedBody,
502
- exceptionCtor: MediaStoreServiceException_1.MediaStoreServiceException,
503
433
  errorCode,
504
434
  });
505
435
  }
@@ -510,12 +440,12 @@ const de_GetContainerPolicyCommand = async (output, context) => {
510
440
  }
511
441
  const data = await parseBody(output.body, context);
512
442
  let contents = {};
513
- contents = de_GetContainerPolicyOutput(data, context);
443
+ contents = (0, smithy_client_1._json)(data);
514
444
  const response = {
515
445
  $metadata: deserializeMetadata(output),
516
446
  ...contents,
517
447
  };
518
- return Promise.resolve(response);
448
+ return response;
519
449
  };
520
450
  exports.de_GetContainerPolicyCommand = de_GetContainerPolicyCommand;
521
451
  const de_GetContainerPolicyCommandError = async (output, context) => {
@@ -539,10 +469,9 @@ const de_GetContainerPolicyCommandError = async (output, context) => {
539
469
  throw await de_PolicyNotFoundExceptionRes(parsedOutput, context);
540
470
  default:
541
471
  const parsedBody = parsedOutput.body;
542
- (0, smithy_client_1.throwDefaultError)({
472
+ return throwDefaultError({
543
473
  output,
544
474
  parsedBody,
545
- exceptionCtor: MediaStoreServiceException_1.MediaStoreServiceException,
546
475
  errorCode,
547
476
  });
548
477
  }
@@ -553,12 +482,12 @@ const de_GetCorsPolicyCommand = async (output, context) => {
553
482
  }
554
483
  const data = await parseBody(output.body, context);
555
484
  let contents = {};
556
- contents = de_GetCorsPolicyOutput(data, context);
485
+ contents = (0, smithy_client_1._json)(data);
557
486
  const response = {
558
487
  $metadata: deserializeMetadata(output),
559
488
  ...contents,
560
489
  };
561
- return Promise.resolve(response);
490
+ return response;
562
491
  };
563
492
  exports.de_GetCorsPolicyCommand = de_GetCorsPolicyCommand;
564
493
  const de_GetCorsPolicyCommandError = async (output, context) => {
@@ -582,10 +511,9 @@ const de_GetCorsPolicyCommandError = async (output, context) => {
582
511
  throw await de_InternalServerErrorRes(parsedOutput, context);
583
512
  default:
584
513
  const parsedBody = parsedOutput.body;
585
- (0, smithy_client_1.throwDefaultError)({
514
+ return throwDefaultError({
586
515
  output,
587
516
  parsedBody,
588
- exceptionCtor: MediaStoreServiceException_1.MediaStoreServiceException,
589
517
  errorCode,
590
518
  });
591
519
  }
@@ -596,12 +524,12 @@ const de_GetLifecyclePolicyCommand = async (output, context) => {
596
524
  }
597
525
  const data = await parseBody(output.body, context);
598
526
  let contents = {};
599
- contents = de_GetLifecyclePolicyOutput(data, context);
527
+ contents = (0, smithy_client_1._json)(data);
600
528
  const response = {
601
529
  $metadata: deserializeMetadata(output),
602
530
  ...contents,
603
531
  };
604
- return Promise.resolve(response);
532
+ return response;
605
533
  };
606
534
  exports.de_GetLifecyclePolicyCommand = de_GetLifecyclePolicyCommand;
607
535
  const de_GetLifecyclePolicyCommandError = async (output, context) => {
@@ -625,10 +553,9 @@ const de_GetLifecyclePolicyCommandError = async (output, context) => {
625
553
  throw await de_PolicyNotFoundExceptionRes(parsedOutput, context);
626
554
  default:
627
555
  const parsedBody = parsedOutput.body;
628
- (0, smithy_client_1.throwDefaultError)({
556
+ return throwDefaultError({
629
557
  output,
630
558
  parsedBody,
631
- exceptionCtor: MediaStoreServiceException_1.MediaStoreServiceException,
632
559
  errorCode,
633
560
  });
634
561
  }
@@ -639,12 +566,12 @@ const de_GetMetricPolicyCommand = async (output, context) => {
639
566
  }
640
567
  const data = await parseBody(output.body, context);
641
568
  let contents = {};
642
- contents = de_GetMetricPolicyOutput(data, context);
569
+ contents = (0, smithy_client_1._json)(data);
643
570
  const response = {
644
571
  $metadata: deserializeMetadata(output),
645
572
  ...contents,
646
573
  };
647
- return Promise.resolve(response);
574
+ return response;
648
575
  };
649
576
  exports.de_GetMetricPolicyCommand = de_GetMetricPolicyCommand;
650
577
  const de_GetMetricPolicyCommandError = async (output, context) => {
@@ -668,10 +595,9 @@ const de_GetMetricPolicyCommandError = async (output, context) => {
668
595
  throw await de_PolicyNotFoundExceptionRes(parsedOutput, context);
669
596
  default:
670
597
  const parsedBody = parsedOutput.body;
671
- (0, smithy_client_1.throwDefaultError)({
598
+ return throwDefaultError({
672
599
  output,
673
600
  parsedBody,
674
- exceptionCtor: MediaStoreServiceException_1.MediaStoreServiceException,
675
601
  errorCode,
676
602
  });
677
603
  }
@@ -687,7 +613,7 @@ const de_ListContainersCommand = async (output, context) => {
687
613
  $metadata: deserializeMetadata(output),
688
614
  ...contents,
689
615
  };
690
- return Promise.resolve(response);
616
+ return response;
691
617
  };
692
618
  exports.de_ListContainersCommand = de_ListContainersCommand;
693
619
  const de_ListContainersCommandError = async (output, context) => {
@@ -702,10 +628,9 @@ const de_ListContainersCommandError = async (output, context) => {
702
628
  throw await de_InternalServerErrorRes(parsedOutput, context);
703
629
  default:
704
630
  const parsedBody = parsedOutput.body;
705
- (0, smithy_client_1.throwDefaultError)({
631
+ return throwDefaultError({
706
632
  output,
707
633
  parsedBody,
708
- exceptionCtor: MediaStoreServiceException_1.MediaStoreServiceException,
709
634
  errorCode,
710
635
  });
711
636
  }
@@ -716,12 +641,12 @@ const de_ListTagsForResourceCommand = async (output, context) => {
716
641
  }
717
642
  const data = await parseBody(output.body, context);
718
643
  let contents = {};
719
- contents = de_ListTagsForResourceOutput(data, context);
644
+ contents = (0, smithy_client_1._json)(data);
720
645
  const response = {
721
646
  $metadata: deserializeMetadata(output),
722
647
  ...contents,
723
648
  };
724
- return Promise.resolve(response);
649
+ return response;
725
650
  };
726
651
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
727
652
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -742,10 +667,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
742
667
  throw await de_InternalServerErrorRes(parsedOutput, context);
743
668
  default:
744
669
  const parsedBody = parsedOutput.body;
745
- (0, smithy_client_1.throwDefaultError)({
670
+ return throwDefaultError({
746
671
  output,
747
672
  parsedBody,
748
- exceptionCtor: MediaStoreServiceException_1.MediaStoreServiceException,
749
673
  errorCode,
750
674
  });
751
675
  }
@@ -756,12 +680,12 @@ const de_PutContainerPolicyCommand = async (output, context) => {
756
680
  }
757
681
  const data = await parseBody(output.body, context);
758
682
  let contents = {};
759
- contents = de_PutContainerPolicyOutput(data, context);
683
+ contents = (0, smithy_client_1._json)(data);
760
684
  const response = {
761
685
  $metadata: deserializeMetadata(output),
762
686
  ...contents,
763
687
  };
764
- return Promise.resolve(response);
688
+ return response;
765
689
  };
766
690
  exports.de_PutContainerPolicyCommand = de_PutContainerPolicyCommand;
767
691
  const de_PutContainerPolicyCommandError = async (output, context) => {
@@ -782,10 +706,9 @@ const de_PutContainerPolicyCommandError = async (output, context) => {
782
706
  throw await de_InternalServerErrorRes(parsedOutput, context);
783
707
  default:
784
708
  const parsedBody = parsedOutput.body;
785
- (0, smithy_client_1.throwDefaultError)({
709
+ return throwDefaultError({
786
710
  output,
787
711
  parsedBody,
788
- exceptionCtor: MediaStoreServiceException_1.MediaStoreServiceException,
789
712
  errorCode,
790
713
  });
791
714
  }
@@ -796,12 +719,12 @@ const de_PutCorsPolicyCommand = async (output, context) => {
796
719
  }
797
720
  const data = await parseBody(output.body, context);
798
721
  let contents = {};
799
- contents = de_PutCorsPolicyOutput(data, context);
722
+ contents = (0, smithy_client_1._json)(data);
800
723
  const response = {
801
724
  $metadata: deserializeMetadata(output),
802
725
  ...contents,
803
726
  };
804
- return Promise.resolve(response);
727
+ return response;
805
728
  };
806
729
  exports.de_PutCorsPolicyCommand = de_PutCorsPolicyCommand;
807
730
  const de_PutCorsPolicyCommandError = async (output, context) => {
@@ -822,10 +745,9 @@ const de_PutCorsPolicyCommandError = async (output, context) => {
822
745
  throw await de_InternalServerErrorRes(parsedOutput, context);
823
746
  default:
824
747
  const parsedBody = parsedOutput.body;
825
- (0, smithy_client_1.throwDefaultError)({
748
+ return throwDefaultError({
826
749
  output,
827
750
  parsedBody,
828
- exceptionCtor: MediaStoreServiceException_1.MediaStoreServiceException,
829
751
  errorCode,
830
752
  });
831
753
  }
@@ -836,12 +758,12 @@ const de_PutLifecyclePolicyCommand = async (output, context) => {
836
758
  }
837
759
  const data = await parseBody(output.body, context);
838
760
  let contents = {};
839
- contents = de_PutLifecyclePolicyOutput(data, context);
761
+ contents = (0, smithy_client_1._json)(data);
840
762
  const response = {
841
763
  $metadata: deserializeMetadata(output),
842
764
  ...contents,
843
765
  };
844
- return Promise.resolve(response);
766
+ return response;
845
767
  };
846
768
  exports.de_PutLifecyclePolicyCommand = de_PutLifecyclePolicyCommand;
847
769
  const de_PutLifecyclePolicyCommandError = async (output, context) => {
@@ -862,10 +784,9 @@ const de_PutLifecyclePolicyCommandError = async (output, context) => {
862
784
  throw await de_InternalServerErrorRes(parsedOutput, context);
863
785
  default:
864
786
  const parsedBody = parsedOutput.body;
865
- (0, smithy_client_1.throwDefaultError)({
787
+ return throwDefaultError({
866
788
  output,
867
789
  parsedBody,
868
- exceptionCtor: MediaStoreServiceException_1.MediaStoreServiceException,
869
790
  errorCode,
870
791
  });
871
792
  }
@@ -876,12 +797,12 @@ const de_PutMetricPolicyCommand = async (output, context) => {
876
797
  }
877
798
  const data = await parseBody(output.body, context);
878
799
  let contents = {};
879
- contents = de_PutMetricPolicyOutput(data, context);
800
+ contents = (0, smithy_client_1._json)(data);
880
801
  const response = {
881
802
  $metadata: deserializeMetadata(output),
882
803
  ...contents,
883
804
  };
884
- return Promise.resolve(response);
805
+ return response;
885
806
  };
886
807
  exports.de_PutMetricPolicyCommand = de_PutMetricPolicyCommand;
887
808
  const de_PutMetricPolicyCommandError = async (output, context) => {
@@ -902,10 +823,9 @@ const de_PutMetricPolicyCommandError = async (output, context) => {
902
823
  throw await de_InternalServerErrorRes(parsedOutput, context);
903
824
  default:
904
825
  const parsedBody = parsedOutput.body;
905
- (0, smithy_client_1.throwDefaultError)({
826
+ return throwDefaultError({
906
827
  output,
907
828
  parsedBody,
908
- exceptionCtor: MediaStoreServiceException_1.MediaStoreServiceException,
909
829
  errorCode,
910
830
  });
911
831
  }
@@ -916,12 +836,12 @@ const de_StartAccessLoggingCommand = async (output, context) => {
916
836
  }
917
837
  const data = await parseBody(output.body, context);
918
838
  let contents = {};
919
- contents = de_StartAccessLoggingOutput(data, context);
839
+ contents = (0, smithy_client_1._json)(data);
920
840
  const response = {
921
841
  $metadata: deserializeMetadata(output),
922
842
  ...contents,
923
843
  };
924
- return Promise.resolve(response);
844
+ return response;
925
845
  };
926
846
  exports.de_StartAccessLoggingCommand = de_StartAccessLoggingCommand;
927
847
  const de_StartAccessLoggingCommandError = async (output, context) => {
@@ -942,10 +862,9 @@ const de_StartAccessLoggingCommandError = async (output, context) => {
942
862
  throw await de_InternalServerErrorRes(parsedOutput, context);
943
863
  default:
944
864
  const parsedBody = parsedOutput.body;
945
- (0, smithy_client_1.throwDefaultError)({
865
+ return throwDefaultError({
946
866
  output,
947
867
  parsedBody,
948
- exceptionCtor: MediaStoreServiceException_1.MediaStoreServiceException,
949
868
  errorCode,
950
869
  });
951
870
  }
@@ -956,12 +875,12 @@ const de_StopAccessLoggingCommand = async (output, context) => {
956
875
  }
957
876
  const data = await parseBody(output.body, context);
958
877
  let contents = {};
959
- contents = de_StopAccessLoggingOutput(data, context);
878
+ contents = (0, smithy_client_1._json)(data);
960
879
  const response = {
961
880
  $metadata: deserializeMetadata(output),
962
881
  ...contents,
963
882
  };
964
- return Promise.resolve(response);
883
+ return response;
965
884
  };
966
885
  exports.de_StopAccessLoggingCommand = de_StopAccessLoggingCommand;
967
886
  const de_StopAccessLoggingCommandError = async (output, context) => {
@@ -982,10 +901,9 @@ const de_StopAccessLoggingCommandError = async (output, context) => {
982
901
  throw await de_InternalServerErrorRes(parsedOutput, context);
983
902
  default:
984
903
  const parsedBody = parsedOutput.body;
985
- (0, smithy_client_1.throwDefaultError)({
904
+ return throwDefaultError({
986
905
  output,
987
906
  parsedBody,
988
- exceptionCtor: MediaStoreServiceException_1.MediaStoreServiceException,
989
907
  errorCode,
990
908
  });
991
909
  }
@@ -996,12 +914,12 @@ const de_TagResourceCommand = async (output, context) => {
996
914
  }
997
915
  const data = await parseBody(output.body, context);
998
916
  let contents = {};
999
- contents = de_TagResourceOutput(data, context);
917
+ contents = (0, smithy_client_1._json)(data);
1000
918
  const response = {
1001
919
  $metadata: deserializeMetadata(output),
1002
920
  ...contents,
1003
921
  };
1004
- return Promise.resolve(response);
922
+ return response;
1005
923
  };
1006
924
  exports.de_TagResourceCommand = de_TagResourceCommand;
1007
925
  const de_TagResourceCommandError = async (output, context) => {
@@ -1022,10 +940,9 @@ const de_TagResourceCommandError = async (output, context) => {
1022
940
  throw await de_InternalServerErrorRes(parsedOutput, context);
1023
941
  default:
1024
942
  const parsedBody = parsedOutput.body;
1025
- (0, smithy_client_1.throwDefaultError)({
943
+ return throwDefaultError({
1026
944
  output,
1027
945
  parsedBody,
1028
- exceptionCtor: MediaStoreServiceException_1.MediaStoreServiceException,
1029
946
  errorCode,
1030
947
  });
1031
948
  }
@@ -1036,12 +953,12 @@ const de_UntagResourceCommand = async (output, context) => {
1036
953
  }
1037
954
  const data = await parseBody(output.body, context);
1038
955
  let contents = {};
1039
- contents = de_UntagResourceOutput(data, context);
956
+ contents = (0, smithy_client_1._json)(data);
1040
957
  const response = {
1041
958
  $metadata: deserializeMetadata(output),
1042
959
  ...contents,
1043
960
  };
1044
- return Promise.resolve(response);
961
+ return response;
1045
962
  };
1046
963
  exports.de_UntagResourceCommand = de_UntagResourceCommand;
1047
964
  const de_UntagResourceCommandError = async (output, context) => {
@@ -1062,17 +979,16 @@ const de_UntagResourceCommandError = async (output, context) => {
1062
979
  throw await de_InternalServerErrorRes(parsedOutput, context);
1063
980
  default:
1064
981
  const parsedBody = parsedOutput.body;
1065
- (0, smithy_client_1.throwDefaultError)({
982
+ return throwDefaultError({
1066
983
  output,
1067
984
  parsedBody,
1068
- exceptionCtor: MediaStoreServiceException_1.MediaStoreServiceException,
1069
985
  errorCode,
1070
986
  });
1071
987
  }
1072
988
  };
1073
989
  const de_ContainerInUseExceptionRes = async (parsedOutput, context) => {
1074
990
  const body = parsedOutput.body;
1075
- const deserialized = de_ContainerInUseException(body, context);
991
+ const deserialized = (0, smithy_client_1._json)(body);
1076
992
  const exception = new models_0_1.ContainerInUseException({
1077
993
  $metadata: deserializeMetadata(parsedOutput),
1078
994
  ...deserialized,
@@ -1081,7 +997,7 @@ const de_ContainerInUseExceptionRes = async (parsedOutput, context) => {
1081
997
  };
1082
998
  const de_ContainerNotFoundExceptionRes = async (parsedOutput, context) => {
1083
999
  const body = parsedOutput.body;
1084
- const deserialized = de_ContainerNotFoundException(body, context);
1000
+ const deserialized = (0, smithy_client_1._json)(body);
1085
1001
  const exception = new models_0_1.ContainerNotFoundException({
1086
1002
  $metadata: deserializeMetadata(parsedOutput),
1087
1003
  ...deserialized,
@@ -1090,7 +1006,7 @@ const de_ContainerNotFoundExceptionRes = async (parsedOutput, context) => {
1090
1006
  };
1091
1007
  const de_CorsPolicyNotFoundExceptionRes = async (parsedOutput, context) => {
1092
1008
  const body = parsedOutput.body;
1093
- const deserialized = de_CorsPolicyNotFoundException(body, context);
1009
+ const deserialized = (0, smithy_client_1._json)(body);
1094
1010
  const exception = new models_0_1.CorsPolicyNotFoundException({
1095
1011
  $metadata: deserializeMetadata(parsedOutput),
1096
1012
  ...deserialized,
@@ -1099,7 +1015,7 @@ const de_CorsPolicyNotFoundExceptionRes = async (parsedOutput, context) => {
1099
1015
  };
1100
1016
  const de_InternalServerErrorRes = async (parsedOutput, context) => {
1101
1017
  const body = parsedOutput.body;
1102
- const deserialized = de_InternalServerError(body, context);
1018
+ const deserialized = (0, smithy_client_1._json)(body);
1103
1019
  const exception = new models_0_1.InternalServerError({
1104
1020
  $metadata: deserializeMetadata(parsedOutput),
1105
1021
  ...deserialized,
@@ -1108,7 +1024,7 @@ const de_InternalServerErrorRes = async (parsedOutput, context) => {
1108
1024
  };
1109
1025
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1110
1026
  const body = parsedOutput.body;
1111
- const deserialized = de_LimitExceededException(body, context);
1027
+ const deserialized = (0, smithy_client_1._json)(body);
1112
1028
  const exception = new models_0_1.LimitExceededException({
1113
1029
  $metadata: deserializeMetadata(parsedOutput),
1114
1030
  ...deserialized,
@@ -1117,447 +1033,46 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1117
1033
  };
1118
1034
  const de_PolicyNotFoundExceptionRes = async (parsedOutput, context) => {
1119
1035
  const body = parsedOutput.body;
1120
- const deserialized = de_PolicyNotFoundException(body, context);
1036
+ const deserialized = (0, smithy_client_1._json)(body);
1121
1037
  const exception = new models_0_1.PolicyNotFoundException({
1122
1038
  $metadata: deserializeMetadata(parsedOutput),
1123
1039
  ...deserialized,
1124
1040
  });
1125
1041
  return (0, smithy_client_1.decorateServiceException)(exception, body);
1126
1042
  };
1127
- const se_AllowedHeaders = (input, context) => {
1128
- return input
1129
- .filter((e) => e != null)
1130
- .map((entry) => {
1131
- return entry;
1132
- });
1133
- };
1134
- const se_AllowedMethods = (input, context) => {
1135
- return input
1136
- .filter((e) => e != null)
1137
- .map((entry) => {
1138
- return entry;
1139
- });
1140
- };
1141
- const se_AllowedOrigins = (input, context) => {
1142
- return input
1143
- .filter((e) => e != null)
1144
- .map((entry) => {
1145
- return entry;
1146
- });
1147
- };
1148
- const se_CorsPolicy = (input, context) => {
1149
- return input
1150
- .filter((e) => e != null)
1151
- .map((entry) => {
1152
- return se_CorsRule(entry, context);
1153
- });
1154
- };
1155
- const se_CorsRule = (input, context) => {
1156
- return {
1157
- ...(input.AllowedHeaders != null && { AllowedHeaders: se_AllowedHeaders(input.AllowedHeaders, context) }),
1158
- ...(input.AllowedMethods != null && { AllowedMethods: se_AllowedMethods(input.AllowedMethods, context) }),
1159
- ...(input.AllowedOrigins != null && { AllowedOrigins: se_AllowedOrigins(input.AllowedOrigins, context) }),
1160
- ...(input.ExposeHeaders != null && { ExposeHeaders: se_ExposeHeaders(input.ExposeHeaders, context) }),
1161
- ...(input.MaxAgeSeconds != null && { MaxAgeSeconds: input.MaxAgeSeconds }),
1162
- };
1163
- };
1164
- const se_CreateContainerInput = (input, context) => {
1165
- return {
1166
- ...(input.ContainerName != null && { ContainerName: input.ContainerName }),
1167
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1168
- };
1169
- };
1170
- const se_DeleteContainerInput = (input, context) => {
1171
- return {
1172
- ...(input.ContainerName != null && { ContainerName: input.ContainerName }),
1173
- };
1174
- };
1175
- const se_DeleteContainerPolicyInput = (input, context) => {
1176
- return {
1177
- ...(input.ContainerName != null && { ContainerName: input.ContainerName }),
1178
- };
1179
- };
1180
- const se_DeleteCorsPolicyInput = (input, context) => {
1181
- return {
1182
- ...(input.ContainerName != null && { ContainerName: input.ContainerName }),
1183
- };
1184
- };
1185
- const se_DeleteLifecyclePolicyInput = (input, context) => {
1186
- return {
1187
- ...(input.ContainerName != null && { ContainerName: input.ContainerName }),
1188
- };
1189
- };
1190
- const se_DeleteMetricPolicyInput = (input, context) => {
1191
- return {
1192
- ...(input.ContainerName != null && { ContainerName: input.ContainerName }),
1193
- };
1194
- };
1195
- const se_DescribeContainerInput = (input, context) => {
1196
- return {
1197
- ...(input.ContainerName != null && { ContainerName: input.ContainerName }),
1198
- };
1199
- };
1200
- const se_ExposeHeaders = (input, context) => {
1201
- return input
1202
- .filter((e) => e != null)
1203
- .map((entry) => {
1204
- return entry;
1205
- });
1206
- };
1207
- const se_GetContainerPolicyInput = (input, context) => {
1208
- return {
1209
- ...(input.ContainerName != null && { ContainerName: input.ContainerName }),
1210
- };
1211
- };
1212
- const se_GetCorsPolicyInput = (input, context) => {
1213
- return {
1214
- ...(input.ContainerName != null && { ContainerName: input.ContainerName }),
1215
- };
1216
- };
1217
- const se_GetLifecyclePolicyInput = (input, context) => {
1218
- return {
1219
- ...(input.ContainerName != null && { ContainerName: input.ContainerName }),
1220
- };
1221
- };
1222
- const se_GetMetricPolicyInput = (input, context) => {
1223
- return {
1224
- ...(input.ContainerName != null && { ContainerName: input.ContainerName }),
1225
- };
1226
- };
1227
- const se_ListContainersInput = (input, context) => {
1228
- return {
1229
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1230
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1231
- };
1232
- };
1233
- const se_ListTagsForResourceInput = (input, context) => {
1234
- return {
1235
- ...(input.Resource != null && { Resource: input.Resource }),
1236
- };
1237
- };
1238
- const se_MetricPolicy = (input, context) => {
1239
- return {
1240
- ...(input.ContainerLevelMetrics != null && { ContainerLevelMetrics: input.ContainerLevelMetrics }),
1241
- ...(input.MetricPolicyRules != null && {
1242
- MetricPolicyRules: se_MetricPolicyRules(input.MetricPolicyRules, context),
1243
- }),
1244
- };
1245
- };
1246
- const se_MetricPolicyRule = (input, context) => {
1247
- return {
1248
- ...(input.ObjectGroup != null && { ObjectGroup: input.ObjectGroup }),
1249
- ...(input.ObjectGroupName != null && { ObjectGroupName: input.ObjectGroupName }),
1250
- };
1251
- };
1252
- const se_MetricPolicyRules = (input, context) => {
1253
- return input
1254
- .filter((e) => e != null)
1255
- .map((entry) => {
1256
- return se_MetricPolicyRule(entry, context);
1257
- });
1258
- };
1259
- const se_PutContainerPolicyInput = (input, context) => {
1260
- return {
1261
- ...(input.ContainerName != null && { ContainerName: input.ContainerName }),
1262
- ...(input.Policy != null && { Policy: input.Policy }),
1263
- };
1264
- };
1265
- const se_PutCorsPolicyInput = (input, context) => {
1266
- return {
1267
- ...(input.ContainerName != null && { ContainerName: input.ContainerName }),
1268
- ...(input.CorsPolicy != null && { CorsPolicy: se_CorsPolicy(input.CorsPolicy, context) }),
1269
- };
1270
- };
1271
- const se_PutLifecyclePolicyInput = (input, context) => {
1272
- return {
1273
- ...(input.ContainerName != null && { ContainerName: input.ContainerName }),
1274
- ...(input.LifecyclePolicy != null && { LifecyclePolicy: input.LifecyclePolicy }),
1275
- };
1276
- };
1277
- const se_PutMetricPolicyInput = (input, context) => {
1278
- return {
1279
- ...(input.ContainerName != null && { ContainerName: input.ContainerName }),
1280
- ...(input.MetricPolicy != null && { MetricPolicy: se_MetricPolicy(input.MetricPolicy, context) }),
1281
- };
1282
- };
1283
- const se_StartAccessLoggingInput = (input, context) => {
1284
- return {
1285
- ...(input.ContainerName != null && { ContainerName: input.ContainerName }),
1286
- };
1287
- };
1288
- const se_StopAccessLoggingInput = (input, context) => {
1289
- return {
1290
- ...(input.ContainerName != null && { ContainerName: input.ContainerName }),
1291
- };
1292
- };
1293
- const se_Tag = (input, context) => {
1294
- return {
1295
- ...(input.Key != null && { Key: input.Key }),
1296
- ...(input.Value != null && { Value: input.Value }),
1297
- };
1298
- };
1299
- const se_TagKeyList = (input, context) => {
1300
- return input
1301
- .filter((e) => e != null)
1302
- .map((entry) => {
1303
- return entry;
1304
- });
1305
- };
1306
- const se_TagList = (input, context) => {
1307
- return input
1308
- .filter((e) => e != null)
1309
- .map((entry) => {
1310
- return se_Tag(entry, context);
1311
- });
1312
- };
1313
- const se_TagResourceInput = (input, context) => {
1314
- return {
1315
- ...(input.Resource != null && { Resource: input.Resource }),
1316
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1317
- };
1318
- };
1319
- const se_UntagResourceInput = (input, context) => {
1320
- return {
1321
- ...(input.Resource != null && { Resource: input.Resource }),
1322
- ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }),
1323
- };
1324
- };
1325
- const de_AllowedHeaders = (output, context) => {
1326
- const retVal = (output || [])
1327
- .filter((e) => e != null)
1328
- .map((entry) => {
1329
- if (entry === null) {
1330
- return null;
1331
- }
1332
- return (0, smithy_client_1.expectString)(entry);
1333
- });
1334
- return retVal;
1335
- };
1336
- const de_AllowedMethods = (output, context) => {
1337
- const retVal = (output || [])
1338
- .filter((e) => e != null)
1339
- .map((entry) => {
1340
- if (entry === null) {
1341
- return null;
1342
- }
1343
- return (0, smithy_client_1.expectString)(entry);
1344
- });
1345
- return retVal;
1346
- };
1347
- const de_AllowedOrigins = (output, context) => {
1348
- const retVal = (output || [])
1349
- .filter((e) => e != null)
1350
- .map((entry) => {
1351
- if (entry === null) {
1352
- return null;
1353
- }
1354
- return (0, smithy_client_1.expectString)(entry);
1355
- });
1356
- return retVal;
1357
- };
1358
1043
  const de_Container = (output, context) => {
1359
- return {
1360
- ARN: (0, smithy_client_1.expectString)(output.ARN),
1361
- AccessLoggingEnabled: (0, smithy_client_1.expectBoolean)(output.AccessLoggingEnabled),
1362
- CreationTime: output.CreationTime != null
1363
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
1364
- : undefined,
1365
- Endpoint: (0, smithy_client_1.expectString)(output.Endpoint),
1366
- Name: (0, smithy_client_1.expectString)(output.Name),
1367
- Status: (0, smithy_client_1.expectString)(output.Status),
1368
- };
1369
- };
1370
- const de_ContainerInUseException = (output, context) => {
1371
- return {
1372
- Message: (0, smithy_client_1.expectString)(output.Message),
1373
- };
1044
+ return (0, smithy_client_1.take)(output, {
1045
+ ARN: smithy_client_1.expectString,
1046
+ AccessLoggingEnabled: smithy_client_1.expectBoolean,
1047
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1048
+ Endpoint: smithy_client_1.expectString,
1049
+ Name: smithy_client_1.expectString,
1050
+ Status: smithy_client_1.expectString,
1051
+ });
1374
1052
  };
1375
1053
  const de_ContainerList = (output, context) => {
1376
1054
  const retVal = (output || [])
1377
1055
  .filter((e) => e != null)
1378
1056
  .map((entry) => {
1379
- if (entry === null) {
1380
- return null;
1381
- }
1382
1057
  return de_Container(entry, context);
1383
1058
  });
1384
1059
  return retVal;
1385
1060
  };
1386
- const de_ContainerNotFoundException = (output, context) => {
1387
- return {
1388
- Message: (0, smithy_client_1.expectString)(output.Message),
1389
- };
1390
- };
1391
- const de_CorsPolicy = (output, context) => {
1392
- const retVal = (output || [])
1393
- .filter((e) => e != null)
1394
- .map((entry) => {
1395
- if (entry === null) {
1396
- return null;
1397
- }
1398
- return de_CorsRule(entry, context);
1399
- });
1400
- return retVal;
1401
- };
1402
- const de_CorsPolicyNotFoundException = (output, context) => {
1403
- return {
1404
- Message: (0, smithy_client_1.expectString)(output.Message),
1405
- };
1406
- };
1407
- const de_CorsRule = (output, context) => {
1408
- return {
1409
- AllowedHeaders: output.AllowedHeaders != null ? de_AllowedHeaders(output.AllowedHeaders, context) : undefined,
1410
- AllowedMethods: output.AllowedMethods != null ? de_AllowedMethods(output.AllowedMethods, context) : undefined,
1411
- AllowedOrigins: output.AllowedOrigins != null ? de_AllowedOrigins(output.AllowedOrigins, context) : undefined,
1412
- ExposeHeaders: output.ExposeHeaders != null ? de_ExposeHeaders(output.ExposeHeaders, context) : undefined,
1413
- MaxAgeSeconds: (0, smithy_client_1.expectInt32)(output.MaxAgeSeconds),
1414
- };
1415
- };
1416
1061
  const de_CreateContainerOutput = (output, context) => {
1417
- return {
1418
- Container: output.Container != null ? de_Container(output.Container, context) : undefined,
1419
- };
1420
- };
1421
- const de_DeleteContainerOutput = (output, context) => {
1422
- return {};
1423
- };
1424
- const de_DeleteContainerPolicyOutput = (output, context) => {
1425
- return {};
1426
- };
1427
- const de_DeleteCorsPolicyOutput = (output, context) => {
1428
- return {};
1429
- };
1430
- const de_DeleteLifecyclePolicyOutput = (output, context) => {
1431
- return {};
1432
- };
1433
- const de_DeleteMetricPolicyOutput = (output, context) => {
1434
- return {};
1062
+ return (0, smithy_client_1.take)(output, {
1063
+ Container: (_) => de_Container(_, context),
1064
+ });
1435
1065
  };
1436
1066
  const de_DescribeContainerOutput = (output, context) => {
1437
- return {
1438
- Container: output.Container != null ? de_Container(output.Container, context) : undefined,
1439
- };
1440
- };
1441
- const de_ExposeHeaders = (output, context) => {
1442
- const retVal = (output || [])
1443
- .filter((e) => e != null)
1444
- .map((entry) => {
1445
- if (entry === null) {
1446
- return null;
1447
- }
1448
- return (0, smithy_client_1.expectString)(entry);
1067
+ return (0, smithy_client_1.take)(output, {
1068
+ Container: (_) => de_Container(_, context),
1449
1069
  });
1450
- return retVal;
1451
- };
1452
- const de_GetContainerPolicyOutput = (output, context) => {
1453
- return {
1454
- Policy: (0, smithy_client_1.expectString)(output.Policy),
1455
- };
1456
- };
1457
- const de_GetCorsPolicyOutput = (output, context) => {
1458
- return {
1459
- CorsPolicy: output.CorsPolicy != null ? de_CorsPolicy(output.CorsPolicy, context) : undefined,
1460
- };
1461
- };
1462
- const de_GetLifecyclePolicyOutput = (output, context) => {
1463
- return {
1464
- LifecyclePolicy: (0, smithy_client_1.expectString)(output.LifecyclePolicy),
1465
- };
1466
- };
1467
- const de_GetMetricPolicyOutput = (output, context) => {
1468
- return {
1469
- MetricPolicy: output.MetricPolicy != null ? de_MetricPolicy(output.MetricPolicy, context) : undefined,
1470
- };
1471
- };
1472
- const de_InternalServerError = (output, context) => {
1473
- return {
1474
- Message: (0, smithy_client_1.expectString)(output.Message),
1475
- };
1476
- };
1477
- const de_LimitExceededException = (output, context) => {
1478
- return {
1479
- Message: (0, smithy_client_1.expectString)(output.Message),
1480
- };
1481
1070
  };
1482
1071
  const de_ListContainersOutput = (output, context) => {
1483
- return {
1484
- Containers: output.Containers != null ? de_ContainerList(output.Containers, context) : undefined,
1485
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1486
- };
1487
- };
1488
- const de_ListTagsForResourceOutput = (output, context) => {
1489
- return {
1490
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
1491
- };
1492
- };
1493
- const de_MetricPolicy = (output, context) => {
1494
- return {
1495
- ContainerLevelMetrics: (0, smithy_client_1.expectString)(output.ContainerLevelMetrics),
1496
- MetricPolicyRules: output.MetricPolicyRules != null ? de_MetricPolicyRules(output.MetricPolicyRules, context) : undefined,
1497
- };
1498
- };
1499
- const de_MetricPolicyRule = (output, context) => {
1500
- return {
1501
- ObjectGroup: (0, smithy_client_1.expectString)(output.ObjectGroup),
1502
- ObjectGroupName: (0, smithy_client_1.expectString)(output.ObjectGroupName),
1503
- };
1504
- };
1505
- const de_MetricPolicyRules = (output, context) => {
1506
- const retVal = (output || [])
1507
- .filter((e) => e != null)
1508
- .map((entry) => {
1509
- if (entry === null) {
1510
- return null;
1511
- }
1512
- return de_MetricPolicyRule(entry, context);
1072
+ return (0, smithy_client_1.take)(output, {
1073
+ Containers: (_) => de_ContainerList(_, context),
1074
+ NextToken: smithy_client_1.expectString,
1513
1075
  });
1514
- return retVal;
1515
- };
1516
- const de_PolicyNotFoundException = (output, context) => {
1517
- return {
1518
- Message: (0, smithy_client_1.expectString)(output.Message),
1519
- };
1520
- };
1521
- const de_PutContainerPolicyOutput = (output, context) => {
1522
- return {};
1523
- };
1524
- const de_PutCorsPolicyOutput = (output, context) => {
1525
- return {};
1526
- };
1527
- const de_PutLifecyclePolicyOutput = (output, context) => {
1528
- return {};
1529
- };
1530
- const de_PutMetricPolicyOutput = (output, context) => {
1531
- return {};
1532
- };
1533
- const de_StartAccessLoggingOutput = (output, context) => {
1534
- return {};
1535
- };
1536
- const de_StopAccessLoggingOutput = (output, context) => {
1537
- return {};
1538
- };
1539
- const de_Tag = (output, context) => {
1540
- return {
1541
- Key: (0, smithy_client_1.expectString)(output.Key),
1542
- Value: (0, smithy_client_1.expectString)(output.Value),
1543
- };
1544
- };
1545
- const de_TagList = (output, context) => {
1546
- const retVal = (output || [])
1547
- .filter((e) => e != null)
1548
- .map((entry) => {
1549
- if (entry === null) {
1550
- return null;
1551
- }
1552
- return de_Tag(entry, context);
1553
- });
1554
- return retVal;
1555
- };
1556
- const de_TagResourceOutput = (output, context) => {
1557
- return {};
1558
- };
1559
- const de_UntagResourceOutput = (output, context) => {
1560
- return {};
1561
1076
  };
1562
1077
  const deserializeMetadata = (output) => ({
1563
1078
  httpStatusCode: output.statusCode,
@@ -1572,6 +1087,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
1572
1087
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1573
1088
  };
1574
1089
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1090
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(MediaStoreServiceException_1.MediaStoreServiceException);
1575
1091
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1576
1092
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1577
1093
  const contents = {
@@ -1590,6 +1106,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
1590
1106
  }
1591
1107
  return new protocol_http_1.HttpRequest(contents);
1592
1108
  };
1109
+ function sharedHeaders(operation) {
1110
+ return {
1111
+ "content-type": "application/x-amz-json-1.1",
1112
+ "x-amz-target": `MediaStore_20170901.${operation}`,
1113
+ };
1114
+ }
1593
1115
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1594
1116
  if (encoded.length) {
1595
1117
  return JSON.parse(encoded);