@aws-sdk/client-tnb 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,50 +1,35 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { AccessDeniedException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
4
4
  import { TnbServiceException as __BaseException } from "../models/TnbServiceException";
5
5
  export const se_CancelSolNetworkOperationCommand = 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
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
9
- "/sol/nslcm/v1/ns_lcm_op_occs/{nsLcmOpOccId}/cancel";
10
- resolvedPath = __resolvedPath(resolvedPath, input, "nsLcmOpOccId", () => input.nsLcmOpOccId, "{nsLcmOpOccId}", false);
8
+ b.bp("/sol/nslcm/v1/ns_lcm_op_occs/{nsLcmOpOccId}/cancel");
9
+ b.p("nsLcmOpOccId", () => input.nsLcmOpOccId, "{nsLcmOpOccId}", false);
11
10
  let body;
12
- return new __HttpRequest({
13
- protocol,
14
- hostname,
15
- port,
16
- method: "POST",
17
- headers,
18
- path: resolvedPath,
19
- body,
20
- });
11
+ b.m("POST").h(headers).b(body);
12
+ return b.build();
21
13
  };
22
14
  export const se_CreateSolFunctionPackageCommand = async (input, context) => {
23
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
15
+ const b = rb(input, context);
24
16
  const headers = {
25
17
  "content-type": "application/json",
26
18
  };
27
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/vnfpkgm/v1/vnf_packages";
19
+ b.bp("/sol/vnfpkgm/v1/vnf_packages");
28
20
  let body;
29
21
  body = JSON.stringify(take(input, {
30
22
  tags: (_) => _json(_),
31
23
  }));
32
- return new __HttpRequest({
33
- protocol,
34
- hostname,
35
- port,
36
- method: "POST",
37
- headers,
38
- path: resolvedPath,
39
- body,
40
- });
24
+ b.m("POST").h(headers).b(body);
25
+ return b.build();
41
26
  };
