@aws-sdk/client-mediapackagev2 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,69 +1,54 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateOriginEndpointCommand = exports.de_UpdateChannelGroupCommand = exports.de_UpdateChannelCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_PutOriginEndpointPolicyCommand = exports.de_PutChannelPolicyCommand = exports.de_ListTagsForResourceCommand = exports.de_ListOriginEndpointsCommand = exports.de_ListChannelsCommand = exports.de_ListChannelGroupsCommand = exports.de_GetOriginEndpointPolicyCommand = exports.de_GetOriginEndpointCommand = exports.de_GetChannelPolicyCommand = exports.de_GetChannelGroupCommand = exports.de_GetChannelCommand = exports.de_DeleteOriginEndpointPolicyCommand = exports.de_DeleteOriginEndpointCommand = exports.de_DeleteChannelPolicyCommand = exports.de_DeleteChannelGroupCommand = exports.de_DeleteChannelCommand = exports.de_CreateOriginEndpointCommand = exports.de_CreateChannelGroupCommand = exports.de_CreateChannelCommand = exports.se_UpdateOriginEndpointCommand = exports.se_UpdateChannelGroupCommand = exports.se_UpdateChannelCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_PutOriginEndpointPolicyCommand = exports.se_PutChannelPolicyCommand = exports.se_ListTagsForResourceCommand = exports.se_ListOriginEndpointsCommand = exports.se_ListChannelsCommand = exports.se_ListChannelGroupsCommand = exports.se_GetOriginEndpointPolicyCommand = exports.se_GetOriginEndpointCommand = exports.se_GetChannelPolicyCommand = exports.se_GetChannelGroupCommand = exports.se_GetChannelCommand = exports.se_DeleteOriginEndpointPolicyCommand = exports.se_DeleteOriginEndpointCommand = exports.se_DeleteChannelPolicyCommand = exports.se_DeleteChannelGroupCommand = exports.se_DeleteChannelCommand = exports.se_CreateOriginEndpointCommand = exports.se_CreateChannelGroupCommand = exports.se_CreateChannelCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
4
+ const core_1 = require("@smithy/core");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const MediaPackageV2ServiceException_1 = require("../models/MediaPackageV2ServiceException");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const se_CreateChannelCommand = async (input, context) => {
9
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
+ const b = (0, core_1.requestBuilder)(input, context);
10
10
  const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
11
11
  "content-type": "application/json",
12
- "x-amzn-client-token": input.ClientToken,
12
+ [_xact]: input[_CT],
13
13
  });
14
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channelGroup/{ChannelGroupName}/channel";
15
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
14
+ b.bp("/channelGroup/{ChannelGroupName}/channel");
15
+ b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
16
16
  let body;
17
17
  body = JSON.stringify((0, smithy_client_1.take)(input, {
18
18
  ChannelName: [],
19
19
  Description: [],
20
20
  tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
21
21
  }));
22
- return new protocol_http_1.HttpRequest({
23
- protocol,
24
- hostname,
25
- port,
26
- method: "POST",
27
- headers,
28
- path: resolvedPath,
29
- body,
30
- });
22
+ b.m("POST").h(headers).b(body);
23
+ return b.build();
31
24
  };
32
25
  exports.se_CreateChannelCommand = se_CreateChannelCommand;
33
26
  const se_CreateChannelGroupCommand = async (input, context) => {
34
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
27
+ const b = (0, core_1.requestBuilder)(input, context);
35
28
  const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
36
29
  "content-type": "application/json",
37
- "x-amzn-client-token": input.ClientToken,
30
+ [_xact]: input[_CT],
38
31
  });
39
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channelGroup";
32
+ b.bp("/channelGroup");
40
33
  let body;
41
34
  body = JSON.stringify((0, smithy_client_1.take)(input, {
42
35
  ChannelGroupName: [],
43
36
  Description: [],
44
37
  tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
45
38
  }));
46
- return new protocol_http_1.HttpRequest({
47
- protocol,
48
- hostname,
49
- port,
50
- method: "POST",
51
- headers,
52
- path: resolvedPath,
53
- body,
54
- });
39
+ b.m("POST").h(headers).b(body);
40
+ return b.build();
55
41
  };
56
42
  exports.se_CreateChannelGroupCommand = se_CreateChannelGroupCommand;
