@aws-sdk/client-schemas 3.489.0 → 3.495.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.
Files changed (52) hide show
  1. package/dist-cjs/Schemas.js +1 -73
  2. package/dist-cjs/SchemasClient.js +1 -43
  3. package/dist-cjs/commands/CreateDiscovererCommand.js +1 -28
  4. package/dist-cjs/commands/CreateRegistryCommand.js +1 -28
  5. package/dist-cjs/commands/CreateSchemaCommand.js +1 -28
  6. package/dist-cjs/commands/DeleteDiscovererCommand.js +1 -28
  7. package/dist-cjs/commands/DeleteRegistryCommand.js +1 -28
  8. package/dist-cjs/commands/DeleteResourcePolicyCommand.js +1 -28
  9. package/dist-cjs/commands/DeleteSchemaCommand.js +1 -28
  10. package/dist-cjs/commands/DeleteSchemaVersionCommand.js +1 -28
  11. package/dist-cjs/commands/DescribeCodeBindingCommand.js +1 -28
  12. package/dist-cjs/commands/DescribeDiscovererCommand.js +1 -28
  13. package/dist-cjs/commands/DescribeRegistryCommand.js +1 -28
  14. package/dist-cjs/commands/DescribeSchemaCommand.js +1 -28
  15. package/dist-cjs/commands/ExportSchemaCommand.js +1 -28
  16. package/dist-cjs/commands/GetCodeBindingSourceCommand.js +1 -28
  17. package/dist-cjs/commands/GetDiscoveredSchemaCommand.js +1 -28
  18. package/dist-cjs/commands/GetResourcePolicyCommand.js +1 -28
  19. package/dist-cjs/commands/ListDiscoverersCommand.js +1 -28
  20. package/dist-cjs/commands/ListRegistriesCommand.js +1 -28
  21. package/dist-cjs/commands/ListSchemaVersionsCommand.js +1 -28
  22. package/dist-cjs/commands/ListSchemasCommand.js +1 -28
  23. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  24. package/dist-cjs/commands/PutCodeBindingCommand.js +1 -28
  25. package/dist-cjs/commands/PutResourcePolicyCommand.js +1 -28
  26. package/dist-cjs/commands/SearchSchemasCommand.js +1 -28
  27. package/dist-cjs/commands/StartDiscovererCommand.js +1 -28
  28. package/dist-cjs/commands/StopDiscovererCommand.js +1 -28
  29. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  30. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  31. package/dist-cjs/commands/UpdateDiscovererCommand.js +1 -28
  32. package/dist-cjs/commands/UpdateRegistryCommand.js +1 -28
  33. package/dist-cjs/commands/UpdateSchemaCommand.js +1 -28
  34. package/dist-cjs/commands/index.js +1 -34
  35. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  36. package/dist-cjs/extensionConfiguration.js +1 -2
  37. package/dist-cjs/index.js +3289 -12
  38. package/dist-cjs/models/SchemasServiceException.js +1 -12
  39. package/dist-cjs/models/index.js +1 -4
  40. package/dist-cjs/models/models_0.js +1 -167
  41. package/dist-cjs/pagination/Interfaces.js +1 -2
  42. package/dist-cjs/pagination/ListDiscoverersPaginator.js +1 -7
  43. package/dist-cjs/pagination/ListRegistriesPaginator.js +1 -7
  44. package/dist-cjs/pagination/ListSchemaVersionsPaginator.js +1 -7
  45. package/dist-cjs/pagination/ListSchemasPaginator.js +1 -7
  46. package/dist-cjs/pagination/SearchSchemasPaginator.js +1 -7
  47. package/dist-cjs/pagination/index.js +1 -9
  48. package/dist-cjs/protocols/Aws_restJson1.js +1 -2262
  49. package/dist-cjs/runtimeExtensions.js +1 -22
  50. package/dist-cjs/waiters/index.js +1 -4
  51. package/dist-cjs/waiters/waitForCodeBindingExists.js +1 -57
  52. package/package.json +42 -42
