@aws-sdk/client-ivs 3.474.0 → 3.477.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.
@@ -2,79 +2,58 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_ListRecordingConfigurationsCommand = exports.de_ListPlaybackKeyPairsCommand = exports.de_ListChannelsCommand = exports.de_ImportPlaybackKeyPairCommand = exports.de_GetStreamSessionCommand = exports.de_GetStreamKeyCommand = exports.de_GetStreamCommand = exports.de_GetRecordingConfigurationCommand = exports.de_GetPlaybackKeyPairCommand = exports.de_GetChannelCommand = exports.de_DeleteStreamKeyCommand = exports.de_DeleteRecordingConfigurationCommand = exports.de_DeletePlaybackKeyPairCommand = exports.de_DeleteChannelCommand = exports.de_CreateStreamKeyCommand = exports.de_CreateRecordingConfigurationCommand = exports.de_CreateChannelCommand = exports.de_BatchStartViewerSessionRevocationCommand = exports.de_BatchGetStreamKeyCommand = exports.de_BatchGetChannelCommand = exports.se_UpdateChannelCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopStreamCommand = exports.se_StartViewerSessionRevocationCommand = exports.se_PutMetadataCommand = exports.se_ListTagsForResourceCommand = exports.se_ListStreamSessionsCommand = exports.se_ListStreamsCommand = exports.se_ListStreamKeysCommand = exports.se_ListRecordingConfigurationsCommand = exports.se_ListPlaybackKeyPairsCommand = exports.se_ListChannelsCommand = exports.se_ImportPlaybackKeyPairCommand = exports.se_GetStreamSessionCommand = exports.se_GetStreamKeyCommand = exports.se_GetStreamCommand = exports.se_GetRecordingConfigurationCommand = exports.se_GetPlaybackKeyPairCommand = exports.se_GetChannelCommand = exports.se_DeleteStreamKeyCommand = exports.se_DeleteRecordingConfigurationCommand = exports.se_DeletePlaybackKeyPairCommand = exports.se_DeleteChannelCommand = exports.se_CreateStreamKeyCommand = exports.se_CreateRecordingConfigurationCommand = exports.se_CreateChannelCommand = exports.se_BatchStartViewerSessionRevocationCommand = exports.se_BatchGetStreamKeyCommand = exports.se_BatchGetChannelCommand = void 0;
4
4
  exports.de_UpdateChannelCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopStreamCommand = exports.de_StartViewerSessionRevocationCommand = exports.de_PutMetadataCommand = exports.de_ListTagsForResourceCommand = exports.de_ListStreamSessionsCommand = exports.de_ListStreamsCommand = exports.de_ListStreamKeysCommand = void 0;
5
- const protocol_http_1 = require("@smithy/protocol-http");
5
+ const core_1 = require("@smithy/core");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  const IvsServiceException_1 = require("../models/IvsServiceException");
8
8
  const models_0_1 = require("../models/models_0");
9
9
  const se_BatchGetChannelCommand = async (input, context) => {
10
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
+ const b = (0, core_1.requestBuilder)(input, context);
11
11
  const headers = {
12
12
  "content-type": "application/json",
13
13
  };
14
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BatchGetChannel";
14
+ b.bp("/BatchGetChannel");
15
15
  let body;
16
16
  body = JSON.stringify((0, smithy_client_1.take)(input, {
17
17
  arns: (_) => (0, smithy_client_1._json)(_),
18
18
  }));
19
- return new protocol_http_1.HttpRequest({
20
- protocol,
21
- hostname,
22
- port,
23
- method: "POST",
24
- headers,
25
- path: resolvedPath,
26
- body,
27
- });
19
+ b.m("POST").h(headers).b(body);
20
+ return b.build();
28
21
  };
29
22
  exports.se_BatchGetChannelCommand = se_BatchGetChannelCommand;