57
43
  const se_CreateOriginEndpointCommand = async (input, context) => {
58
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
44
+ const b = (0, core_1.requestBuilder)(input, context);
59
45
  const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
60
46
  "content-type": "application/json",
61
- "x-amzn-client-token": input.ClientToken,
47
+ [_xact]: input[_CT],
62
48
  });
63
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
64
- "/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint";
65
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
66
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
49
+ b.bp("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint");
50
+ b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
51
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
67
52
  let body;
68
53
  body = JSON.stringify((0, smithy_client_1.take)(input, {
69
54
  ContainerType: [],
@@ -75,442 +60,278 @@ const se_CreateOriginEndpointCommand = async (input, context) => {
75
60
  StartoverWindowSeconds: [],
76
61
  Tags: (_) => (0, smithy_client_1._json)(_),
77
62
  }));
78
- return new protocol_http_1.HttpRequest({
79
- protocol,
80
- hostname,
81
- port,
82
- method: "POST",
83
- headers,
84
- path: resolvedPath,
85
- body,
86
- });
63
+ b.m("POST").h(headers).b(body);
64
+ return b.build();
87
65
  };
88
66
  exports.se_CreateOriginEndpointCommand = se_CreateOriginEndpointCommand;
89
67
  const se_DeleteChannelCommand = async (input, context) => {
90
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
68
+ const b = (0, core_1.requestBuilder)(input, context);
91
69
  const headers = {};
92
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
93
- "/channelGroup/{ChannelGroupName}/channel/{ChannelName}";
94
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
95
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
70
+ b.bp("/channelGroup/{ChannelGroupName}/channel/{ChannelName}");
71
+ b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
72
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
96
73
  let body;
97
- return new protocol_http_1.HttpRequest({
98
- protocol,
99
- hostname,
100
- port,
101
- method: "DELETE",
102
- headers,
103
- path: resolvedPath,
104
- body,
105
- });
74
+ b.m("DELETE").h(headers).b(body);
75
+ return b.build();
106
76
  };
107
77
  exports.se_DeleteChannelCommand = se_DeleteChannelCommand;
108
78
  const se_DeleteChannelGroupCommand = async (input, context) => {
109
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
79
+ const b = (0, core_1.requestBuilder)(input, context);
110
80
  const headers = {};
111
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channelGroup/{ChannelGroupName}";
112
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
81
+ b.bp("/channelGroup/{ChannelGroupName}");
82
+ b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
113
83
  let body;
114
- return new protocol_http_1.HttpRequest({
115
- protocol,
116
- hostname,
117
- port,
118
- method: "DELETE",
119
- headers,
120
- path: resolvedPath,
121
- body,
122
- });
84
+ b.m("DELETE").h(headers).b(body);
85
+ return b.build();
123
86
  };
124
87
  exports.se_DeleteChannelGroupCommand = se_DeleteChannelGroupCommand;
125
88
  const se_DeleteChannelPolicyCommand = async (input, context) => {
126
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
89
+ const b = (0, core_1.requestBuilder)(input, context);
127
90
  const headers = {};
128
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
129
- "/channelGroup/{ChannelGroupName}/channel/{ChannelName}/policy";
130
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
131
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
91
+ b.bp("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/policy");
92
+ b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
93
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
132
94
  let body;
133
- return new protocol_http_1.HttpRequest({
134
- protocol,
135
- hostname,
136
- port,
137
- method: "DELETE",
138
- headers,
139
- path: resolvedPath,
140
- body,
141
- });
95
+ b.m("DELETE").h(headers).b(body);
96
+ return b.build();
142
97
  };
143
98
  exports.se_DeleteChannelPolicyCommand = se_DeleteChannelPolicyCommand;
144
99
  const se_DeleteOriginEndpointCommand = async (input, context) => {
145
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
100
+ const b = (0, core_1.requestBuilder)(input, context);
146
101
  const headers = {};
147
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
148
- "/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}";
149
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
150
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
151
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "OriginEndpointName", () => input.OriginEndpointName, "{OriginEndpointName}", false);
102
+ b.bp("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}");
103
+ b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
104
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
105
+ b.p("OriginEndpointName", () => input.OriginEndpointName, "{OriginEndpointName}", false);
152
106
  let body;