42
27
  export const se_CreateSolNetworkInstanceCommand = async (input, context) => {
43
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
28
+ const b = rb(input, context);
44
29
  const headers = {
45
30
  "content-type": "application/json",
46
31
  };
47
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nslcm/v1/ns_instances";
32
+ b.bp("/sol/nslcm/v1/ns_instances");
48
33
  let body;
49
34
  body = JSON.stringify(take(input, {
50
35
  nsDescription: [],
@@ -52,602 +37,365 @@ export const se_CreateSolNetworkInstanceCommand = async (input, context) => {
52
37
  nsdInfoId: [],
53
38
  tags: (_) => _json(_),
54
39
  }));
55
- return new __HttpRequest({
56
- protocol,
57
- hostname,
58
- port,
59
- method: "POST",
60
- headers,
61
- path: resolvedPath,
62
- body,
63
- });
40
+ b.m("POST").h(headers).b(body);
41
+ return b.build();
64
42
  };
65
43
  export const se_CreateSolNetworkPackageCommand = async (input, context) => {
66
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
44
+ const b = rb(input, context);
67
45
  const headers = {
68
46
  "content-type": "application/json",
69
47
  };
70
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nsd/v1/ns_descriptors";
48
+ b.bp("/sol/nsd/v1/ns_descriptors");
71
49
  let body;
72
50
  body = JSON.stringify(take(input, {
73
51
  tags: (_) => _json(_),
74
52
  }));
75
- return new __HttpRequest({
76
- protocol,
77
- hostname,
78
- port,
79
- method: "POST",
80
- headers,
81
- path: resolvedPath,
82
- body,
83
- });
53
+ b.m("POST").h(headers).b(body);
54
+ return b.build();
84
55
  };
85
56
  export const se_DeleteSolFunctionPackageCommand = async (input, context) => {
86
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
57
+ const b = rb(input, context);
87
58
  const headers = {};
88
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}";
89
- resolvedPath = __resolvedPath(resolvedPath, input, "vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
59
+ b.bp("/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}");
60
+ b.p("vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
90
61
  let body;
91
- return new __HttpRequest({
92
- protocol,
93
- hostname,
94
- port,
95
- method: "DELETE",
96
- headers,
97
- path: resolvedPath,
98
- body,
99
- });
62
+ b.m("DELETE").h(headers).b(body);
63
+ return b.build();
100
64
  };
101
65
  export const se_DeleteSolNetworkInstanceCommand = async (input, context) => {
102
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
66
+ const b = rb(input, context);
103
67
  const headers = {};
104
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nslcm/v1/ns_instances/{nsInstanceId}";
105
- resolvedPath = __resolvedPath(resolvedPath, input, "nsInstanceId", () => input.nsInstanceId, "{nsInstanceId}", false);
68
+ b.bp("/sol/nslcm/v1/ns_instances/{nsInstanceId}");
69
+ b.p("nsInstanceId", () => input.nsInstanceId, "{nsInstanceId}", false);
106
70
  let body;
107
- return new __HttpRequest({
108
- protocol,
109
- hostname,
110
- port,
111
- method: "DELETE",
112
- headers,
113
- path: resolvedPath,
114
- body,
115
- });
71
+ b.m("DELETE").h(headers).b(body);
72
+ return b.build();
116
73
  };
117
74
  export const se_DeleteSolNetworkPackageCommand = async (input, context) => {
118
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
75
+ const b = rb(input, context);
119
76
  const headers = {};
120
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nsd/v1/ns_descriptors/{nsdInfoId}";
121
- resolvedPath = __resolvedPath(resolvedPath, input, "nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
77
+ b.bp("/sol/nsd/v1/ns_descriptors/{nsdInfoId}");
78
+ b.p("nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
122
79
  let body;
123
- return new __HttpRequest({
124
- protocol,
125
- hostname,
126
- port,
127
- method: "DELETE",
128
- headers,
129
- path: resolvedPath,
130
- body,
131
- });
80
+ b.m("DELETE").h(headers).b(body);
81
+ return b.build();
132
82
  };
133
83
  export const se_GetSolFunctionInstanceCommand = async (input, context) => {
134
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
84
+ const b = rb(input, context);
135
85
  const headers = {};
136
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
137
- "/sol/vnflcm/v1/vnf_instances/{vnfInstanceId}";
138
- resolvedPath = __resolvedPath(resolvedPath, input, "vnfInstanceId", () => input.vnfInstanceId, "{vnfInstanceId}", false);
86
+ b.bp("/sol/vnflcm/v1/vnf_instances/{vnfInstanceId}");
87
+ b.p("vnfInstanceId", () => input.vnfInstanceId, "{vnfInstanceId}", false);
139
88
  let body;
140
- return new __HttpRequest({
141
- protocol,
142
- hostname,
143
- port,
144
- method: "GET",
145
- headers,
146
- path: resolvedPath,
147
- body,
148
- });
89
+ b.m("GET").h(headers).b(body);
90
+ return b.build();
149
91
  };
150
92
  export const se_GetSolFunctionPackageCommand = async (input, context) => {
151
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
93
+ const b = rb(input, context);
152
94
  const headers = {};
153
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}";
154
- resolvedPath = __resolvedPath(resolvedPath, input, "vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
95
+ b.bp("/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}");
96
+ b.p("vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
155
97
  let body;
156
- return new __HttpRequest({
157
- protocol,
158
- hostname,
159
- port,
160
- method: "GET",
161
- headers,
162
- path: resolvedPath,
163
- body,
164
- });
98
+ b.m("GET").h(headers).b(body);
99
+ return b.build();
165
100
  };
166
101
  export const se_GetSolFunctionPackageContentCommand = async (input, context) => {
167
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
102
+ const b = rb(input, context);
168
103
  const headers = map({}, isSerializableHeaderValue, {
169
- accept: input.accept,
104
+ [_a]: input[_a],
170
105
  });
171
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
172
- "/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}/package_content";
173
- resolvedPath = __resolvedPath(resolvedPath, input, "vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
106
+ b.bp("/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}/package_content");
107
+ b.p("vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
174
108
  let body;
175
- return new __HttpRequest({
176
- protocol,
177
- hostname,
178
- port,
179
- method: "GET",
180
- headers,
181
- path: resolvedPath,
182
- body,
183
- });
109
+ b.m("GET").h(headers).b(body);
110
+ return b.build();
184
111
  };
185
112
  export const se_GetSolFunctionPackageDescriptorCommand = async (input, context) => {
186
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
113
+ const b = rb(input, context);
187
114
  const headers = map({}, isSerializableHeaderValue, {
188
- accept: input.accept,
115
+ [_a]: input[_a],
189
116
  });
190
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
191
- "/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}/vnfd";
192
- resolvedPath = __resolvedPath(resolvedPath, input, "vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
117
+ b.bp("/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}/vnfd");
118
+ b.p("vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
193
119
  let body;
194
- return new __HttpRequest({
195
- protocol,
196
- hostname,
197
- port,
198
- method: "GET",
199
- headers,
200
- path: resolvedPath,
201
- body,
202
- });
120
+ b.m("GET").h(headers).b(body);
121
+ return b.build();
203
122
  };
204
123
  export const se_GetSolNetworkInstanceCommand = async (input, context) => {
205
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
124
+ const b = rb(input, context);
206
125
  const headers = {};
207
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nslcm/v1/ns_instances/{nsInstanceId}";
208
- resolvedPath = __resolvedPath(resolvedPath, input, "nsInstanceId", () => input.nsInstanceId, "{nsInstanceId}", false);
126
+ b.bp("/sol/nslcm/v1/ns_instances/{nsInstanceId}");
127
+ b.p("nsInstanceId", () => input.nsInstanceId, "{nsInstanceId}", false);
209
128
  let body;
210
- return new __HttpRequest({
211
- protocol,
212
- hostname,
213
- port,
214
- method: "GET",
215
- headers,
216
- path: resolvedPath,
217
- body,
218
- });
129
+ b.m("GET").h(headers).b(body);
130
+ return b.build();
219
131
  };
220
132
  export const se_GetSolNetworkOperationCommand = async (input, context) => {
221
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
133
+ const b = rb(input, context);
222
134
  const headers = {};
223
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
224
- "/sol/nslcm/v1/ns_lcm_op_occs/{nsLcmOpOccId}";
225
- resolvedPath = __resolvedPath(resolvedPath, input, "nsLcmOpOccId", () => input.nsLcmOpOccId, "{nsLcmOpOccId}", false);
135
+ b.bp("/sol/nslcm/v1/ns_lcm_op_occs/{nsLcmOpOccId}");
136
+ b.p("nsLcmOpOccId", () => input.nsLcmOpOccId, "{nsLcmOpOccId}", false);
226
137
  let body;
227
- return new __HttpRequest({
228
- protocol,
229
- hostname,
230
- port,
231
- method: "GET",
232
- headers,
233
- path: resolvedPath,
234
- body,
235
- });
138
+ b.m("GET").h(headers).b(body);
139
+ return b.build();
236
140
  };
237
141
  export const se_GetSolNetworkPackageCommand = async (input, context) => {
238
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
142
+ const b = rb(input, context);
239
143
  const headers = {};
240
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nsd/v1/ns_descriptors/{nsdInfoId}";
241
- resolvedPath = __resolvedPath(resolvedPath, input, "nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
144
+ b.bp("/sol/nsd/v1/ns_descriptors/{nsdInfoId}");
145
+ b.p("nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
242
146
  let body;
243
- return new __HttpRequest({
244
- protocol,
245
- hostname,
246
- port,
247
- method: "GET",
248
- headers,
249
- path: resolvedPath,
250
- body,
251
- });
147
+ b.m("GET").h(headers).b(body);
148
+ return b.build();
252
149
  };
253
150
  export const se_GetSolNetworkPackageContentCommand = async (input, context) => {
254
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
151
+ const b = rb(input, context);
255
152
  const headers = map({}, isSerializableHeaderValue, {
256
- accept: input.accept,
153
+ [_a]: input[_a],
257
154
  });
258
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
259
- "/sol/nsd/v1/ns_descriptors/{nsdInfoId}/nsd_content";
260
- resolvedPath = __resolvedPath(resolvedPath, input, "nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
155
+ b.bp("/sol/nsd/v1/ns_descriptors/{nsdInfoId}/nsd_content");
156
+ b.p("nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
261
157
  let body;
262
- return new __HttpRequest({
263
- protocol,
264
- hostname,
265
- port,
266
- method: "GET",
267
- headers,
268
- path: resolvedPath,
269
- body,
270
- });
158
+ b.m("GET").h(headers).b(body);
159
+ return b.build();
271
160
  };
272
161
  export const se_GetSolNetworkPackageDescriptorCommand = async (input, context) => {
273
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
162
+ const b = rb(input, context);
274
163
  const headers = {};
275
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
276
- "/sol/nsd/v1/ns_descriptors/{nsdInfoId}/nsd";
277
- resolvedPath = __resolvedPath(resolvedPath, input, "nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
164
+ b.bp("/sol/nsd/v1/ns_descriptors/{nsdInfoId}/nsd");
165
+ b.p("nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
278
166
  let body;
279
- return new __HttpRequest({
280
- protocol,
281
- hostname,
282
- port,
283
- method: "GET",
284
- headers,
285
- path: resolvedPath,
286
- body,
287
- });
167
+ b.m("GET").h(headers).b(body);
168
+ return b.build();
288
169
  };
289
170
  export const se_InstantiateSolNetworkInstanceCommand = async (input, context) => {
290
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
171
+ const b = rb(input, context);
291
172
  const headers = {
292
173
  "content-type": "application/json",
293
174
  };
294
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
295
- "/sol/nslcm/v1/ns_instances/{nsInstanceId}/instantiate";
296
- resolvedPath = __resolvedPath(resolvedPath, input, "nsInstanceId", () => input.nsInstanceId, "{nsInstanceId}", false);
175
+ b.bp("/sol/nslcm/v1/ns_instances/{nsInstanceId}/instantiate");
176
+ b.p("nsInstanceId", () => input.nsInstanceId, "{nsInstanceId}", false);
297
177
  const query = map({
298
- dry_run: [() => input.dryRun !== void 0, () => input.dryRun.toString()],
178
+ [_dr]: [() => input.dryRun !== void 0, () => input[_dR].toString()],
299
179
  });
300
180
  let body;
301
181
  body = JSON.stringify(take(input, {
302
182
  additionalParamsForNs: (_) => se_Document(_, context),
303
183
  tags: (_) => _json(_),
304
184
  }));
305
- return new __HttpRequest({
306
- protocol,
307
- hostname,
308
- port,
309
- method: "POST",
310
- headers,
311
- path: resolvedPath,
312
- query,
313
- body,
314
- });
185
+ b.m("POST").h(headers).q(query).b(body);
186
+ return b.build();
315
187
  };
316
188
  export const se_ListSolFunctionInstancesCommand = async (input, context) => {
317
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
189
+ const b = rb(input, context);
318
190
  const headers = {};
319
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/vnflcm/v1/vnf_instances";
191
+ b.bp("/sol/vnflcm/v1/vnf_instances");
320
192
  const query = map({
321
- max_results: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
322
- nextpage_opaque_marker: [, input.nextToken],
193
+ [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
194
+ [_nom]: [, input[_nT]],
323
195
  });
324
196
  let body;
325
- return new __HttpRequest({
326
- protocol,
327
- hostname,
328
- port,
329
- method: "GET",
330
- headers,
331
- path: resolvedPath,
332
- query,
333
- body,
334
- });
197
+ b.m("GET").h(headers).q(query).b(body);
198
+ return b.build();
335
199
  };
336
200
  export const se_ListSolFunctionPackagesCommand = async (input, context) => {
337
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
201
+ const b = rb(input, context);
338
202
  const headers = {};
339
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/vnfpkgm/v1/vnf_packages";
203
+ b.bp("/sol/vnfpkgm/v1/vnf_packages");
340
204
  const query = map({
341
- max_results: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
342
- nextpage_opaque_marker: [, input.nextToken],
205
+ [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
206
+ [_nom]: [, input[_nT]],
343
207
  });
344
208
  let body;
345
- return new __HttpRequest({
346
- protocol,
347
- hostname,
348
- port,
349
- method: "GET",
350
- headers,
351
- path: resolvedPath,
352
- query,
353
- body,
354
- });
209
+ b.m("GET").h(headers).q(query).b(body);
210
+ return b.build();
355
211
  };
356
212
  export const se_ListSolNetworkInstancesCommand = async (input, context) => {
357
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
213
+ const b = rb(input, context);
358
214
  const headers = {};
359
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nslcm/v1/ns_instances";
215
+ b.bp("/sol/nslcm/v1/ns_instances");
360
216
  const query = map({
361
- max_results: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
362
- nextpage_opaque_marker: [, input.nextToken],
217
+ [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
218
+ [_nom]: [, input[_nT]],
363
219
  });
364
220
  let body;
365
- return new __HttpRequest({
366
- protocol,
367
- hostname,
368
- port,
369
- method: "GET",
370
- headers,
371
- path: resolvedPath,
372
- query,
373
- body,
374
- });
221
+ b.m("GET").h(headers).q(query).b(body);
222
+ return b.build();
375
223
  };
376
224
  export const se_ListSolNetworkOperationsCommand = async (input, context) => {
377
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
225
+ const b = rb(input, context);
378
226
  const headers = {};
379
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nslcm/v1/ns_lcm_op_occs";
227
+ b.bp("/sol/nslcm/v1/ns_lcm_op_occs");
380
228
  const query = map({
381
- max_results: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
382
- nextpage_opaque_marker: [, input.nextToken],
229
+ [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
230
+ [_nom]: [, input[_nT]],
383
231
  });
384
232
  let body;
385
- return new __HttpRequest({
386
- protocol,
387
- hostname,
388
- port,
389
- method: "GET",
390
- headers,
391
- path: resolvedPath,
392
- query,
393
- body,
394
- });
233
+ b.m("GET").h(headers).q(query).b(body);
234
+ return b.build();
395
235
  };
396
236
  export const se_ListSolNetworkPackagesCommand = async (input, context) => {
397
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
237
+ const b = rb(input, context);
398
238
  const headers = {};
399
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nsd/v1/ns_descriptors";
239
+ b.bp("/sol/nsd/v1/ns_descriptors");
400
240
  const query = map({
401
- max_results: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
402
- nextpage_opaque_marker: [, input.nextToken],
241
+ [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
242
+ [_nom]: [, input[_nT]],
403
243
  });
404
244
  let body;
405
- return new __HttpRequest({
406
- protocol,
407
- hostname,
408
- port,
409
- method: "GET",
410
- headers,
411
- path: resolvedPath,
412
- query,
413
- body,
414
- });
245
+ b.m("GET").h(headers).q(query).b(body);
246
+ return b.build();
415
247
  };
416
248
  export const se_ListTagsForResourceCommand = async (input, context) => {
417
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
249
+ const b = rb(input, context);
418
250
  const headers = {};
419
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
420
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
251
+ b.bp("/tags/{resourceArn}");
252
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
421
253
  let body;
422
- return new __HttpRequest({
423
- protocol,
424
- hostname,
425
- port,
426
- method: "GET",
427
- headers,
428
- path: resolvedPath,
429
- body,
430
- });
254
+ b.m("GET").h(headers).b(body);
255
+ return b.build();
431
256
  };
432
257
  export const se_PutSolFunctionPackageContentCommand = async (input, context) => {
433
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
258
+ const b = rb(input, context);
434
259
  const headers = map({}, isSerializableHeaderValue, {
435
- "content-type": input.contentType || "application/octet-stream",
260
+ [_ct]: input[_cT] || "application/octet-stream",
436
261
  });
437
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
438
- "/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}/package_content";
439
- resolvedPath = __resolvedPath(resolvedPath, input, "vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
262
+ b.bp("/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}/package_content");
263
+ b.p("vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
440
264
  let body;
441
265
  if (input.file !== undefined) {
442
266
  body = input.file;
443
267
  }
444
- return new __HttpRequest({
445
- protocol,
446
- hostname,
447
- port,
448
- method: "PUT",
449
- headers,
450
- path: resolvedPath,
451
- body,
452
- });
268
+ b.m("PUT").h(headers).b(body);
269
+ return b.build();
453
270
  };
454
271
  export const se_PutSolNetworkPackageContentCommand = async (input, context) => {
455
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
272
+ const b = rb(input, context);
456
273
  const headers = map({}, isSerializableHeaderValue, {
457
- "content-type": input.contentType || "application/octet-stream",
274
+ [_ct]: input[_cT] || "application/octet-stream",
458
275
  });
459
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
460
- "/sol/nsd/v1/ns_descriptors/{nsdInfoId}/nsd_content";
461
- resolvedPath = __resolvedPath(resolvedPath, input, "nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
276
+ b.bp("/sol/nsd/v1/ns_descriptors/{nsdInfoId}/nsd_content");
277
+ b.p("nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
462
278
  let body;
463
279
  if (input.file !== undefined) {
464
280
  body = input.file;
465
281
  }
466
- return new __HttpRequest({
467
- protocol,
468
- hostname,
469
- port,
470
- method: "PUT",
471
- headers,
472
- path: resolvedPath,
473
- body,
474
- });
282
+ b.m("PUT").h(headers).b(body);
283
+ return b.build();
475
284
  };
476
285
  export const se_TagResourceCommand = async (input, context) => {
477
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
286
+ const b = rb(input, context);
478
287
  const headers = {
479
288
  "content-type": "application/json",
480
289
  };
481
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
482
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
290
+ b.bp("/tags/{resourceArn}");
291
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
483
292
  let body;
484
293
  body = JSON.stringify(take(input, {
485
294
  tags: (_) => _json(_),
486
295
  }));
487
- return new __HttpRequest({
488
- protocol,
489
- hostname,
490
- port,
491
- method: "POST",
492
- headers,
493
- path: resolvedPath,
494
- body,
495
- });
296
+ b.m("POST").h(headers).b(body);
297
+ return b.build();
496
298
  };
497
299
  export const se_TerminateSolNetworkInstanceCommand = async (input, context) => {
498
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
300
+ const b = rb(input, context);
499
301
  const headers = {
500
302
  "content-type": "application/json",
501
303
  };
502
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
503
- "/sol/nslcm/v1/ns_instances/{nsInstanceId}/terminate";
504
- resolvedPath = __resolvedPath(resolvedPath, input, "nsInstanceId", () => input.nsInstanceId, "{nsInstanceId}", false);
304
+ b.bp("/sol/nslcm/v1/ns_instances/{nsInstanceId}/terminate");
305
+ b.p("nsInstanceId", () => input.nsInstanceId, "{nsInstanceId}", false);
505
306
  let body;
506
307
  body = JSON.stringify(take(input, {
507
308
  tags: (_) => _json(_),
508
309
  }));
509
- return new __HttpRequest({
510
- protocol,
511
- hostname,
512
- port,
513
- method: "POST",
514
- headers,
515
- path: resolvedPath,
516
- body,
517
- });
310
+ b.m("POST").h(headers).b(body);
311
+ return b.build();
518
312
  };
519
313
  export const se_UntagResourceCommand = async (input, context) => {
520
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
314
+ const b = rb(input, context);
521
315
  const headers = {};
522
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
523
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
316
+ b.bp("/tags/{resourceArn}");
317
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
524
318
  const query = map({
525
- tagKeys: [
319
+ [_tK]: [
526
320
  __expectNonNull(input.tagKeys, `tagKeys`) != null,
527
- () => (input.tagKeys || []).map((_entry) => _entry),
321
+ () => (input[_tK] || []).map((_entry) => _entry),
528
322
  ],
529
323
  });
530
324
  let body;
531
- return new __HttpRequest({
532
- protocol,
533
- hostname,
534
- port,
535
- method: "DELETE",
536
- headers,
537
- path: resolvedPath,
538
- query,
539
- body,
540
- });
325
+ b.m("DELETE").h(headers).q(query).b(body);
326
+ return b.build();
541
327
  };
542
328
  export const se_UpdateSolFunctionPackageCommand = async (input, context) => {
543
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
329
+ const b = rb(input, context);
544
330
  const headers = {
545
331
  "content-type": "application/json",
546
332
  };
547
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}";
548
- resolvedPath = __resolvedPath(resolvedPath, input, "vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
333
+ b.bp("/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}");
334
+ b.p("vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
549
335
  let body;
550
336
  body = JSON.stringify(take(input, {
551
337
  operationalState: [],
552
338
  }));
553
- return new __HttpRequest({
554
- protocol,
555
- hostname,
556
- port,
557
- method: "PATCH",
558
- headers,
559
- path: resolvedPath,
560
- body,
561
- });
339
+ b.m("PATCH").h(headers).b(body);
340
+ return b.build();
562
341
  };
563
342
  export const se_UpdateSolNetworkInstanceCommand = async (input, context) => {
564
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
343
+ const b = rb(input, context);
565
344
  const headers = {
566
345
  "content-type": "application/json",
567
346
  };
568
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
569
- "/sol/nslcm/v1/ns_instances/{nsInstanceId}/update";
570
- resolvedPath = __resolvedPath(resolvedPath, input, "nsInstanceId", () => input.nsInstanceId, "{nsInstanceId}", false);
347
+ b.bp("/sol/nslcm/v1/ns_instances/{nsInstanceId}/update");
348
+ b.p("nsInstanceId", () => input.nsInstanceId, "{nsInstanceId}", false);
571
349
  let body;
572
350
  body = JSON.stringify(take(input, {
573
351
  modifyVnfInfoData: (_) => se_UpdateSolNetworkModify(_, context),
574
352
  tags: (_) => _json(_),
575
353
  updateType: [],
576
354
  }));
577
- return new __HttpRequest({
578
- protocol,
579
- hostname,
580
- port,
581
- method: "POST",
582
- headers,
583
- path: resolvedPath,
584
- body,
585
- });
355
+ b.m("POST").h(headers).b(body);
356
+ return b.build();
586
357
  };
587
358
  export const se_UpdateSolNetworkPackageCommand = async (input, context) => {
588
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
359
+ const b = rb(input, context);
589
360
  const headers = {
590
361
  "content-type": "application/json",
591
362
  };
592
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nsd/v1/ns_descriptors/{nsdInfoId}";
593
- resolvedPath = __resolvedPath(resolvedPath, input, "nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
363
+ b.bp("/sol/nsd/v1/ns_descriptors/{nsdInfoId}");
364
+ b.p("nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
594
365
  let body;
595
366
  body = JSON.stringify(take(input, {
596
367
  nsdOperationalState: [],
597
368
  }));
598
- return new __HttpRequest({
599
- protocol,
600
- hostname,
601
- port,
602
- method: "PATCH",
603
- headers,
604
- path: resolvedPath,
605
- body,
606
- });
369
+ b.m("PATCH").h(headers).b(body);
370
+ return b.build();
607
371
  };
608
372
  export const se_ValidateSolFunctionPackageContentCommand = async (input, context) => {
609
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
373
+ const b = rb(input, context);
610
374
  const headers = map({}, isSerializableHeaderValue, {
611
- "content-type": input.contentType || "application/octet-stream",
375
+ [_ct]: input[_cT] || "application/octet-stream",
612
376
  });
613
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
614
- "/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}/package_content/validate";
615
- resolvedPath = __resolvedPath(resolvedPath, input, "vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
377
+ b.bp("/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}/package_content/validate");
378
+ b.p("vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
616
379
  let body;
617
380
  if (input.file !== undefined) {
618
381
  body = input.file;
619
382
  }
620
- return new __HttpRequest({
621
- protocol,
622
- hostname,
623
- port,
624
- method: "PUT",
625
- headers,
626
- path: resolvedPath,
627
- body,
628
- });
383
+ b.m("PUT").h(headers).b(body);
384
+ return b.build();
629
385
  };
630
386
  export const se_ValidateSolNetworkPackageContentCommand = async (input, context) => {
631
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
387
+ const b = rb(input, context);
632
388
  const headers = map({}, isSerializableHeaderValue, {
633
- "content-type": input.contentType || "application/octet-stream",
389
+ [_ct]: input[_cT] || "application/octet-stream",
634
390
  });
635
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
636
- "/sol/nsd/v1/ns_descriptors/{nsdInfoId}/nsd_content/validate";
637
- resolvedPath = __resolvedPath(resolvedPath, input, "nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
391
+ b.bp("/sol/nsd/v1/ns_descriptors/{nsdInfoId}/nsd_content/validate");
392
+ b.p("nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
638
393
  let body;
639
394
  if (input.file !== undefined) {
640
395
  body = input.file;
641
396
  }
642
- return new __HttpRequest({
643
- protocol,
644
- hostname,
645
- port,
646
- method: "PUT",
647
- headers,
648
- path: resolvedPath,
649
- body,
650
- });
397
+ b.m("PUT").h(headers).b(body);
398
+ return b.build();
651
399
  };
652
400
  export const de_CancelSolNetworkOperationCommand = async (output, context) => {
653
401
  if (output.statusCode !== 202 && output.statusCode >= 300) {
@@ -1082,7 +830,7 @@ export const de_GetSolFunctionPackageContentCommand = async (output, context) =>
1082
830
  }
1083
831
  const contents = map({
1084
832
  $metadata: deserializeMetadata(output),
1085
- contentType: [, output.headers["content-type"]],
833
+ [_cT]: [, output.headers[_ct]],
1086
834
  });
1087
835
  const data = await collectBody(output.body, context);
1088
836
  contents.packageContent = data;
@@ -1125,7 +873,7 @@ export const de_GetSolFunctionPackageDescriptorCommand = async (output, context)
1125
873
  }
1126
874
  const contents = map({
1127
875
  $metadata: deserializeMetadata(output),
1128
- contentType: [, output.headers["content-type"]],
876
+ [_cT]: [, output.headers[_ct]],
1129
877
  });
1130
878
  const data = await collectBody(output.body, context);
1131
879
  contents.vnfd = data;
@@ -1330,7 +1078,7 @@ export const de_GetSolNetworkPackageContentCommand = async (output, context) =>
1330
1078
  }
1331
1079
  const contents = map({
1332
1080
  $metadata: deserializeMetadata(output),
1333
- contentType: [, output.headers["content-type"]],
1081
+ [_cT]: [, output.headers[_ct]],
1334
1082
  });
1335
1083
  const data = await collectBody(output.body, context);
1336
1084
  contents.nsdContent = data;
@@ -1373,7 +1121,7 @@ export const de_GetSolNetworkPackageDescriptorCommand = async (output, context)
1373
1121
  }
1374
1122
  const contents = map({
1375
1123
  $metadata: deserializeMetadata(output),
1376
- contentType: [, output.headers["content-type"]],
1124
+ [_cT]: [, output.headers[_ct]],
1377
1125
  });
1378
1126
  const data = await collectBody(output.body, context);
1379
1127
  contents.nsd = data;
@@ -2476,6 +2224,16 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2476
2224
  value !== "" &&
2477
2225
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2478
2226
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2227
+ const _a = "accept";
2228
+ const _cT = "contentType";
2229
+ const _ct = "content-type";
2230
+ const _dR = "dryRun";
2231
+ const _dr = "dry_run";
2232
+ const _mR = "maxResults";
2233
+ const _mr = "max_results";
2234
+ const _nT = "nextToken";
2235
+ const _nom = "nextpage_opaque_marker";
2236
+ const _tK = "tagKeys";
2479
2237
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2480
2238
  if (encoded.length) {
2481
2239
  return JSON.parse(encoded);