@aws-sdk/client-schemas 3.476.0 → 3.478.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,14 +1,14 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, 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, expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { BadRequestException, ConflictException, ForbiddenException, GoneException, InternalServerErrorException, NotFoundException, PreconditionFailedException, ServiceUnavailableException, TooManyRequestsException, UnauthorizedException, } from "../models/models_0";
5
5
  import { SchemasServiceException as __BaseException } from "../models/SchemasServiceException";
6
6
  export const se_CreateDiscovererCommand = async (input, context) => {
7
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const b = rb(input, context);
8
8
  const headers = {
9
9
  "content-type": "application/json",
10
10
  };
11
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/discoverers";
11
+ b.bp("/v1/discoverers");
12
12
  let body;
13
13
  body = JSON.stringify(take(input, {
14
14
  CrossAccount: [],
@@ -16,47 +16,32 @@ export const se_CreateDiscovererCommand = async (input, context) => {
16
16
  SourceArn: [],
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_CreateRegistryCommand = async (input, context) => {
30
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
23
+ const b = rb(input, context);
31
24
  const headers = {
32
25
  "content-type": "application/json",
33
26
  };
34
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/registries/name/{RegistryName}";
35
- resolvedPath = __resolvedPath(resolvedPath, input, "RegistryName", () => input.RegistryName, "{RegistryName}", false);
27
+ b.bp("/v1/registries/name/{RegistryName}");
28
+ b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
36
29
  let body;
37
30
  body = JSON.stringify(take(input, {
38
31
  Description: [],
39
32
  tags: [, (_) => _json(_), `Tags`],
40
33
  }));
41
- return new __HttpRequest({
42
- protocol,
43
- hostname,
44
- port,
45
- method: "POST",
46
- headers,
47
- path: resolvedPath,
48
- body,
49
- });
34
+ b.m("POST").h(headers).b(body);
35
+ return b.build();
50
36
  };
51
37
  export const se_CreateSchemaCommand = async (input, context) => {
52
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
38
+ const b = rb(input, context);
53
39
  const headers = {
54
40
  "content-type": "application/json",
55
41
  };
56
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
57
- "/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}";
58
- resolvedPath = __resolvedPath(resolvedPath, input, "RegistryName", () => input.RegistryName, "{RegistryName}", false);
59
- resolvedPath = __resolvedPath(resolvedPath, input, "SchemaName", () => input.SchemaName, "{SchemaName}", false);
42
+ b.bp("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}");
43
+ b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
44
+ b.p("SchemaName", () => input.SchemaName, "{SchemaName}", false);
60
45
  let body;
61
46
  body = JSON.stringify(take(input, {
62
47
  Content: [],
@@ -64,572 +49,351 @@ export const se_CreateSchemaCommand = async (input, context) => {
64
49
  tags: [, (_) => _json(_), `Tags`],
65
50
  Type: [],
66
51
  }));
67
- return new __HttpRequest({
68
- protocol,
69
- hostname,
70
- port,
71
- method: "POST",
72
- headers,
73
- path: resolvedPath,
74
- body,
75
- });
52
+ b.m("POST").h(headers).b(body);
53
+ return b.build();
76
54
  };
77
55
  export const se_DeleteDiscovererCommand = async (input, context) => {
78
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
56
+ const b = rb(input, context);
79
57
  const headers = {};
80
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/discoverers/id/{DiscovererId}";
81
- resolvedPath = __resolvedPath(resolvedPath, input, "DiscovererId", () => input.DiscovererId, "{DiscovererId}", false);
58
+ b.bp("/v1/discoverers/id/{DiscovererId}");
59
+ b.p("DiscovererId", () => input.DiscovererId, "{DiscovererId}", false);
82
60
  let body;
83
- return new __HttpRequest({
84
- protocol,
85
- hostname,
86
- port,
87
- method: "DELETE",
88
- headers,
89
- path: resolvedPath,
90
- body,
91
- });
61
+ b.m("DELETE").h(headers).b(body);
62
+ return b.build();
92
63
  };
93
64
  export const se_DeleteRegistryCommand = async (input, context) => {
94
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
65
+ const b = rb(input, context);
95
66
  const headers = {};
96
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/registries/name/{RegistryName}";
97
- resolvedPath = __resolvedPath(resolvedPath, input, "RegistryName", () => input.RegistryName, "{RegistryName}", false);
67
+ b.bp("/v1/registries/name/{RegistryName}");
68
+ b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
98
69
  let body;
99
- return new __HttpRequest({
100
- protocol,
101
- hostname,
102
- port,
103
- method: "DELETE",
104
- headers,
105
- path: resolvedPath,
106
- body,
107
- });
70
+ b.m("DELETE").h(headers).b(body);
71
+ return b.build();
108
72
  };
109
73
  export const se_DeleteResourcePolicyCommand = async (input, context) => {
110
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
74
+ const b = rb(input, context);
111
75
  const headers = {};
112
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/policy";
76
+ b.bp("/v1/policy");
113
77
  const query = map({
114
- registryName: [, input.RegistryName],
78
+ [_rN]: [, input[_RN]],
115
79
  });
116
80
  let body;
117
- return new __HttpRequest({
118
- protocol,
119
- hostname,
120
- port,
121
- method: "DELETE",
122
- headers,
123
- path: resolvedPath,
124
- query,
125
- body,
126
- });
81
+ b.m("DELETE").h(headers).q(query).b(body);
82
+ return b.build();
127
83
  };
128
84
  export const se_DeleteSchemaCommand = async (input, context) => {
129
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
85
+ const b = rb(input, context);
130
86
  const headers = {};
131
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
132
- "/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}";
133
- resolvedPath = __resolvedPath(resolvedPath, input, "RegistryName", () => input.RegistryName, "{RegistryName}", false);
134
- resolvedPath = __resolvedPath(resolvedPath, input, "SchemaName", () => input.SchemaName, "{SchemaName}", false);
87
+ b.bp("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}");
88
+ b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
89
+ b.p("SchemaName", () => input.SchemaName, "{SchemaName}", false);
135
90
  let body;
136
- return new __HttpRequest({
137
- protocol,
138
- hostname,
139
- port,
140
- method: "DELETE",
141
- headers,
142
- path: resolvedPath,
143
- body,
144
- });
91
+ b.m("DELETE").h(headers).b(body);
92
+ return b.build();
145
93
  };
146
94
  export const se_DeleteSchemaVersionCommand = async (input, context) => {
147
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
95
+ const b = rb(input, context);
148
96
  const headers = {};
149
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
150
- "/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/version/{SchemaVersion}";
151
- resolvedPath = __resolvedPath(resolvedPath, input, "RegistryName", () => input.RegistryName, "{RegistryName}", false);
152
- resolvedPath = __resolvedPath(resolvedPath, input, "SchemaName", () => input.SchemaName, "{SchemaName}", false);
153
- resolvedPath = __resolvedPath(resolvedPath, input, "SchemaVersion", () => input.SchemaVersion, "{SchemaVersion}", false);
97
+ b.bp("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/version/{SchemaVersion}");
98
+ b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
99
+ b.p("SchemaName", () => input.SchemaName, "{SchemaName}", false);
100
+ b.p("SchemaVersion", () => input.SchemaVersion, "{SchemaVersion}", false);
154
101
  let body;
155
- return new __HttpRequest({
156
- protocol,
157
- hostname,
158
- port,
159
- method: "DELETE",
160
- headers,
161
- path: resolvedPath,
162
- body,
163
- });
102
+ b.m("DELETE").h(headers).b(body);
103
+ return b.build();
164
104
  };
165
105
  export const se_DescribeCodeBindingCommand = async (input, context) => {
166
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
106
+ const b = rb(input, context);
167
107
  const headers = {};
168
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
169
- "/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/language/{Language}";
170
- resolvedPath = __resolvedPath(resolvedPath, input, "Language", () => input.Language, "{Language}", false);
171
- resolvedPath = __resolvedPath(resolvedPath, input, "RegistryName", () => input.RegistryName, "{RegistryName}", false);
172
- resolvedPath = __resolvedPath(resolvedPath, input, "SchemaName", () => input.SchemaName, "{SchemaName}", false);
108
+ b.bp("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/language/{Language}");
109
+ b.p("Language", () => input.Language, "{Language}", false);
110
+ b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
111
+ b.p("SchemaName", () => input.SchemaName, "{SchemaName}", false);
173
112
  const query = map({
174
- schemaVersion: [, input.SchemaVersion],
113
+ [_sV]: [, input[_SV]],
175
114
  });
176
115
  let body;
177
- return new __HttpRequest({
178
- protocol,
179
- hostname,
180
- port,
181
- method: "GET",
182
- headers,
183
- path: resolvedPath,
184
- query,
185
- body,
186
- });
116
+ b.m("GET").h(headers).q(query).b(body);
117
+ return b.build();
187
118
  };
188
119
  export const se_DescribeDiscovererCommand = async (input, context) => {
189
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
120
+ const b = rb(input, context);
190
121
  const headers = {};
191
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/discoverers/id/{DiscovererId}";
192
- resolvedPath = __resolvedPath(resolvedPath, input, "DiscovererId", () => input.DiscovererId, "{DiscovererId}", false);
122
+ b.bp("/v1/discoverers/id/{DiscovererId}");
123
+ b.p("DiscovererId", () => input.DiscovererId, "{DiscovererId}", false);
193
124
  let body;
194
- return new __HttpRequest({
195
- protocol,
196
- hostname,
197
- port,
198
- method: "GET",
199
- headers,
200
- path: resolvedPath,
201
- body,
202
- });
125
+ b.m("GET").h(headers).b(body);
126
+ return b.build();
203
127
  };
204
128
  export const se_DescribeRegistryCommand = async (input, context) => {
205
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
129
+ const b = rb(input, context);
206
130
  const headers = {};
207
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/registries/name/{RegistryName}";
208
- resolvedPath = __resolvedPath(resolvedPath, input, "RegistryName", () => input.RegistryName, "{RegistryName}", false);
131
+ b.bp("/v1/registries/name/{RegistryName}");
132
+ b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
209
133
  let body;
210
- return new __HttpRequest({
211
- protocol,
212
- hostname,
213
- port,
214
- method: "GET",
215
- headers,
216
- path: resolvedPath,
217
- body,
218
- });
134
+ b.m("GET").h(headers).b(body);
135
+ return b.build();
219
136
  };
220
137
  export const se_DescribeSchemaCommand = async (input, context) => {
221
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
138
+ const b = rb(input, context);
222
139
  const headers = {};
223
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
224
- "/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}";
225
- resolvedPath = __resolvedPath(resolvedPath, input, "RegistryName", () => input.RegistryName, "{RegistryName}", false);
226
- resolvedPath = __resolvedPath(resolvedPath, input, "SchemaName", () => input.SchemaName, "{SchemaName}", false);
140
+ b.bp("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}");
141
+ b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
142
+ b.p("SchemaName", () => input.SchemaName, "{SchemaName}", false);
227
143
  const query = map({
228
- schemaVersion: [, input.SchemaVersion],
144
+ [_sV]: [, input[_SV]],
229
145
  });
230
146
  let body;
231
- return new __HttpRequest({
232
- protocol,
233
- hostname,
234
- port,
235
- method: "GET",
236
- headers,
237
- path: resolvedPath,
238
- query,
239
- body,
240
- });
147
+ b.m("GET").h(headers).q(query).b(body);
148
+ return b.build();
241
149
  };
242
150
  export const se_ExportSchemaCommand = async (input, context) => {
243
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
151
+ const b = rb(input, context);
244
152
  const headers = {};
245
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
246
- "/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/export";
247
- resolvedPath = __resolvedPath(resolvedPath, input, "RegistryName", () => input.RegistryName, "{RegistryName}", false);
248
- resolvedPath = __resolvedPath(resolvedPath, input, "SchemaName", () => input.SchemaName, "{SchemaName}", false);
153
+ b.bp("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/export");
154
+ b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
155
+ b.p("SchemaName", () => input.SchemaName, "{SchemaName}", false);
249
156
  const query = map({
250
- schemaVersion: [, input.SchemaVersion],
251
- type: [, __expectNonNull(input.Type, `Type`)],
157
+ [_sV]: [, input[_SV]],
158
+ [_t]: [, __expectNonNull(input[_T], `Type`)],
252
159
  });
253
160
  let body;
254
- return new __HttpRequest({
255
- protocol,
256
- hostname,
257
- port,
258
- method: "GET",
259
- headers,
260
- path: resolvedPath,
261
- query,
262
- body,
263
- });
161
+ b.m("GET").h(headers).q(query).b(body);
162
+ return b.build();
264
163
  };
265
164
  export const se_GetCodeBindingSourceCommand = async (input, context) => {
266
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
165
+ const b = rb(input, context);
267
166
  const headers = {};
268
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
269
- "/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/language/{Language}/source";
270
- resolvedPath = __resolvedPath(resolvedPath, input, "Language", () => input.Language, "{Language}", false);
271
- resolvedPath = __resolvedPath(resolvedPath, input, "RegistryName", () => input.RegistryName, "{RegistryName}", false);
272
- resolvedPath = __resolvedPath(resolvedPath, input, "SchemaName", () => input.SchemaName, "{SchemaName}", false);
167
+ b.bp("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/language/{Language}/source");
168
+ b.p("Language", () => input.Language, "{Language}", false);
169
+ b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
170
+ b.p("SchemaName", () => input.SchemaName, "{SchemaName}", false);
273
171
  const query = map({
274
- schemaVersion: [, input.SchemaVersion],
172
+ [_sV]: [, input[_SV]],
275
173
  });
276
174
  let body;
277
- return new __HttpRequest({
278
- protocol,
279
- hostname,
280
- port,
281
- method: "GET",
282
- headers,
283
- path: resolvedPath,
284
- query,
285
- body,
286
- });
175
+ b.m("GET").h(headers).q(query).b(body);
176
+ return b.build();
287
177
  };
288
178
  export const se_GetDiscoveredSchemaCommand = async (input, context) => {
289
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
179
+ const b = rb(input, context);
290
180
  const headers = {
291
181
  "content-type": "application/json",
292
182
  };
293
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/discover";
183
+ b.bp("/v1/discover");
294
184
  let body;
295
185
  body = JSON.stringify(take(input, {
296
186
  Events: (_) => _json(_),
297
187
  Type: [],
298
188
  }));
299
- return new __HttpRequest({
300
- protocol,
301
- hostname,
302
- port,
303
- method: "POST",
304
- headers,
305
- path: resolvedPath,
306
- body,
307
- });
189
+ b.m("POST").h(headers).b(body);
190
+ return b.build();
308
191
  };
309
192
  export const se_GetResourcePolicyCommand = async (input, context) => {
310
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
193
+ const b = rb(input, context);
311
194
  const headers = {};
312
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/policy";
195
+ b.bp("/v1/policy");
313
196
  const query = map({
314
- registryName: [, input.RegistryName],
197
+ [_rN]: [, input[_RN]],
315
198
  });
316
199
  let body;
317
- return new __HttpRequest({
318
- protocol,
319
- hostname,
320
- port,
321
- method: "GET",
322
- headers,
323
- path: resolvedPath,
324
- query,
325
- body,
326
- });
200
+ b.m("GET").h(headers).q(query).b(body);
201
+ return b.build();
327
202
  };
328
203
  export const se_ListDiscoverersCommand = async (input, context) => {
329
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
204
+ const b = rb(input, context);
330
205
  const headers = {};
331
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/discoverers";
206
+ b.bp("/v1/discoverers");
332
207
  const query = map({
333
- discovererIdPrefix: [, input.DiscovererIdPrefix],
334
- limit: [() => input.Limit !== void 0, () => input.Limit.toString()],
335
- nextToken: [, input.NextToken],
336
- sourceArnPrefix: [, input.SourceArnPrefix],
208
+ [_dIP]: [, input[_DIP]],
209
+ [_l]: [() => input.Limit !== void 0, () => input[_L].toString()],
210
+ [_nT]: [, input[_NT]],
211
+ [_sAP]: [, input[_SAP]],
337
212
  });
338
213
  let body;
339
- return new __HttpRequest({
340
- protocol,
341
- hostname,
342
- port,
343
- method: "GET",
344
- headers,
345
- path: resolvedPath,
346
- query,
347
- body,
348
- });
214
+ b.m("GET").h(headers).q(query).b(body);
215
+ return b.build();
349
216
  };
350
217
  export const se_ListRegistriesCommand = async (input, context) => {
351
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
218
+ const b = rb(input, context);
352
219
  const headers = {};
353
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/registries";
220
+ b.bp("/v1/registries");
354
221
  const query = map({
355
- limit: [() => input.Limit !== void 0, () => input.Limit.toString()],
356
- nextToken: [, input.NextToken],
357
- registryNamePrefix: [, input.RegistryNamePrefix],
358
- scope: [, input.Scope],
222
+ [_l]: [() => input.Limit !== void 0, () => input[_L].toString()],
223
+ [_nT]: [, input[_NT]],
224
+ [_rNP]: [, input[_RNP]],
225
+ [_s]: [, input[_S]],
359
226
  });
360
227
  let body;
361
- return new __HttpRequest({
362
- protocol,
363
- hostname,
364
- port,
365
- method: "GET",
366
- headers,
367
- path: resolvedPath,
368
- query,
369
- body,
370
- });
228
+ b.m("GET").h(headers).q(query).b(body);
229
+ return b.build();
371
230
  };
372
231
  export const se_ListSchemasCommand = async (input, context) => {
373
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
232
+ const b = rb(input, context);
374
233
  const headers = {};
375
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
376
- "/v1/registries/name/{RegistryName}/schemas";
377
- resolvedPath = __resolvedPath(resolvedPath, input, "RegistryName", () => input.RegistryName, "{RegistryName}", false);
234
+ b.bp("/v1/registries/name/{RegistryName}/schemas");
235
+ b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
378
236
  const query = map({
379
- limit: [() => input.Limit !== void 0, () => input.Limit.toString()],
380
- nextToken: [, input.NextToken],
381
- schemaNamePrefix: [, input.SchemaNamePrefix],
237
+ [_l]: [() => input.Limit !== void 0, () => input[_L].toString()],
238
+ [_nT]: [, input[_NT]],
239
+ [_sNP]: [, input[_SNP]],
382
240
  });
383
241
  let body;
384
- return new __HttpRequest({
385
- protocol,
386
- hostname,
387
- port,
388
- method: "GET",
389
- headers,
390
- path: resolvedPath,
391
- query,
392
- body,
393
- });
242
+ b.m("GET").h(headers).q(query).b(body);
243
+ return b.build();
394
244
  };
395
245
  export const se_ListSchemaVersionsCommand = async (input, context) => {
396
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
246
+ const b = rb(input, context);
397
247
  const headers = {};
398
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
399
- "/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/versions";
400
- resolvedPath = __resolvedPath(resolvedPath, input, "RegistryName", () => input.RegistryName, "{RegistryName}", false);
401
- resolvedPath = __resolvedPath(resolvedPath, input, "SchemaName", () => input.SchemaName, "{SchemaName}", false);
248
+ b.bp("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/versions");
249
+ b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
250
+ b.p("SchemaName", () => input.SchemaName, "{SchemaName}", false);
402
251
  const query = map({
403
- limit: [() => input.Limit !== void 0, () => input.Limit.toString()],
404
- nextToken: [, input.NextToken],
252
+ [_l]: [() => input.Limit !== void 0, () => input[_L].toString()],
253
+ [_nT]: [, input[_NT]],
405
254
  });
406
255
  let body;
407
- return new __HttpRequest({
408
- protocol,
409
- hostname,
410
- port,
411
- method: "GET",
412
- headers,
413
- path: resolvedPath,
414
- query,
415
- body,
416
- });
256
+ b.m("GET").h(headers).q(query).b(body);
257
+ return b.build();
417
258
  };
418
259
  export const se_ListTagsForResourceCommand = async (input, context) => {
419
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
260
+ const b = rb(input, context);
420
261
  const headers = {};
421
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
422
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
262
+ b.bp("/tags/{ResourceArn}");
263
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
423
264
  let body;
424
- return new __HttpRequest({
425
- protocol,
426
- hostname,
427
- port,
428
- method: "GET",
429
- headers,
430
- path: resolvedPath,
431
- body,
432
- });
265
+ b.m("GET").h(headers).b(body);
266
+ return b.build();
433
267
  };
434
268
  export const se_PutCodeBindingCommand = async (input, context) => {
435
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
269
+ const b = rb(input, context);
436
270
  const headers = {};
437
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
438
- "/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/language/{Language}";
439
- resolvedPath = __resolvedPath(resolvedPath, input, "Language", () => input.Language, "{Language}", false);
440
- resolvedPath = __resolvedPath(resolvedPath, input, "RegistryName", () => input.RegistryName, "{RegistryName}", false);
441
- resolvedPath = __resolvedPath(resolvedPath, input, "SchemaName", () => input.SchemaName, "{SchemaName}", false);
271
+ b.bp("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/language/{Language}");
272
+ b.p("Language", () => input.Language, "{Language}", false);
273
+ b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
274
+ b.p("SchemaName", () => input.SchemaName, "{SchemaName}", false);
442
275
  const query = map({
443
- schemaVersion: [, input.SchemaVersion],
276
+ [_sV]: [, input[_SV]],
444
277
  });
445
278
  let body;
446
- return new __HttpRequest({
447
- protocol,
448
- hostname,
449
- port,
450
- method: "POST",
451
- headers,
452
- path: resolvedPath,
453
- query,
454
- body,
455
- });
279
+ b.m("POST").h(headers).q(query).b(body);
280
+ return b.build();
456
281
  };
457
282
  export const se_PutResourcePolicyCommand = async (input, context) => {
458
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
283
+ const b = rb(input, context);
459
284
  const headers = {
460
285
  "content-type": "application/json",
461
286
  };
462
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/policy";
287
+ b.bp("/v1/policy");
463
288
  const query = map({
464
- registryName: [, input.RegistryName],
289
+ [_rN]: [, input[_RN]],
465
290
  });
466
291
  let body;
467
292
  body = JSON.stringify(take(input, {
468
293
  Policy: (_) => __LazyJsonString.fromObject(_),
469
294
  RevisionId: [],
470
295
  }));
471
- return new __HttpRequest({
472
- protocol,
473
- hostname,
474
- port,
475
- method: "PUT",
476
- headers,
477
- path: resolvedPath,
478
- query,
479
- body,
480
- });
296
+ b.m("PUT").h(headers).q(query).b(body);
297
+ return b.build();
481
298
  };
482
299
  export const se_SearchSchemasCommand = async (input, context) => {
483
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
300
+ const b = rb(input, context);
484
301
  const headers = {};
485
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
486
- "/v1/registries/name/{RegistryName}/schemas/search";
487
- resolvedPath = __resolvedPath(resolvedPath, input, "RegistryName", () => input.RegistryName, "{RegistryName}", false);
302
+ b.bp("/v1/registries/name/{RegistryName}/schemas/search");
303
+ b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
488
304
  const query = map({
489
- keywords: [, __expectNonNull(input.Keywords, `Keywords`)],
490
- limit: [() => input.Limit !== void 0, () => input.Limit.toString()],
491
- nextToken: [, input.NextToken],
305
+ [_k]: [, __expectNonNull(input[_K], `Keywords`)],
306
+ [_l]: [() => input.Limit !== void 0, () => input[_L].toString()],
307
+ [_nT]: [, input[_NT]],
492
308
  });
493
309
  let body;
494
- return new __HttpRequest({
495
- protocol,
496
- hostname,
497
- port,
498
- method: "GET",
499
- headers,
500
- path: resolvedPath,
501
- query,
502
- body,
503
- });
310
+ b.m("GET").h(headers).q(query).b(body);
311
+ return b.build();
504
312
  };
505
313
  export const se_StartDiscovererCommand = async (input, context) => {
506
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
314
+ const b = rb(input, context);
507
315
  const headers = {};
508
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/discoverers/id/{DiscovererId}/start";
509
- resolvedPath = __resolvedPath(resolvedPath, input, "DiscovererId", () => input.DiscovererId, "{DiscovererId}", false);
316
+ b.bp("/v1/discoverers/id/{DiscovererId}/start");
317
+ b.p("DiscovererId", () => input.DiscovererId, "{DiscovererId}", false);
510
318
  let body;
511
- return new __HttpRequest({
512
- protocol,
513
- hostname,
514
- port,
515
- method: "POST",
516
- headers,
517
- path: resolvedPath,
518
- body,
519
- });
319
+ b.m("POST").h(headers).b(body);
320
+ return b.build();
520
321
  };
521
322
  export const se_StopDiscovererCommand = async (input, context) => {
522
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
323
+ const b = rb(input, context);
523
324
  const headers = {};
524
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/discoverers/id/{DiscovererId}/stop";
525
- resolvedPath = __resolvedPath(resolvedPath, input, "DiscovererId", () => input.DiscovererId, "{DiscovererId}", false);
325
+ b.bp("/v1/discoverers/id/{DiscovererId}/stop");
326
+ b.p("DiscovererId", () => input.DiscovererId, "{DiscovererId}", false);
526
327
  let body;
527
- return new __HttpRequest({
528
- protocol,
529
- hostname,
530
- port,
531
- method: "POST",
532
- headers,
533
- path: resolvedPath,
534
- body,
535
- });
328
+ b.m("POST").h(headers).b(body);
329
+ return b.build();
536
330
  };
537
331
  export const se_TagResourceCommand = async (input, context) => {
538
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
332
+ const b = rb(input, context);
539
333
  const headers = {
540
334
  "content-type": "application/json",
541
335
  };
542
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
543
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
336
+ b.bp("/tags/{ResourceArn}");
337
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
544
338
  let body;
545
339
  body = JSON.stringify(take(input, {
546
340
  tags: [, (_) => _json(_), `Tags`],
547
341
  }));
548
- return new __HttpRequest({
549
- protocol,
550
- hostname,
551
- port,
552
- method: "POST",
553
- headers,
554
- path: resolvedPath,
555
- body,
556
- });
342
+ b.m("POST").h(headers).b(body);
343
+ return b.build();
557
344
  };
558
345
  export const se_UntagResourceCommand = async (input, context) => {
559
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
346
+ const b = rb(input, context);
560
347
  const headers = {};
561
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
562
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
348
+ b.bp("/tags/{ResourceArn}");
349
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
563
350
  const query = map({
564
- tagKeys: [
351
+ [_tK]: [
565
352
  __expectNonNull(input.TagKeys, `TagKeys`) != null,
566
- () => (input.TagKeys || []).map((_entry) => _entry),
353
+ () => (input[_TK] || []).map((_entry) => _entry),
567
354
  ],
568
355
  });
569
356
  let body;
570
- return new __HttpRequest({
571
- protocol,
572
- hostname,
573
- port,
574
- method: "DELETE",
575
- headers,
576
- path: resolvedPath,
577
- query,
578
- body,
579
- });
357
+ b.m("DELETE").h(headers).q(query).b(body);
358
+ return b.build();
580
359
  };
581
360
  export const se_UpdateDiscovererCommand = async (input, context) => {
582
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
361
+ const b = rb(input, context);
583
362
  const headers = {
584
363
  "content-type": "application/json",
585
364
  };
586
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/discoverers/id/{DiscovererId}";
587
- resolvedPath = __resolvedPath(resolvedPath, input, "DiscovererId", () => input.DiscovererId, "{DiscovererId}", false);
365
+ b.bp("/v1/discoverers/id/{DiscovererId}");
366
+ b.p("DiscovererId", () => input.DiscovererId, "{DiscovererId}", false);
588
367
  let body;
589
368
  body = JSON.stringify(take(input, {
590
369
  CrossAccount: [],
591
370
  Description: [],
592
371
  }));
593
- return new __HttpRequest({
594
- protocol,
595
- hostname,
596
- port,
597
- method: "PUT",
598
- headers,
599
- path: resolvedPath,
600
- body,
601
- });
372
+ b.m("PUT").h(headers).b(body);
373
+ return b.build();
602
374
  };
603
375
  export const se_UpdateRegistryCommand = async (input, context) => {
604
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
376
+ const b = rb(input, context);
605
377
  const headers = {
606
378
  "content-type": "application/json",
607
379
  };
608
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/registries/name/{RegistryName}";
609
- resolvedPath = __resolvedPath(resolvedPath, input, "RegistryName", () => input.RegistryName, "{RegistryName}", false);
380
+ b.bp("/v1/registries/name/{RegistryName}");
381
+ b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
610
382
  let body;
611
383
  body = JSON.stringify(take(input, {
612
384
  Description: [],
613
385
  }));
614
- return new __HttpRequest({
615
- protocol,
616
- hostname,
617
- port,
618
- method: "PUT",
619
- headers,
620
- path: resolvedPath,
621
- body,
622
- });
386
+ b.m("PUT").h(headers).b(body);
387
+ return b.build();
623
388
  };
624
389
  export const se_UpdateSchemaCommand = async (input, context) => {
625
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
390
+ const b = rb(input, context);
626
391
  const headers = {
627
392
  "content-type": "application/json",
628
393
  };
629
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
630
- "/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}";
631
- resolvedPath = __resolvedPath(resolvedPath, input, "RegistryName", () => input.RegistryName, "{RegistryName}", false);
632
- resolvedPath = __resolvedPath(resolvedPath, input, "SchemaName", () => input.SchemaName, "{SchemaName}", false);
394
+ b.bp("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}");
395
+ b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
396
+ b.p("SchemaName", () => input.SchemaName, "{SchemaName}", false);
633
397
  let body;
634
398
  body = JSON.stringify(take(input, {
635
399
  ClientTokenId: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -637,15 +401,8 @@ export const se_UpdateSchemaCommand = async (input, context) => {
637
401
  Description: [],
638
402
  Type: [],
639
403
  }));
640
- return new __HttpRequest({
641
- protocol,
642
- hostname,
643
- port,
644
- method: "PUT",
645
- headers,
646
- path: resolvedPath,
647
- body,
648
- });
404
+ b.m("PUT").h(headers).b(body);
405
+ return b.build();
649
406
  };
650
407
  export const de_CreateDiscovererCommand = async (output, context) => {
651
408
  if (output.statusCode !== 201 && output.statusCode >= 300) {
@@ -2373,6 +2130,30 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2373
2130
  value !== "" &&
2374
2131
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2375
2132
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2133
+ const _DIP = "DiscovererIdPrefix";
2134
+ const _K = "Keywords";
2135
+ const _L = "Limit";
2136
+ const _NT = "NextToken";
2137
+ const _RN = "RegistryName";
2138
+ const _RNP = "RegistryNamePrefix";
2139
+ const _S = "Scope";
2140
+ const _SAP = "SourceArnPrefix";
2141
+ const _SNP = "SchemaNamePrefix";
2142
+ const _SV = "SchemaVersion";
2143
+ const _T = "Type";
2144
+ const _TK = "TagKeys";
2145
+ const _dIP = "discovererIdPrefix";
2146
+ const _k = "keywords";
2147
+ const _l = "limit";
2148
+ const _nT = "nextToken";
2149
+ const _rN = "registryName";
2150
+ const _rNP = "registryNamePrefix";
2151
+ const _s = "scope";
2152
+ const _sAP = "sourceArnPrefix";
2153
+ const _sNP = "schemaNamePrefix";
2154
+ const _sV = "schemaVersion";
2155
+ const _t = "type";
2156
+ const _tK = "tagKeys";
2376
2157
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2377
2158
  if (encoded.length) {
2378
2159
  return JSON.parse(encoded);