153
- return new protocol_http_1.HttpRequest({
154
- protocol,
155
- hostname,
156
- port,
157
- method: "DELETE",
158
- headers,
159
- path: resolvedPath,
160
- body,
161
- });
107
+ b.m("DELETE").h(headers).b(body);
108
+ return b.build();
162
109
  };
163
110
  exports.se_DeleteOriginEndpointCommand = se_DeleteOriginEndpointCommand;
164
111
  const se_DeleteOriginEndpointPolicyCommand = async (input, context) => {
165
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
112
+ const b = (0, core_1.requestBuilder)(input, context);
166
113
  const headers = {};
167
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
168
- "/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/policy";
169
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
170
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
171
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "OriginEndpointName", () => input.OriginEndpointName, "{OriginEndpointName}", false);
114
+ b.bp("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/policy");
115
+ b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
116
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
117
+ b.p("OriginEndpointName", () => input.OriginEndpointName, "{OriginEndpointName}", false);
172
118
  let body;
173
- return new protocol_http_1.HttpRequest({
174
- protocol,
175
- hostname,
176
- port,
177
- method: "DELETE",
178
- headers,
179
- path: resolvedPath,
180
- body,
181
- });
119
+ b.m("DELETE").h(headers).b(body);
120
+ return b.build();
182
121
  };
183
122
  exports.se_DeleteOriginEndpointPolicyCommand = se_DeleteOriginEndpointPolicyCommand;
184
123
  const se_GetChannelCommand = async (input, context) => {
185
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
124
+ const b = (0, core_1.requestBuilder)(input, context);
186
125
  const headers = {};
187
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
188
- "/channelGroup/{ChannelGroupName}/channel/{ChannelName}";
189
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
190
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
126
+ b.bp("/channelGroup/{ChannelGroupName}/channel/{ChannelName}");
127
+ b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
128
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
191
129
  let body;
192
- return new protocol_http_1.HttpRequest({
193
- protocol,
194
- hostname,
195
- port,
196
- method: "GET",
197
- headers,
198
- path: resolvedPath,
199
- body,
200
- });
130
+ b.m("GET").h(headers).b(body);
131
+ return b.build();
201
132
  };
202
133
  exports.se_GetChannelCommand = se_GetChannelCommand;
203
134
  const se_GetChannelGroupCommand = async (input, context) => {
204
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
135
+ const b = (0, core_1.requestBuilder)(input, context);
205
136
  const headers = {};
206
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channelGroup/{ChannelGroupName}";
207
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
137
+ b.bp("/channelGroup/{ChannelGroupName}");
138
+ b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
208
139
  let body;
209
- return new protocol_http_1.HttpRequest({
210
- protocol,
211
- hostname,
212
- port,
213
- method: "GET",
214
- headers,
215
- path: resolvedPath,
216
- body,
217
- });
140
+ b.m("GET").h(headers).b(body);
141
+ return b.build();
218
142
  };
219
143
  exports.se_GetChannelGroupCommand = se_GetChannelGroupCommand;
220
144
  const se_GetChannelPolicyCommand = async (input, context) => {
221
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
145
+ const b = (0, core_1.requestBuilder)(input, context);
222
146
  const headers = {};
223
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
224
- "/channelGroup/{ChannelGroupName}/channel/{ChannelName}/policy";
225
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
226
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
147
+ b.bp("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/policy");
148
+ b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
149
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
227
150
  let body;
228
- return new protocol_http_1.HttpRequest({
229
- protocol,
230
- hostname,
231
- port,
232
- method: "GET",
233
- headers,
234
- path: resolvedPath,
235
- body,
236
- });
151
+ b.m("GET").h(headers).b(body);
152
+ return b.build();
237
153
  };
238
154
  exports.se_GetChannelPolicyCommand = se_GetChannelPolicyCommand;
239
155
  const se_GetOriginEndpointCommand = async (input, context) => {
240
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
156
+ const b = (0, core_1.requestBuilder)(input, context);
241
157
  const headers = {};
242
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
243
- "/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}";
244
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
245
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
246
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "OriginEndpointName", () => input.OriginEndpointName, "{OriginEndpointName}", false);
158
+ b.bp("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}");
159
+ b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
160
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
161
+ b.p("OriginEndpointName", () => input.OriginEndpointName, "{OriginEndpointName}", false);
247
162
  let body;
