@aws-sdk/client-mediatailor 3.476.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.
@@ -1,56 +1,42 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { MediaTailorServiceException as __BaseException } from "../models/MediaTailorServiceException";
4
4
  import { BadRequestException, } from "../models/models_0";
5
5
  export const se_ConfigureLogsForChannelCommand = async (input, context) => {
6
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
6
+ const b = rb(input, context);
7
7
  const headers = {
8
8
  "content-type": "application/json",
9
9
  };
10
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configureLogs/channel";
10
+ b.bp("/configureLogs/channel");
11
11
  let body;
12
12
  body = JSON.stringify(take(input, {
13
13
  ChannelName: [],
14
14
  LogTypes: (_) => _json(_),
15
15
  }));
16
- return new __HttpRequest({
17
- protocol,
18
- hostname,
19
- port,
20
- method: "PUT",
21
- headers,
22
- path: resolvedPath,
23
- body,
24
- });
16
+ b.m("PUT").h(headers).b(body);
17
+ return b.build();
25
18
  };
26
19
  export const se_ConfigureLogsForPlaybackConfigurationCommand = async (input, context) => {
27
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
20
+ const b = rb(input, context);
28
21
  const headers = {
29
22
  "content-type": "application/json",
30
23
  };
31
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configureLogs/playbackConfiguration";
24
+ b.bp("/configureLogs/playbackConfiguration");
32
25
  let body;
33
26
  body = JSON.stringify(take(input, {
34
27
  PercentEnabled: [],
35
28
  PlaybackConfigurationName: [],
36
29
  }));
37
- return new __HttpRequest({
38
- protocol,
39
- hostname,
40
- port,
41
- method: "PUT",
42
- headers,
43
- path: resolvedPath,
44
- body,
45
- });
30
+ b.m("PUT").h(headers).b(body);
31
+ return b.build();
46
32
  };