@@ -1,2262 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_ListSchemasCommand = exports.de_ListRegistriesCommand = exports.de_ListDiscoverersCommand = exports.de_GetResourcePolicyCommand = exports.de_GetDiscoveredSchemaCommand = exports.de_GetCodeBindingSourceCommand = exports.de_ExportSchemaCommand = exports.de_DescribeSchemaCommand = exports.de_DescribeRegistryCommand = exports.de_DescribeDiscovererCommand = exports.de_DescribeCodeBindingCommand = exports.de_DeleteSchemaVersionCommand = exports.de_DeleteSchemaCommand = exports.de_DeleteResourcePolicyCommand = exports.de_DeleteRegistryCommand = exports.de_DeleteDiscovererCommand = exports.de_CreateSchemaCommand = exports.de_CreateRegistryCommand = exports.de_CreateDiscovererCommand = exports.se_UpdateSchemaCommand = exports.se_UpdateRegistryCommand = exports.se_UpdateDiscovererCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopDiscovererCommand = exports.se_StartDiscovererCommand = exports.se_SearchSchemasCommand = exports.se_PutResourcePolicyCommand = exports.se_PutCodeBindingCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSchemaVersionsCommand = exports.se_ListSchemasCommand = exports.se_ListRegistriesCommand = exports.se_ListDiscoverersCommand = exports.se_GetResourcePolicyCommand = exports.se_GetDiscoveredSchemaCommand = exports.se_GetCodeBindingSourceCommand = exports.se_ExportSchemaCommand = exports.se_DescribeSchemaCommand = exports.se_DescribeRegistryCommand = exports.se_DescribeDiscovererCommand = exports.se_DescribeCodeBindingCommand = exports.se_DeleteSchemaVersionCommand = exports.se_DeleteSchemaCommand = exports.se_DeleteResourcePolicyCommand = exports.se_DeleteRegistryCommand = exports.se_DeleteDiscovererCommand = exports.se_CreateSchemaCommand = exports.se_CreateRegistryCommand = exports.se_CreateDiscovererCommand = void 0;
4
- exports.de_UpdateSchemaCommand = exports.de_UpdateRegistryCommand = exports.de_UpdateDiscovererCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopDiscovererCommand = exports.de_StartDiscovererCommand = exports.de_SearchSchemasCommand = exports.de_PutResourcePolicyCommand = exports.de_PutCodeBindingCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSchemaVersionsCommand = void 0;
5
- const core_1 = require("@smithy/core");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const uuid_1 = require("uuid");
8
- const models_0_1 = require("../models/models_0");
9
- const SchemasServiceException_1 = require("../models/SchemasServiceException");
10
- const se_CreateDiscovererCommand = async (input, context) => {
11
- const b = (0, core_1.requestBuilder)(input, context);
12
- const headers = {
13
- "content-type": "application/json",
14
- };
15
- b.bp("/v1/discoverers");
16
- let body;
17
- body = JSON.stringify((0, smithy_client_1.take)(input, {
18
- CrossAccount: [],
19
- Description: [],
20
- SourceArn: [],
21
- tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
22
- }));
23
- b.m("POST").h(headers).b(body);
24
- return b.build();
25
- };
26
- exports.se_CreateDiscovererCommand = se_CreateDiscovererCommand;
27
- const se_CreateRegistryCommand = async (input, context) => {
28
- const b = (0, core_1.requestBuilder)(input, context);
29
- const headers = {
30
- "content-type": "application/json",
31
- };
32
- b.bp("/v1/registries/name/{RegistryName}");
33
- b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
34
- let body;
35
- body = JSON.stringify((0, smithy_client_1.take)(input, {
36
- Description: [],
37
- tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
38
- }));
39
- b.m("POST").h(headers).b(body);
40
- return b.build();
41
- };
42
- exports.se_CreateRegistryCommand = se_CreateRegistryCommand;
43
- const se_CreateSchemaCommand = async (input, context) => {
44
- const b = (0, core_1.requestBuilder)(input, context);
45
- const headers = {
46
- "content-type": "application/json",
47
- };
48
- b.bp("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}");
49
- b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
50
- b.p("SchemaName", () => input.SchemaName, "{SchemaName}", false);
51
- let body;
52
- body = JSON.stringify((0, smithy_client_1.take)(input, {
53
- Content: [],
54
- Description: [],
55
- tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
56
- Type: [],
57
- }));
58
- b.m("POST").h(headers).b(body);
59
- return b.build();
60
- };
61
- exports.se_CreateSchemaCommand = se_CreateSchemaCommand;
62
- const se_DeleteDiscovererCommand = async (input, context) => {
63
- const b = (0, core_1.requestBuilder)(input, context);
64
- const headers = {};
65
- b.bp("/v1/discoverers/id/{DiscovererId}");
66
- b.p("DiscovererId", () => input.DiscovererId, "{DiscovererId}", false);
67
- let body;
68
- b.m("DELETE").h(headers).b(body);
69
- return b.build();
70
- };
71
- exports.se_DeleteDiscovererCommand = se_DeleteDiscovererCommand;
72
- const se_DeleteRegistryCommand = async (input, context) => {
73
- const b = (0, core_1.requestBuilder)(input, context);
74
- const headers = {};
75
- b.bp("/v1/registries/name/{RegistryName}");
76
- b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
77
- let body;
78
- b.m("DELETE").h(headers).b(body);
79
- return b.build();
80
- };
81
- exports.se_DeleteRegistryCommand = se_DeleteRegistryCommand;
82
- const se_DeleteResourcePolicyCommand = async (input, context) => {
83
- const b = (0, core_1.requestBuilder)(input, context);
84
- const headers = {};
85
- b.bp("/v1/policy");
86
- const query = (0, smithy_client_1.map)({
87
- [_rN]: [, input[_RN]],
88
- });
89
- let body;
90
- b.m("DELETE").h(headers).q(query).b(body);
91
- return b.build();
92
- };
93
- exports.se_DeleteResourcePolicyCommand = se_DeleteResourcePolicyCommand;
94
- const se_DeleteSchemaCommand = async (input, context) => {
95
- const b = (0, core_1.requestBuilder)(input, context);
96
- const headers = {};
97
- b.bp("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}");
98
- b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
99
- b.p("SchemaName", () => input.SchemaName, "{SchemaName}", false);
100
- let body;
101
- b.m("DELETE").h(headers).b(body);
102
- return b.build();
103
- };
104
- exports.se_DeleteSchemaCommand = se_DeleteSchemaCommand;
105
- const se_DeleteSchemaVersionCommand = async (input, context) => {
106
- const b = (0, core_1.requestBuilder)(input, context);
107
- const headers = {};
108
- b.bp("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/version/{SchemaVersion}");
109
- b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
110
- b.p("SchemaName", () => input.SchemaName, "{SchemaName}", false);
111
- b.p("SchemaVersion", () => input.SchemaVersion, "{SchemaVersion}", false);
112
- let body;
113
- b.m("DELETE").h(headers).b(body);
114
- return b.build();
115
- };
116
- exports.se_DeleteSchemaVersionCommand = se_DeleteSchemaVersionCommand;
117
- const se_DescribeCodeBindingCommand = async (input, context) => {
118
- const b = (0, core_1.requestBuilder)(input, context);
119
- const headers = {};
120
- b.bp("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/language/{Language}");
121
- b.p("Language", () => input.Language, "{Language}", false);
122
- b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
123
- b.p("SchemaName", () => input.SchemaName, "{SchemaName}", false);
124
- const query = (0, smithy_client_1.map)({
125
- [_sV]: [, input[_SV]],
126
- });
127
- let body;
128
- b.m("GET").h(headers).q(query).b(body);
129
- return b.build();
130
- };
131
- exports.se_DescribeCodeBindingCommand = se_DescribeCodeBindingCommand;
132
- const se_DescribeDiscovererCommand = async (input, context) => {
133
- const b = (0, core_1.requestBuilder)(input, context);
134
- const headers = {};
135
- b.bp("/v1/discoverers/id/{DiscovererId}");
136
- b.p("DiscovererId", () => input.DiscovererId, "{DiscovererId}", false);
137
- let body;
138
- b.m("GET").h(headers).b(body);
139
- return b.build();
140
- };
141
- exports.se_DescribeDiscovererCommand = se_DescribeDiscovererCommand;
142
- const se_DescribeRegistryCommand = async (input, context) => {
143
- const b = (0, core_1.requestBuilder)(input, context);
144
- const headers = {};
145
- b.bp("/v1/registries/name/{RegistryName}");
146
- b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
147
- let body;
148
- b.m("GET").h(headers).b(body);
149
- return b.build();
150
- };
151
- exports.se_DescribeRegistryCommand = se_DescribeRegistryCommand;
152
- const se_DescribeSchemaCommand = async (input, context) => {
153
- const b = (0, core_1.requestBuilder)(input, context);
154
- const headers = {};
155
- b.bp("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}");
156
- b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
157
- b.p("SchemaName", () => input.SchemaName, "{SchemaName}", false);
158
- const query = (0, smithy_client_1.map)({
159
- [_sV]: [, input[_SV]],
160
- });
161
- let body;
162
- b.m("GET").h(headers).q(query).b(body);
163
- return b.build();
164
- };
165
- exports.se_DescribeSchemaCommand = se_DescribeSchemaCommand;
166
- const se_ExportSchemaCommand = async (input, context) => {
167
- const b = (0, core_1.requestBuilder)(input, context);
168
- const headers = {};
169
- b.bp("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/export");
170
- b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
171
- b.p("SchemaName", () => input.SchemaName, "{SchemaName}", false);
172
- const query = (0, smithy_client_1.map)({
173
- [_sV]: [, input[_SV]],
174
- [_t]: [, (0, smithy_client_1.expectNonNull)(input[_T], `Type`)],
175
- });
176
- let body;
177
- b.m("GET").h(headers).q(query).b(body);
178
- return b.build();
179
- };
180
- exports.se_ExportSchemaCommand = se_ExportSchemaCommand;
181
- const se_GetCodeBindingSourceCommand = async (input, context) => {
182
- const b = (0, core_1.requestBuilder)(input, context);
183
- const headers = {};
184
- b.bp("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/language/{Language}/source");
185
- b.p("Language", () => input.Language, "{Language}", false);
186
- b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
187
- b.p("SchemaName", () => input.SchemaName, "{SchemaName}", false);
188
- const query = (0, smithy_client_1.map)({
189
- [_sV]: [, input[_SV]],
190
- });
191
- let body;
192
- b.m("GET").h(headers).q(query).b(body);
193
- return b.build();
194
- };
195
- exports.se_GetCodeBindingSourceCommand = se_GetCodeBindingSourceCommand;
196
- const se_GetDiscoveredSchemaCommand = async (input, context) => {
197
- const b = (0, core_1.requestBuilder)(input, context);
198
- const headers = {
199
- "content-type": "application/json",
200
- };
201
- b.bp("/v1/discover");
202
- let body;
203
- body = JSON.stringify((0, smithy_client_1.take)(input, {
204
- Events: (_) => (0, smithy_client_1._json)(_),
205
- Type: [],
206
- }));
207
- b.m("POST").h(headers).b(body);
208
- return b.build();
209
- };
210
- exports.se_GetDiscoveredSchemaCommand = se_GetDiscoveredSchemaCommand;
211
- const se_GetResourcePolicyCommand = async (input, context) => {
212
- const b = (0, core_1.requestBuilder)(input, context);
213
- const headers = {};
214
- b.bp("/v1/policy");
215
- const query = (0, smithy_client_1.map)({
216
- [_rN]: [, input[_RN]],
217
- });
218
- let body;
219
- b.m("GET").h(headers).q(query).b(body);
220
- return b.build();
221
- };
222
- exports.se_GetResourcePolicyCommand = se_GetResourcePolicyCommand;
223
- const se_ListDiscoverersCommand = async (input, context) => {
224
- const b = (0, core_1.requestBuilder)(input, context);
225
- const headers = {};
226
- b.bp("/v1/discoverers");
227
- const query = (0, smithy_client_1.map)({
228
- [_dIP]: [, input[_DIP]],
229
- [_l]: [() => input.Limit !== void 0, () => input[_L].toString()],
230
- [_nT]: [, input[_NT]],
231
- [_sAP]: [, input[_SAP]],
232
- });
233
- let body;
234
- b.m("GET").h(headers).q(query).b(body);
235
- return b.build();
236
- };
237
- exports.se_ListDiscoverersCommand = se_ListDiscoverersCommand;
238
- const se_ListRegistriesCommand = async (input, context) => {
239
- const b = (0, core_1.requestBuilder)(input, context);
240
- const headers = {};
241
- b.bp("/v1/registries");
242
- const query = (0, smithy_client_1.map)({
243
- [_l]: [() => input.Limit !== void 0, () => input[_L].toString()],
244
- [_nT]: [, input[_NT]],
245
- [_rNP]: [, input[_RNP]],
246
- [_s]: [, input[_S]],
247
- });
248
- let body;
249
- b.m("GET").h(headers).q(query).b(body);
250
- return b.build();
251
- };
252
- exports.se_ListRegistriesCommand = se_ListRegistriesCommand;
253
- const se_ListSchemasCommand = async (input, context) => {
254
- const b = (0, core_1.requestBuilder)(input, context);
255
- const headers = {};
256
- b.bp("/v1/registries/name/{RegistryName}/schemas");
257
- b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
258
- const query = (0, smithy_client_1.map)({
259
- [_l]: [() => input.Limit !== void 0, () => input[_L].toString()],
260
- [_nT]: [, input[_NT]],
261
- [_sNP]: [, input[_SNP]],
262
- });
263
- let body;
264
- b.m("GET").h(headers).q(query).b(body);
265
- return b.build();
266
- };
267
- exports.se_ListSchemasCommand = se_ListSchemasCommand;
268
- const se_ListSchemaVersionsCommand = async (input, context) => {
269
- const b = (0, core_1.requestBuilder)(input, context);
270
- const headers = {};
271
- b.bp("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/versions");
272
- b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
273
- b.p("SchemaName", () => input.SchemaName, "{SchemaName}", false);
274
- const query = (0, smithy_client_1.map)({
275
- [_l]: [() => input.Limit !== void 0, () => input[_L].toString()],
276
- [_nT]: [, input[_NT]],
277
- });
278
- let body;
279
- b.m("GET").h(headers).q(query).b(body);
280
- return b.build();
281
- };
282
- exports.se_ListSchemaVersionsCommand = se_ListSchemaVersionsCommand;
283
- const se_ListTagsForResourceCommand = async (input, context) => {
284
- const b = (0, core_1.requestBuilder)(input, context);
285
- const headers = {};
286
- b.bp("/tags/{ResourceArn}");
287
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
288
- let body;
289
- b.m("GET").h(headers).b(body);
290
- return b.build();
291
- };
292
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
293
- const se_PutCodeBindingCommand = async (input, context) => {
294
- const b = (0, core_1.requestBuilder)(input, context);
295
- const headers = {};
296
- b.bp("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/language/{Language}");
297
- b.p("Language", () => input.Language, "{Language}", false);
298
- b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
299
- b.p("SchemaName", () => input.SchemaName, "{SchemaName}", false);
300
- const query = (0, smithy_client_1.map)({
301
- [_sV]: [, input[_SV]],
302
- });
303
- let body;
304
- b.m("POST").h(headers).q(query).b(body);
305
- return b.build();
306
- };
307
- exports.se_PutCodeBindingCommand = se_PutCodeBindingCommand;
308
- const se_PutResourcePolicyCommand = async (input, context) => {
309
- const b = (0, core_1.requestBuilder)(input, context);
310
- const headers = {
311
- "content-type": "application/json",
312
- };
313
- b.bp("/v1/policy");
314
- const query = (0, smithy_client_1.map)({
315
- [_rN]: [, input[_RN]],
316
- });
317
- let body;
318
- body = JSON.stringify((0, smithy_client_1.take)(input, {
319
- Policy: (_) => smithy_client_1.LazyJsonString.fromObject(_),
320
- RevisionId: [],
321
- }));
322
- b.m("PUT").h(headers).q(query).b(body);
323
- return b.build();
324
- };
325
- exports.se_PutResourcePolicyCommand = se_PutResourcePolicyCommand;
326
- const se_SearchSchemasCommand = async (input, context) => {
327
- const b = (0, core_1.requestBuilder)(input, context);
328
- const headers = {};
329
- b.bp("/v1/registries/name/{RegistryName}/schemas/search");
330
- b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
331
- const query = (0, smithy_client_1.map)({
332
- [_k]: [, (0, smithy_client_1.expectNonNull)(input[_K], `Keywords`)],
333
- [_l]: [() => input.Limit !== void 0, () => input[_L].toString()],
334
- [_nT]: [, input[_NT]],
335
- });
336
- let body;
337
- b.m("GET").h(headers).q(query).b(body);
338
- return b.build();
339
- };
340
- exports.se_SearchSchemasCommand = se_SearchSchemasCommand;
341
- const se_StartDiscovererCommand = async (input, context) => {
342
- const b = (0, core_1.requestBuilder)(input, context);
343
- const headers = {};
344
- b.bp("/v1/discoverers/id/{DiscovererId}/start");
345
- b.p("DiscovererId", () => input.DiscovererId, "{DiscovererId}", false);
346
- let body;
347
- b.m("POST").h(headers).b(body);
348
- return b.build();
349
- };
350
- exports.se_StartDiscovererCommand = se_StartDiscovererCommand;
351
- const se_StopDiscovererCommand = async (input, context) => {
352
- const b = (0, core_1.requestBuilder)(input, context);
353
- const headers = {};
354
- b.bp("/v1/discoverers/id/{DiscovererId}/stop");
355
- b.p("DiscovererId", () => input.DiscovererId, "{DiscovererId}", false);
356
- let body;
357
- b.m("POST").h(headers).b(body);
358
- return b.build();
359
- };
360
- exports.se_StopDiscovererCommand = se_StopDiscovererCommand;
361
- const se_TagResourceCommand = async (input, context) => {
362
- const b = (0, core_1.requestBuilder)(input, context);
363
- const headers = {
364
- "content-type": "application/json",
365
- };
366
- b.bp("/tags/{ResourceArn}");
367
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
368
- let body;
369
- body = JSON.stringify((0, smithy_client_1.take)(input, {
370
- tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
371
- }));
372
- b.m("POST").h(headers).b(body);
373
- return b.build();
374
- };
375
- exports.se_TagResourceCommand = se_TagResourceCommand;
376
- const se_UntagResourceCommand = async (input, context) => {
377
- const b = (0, core_1.requestBuilder)(input, context);
378
- const headers = {};
379
- b.bp("/tags/{ResourceArn}");
380
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
381
- const query = (0, smithy_client_1.map)({
382
- [_tK]: [
383
- (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
384
- () => (input[_TK] || []).map((_entry) => _entry),
385
- ],
386
- });
387
- let body;
388
- b.m("DELETE").h(headers).q(query).b(body);
389
- return b.build();
390
- };
391
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
392
- const se_UpdateDiscovererCommand = async (input, context) => {
393
- const b = (0, core_1.requestBuilder)(input, context);
394
- const headers = {
395
- "content-type": "application/json",
396
- };
397
- b.bp("/v1/discoverers/id/{DiscovererId}");
398
- b.p("DiscovererId", () => input.DiscovererId, "{DiscovererId}", false);
399
- let body;
400
- body = JSON.stringify((0, smithy_client_1.take)(input, {
401
- CrossAccount: [],
402
- Description: [],
403
- }));
404
- b.m("PUT").h(headers).b(body);
405
- return b.build();
406
- };
407
- exports.se_UpdateDiscovererCommand = se_UpdateDiscovererCommand;
408
- const se_UpdateRegistryCommand = async (input, context) => {
409
- const b = (0, core_1.requestBuilder)(input, context);
410
- const headers = {
411
- "content-type": "application/json",
412
- };
413
- b.bp("/v1/registries/name/{RegistryName}");
414
- b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
415
- let body;
416
- body = JSON.stringify((0, smithy_client_1.take)(input, {
417
- Description: [],
418
- }));
419
- b.m("PUT").h(headers).b(body);
420
- return b.build();
421
- };
422
- exports.se_UpdateRegistryCommand = se_UpdateRegistryCommand;
423
- const se_UpdateSchemaCommand = async (input, context) => {
424
- const b = (0, core_1.requestBuilder)(input, context);
425
- const headers = {
426
- "content-type": "application/json",
427
- };
428
- b.bp("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}");
429
- b.p("RegistryName", () => input.RegistryName, "{RegistryName}", false);
430
- b.p("SchemaName", () => input.SchemaName, "{SchemaName}", false);
431
- let body;
432
- body = JSON.stringify((0, smithy_client_1.take)(input, {
433
- ClientTokenId: [true, (_) => _ ?? (0, uuid_1.v4)()],
434
- Content: [],
435
- Description: [],
436
- Type: [],
437
- }));
438
- b.m("PUT").h(headers).b(body);
439
- return b.build();
440
- };
441
- exports.se_UpdateSchemaCommand = se_UpdateSchemaCommand;
442
- const de_CreateDiscovererCommand = async (output, context) => {
443
- if (output.statusCode !== 201 && output.statusCode >= 300) {
444
- return de_CreateDiscovererCommandError(output, context);
445
- }
446
- const contents = (0, smithy_client_1.map)({
447
- $metadata: deserializeMetadata(output),
448
- });
449
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
450
- const doc = (0, smithy_client_1.take)(data, {
451
- CrossAccount: smithy_client_1.expectBoolean,
452
- Description: smithy_client_1.expectString,
453
- DiscovererArn: smithy_client_1.expectString,
454
- DiscovererId: smithy_client_1.expectString,
455
- SourceArn: smithy_client_1.expectString,
456
- State: smithy_client_1.expectString,
457
- Tags: [, smithy_client_1._json, `tags`],
458
- });
459
- Object.assign(contents, doc);
460
- return contents;
461
- };
462
- exports.de_CreateDiscovererCommand = de_CreateDiscovererCommand;
463
- const de_CreateDiscovererCommandError = async (output, context) => {
464
- const parsedOutput = {
465
- ...output,
466
- body: await parseErrorBody(output.body, context),
467
- };
468
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
469
- switch (errorCode) {
470
- case "BadRequestException":
471
- case "com.amazonaws.schemas#BadRequestException":
472
- throw await de_BadRequestExceptionRes(parsedOutput, context);
473
- case "ConflictException":
474
- case "com.amazonaws.schemas#ConflictException":
475
- throw await de_ConflictExceptionRes(parsedOutput, context);
476
- case "ForbiddenException":
477
- case "com.amazonaws.schemas#ForbiddenException":
478
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
479
- case "InternalServerErrorException":
480
- case "com.amazonaws.schemas#InternalServerErrorException":
481
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
482
- case "ServiceUnavailableException":
483
- case "com.amazonaws.schemas#ServiceUnavailableException":
484
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
485
- case "UnauthorizedException":
486
- case "com.amazonaws.schemas#UnauthorizedException":
487
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
488
- default:
489
- const parsedBody = parsedOutput.body;
490
- return throwDefaultError({
491
- output,
492
- parsedBody,
493
- errorCode,
494
- });
495
- }
496
- };
497
- const de_CreateRegistryCommand = async (output, context) => {
498
- if (output.statusCode !== 201 && output.statusCode >= 300) {
499
- return de_CreateRegistryCommandError(output, context);
500
- }
501
- const contents = (0, smithy_client_1.map)({
502
- $metadata: deserializeMetadata(output),
503
- });
504
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
505
- const doc = (0, smithy_client_1.take)(data, {
506
- Description: smithy_client_1.expectString,
507
- RegistryArn: smithy_client_1.expectString,
508
- RegistryName: smithy_client_1.expectString,
509
- Tags: [, smithy_client_1._json, `tags`],
510
- });
511
- Object.assign(contents, doc);
512
- return contents;
513
- };
514
- exports.de_CreateRegistryCommand = de_CreateRegistryCommand;
515
- const de_CreateRegistryCommandError = async (output, context) => {
516
- const parsedOutput = {
517
- ...output,
518
- body: await parseErrorBody(output.body, context),
519
- };
520
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
521
- switch (errorCode) {
522
- case "BadRequestException":
523
- case "com.amazonaws.schemas#BadRequestException":
524
- throw await de_BadRequestExceptionRes(parsedOutput, context);
525
- case "ConflictException":
526
- case "com.amazonaws.schemas#ConflictException":
527
- throw await de_ConflictExceptionRes(parsedOutput, context);
528
- case "ForbiddenException":
529
- case "com.amazonaws.schemas#ForbiddenException":
530
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
531
- case "InternalServerErrorException":
532
- case "com.amazonaws.schemas#InternalServerErrorException":
533
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
534
- case "ServiceUnavailableException":
535
- case "com.amazonaws.schemas#ServiceUnavailableException":
536
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
537
- case "UnauthorizedException":
538
- case "com.amazonaws.schemas#UnauthorizedException":
539
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
540
- default:
541
- const parsedBody = parsedOutput.body;
542
- return throwDefaultError({
543
- output,
544
- parsedBody,
545
- errorCode,
546
- });
547
- }
548
- };
549
- const de_CreateSchemaCommand = async (output, context) => {
550
- if (output.statusCode !== 201 && output.statusCode >= 300) {
551
- return de_CreateSchemaCommandError(output, context);
552
- }
553
- const contents = (0, smithy_client_1.map)({
554
- $metadata: deserializeMetadata(output),
555
- });
556
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
557
- const doc = (0, smithy_client_1.take)(data, {
558
- Description: smithy_client_1.expectString,
559
- LastModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
560
- SchemaArn: smithy_client_1.expectString,
561
- SchemaName: smithy_client_1.expectString,
562
- SchemaVersion: smithy_client_1.expectString,
563
- Tags: [, smithy_client_1._json, `tags`],
564
- Type: smithy_client_1.expectString,
565
- VersionCreatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
566
- });
567
- Object.assign(contents, doc);
568
- return contents;
569
- };
570
- exports.de_CreateSchemaCommand = de_CreateSchemaCommand;
571
- const de_CreateSchemaCommandError = async (output, context) => {
572
- const parsedOutput = {
573
- ...output,
574
- body: await parseErrorBody(output.body, context),
575
- };
576
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
577
- switch (errorCode) {
578
- case "BadRequestException":
579
- case "com.amazonaws.schemas#BadRequestException":
580
- throw await de_BadRequestExceptionRes(parsedOutput, context);
581
- case "ForbiddenException":
582
- case "com.amazonaws.schemas#ForbiddenException":
583
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
584
- case "InternalServerErrorException":
585
- case "com.amazonaws.schemas#InternalServerErrorException":
586
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
587
- case "ServiceUnavailableException":
588
- case "com.amazonaws.schemas#ServiceUnavailableException":
589
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
590
- default:
591
- const parsedBody = parsedOutput.body;
592
- return throwDefaultError({
593
- output,
594
- parsedBody,
595
- errorCode,
596
- });
597
- }
598
- };
599
- const de_DeleteDiscovererCommand = async (output, context) => {
600
- if (output.statusCode !== 204 && output.statusCode >= 300) {
601
- return de_DeleteDiscovererCommandError(output, context);
602
- }
603
- const contents = (0, smithy_client_1.map)({
604
- $metadata: deserializeMetadata(output),
605
- });
606
- await (0, smithy_client_1.collectBody)(output.body, context);
607
- return contents;
608
- };
609
- exports.de_DeleteDiscovererCommand = de_DeleteDiscovererCommand;
610
- const de_DeleteDiscovererCommandError = async (output, context) => {
611
- const parsedOutput = {
612
- ...output,
613
- body: await parseErrorBody(output.body, context),
614
- };
615
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
616
- switch (errorCode) {
617
- case "BadRequestException":
618
- case "com.amazonaws.schemas#BadRequestException":
619
- throw await de_BadRequestExceptionRes(parsedOutput, context);
620
- case "ForbiddenException":
621
- case "com.amazonaws.schemas#ForbiddenException":
622
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
623
- case "InternalServerErrorException":
624
- case "com.amazonaws.schemas#InternalServerErrorException":
625
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
626
- case "NotFoundException":
627
- case "com.amazonaws.schemas#NotFoundException":
628
- throw await de_NotFoundExceptionRes(parsedOutput, context);
629
- case "ServiceUnavailableException":
630
- case "com.amazonaws.schemas#ServiceUnavailableException":
631
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
632
- case "UnauthorizedException":
633
- case "com.amazonaws.schemas#UnauthorizedException":
634
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
635
- default:
636
- const parsedBody = parsedOutput.body;
637
- return throwDefaultError({
638
- output,
639
- parsedBody,
640
- errorCode,
641
- });
642
- }
643
- };
644
- const de_DeleteRegistryCommand = async (output, context) => {
645
- if (output.statusCode !== 204 && output.statusCode >= 300) {
646
- return de_DeleteRegistryCommandError(output, context);
647
- }
648
- const contents = (0, smithy_client_1.map)({
649
- $metadata: deserializeMetadata(output),
650
- });
651
- await (0, smithy_client_1.collectBody)(output.body, context);
652
- return contents;
653
- };
654
- exports.de_DeleteRegistryCommand = de_DeleteRegistryCommand;
655
- const de_DeleteRegistryCommandError = async (output, context) => {
656
- const parsedOutput = {
657
- ...output,
658
- body: await parseErrorBody(output.body, context),
659
- };
660
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
661
- switch (errorCode) {
662
- case "BadRequestException":
663
- case "com.amazonaws.schemas#BadRequestException":
664
- throw await de_BadRequestExceptionRes(parsedOutput, context);
665
- case "ForbiddenException":
666
- case "com.amazonaws.schemas#ForbiddenException":
667
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
668
- case "InternalServerErrorException":
669
- case "com.amazonaws.schemas#InternalServerErrorException":
670
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
671
- case "NotFoundException":
672
- case "com.amazonaws.schemas#NotFoundException":
673
- throw await de_NotFoundExceptionRes(parsedOutput, context);
674
- case "ServiceUnavailableException":
675
- case "com.amazonaws.schemas#ServiceUnavailableException":
676
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
677
- case "UnauthorizedException":
678
- case "com.amazonaws.schemas#UnauthorizedException":
679
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
680
- default:
681
- const parsedBody = parsedOutput.body;
682
- return throwDefaultError({
683
- output,
684
- parsedBody,
685
- errorCode,
686
- });
687
- }
688
- };
689
- const de_DeleteResourcePolicyCommand = async (output, context) => {
690
- if (output.statusCode !== 204 && output.statusCode >= 300) {
691
- return de_DeleteResourcePolicyCommandError(output, context);
692
- }
693
- const contents = (0, smithy_client_1.map)({
694
- $metadata: deserializeMetadata(output),
695
- });
696
- await (0, smithy_client_1.collectBody)(output.body, context);
697
- return contents;
698
- };
699
- exports.de_DeleteResourcePolicyCommand = de_DeleteResourcePolicyCommand;
700
- const de_DeleteResourcePolicyCommandError = async (output, context) => {
701
- const parsedOutput = {
702
- ...output,
703
- body: await parseErrorBody(output.body, context),
704
- };
705
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
706
- switch (errorCode) {
707
- case "BadRequestException":
708
- case "com.amazonaws.schemas#BadRequestException":
709
- throw await de_BadRequestExceptionRes(parsedOutput, context);
710
- case "ForbiddenException":
711
- case "com.amazonaws.schemas#ForbiddenException":
712
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
713
- case "InternalServerErrorException":
714
- case "com.amazonaws.schemas#InternalServerErrorException":
715
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
716
- case "NotFoundException":
717
- case "com.amazonaws.schemas#NotFoundException":
718
- throw await de_NotFoundExceptionRes(parsedOutput, context);
719
- case "ServiceUnavailableException":
720
- case "com.amazonaws.schemas#ServiceUnavailableException":
721
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
722
- case "UnauthorizedException":
723
- case "com.amazonaws.schemas#UnauthorizedException":
724
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
725
- default:
726
- const parsedBody = parsedOutput.body;
727
- return throwDefaultError({
728
- output,
729
- parsedBody,
730
- errorCode,
731
- });
732
- }
733
- };
734
- const de_DeleteSchemaCommand = async (output, context) => {
735
- if (output.statusCode !== 204 && output.statusCode >= 300) {
736
- return de_DeleteSchemaCommandError(output, context);
737
- }
738
- const contents = (0, smithy_client_1.map)({
739
- $metadata: deserializeMetadata(output),
740
- });
741
- await (0, smithy_client_1.collectBody)(output.body, context);
742
- return contents;
743
- };
744
- exports.de_DeleteSchemaCommand = de_DeleteSchemaCommand;
745
- const de_DeleteSchemaCommandError = async (output, context) => {
746
- const parsedOutput = {
747
- ...output,
748
- body: await parseErrorBody(output.body, context),
749
- };
750
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
751
- switch (errorCode) {
752
- case "BadRequestException":
753
- case "com.amazonaws.schemas#BadRequestException":
754
- throw await de_BadRequestExceptionRes(parsedOutput, context);
755
- case "ForbiddenException":
756
- case "com.amazonaws.schemas#ForbiddenException":
757
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
758
- case "InternalServerErrorException":
759
- case "com.amazonaws.schemas#InternalServerErrorException":
760
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
761
- case "NotFoundException":
762
- case "com.amazonaws.schemas#NotFoundException":
763
- throw await de_NotFoundExceptionRes(parsedOutput, context);
764
- case "ServiceUnavailableException":
765
- case "com.amazonaws.schemas#ServiceUnavailableException":
766
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
767
- case "UnauthorizedException":
768
- case "com.amazonaws.schemas#UnauthorizedException":
769
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
770
- default:
771
- const parsedBody = parsedOutput.body;
772
- return throwDefaultError({
773
- output,
774
- parsedBody,
775
- errorCode,
776
- });
777
- }
778
- };
779
- const de_DeleteSchemaVersionCommand = async (output, context) => {
780
- if (output.statusCode !== 204 && output.statusCode >= 300) {
781
- return de_DeleteSchemaVersionCommandError(output, context);
782
- }
783
- const contents = (0, smithy_client_1.map)({
784
- $metadata: deserializeMetadata(output),
785
- });
786
- await (0, smithy_client_1.collectBody)(output.body, context);
787
- return contents;
788
- };
789
- exports.de_DeleteSchemaVersionCommand = de_DeleteSchemaVersionCommand;
790
- const de_DeleteSchemaVersionCommandError = async (output, context) => {
791
- const parsedOutput = {
792
- ...output,
793
- body: await parseErrorBody(output.body, context),
794
- };
795
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
796
- switch (errorCode) {
797
- case "BadRequestException":
798
- case "com.amazonaws.schemas#BadRequestException":
799
- throw await de_BadRequestExceptionRes(parsedOutput, context);
800
- case "ForbiddenException":
801
- case "com.amazonaws.schemas#ForbiddenException":
802
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
803
- case "InternalServerErrorException":
804
- case "com.amazonaws.schemas#InternalServerErrorException":
805
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
806
- case "NotFoundException":
807
- case "com.amazonaws.schemas#NotFoundException":
808
- throw await de_NotFoundExceptionRes(parsedOutput, context);
809
- case "ServiceUnavailableException":
810
- case "com.amazonaws.schemas#ServiceUnavailableException":
811
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
812
- case "UnauthorizedException":
813
- case "com.amazonaws.schemas#UnauthorizedException":
814
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
815
- default:
816
- const parsedBody = parsedOutput.body;
817
- return throwDefaultError({
818
- output,
819
- parsedBody,
820
- errorCode,
821
- });
822
- }
823
- };
824
- const de_DescribeCodeBindingCommand = async (output, context) => {
825
- if (output.statusCode !== 200 && output.statusCode >= 300) {
826
- return de_DescribeCodeBindingCommandError(output, context);
827
- }
828
- const contents = (0, smithy_client_1.map)({
829
- $metadata: deserializeMetadata(output),
830
- });
831
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
832
- const doc = (0, smithy_client_1.take)(data, {
833
- CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
834
- LastModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
835
- SchemaVersion: smithy_client_1.expectString,
836
- Status: smithy_client_1.expectString,
837
- });
838
- Object.assign(contents, doc);
839
- return contents;
840
- };
841
- exports.de_DescribeCodeBindingCommand = de_DescribeCodeBindingCommand;
842
- const de_DescribeCodeBindingCommandError = async (output, context) => {
843
- const parsedOutput = {
844
- ...output,
845
- body: await parseErrorBody(output.body, context),
846
- };
847
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
848
- switch (errorCode) {
849
- case "BadRequestException":
850
- case "com.amazonaws.schemas#BadRequestException":
851
- throw await de_BadRequestExceptionRes(parsedOutput, context);
852
- case "ForbiddenException":
853
- case "com.amazonaws.schemas#ForbiddenException":
854
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
855
- case "InternalServerErrorException":
856
- case "com.amazonaws.schemas#InternalServerErrorException":
857
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
858
- case "NotFoundException":
859
- case "com.amazonaws.schemas#NotFoundException":
860
- throw await de_NotFoundExceptionRes(parsedOutput, context);
861
- case "TooManyRequestsException":
862
- case "com.amazonaws.schemas#TooManyRequestsException":
863
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
864
- case "UnauthorizedException":
865
- case "com.amazonaws.schemas#UnauthorizedException":
866
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
867
- default:
868
- const parsedBody = parsedOutput.body;
869
- return throwDefaultError({
870
- output,
871
- parsedBody,
872
- errorCode,
873
- });
874
- }
875
- };
876
- const de_DescribeDiscovererCommand = async (output, context) => {
877
- if (output.statusCode !== 200 && output.statusCode >= 300) {
878
- return de_DescribeDiscovererCommandError(output, context);
879
- }
880
- const contents = (0, smithy_client_1.map)({
881
- $metadata: deserializeMetadata(output),
882
- });
883
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
884
- const doc = (0, smithy_client_1.take)(data, {
885
- CrossAccount: smithy_client_1.expectBoolean,
886
- Description: smithy_client_1.expectString,
887
- DiscovererArn: smithy_client_1.expectString,
888
- DiscovererId: smithy_client_1.expectString,
889
- SourceArn: smithy_client_1.expectString,
890
- State: smithy_client_1.expectString,
891
- Tags: [, smithy_client_1._json, `tags`],
892
- });
893
- Object.assign(contents, doc);
894
- return contents;
895
- };
896
- exports.de_DescribeDiscovererCommand = de_DescribeDiscovererCommand;
897
- const de_DescribeDiscovererCommandError = async (output, context) => {
898
- const parsedOutput = {
899
- ...output,
900
- body: await parseErrorBody(output.body, context),
901
- };
902
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
903
- switch (errorCode) {
904
- case "BadRequestException":
905
- case "com.amazonaws.schemas#BadRequestException":
906
- throw await de_BadRequestExceptionRes(parsedOutput, context);
907
- case "ForbiddenException":
908
- case "com.amazonaws.schemas#ForbiddenException":
909
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
910
- case "InternalServerErrorException":
911
- case "com.amazonaws.schemas#InternalServerErrorException":
912
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
913
- case "NotFoundException":
914
- case "com.amazonaws.schemas#NotFoundException":
915
- throw await de_NotFoundExceptionRes(parsedOutput, context);
916
- case "ServiceUnavailableException":
917
- case "com.amazonaws.schemas#ServiceUnavailableException":
918
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
919
- case "UnauthorizedException":
920
- case "com.amazonaws.schemas#UnauthorizedException":
921
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
922
- default:
923
- const parsedBody = parsedOutput.body;
924
- return throwDefaultError({
925
- output,
926
- parsedBody,
927
- errorCode,
928
- });
929
- }
930
- };
931
- const de_DescribeRegistryCommand = async (output, context) => {
932
- if (output.statusCode !== 200 && output.statusCode >= 300) {
933
- return de_DescribeRegistryCommandError(output, context);
934
- }
935
- const contents = (0, smithy_client_1.map)({
936
- $metadata: deserializeMetadata(output),
937
- });
938
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
939
- const doc = (0, smithy_client_1.take)(data, {
940
- Description: smithy_client_1.expectString,
941
- RegistryArn: smithy_client_1.expectString,
942
- RegistryName: smithy_client_1.expectString,
943
- Tags: [, smithy_client_1._json, `tags`],
944
- });
945
- Object.assign(contents, doc);
946
- return contents;
947
- };
948
- exports.de_DescribeRegistryCommand = de_DescribeRegistryCommand;
949
- const de_DescribeRegistryCommandError = async (output, context) => {
950
- const parsedOutput = {
951
- ...output,
952
- body: await parseErrorBody(output.body, context),
953
- };
954
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
955
- switch (errorCode) {
956
- case "BadRequestException":
957
- case "com.amazonaws.schemas#BadRequestException":
958
- throw await de_BadRequestExceptionRes(parsedOutput, context);
959
- case "ForbiddenException":
960
- case "com.amazonaws.schemas#ForbiddenException":
961
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
962
- case "InternalServerErrorException":
963
- case "com.amazonaws.schemas#InternalServerErrorException":
964
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
965
- case "NotFoundException":
966
- case "com.amazonaws.schemas#NotFoundException":
967
- throw await de_NotFoundExceptionRes(parsedOutput, context);
968
- case "ServiceUnavailableException":
969
- case "com.amazonaws.schemas#ServiceUnavailableException":
970
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
971
- case "UnauthorizedException":
972
- case "com.amazonaws.schemas#UnauthorizedException":
973
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
974
- default:
975
- const parsedBody = parsedOutput.body;
976
- return throwDefaultError({
977
- output,
978
- parsedBody,
979
- errorCode,
980
- });
981
- }
982
- };
983
- const de_DescribeSchemaCommand = async (output, context) => {
984
- if (output.statusCode !== 200 && output.statusCode >= 300) {
985
- return de_DescribeSchemaCommandError(output, context);
986
- }
987
- const contents = (0, smithy_client_1.map)({
988
- $metadata: deserializeMetadata(output),
989
- });
990
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
991
- const doc = (0, smithy_client_1.take)(data, {
992
- Content: smithy_client_1.expectString,
993
- Description: smithy_client_1.expectString,
994
- LastModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
995
- SchemaArn: smithy_client_1.expectString,
996
- SchemaName: smithy_client_1.expectString,
997
- SchemaVersion: smithy_client_1.expectString,
998
- Tags: [, smithy_client_1._json, `tags`],
999
- Type: smithy_client_1.expectString,
1000
- VersionCreatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1001
- });
1002
- Object.assign(contents, doc);
1003
- return contents;
1004
- };
1005
- exports.de_DescribeSchemaCommand = de_DescribeSchemaCommand;
1006
- const de_DescribeSchemaCommandError = async (output, context) => {
1007
- const parsedOutput = {
1008
- ...output,
1009
- body: await parseErrorBody(output.body, context),
1010
- };
1011
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1012
- switch (errorCode) {
1013
- case "BadRequestException":
1014
- case "com.amazonaws.schemas#BadRequestException":
1015
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1016
- case "ForbiddenException":
1017
- case "com.amazonaws.schemas#ForbiddenException":
1018
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1019
- case "InternalServerErrorException":
1020
- case "com.amazonaws.schemas#InternalServerErrorException":
1021
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1022
- case "NotFoundException":
1023
- case "com.amazonaws.schemas#NotFoundException":
1024
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1025
- case "ServiceUnavailableException":
1026
- case "com.amazonaws.schemas#ServiceUnavailableException":
1027
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1028
- case "UnauthorizedException":
1029
- case "com.amazonaws.schemas#UnauthorizedException":
1030
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1031
- default:
1032
- const parsedBody = parsedOutput.body;
1033
- return throwDefaultError({
1034
- output,
1035
- parsedBody,
1036
- errorCode,
1037
- });
1038
- }
1039
- };
1040
- const de_ExportSchemaCommand = async (output, context) => {
1041
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1042
- return de_ExportSchemaCommandError(output, context);
1043
- }
1044
- const contents = (0, smithy_client_1.map)({
1045
- $metadata: deserializeMetadata(output),
1046
- });
1047
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1048
- const doc = (0, smithy_client_1.take)(data, {
1049
- Content: smithy_client_1.expectString,
1050
- SchemaArn: smithy_client_1.expectString,
1051
- SchemaName: smithy_client_1.expectString,
1052
- SchemaVersion: smithy_client_1.expectString,
1053
- Type: smithy_client_1.expectString,
1054
- });
1055
- Object.assign(contents, doc);
1056
- return contents;
1057
- };
1058
- exports.de_ExportSchemaCommand = de_ExportSchemaCommand;
1059
- const de_ExportSchemaCommandError = async (output, context) => {
1060
- const parsedOutput = {
1061
- ...output,
1062
- body: await parseErrorBody(output.body, context),
1063
- };
1064
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1065
- switch (errorCode) {
1066
- case "BadRequestException":
1067
- case "com.amazonaws.schemas#BadRequestException":
1068
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1069
- case "ForbiddenException":
1070
- case "com.amazonaws.schemas#ForbiddenException":
1071
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1072
- case "InternalServerErrorException":
1073
- case "com.amazonaws.schemas#InternalServerErrorException":
1074
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1075
- case "NotFoundException":
1076
- case "com.amazonaws.schemas#NotFoundException":
1077
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1078
- case "ServiceUnavailableException":
1079
- case "com.amazonaws.schemas#ServiceUnavailableException":
1080
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1081
- case "TooManyRequestsException":
1082
- case "com.amazonaws.schemas#TooManyRequestsException":
1083
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1084
- case "UnauthorizedException":
1085
- case "com.amazonaws.schemas#UnauthorizedException":
1086
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1087
- default:
1088
- const parsedBody = parsedOutput.body;
1089
- return throwDefaultError({
1090
- output,
1091
- parsedBody,
1092
- errorCode,
1093
- });
1094
- }
1095
- };
1096
- const de_GetCodeBindingSourceCommand = async (output, context) => {
1097
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1098
- return de_GetCodeBindingSourceCommandError(output, context);
1099
- }
1100
- const contents = (0, smithy_client_1.map)({
1101
- $metadata: deserializeMetadata(output),
1102
- });
1103
- const data = await (0, smithy_client_1.collectBody)(output.body, context);
1104
- contents.Body = data;
1105
- return contents;
1106
- };
1107
- exports.de_GetCodeBindingSourceCommand = de_GetCodeBindingSourceCommand;
1108
- const de_GetCodeBindingSourceCommandError = async (output, context) => {
1109
- const parsedOutput = {
1110
- ...output,
1111
- body: await parseErrorBody(output.body, context),
1112
- };
1113
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1114
- switch (errorCode) {
1115
- case "BadRequestException":
1116
- case "com.amazonaws.schemas#BadRequestException":
1117
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1118
- case "ForbiddenException":
1119
- case "com.amazonaws.schemas#ForbiddenException":
1120
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1121
- case "InternalServerErrorException":
1122
- case "com.amazonaws.schemas#InternalServerErrorException":
1123
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1124
- case "NotFoundException":
1125
- case "com.amazonaws.schemas#NotFoundException":
1126
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1127
- case "TooManyRequestsException":
1128
- case "com.amazonaws.schemas#TooManyRequestsException":
1129
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1130
- case "UnauthorizedException":
1131
- case "com.amazonaws.schemas#UnauthorizedException":
1132
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1133
- default:
1134
- const parsedBody = parsedOutput.body;
1135
- return throwDefaultError({
1136
- output,
1137
- parsedBody,
1138
- errorCode,
1139
- });
1140
- }
1141
- };
1142
- const de_GetDiscoveredSchemaCommand = async (output, context) => {
1143
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1144
- return de_GetDiscoveredSchemaCommandError(output, context);
1145
- }
1146
- const contents = (0, smithy_client_1.map)({
1147
- $metadata: deserializeMetadata(output),
1148
- });
1149
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1150
- const doc = (0, smithy_client_1.take)(data, {
1151
- Content: smithy_client_1.expectString,
1152
- });
1153
- Object.assign(contents, doc);
1154
- return contents;
1155
- };
1156
- exports.de_GetDiscoveredSchemaCommand = de_GetDiscoveredSchemaCommand;
1157
- const de_GetDiscoveredSchemaCommandError = async (output, context) => {
1158
- const parsedOutput = {
1159
- ...output,
1160
- body: await parseErrorBody(output.body, context),
1161
- };
1162
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1163
- switch (errorCode) {
1164
- case "BadRequestException":
1165
- case "com.amazonaws.schemas#BadRequestException":
1166
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1167
- case "ForbiddenException":
1168
- case "com.amazonaws.schemas#ForbiddenException":
1169
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1170
- case "InternalServerErrorException":
1171
- case "com.amazonaws.schemas#InternalServerErrorException":
1172
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1173
- case "ServiceUnavailableException":
1174
- case "com.amazonaws.schemas#ServiceUnavailableException":
1175
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1176
- case "UnauthorizedException":
1177
- case "com.amazonaws.schemas#UnauthorizedException":
1178
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1179
- default:
1180
- const parsedBody = parsedOutput.body;
1181
- return throwDefaultError({
1182
- output,
1183
- parsedBody,
1184
- errorCode,
1185
- });
1186
- }
1187
- };
1188
- const de_GetResourcePolicyCommand = async (output, context) => {
1189
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1190
- return de_GetResourcePolicyCommandError(output, context);
1191
- }
1192
- const contents = (0, smithy_client_1.map)({
1193
- $metadata: deserializeMetadata(output),
1194
- });
1195
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1196
- const doc = (0, smithy_client_1.take)(data, {
1197
- Policy: (_) => new smithy_client_1.LazyJsonString(_),
1198
- RevisionId: smithy_client_1.expectString,
1199
- });
1200
- Object.assign(contents, doc);
1201
- return contents;
1202
- };
1203
- exports.de_GetResourcePolicyCommand = de_GetResourcePolicyCommand;
1204
- const de_GetResourcePolicyCommandError = async (output, context) => {
1205
- const parsedOutput = {
1206
- ...output,
1207
- body: await parseErrorBody(output.body, context),
1208
- };
1209
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1210
- switch (errorCode) {
1211
- case "BadRequestException":
1212
- case "com.amazonaws.schemas#BadRequestException":
1213
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1214
- case "ForbiddenException":
1215
- case "com.amazonaws.schemas#ForbiddenException":
1216
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1217
- case "InternalServerErrorException":
1218
- case "com.amazonaws.schemas#InternalServerErrorException":
1219
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1220
- case "NotFoundException":
1221
- case "com.amazonaws.schemas#NotFoundException":
1222
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1223
- case "ServiceUnavailableException":
1224
- case "com.amazonaws.schemas#ServiceUnavailableException":
1225
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1226
- case "UnauthorizedException":
1227
- case "com.amazonaws.schemas#UnauthorizedException":
1228
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1229
- default:
1230
- const parsedBody = parsedOutput.body;
1231
- return throwDefaultError({
1232
- output,
1233
- parsedBody,
1234
- errorCode,
1235
- });
1236
- }
1237
- };
1238
- const de_ListDiscoverersCommand = async (output, context) => {
1239
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1240
- return de_ListDiscoverersCommandError(output, context);
1241
- }
1242
- const contents = (0, smithy_client_1.map)({
1243
- $metadata: deserializeMetadata(output),
1244
- });
1245
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1246
- const doc = (0, smithy_client_1.take)(data, {
1247
- Discoverers: (_) => de___listOfDiscovererSummary(_, context),
1248
- NextToken: smithy_client_1.expectString,
1249
- });
1250
- Object.assign(contents, doc);
1251
- return contents;
1252
- };
1253
- exports.de_ListDiscoverersCommand = de_ListDiscoverersCommand;
1254
- const de_ListDiscoverersCommandError = async (output, context) => {
1255
- const parsedOutput = {
1256
- ...output,
1257
- body: await parseErrorBody(output.body, context),
1258
- };
1259
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1260
- switch (errorCode) {
1261
- case "BadRequestException":
1262
- case "com.amazonaws.schemas#BadRequestException":
1263
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1264
- case "ForbiddenException":
1265
- case "com.amazonaws.schemas#ForbiddenException":
1266
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1267
- case "InternalServerErrorException":
1268
- case "com.amazonaws.schemas#InternalServerErrorException":
1269
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1270
- case "ServiceUnavailableException":
1271
- case "com.amazonaws.schemas#ServiceUnavailableException":
1272
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1273
- case "UnauthorizedException":
1274
- case "com.amazonaws.schemas#UnauthorizedException":
1275
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1276
- default:
1277
- const parsedBody = parsedOutput.body;
1278
- return throwDefaultError({
1279
- output,
1280
- parsedBody,
1281
- errorCode,
1282
- });
1283
- }
1284
- };
1285
- const de_ListRegistriesCommand = async (output, context) => {
1286
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1287
- return de_ListRegistriesCommandError(output, context);
1288
- }
1289
- const contents = (0, smithy_client_1.map)({
1290
- $metadata: deserializeMetadata(output),
1291
- });
1292
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1293
- const doc = (0, smithy_client_1.take)(data, {
1294
- NextToken: smithy_client_1.expectString,
1295
- Registries: (_) => de___listOfRegistrySummary(_, context),
1296
- });
1297
- Object.assign(contents, doc);
1298
- return contents;
1299
- };
1300
- exports.de_ListRegistriesCommand = de_ListRegistriesCommand;
1301
- const de_ListRegistriesCommandError = async (output, context) => {
1302
- const parsedOutput = {
1303
- ...output,
1304
- body: await parseErrorBody(output.body, context),
1305
- };
1306
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1307
- switch (errorCode) {
1308
- case "BadRequestException":
1309
- case "com.amazonaws.schemas#BadRequestException":
1310
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1311
- case "ForbiddenException":
1312
- case "com.amazonaws.schemas#ForbiddenException":
1313
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1314
- case "InternalServerErrorException":
1315
- case "com.amazonaws.schemas#InternalServerErrorException":
1316
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1317
- case "ServiceUnavailableException":
1318
- case "com.amazonaws.schemas#ServiceUnavailableException":
1319
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1320
- case "UnauthorizedException":
1321
- case "com.amazonaws.schemas#UnauthorizedException":
1322
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1323
- default:
1324
- const parsedBody = parsedOutput.body;
1325
- return throwDefaultError({
1326
- output,
1327
- parsedBody,
1328
- errorCode,
1329
- });
1330
- }
1331
- };
1332
- const de_ListSchemasCommand = async (output, context) => {
1333
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1334
- return de_ListSchemasCommandError(output, context);
1335
- }
1336
- const contents = (0, smithy_client_1.map)({
1337
- $metadata: deserializeMetadata(output),
1338
- });
1339
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1340
- const doc = (0, smithy_client_1.take)(data, {
1341
- NextToken: smithy_client_1.expectString,
1342
- Schemas: (_) => de___listOfSchemaSummary(_, context),
1343
- });
1344
- Object.assign(contents, doc);
1345
- return contents;
1346
- };
1347
- exports.de_ListSchemasCommand = de_ListSchemasCommand;
1348
- const de_ListSchemasCommandError = async (output, context) => {
1349
- const parsedOutput = {
1350
- ...output,
1351
- body: await parseErrorBody(output.body, context),
1352
- };
1353
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1354
- switch (errorCode) {
1355
- case "BadRequestException":
1356
- case "com.amazonaws.schemas#BadRequestException":
1357
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1358
- case "ForbiddenException":
1359
- case "com.amazonaws.schemas#ForbiddenException":
1360
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1361
- case "InternalServerErrorException":
1362
- case "com.amazonaws.schemas#InternalServerErrorException":
1363
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1364
- case "ServiceUnavailableException":
1365
- case "com.amazonaws.schemas#ServiceUnavailableException":
1366
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1367
- case "UnauthorizedException":
1368
- case "com.amazonaws.schemas#UnauthorizedException":
1369
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1370
- default:
1371
- const parsedBody = parsedOutput.body;
1372
- return throwDefaultError({
1373
- output,
1374
- parsedBody,
1375
- errorCode,
1376
- });
1377
- }
1378
- };
1379
- const de_ListSchemaVersionsCommand = async (output, context) => {
1380
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1381
- return de_ListSchemaVersionsCommandError(output, context);
1382
- }
1383
- const contents = (0, smithy_client_1.map)({
1384
- $metadata: deserializeMetadata(output),
1385
- });
1386
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1387
- const doc = (0, smithy_client_1.take)(data, {
1388
- NextToken: smithy_client_1.expectString,
1389
- SchemaVersions: smithy_client_1._json,
1390
- });
1391
- Object.assign(contents, doc);
1392
- return contents;
1393
- };
1394
- exports.de_ListSchemaVersionsCommand = de_ListSchemaVersionsCommand;
1395
- const de_ListSchemaVersionsCommandError = async (output, context) => {
1396
- const parsedOutput = {
1397
- ...output,
1398
- body: await parseErrorBody(output.body, context),
1399
- };
1400
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1401
- switch (errorCode) {
1402
- case "BadRequestException":
1403
- case "com.amazonaws.schemas#BadRequestException":
1404
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1405
- case "ForbiddenException":
1406
- case "com.amazonaws.schemas#ForbiddenException":
1407
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1408
- case "InternalServerErrorException":
1409
- case "com.amazonaws.schemas#InternalServerErrorException":
1410
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1411
- case "NotFoundException":
1412
- case "com.amazonaws.schemas#NotFoundException":
1413
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1414
- case "ServiceUnavailableException":
1415
- case "com.amazonaws.schemas#ServiceUnavailableException":
1416
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1417
- case "UnauthorizedException":
1418
- case "com.amazonaws.schemas#UnauthorizedException":
1419
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1420
- default:
1421
- const parsedBody = parsedOutput.body;
1422
- return throwDefaultError({
1423
- output,
1424
- parsedBody,
1425
- errorCode,
1426
- });
1427
- }
1428
- };
1429
- const de_ListTagsForResourceCommand = async (output, context) => {
1430
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1431
- return de_ListTagsForResourceCommandError(output, context);
1432
- }
1433
- const contents = (0, smithy_client_1.map)({
1434
- $metadata: deserializeMetadata(output),
1435
- });
1436
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1437
- const doc = (0, smithy_client_1.take)(data, {
1438
- Tags: [, smithy_client_1._json, `tags`],
1439
- });
1440
- Object.assign(contents, doc);
1441
- return contents;
1442
- };
1443
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
1444
- const de_ListTagsForResourceCommandError = async (output, context) => {
1445
- const parsedOutput = {
1446
- ...output,
1447
- body: await parseErrorBody(output.body, context),
1448
- };
1449
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1450
- switch (errorCode) {
1451
- case "BadRequestException":
1452
- case "com.amazonaws.schemas#BadRequestException":
1453
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1454
- case "ForbiddenException":
1455
- case "com.amazonaws.schemas#ForbiddenException":
1456
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1457
- case "InternalServerErrorException":
1458
- case "com.amazonaws.schemas#InternalServerErrorException":
1459
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1460
- case "NotFoundException":
1461
- case "com.amazonaws.schemas#NotFoundException":
1462
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1463
- default:
1464
- const parsedBody = parsedOutput.body;
1465
- return throwDefaultError({
1466
- output,
1467
- parsedBody,
1468
- errorCode,
1469
- });
1470
- }
1471
- };
1472
- const de_PutCodeBindingCommand = async (output, context) => {
1473
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1474
- return de_PutCodeBindingCommandError(output, context);
1475
- }
1476
- const contents = (0, smithy_client_1.map)({
1477
- $metadata: deserializeMetadata(output),
1478
- });
1479
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1480
- const doc = (0, smithy_client_1.take)(data, {
1481
- CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1482
- LastModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1483
- SchemaVersion: smithy_client_1.expectString,
1484
- Status: smithy_client_1.expectString,
1485
- });
1486
- Object.assign(contents, doc);
1487
- return contents;
1488
- };
1489
- exports.de_PutCodeBindingCommand = de_PutCodeBindingCommand;
1490
- const de_PutCodeBindingCommandError = async (output, context) => {
1491
- const parsedOutput = {
1492
- ...output,
1493
- body: await parseErrorBody(output.body, context),
1494
- };
1495
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1496
- switch (errorCode) {
1497
- case "BadRequestException":
1498
- case "com.amazonaws.schemas#BadRequestException":
1499
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1500
- case "ForbiddenException":
1501
- case "com.amazonaws.schemas#ForbiddenException":
1502
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1503
- case "GoneException":
1504
- case "com.amazonaws.schemas#GoneException":
1505
- throw await de_GoneExceptionRes(parsedOutput, context);
1506
- case "InternalServerErrorException":
1507
- case "com.amazonaws.schemas#InternalServerErrorException":
1508
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1509
- case "NotFoundException":
1510
- case "com.amazonaws.schemas#NotFoundException":
1511
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1512
- case "TooManyRequestsException":
1513
- case "com.amazonaws.schemas#TooManyRequestsException":
1514
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1515
- case "UnauthorizedException":
1516
- case "com.amazonaws.schemas#UnauthorizedException":
1517
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1518
- default:
1519
- const parsedBody = parsedOutput.body;
1520
- return throwDefaultError({
1521
- output,
1522
- parsedBody,
1523
- errorCode,
1524
- });
1525
- }
1526
- };
1527
- const de_PutResourcePolicyCommand = async (output, context) => {
1528
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1529
- return de_PutResourcePolicyCommandError(output, context);
1530
- }
1531
- const contents = (0, smithy_client_1.map)({
1532
- $metadata: deserializeMetadata(output),
1533
- });
1534
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1535
- const doc = (0, smithy_client_1.take)(data, {
1536
- Policy: (_) => new smithy_client_1.LazyJsonString(_),
1537
- RevisionId: smithy_client_1.expectString,
1538
- });
1539
- Object.assign(contents, doc);
1540
- return contents;
1541
- };
1542
- exports.de_PutResourcePolicyCommand = de_PutResourcePolicyCommand;
1543
- const de_PutResourcePolicyCommandError = async (output, context) => {
1544
- const parsedOutput = {
1545
- ...output,
1546
- body: await parseErrorBody(output.body, context),
1547
- };
1548
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1549
- switch (errorCode) {
1550
- case "BadRequestException":
1551
- case "com.amazonaws.schemas#BadRequestException":
1552
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1553
- case "ForbiddenException":
1554
- case "com.amazonaws.schemas#ForbiddenException":
1555
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1556
- case "InternalServerErrorException":
1557
- case "com.amazonaws.schemas#InternalServerErrorException":
1558
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1559
- case "NotFoundException":
1560
- case "com.amazonaws.schemas#NotFoundException":
1561
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1562
- case "PreconditionFailedException":
1563
- case "com.amazonaws.schemas#PreconditionFailedException":
1564
- throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
1565
- case "ServiceUnavailableException":
1566
- case "com.amazonaws.schemas#ServiceUnavailableException":
1567
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1568
- case "UnauthorizedException":
1569
- case "com.amazonaws.schemas#UnauthorizedException":
1570
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1571
- default:
1572
- const parsedBody = parsedOutput.body;
1573
- return throwDefaultError({
1574
- output,
1575
- parsedBody,
1576
- errorCode,
1577
- });
1578
- }
1579
- };
1580
- const de_SearchSchemasCommand = async (output, context) => {
1581
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1582
- return de_SearchSchemasCommandError(output, context);
1583
- }
1584
- const contents = (0, smithy_client_1.map)({
1585
- $metadata: deserializeMetadata(output),
1586
- });
1587
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1588
- const doc = (0, smithy_client_1.take)(data, {
1589
- NextToken: smithy_client_1.expectString,
1590
- Schemas: (_) => de___listOfSearchSchemaSummary(_, context),
1591
- });
1592
- Object.assign(contents, doc);
1593
- return contents;
1594
- };
1595
- exports.de_SearchSchemasCommand = de_SearchSchemasCommand;
1596
- const de_SearchSchemasCommandError = async (output, context) => {
1597
- const parsedOutput = {
1598
- ...output,
1599
- body: await parseErrorBody(output.body, context),
1600
- };
1601
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1602
- switch (errorCode) {
1603
- case "BadRequestException":
1604
- case "com.amazonaws.schemas#BadRequestException":
1605
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1606
- case "ForbiddenException":
1607
- case "com.amazonaws.schemas#ForbiddenException":
1608
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1609
- case "InternalServerErrorException":
1610
- case "com.amazonaws.schemas#InternalServerErrorException":
1611
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1612
- case "ServiceUnavailableException":
1613
- case "com.amazonaws.schemas#ServiceUnavailableException":
1614
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1615
- case "UnauthorizedException":
1616
- case "com.amazonaws.schemas#UnauthorizedException":
1617
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1618
- default:
1619
- const parsedBody = parsedOutput.body;
1620
- return throwDefaultError({
1621
- output,
1622
- parsedBody,
1623
- errorCode,
1624
- });
1625
- }
1626
- };
1627
- const de_StartDiscovererCommand = async (output, context) => {
1628
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1629
- return de_StartDiscovererCommandError(output, context);
1630
- }
1631
- const contents = (0, smithy_client_1.map)({
1632
- $metadata: deserializeMetadata(output),
1633
- });
1634
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1635
- const doc = (0, smithy_client_1.take)(data, {
1636
- DiscovererId: smithy_client_1.expectString,
1637
- State: smithy_client_1.expectString,
1638
- });
1639
- Object.assign(contents, doc);
1640
- return contents;
1641
- };
1642
- exports.de_StartDiscovererCommand = de_StartDiscovererCommand;
1643
- const de_StartDiscovererCommandError = async (output, context) => {
1644
- const parsedOutput = {
1645
- ...output,
1646
- body: await parseErrorBody(output.body, context),
1647
- };
1648
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1649
- switch (errorCode) {
1650
- case "BadRequestException":
1651
- case "com.amazonaws.schemas#BadRequestException":
1652
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1653
- case "ForbiddenException":
1654
- case "com.amazonaws.schemas#ForbiddenException":
1655
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1656
- case "InternalServerErrorException":
1657
- case "com.amazonaws.schemas#InternalServerErrorException":
1658
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1659
- case "NotFoundException":
1660
- case "com.amazonaws.schemas#NotFoundException":
1661
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1662
- case "ServiceUnavailableException":
1663
- case "com.amazonaws.schemas#ServiceUnavailableException":
1664
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1665
- case "UnauthorizedException":
1666
- case "com.amazonaws.schemas#UnauthorizedException":
1667
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1668
- default:
1669
- const parsedBody = parsedOutput.body;
1670
- return throwDefaultError({
1671
- output,
1672
- parsedBody,
1673
- errorCode,
1674
- });
1675
- }
1676
- };
1677
- const de_StopDiscovererCommand = async (output, context) => {
1678
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1679
- return de_StopDiscovererCommandError(output, context);
1680
- }
1681
- const contents = (0, smithy_client_1.map)({
1682
- $metadata: deserializeMetadata(output),
1683
- });
1684
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1685
- const doc = (0, smithy_client_1.take)(data, {
1686
- DiscovererId: smithy_client_1.expectString,
1687
- State: smithy_client_1.expectString,
1688
- });
1689
- Object.assign(contents, doc);
1690
- return contents;
1691
- };
1692
- exports.de_StopDiscovererCommand = de_StopDiscovererCommand;
1693
- const de_StopDiscovererCommandError = async (output, context) => {
1694
- const parsedOutput = {
1695
- ...output,
1696
- body: await parseErrorBody(output.body, context),
1697
- };
1698
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1699
- switch (errorCode) {
1700
- case "BadRequestException":
1701
- case "com.amazonaws.schemas#BadRequestException":
1702
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1703
- case "ForbiddenException":
1704
- case "com.amazonaws.schemas#ForbiddenException":
1705
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1706
- case "InternalServerErrorException":
1707
- case "com.amazonaws.schemas#InternalServerErrorException":
1708
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1709
- case "NotFoundException":
1710
- case "com.amazonaws.schemas#NotFoundException":
1711
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1712
- case "ServiceUnavailableException":
1713
- case "com.amazonaws.schemas#ServiceUnavailableException":
1714
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1715
- case "UnauthorizedException":
1716
- case "com.amazonaws.schemas#UnauthorizedException":
1717
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1718
- default:
1719
- const parsedBody = parsedOutput.body;
1720
- return throwDefaultError({
1721
- output,
1722
- parsedBody,
1723
- errorCode,
1724
- });
1725
- }
1726
- };
1727
- const de_TagResourceCommand = async (output, context) => {
1728
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1729
- return de_TagResourceCommandError(output, context);
1730
- }
1731
- const contents = (0, smithy_client_1.map)({
1732
- $metadata: deserializeMetadata(output),
1733
- });
1734
- await (0, smithy_client_1.collectBody)(output.body, context);
1735
- return contents;
1736
- };
1737
- exports.de_TagResourceCommand = de_TagResourceCommand;
1738
- const de_TagResourceCommandError = async (output, context) => {
1739
- const parsedOutput = {
1740
- ...output,
1741
- body: await parseErrorBody(output.body, context),
1742
- };
1743
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1744
- switch (errorCode) {
1745
- case "BadRequestException":
1746
- case "com.amazonaws.schemas#BadRequestException":
1747
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1748
- case "ForbiddenException":
1749
- case "com.amazonaws.schemas#ForbiddenException":
1750
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1751
- case "InternalServerErrorException":
1752
- case "com.amazonaws.schemas#InternalServerErrorException":
1753
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1754
- case "NotFoundException":
1755
- case "com.amazonaws.schemas#NotFoundException":
1756
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1757
- default:
1758
- const parsedBody = parsedOutput.body;
1759
- return throwDefaultError({
1760
- output,
1761
- parsedBody,
1762
- errorCode,
1763
- });
1764
- }
1765
- };
1766
- const de_UntagResourceCommand = async (output, context) => {
1767
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1768
- return de_UntagResourceCommandError(output, context);
1769
- }
1770
- const contents = (0, smithy_client_1.map)({
1771
- $metadata: deserializeMetadata(output),
1772
- });
1773
- await (0, smithy_client_1.collectBody)(output.body, context);
1774
- return contents;
1775
- };
1776
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
1777
- const de_UntagResourceCommandError = async (output, context) => {
1778
- const parsedOutput = {
1779
- ...output,
1780
- body: await parseErrorBody(output.body, context),
1781
- };
1782
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1783
- switch (errorCode) {
1784
- case "BadRequestException":
1785
- case "com.amazonaws.schemas#BadRequestException":
1786
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1787
- case "ForbiddenException":
1788
- case "com.amazonaws.schemas#ForbiddenException":
1789
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1790
- case "InternalServerErrorException":
1791
- case "com.amazonaws.schemas#InternalServerErrorException":
1792
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1793
- case "NotFoundException":
1794
- case "com.amazonaws.schemas#NotFoundException":
1795
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1796
- default:
1797
- const parsedBody = parsedOutput.body;
1798
- return throwDefaultError({
1799
- output,
1800
- parsedBody,
1801
- errorCode,
1802
- });
1803
- }
1804
- };
1805
- const de_UpdateDiscovererCommand = async (output, context) => {
1806
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1807
- return de_UpdateDiscovererCommandError(output, context);
1808
- }
1809
- const contents = (0, smithy_client_1.map)({
1810
- $metadata: deserializeMetadata(output),
1811
- });
1812
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1813
- const doc = (0, smithy_client_1.take)(data, {
1814
- CrossAccount: smithy_client_1.expectBoolean,
1815
- Description: smithy_client_1.expectString,
1816
- DiscovererArn: smithy_client_1.expectString,
1817
- DiscovererId: smithy_client_1.expectString,
1818
- SourceArn: smithy_client_1.expectString,
1819
- State: smithy_client_1.expectString,
1820
- Tags: [, smithy_client_1._json, `tags`],
1821
- });
1822
- Object.assign(contents, doc);
1823
- return contents;
1824
- };
1825
- exports.de_UpdateDiscovererCommand = de_UpdateDiscovererCommand;
1826
- const de_UpdateDiscovererCommandError = async (output, context) => {
1827
- const parsedOutput = {
1828
- ...output,
1829
- body: await parseErrorBody(output.body, context),
1830
- };
1831
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1832
- switch (errorCode) {
1833
- case "BadRequestException":
1834
- case "com.amazonaws.schemas#BadRequestException":
1835
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1836
- case "ForbiddenException":
1837
- case "com.amazonaws.schemas#ForbiddenException":
1838
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1839
- case "InternalServerErrorException":
1840
- case "com.amazonaws.schemas#InternalServerErrorException":
1841
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1842
- case "NotFoundException":
1843
- case "com.amazonaws.schemas#NotFoundException":
1844
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1845
- case "ServiceUnavailableException":
1846
- case "com.amazonaws.schemas#ServiceUnavailableException":
1847
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1848
- case "UnauthorizedException":
1849
- case "com.amazonaws.schemas#UnauthorizedException":
1850
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1851
- default:
1852
- const parsedBody = parsedOutput.body;
1853
- return throwDefaultError({
1854
- output,
1855
- parsedBody,
1856
- errorCode,
1857
- });
1858
- }
1859
- };
1860
- const de_UpdateRegistryCommand = async (output, context) => {
1861
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1862
- return de_UpdateRegistryCommandError(output, context);
1863
- }
1864
- const contents = (0, smithy_client_1.map)({
1865
- $metadata: deserializeMetadata(output),
1866
- });
1867
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1868
- const doc = (0, smithy_client_1.take)(data, {
1869
- Description: smithy_client_1.expectString,
1870
- RegistryArn: smithy_client_1.expectString,
1871
- RegistryName: smithy_client_1.expectString,
1872
- Tags: [, smithy_client_1._json, `tags`],
1873
- });
1874
- Object.assign(contents, doc);
1875
- return contents;
1876
- };
1877
- exports.de_UpdateRegistryCommand = de_UpdateRegistryCommand;
1878
- const de_UpdateRegistryCommandError = async (output, context) => {
1879
- const parsedOutput = {
1880
- ...output,
1881
- body: await parseErrorBody(output.body, context),
1882
- };
1883
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1884
- switch (errorCode) {
1885
- case "BadRequestException":
1886
- case "com.amazonaws.schemas#BadRequestException":
1887
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1888
- case "ForbiddenException":
1889
- case "com.amazonaws.schemas#ForbiddenException":
1890
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1891
- case "InternalServerErrorException":
1892
- case "com.amazonaws.schemas#InternalServerErrorException":
1893
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1894
- case "NotFoundException":
1895
- case "com.amazonaws.schemas#NotFoundException":
1896
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1897
- case "ServiceUnavailableException":
1898
- case "com.amazonaws.schemas#ServiceUnavailableException":
1899
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1900
- case "UnauthorizedException":
1901
- case "com.amazonaws.schemas#UnauthorizedException":
1902
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1903
- default:
1904
- const parsedBody = parsedOutput.body;
1905
- return throwDefaultError({
1906
- output,
1907
- parsedBody,
1908
- errorCode,
1909
- });
1910
- }
1911
- };
1912
- const de_UpdateSchemaCommand = async (output, context) => {
1913
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1914
- return de_UpdateSchemaCommandError(output, context);
1915
- }
1916
- const contents = (0, smithy_client_1.map)({
1917
- $metadata: deserializeMetadata(output),
1918
- });
1919
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1920
- const doc = (0, smithy_client_1.take)(data, {
1921
- Description: smithy_client_1.expectString,
1922
- LastModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1923
- SchemaArn: smithy_client_1.expectString,
1924
- SchemaName: smithy_client_1.expectString,
1925
- SchemaVersion: smithy_client_1.expectString,
1926
- Tags: [, smithy_client_1._json, `tags`],
1927
- Type: smithy_client_1.expectString,
1928
- VersionCreatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1929
- });
1930
- Object.assign(contents, doc);
1931
- return contents;
1932
- };
1933
- exports.de_UpdateSchemaCommand = de_UpdateSchemaCommand;
1934
- const de_UpdateSchemaCommandError = async (output, context) => {
1935
- const parsedOutput = {
1936
- ...output,
1937
- body: await parseErrorBody(output.body, context),
1938
- };
1939
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1940
- switch (errorCode) {
1941
- case "BadRequestException":
1942
- case "com.amazonaws.schemas#BadRequestException":
1943
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1944
- case "ForbiddenException":
1945
- case "com.amazonaws.schemas#ForbiddenException":
1946
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1947
- case "InternalServerErrorException":
1948
- case "com.amazonaws.schemas#InternalServerErrorException":
1949
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1950
- case "NotFoundException":
1951
- case "com.amazonaws.schemas#NotFoundException":
1952
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1953
- case "ServiceUnavailableException":
1954
- case "com.amazonaws.schemas#ServiceUnavailableException":
1955
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1956
- default:
1957
- const parsedBody = parsedOutput.body;
1958
- return throwDefaultError({
1959
- output,
1960
- parsedBody,
1961
- errorCode,
1962
- });
1963
- }
1964
- };
1965
- const throwDefaultError = (0, smithy_client_1.withBaseException)(SchemasServiceException_1.SchemasServiceException);
1966
- const de_BadRequestExceptionRes = async (parsedOutput, context) => {
1967
- const contents = (0, smithy_client_1.map)({});
1968
- const data = parsedOutput.body;
1969
- const doc = (0, smithy_client_1.take)(data, {
1970
- Code: smithy_client_1.expectString,
1971
- Message: smithy_client_1.expectString,
1972
- });
1973
- Object.assign(contents, doc);
1974
- const exception = new models_0_1.BadRequestException({
1975
- $metadata: deserializeMetadata(parsedOutput),
1976
- ...contents,
1977
- });
1978
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1979
- };
1980
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
1981
- const contents = (0, smithy_client_1.map)({});
1982
- const data = parsedOutput.body;
1983
- const doc = (0, smithy_client_1.take)(data, {
1984
- Code: smithy_client_1.expectString,
1985
- Message: smithy_client_1.expectString,
1986
- });
1987
- Object.assign(contents, doc);
1988
- const exception = new models_0_1.ConflictException({
1989
- $metadata: deserializeMetadata(parsedOutput),
1990
- ...contents,
1991
- });
1992
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1993
- };
1994
- const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
1995
- const contents = (0, smithy_client_1.map)({});
1996
- const data = parsedOutput.body;
1997
- const doc = (0, smithy_client_1.take)(data, {
1998
- Code: smithy_client_1.expectString,
1999
- Message: smithy_client_1.expectString,
2000
- });
2001
- Object.assign(contents, doc);
2002
- const exception = new models_0_1.ForbiddenException({
2003
- $metadata: deserializeMetadata(parsedOutput),
2004
- ...contents,
2005
- });
2006
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2007
- };
2008
- const de_GoneExceptionRes = async (parsedOutput, context) => {
2009
- const contents = (0, smithy_client_1.map)({});
2010
- const data = parsedOutput.body;
2011
- const doc = (0, smithy_client_1.take)(data, {
2012
- Code: smithy_client_1.expectString,
2013
- Message: smithy_client_1.expectString,
2014
- });
2015
- Object.assign(contents, doc);
2016
- const exception = new models_0_1.GoneException({
2017
- $metadata: deserializeMetadata(parsedOutput),
2018
- ...contents,
2019
- });
2020
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2021
- };
2022
- const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
2023
- const contents = (0, smithy_client_1.map)({});
2024
- const data = parsedOutput.body;
2025
- const doc = (0, smithy_client_1.take)(data, {
2026
- Code: smithy_client_1.expectString,
2027
- Message: smithy_client_1.expectString,
2028
- });
2029
- Object.assign(contents, doc);
2030
- const exception = new models_0_1.InternalServerErrorException({
2031
- $metadata: deserializeMetadata(parsedOutput),
2032
- ...contents,
2033
- });
2034
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2035
- };
2036
- const de_NotFoundExceptionRes = async (parsedOutput, context) => {
2037
- const contents = (0, smithy_client_1.map)({});
2038
- const data = parsedOutput.body;
2039
- const doc = (0, smithy_client_1.take)(data, {
2040
- Code: smithy_client_1.expectString,
2041
- Message: smithy_client_1.expectString,
2042
- });
2043
- Object.assign(contents, doc);
2044
- const exception = new models_0_1.NotFoundException({
2045
- $metadata: deserializeMetadata(parsedOutput),
2046
- ...contents,
2047
- });
2048
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2049
- };
2050
- const de_PreconditionFailedExceptionRes = async (parsedOutput, context) => {
2051
- const contents = (0, smithy_client_1.map)({});
2052
- const data = parsedOutput.body;
2053
- const doc = (0, smithy_client_1.take)(data, {
2054
- Code: smithy_client_1.expectString,
2055
- Message: smithy_client_1.expectString,
2056
- });
2057
- Object.assign(contents, doc);
2058
- const exception = new models_0_1.PreconditionFailedException({
2059
- $metadata: deserializeMetadata(parsedOutput),
2060
- ...contents,
2061
- });
2062
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2063
- };
2064
- const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
2065
- const contents = (0, smithy_client_1.map)({});
2066
- const data = parsedOutput.body;
2067
- const doc = (0, smithy_client_1.take)(data, {
2068
- Code: smithy_client_1.expectString,
2069
- Message: smithy_client_1.expectString,
2070
- });
2071
- Object.assign(contents, doc);
2072
- const exception = new models_0_1.ServiceUnavailableException({
2073
- $metadata: deserializeMetadata(parsedOutput),
2074
- ...contents,
2075
- });
2076
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2077
- };
2078
- const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
2079
- const contents = (0, smithy_client_1.map)({});
2080
- const data = parsedOutput.body;
2081
- const doc = (0, smithy_client_1.take)(data, {
2082
- Code: smithy_client_1.expectString,
2083
- Message: smithy_client_1.expectString,
2084
- });
2085
- Object.assign(contents, doc);
2086
- const exception = new models_0_1.TooManyRequestsException({
2087
- $metadata: deserializeMetadata(parsedOutput),
2088
- ...contents,
2089
- });
2090
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2091
- };
2092
- const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
2093
- const contents = (0, smithy_client_1.map)({});
2094
- const data = parsedOutput.body;
2095
- const doc = (0, smithy_client_1.take)(data, {
2096
- Code: smithy_client_1.expectString,
2097
- Message: smithy_client_1.expectString,
2098
- });
2099
- Object.assign(contents, doc);
2100
- const exception = new models_0_1.UnauthorizedException({
2101
- $metadata: deserializeMetadata(parsedOutput),
2102
- ...contents,
2103
- });
2104
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2105
- };
2106
- const de___listOfDiscovererSummary = (output, context) => {
2107
- const retVal = (output || [])
2108
- .filter((e) => e != null)
2109
- .map((entry) => {
2110
- return de_DiscovererSummary(entry, context);
2111
- });
2112
- return retVal;
2113
- };
2114
- const de___listOfRegistrySummary = (output, context) => {
2115
- const retVal = (output || [])
2116
- .filter((e) => e != null)
2117
- .map((entry) => {
2118
- return de_RegistrySummary(entry, context);
2119
- });
2120
- return retVal;
2121
- };
2122
- const de___listOfSchemaSummary = (output, context) => {
2123
- const retVal = (output || [])
2124
- .filter((e) => e != null)
2125
- .map((entry) => {
2126
- return de_SchemaSummary(entry, context);
2127
- });
2128
- return retVal;
2129
- };
2130
- const de___listOfSearchSchemaSummary = (output, context) => {
2131
- const retVal = (output || [])
2132
- .filter((e) => e != null)
2133
- .map((entry) => {
2134
- return de_SearchSchemaSummary(entry, context);
2135
- });
2136
- return retVal;
2137
- };
2138
- const de___listOfSearchSchemaVersionSummary = (output, context) => {
2139
- const retVal = (output || [])
2140
- .filter((e) => e != null)
2141
- .map((entry) => {
2142
- return de_SearchSchemaVersionSummary(entry, context);
2143
- });
2144
- return retVal;
2145
- };
2146
- const de_DiscovererSummary = (output, context) => {
2147
- return (0, smithy_client_1.take)(output, {
2148
- CrossAccount: smithy_client_1.expectBoolean,
2149
- DiscovererArn: smithy_client_1.expectString,
2150
- DiscovererId: smithy_client_1.expectString,
2151
- SourceArn: smithy_client_1.expectString,
2152
- State: smithy_client_1.expectString,
2153
- Tags: [, smithy_client_1._json, `tags`],
2154
- });
2155
- };
2156
- const de_RegistrySummary = (output, context) => {
2157
- return (0, smithy_client_1.take)(output, {
2158
- RegistryArn: smithy_client_1.expectString,
2159
- RegistryName: smithy_client_1.expectString,
2160
- Tags: [, smithy_client_1._json, `tags`],
2161
- });
2162
- };
2163
- const de_SchemaSummary = (output, context) => {
2164
- return (0, smithy_client_1.take)(output, {
2165
- LastModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2166
- SchemaArn: smithy_client_1.expectString,
2167
- SchemaName: smithy_client_1.expectString,
2168
- Tags: [, smithy_client_1._json, `tags`],
2169
- VersionCount: smithy_client_1.expectLong,
2170
- });
2171
- };
2172
- const de_SearchSchemaSummary = (output, context) => {
2173
- return (0, smithy_client_1.take)(output, {
2174
- RegistryName: smithy_client_1.expectString,
2175
- SchemaArn: smithy_client_1.expectString,
2176
- SchemaName: smithy_client_1.expectString,
2177
- SchemaVersions: (_) => de___listOfSearchSchemaVersionSummary(_, context),
2178
- });
2179
- };
2180
- const de_SearchSchemaVersionSummary = (output, context) => {
2181
- return (0, smithy_client_1.take)(output, {
2182
- CreatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2183
- SchemaVersion: smithy_client_1.expectString,
2184
- Type: smithy_client_1.expectString,
2185
- });
2186
- };
2187
- const deserializeMetadata = (output) => ({
2188
- httpStatusCode: output.statusCode,
2189
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2190
- extendedRequestId: output.headers["x-amz-id-2"],
2191
- cfId: output.headers["x-amz-cf-id"],
2192
- });
2193
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
2194
- const isSerializableHeaderValue = (value) => value !== undefined &&
2195
- value !== null &&
2196
- value !== "" &&
2197
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2198
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2199
- const _DIP = "DiscovererIdPrefix";
2200
- const _K = "Keywords";
2201
- const _L = "Limit";
2202
- const _NT = "NextToken";
2203
- const _RN = "RegistryName";
2204
- const _RNP = "RegistryNamePrefix";
2205
- const _S = "Scope";
2206
- const _SAP = "SourceArnPrefix";
2207
- const _SNP = "SchemaNamePrefix";
2208
- const _SV = "SchemaVersion";
2209
- const _T = "Type";
2210
- const _TK = "TagKeys";
2211
- const _dIP = "discovererIdPrefix";
2212
- const _k = "keywords";
2213
- const _l = "limit";
2214
- const _nT = "nextToken";
2215
- const _rN = "registryName";
2216
- const _rNP = "registryNamePrefix";
2217
- const _s = "scope";
2218
- const _sAP = "sourceArnPrefix";
2219
- const _sNP = "schemaNamePrefix";
2220
- const _sV = "schemaVersion";
2221
- const _t = "type";
2222
- const _tK = "tagKeys";
2223
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2224
- if (encoded.length) {
2225
- return JSON.parse(encoded);
2226
- }
2227
- return {};
2228
- });
2229
- const parseErrorBody = async (errorBody, context) => {
2230
- const value = await parseBody(errorBody, context);
2231
- value.message = value.message ?? value.Message;
2232
- return value;
2233
- };
2234
- const loadRestJsonErrorCode = (output, data) => {
2235
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2236
- const sanitizeErrorCode = (rawValue) => {
2237
- let cleanValue = rawValue;
2238
- if (typeof cleanValue === "number") {
2239
- cleanValue = cleanValue.toString();
2240
- }
2241
- if (cleanValue.indexOf(",") >= 0) {
2242
- cleanValue = cleanValue.split(",")[0];
2243
- }
2244
- if (cleanValue.indexOf(":") >= 0) {
2245
- cleanValue = cleanValue.split(":")[0];
2246
- }
2247
- if (cleanValue.indexOf("#") >= 0) {
2248
- cleanValue = cleanValue.split("#")[1];
2249
- }
2250
- return cleanValue;
2251
- };
2252
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2253
- if (headerKey !== undefined) {
2254
- return sanitizeErrorCode(output.headers[headerKey]);
2255
- }
2256
- if (data.code !== undefined) {
2257
- return sanitizeErrorCode(data.code);
2258
- }
2259
- if (data["__type"] !== undefined) {
2260
- return sanitizeErrorCode(data["__type"]);
2261
- }
2262
- };
1
+ module.exports = require("../index.js");