248
- return new protocol_http_1.HttpRequest({
249
- protocol,
250
- hostname,
251
- port,
252
- method: "GET",
253
- headers,
254
- path: resolvedPath,
255
- body,
256
- });
163
+ b.m("GET").h(headers).b(body);
164
+ return b.build();
257
165
  };
258
166
  exports.se_GetOriginEndpointCommand = se_GetOriginEndpointCommand;
259
167
  const se_GetOriginEndpointPolicyCommand = async (input, context) => {
260
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
168
+ const b = (0, core_1.requestBuilder)(input, context);
261
169
  const headers = {};
262
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
263
- "/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/policy";
264
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
265
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
266
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "OriginEndpointName", () => input.OriginEndpointName, "{OriginEndpointName}", false);
170
+ b.bp("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/policy");
171
+ b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
172
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
173
+ b.p("OriginEndpointName", () => input.OriginEndpointName, "{OriginEndpointName}", false);
267
174
  let body;
268
- return new protocol_http_1.HttpRequest({
269
- protocol,
270
- hostname,
271
- port,
272
- method: "GET",
273
- headers,
274
- path: resolvedPath,
275
- body,
276
- });
175
+ b.m("GET").h(headers).b(body);
176
+ return b.build();
277
177
  };
278
178
  exports.se_GetOriginEndpointPolicyCommand = se_GetOriginEndpointPolicyCommand;
279
179
  const se_ListChannelGroupsCommand = async (input, context) => {
280
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
180
+ const b = (0, core_1.requestBuilder)(input, context);
281
181
  const headers = {};
282
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channelGroup";
182
+ b.bp("/channelGroup");
283
183
  const query = (0, smithy_client_1.map)({
284
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
285
- nextToken: [, input.NextToken],
184
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
185
+ [_nT]: [, input[_NT]],
286
186
  });
287
187
  let body;
288
- return new protocol_http_1.HttpRequest({
289
- protocol,
290
- hostname,
291
- port,
292
- method: "GET",
293
- headers,
294
- path: resolvedPath,
295
- query,
296
- body,
297
- });
188
+ b.m("GET").h(headers).q(query).b(body);
189
+ return b.build();
298
190
  };
299
191
  exports.se_ListChannelGroupsCommand = se_ListChannelGroupsCommand;
300
192
  const se_ListChannelsCommand = async (input, context) => {
301
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
193
+ const b = (0, core_1.requestBuilder)(input, context);
302
194
  const headers = {};
303
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channelGroup/{ChannelGroupName}/channel";
304
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
195
+ b.bp("/channelGroup/{ChannelGroupName}/channel");
196
+ b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
305
197
  const query = (0, smithy_client_1.map)({
306
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
307
- nextToken: [, input.NextToken],
198
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
199
+ [_nT]: [, input[_NT]],
308
200
  });
309
201
  let body;
310
- return new protocol_http_1.HttpRequest({
311
- protocol,
312
- hostname,
313
- port,
314
- method: "GET",
315
- headers,
316
- path: resolvedPath,
317
- query,
318
- body,
319
- });
202
+ b.m("GET").h(headers).q(query).b(body);
203
+ return b.build();
320
204
  };
321
205
  exports.se_ListChannelsCommand = se_ListChannelsCommand;
322
206
  const se_ListOriginEndpointsCommand = async (input, context) => {
323
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
207
+ const b = (0, core_1.requestBuilder)(input, context);
324
208
  const headers = {};
325
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
326
- "/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint";
327
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
328
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
209
+ b.bp("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint");
210
+ b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
211
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
329
212
  const query = (0, smithy_client_1.map)({
330
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
331
- nextToken: [, input.NextToken],
213
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
214
+ [_nT]: [, input[_NT]],
332
215
  });
333
216
  let body;
334
- return new protocol_http_1.HttpRequest({
335
- protocol,
336
- hostname,
337
- port,
338
- method: "GET",
339
- headers,
340
- path: resolvedPath,
341
- query,
342
- body,
343
- });
217
+ b.m("GET").h(headers).q(query).b(body);
218
+ return b.build();
344
219
  };
345
220
  exports.se_ListOriginEndpointsCommand = se_ListOriginEndpointsCommand;
