@aws-sdk/client-codeartifact 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,43 +1,35 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
2
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { CodeartifactServiceException as __BaseException } from "../models/CodeartifactServiceException";
4
4
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
5
  export const se_AssociateExternalConnectionCommand = 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
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/repository/external-connection";
8
+ b.bp("/v1/repository/external-connection");
9
9
  const query = map({
10
- domain: [, __expectNonNull(input.domain, `domain`)],
11
- "domain-owner": [, input.domainOwner],
12
- repository: [, __expectNonNull(input.repository, `repository`)],
13
- "external-connection": [, __expectNonNull(input.externalConnection, `externalConnection`)],
10
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
11
+ [_do]: [, input[_dO]],
12
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
13
+ [_ec]: [, __expectNonNull(input[_eC], `externalConnection`)],
14
14
  });
15
15
  let body;
16
- return new __HttpRequest({
17
- protocol,
18
- hostname,
19
- port,
20
- method: "POST",
21
- headers,
22
- path: resolvedPath,
23
- query,
24
- body,
25
- });
16
+ b.m("POST").h(headers).q(query).b(body);
17
+ return b.build();
26
18
  };
27
19
  export const se_CopyPackageVersionsCommand = async (input, context) => {
28
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
20
+ const b = rb(input, context);
29
21
  const headers = {
30
22
  "content-type": "application/json",
31
23
  };
32
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/package/versions/copy";
24
+ b.bp("/v1/package/versions/copy");
33
25
  const query = map({
34
- domain: [, __expectNonNull(input.domain, `domain`)],
35
- "domain-owner": [, input.domainOwner],
36
- "source-repository": [, __expectNonNull(input.sourceRepository, `sourceRepository`)],
37
- "destination-repository": [, __expectNonNull(input.destinationRepository, `destinationRepository`)],
38
- format: [, __expectNonNull(input.format, `format`)],
39
- namespace: [, input.namespace],
40
- package: [, __expectNonNull(input.package, `package`)],
26
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
27
+ [_do]: [, input[_dO]],
28
+ [_sr]: [, __expectNonNull(input[_sR], `sourceRepository`)],
29
+ [_dr]: [, __expectNonNull(input[_dR], `destinationRepository`)],
30
+ [_f]: [, __expectNonNull(input[_f], `format`)],
31
+ [_n]: [, input[_n]],
32
+ [_p]: [, __expectNonNull(input[_p], `package`)],
41
33
  });
42
34
  let body;
43
35
  body = JSON.stringify(take(input, {
@@ -46,52 +38,36 @@ export const se_CopyPackageVersionsCommand = async (input, context) => {
46
38
  versionRevisions: (_) => _json(_),
47
39
  versions: (_) => _json(_),
48
40
  }));
49
- return new __HttpRequest({
50
- protocol,
51
- hostname,
52
- port,
53
- method: "POST",
54
- headers,
55
- path: resolvedPath,
56
- query,
57
- body,
58
- });
41
+ b.m("POST").h(headers).q(query).b(body);
42
+ return b.build();
59
43
  };
60
44
  export const se_CreateDomainCommand = async (input, context) => {
61
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
45
+ const b = rb(input, context);
62
46
  const headers = {
63
47
  "content-type": "application/json",
64
48
  };
65
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/domain";
49
+ b.bp("/v1/domain");
66
50
  const query = map({
67
- domain: [, __expectNonNull(input.domain, `domain`)],
51
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
68
52
  });
69
53
  let body;
70
54
  body = JSON.stringify(take(input, {
71
55
  encryptionKey: [],
72
56
  tags: (_) => _json(_),
73
57
  }));
74
- return new __HttpRequest({
75
- protocol,
76
- hostname,
77
- port,
78
- method: "POST",
79
- headers,
80
- path: resolvedPath,
81
- query,
82
- body,
83
- });
58
+ b.m("POST").h(headers).q(query).b(body);
59
+ return b.build();
84
60
  };
85
61
  export const se_CreateRepositoryCommand = async (input, context) => {
86
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
62
+ const b = rb(input, context);
87
63
  const headers = {
88
64
  "content-type": "application/json",
89
65
  };
90
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/repository";
66
+ b.bp("/v1/repository");
91
67
  const query = map({
92
- domain: [, __expectNonNull(input.domain, `domain`)],
93
- "domain-owner": [, input.domainOwner],
94
- repository: [, __expectNonNull(input.repository, `repository`)],
68
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
69
+ [_do]: [, input[_dO]],
70
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
95
71
  });
96
72
  let body;
97
73
  body = JSON.stringify(take(input, {
@@ -99,280 +75,184 @@ export const se_CreateRepositoryCommand = async (input, context) => {
99
75
  tags: (_) => _json(_),
100
76
  upstreams: (_) => _json(_),
101
77
  }));
102
- return new __HttpRequest({
103
- protocol,
104
- hostname,
105
- port,
106
- method: "POST",
107
- headers,
108
- path: resolvedPath,
109
- query,
110
- body,
111
- });
78
+ b.m("POST").h(headers).q(query).b(body);
79
+ return b.build();
112
80
  };
113
81
  export const se_DeleteDomainCommand = async (input, context) => {
114
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
82
+ const b = rb(input, context);
115
83
  const headers = {};
116
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/domain";
84
+ b.bp("/v1/domain");
117
85
  const query = map({
118
- domain: [, __expectNonNull(input.domain, `domain`)],
119
- "domain-owner": [, input.domainOwner],
86
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
87
+ [_do]: [, input[_dO]],
120
88
  });
121
89
  let body;
122
- return new __HttpRequest({
123
- protocol,
124
- hostname,
125
- port,
126
- method: "DELETE",
127
- headers,
128
- path: resolvedPath,
129
- query,
130
- body,
131
- });
90
+ b.m("DELETE").h(headers).q(query).b(body);
91
+ return b.build();
132
92
  };
133
93
  export const se_DeleteDomainPermissionsPolicyCommand = async (input, context) => {
134
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
94
+ const b = rb(input, context);
135
95
  const headers = {};
136
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/domain/permissions/policy";
96
+ b.bp("/v1/domain/permissions/policy");
137
97
  const query = map({
138
- domain: [, __expectNonNull(input.domain, `domain`)],
139
- "domain-owner": [, input.domainOwner],
140
- "policy-revision": [, input.policyRevision],
98
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
99
+ [_do]: [, input[_dO]],
100
+ [_pr]: [, input[_pR]],
141
101
  });
142
102
  let body;
143
- return new __HttpRequest({
144
- protocol,
145
- hostname,
146
- port,
147
- method: "DELETE",
148
- headers,
149
- path: resolvedPath,
150
- query,
151
- body,
152
- });
103
+ b.m("DELETE").h(headers).q(query).b(body);
104
+ return b.build();
153
105
  };
154
106
  export const se_DeletePackageCommand = async (input, context) => {
155
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
107
+ const b = rb(input, context);
156
108
  const headers = {};
157
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/package";
109
+ b.bp("/v1/package");
158
110
  const query = map({
159
- domain: [, __expectNonNull(input.domain, `domain`)],
160
- "domain-owner": [, input.domainOwner],
161
- repository: [, __expectNonNull(input.repository, `repository`)],
162
- format: [, __expectNonNull(input.format, `format`)],
163
- namespace: [, input.namespace],
164
- package: [, __expectNonNull(input.package, `package`)],
111
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
112
+ [_do]: [, input[_dO]],
113
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
114
+ [_f]: [, __expectNonNull(input[_f], `format`)],
115
+ [_n]: [, input[_n]],
116
+ [_p]: [, __expectNonNull(input[_p], `package`)],
165
117
  });
166
118
  let body;
167
- return new __HttpRequest({
168
- protocol,
169
- hostname,
170
- port,
171
- method: "DELETE",
172
- headers,
173
- path: resolvedPath,
174
- query,
175
- body,
176
- });
119
+ b.m("DELETE").h(headers).q(query).b(body);
120
+ return b.build();
177
121
  };
178
122
  export const se_DeletePackageVersionsCommand = async (input, context) => {
179
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
123
+ const b = rb(input, context);
180
124
  const headers = {
181
125
  "content-type": "application/json",
182
126
  };
183
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/package/versions/delete";
127
+ b.bp("/v1/package/versions/delete");
184
128
  const query = map({
185
- domain: [, __expectNonNull(input.domain, `domain`)],
186
- "domain-owner": [, input.domainOwner],
187
- repository: [, __expectNonNull(input.repository, `repository`)],
188
- format: [, __expectNonNull(input.format, `format`)],
189
- namespace: [, input.namespace],
190
- package: [, __expectNonNull(input.package, `package`)],
129
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
130
+ [_do]: [, input[_dO]],
131
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
132
+ [_f]: [, __expectNonNull(input[_f], `format`)],
133
+ [_n]: [, input[_n]],
134
+ [_p]: [, __expectNonNull(input[_p], `package`)],
191
135
  });
192
136
  let body;
193
137
  body = JSON.stringify(take(input, {
194
138
  expectedStatus: [],
195
139
  versions: (_) => _json(_),
196
140
  }));
197
- return new __HttpRequest({
198
- protocol,
199
- hostname,
200
- port,
201
- method: "POST",
202
- headers,
203
- path: resolvedPath,
204
- query,
205
- body,
206
- });
141
+ b.m("POST").h(headers).q(query).b(body);
142
+ return b.build();
207
143
  };
208
144
  export const se_DeleteRepositoryCommand = async (input, context) => {
209
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
145
+ const b = rb(input, context);
210
146
  const headers = {};
211
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/repository";
147
+ b.bp("/v1/repository");
212
148
  const query = map({
213
- domain: [, __expectNonNull(input.domain, `domain`)],
214
- "domain-owner": [, input.domainOwner],
215
- repository: [, __expectNonNull(input.repository, `repository`)],
149
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
150
+ [_do]: [, input[_dO]],
151
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
216
152
  });
217
153
  let body;
218
- return new __HttpRequest({
219
- protocol,
220
- hostname,
221
- port,
222
- method: "DELETE",
223
- headers,
224
- path: resolvedPath,
225
- query,
226
- body,
227
- });
154
+ b.m("DELETE").h(headers).q(query).b(body);
155
+ return b.build();
228
156
  };
229
157
  export const se_DeleteRepositoryPermissionsPolicyCommand = async (input, context) => {
230
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
158
+ const b = rb(input, context);
231
159
  const headers = {};
232
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/repository/permissions/policies";
160
+ b.bp("/v1/repository/permissions/policies");
233
161
  const query = map({
234
- domain: [, __expectNonNull(input.domain, `domain`)],
235
- "domain-owner": [, input.domainOwner],
236
- repository: [, __expectNonNull(input.repository, `repository`)],
237
- "policy-revision": [, input.policyRevision],
162
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
163
+ [_do]: [, input[_dO]],
164
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
165
+ [_pr]: [, input[_pR]],
238
166
  });
239
167
  let body;
240
- return new __HttpRequest({
241
- protocol,
242
- hostname,
243
- port,
244
- method: "DELETE",
245
- headers,
246
- path: resolvedPath,
247
- query,
248
- body,
249
- });
168
+ b.m("DELETE").h(headers).q(query).b(body);
169
+ return b.build();
250
170
  };
251
171
  export const se_DescribeDomainCommand = async (input, context) => {
252
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
172
+ const b = rb(input, context);
253
173
  const headers = {};
254
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/domain";
174
+ b.bp("/v1/domain");
255
175
  const query = map({
256
- domain: [, __expectNonNull(input.domain, `domain`)],
257
- "domain-owner": [, input.domainOwner],
176
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
177
+ [_do]: [, input[_dO]],
258
178
  });
259
179
  let body;
260
- return new __HttpRequest({
261
- protocol,
262
- hostname,
263
- port,
264
- method: "GET",
265
- headers,
266
- path: resolvedPath,
267
- query,
268
- body,
269
- });
180
+ b.m("GET").h(headers).q(query).b(body);
181
+ return b.build();
270
182
  };
271
183
  export const se_DescribePackageCommand = async (input, context) => {
272
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
184
+ const b = rb(input, context);
273
185
  const headers = {};
274
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/package";
186
+ b.bp("/v1/package");
275
187
  const query = map({
276
- domain: [, __expectNonNull(input.domain, `domain`)],
277
- "domain-owner": [, input.domainOwner],
278
- repository: [, __expectNonNull(input.repository, `repository`)],
279
- format: [, __expectNonNull(input.format, `format`)],
280
- namespace: [, input.namespace],
281
- package: [, __expectNonNull(input.package, `package`)],
188
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
189
+ [_do]: [, input[_dO]],
190
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
191
+ [_f]: [, __expectNonNull(input[_f], `format`)],
192
+ [_n]: [, input[_n]],
193
+ [_p]: [, __expectNonNull(input[_p], `package`)],
282
194
  });
283
195
  let body;
284
- return new __HttpRequest({
285
- protocol,
286
- hostname,
287
- port,
288
- method: "GET",
289
- headers,
290
- path: resolvedPath,
291
- query,
292
- body,
293
- });
196
+ b.m("GET").h(headers).q(query).b(body);
197
+ return b.build();
294
198
  };
295
199
  export const se_DescribePackageVersionCommand = async (input, context) => {
296
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
200
+ const b = rb(input, context);
297
201
  const headers = {};
298
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/package/version";
202
+ b.bp("/v1/package/version");
299
203
  const query = map({
300
- domain: [, __expectNonNull(input.domain, `domain`)],
301
- "domain-owner": [, input.domainOwner],
302
- repository: [, __expectNonNull(input.repository, `repository`)],
303
- format: [, __expectNonNull(input.format, `format`)],
304
- namespace: [, input.namespace],
305
- package: [, __expectNonNull(input.package, `package`)],
306
- version: [, __expectNonNull(input.packageVersion, `packageVersion`)],
204
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
205
+ [_do]: [, input[_dO]],
206
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
207
+ [_f]: [, __expectNonNull(input[_f], `format`)],
208
+ [_n]: [, input[_n]],
209
+ [_p]: [, __expectNonNull(input[_p], `package`)],
210
+ [_v]: [, __expectNonNull(input[_pV], `packageVersion`)],
307
211
  });
308
212
  let body;
309
- return new __HttpRequest({
310
- protocol,
311
- hostname,
312
- port,
313
- method: "GET",
314
- headers,
315
- path: resolvedPath,
316
- query,
317
- body,
318
- });
213
+ b.m("GET").h(headers).q(query).b(body);
214
+ return b.build();
319
215
  };
320
216
  export const se_DescribeRepositoryCommand = async (input, context) => {
321
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
217
+ const b = rb(input, context);
322
218
  const headers = {};
323
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/repository";
219
+ b.bp("/v1/repository");
324
220
  const query = map({
325
- domain: [, __expectNonNull(input.domain, `domain`)],
326
- "domain-owner": [, input.domainOwner],
327
- repository: [, __expectNonNull(input.repository, `repository`)],
221
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
222
+ [_do]: [, input[_dO]],
223
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
328
224
  });
329
225
  let body;
330
- return new __HttpRequest({
331
- protocol,
332
- hostname,
333
- port,
334
- method: "GET",
335
- headers,
336
- path: resolvedPath,
337
- query,
338
- body,
339
- });
226
+ b.m("GET").h(headers).q(query).b(body);
227
+ return b.build();
340
228
  };
341
229
  export const se_DisassociateExternalConnectionCommand = async (input, context) => {
342
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
230
+ const b = rb(input, context);
343
231
  const headers = {};
344
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/repository/external-connection";
232
+ b.bp("/v1/repository/external-connection");
345
233
  const query = map({
346
- domain: [, __expectNonNull(input.domain, `domain`)],
347
- "domain-owner": [, input.domainOwner],
348
- repository: [, __expectNonNull(input.repository, `repository`)],
349
- "external-connection": [, __expectNonNull(input.externalConnection, `externalConnection`)],
234
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
235
+ [_do]: [, input[_dO]],
236
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
237
+ [_ec]: [, __expectNonNull(input[_eC], `externalConnection`)],
350
238
  });
351
239
  let body;
352
- return new __HttpRequest({
353
- protocol,
354
- hostname,
355
- port,
356
- method: "DELETE",
357
- headers,
358
- path: resolvedPath,
359
- query,
360
- body,
361
- });
240
+ b.m("DELETE").h(headers).q(query).b(body);
241
+ return b.build();
362
242
  };
363
243
  export const se_DisposePackageVersionsCommand = async (input, context) => {
364
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
244
+ const b = rb(input, context);
365
245
  const headers = {
366
246
  "content-type": "application/json",
367
247
  };
368
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/package/versions/dispose";
248
+ b.bp("/v1/package/versions/dispose");
369
249
  const query = map({
370
- domain: [, __expectNonNull(input.domain, `domain`)],
371
- "domain-owner": [, input.domainOwner],
372
- repository: [, __expectNonNull(input.repository, `repository`)],
373
- format: [, __expectNonNull(input.format, `format`)],
374
- namespace: [, input.namespace],
375
- package: [, __expectNonNull(input.package, `package`)],
250
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
251
+ [_do]: [, input[_dO]],
252
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
253
+ [_f]: [, __expectNonNull(input[_f], `format`)],
254
+ [_n]: [, input[_n]],
255
+ [_p]: [, __expectNonNull(input[_p], `package`)],
376
256
  });
377
257
  let body;
378
258
  body = JSON.stringify(take(input, {
@@ -380,387 +260,260 @@ export const se_DisposePackageVersionsCommand = async (input, context) => {
380
260
  versionRevisions: (_) => _json(_),
381
261
  versions: (_) => _json(_),
382
262
  }));
383
- return new __HttpRequest({
384
- protocol,
385
- hostname,
386
- port,
387
- method: "POST",
388
- headers,
389
- path: resolvedPath,
390
- query,
391
- body,
392
- });
263
+ b.m("POST").h(headers).q(query).b(body);
264
+ return b.build();
393
265
  };
394
266
  export const se_GetAuthorizationTokenCommand = async (input, context) => {
395
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
267
+ const b = rb(input, context);
396
268
  const headers = {};
397
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/authorization-token";
269
+ b.bp("/v1/authorization-token");
398
270
  const query = map({
399
- domain: [, __expectNonNull(input.domain, `domain`)],
400
- "domain-owner": [, input.domainOwner],
401
- duration: [() => input.durationSeconds !== void 0, () => input.durationSeconds.toString()],
271
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
272
+ [_do]: [, input[_dO]],
273
+ [_du]: [() => input.durationSeconds !== void 0, () => input[_dS].toString()],
402
274
  });
403
275
  let body;
404
- return new __HttpRequest({
405
- protocol,
406
- hostname,
407
- port,
408
- method: "POST",
409
- headers,
410
- path: resolvedPath,
411
- query,
412
- body,
413
- });
276
+ b.m("POST").h(headers).q(query).b(body);
277
+ return b.build();
414
278
  };
415
279
  export const se_GetDomainPermissionsPolicyCommand = async (input, context) => {
416
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
280
+ const b = rb(input, context);
417
281
  const headers = {};
418
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/domain/permissions/policy";
282
+ b.bp("/v1/domain/permissions/policy");
419
283
  const query = map({
420
- domain: [, __expectNonNull(input.domain, `domain`)],
421
- "domain-owner": [, input.domainOwner],
284
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
285
+ [_do]: [, input[_dO]],
422
286
  });
423
287
  let body;
424
- return new __HttpRequest({
425
- protocol,
426
- hostname,
427
- port,
428
- method: "GET",
429
- headers,
430
- path: resolvedPath,
431
- query,
432
- body,
433
- });
288
+ b.m("GET").h(headers).q(query).b(body);
289
+ return b.build();
434
290
  };
435
291
  export const se_GetPackageVersionAssetCommand = async (input, context) => {
436
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
292
+ const b = rb(input, context);
437
293
  const headers = {};
438
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/package/version/asset";
294
+ b.bp("/v1/package/version/asset");
439
295
  const query = map({
440
- domain: [, __expectNonNull(input.domain, `domain`)],
441
- "domain-owner": [, input.domainOwner],
442
- repository: [, __expectNonNull(input.repository, `repository`)],
443
- format: [, __expectNonNull(input.format, `format`)],
444
- namespace: [, input.namespace],
445
- package: [, __expectNonNull(input.package, `package`)],
446
- version: [, __expectNonNull(input.packageVersion, `packageVersion`)],
447
- asset: [, __expectNonNull(input.asset, `asset`)],
448
- revision: [, input.packageVersionRevision],
296
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
297
+ [_do]: [, input[_dO]],
298
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
299
+ [_f]: [, __expectNonNull(input[_f], `format`)],
300
+ [_n]: [, input[_n]],
301
+ [_p]: [, __expectNonNull(input[_p], `package`)],
302
+ [_v]: [, __expectNonNull(input[_pV], `packageVersion`)],
303
+ [_a]: [, __expectNonNull(input[_a], `asset`)],
304
+ [_re]: [, input[_pVR]],
449
305
  });
450
306
  let body;
451
- return new __HttpRequest({
452
- protocol,
453
- hostname,
454
- port,
455
- method: "GET",
456
- headers,
457
- path: resolvedPath,
458
- query,
459
- body,
460
- });
307
+ b.m("GET").h(headers).q(query).b(body);
308
+ return b.build();
461
309
  };
462
310
  export const se_GetPackageVersionReadmeCommand = async (input, context) => {
463
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
311
+ const b = rb(input, context);
464
312
  const headers = {};
465
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/package/version/readme";
313
+ b.bp("/v1/package/version/readme");
466
314
  const query = map({
467
- domain: [, __expectNonNull(input.domain, `domain`)],
468
- "domain-owner": [, input.domainOwner],
469
- repository: [, __expectNonNull(input.repository, `repository`)],
470
- format: [, __expectNonNull(input.format, `format`)],
471
- namespace: [, input.namespace],
472
- package: [, __expectNonNull(input.package, `package`)],
473
- version: [, __expectNonNull(input.packageVersion, `packageVersion`)],
315
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
316
+ [_do]: [, input[_dO]],
317
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
318
+ [_f]: [, __expectNonNull(input[_f], `format`)],
319
+ [_n]: [, input[_n]],
320
+ [_p]: [, __expectNonNull(input[_p], `package`)],
321
+ [_v]: [, __expectNonNull(input[_pV], `packageVersion`)],
474
322
  });
475
323
  let body;
476
- return new __HttpRequest({
477
- protocol,
478
- hostname,
479
- port,
480
- method: "GET",
481
- headers,
482
- path: resolvedPath,
483
- query,
484
- body,
485
- });
324
+ b.m("GET").h(headers).q(query).b(body);
325
+ return b.build();
486
326
  };
487
327
  export const se_GetRepositoryEndpointCommand = async (input, context) => {
488
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
328
+ const b = rb(input, context);
489
329
  const headers = {};
490
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/repository/endpoint";
330
+ b.bp("/v1/repository/endpoint");
491
331
  const query = map({
492
- domain: [, __expectNonNull(input.domain, `domain`)],
493
- "domain-owner": [, input.domainOwner],
494
- repository: [, __expectNonNull(input.repository, `repository`)],
495
- format: [, __expectNonNull(input.format, `format`)],
332
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
333
+ [_do]: [, input[_dO]],
334
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
335
+ [_f]: [, __expectNonNull(input[_f], `format`)],
496
336
  });
497
337
  let body;
498
- return new __HttpRequest({
499
- protocol,
500
- hostname,
501
- port,
502
- method: "GET",
503
- headers,
504
- path: resolvedPath,
505
- query,
506
- body,
507
- });
338
+ b.m("GET").h(headers).q(query).b(body);
339
+ return b.build();
508
340
  };
509
341
  export const se_GetRepositoryPermissionsPolicyCommand = async (input, context) => {
510
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
342
+ const b = rb(input, context);
511
343
  const headers = {};
512
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/repository/permissions/policy";
344
+ b.bp("/v1/repository/permissions/policy");
513
345
  const query = map({
514
- domain: [, __expectNonNull(input.domain, `domain`)],
515
- "domain-owner": [, input.domainOwner],
516
- repository: [, __expectNonNull(input.repository, `repository`)],
346
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
347
+ [_do]: [, input[_dO]],
348
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
517
349
  });
518
350
  let body;
519
- return new __HttpRequest({
520
- protocol,
521
- hostname,
522
- port,
523
- method: "GET",
524
- headers,
525
- path: resolvedPath,
526
- query,
527
- body,
528
- });
351
+ b.m("GET").h(headers).q(query).b(body);
352
+ return b.build();
529
353
  };
530
354
  export const se_ListDomainsCommand = async (input, context) => {
531
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
355
+ const b = rb(input, context);
532
356
  const headers = {
533
357
  "content-type": "application/json",
534
358
  };
535
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/domains";
359
+ b.bp("/v1/domains");
536
360
  let body;
537
361
  body = JSON.stringify(take(input, {
538
362
  maxResults: [],
539
363
  nextToken: [],
540
364
  }));
541
- return new __HttpRequest({
542
- protocol,
543
- hostname,
544
- port,
545
- method: "POST",
546
- headers,
547
- path: resolvedPath,
548
- body,
549
- });
365
+ b.m("POST").h(headers).b(body);
366
+ return b.build();
550
367
  };
551
368
  export const se_ListPackagesCommand = async (input, context) => {
552
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
369
+ const b = rb(input, context);
553
370
  const headers = {};
554
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/packages";
371
+ b.bp("/v1/packages");
555
372
  const query = map({
556
- domain: [, __expectNonNull(input.domain, `domain`)],
557
- "domain-owner": [, input.domainOwner],
558
- repository: [, __expectNonNull(input.repository, `repository`)],
559
- format: [, input.format],
560
- namespace: [, input.namespace],
561
- "package-prefix": [, input.packagePrefix],
562
- "max-results": [() => input.maxResults !== void 0, () => input.maxResults.toString()],
563
- "next-token": [, input.nextToken],
564
- publish: [, input.publish],
565
- upstream: [, input.upstream],
373
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
374
+ [_do]: [, input[_dO]],
375
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
376
+ [_f]: [, input[_f]],
377
+ [_n]: [, input[_n]],
378
+ [_pp]: [, input[_pP]],
379
+ [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
380
+ [_nt]: [, input[_nT]],
381
+ [_pu]: [, input[_pu]],
382
+ [_u]: [, input[_u]],
566
383
  });
567
384
  let body;
568
- return new __HttpRequest({
569
- protocol,
570
- hostname,
571
- port,
572
- method: "POST",
573
- headers,
574
- path: resolvedPath,
575
- query,
576
- body,
577
- });
385
+ b.m("POST").h(headers).q(query).b(body);
386
+ return b.build();
578
387
  };
579
388
  export const se_ListPackageVersionAssetsCommand = async (input, context) => {
580
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
389
+ const b = rb(input, context);
581
390
  const headers = {};
582
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/package/version/assets";
391
+ b.bp("/v1/package/version/assets");
583
392
  const query = map({
584
- domain: [, __expectNonNull(input.domain, `domain`)],
585
- "domain-owner": [, input.domainOwner],
586
- repository: [, __expectNonNull(input.repository, `repository`)],
587
- format: [, __expectNonNull(input.format, `format`)],
588
- namespace: [, input.namespace],
589
- package: [, __expectNonNull(input.package, `package`)],
590
- version: [, __expectNonNull(input.packageVersion, `packageVersion`)],
591
- "max-results": [() => input.maxResults !== void 0, () => input.maxResults.toString()],
592
- "next-token": [, input.nextToken],
393
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
394
+ [_do]: [, input[_dO]],
395
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
396
+ [_f]: [, __expectNonNull(input[_f], `format`)],
397
+ [_n]: [, input[_n]],
398
+ [_p]: [, __expectNonNull(input[_p], `package`)],
399
+ [_v]: [, __expectNonNull(input[_pV], `packageVersion`)],
400
+ [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
401
+ [_nt]: [, input[_nT]],
593
402
  });
594
403
  let body;
595
- return new __HttpRequest({
596
- protocol,
597
- hostname,
598
- port,
599
- method: "POST",
600
- headers,
601
- path: resolvedPath,
602
- query,
603
- body,
604
- });
404
+ b.m("POST").h(headers).q(query).b(body);
405
+ return b.build();
605
406
  };
606
407
  export const se_ListPackageVersionDependenciesCommand = async (input, context) => {
607
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
408
+ const b = rb(input, context);
608
409
  const headers = {};
609
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/package/version/dependencies";
410
+ b.bp("/v1/package/version/dependencies");
610
411
  const query = map({
611
- domain: [, __expectNonNull(input.domain, `domain`)],
612
- "domain-owner": [, input.domainOwner],
613
- repository: [, __expectNonNull(input.repository, `repository`)],
614
- format: [, __expectNonNull(input.format, `format`)],
615
- namespace: [, input.namespace],
616
- package: [, __expectNonNull(input.package, `package`)],
617
- version: [, __expectNonNull(input.packageVersion, `packageVersion`)],
618
- "next-token": [, input.nextToken],
412
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
413
+ [_do]: [, input[_dO]],
414
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
415
+ [_f]: [, __expectNonNull(input[_f], `format`)],
416
+ [_n]: [, input[_n]],
417
+ [_p]: [, __expectNonNull(input[_p], `package`)],
418
+ [_v]: [, __expectNonNull(input[_pV], `packageVersion`)],
419
+ [_nt]: [, input[_nT]],
619
420
  });
620
421
  let body;
621
- return new __HttpRequest({
622
- protocol,
623
- hostname,
624
- port,
625
- method: "POST",
626
- headers,
627
- path: resolvedPath,
628
- query,
629
- body,
630
- });
422
+ b.m("POST").h(headers).q(query).b(body);
423
+ return b.build();
631
424
  };
632
425
  export const se_ListPackageVersionsCommand = async (input, context) => {
633
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
426
+ const b = rb(input, context);
634
427
  const headers = {};
635
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/package/versions";
428
+ b.bp("/v1/package/versions");
636
429
  const query = map({
637
- domain: [, __expectNonNull(input.domain, `domain`)],
638
- "domain-owner": [, input.domainOwner],
639
- repository: [, __expectNonNull(input.repository, `repository`)],
640
- format: [, __expectNonNull(input.format, `format`)],
641
- namespace: [, input.namespace],
642
- package: [, __expectNonNull(input.package, `package`)],
643
- status: [, input.status],
644
- sortBy: [, input.sortBy],
645
- "max-results": [() => input.maxResults !== void 0, () => input.maxResults.toString()],
646
- "next-token": [, input.nextToken],
647
- originType: [, input.originType],
430
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
431
+ [_do]: [, input[_dO]],
432
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
433
+ [_f]: [, __expectNonNull(input[_f], `format`)],
434
+ [_n]: [, input[_n]],
435
+ [_p]: [, __expectNonNull(input[_p], `package`)],
436
+ [_s]: [, input[_s]],
437
+ [_sB]: [, input[_sB]],
438
+ [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
439
+ [_nt]: [, input[_nT]],
440
+ [_oT]: [, input[_oT]],
648
441
  });
649
442
  let body;
650
- return new __HttpRequest({
651
- protocol,
652
- hostname,
653
- port,
654
- method: "POST",
655
- headers,
656
- path: resolvedPath,
657
- query,
658
- body,
659
- });
443
+ b.m("POST").h(headers).q(query).b(body);
444
+ return b.build();
660
445
  };
661
446
  export const se_ListRepositoriesCommand = async (input, context) => {
662
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
447
+ const b = rb(input, context);
663
448
  const headers = {};
664
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/repositories";
449
+ b.bp("/v1/repositories");
665
450
  const query = map({
666
- "repository-prefix": [, input.repositoryPrefix],
667
- "max-results": [() => input.maxResults !== void 0, () => input.maxResults.toString()],
668
- "next-token": [, input.nextToken],
451
+ [_rp]: [, input[_rP]],
452
+ [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
453
+ [_nt]: [, input[_nT]],
669
454
  });
670
455
  let body;
671
- return new __HttpRequest({
672
- protocol,
673
- hostname,
674
- port,
675
- method: "POST",
676
- headers,
677
- path: resolvedPath,
678
- query,
679
- body,
680
- });
456
+ b.m("POST").h(headers).q(query).b(body);
457
+ return b.build();
681
458
  };
682
459
  export const se_ListRepositoriesInDomainCommand = async (input, context) => {
683
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
460
+ const b = rb(input, context);
684
461
  const headers = {};
685
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/domain/repositories";
462
+ b.bp("/v1/domain/repositories");
686
463
  const query = map({
687
- domain: [, __expectNonNull(input.domain, `domain`)],
688
- "domain-owner": [, input.domainOwner],
689
- "administrator-account": [, input.administratorAccount],
690
- "repository-prefix": [, input.repositoryPrefix],
691
- "max-results": [() => input.maxResults !== void 0, () => input.maxResults.toString()],
692
- "next-token": [, input.nextToken],
464
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
465
+ [_do]: [, input[_dO]],
466
+ [_aa]: [, input[_aA]],
467
+ [_rp]: [, input[_rP]],
468
+ [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
469
+ [_nt]: [, input[_nT]],
693
470
  });
694
471
  let body;
695
- return new __HttpRequest({
696
- protocol,
697
- hostname,
698
- port,
699
- method: "POST",
700
- headers,
701
- path: resolvedPath,
702
- query,
703
- body,
704
- });
472
+ b.m("POST").h(headers).q(query).b(body);
473
+ return b.build();
705
474
  };
706
475
  export const se_ListTagsForResourceCommand = async (input, context) => {
707
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
476
+ const b = rb(input, context);
708
477
  const headers = {};
709
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags";
478
+ b.bp("/v1/tags");
710
479
  const query = map({
711
- resourceArn: [, __expectNonNull(input.resourceArn, `resourceArn`)],
480
+ [_rA]: [, __expectNonNull(input[_rA], `resourceArn`)],
712
481
  });
713
482
  let body;
714
- return new __HttpRequest({
715
- protocol,
716
- hostname,
717
- port,
718
- method: "POST",
719
- headers,
720
- path: resolvedPath,
721
- query,
722
- body,
723
- });
483
+ b.m("POST").h(headers).q(query).b(body);
484
+ return b.build();
724
485
  };
725
486
  export const se_PublishPackageVersionCommand = async (input, context) => {
726
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
487
+ const b = rb(input, context);
727
488
  const headers = map({}, isSerializableHeaderValue, {
728
489
  "content-type": "application/octet-stream",
729
- "x-amz-content-sha256": input.assetSHA256,
490
+ [_xacs]: input[_aSHA],
730
491
  });
731
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/package/version/publish";
492
+ b.bp("/v1/package/version/publish");
732
493
  const query = map({
733
- domain: [, __expectNonNull(input.domain, `domain`)],
734
- "domain-owner": [, input.domainOwner],
735
- repository: [, __expectNonNull(input.repository, `repository`)],
736
- format: [, __expectNonNull(input.format, `format`)],
737
- namespace: [, input.namespace],
738
- package: [, __expectNonNull(input.package, `package`)],
739
- version: [, __expectNonNull(input.packageVersion, `packageVersion`)],
740
- asset: [, __expectNonNull(input.assetName, `assetName`)],
741
- unfinished: [() => input.unfinished !== void 0, () => input.unfinished.toString()],
494
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
495
+ [_do]: [, input[_dO]],
496
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
497
+ [_f]: [, __expectNonNull(input[_f], `format`)],
498
+ [_n]: [, input[_n]],
499
+ [_p]: [, __expectNonNull(input[_p], `package`)],
500
+ [_v]: [, __expectNonNull(input[_pV], `packageVersion`)],
501
+ [_a]: [, __expectNonNull(input[_aN], `assetName`)],
502
+ [_un]: [() => input.unfinished !== void 0, () => input[_un].toString()],
742
503
  });
743
504
  let body;
744
505
  if (input.assetContent !== undefined) {
745
506
  body = input.assetContent;
746
507
  }
747
- return new __HttpRequest({
748
- protocol,
749
- hostname,
750
- port,
751
- method: "POST",
752
- headers,
753
- path: resolvedPath,
754
- query,
755
- body,
756
- });
508
+ b.m("POST").h(headers).q(query).b(body);
509
+ return b.build();
757
510
  };
758
511
  export const se_PutDomainPermissionsPolicyCommand = async (input, context) => {
759
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
512
+ const b = rb(input, context);
760
513
  const headers = {
761
514
  "content-type": "application/json",
762
515
  };
763
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/domain/permissions/policy";
516
+ b.bp("/v1/domain/permissions/policy");
764
517
  let body;
765
518
  body = JSON.stringify(take(input, {
766
519
  domain: [],
@@ -768,133 +521,94 @@ export const se_PutDomainPermissionsPolicyCommand = async (input, context) => {
768
521
  policyDocument: [],
769
522
  policyRevision: [],
770
523
  }));
771
- return new __HttpRequest({
772
- protocol,
773
- hostname,
774
- port,
775
- method: "PUT",
776
- headers,
777
- path: resolvedPath,
778
- body,
779
- });
524
+ b.m("PUT").h(headers).b(body);
525
+ return b.build();
780
526
  };
781
527
  export const se_PutPackageOriginConfigurationCommand = async (input, context) => {
782
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
528
+ const b = rb(input, context);
783
529
  const headers = {
784
530
  "content-type": "application/json",
785
531
  };
786
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/package";
532
+ b.bp("/v1/package");
787
533
  const query = map({
788
- domain: [, __expectNonNull(input.domain, `domain`)],
789
- "domain-owner": [, input.domainOwner],
790
- repository: [, __expectNonNull(input.repository, `repository`)],
791
- format: [, __expectNonNull(input.format, `format`)],
792
- namespace: [, input.namespace],
793
- package: [, __expectNonNull(input.package, `package`)],
534
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
535
+ [_do]: [, input[_dO]],
536
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
537
+ [_f]: [, __expectNonNull(input[_f], `format`)],
538
+ [_n]: [, input[_n]],
539
+ [_p]: [, __expectNonNull(input[_p], `package`)],
794
540
  });
795
541
  let body;
796
542
  body = JSON.stringify(take(input, {
797
543
  restrictions: (_) => _json(_),
798
544
  }));
799
- return new __HttpRequest({
800
- protocol,
801
- hostname,
802
- port,
803
- method: "POST",
804
- headers,
805
- path: resolvedPath,
806
- query,
807
- body,
808
- });
545
+ b.m("POST").h(headers).q(query).b(body);
546
+ return b.build();
809
547
  };
810
548
  export const se_PutRepositoryPermissionsPolicyCommand = async (input, context) => {
811
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
549
+ const b = rb(input, context);
812
550
  const headers = {
813
551
  "content-type": "application/json",
814
552
  };
815
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/repository/permissions/policy";
553
+ b.bp("/v1/repository/permissions/policy");
816
554
  const query = map({
817
- domain: [, __expectNonNull(input.domain, `domain`)],
818
- "domain-owner": [, input.domainOwner],
819
- repository: [, __expectNonNull(input.repository, `repository`)],
555
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
556
+ [_do]: [, input[_dO]],
557
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
820
558
  });
821
559
  let body;
822
560
  body = JSON.stringify(take(input, {
823
561
  policyDocument: [],
824
562
  policyRevision: [],
825
563
  }));
826
- return new __HttpRequest({
827
- protocol,
828
- hostname,
829
- port,
830
- method: "PUT",
831
- headers,
832
- path: resolvedPath,
833
- query,
834
- body,
835
- });
564
+ b.m("PUT").h(headers).q(query).b(body);
565
+ return b.build();
836
566
  };
837
567
  export const se_TagResourceCommand = async (input, context) => {
838
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
568
+ const b = rb(input, context);
839
569
  const headers = {
840
570
  "content-type": "application/json",
841
571
  };
842
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tag";
572
+ b.bp("/v1/tag");
843
573
  const query = map({
844
- resourceArn: [, __expectNonNull(input.resourceArn, `resourceArn`)],
574
+ [_rA]: [, __expectNonNull(input[_rA], `resourceArn`)],
845
575
  });
846
576
  let body;
847
577
  body = JSON.stringify(take(input, {
848
578
  tags: (_) => _json(_),
849
579
  }));
850
- return new __HttpRequest({
851
- protocol,
852
- hostname,
853
- port,
854
- method: "POST",
855
- headers,
856
- path: resolvedPath,
857
- query,
858
- body,
859
- });
580
+ b.m("POST").h(headers).q(query).b(body);
581
+ return b.build();
860
582
  };
861
583
  export const se_UntagResourceCommand = async (input, context) => {
862
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
584
+ const b = rb(input, context);
863
585
  const headers = {
864
586
  "content-type": "application/json",
865
587
  };
866
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/untag";
588
+ b.bp("/v1/untag");
867
589
  const query = map({
868
- resourceArn: [, __expectNonNull(input.resourceArn, `resourceArn`)],
590
+ [_rA]: [, __expectNonNull(input[_rA], `resourceArn`)],
869
591
  });
870
592
  let body;
871
593
  body = JSON.stringify(take(input, {
872
594
  tagKeys: (_) => _json(_),
873
595
  }));
874
- return new __HttpRequest({
875
- protocol,
876
- hostname,
877
- port,
878
- method: "POST",
879
- headers,
880
- path: resolvedPath,
881
- query,
882
- body,
883
- });
596
+ b.m("POST").h(headers).q(query).b(body);
597
+ return b.build();
884
598
  };
885
599
  export const se_UpdatePackageVersionsStatusCommand = async (input, context) => {
886
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
600
+ const b = rb(input, context);
887
601
  const headers = {
888
602
  "content-type": "application/json",
889
603
  };
890
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/package/versions/update_status";
604
+ b.bp("/v1/package/versions/update_status");
891
605
  const query = map({
892
- domain: [, __expectNonNull(input.domain, `domain`)],
893
- "domain-owner": [, input.domainOwner],
894
- repository: [, __expectNonNull(input.repository, `repository`)],
895
- format: [, __expectNonNull(input.format, `format`)],
896
- namespace: [, input.namespace],
897
- package: [, __expectNonNull(input.package, `package`)],
606
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
607
+ [_do]: [, input[_dO]],
608
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
609
+ [_f]: [, __expectNonNull(input[_f], `format`)],
610
+ [_n]: [, input[_n]],
611
+ [_p]: [, __expectNonNull(input[_p], `package`)],
898
612
  });
899
613
  let body;
900
614
  body = JSON.stringify(take(input, {
@@ -903,43 +617,27 @@ export const se_UpdatePackageVersionsStatusCommand = async (input, context) => {
903
617
  versionRevisions: (_) => _json(_),
904
618
  versions: (_) => _json(_),
905
619
  }));
906
- return new __HttpRequest({
907
- protocol,
908
- hostname,
909
- port,
910
- method: "POST",
911
- headers,
912
- path: resolvedPath,
913
- query,
914
- body,
915
- });
620
+ b.m("POST").h(headers).q(query).b(body);
621
+ return b.build();
916
622
  };
917
623
  export const se_UpdateRepositoryCommand = async (input, context) => {
918
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
624
+ const b = rb(input, context);
919
625
  const headers = {
920
626
  "content-type": "application/json",
921
627
  };
922
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/repository";
628
+ b.bp("/v1/repository");
923
629
  const query = map({
924
- domain: [, __expectNonNull(input.domain, `domain`)],
925
- "domain-owner": [, input.domainOwner],
926
- repository: [, __expectNonNull(input.repository, `repository`)],
630
+ [_d]: [, __expectNonNull(input[_d], `domain`)],
631
+ [_do]: [, input[_dO]],
632
+ [_r]: [, __expectNonNull(input[_r], `repository`)],
927
633
  });
928
634
  let body;
929
635
  body = JSON.stringify(take(input, {
930
636
  description: [],
931
637
  upstreams: (_) => _json(_),
932
638
  }));
933
- return new __HttpRequest({
934
- protocol,
935
- hostname,
936
- port,
937
- method: "PUT",
938
- headers,
939
- path: resolvedPath,
940
- query,
941
- body,
942
- });
639
+ b.m("PUT").h(headers).q(query).b(body);
640
+ return b.build();
943
641
  };
944
642
  export const de_AssociateExternalConnectionCommand = async (output, context) => {
945
643
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1812,9 +1510,9 @@ export const de_GetPackageVersionAssetCommand = async (output, context) => {
1812
1510
  }
1813
1511
  const contents = map({
1814
1512
  $metadata: deserializeMetadata(output),
1815
- assetName: [, output.headers["x-assetname"]],
1816
- packageVersion: [, output.headers["x-packageversion"]],
1817
- packageVersionRevision: [, output.headers["x-packageversionrevision"]],
1513
+ [_aN]: [, output.headers[_xa]],
1514
+ [_pV]: [, output.headers[_xp]],
1515
+ [_pVR]: [, output.headers[_xp_]],
1818
1516
  });
1819
1517
  const data = output.body;
1820
1518
  context.sdkStreamMixin(data);
@@ -2824,10 +2522,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2824
2522
  };
2825
2523
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2826
2524
  const contents = map({
2827
- retryAfterSeconds: [
2828
- () => void 0 !== parsedOutput.headers["retry-after"],
2829
- () => __strictParseInt32(parsedOutput.headers["retry-after"]),
2830
- ],
2525
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
2831
2526
  });
2832
2527
  const data = parsedOutput.body;
2833
2528
  const doc = take(data, {
@@ -2946,6 +2641,53 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2946
2641
  value !== "" &&
2947
2642
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2948
2643
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2644
+ const _a = "asset";
2645
+ const _aA = "administratorAccount";
2646
+ const _aN = "assetName";
2647
+ const _aSHA = "assetSHA256";
2648
+ const _aa = "administrator-account";
2649
+ const _d = "domain";
2650
+ const _dO = "domainOwner";
2651
+ const _dR = "destinationRepository";
2652
+ const _dS = "durationSeconds";
2653
+ const _do = "domain-owner";
2654
+ const _dr = "destination-repository";
2655
+ const _du = "duration";
2656
+ const _eC = "externalConnection";
2657
+ const _ec = "external-connection";
2658
+ const _f = "format";
2659
+ const _mR = "maxResults";
2660
+ const _mr = "max-results";
2661
+ const _n = "namespace";
2662
+ const _nT = "nextToken";
2663
+ const _nt = "next-token";
2664
+ const _oT = "originType";
2665
+ const _p = "package";
2666
+ const _pP = "packagePrefix";
2667
+ const _pR = "policyRevision";
2668
+ const _pV = "packageVersion";
2669
+ const _pVR = "packageVersionRevision";
2670
+ const _pp = "package-prefix";
2671
+ const _pr = "policy-revision";
2672
+ const _pu = "publish";
2673
+ const _r = "repository";
2674
+ const _rA = "resourceArn";
2675
+ const _rAS = "retryAfterSeconds";
2676
+ const _rP = "repositoryPrefix";
2677
+ const _ra = "retry-after";
2678
+ const _re = "revision";
2679
+ const _rp = "repository-prefix";
2680
+ const _s = "status";
2681
+ const _sB = "sortBy";
2682
+ const _sR = "sourceRepository";
2683
+ const _sr = "source-repository";
2684
+ const _u = "upstream";
2685
+ const _un = "unfinished";
2686
+ const _v = "version";
2687
+ const _xa = "x-assetname";
2688
+ const _xacs = "x-amz-content-sha256";
2689
+ const _xp = "x-packageversion";
2690
+ const _xp_ = "x-packageversionrevision";
2949
2691
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2950
2692
  if (encoded.length) {
2951
2693
  return JSON.parse(encoded);