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