30
23
  const se_BatchGetStreamKeyCommand = async (input, context) => {
31
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
24
+ const b = (0, core_1.requestBuilder)(input, context);
32
25
  const headers = {
33
26
  "content-type": "application/json",
34
27
  };
35
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BatchGetStreamKey";
28
+ b.bp("/BatchGetStreamKey");
36
29
  let body;
37
30
  body = JSON.stringify((0, smithy_client_1.take)(input, {
38
31
  arns: (_) => (0, smithy_client_1._json)(_),
39
32
  }));
40
- return new protocol_http_1.HttpRequest({
41
- protocol,
42
- hostname,
43
- port,
44
- method: "POST",
45
- headers,
46
- path: resolvedPath,
47
- body,
48
- });
33
+ b.m("POST").h(headers).b(body);
34
+ return b.build();
49
35
  };
50
36
  exports.se_BatchGetStreamKeyCommand = se_BatchGetStreamKeyCommand;
51
37
  const se_BatchStartViewerSessionRevocationCommand = async (input, context) => {
52
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
38
+ const b = (0, core_1.requestBuilder)(input, context);
53
39
  const headers = {
54
40
  "content-type": "application/json",
55
41
  };
56
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BatchStartViewerSessionRevocation";
42
+ b.bp("/BatchStartViewerSessionRevocation");
57
43
  let body;
58
44
  body = JSON.stringify((0, smithy_client_1.take)(input, {
59
45
  viewerSessions: (_) => (0, smithy_client_1._json)(_),
60
46
  }));
61
- return new protocol_http_1.HttpRequest({
62
- protocol,
63
- hostname,
64
- port,
65
- method: "POST",
66
- headers,
67
- path: resolvedPath,
68
- body,
69
- });
47
+ b.m("POST").h(headers).b(body);
48
+ return b.build();
70
49
  };
71
50
  exports.se_BatchStartViewerSessionRevocationCommand = se_BatchStartViewerSessionRevocationCommand;