346
221
  const se_ListTagsForResourceCommand = async (input, context) => {
347
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
222
+ const b = (0, core_1.requestBuilder)(input, context);
348
223
  const headers = {};
349
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
350
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
224
+ b.bp("/tags/{ResourceArn}");
225
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
351
226
  let body;
352
- return new protocol_http_1.HttpRequest({
353
- protocol,
354
- hostname,
355
- port,
356
- method: "GET",
357
- headers,
358
- path: resolvedPath,
359
- body,
360
- });
227
+ b.m("GET").h(headers).b(body);
228
+ return b.build();
361
229
  };
362
230
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
363
231
  const se_PutChannelPolicyCommand = async (input, context) => {
364
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
232
+ const b = (0, core_1.requestBuilder)(input, context);
365
233
  const headers = {
366
234
  "content-type": "application/json",
367
235
  };
368
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
369
- "/channelGroup/{ChannelGroupName}/channel/{ChannelName}/policy";
370
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
371
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
236
+ b.bp("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/policy");
237
+ b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
238
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
372
239
  let body;
373
240
  body = JSON.stringify((0, smithy_client_1.take)(input, {
374
241
  Policy: [],
375
242
  }));
376
- return new protocol_http_1.HttpRequest({
377
- protocol,
378
- hostname,
379
- port,
380
- method: "PUT",
381
- headers,
382
- path: resolvedPath,
383
- body,
384
- });
243
+ b.m("PUT").h(headers).b(body);
244
+ return b.build();
385
245
  };
386
246
  exports.se_PutChannelPolicyCommand = se_PutChannelPolicyCommand;
387
247
  const se_PutOriginEndpointPolicyCommand = async (input, context) => {
388
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
248
+ const b = (0, core_1.requestBuilder)(input, context);
389
249
  const headers = {
390
250
  "content-type": "application/json",
391
251
  };
392
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
393
- "/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/policy";
394
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
395
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
396
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "OriginEndpointName", () => input.OriginEndpointName, "{OriginEndpointName}", false);
252
+ b.bp("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/policy");
253
+ b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
254
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
255
+ b.p("OriginEndpointName", () => input.OriginEndpointName, "{OriginEndpointName}", false);
397
256
  let body;
398
257
  body = JSON.stringify((0, smithy_client_1.take)(input, {
399
258
  Policy: [],
400
259
  }));
401
- return new protocol_http_1.HttpRequest({
402
- protocol,
403
- hostname,
404
- port,
405
- method: "POST",
406
- headers,
407
- path: resolvedPath,
408
- body,
409
- });
260
+ b.m("POST").h(headers).b(body);
261
+ return b.build();
410
262
  };
411
263
  exports.se_PutOriginEndpointPolicyCommand = se_PutOriginEndpointPolicyCommand;
412
264
  const se_TagResourceCommand = async (input, context) => {
413
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
265
+ const b = (0, core_1.requestBuilder)(input, context);
414
266
  const headers = {
415
267
  "content-type": "application/json",
416
268
  };
417
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
418
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
269
+ b.bp("/tags/{ResourceArn}");
270
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
419
271
  let body;
420
272
  body = JSON.stringify((0, smithy_client_1.take)(input, {
421
273
  tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
422
274
  }));
423
- return new protocol_http_1.HttpRequest({
424
- protocol,
425
- hostname,
426
- port,
427
- method: "POST",
428
- headers,
429
- path: resolvedPath,
430
- body,
431
- });
275
+ b.m("POST").h(headers).b(body);
276
+ return b.build();
432
277
  };
433
278
  exports.se_TagResourceCommand = se_TagResourceCommand;