47
33
  export const se_CreateChannelCommand = async (input, context) => {
48
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
34
+ const b = rb(input, context);
49
35
  const headers = {
50
36
  "content-type": "application/json",
51
37
  };
52
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel/{ChannelName}";
53
- resolvedPath = __resolvedPath(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
38
+ b.bp("/channel/{ChannelName}");
39
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
54
40
  let body;
55
41
  body = JSON.stringify(take(input, {
56
42
  FillerSlate: (_) => _json(_),
@@ -59,74 +45,50 @@ export const se_CreateChannelCommand = async (input, context) => {
59
45
  tags: [, (_) => _json(_), `Tags`],
60
46
  Tier: [],
61
47
  }));
62
- return new __HttpRequest({
63
- protocol,
64
- hostname,
65
- port,
66
- method: "POST",
67
- headers,
68
- path: resolvedPath,
69
- body,
70
- });
48
+ b.m("POST").h(headers).b(body);
49
+ return b.build();
71
50
  };
72
51
  export const se_CreateLiveSourceCommand = async (input, context) => {
73
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
52
+ const b = rb(input, context);
74
53
  const headers = {
75
54
  "content-type": "application/json",
76
55
  };
77
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
78
- "/sourceLocation/{SourceLocationName}/liveSource/{LiveSourceName}";
79
- resolvedPath = __resolvedPath(resolvedPath, input, "LiveSourceName", () => input.LiveSourceName, "{LiveSourceName}", false);
80
- resolvedPath = __resolvedPath(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
56
+ b.bp("/sourceLocation/{SourceLocationName}/liveSource/{LiveSourceName}");
57
+ b.p("LiveSourceName", () => input.LiveSourceName, "{LiveSourceName}", false);
58
+ b.p("SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
81
59
  let body;
82
60
  body = JSON.stringify(take(input, {
83
61
  HttpPackageConfigurations: (_) => _json(_),
84
62
  tags: [, (_) => _json(_), `Tags`],
85
63
  }));
86
- return new __HttpRequest({
87
- protocol,
88
- hostname,
89
- port,
90
- method: "POST",
91
- headers,
92
- path: resolvedPath,
93
- body,
94
- });
64
+ b.m("POST").h(headers).b(body);
65
+ return b.build();
95
66
  };
96
67
  export const se_CreatePrefetchScheduleCommand = async (input, context) => {
97
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
68
+ const b = rb(input, context);
98
69
  const headers = {
99
70
  "content-type": "application/json",
100
71
  };
101
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
102
- "/prefetchSchedule/{PlaybackConfigurationName}/{Name}";
103
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
104
- resolvedPath = __resolvedPath(resolvedPath, input, "PlaybackConfigurationName", () => input.PlaybackConfigurationName, "{PlaybackConfigurationName}", false);
72
+ b.bp("/prefetchSchedule/{PlaybackConfigurationName}/{Name}");
73
+ b.p("Name", () => input.Name, "{Name}", false);
74
+ b.p("PlaybackConfigurationName", () => input.PlaybackConfigurationName, "{PlaybackConfigurationName}", false);
105
75
  let body;
106
76
  body = JSON.stringify(take(input, {
107
77
  Consumption: (_) => se_PrefetchConsumption(_, context),
108
78
  Retrieval: (_) => se_PrefetchRetrieval(_, context),
109
79
  StreamId: [],
110
80
  }));
111
- return new __HttpRequest({
112
- protocol,
113
- hostname,
114
- port,
115
- method: "POST",
116
- headers,
117
- path: resolvedPath,
118
- body,
119
- });
81
+ b.m("POST").h(headers).b(body);
82
+ return b.build();
120
83
  };
121
84
  export const se_CreateProgramCommand = async (input, context) => {
122
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
85
+ const b = rb(input, context);
123
86
  const headers = {
124
87
  "content-type": "application/json",
125
88
  };
126
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
127
- "/channel/{ChannelName}/program/{ProgramName}";
128
- resolvedPath = __resolvedPath(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
129
- resolvedPath = __resolvedPath(resolvedPath, input, "ProgramName", () => input.ProgramName, "{ProgramName}", false);
89
+ b.bp("/channel/{ChannelName}/program/{ProgramName}");
90
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
91
+ b.p("ProgramName", () => input.ProgramName, "{ProgramName}", false);
130
92
  let body;
131
93
  body = JSON.stringify(take(input, {
132
94
  AdBreaks: (_) => _json(_),
@@ -135,23 +97,16 @@ export const se_CreateProgramCommand = async (input, context) => {
135
97
  SourceLocationName: [],
136
98
  VodSourceName: [],
137
99
  }));
138
- return new __HttpRequest({
139
- protocol,
140
- hostname,
141
- port,
142
- method: "POST",
143
- headers,
144
- path: resolvedPath,
145
- body,
146
- });
100
+ b.m("POST").h(headers).b(body);
101
+ return b.build();
147
102
  };
148
103
  export const se_CreateSourceLocationCommand = async (input, context) => {
149
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
104
+ const b = rb(input, context);
150
105
  const headers = {
151
106
  "content-type": "application/json",
152
107
  };
153
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sourceLocation/{SourceLocationName}";
154
- resolvedPath = __resolvedPath(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
108
+ b.bp("/sourceLocation/{SourceLocationName}");
109
+ b.p("SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
155
110
  let body;
156
111
  body = JSON.stringify(take(input, {
157
112
  AccessConfiguration: (_) => _json(_),
@@ -160,526 +115,311 @@ export const se_CreateSourceLocationCommand = async (input, context) => {
160
115
  SegmentDeliveryConfigurations: (_) => _json(_),
161
116
  tags: [, (_) => _json(_), `Tags`],
162
117
  }));
163
- return new __HttpRequest({
164
- protocol,
165
- hostname,
166
- port,
167
- method: "POST",
168
- headers,
169
- path: resolvedPath,
170
- body,
171
- });
118
+ b.m("POST").h(headers).b(body);
119
+ return b.build();
172
120
  };
173
121
  export const se_CreateVodSourceCommand = async (input, context) => {
174
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
122
+ const b = rb(input, context);
175
123
  const headers = {
176
124
  "content-type": "application/json",
177
125
  };
178
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
179
- "/sourceLocation/{SourceLocationName}/vodSource/{VodSourceName}";
180
- resolvedPath = __resolvedPath(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
181
- resolvedPath = __resolvedPath(resolvedPath, input, "VodSourceName", () => input.VodSourceName, "{VodSourceName}", false);
126
+ b.bp("/sourceLocation/{SourceLocationName}/vodSource/{VodSourceName}");
127
+ b.p("SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
128
+ b.p("VodSourceName", () => input.VodSourceName, "{VodSourceName}", false);
182
129
  let body;
183
130
  body = JSON.stringify(take(input, {
184
131
  HttpPackageConfigurations: (_) => _json(_),
185
132
  tags: [, (_) => _json(_), `Tags`],
186
133
  }));
187
- return new __HttpRequest({
188
- protocol,
189
- hostname,
190
- port,
191
- method: "POST",
192
- headers,
193
- path: resolvedPath,
194
- body,
195
- });
134
+ b.m("POST").h(headers).b(body);
135
+ return b.build();
196
136
  };
197
137
  export const se_DeleteChannelCommand = async (input, context) => {
198
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
138
+ const b = rb(input, context);
199
139
  const headers = {};
200
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel/{ChannelName}";
201
- resolvedPath = __resolvedPath(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
140
+ b.bp("/channel/{ChannelName}");
141
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
202
142
  let body;
203
- return new __HttpRequest({
204
- protocol,
205
- hostname,
206
- port,
207
- method: "DELETE",
208
- headers,
209
- path: resolvedPath,
210
- body,
211
- });
143
+ b.m("DELETE").h(headers).b(body);
144
+ return b.build();
212
145
  };
213
146
  export const se_DeleteChannelPolicyCommand = async (input, context) => {
214
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
147
+ const b = rb(input, context);
215
148
  const headers = {};
216
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel/{ChannelName}/policy";
217
- resolvedPath = __resolvedPath(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
149
+ b.bp("/channel/{ChannelName}/policy");
150
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
218
151
  let body;
219
- return new __HttpRequest({
220
- protocol,
221
- hostname,
222
- port,
223
- method: "DELETE",
224
- headers,
225
- path: resolvedPath,
226
- body,
227
- });
152
+ b.m("DELETE").h(headers).b(body);
153
+ return b.build();
228
154
  };
229
155
  export const se_DeleteLiveSourceCommand = async (input, context) => {
230
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
156
+ const b = rb(input, context);
231
157
  const headers = {};
232
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
233
- "/sourceLocation/{SourceLocationName}/liveSource/{LiveSourceName}";
234
- resolvedPath = __resolvedPath(resolvedPath, input, "LiveSourceName", () => input.LiveSourceName, "{LiveSourceName}", false);
235
- resolvedPath = __resolvedPath(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
158
+ b.bp("/sourceLocation/{SourceLocationName}/liveSource/{LiveSourceName}");
159
+ b.p("LiveSourceName", () => input.LiveSourceName, "{LiveSourceName}", false);
160
+ b.p("SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
236
161
  let body;
237
- return new __HttpRequest({
238
- protocol,
239
- hostname,
240
- port,
241
- method: "DELETE",
242
- headers,
243
- path: resolvedPath,
244
- body,
245
- });
162
+ b.m("DELETE").h(headers).b(body);
163
+ return b.build();
246
164
  };
247
165
  export const se_DeletePlaybackConfigurationCommand = async (input, context) => {
248
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
166
+ const b = rb(input, context);
249
167
  const headers = {};
250
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/playbackConfiguration/{Name}";
251
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
168
+ b.bp("/playbackConfiguration/{Name}");
169
+ b.p("Name", () => input.Name, "{Name}", false);
252
170
  let body;
253
- return new __HttpRequest({
254
- protocol,
255
- hostname,
256
- port,
257
- method: "DELETE",
258
- headers,
259
- path: resolvedPath,
260
- body,
261
- });
171
+ b.m("DELETE").h(headers).b(body);
172
+ return b.build();
262
173
  };
263
174
  export const se_DeletePrefetchScheduleCommand = async (input, context) => {
264
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
175
+ const b = rb(input, context);
265
176
  const headers = {};
266
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
267
- "/prefetchSchedule/{PlaybackConfigurationName}/{Name}";
268
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
269
- resolvedPath = __resolvedPath(resolvedPath, input, "PlaybackConfigurationName", () => input.PlaybackConfigurationName, "{PlaybackConfigurationName}", false);
177
+ b.bp("/prefetchSchedule/{PlaybackConfigurationName}/{Name}");
178
+ b.p("Name", () => input.Name, "{Name}", false);
179
+ b.p("PlaybackConfigurationName", () => input.PlaybackConfigurationName, "{PlaybackConfigurationName}", false);
270
180
  let body;
271
- return new __HttpRequest({
272
- protocol,
273
- hostname,
274
- port,
275
- method: "DELETE",
276
- headers,
277
- path: resolvedPath,
278
- body,
279
- });
181
+ b.m("DELETE").h(headers).b(body);
182
+ return b.build();
280
183
  };
281
184
  export const se_DeleteProgramCommand = async (input, context) => {
282
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
185
+ const b = rb(input, context);
283
186
  const headers = {};
284
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
285
- "/channel/{ChannelName}/program/{ProgramName}";
286
- resolvedPath = __resolvedPath(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
287
- resolvedPath = __resolvedPath(resolvedPath, input, "ProgramName", () => input.ProgramName, "{ProgramName}", false);
187
+ b.bp("/channel/{ChannelName}/program/{ProgramName}");
188
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
189
+ b.p("ProgramName", () => input.ProgramName, "{ProgramName}", false);
288
190
  let body;
289
- return new __HttpRequest({
290
- protocol,
291
- hostname,
292
- port,
293
- method: "DELETE",
294
- headers,
295
- path: resolvedPath,
296
- body,
297
- });
191
+ b.m("DELETE").h(headers).b(body);
192
+ return b.build();
298
193
  };
299
194
  export const se_DeleteSourceLocationCommand = async (input, context) => {
300
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
195
+ const b = rb(input, context);
301
196
  const headers = {};
302
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sourceLocation/{SourceLocationName}";
303
- resolvedPath = __resolvedPath(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
197
+ b.bp("/sourceLocation/{SourceLocationName}");
198
+ b.p("SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
304
199
  let body;
305
- return new __HttpRequest({
306
- protocol,
307
- hostname,
308
- port,
309
- method: "DELETE",
310
- headers,
311
- path: resolvedPath,
312
- body,
313
- });
200
+ b.m("DELETE").h(headers).b(body);
201
+ return b.build();
314
202
  };
315
203
  export const se_DeleteVodSourceCommand = async (input, context) => {
316
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
204
+ const b = rb(input, context);
317
205
  const headers = {};
318
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
319
- "/sourceLocation/{SourceLocationName}/vodSource/{VodSourceName}";
320
- resolvedPath = __resolvedPath(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
321
- resolvedPath = __resolvedPath(resolvedPath, input, "VodSourceName", () => input.VodSourceName, "{VodSourceName}", false);
206
+ b.bp("/sourceLocation/{SourceLocationName}/vodSource/{VodSourceName}");
207
+ b.p("SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
208
+ b.p("VodSourceName", () => input.VodSourceName, "{VodSourceName}", false);
322
209
  let body;
323
- return new __HttpRequest({
324
- protocol,
325
- hostname,
326
- port,
327
- method: "DELETE",
328
- headers,
329
- path: resolvedPath,
330
- body,
331
- });
210
+ b.m("DELETE").h(headers).b(body);
211
+ return b.build();
332
212
  };
333
213
  export const se_DescribeChannelCommand = async (input, context) => {
334
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
214
+ const b = rb(input, context);
335
215
  const headers = {};
336
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel/{ChannelName}";
337
- resolvedPath = __resolvedPath(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
216
+ b.bp("/channel/{ChannelName}");
217
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
338
218
  let body;
339
- return new __HttpRequest({
340
- protocol,
341
- hostname,
342
- port,
343
- method: "GET",
344
- headers,
345
- path: resolvedPath,
346
- body,
347
- });
219
+ b.m("GET").h(headers).b(body);
220
+ return b.build();
348
221
  };
349
222
  export const se_DescribeLiveSourceCommand = async (input, context) => {
350
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
223
+ const b = rb(input, context);
351
224
  const headers = {};
352
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
353
- "/sourceLocation/{SourceLocationName}/liveSource/{LiveSourceName}";
354
- resolvedPath = __resolvedPath(resolvedPath, input, "LiveSourceName", () => input.LiveSourceName, "{LiveSourceName}", false);
355
- resolvedPath = __resolvedPath(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
225
+ b.bp("/sourceLocation/{SourceLocationName}/liveSource/{LiveSourceName}");
226
+ b.p("LiveSourceName", () => input.LiveSourceName, "{LiveSourceName}", false);
227
+ b.p("SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
356
228
  let body;
357
- return new __HttpRequest({
358
- protocol,
359
- hostname,
360
- port,
361
- method: "GET",
362
- headers,
363
- path: resolvedPath,
364
- body,
365
- });
229
+ b.m("GET").h(headers).b(body);
230
+ return b.build();
366
231
  };
367
232
  export const se_DescribeProgramCommand = async (input, context) => {
368
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
233
+ const b = rb(input, context);
369
234
  const headers = {};
370
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
371
- "/channel/{ChannelName}/program/{ProgramName}";
372
- resolvedPath = __resolvedPath(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
373
- resolvedPath = __resolvedPath(resolvedPath, input, "ProgramName", () => input.ProgramName, "{ProgramName}", false);
235
+ b.bp("/channel/{ChannelName}/program/{ProgramName}");
236
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
237
+ b.p("ProgramName", () => input.ProgramName, "{ProgramName}", false);
374
238
  let body;
375
- return new __HttpRequest({
376
- protocol,
377
- hostname,
378
- port,
379
- method: "GET",
380
- headers,
381
- path: resolvedPath,
382
- body,
383
- });
239
+ b.m("GET").h(headers).b(body);
240
+ return b.build();
384
241
  };
385
242
  export const se_DescribeSourceLocationCommand = async (input, context) => {
386
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
243
+ const b = rb(input, context);
387
244
  const headers = {};
388
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sourceLocation/{SourceLocationName}";
389
- resolvedPath = __resolvedPath(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
245
+ b.bp("/sourceLocation/{SourceLocationName}");
246
+ b.p("SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
390
247
  let body;
391
- return new __HttpRequest({
392
- protocol,
393
- hostname,
394
- port,
395
- method: "GET",
396
- headers,
397
- path: resolvedPath,
398
- body,
399
- });
248
+ b.m("GET").h(headers).b(body);
249
+ return b.build();
400
250
  };
401
251
  export const se_DescribeVodSourceCommand = async (input, context) => {
402
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
252
+ const b = rb(input, context);
403
253
  const headers = {};
404
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
405
- "/sourceLocation/{SourceLocationName}/vodSource/{VodSourceName}";
406
- resolvedPath = __resolvedPath(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
407
- resolvedPath = __resolvedPath(resolvedPath, input, "VodSourceName", () => input.VodSourceName, "{VodSourceName}", false);
254
+ b.bp("/sourceLocation/{SourceLocationName}/vodSource/{VodSourceName}");
255
+ b.p("SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
256
+ b.p("VodSourceName", () => input.VodSourceName, "{VodSourceName}", false);
408
257
  let body;
409
- return new __HttpRequest({
410
- protocol,
411
- hostname,
412
- port,
413
- method: "GET",
414
- headers,
415
- path: resolvedPath,
416
- body,
417
- });
258
+ b.m("GET").h(headers).b(body);
259
+ return b.build();
418
260
  };
419
261
  export const se_GetChannelPolicyCommand = async (input, context) => {
420
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
262
+ const b = rb(input, context);
421
263
  const headers = {};
422
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel/{ChannelName}/policy";
423
- resolvedPath = __resolvedPath(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
264
+ b.bp("/channel/{ChannelName}/policy");
265
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
424
266
  let body;
425
- return new __HttpRequest({
426
- protocol,
427
- hostname,
428
- port,
429
- method: "GET",
430
- headers,
431
- path: resolvedPath,
432
- body,
433
- });
267
+ b.m("GET").h(headers).b(body);
268
+ return b.build();
434
269
  };
435
270
  export const se_GetChannelScheduleCommand = async (input, context) => {
436
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
271
+ const b = rb(input, context);
437
272
  const headers = {};
438
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel/{ChannelName}/schedule";
439
- resolvedPath = __resolvedPath(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
273
+ b.bp("/channel/{ChannelName}/schedule");
274
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
440
275
  const query = map({
441
- durationMinutes: [, input.DurationMinutes],
442
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
443
- nextToken: [, input.NextToken],
276
+ [_dM]: [, input[_DM]],
277
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
278
+ [_nT]: [, input[_NT]],
444
279
  });
445
280
  let body;
446
- return new __HttpRequest({
447
- protocol,
448
- hostname,
449
- port,
450
- method: "GET",
451
- headers,
452
- path: resolvedPath,
453
- query,
454
- body,
455
- });
281
+ b.m("GET").h(headers).q(query).b(body);
282
+ return b.build();
456
283
  };
457
284
  export const se_GetPlaybackConfigurationCommand = async (input, context) => {
458
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
285
+ const b = rb(input, context);
459
286
  const headers = {};
460
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/playbackConfiguration/{Name}";
461
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
287
+ b.bp("/playbackConfiguration/{Name}");
288
+ b.p("Name", () => input.Name, "{Name}", false);
462
289
  let body;
463
- return new __HttpRequest({
464
- protocol,
465
- hostname,
466
- port,
467
- method: "GET",
468
- headers,
469
- path: resolvedPath,
470
- body,
471
- });
290
+ b.m("GET").h(headers).b(body);
291
+ return b.build();
472
292
  };
473
293
  export const se_GetPrefetchScheduleCommand = async (input, context) => {
474
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
294
+ const b = rb(input, context);
475
295
  const headers = {};
476
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
477
- "/prefetchSchedule/{PlaybackConfigurationName}/{Name}";
478
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
479
- resolvedPath = __resolvedPath(resolvedPath, input, "PlaybackConfigurationName", () => input.PlaybackConfigurationName, "{PlaybackConfigurationName}", false);
296
+ b.bp("/prefetchSchedule/{PlaybackConfigurationName}/{Name}");
297
+ b.p("Name", () => input.Name, "{Name}", false);
298
+ b.p("PlaybackConfigurationName", () => input.PlaybackConfigurationName, "{PlaybackConfigurationName}", false);
480
299
  let body;
481
- return new __HttpRequest({
482
- protocol,
483
- hostname,
484
- port,
485
- method: "GET",
486
- headers,
487
- path: resolvedPath,
488
- body,
489
- });
300
+ b.m("GET").h(headers).b(body);
301
+ return b.build();
490
302
  };
491
303
  export const se_ListAlertsCommand = async (input, context) => {
492
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
304
+ const b = rb(input, context);
493
305
  const headers = {};
494
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/alerts";
306
+ b.bp("/alerts");
495
307
  const query = map({
496
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
497
- nextToken: [, input.NextToken],
498
- resourceArn: [, __expectNonNull(input.ResourceArn, `ResourceArn`)],
308
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
309
+ [_nT]: [, input[_NT]],
310
+ [_rA]: [, __expectNonNull(input[_RA], `ResourceArn`)],
499
311
  });
500
312
  let body;
501
- return new __HttpRequest({
502
- protocol,
503
- hostname,
504
- port,
505
- method: "GET",
506
- headers,
507
- path: resolvedPath,
508
- query,
509
- body,
510
- });
313
+ b.m("GET").h(headers).q(query).b(body);
314
+ return b.build();
511
315
  };
512
316
  export const se_ListChannelsCommand = async (input, context) => {
513
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
317
+ const b = rb(input, context);
514
318
  const headers = {};
515
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
319
+ b.bp("/channels");
516
320
  const query = map({
517
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
518
- nextToken: [, input.NextToken],
321
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
322
+ [_nT]: [, input[_NT]],
519
323
  });
520
324
  let body;
521
- return new __HttpRequest({
522
- protocol,
523
- hostname,
524
- port,
525
- method: "GET",
526
- headers,
527
- path: resolvedPath,
528
- query,
529
- body,
530
- });
325
+ b.m("GET").h(headers).q(query).b(body);
326
+ return b.build();
531
327
  };
532
328
  export const se_ListLiveSourcesCommand = async (input, context) => {
533
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
329
+ const b = rb(input, context);
534
330
  const headers = {};
535
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
536
- "/sourceLocation/{SourceLocationName}/liveSources";
537
- resolvedPath = __resolvedPath(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
331
+ b.bp("/sourceLocation/{SourceLocationName}/liveSources");
332
+ b.p("SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
538
333
  const query = map({
539
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
540
- nextToken: [, input.NextToken],
334
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
335
+ [_nT]: [, input[_NT]],
541
336
  });
542
337
  let body;
543
- return new __HttpRequest({
544
- protocol,
545
- hostname,
546
- port,
547
- method: "GET",
548
- headers,
549
- path: resolvedPath,
550
- query,
551
- body,
552
- });
338
+ b.m("GET").h(headers).q(query).b(body);
339
+ return b.build();
553
340
  };
554
341
  export const se_ListPlaybackConfigurationsCommand = async (input, context) => {
555
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
342
+ const b = rb(input, context);
556
343
  const headers = {};
557
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/playbackConfigurations";
344
+ b.bp("/playbackConfigurations");
558
345
  const query = map({
559
- MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
560
- NextToken: [, input.NextToken],
346
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
347
+ [_NT]: [, input[_NT]],
561
348
  });
562
349
  let body;
563
- return new __HttpRequest({
564
- protocol,
565
- hostname,
566
- port,
567
- method: "GET",
568
- headers,
569
- path: resolvedPath,
570
- query,
571
- body,
572
- });
350
+ b.m("GET").h(headers).q(query).b(body);
351
+ return b.build();
573
352
  };
574
353
  export const se_ListPrefetchSchedulesCommand = async (input, context) => {
575
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
354
+ const b = rb(input, context);
576
355
  const headers = {
577
356
  "content-type": "application/json",
578
357
  };
579
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
580
- "/prefetchSchedule/{PlaybackConfigurationName}";
581
- resolvedPath = __resolvedPath(resolvedPath, input, "PlaybackConfigurationName", () => input.PlaybackConfigurationName, "{PlaybackConfigurationName}", false);
358
+ b.bp("/prefetchSchedule/{PlaybackConfigurationName}");
359
+ b.p("PlaybackConfigurationName", () => input.PlaybackConfigurationName, "{PlaybackConfigurationName}", false);
582
360
  let body;
583
361
  body = JSON.stringify(take(input, {
584
362
  MaxResults: [],
585
363
  NextToken: [],
586
364
  StreamId: [],
587
365
  }));
588
- return new __HttpRequest({
589
- protocol,
590
- hostname,
591
- port,
592
- method: "POST",
593
- headers,
594
- path: resolvedPath,
595
- body,
596
- });
366
+ b.m("POST").h(headers).b(body);
367
+ return b.build();
597
368
  };
598
369
  export const se_ListSourceLocationsCommand = async (input, context) => {
599
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
370
+ const b = rb(input, context);
600
371
  const headers = {};
601
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sourceLocations";
372
+ b.bp("/sourceLocations");
602
373
  const query = map({
603
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
604
- nextToken: [, input.NextToken],
374
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
375
+ [_nT]: [, input[_NT]],
605
376
  });
606
377
  let body;
607
- return new __HttpRequest({
608
- protocol,
609
- hostname,
610
- port,
611
- method: "GET",
612
- headers,
613
- path: resolvedPath,
614
- query,
615
- body,
616
- });
378
+ b.m("GET").h(headers).q(query).b(body);
379
+ return b.build();
617
380
  };
618
381
  export const se_ListTagsForResourceCommand = async (input, context) => {
619
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
382
+ const b = rb(input, context);
620
383
  const headers = {};
621
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
622
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
384
+ b.bp("/tags/{ResourceArn}");
385
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
623
386
  let body;
624
- return new __HttpRequest({
625
- protocol,
626
- hostname,
627
- port,
628
- method: "GET",
629
- headers,
630
- path: resolvedPath,
631
- body,
632
- });
387
+ b.m("GET").h(headers).b(body);
388
+ return b.build();
633
389
  };
634
390
  export const se_ListVodSourcesCommand = async (input, context) => {
635
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
391
+ const b = rb(input, context);
636
392
  const headers = {};
637
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
638
- "/sourceLocation/{SourceLocationName}/vodSources";
639
- resolvedPath = __resolvedPath(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
393
+ b.bp("/sourceLocation/{SourceLocationName}/vodSources");
394
+ b.p("SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
640
395
  const query = map({
641
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
642
- nextToken: [, input.NextToken],
396
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
397
+ [_nT]: [, input[_NT]],
643
398
  });
644
399
  let body;
645
- return new __HttpRequest({
646
- protocol,
647
- hostname,
648
- port,
649
- method: "GET",
650
- headers,
651
- path: resolvedPath,
652
- query,
653
- body,
654
- });
400
+ b.m("GET").h(headers).q(query).b(body);
401
+ return b.build();
655
402
  };
656
403
  export const se_PutChannelPolicyCommand = async (input, context) => {
657
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
404
+ const b = rb(input, context);
658
405
  const headers = {
659
406
  "content-type": "application/json",
660
407
  };
661
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel/{ChannelName}/policy";
662
- resolvedPath = __resolvedPath(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
408
+ b.bp("/channel/{ChannelName}/policy");
409
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
663
410
  let body;
664
411
  body = JSON.stringify(take(input, {
665
412
  Policy: [],
666
413
  }));
667
- return new __HttpRequest({
668
- protocol,
669
- hostname,
670
- port,
671
- method: "PUT",
672
- headers,
673
- path: resolvedPath,
674
- body,
675
- });
414
+ b.m("PUT").h(headers).b(body);
415
+ return b.build();
676
416
  };
677
417
  export const se_PutPlaybackConfigurationCommand = async (input, context) => {
678
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
418
+ const b = rb(input, context);
679
419
  const headers = {
680
420
  "content-type": "application/json",
681
421
  };
682
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/playbackConfiguration";
422
+ b.bp("/playbackConfiguration");
683
423
  let body;
684
424
  body = JSON.stringify(take(input, {
685
425
  AdDecisionServerUrl: [],
@@ -697,168 +437,109 @@ export const se_PutPlaybackConfigurationCommand = async (input, context) => {
697
437
  TranscodeProfileName: [],
698
438
  VideoContentSourceUrl: [],
699
439
  }));
700
- return new __HttpRequest({
701
- protocol,
702
- hostname,
703
- port,
704
- method: "PUT",
705
- headers,
706
- path: resolvedPath,
707
- body,
708
- });
440
+ b.m("PUT").h(headers).b(body);
441
+ return b.build();
709
442
  };
710
443
  export const se_StartChannelCommand = async (input, context) => {
711
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
444
+ const b = rb(input, context);
712
445
  const headers = {};
713
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel/{ChannelName}/start";
714
- resolvedPath = __resolvedPath(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
446
+ b.bp("/channel/{ChannelName}/start");
447
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
715
448
  let body;
716
- return new __HttpRequest({
717
- protocol,
718
- hostname,
719
- port,
720
- method: "PUT",
721
- headers,
722
- path: resolvedPath,
723
- body,
724
- });
449
+ b.m("PUT").h(headers).b(body);
450
+ return b.build();
725
451
  };
726
452
  export const se_StopChannelCommand = async (input, context) => {
727
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
453
+ const b = rb(input, context);
728
454
  const headers = {};
729
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel/{ChannelName}/stop";
730
- resolvedPath = __resolvedPath(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
455
+ b.bp("/channel/{ChannelName}/stop");
456
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
731
457
  let body;
732
- return new __HttpRequest({
733
- protocol,
734
- hostname,
735
- port,
736
- method: "PUT",
737
- headers,
738
- path: resolvedPath,
739
- body,
740
- });
458
+ b.m("PUT").h(headers).b(body);
459
+ return b.build();
741
460
  };
742
461
  export const se_TagResourceCommand = async (input, context) => {
743
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
462
+ const b = rb(input, context);
744
463
  const headers = {
745
464
  "content-type": "application/json",
746
465
  };
747
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
748
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
466
+ b.bp("/tags/{ResourceArn}");
467
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
749
468
  let body;
750
469
  body = JSON.stringify(take(input, {
751
470
  tags: [, (_) => _json(_), `Tags`],
752
471
  }));
753
- return new __HttpRequest({
754
- protocol,
755
- hostname,
756
- port,
757
- method: "POST",
758
- headers,
759
- path: resolvedPath,
760
- body,
761
- });
472
+ b.m("POST").h(headers).b(body);
473
+ return b.build();
762
474
  };
763
475
  export const se_UntagResourceCommand = async (input, context) => {
764
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
476
+ const b = rb(input, context);
765
477
  const headers = {};
766
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
767
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
478
+ b.bp("/tags/{ResourceArn}");
479
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
768
480
  const query = map({
769
- tagKeys: [
481
+ [_tK]: [
770
482
  __expectNonNull(input.TagKeys, `TagKeys`) != null,
771
- () => (input.TagKeys || []).map((_entry) => _entry),
483
+ () => (input[_TK] || []).map((_entry) => _entry),
772
484
  ],
773
485
  });
774
486
  let body;
775
- return new __HttpRequest({
776
- protocol,
777
- hostname,
778
- port,
779
- method: "DELETE",
780
- headers,
781
- path: resolvedPath,
782
- query,
783
- body,
784
- });
487
+ b.m("DELETE").h(headers).q(query).b(body);
488
+ return b.build();
785
489
  };
786
490
  export const se_UpdateChannelCommand = async (input, context) => {
787
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
491
+ const b = rb(input, context);
788
492
  const headers = {
789
493
  "content-type": "application/json",
790
494
  };
791
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel/{ChannelName}";
792
- resolvedPath = __resolvedPath(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
495
+ b.bp("/channel/{ChannelName}");
496
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
793
497
  let body;
794
498
  body = JSON.stringify(take(input, {
795
499
  FillerSlate: (_) => _json(_),
796
500
  Outputs: (_) => _json(_),
797
501
  }));
798
- return new __HttpRequest({
799
- protocol,
800
- hostname,
801
- port,
802
- method: "PUT",
803
- headers,
804
- path: resolvedPath,
805
- body,
806
- });
502
+ b.m("PUT").h(headers).b(body);
503
+ return b.build();
807
504
  };
808
505
  export const se_UpdateLiveSourceCommand = async (input, context) => {
809
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
506
+ const b = rb(input, context);
810
507
  const headers = {
811
508
  "content-type": "application/json",
812
509
  };
813
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
814
- "/sourceLocation/{SourceLocationName}/liveSource/{LiveSourceName}";
815
- resolvedPath = __resolvedPath(resolvedPath, input, "LiveSourceName", () => input.LiveSourceName, "{LiveSourceName}", false);
816
- resolvedPath = __resolvedPath(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
510
+ b.bp("/sourceLocation/{SourceLocationName}/liveSource/{LiveSourceName}");
511
+ b.p("LiveSourceName", () => input.LiveSourceName, "{LiveSourceName}", false);
512
+ b.p("SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
817
513
  let body;
818
514
  body = JSON.stringify(take(input, {
819
515
  HttpPackageConfigurations: (_) => _json(_),
820
516
  }));
821
- return new __HttpRequest({
822
- protocol,
823
- hostname,
824
- port,
825
- method: "PUT",
826
- headers,
827
- path: resolvedPath,
828
- body,
829
- });
517
+ b.m("PUT").h(headers).b(body);
518
+ return b.build();
830
519
  };
831
520
  export const se_UpdateProgramCommand = async (input, context) => {
832
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
521
+ const b = rb(input, context);
833
522
  const headers = {
834
523
  "content-type": "application/json",
835
524
  };
836
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
837
- "/channel/{ChannelName}/program/{ProgramName}";
838
- resolvedPath = __resolvedPath(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
839
- resolvedPath = __resolvedPath(resolvedPath, input, "ProgramName", () => input.ProgramName, "{ProgramName}", false);
525
+ b.bp("/channel/{ChannelName}/program/{ProgramName}");
526
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
527
+ b.p("ProgramName", () => input.ProgramName, "{ProgramName}", false);
840
528
  let body;
841
529
  body = JSON.stringify(take(input, {
842
530
  AdBreaks: (_) => _json(_),
843
531
  ScheduleConfiguration: (_) => _json(_),
844
532
  }));
845
- return new __HttpRequest({
846
- protocol,
847
- hostname,
848
- port,
849
- method: "PUT",
850
- headers,
851
- path: resolvedPath,
852
- body,
853
- });
533
+ b.m("PUT").h(headers).b(body);
534
+ return b.build();
854
535
  };
855
536
  export const se_UpdateSourceLocationCommand = async (input, context) => {
856
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
537
+ const b = rb(input, context);
857
538
  const headers = {
858
539
  "content-type": "application/json",
859
540
  };
860
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sourceLocation/{SourceLocationName}";
861
- resolvedPath = __resolvedPath(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
541
+ b.bp("/sourceLocation/{SourceLocationName}");
542
+ b.p("SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
862
543
  let body;
863
544
  body = JSON.stringify(take(input, {
864
545
  AccessConfiguration: (_) => _json(_),
@@ -866,38 +547,23 @@ export const se_UpdateSourceLocationCommand = async (input, context) => {
866
547
  HttpConfiguration: (_) => _json(_),
867
548
  SegmentDeliveryConfigurations: (_) => _json(_),
868
549
  }));
869
- return new __HttpRequest({
870
- protocol,
871
- hostname,
872
- port,
873
- method: "PUT",
874
- headers,
875
- path: resolvedPath,
876
- body,
877
- });
550
+ b.m("PUT").h(headers).b(body);
551
+ return b.build();
878
552
  };
879
553
  export const se_UpdateVodSourceCommand = async (input, context) => {
880
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
554
+ const b = rb(input, context);
881
555
  const headers = {
882
556
  "content-type": "application/json",
883
557
  };
884
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
885
- "/sourceLocation/{SourceLocationName}/vodSource/{VodSourceName}";
886
- resolvedPath = __resolvedPath(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
887
- resolvedPath = __resolvedPath(resolvedPath, input, "VodSourceName", () => input.VodSourceName, "{VodSourceName}", false);
558
+ b.bp("/sourceLocation/{SourceLocationName}/vodSource/{VodSourceName}");
559
+ b.p("SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
560
+ b.p("VodSourceName", () => input.VodSourceName, "{VodSourceName}", false);
888
561
  let body;
889
562
  body = JSON.stringify(take(input, {
890
563
  HttpPackageConfigurations: (_) => _json(_),
891
564
  }));
892
- return new __HttpRequest({
893
- protocol,
894
- hostname,
895
- port,
896
- method: "PUT",
897
- headers,
898
- path: resolvedPath,
899
- body,
900
- });
565
+ b.m("PUT").h(headers).b(body);
566
+ return b.build();
901
567
  };
902
568
  export const de_ConfigureLogsForChannelCommand = async (output, context) => {
903
569
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2469,6 +2135,16 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2469
2135
  value !== "" &&
2470
2136
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2471
2137
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2138
+ const _DM = "DurationMinutes";
2139
+ const _MR = "MaxResults";
2140
+ const _NT = "NextToken";
2141
+ const _RA = "ResourceArn";
2142
+ const _TK = "TagKeys";
2143
+ const _dM = "durationMinutes";
2144
+ const _mR = "maxResults";
2145
+ const _nT = "nextToken";
2146
+ const _rA = "resourceArn";
2147
+ const _tK = "tagKeys";
2472
2148
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2473
2149
  if (encoded.length) {
2474
2150
  return JSON.parse(encoded);