72
51
  const se_CreateChannelCommand = async (input, context) => {
73
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
52
+ const b = (0, core_1.requestBuilder)(input, context);
74
53
  const headers = {
75
54
  "content-type": "application/json",
76
55
  };
77
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateChannel";
56
+ b.bp("/CreateChannel");
78
57
  let body;
79
58
  body = JSON.stringify((0, smithy_client_1.take)(input, {
80
59
  authorized: [],
@@ -86,23 +65,16 @@ const se_CreateChannelCommand = async (input, context) => {
86
65
  tags: (_) => (0, smithy_client_1._json)(_),
87
66
  type: [],
88
67
  }));
89
- return new protocol_http_1.HttpRequest({
90
- protocol,
91
- hostname,
92
- port,
93
- method: "POST",
94
- headers,
95
- path: resolvedPath,
96
- body,
97
- });
68
+ b.m("POST").h(headers).b(body);
69
+ return b.build();
98
70
  };
99
71
  exports.se_CreateChannelCommand = se_CreateChannelCommand;
100
72
  const se_CreateRecordingConfigurationCommand = async (input, context) => {
101
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
73
+ const b = (0, core_1.requestBuilder)(input, context);
102
74
  const headers = {
103
75
  "content-type": "application/json",
104
76
  };
105
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateRecordingConfiguration";
77
+ b.bp("/CreateRecordingConfiguration");
106
78
  let body;
107
79
  body = JSON.stringify((0, smithy_client_1.take)(input, {
108
80
  destinationConfiguration: (_) => (0, smithy_client_1._json)(_),
@@ -112,279 +84,188 @@ const se_CreateRecordingConfigurationCommand = async (input, context) => {
112
84
  tags: (_) => (0, smithy_client_1._json)(_),
113
85
  thumbnailConfiguration: (_) => (0, smithy_client_1._json)(_),
114
86
  }));
115
- return new protocol_http_1.HttpRequest({
116
- protocol,
117
- hostname,
118
- port,
119
- method: "POST",
120
- headers,
121
- path: resolvedPath,
122
- body,
123
- });
87
+ b.m("POST").h(headers).b(body);
88
+ return b.build();
124
89
  };
125
90
  exports.se_CreateRecordingConfigurationCommand = se_CreateRecordingConfigurationCommand;
126
91
  const se_CreateStreamKeyCommand = async (input, context) => {
127
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
92
+ const b = (0, core_1.requestBuilder)(input, context);
128
93
  const headers = {
129
94
  "content-type": "application/json",
130
95
  };
131
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateStreamKey";
96
+ b.bp("/CreateStreamKey");
132
97
  let body;
133
98
  body = JSON.stringify((0, smithy_client_1.take)(input, {
134
99
  channelArn: [],
135
100
  tags: (_) => (0, smithy_client_1._json)(_),
136
101
  }));
137
- return new protocol_http_1.HttpRequest({
138
- protocol,
139
- hostname,
140
- port,
141
- method: "POST",
142
- headers,
143
- path: resolvedPath,
144
- body,
145
- });
102
+ b.m("POST").h(headers).b(body);
103
+ return b.build();
146
104
  };
147
105
  exports.se_CreateStreamKeyCommand = se_CreateStreamKeyCommand;
148
106
  const se_DeleteChannelCommand = async (input, context) => {
149
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
107
+ const b = (0, core_1.requestBuilder)(input, context);
150
108
  const headers = {
151
109
  "content-type": "application/json",
152
110
  };
153
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteChannel";
111
+ b.bp("/DeleteChannel");
154
112
  let body;
155
113
  body = JSON.stringify((0, smithy_client_1.take)(input, {
156
114
  arn: [],
157
115
  }));
158
- return new protocol_http_1.HttpRequest({
159
- protocol,
160
- hostname,
161
- port,
162
- method: "POST",
163
- headers,
164
- path: resolvedPath,
165
- body,
166
- });
116
+ b.m("POST").h(headers).b(body);
117
+ return b.build();
167
118
  };
168
119
  exports.se_DeleteChannelCommand = se_DeleteChannelCommand;
169
120
  const se_DeletePlaybackKeyPairCommand = async (input, context) => {
170
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
121
+ const b = (0, core_1.requestBuilder)(input, context);
171
122
  const headers = {
172
123
  "content-type": "application/json",
173
124
  };
174
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeletePlaybackKeyPair";
125
+ b.bp("/DeletePlaybackKeyPair");
175
126
  let body;
176
127
  body = JSON.stringify((0, smithy_client_1.take)(input, {
177
128
  arn: [],
178
129
  }));
179
- return new protocol_http_1.HttpRequest({
180
- protocol,
181
- hostname,
182
- port,
183
- method: "POST",
184
- headers,
185
- path: resolvedPath,
186
- body,
187
- });
130
+ b.m("POST").h(headers).b(body);
131
+ return b.build();
188
132
  };
189
133
  exports.se_DeletePlaybackKeyPairCommand = se_DeletePlaybackKeyPairCommand;
190
134
  const se_DeleteRecordingConfigurationCommand = async (input, context) => {
191
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
135
+ const b = (0, core_1.requestBuilder)(input, context);
192
136
  const headers = {
193
137
  "content-type": "application/json",
194
138
  };
195
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteRecordingConfiguration";
139
+ b.bp("/DeleteRecordingConfiguration");
196
140
  let body;
197
141
  body = JSON.stringify((0, smithy_client_1.take)(input, {
198
142
  arn: [],
199
143
  }));
200
- return new protocol_http_1.HttpRequest({
201
- protocol,
202
- hostname,
203
- port,
204
- method: "POST",
205
- headers,
206
- path: resolvedPath,
207
- body,
208
- });
144
+ b.m("POST").h(headers).b(body);
145
+ return b.build();
209
146
  };
210
147
  exports.se_DeleteRecordingConfigurationCommand = se_DeleteRecordingConfigurationCommand;
211
148
  const se_DeleteStreamKeyCommand = async (input, context) => {
212
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
149
+ const b = (0, core_1.requestBuilder)(input, context);
213
150
  const headers = {
214
151
  "content-type": "application/json",
215
152
  };
216
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteStreamKey";
153
+ b.bp("/DeleteStreamKey");
217
154
  let body;
218
155
  body = JSON.stringify((0, smithy_client_1.take)(input, {
219
156
  arn: [],
220
157
  }));
221
- return new protocol_http_1.HttpRequest({
222
- protocol,
223
- hostname,
224
- port,
225
- method: "POST",
226
- headers,
227
- path: resolvedPath,
228
- body,
229
- });
158
+ b.m("POST").h(headers).b(body);
159
+ return b.build();
230
160
  };
231
161
  exports.se_DeleteStreamKeyCommand = se_DeleteStreamKeyCommand;
232
162
  const se_GetChannelCommand = async (input, context) => {
233
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
163
+ const b = (0, core_1.requestBuilder)(input, context);
234
164
  const headers = {
235
165
  "content-type": "application/json",
236
166
  };
237
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetChannel";
167
+ b.bp("/GetChannel");
238
168
  let body;
239
169
  body = JSON.stringify((0, smithy_client_1.take)(input, {
240
170
  arn: [],
241
171
  }));
242
- return new protocol_http_1.HttpRequest({
243
- protocol,
244
- hostname,
245
- port,
246
- method: "POST",
247
- headers,
248
- path: resolvedPath,
249
- body,
250
- });
172
+ b.m("POST").h(headers).b(body);
173
+ return b.build();
251
174
  };
252
175
  exports.se_GetChannelCommand = se_GetChannelCommand;
253
176
  const se_GetPlaybackKeyPairCommand = async (input, context) => {
254
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
177
+ const b = (0, core_1.requestBuilder)(input, context);
255
178
  const headers = {
256
179
  "content-type": "application/json",
257
180
  };
258
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetPlaybackKeyPair";
181
+ b.bp("/GetPlaybackKeyPair");
259
182
  let body;
260
183
  body = JSON.stringify((0, smithy_client_1.take)(input, {
261
184
  arn: [],
262
185
  }));
263
- return new protocol_http_1.HttpRequest({
264
- protocol,
265
- hostname,
266
- port,
267
- method: "POST",
268
- headers,
269
- path: resolvedPath,
270
- body,
271
- });
186
+ b.m("POST").h(headers).b(body);
187
+ return b.build();
272
188
  };
273
189
  exports.se_GetPlaybackKeyPairCommand = se_GetPlaybackKeyPairCommand;
274
190
  const se_GetRecordingConfigurationCommand = async (input, context) => {
275
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
191
+ const b = (0, core_1.requestBuilder)(input, context);
276
192
  const headers = {
277
193
  "content-type": "application/json",
278
194
  };
279
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetRecordingConfiguration";
195
+ b.bp("/GetRecordingConfiguration");
280
196
  let body;
281
197
  body = JSON.stringify((0, smithy_client_1.take)(input, {
282
198
  arn: [],
283
199
  }));
284
- return new protocol_http_1.HttpRequest({
285
- protocol,
286
- hostname,
287
- port,
288
- method: "POST",
289
- headers,
290
- path: resolvedPath,
291
- body,
292
- });
200
+ b.m("POST").h(headers).b(body);
201
+ return b.build();
293
202
  };
294
203
  exports.se_GetRecordingConfigurationCommand = se_GetRecordingConfigurationCommand;
295
204
  const se_GetStreamCommand = async (input, context) => {
296
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
205
+ const b = (0, core_1.requestBuilder)(input, context);
297
206
  const headers = {
298
207
  "content-type": "application/json",
299
208
  };
300
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetStream";
209
+ b.bp("/GetStream");
301
210
  let body;
302
211
  body = JSON.stringify((0, smithy_client_1.take)(input, {
303
212
  channelArn: [],
304
213
  }));
305
- return new protocol_http_1.HttpRequest({
306
- protocol,
307
- hostname,
308
- port,
309
- method: "POST",
310
- headers,
311
- path: resolvedPath,
312
- body,
313
- });
214
+ b.m("POST").h(headers).b(body);
215
+ return b.build();
314
216
  };
315
217
  exports.se_GetStreamCommand = se_GetStreamCommand;
316
218
  const se_GetStreamKeyCommand = async (input, context) => {
317
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
219
+ const b = (0, core_1.requestBuilder)(input, context);
318
220
  const headers = {
319
221
  "content-type": "application/json",
320
222
  };
321
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetStreamKey";
223
+ b.bp("/GetStreamKey");
322
224
  let body;
323
225
  body = JSON.stringify((0, smithy_client_1.take)(input, {
324
226
  arn: [],
325
227
  }));
326
- return new protocol_http_1.HttpRequest({
327
- protocol,
328
- hostname,
329
- port,
330
- method: "POST",
331
- headers,
332
- path: resolvedPath,
333
- body,
334
- });
228
+ b.m("POST").h(headers).b(body);
229
+ return b.build();
335
230
  };
336
231
  exports.se_GetStreamKeyCommand = se_GetStreamKeyCommand;
337
232
  const se_GetStreamSessionCommand = async (input, context) => {
338
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
233
+ const b = (0, core_1.requestBuilder)(input, context);
339
234
  const headers = {
340
235
  "content-type": "application/json",
341
236
  };
342
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetStreamSession";
237
+ b.bp("/GetStreamSession");
343
238
  let body;
344
239
  body = JSON.stringify((0, smithy_client_1.take)(input, {
345
240
  channelArn: [],
346
241
  streamId: [],
347
242
  }));
348
- return new protocol_http_1.HttpRequest({
349
- protocol,
350
- hostname,
351
- port,
352
- method: "POST",
353
- headers,
354
- path: resolvedPath,
355
- body,
356
- });
243
+ b.m("POST").h(headers).b(body);
244
+ return b.build();
357
245
  };
358
246
  exports.se_GetStreamSessionCommand = se_GetStreamSessionCommand;
359
247
  const se_ImportPlaybackKeyPairCommand = async (input, context) => {
360
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
248
+ const b = (0, core_1.requestBuilder)(input, context);
361
249
  const headers = {
362
250
  "content-type": "application/json",
363
251
  };
364
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ImportPlaybackKeyPair";
252
+ b.bp("/ImportPlaybackKeyPair");
365
253
  let body;
366
254
  body = JSON.stringify((0, smithy_client_1.take)(input, {
367
255
  name: [],
368
256
  publicKeyMaterial: [],
369
257
  tags: (_) => (0, smithy_client_1._json)(_),
370
258
  }));
371
- return new protocol_http_1.HttpRequest({
372
- protocol,
373
- hostname,
374
- port,
375
- method: "POST",
376
- headers,
377
- path: resolvedPath,
378
- body,
379
- });
259
+ b.m("POST").h(headers).b(body);
260
+ return b.build();
380
261
  };
381
262
  exports.se_ImportPlaybackKeyPairCommand = se_ImportPlaybackKeyPairCommand;
382
263
  const se_ListChannelsCommand = async (input, context) => {
383
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
264
+ const b = (0, core_1.requestBuilder)(input, context);
384
265
  const headers = {
385
266
  "content-type": "application/json",
386
267
  };
387
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListChannels";
268
+ b.bp("/ListChannels");
388
269
  let body;
389
270
  body = JSON.stringify((0, smithy_client_1.take)(input, {
390
271
  filterByName: [],
@@ -392,265 +273,180 @@ const se_ListChannelsCommand = async (input, context) => {
392
273
  maxResults: [],
393
274
  nextToken: [],
394
275
  }));
395
- return new protocol_http_1.HttpRequest({
396
- protocol,
397
- hostname,
398
- port,
399
- method: "POST",
400
- headers,
401
- path: resolvedPath,
402
- body,
403
- });
276
+ b.m("POST").h(headers).b(body);
277
+ return b.build();
404
278
  };
405
279
  exports.se_ListChannelsCommand = se_ListChannelsCommand;
406
280
  const se_ListPlaybackKeyPairsCommand = async (input, context) => {
407
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
281
+ const b = (0, core_1.requestBuilder)(input, context);
408
282
  const headers = {
409
283
  "content-type": "application/json",
410
284
  };
411
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListPlaybackKeyPairs";
285
+ b.bp("/ListPlaybackKeyPairs");
412
286
  let body;
413
287
  body = JSON.stringify((0, smithy_client_1.take)(input, {
414
288
  maxResults: [],
415
289
  nextToken: [],
416
290
  }));
417
- return new protocol_http_1.HttpRequest({
418
- protocol,
419
- hostname,
420
- port,
421
- method: "POST",
422
- headers,
423
- path: resolvedPath,
424
- body,
425
- });
291
+ b.m("POST").h(headers).b(body);
292
+ return b.build();
426
293
  };
427
294
  exports.se_ListPlaybackKeyPairsCommand = se_ListPlaybackKeyPairsCommand;
428
295
  const se_ListRecordingConfigurationsCommand = async (input, context) => {
429
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
296
+ const b = (0, core_1.requestBuilder)(input, context);
430
297
  const headers = {
431
298
  "content-type": "application/json",
432
299
  };
433
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListRecordingConfigurations";
300
+ b.bp("/ListRecordingConfigurations");
434
301
  let body;
435
302
  body = JSON.stringify((0, smithy_client_1.take)(input, {
436
303
  maxResults: [],
437
304
  nextToken: [],
438
305
  }));
439
- return new protocol_http_1.HttpRequest({
440
- protocol,
441
- hostname,
442
- port,
443
- method: "POST",
444
- headers,
445
- path: resolvedPath,
446
- body,
447
- });
306
+ b.m("POST").h(headers).b(body);
307
+ return b.build();
448
308
  };
449
309
  exports.se_ListRecordingConfigurationsCommand = se_ListRecordingConfigurationsCommand;
450
310
  const se_ListStreamKeysCommand = async (input, context) => {
451
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
311
+ const b = (0, core_1.requestBuilder)(input, context);
452
312
  const headers = {
453
313
  "content-type": "application/json",
454
314
  };
455
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListStreamKeys";
315
+ b.bp("/ListStreamKeys");
456
316
  let body;
457
317
  body = JSON.stringify((0, smithy_client_1.take)(input, {
458
318
  channelArn: [],
459
319
  maxResults: [],
460
320
  nextToken: [],
461
321
  }));
462
- return new protocol_http_1.HttpRequest({
463
- protocol,
464
- hostname,
465
- port,
466
- method: "POST",
467
- headers,
468
- path: resolvedPath,
469
- body,
470
- });
322
+ b.m("POST").h(headers).b(body);
323
+ return b.build();
471
324
  };
472
325
  exports.se_ListStreamKeysCommand = se_ListStreamKeysCommand;
473
326
  const se_ListStreamsCommand = async (input, context) => {
474
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
327
+ const b = (0, core_1.requestBuilder)(input, context);
475
328
  const headers = {
476
329
  "content-type": "application/json",
477
330
  };
478
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListStreams";
331
+ b.bp("/ListStreams");
479
332
  let body;
480
333
  body = JSON.stringify((0, smithy_client_1.take)(input, {
481
334
  filterBy: (_) => (0, smithy_client_1._json)(_),
482
335
  maxResults: [],
483
336
  nextToken: [],
484
337
  }));
485
- return new protocol_http_1.HttpRequest({
486
- protocol,
487
- hostname,
488
- port,
489
- method: "POST",
490
- headers,
491
- path: resolvedPath,
492
- body,
493
- });
338
+ b.m("POST").h(headers).b(body);
339
+ return b.build();
494
340
  };
495
341
  exports.se_ListStreamsCommand = se_ListStreamsCommand;
496
342
  const se_ListStreamSessionsCommand = async (input, context) => {
497
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
343
+ const b = (0, core_1.requestBuilder)(input, context);
498
344
  const headers = {
499
345
  "content-type": "application/json",
500
346
  };
501
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListStreamSessions";
347
+ b.bp("/ListStreamSessions");
502
348
  let body;
503
349
  body = JSON.stringify((0, smithy_client_1.take)(input, {
504
350
  channelArn: [],
505
351
  maxResults: [],
506
352
  nextToken: [],
507
353
  }));
508
- return new protocol_http_1.HttpRequest({
509
- protocol,
510
- hostname,
511
- port,
512
- method: "POST",
513
- headers,
514
- path: resolvedPath,
515
- body,
516
- });
354
+ b.m("POST").h(headers).b(body);
355
+ return b.build();
517
356
  };
518
357
  exports.se_ListStreamSessionsCommand = se_ListStreamSessionsCommand;
519
358
  const se_ListTagsForResourceCommand = async (input, context) => {
520
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
359
+ const b = (0, core_1.requestBuilder)(input, context);
521
360
  const headers = {};
522
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
523
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
361
+ b.bp("/tags/{resourceArn}");
362
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
524
363
  let body;
525
- return new protocol_http_1.HttpRequest({
526
- protocol,
527
- hostname,
528
- port,
529
- method: "GET",
530
- headers,
531
- path: resolvedPath,
532
- body,
533
- });
364
+ b.m("GET").h(headers).b(body);
365
+ return b.build();
534
366
  };
535
367
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
536
368
  const se_PutMetadataCommand = async (input, context) => {
537
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
369
+ const b = (0, core_1.requestBuilder)(input, context);
538
370
  const headers = {
539
371
  "content-type": "application/json",
540
372
  };
541
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/PutMetadata";
373
+ b.bp("/PutMetadata");
542
374
  let body;
543
375
  body = JSON.stringify((0, smithy_client_1.take)(input, {
544
376
  channelArn: [],
545
377
  metadata: [],
546
378
  }));
547
- return new protocol_http_1.HttpRequest({
548
- protocol,
549
- hostname,
550
- port,
551
- method: "POST",
552
- headers,
553
- path: resolvedPath,
554
- body,
555
- });
379
+ b.m("POST").h(headers).b(body);
380
+ return b.build();
556
381
  };
557
382
  exports.se_PutMetadataCommand = se_PutMetadataCommand;
558
383
  const se_StartViewerSessionRevocationCommand = async (input, context) => {
559
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
384
+ const b = (0, core_1.requestBuilder)(input, context);
560
385
  const headers = {
561
386
  "content-type": "application/json",
562
387
  };
563
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StartViewerSessionRevocation";
388
+ b.bp("/StartViewerSessionRevocation");
564
389
  let body;
565
390
  body = JSON.stringify((0, smithy_client_1.take)(input, {
566
391
  channelArn: [],
567
392
  viewerId: [],
568
393
  viewerSessionVersionsLessThanOrEqualTo: [],
569
394
  }));
570
- return new protocol_http_1.HttpRequest({
571
- protocol,
572
- hostname,
573
- port,
574
- method: "POST",
575
- headers,
576
- path: resolvedPath,
577
- body,
578
- });
395
+ b.m("POST").h(headers).b(body);
396
+ return b.build();
579
397
  };
580
398
  exports.se_StartViewerSessionRevocationCommand = se_StartViewerSessionRevocationCommand;
581
399
  const se_StopStreamCommand = async (input, context) => {
582
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
400
+ const b = (0, core_1.requestBuilder)(input, context);
583
401
  const headers = {
584
402
  "content-type": "application/json",
585
403
  };
586
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StopStream";
404
+ b.bp("/StopStream");
587
405
  let body;
588
406
  body = JSON.stringify((0, smithy_client_1.take)(input, {
589
407
  channelArn: [],
590
408
  }));
591
- return new protocol_http_1.HttpRequest({
592
- protocol,
593
- hostname,
594
- port,
595
- method: "POST",
596
- headers,
597
- path: resolvedPath,
598
- body,
599
- });
409
+ b.m("POST").h(headers).b(body);
410
+ return b.build();
600
411
  };
601
412
  exports.se_StopStreamCommand = se_StopStreamCommand;
602
413
  const se_TagResourceCommand = async (input, context) => {
603
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
414
+ const b = (0, core_1.requestBuilder)(input, context);
604
415
  const headers = {
605
416
  "content-type": "application/json",
606
417
  };
607
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
608
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
418
+ b.bp("/tags/{resourceArn}");
419
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
609
420
  let body;
610
421
  body = JSON.stringify((0, smithy_client_1.take)(input, {
611
422
  tags: (_) => (0, smithy_client_1._json)(_),
612
423
  }));
613
- return new protocol_http_1.HttpRequest({
614
- protocol,
615
- hostname,
616
- port,
617
- method: "POST",
618
- headers,
619
- path: resolvedPath,
620
- body,
621
- });
424
+ b.m("POST").h(headers).b(body);
425
+ return b.build();
622
426
  };
623
427
  exports.se_TagResourceCommand = se_TagResourceCommand;
624
428
  const se_UntagResourceCommand = async (input, context) => {
625
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
429
+ const b = (0, core_1.requestBuilder)(input, context);
626
430
  const headers = {};
627
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
628
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
431
+ b.bp("/tags/{resourceArn}");
432
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
629
433
  const query = (0, smithy_client_1.map)({
630
- tagKeys: [
434
+ [_tK]: [
631
435
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
632
- () => (input.tagKeys || []).map((_entry) => _entry),
436
+ () => (input[_tK] || []).map((_entry) => _entry),
633
437
  ],
634
438
  });
635
439
  let body;
636
- return new protocol_http_1.HttpRequest({
637
- protocol,
638
- hostname,
639
- port,
640
- method: "DELETE",
641
- headers,
642
- path: resolvedPath,
643
- query,
644
- body,
645
- });
440
+ b.m("DELETE").h(headers).q(query).b(body);
441
+ return b.build();
646
442
  };
647
443
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
648
444
  const se_UpdateChannelCommand = async (input, context) => {
649
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
445
+ const b = (0, core_1.requestBuilder)(input, context);
650
446
  const headers = {
651
447
  "content-type": "application/json",
652
448
  };
653
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateChannel";
449
+ b.bp("/UpdateChannel");
654
450
  let body;
655
451
  body = JSON.stringify((0, smithy_client_1.take)(input, {
656
452
  arn: [],
@@ -662,15 +458,8 @@ const se_UpdateChannelCommand = async (input, context) => {
662
458
  recordingConfigurationArn: [],
663
459
  type: [],
664
460
  }));
665
- return new protocol_http_1.HttpRequest({
666
- protocol,
667
- hostname,
668
- port,
669
- method: "POST",
670
- headers,
671
- path: resolvedPath,
672
- body,
673
- });
461
+ b.m("POST").h(headers).b(body);
462
+ return b.build();
674
463
  };
675
464
  exports.se_UpdateChannelCommand = se_UpdateChannelCommand;
676
465
  const de_BatchGetChannelCommand = async (output, context) => {
@@ -2111,6 +1900,7 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2111
1900
  value !== "" &&
2112
1901
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2113
1902
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1903
+ const _tK = "tagKeys";
2114
1904
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2115
1905
  if (encoded.length) {
2116
1906
  return JSON.parse(encoded);