434
279
  const se_UntagResourceCommand = async (input, context) => {
435
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
280
+ const b = (0, core_1.requestBuilder)(input, context);
436
281
  const headers = {};
437
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
438
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
282
+ b.bp("/tags/{ResourceArn}");
283
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
439
284
  const query = (0, smithy_client_1.map)({
440
- tagKeys: [
285
+ [_tK]: [
441
286
  (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
442
- () => (input.TagKeys || []).map((_entry) => _entry),
287
+ () => (input[_TK] || []).map((_entry) => _entry),
443
288
  ],
444
289
  });
445
290
  let body;
446
- return new protocol_http_1.HttpRequest({
447
- protocol,
448
- hostname,
449
- port,
450
- method: "DELETE",
451
- headers,
452
- path: resolvedPath,
453
- query,
454
- body,
455
- });
291
+ b.m("DELETE").h(headers).q(query).b(body);
292
+ return b.build();
456
293
  };
457
294
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
458
295
  const se_UpdateChannelCommand = async (input, context) => {
459
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
296
+ const b = (0, core_1.requestBuilder)(input, context);
460
297
  const headers = {
461
298
  "content-type": "application/json",
462
299
  };
463
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
464
- "/channelGroup/{ChannelGroupName}/channel/{ChannelName}";
465
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
466
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
300
+ b.bp("/channelGroup/{ChannelGroupName}/channel/{ChannelName}");
301
+ b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
302
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
467
303
  let body;
468
304
  body = JSON.stringify((0, smithy_client_1.take)(input, {
469
305
  Description: [],
470
306
  }));
471
- return new protocol_http_1.HttpRequest({
472
- protocol,
473
- hostname,
474
- port,
475
- method: "PUT",
476
- headers,
477
- path: resolvedPath,
478
- body,
479
- });
307
+ b.m("PUT").h(headers).b(body);
308
+ return b.build();
480
309
  };
481
310
  exports.se_UpdateChannelCommand = se_UpdateChannelCommand;
482
311
  const se_UpdateChannelGroupCommand = async (input, context) => {
483
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
312
+ const b = (0, core_1.requestBuilder)(input, context);
484
313
  const headers = {
485
314
  "content-type": "application/json",
486
315
  };
487
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channelGroup/{ChannelGroupName}";
488
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
316
+ b.bp("/channelGroup/{ChannelGroupName}");
317
+ b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
489
318
  let body;
490
319
  body = JSON.stringify((0, smithy_client_1.take)(input, {
491
320
  Description: [],
492
321
  }));
493
- return new protocol_http_1.HttpRequest({
494
- protocol,
495
- hostname,
496
- port,
497
- method: "PUT",
498
- headers,
499
- path: resolvedPath,
500
- body,
501
- });
322
+ b.m("PUT").h(headers).b(body);
323
+ return b.build();
502
324
  };
503
325
  exports.se_UpdateChannelGroupCommand = se_UpdateChannelGroupCommand;
504
326
  const se_UpdateOriginEndpointCommand = async (input, context) => {
505
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
327
+ const b = (0, core_1.requestBuilder)(input, context);
506
328
  const headers = {
507
329
  "content-type": "application/json",
508
330
  };
509
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
510
- "/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}";
511
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
512
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
513
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "OriginEndpointName", () => input.OriginEndpointName, "{OriginEndpointName}", false);
331
+ b.bp("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}");
332
+ b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
333
+ b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
334
+ b.p("OriginEndpointName", () => input.OriginEndpointName, "{OriginEndpointName}", false);
514
335
  let body;
515
336
  body = JSON.stringify((0, smithy_client_1.take)(input, {
516
337
  ContainerType: [],
@@ -520,15 +341,8 @@ const se_UpdateOriginEndpointCommand = async (input, context) => {
520
341
  Segment: (_) => (0, smithy_client_1._json)(_),
521
342
  StartoverWindowSeconds: [],
522
343
  }));
523
- return new protocol_http_1.HttpRequest({
524
- protocol,
525
- hostname,
526
- port,
527
- method: "PUT",
528
- headers,
529
- path: resolvedPath,
530
- body,
531
- });
344
+ b.m("PUT").h(headers).b(body);
345
+ return b.build();
532
346
  };
533
347
  exports.se_UpdateOriginEndpointCommand = se_UpdateOriginEndpointCommand;
534
348
  const de_CreateChannelCommand = async (output, context) => {
@@ -1928,6 +1742,14 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1928
1742
  value !== "" &&
1929
1743
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1930
1744
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1745
+ const _CT = "ClientToken";
1746
+ const _MR = "MaxResults";
1747
+ const _NT = "NextToken";
1748
+ const _TK = "TagKeys";
1749
+ const _mR = "maxResults";
1750
+ const _nT = "nextToken";
1751
+ const _tK = "tagKeys";
1752
+ const _xact = "x-amzn-client-token";
1931
1753
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1932
1754
  if (encoded.length) {
1933
1755
  return JSON.parse(encoded);