@aws-sdk/client-codestar-connections 3.490.0 → 3.496.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 (45) hide show
  1. package/dist-cjs/CodeStarConnections.js +1 -65
  2. package/dist-cjs/CodeStarConnectionsClient.js +1 -43
  3. package/dist-cjs/commands/CreateConnectionCommand.js +1 -28
  4. package/dist-cjs/commands/CreateHostCommand.js +1 -28
  5. package/dist-cjs/commands/CreateRepositoryLinkCommand.js +1 -28
  6. package/dist-cjs/commands/CreateSyncConfigurationCommand.js +1 -28
  7. package/dist-cjs/commands/DeleteConnectionCommand.js +1 -28
  8. package/dist-cjs/commands/DeleteHostCommand.js +1 -28
  9. package/dist-cjs/commands/DeleteRepositoryLinkCommand.js +1 -28
  10. package/dist-cjs/commands/DeleteSyncConfigurationCommand.js +1 -28
  11. package/dist-cjs/commands/GetConnectionCommand.js +1 -28
  12. package/dist-cjs/commands/GetHostCommand.js +1 -28
  13. package/dist-cjs/commands/GetRepositoryLinkCommand.js +1 -28
  14. package/dist-cjs/commands/GetRepositorySyncStatusCommand.js +1 -28
  15. package/dist-cjs/commands/GetResourceSyncStatusCommand.js +1 -28
  16. package/dist-cjs/commands/GetSyncBlockerSummaryCommand.js +1 -28
  17. package/dist-cjs/commands/GetSyncConfigurationCommand.js +1 -28
  18. package/dist-cjs/commands/ListConnectionsCommand.js +1 -28
  19. package/dist-cjs/commands/ListHostsCommand.js +1 -28
  20. package/dist-cjs/commands/ListRepositoryLinksCommand.js +1 -28
  21. package/dist-cjs/commands/ListRepositorySyncDefinitionsCommand.js +1 -28
  22. package/dist-cjs/commands/ListSyncConfigurationsCommand.js +1 -28
  23. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  24. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  25. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  26. package/dist-cjs/commands/UpdateHostCommand.js +1 -28
  27. package/dist-cjs/commands/UpdateRepositoryLinkCommand.js +1 -28
  28. package/dist-cjs/commands/UpdateSyncBlockerCommand.js +1 -28
  29. package/dist-cjs/commands/UpdateSyncConfigurationCommand.js +1 -28
  30. package/dist-cjs/commands/index.js +1 -30
  31. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  32. package/dist-cjs/extensionConfiguration.js +1 -2
  33. package/dist-cjs/index.js +2709 -11
  34. package/dist-cjs/models/CodeStarConnectionsServiceException.js +1 -12
  35. package/dist-cjs/models/index.js +1 -4
  36. package/dist-cjs/models/models_0.js +1 -277
  37. package/dist-cjs/pagination/Interfaces.js +1 -2
  38. package/dist-cjs/pagination/ListConnectionsPaginator.js +1 -7
  39. package/dist-cjs/pagination/ListHostsPaginator.js +1 -7
  40. package/dist-cjs/pagination/ListRepositoryLinksPaginator.js +1 -7
  41. package/dist-cjs/pagination/ListSyncConfigurationsPaginator.js +1 -7
  42. package/dist-cjs/pagination/index.js +1 -8
  43. package/dist-cjs/protocols/Aws_json1_0.js +1 -1662
  44. package/dist-cjs/runtimeExtensions.js +1 -22
  45. package/package.json +40 -40
@@ -1,1662 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSyncConfigurationsCommand = exports.de_ListRepositorySyncDefinitionsCommand = exports.de_ListRepositoryLinksCommand = exports.de_ListHostsCommand = exports.de_ListConnectionsCommand = exports.de_GetSyncConfigurationCommand = exports.de_GetSyncBlockerSummaryCommand = exports.de_GetResourceSyncStatusCommand = exports.de_GetRepositorySyncStatusCommand = exports.de_GetRepositoryLinkCommand = exports.de_GetHostCommand = exports.de_GetConnectionCommand = exports.de_DeleteSyncConfigurationCommand = exports.de_DeleteRepositoryLinkCommand = exports.de_DeleteHostCommand = exports.de_DeleteConnectionCommand = exports.de_CreateSyncConfigurationCommand = exports.de_CreateRepositoryLinkCommand = exports.de_CreateHostCommand = exports.de_CreateConnectionCommand = exports.se_UpdateSyncConfigurationCommand = exports.se_UpdateSyncBlockerCommand = exports.se_UpdateRepositoryLinkCommand = exports.se_UpdateHostCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSyncConfigurationsCommand = exports.se_ListRepositorySyncDefinitionsCommand = exports.se_ListRepositoryLinksCommand = exports.se_ListHostsCommand = exports.se_ListConnectionsCommand = exports.se_GetSyncConfigurationCommand = exports.se_GetSyncBlockerSummaryCommand = exports.se_GetResourceSyncStatusCommand = exports.se_GetRepositorySyncStatusCommand = exports.se_GetRepositoryLinkCommand = exports.se_GetHostCommand = exports.se_GetConnectionCommand = exports.se_DeleteSyncConfigurationCommand = exports.se_DeleteRepositoryLinkCommand = exports.se_DeleteHostCommand = exports.se_DeleteConnectionCommand = exports.se_CreateSyncConfigurationCommand = exports.se_CreateRepositoryLinkCommand = exports.se_CreateHostCommand = exports.se_CreateConnectionCommand = void 0;
4
- exports.de_UpdateSyncConfigurationCommand = exports.de_UpdateSyncBlockerCommand = exports.de_UpdateRepositoryLinkCommand = exports.de_UpdateHostCommand = void 0;
5
- const protocol_http_1 = require("@smithy/protocol-http");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const CodeStarConnectionsServiceException_1 = require("../models/CodeStarConnectionsServiceException");
8
- const models_0_1 = require("../models/models_0");
9
- const se_CreateConnectionCommand = async (input, context) => {
10
- const headers = sharedHeaders("CreateConnection");
11
- let body;
12
- body = JSON.stringify((0, smithy_client_1._json)(input));
13
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
- };
15
- exports.se_CreateConnectionCommand = se_CreateConnectionCommand;
16
- const se_CreateHostCommand = async (input, context) => {
17
- const headers = sharedHeaders("CreateHost");
18
- let body;
19
- body = JSON.stringify((0, smithy_client_1._json)(input));
20
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
21
- };
22
- exports.se_CreateHostCommand = se_CreateHostCommand;
23
- const se_CreateRepositoryLinkCommand = async (input, context) => {
24
- const headers = sharedHeaders("CreateRepositoryLink");
25
- let body;
26
- body = JSON.stringify((0, smithy_client_1._json)(input));
27
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
- };
29
- exports.se_CreateRepositoryLinkCommand = se_CreateRepositoryLinkCommand;
30
- const se_CreateSyncConfigurationCommand = async (input, context) => {
31
- const headers = sharedHeaders("CreateSyncConfiguration");
32
- let body;
33
- body = JSON.stringify((0, smithy_client_1._json)(input));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- exports.se_CreateSyncConfigurationCommand = se_CreateSyncConfigurationCommand;
37
- const se_DeleteConnectionCommand = async (input, context) => {
38
- const headers = sharedHeaders("DeleteConnection");
39
- let body;
40
- body = JSON.stringify((0, smithy_client_1._json)(input));
41
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
42
- };
43
- exports.se_DeleteConnectionCommand = se_DeleteConnectionCommand;
44
- const se_DeleteHostCommand = async (input, context) => {
45
- const headers = sharedHeaders("DeleteHost");
46
- let body;
47
- body = JSON.stringify((0, smithy_client_1._json)(input));
48
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
- };
50
- exports.se_DeleteHostCommand = se_DeleteHostCommand;
51
- const se_DeleteRepositoryLinkCommand = async (input, context) => {
52
- const headers = sharedHeaders("DeleteRepositoryLink");
53
- let body;
54
- body = JSON.stringify((0, smithy_client_1._json)(input));
55
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
56
- };
57
- exports.se_DeleteRepositoryLinkCommand = se_DeleteRepositoryLinkCommand;
58
- const se_DeleteSyncConfigurationCommand = async (input, context) => {
59
- const headers = sharedHeaders("DeleteSyncConfiguration");
60
- let body;
61
- body = JSON.stringify((0, smithy_client_1._json)(input));
62
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
63
- };
64
- exports.se_DeleteSyncConfigurationCommand = se_DeleteSyncConfigurationCommand;
65
- const se_GetConnectionCommand = async (input, context) => {
66
- const headers = sharedHeaders("GetConnection");
67
- let body;
68
- body = JSON.stringify((0, smithy_client_1._json)(input));
69
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
- };
71
- exports.se_GetConnectionCommand = se_GetConnectionCommand;
72
- const se_GetHostCommand = async (input, context) => {
73
- const headers = sharedHeaders("GetHost");
74
- let body;
75
- body = JSON.stringify((0, smithy_client_1._json)(input));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- exports.se_GetHostCommand = se_GetHostCommand;
79
- const se_GetRepositoryLinkCommand = async (input, context) => {
80
- const headers = sharedHeaders("GetRepositoryLink");
81
- let body;
82
- body = JSON.stringify((0, smithy_client_1._json)(input));
83
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
84
- };
85
- exports.se_GetRepositoryLinkCommand = se_GetRepositoryLinkCommand;
86
- const se_GetRepositorySyncStatusCommand = async (input, context) => {
87
- const headers = sharedHeaders("GetRepositorySyncStatus");
88
- let body;
89
- body = JSON.stringify((0, smithy_client_1._json)(input));
90
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
91
- };
92
- exports.se_GetRepositorySyncStatusCommand = se_GetRepositorySyncStatusCommand;
93
- const se_GetResourceSyncStatusCommand = async (input, context) => {
94
- const headers = sharedHeaders("GetResourceSyncStatus");
95
- let body;
96
- body = JSON.stringify((0, smithy_client_1._json)(input));
97
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
98
- };
99
- exports.se_GetResourceSyncStatusCommand = se_GetResourceSyncStatusCommand;
100
- const se_GetSyncBlockerSummaryCommand = async (input, context) => {
101
- const headers = sharedHeaders("GetSyncBlockerSummary");
102
- let body;
103
- body = JSON.stringify((0, smithy_client_1._json)(input));
104
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
105
- };
106
- exports.se_GetSyncBlockerSummaryCommand = se_GetSyncBlockerSummaryCommand;
107
- const se_GetSyncConfigurationCommand = async (input, context) => {
108
- const headers = sharedHeaders("GetSyncConfiguration");
109
- let body;
110
- body = JSON.stringify((0, smithy_client_1._json)(input));
111
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
- };
113
- exports.se_GetSyncConfigurationCommand = se_GetSyncConfigurationCommand;
114
- const se_ListConnectionsCommand = async (input, context) => {
115
- const headers = sharedHeaders("ListConnections");
116
- let body;
117
- body = JSON.stringify((0, smithy_client_1._json)(input));
118
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
- };
120
- exports.se_ListConnectionsCommand = se_ListConnectionsCommand;
121
- const se_ListHostsCommand = async (input, context) => {
122
- const headers = sharedHeaders("ListHosts");
123
- let body;
124
- body = JSON.stringify((0, smithy_client_1._json)(input));
125
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
126
- };
127
- exports.se_ListHostsCommand = se_ListHostsCommand;
128
- const se_ListRepositoryLinksCommand = async (input, context) => {
129
- const headers = sharedHeaders("ListRepositoryLinks");
130
- let body;
131
- body = JSON.stringify((0, smithy_client_1._json)(input));
132
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
133
- };
134
- exports.se_ListRepositoryLinksCommand = se_ListRepositoryLinksCommand;
135
- const se_ListRepositorySyncDefinitionsCommand = async (input, context) => {
136
- const headers = sharedHeaders("ListRepositorySyncDefinitions");
137
- let body;
138
- body = JSON.stringify((0, smithy_client_1._json)(input));
139
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
140
- };
141
- exports.se_ListRepositorySyncDefinitionsCommand = se_ListRepositorySyncDefinitionsCommand;
142
- const se_ListSyncConfigurationsCommand = async (input, context) => {
143
- const headers = sharedHeaders("ListSyncConfigurations");
144
- let body;
145
- body = JSON.stringify((0, smithy_client_1._json)(input));
146
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
147
- };
148
- exports.se_ListSyncConfigurationsCommand = se_ListSyncConfigurationsCommand;
149
- const se_ListTagsForResourceCommand = async (input, context) => {
150
- const headers = sharedHeaders("ListTagsForResource");
151
- let body;
152
- body = JSON.stringify((0, smithy_client_1._json)(input));
153
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
154
- };
155
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
156
- const se_TagResourceCommand = async (input, context) => {
157
- const headers = sharedHeaders("TagResource");
158
- let body;
159
- body = JSON.stringify((0, smithy_client_1._json)(input));
160
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
161
- };
162
- exports.se_TagResourceCommand = se_TagResourceCommand;
163
- const se_UntagResourceCommand = async (input, context) => {
164
- const headers = sharedHeaders("UntagResource");
165
- let body;
166
- body = JSON.stringify((0, smithy_client_1._json)(input));
167
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
168
- };
169
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
170
- const se_UpdateHostCommand = async (input, context) => {
171
- const headers = sharedHeaders("UpdateHost");
172
- let body;
173
- body = JSON.stringify((0, smithy_client_1._json)(input));
174
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
- };
176
- exports.se_UpdateHostCommand = se_UpdateHostCommand;
177
- const se_UpdateRepositoryLinkCommand = async (input, context) => {
178
- const headers = sharedHeaders("UpdateRepositoryLink");
179
- let body;
180
- body = JSON.stringify((0, smithy_client_1._json)(input));
181
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
182
- };
183
- exports.se_UpdateRepositoryLinkCommand = se_UpdateRepositoryLinkCommand;
184
- const se_UpdateSyncBlockerCommand = async (input, context) => {
185
- const headers = sharedHeaders("UpdateSyncBlocker");
186
- let body;
187
- body = JSON.stringify((0, smithy_client_1._json)(input));
188
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
189
- };
190
- exports.se_UpdateSyncBlockerCommand = se_UpdateSyncBlockerCommand;
191
- const se_UpdateSyncConfigurationCommand = async (input, context) => {
192
- const headers = sharedHeaders("UpdateSyncConfiguration");
193
- let body;
194
- body = JSON.stringify((0, smithy_client_1._json)(input));
195
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
196
- };
197
- exports.se_UpdateSyncConfigurationCommand = se_UpdateSyncConfigurationCommand;
198
- const de_CreateConnectionCommand = async (output, context) => {
199
- if (output.statusCode >= 300) {
200
- return de_CreateConnectionCommandError(output, context);
201
- }
202
- const data = await parseBody(output.body, context);
203
- let contents = {};
204
- contents = (0, smithy_client_1._json)(data);
205
- const response = {
206
- $metadata: deserializeMetadata(output),
207
- ...contents,
208
- };
209
- return response;
210
- };
211
- exports.de_CreateConnectionCommand = de_CreateConnectionCommand;
212
- const de_CreateConnectionCommandError = async (output, context) => {
213
- const parsedOutput = {
214
- ...output,
215
- body: await parseErrorBody(output.body, context),
216
- };
217
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
218
- switch (errorCode) {
219
- case "LimitExceededException":
220
- case "com.amazonaws.codestarconnections#LimitExceededException":
221
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
222
- case "ResourceNotFoundException":
223
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
224
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
225
- case "ResourceUnavailableException":
226
- case "com.amazonaws.codestarconnections#ResourceUnavailableException":
227
- throw await de_ResourceUnavailableExceptionRes(parsedOutput, context);
228
- default:
229
- const parsedBody = parsedOutput.body;
230
- return throwDefaultError({
231
- output,
232
- parsedBody,
233
- errorCode,
234
- });
235
- }
236
- };
237
- const de_CreateHostCommand = async (output, context) => {
238
- if (output.statusCode >= 300) {
239
- return de_CreateHostCommandError(output, context);
240
- }
241
- const data = await parseBody(output.body, context);
242
- let contents = {};
243
- contents = (0, smithy_client_1._json)(data);
244
- const response = {
245
- $metadata: deserializeMetadata(output),
246
- ...contents,
247
- };
248
- return response;
249
- };
250
- exports.de_CreateHostCommand = de_CreateHostCommand;
251
- const de_CreateHostCommandError = async (output, context) => {
252
- const parsedOutput = {
253
- ...output,
254
- body: await parseErrorBody(output.body, context),
255
- };
256
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
257
- switch (errorCode) {
258
- case "LimitExceededException":
259
- case "com.amazonaws.codestarconnections#LimitExceededException":
260
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
261
- default:
262
- const parsedBody = parsedOutput.body;
263
- return throwDefaultError({
264
- output,
265
- parsedBody,
266
- errorCode,
267
- });
268
- }
269
- };
270
- const de_CreateRepositoryLinkCommand = async (output, context) => {
271
- if (output.statusCode >= 300) {
272
- return de_CreateRepositoryLinkCommandError(output, context);
273
- }
274
- const data = await parseBody(output.body, context);
275
- let contents = {};
276
- contents = (0, smithy_client_1._json)(data);
277
- const response = {
278
- $metadata: deserializeMetadata(output),
279
- ...contents,
280
- };
281
- return response;
282
- };
283
- exports.de_CreateRepositoryLinkCommand = de_CreateRepositoryLinkCommand;
284
- const de_CreateRepositoryLinkCommandError = async (output, context) => {
285
- const parsedOutput = {
286
- ...output,
287
- body: await parseErrorBody(output.body, context),
288
- };
289
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
290
- switch (errorCode) {
291
- case "AccessDeniedException":
292
- case "com.amazonaws.codestarconnections#AccessDeniedException":
293
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
294
- case "ConcurrentModificationException":
295
- case "com.amazonaws.codestarconnections#ConcurrentModificationException":
296
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
297
- case "InternalServerException":
298
- case "com.amazonaws.codestarconnections#InternalServerException":
299
- throw await de_InternalServerExceptionRes(parsedOutput, context);
300
- case "InvalidInputException":
301
- case "com.amazonaws.codestarconnections#InvalidInputException":
302
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
303
- case "LimitExceededException":
304
- case "com.amazonaws.codestarconnections#LimitExceededException":
305
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
306
- case "ResourceAlreadyExistsException":
307
- case "com.amazonaws.codestarconnections#ResourceAlreadyExistsException":
308
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
309
- case "ThrottlingException":
310
- case "com.amazonaws.codestarconnections#ThrottlingException":
311
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
312
- default:
313
- const parsedBody = parsedOutput.body;
314
- return throwDefaultError({
315
- output,
316
- parsedBody,
317
- errorCode,
318
- });
319
- }
320
- };
321
- const de_CreateSyncConfigurationCommand = async (output, context) => {
322
- if (output.statusCode >= 300) {
323
- return de_CreateSyncConfigurationCommandError(output, context);
324
- }
325
- const data = await parseBody(output.body, context);
326
- let contents = {};
327
- contents = (0, smithy_client_1._json)(data);
328
- const response = {
329
- $metadata: deserializeMetadata(output),
330
- ...contents,
331
- };
332
- return response;
333
- };
334
- exports.de_CreateSyncConfigurationCommand = de_CreateSyncConfigurationCommand;
335
- const de_CreateSyncConfigurationCommandError = async (output, context) => {
336
- const parsedOutput = {
337
- ...output,
338
- body: await parseErrorBody(output.body, context),
339
- };
340
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
341
- switch (errorCode) {
342
- case "AccessDeniedException":
343
- case "com.amazonaws.codestarconnections#AccessDeniedException":
344
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
345
- case "ConcurrentModificationException":
346
- case "com.amazonaws.codestarconnections#ConcurrentModificationException":
347
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
348
- case "InternalServerException":
349
- case "com.amazonaws.codestarconnections#InternalServerException":
350
- throw await de_InternalServerExceptionRes(parsedOutput, context);
351
- case "InvalidInputException":
352
- case "com.amazonaws.codestarconnections#InvalidInputException":
353
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
354
- case "LimitExceededException":
355
- case "com.amazonaws.codestarconnections#LimitExceededException":
356
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
357
- case "ResourceAlreadyExistsException":
358
- case "com.amazonaws.codestarconnections#ResourceAlreadyExistsException":
359
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
360
- case "ThrottlingException":
361
- case "com.amazonaws.codestarconnections#ThrottlingException":
362
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
363
- default:
364
- const parsedBody = parsedOutput.body;
365
- return throwDefaultError({
366
- output,
367
- parsedBody,
368
- errorCode,
369
- });
370
- }
371
- };
372
- const de_DeleteConnectionCommand = async (output, context) => {
373
- if (output.statusCode >= 300) {
374
- return de_DeleteConnectionCommandError(output, context);
375
- }
376
- const data = await parseBody(output.body, context);
377
- let contents = {};
378
- contents = (0, smithy_client_1._json)(data);
379
- const response = {
380
- $metadata: deserializeMetadata(output),
381
- ...contents,
382
- };
383
- return response;
384
- };
385
- exports.de_DeleteConnectionCommand = de_DeleteConnectionCommand;
386
- const de_DeleteConnectionCommandError = async (output, context) => {
387
- const parsedOutput = {
388
- ...output,
389
- body: await parseErrorBody(output.body, context),
390
- };
391
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
392
- switch (errorCode) {
393
- case "ResourceNotFoundException":
394
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
395
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
396
- default:
397
- const parsedBody = parsedOutput.body;
398
- return throwDefaultError({
399
- output,
400
- parsedBody,
401
- errorCode,
402
- });
403
- }
404
- };
405
- const de_DeleteHostCommand = async (output, context) => {
406
- if (output.statusCode >= 300) {
407
- return de_DeleteHostCommandError(output, context);
408
- }
409
- const data = await parseBody(output.body, context);
410
- let contents = {};
411
- contents = (0, smithy_client_1._json)(data);
412
- const response = {
413
- $metadata: deserializeMetadata(output),
414
- ...contents,
415
- };
416
- return response;
417
- };
418
- exports.de_DeleteHostCommand = de_DeleteHostCommand;
419
- const de_DeleteHostCommandError = async (output, context) => {
420
- const parsedOutput = {
421
- ...output,
422
- body: await parseErrorBody(output.body, context),
423
- };
424
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
425
- switch (errorCode) {
426
- case "ResourceNotFoundException":
427
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
428
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
429
- case "ResourceUnavailableException":
430
- case "com.amazonaws.codestarconnections#ResourceUnavailableException":
431
- throw await de_ResourceUnavailableExceptionRes(parsedOutput, context);
432
- default:
433
- const parsedBody = parsedOutput.body;
434
- return throwDefaultError({
435
- output,
436
- parsedBody,
437
- errorCode,
438
- });
439
- }
440
- };
441
- const de_DeleteRepositoryLinkCommand = async (output, context) => {
442
- if (output.statusCode >= 300) {
443
- return de_DeleteRepositoryLinkCommandError(output, context);
444
- }
445
- const data = await parseBody(output.body, context);
446
- let contents = {};
447
- contents = (0, smithy_client_1._json)(data);
448
- const response = {
449
- $metadata: deserializeMetadata(output),
450
- ...contents,
451
- };
452
- return response;
453
- };
454
- exports.de_DeleteRepositoryLinkCommand = de_DeleteRepositoryLinkCommand;
455
- const de_DeleteRepositoryLinkCommandError = async (output, context) => {
456
- const parsedOutput = {
457
- ...output,
458
- body: await parseErrorBody(output.body, context),
459
- };
460
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
461
- switch (errorCode) {
462
- case "AccessDeniedException":
463
- case "com.amazonaws.codestarconnections#AccessDeniedException":
464
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
465
- case "ConcurrentModificationException":
466
- case "com.amazonaws.codestarconnections#ConcurrentModificationException":
467
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
468
- case "InternalServerException":
469
- case "com.amazonaws.codestarconnections#InternalServerException":
470
- throw await de_InternalServerExceptionRes(parsedOutput, context);
471
- case "InvalidInputException":
472
- case "com.amazonaws.codestarconnections#InvalidInputException":
473
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
474
- case "ResourceNotFoundException":
475
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
476
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
477
- case "SyncConfigurationStillExistsException":
478
- case "com.amazonaws.codestarconnections#SyncConfigurationStillExistsException":
479
- throw await de_SyncConfigurationStillExistsExceptionRes(parsedOutput, context);
480
- case "ThrottlingException":
481
- case "com.amazonaws.codestarconnections#ThrottlingException":
482
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
483
- case "UnsupportedProviderTypeException":
484
- case "com.amazonaws.codestarconnections#UnsupportedProviderTypeException":
485
- throw await de_UnsupportedProviderTypeExceptionRes(parsedOutput, context);
486
- default:
487
- const parsedBody = parsedOutput.body;
488
- return throwDefaultError({
489
- output,
490
- parsedBody,
491
- errorCode,
492
- });
493
- }
494
- };
495
- const de_DeleteSyncConfigurationCommand = async (output, context) => {
496
- if (output.statusCode >= 300) {
497
- return de_DeleteSyncConfigurationCommandError(output, context);
498
- }
499
- const data = await parseBody(output.body, context);
500
- let contents = {};
501
- contents = (0, smithy_client_1._json)(data);
502
- const response = {
503
- $metadata: deserializeMetadata(output),
504
- ...contents,
505
- };
506
- return response;
507
- };
508
- exports.de_DeleteSyncConfigurationCommand = de_DeleteSyncConfigurationCommand;
509
- const de_DeleteSyncConfigurationCommandError = async (output, context) => {
510
- const parsedOutput = {
511
- ...output,
512
- body: await parseErrorBody(output.body, context),
513
- };
514
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
515
- switch (errorCode) {
516
- case "AccessDeniedException":
517
- case "com.amazonaws.codestarconnections#AccessDeniedException":
518
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
519
- case "ConcurrentModificationException":
520
- case "com.amazonaws.codestarconnections#ConcurrentModificationException":
521
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
522
- case "InternalServerException":
523
- case "com.amazonaws.codestarconnections#InternalServerException":
524
- throw await de_InternalServerExceptionRes(parsedOutput, context);
525
- case "InvalidInputException":
526
- case "com.amazonaws.codestarconnections#InvalidInputException":
527
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
528
- case "LimitExceededException":
529
- case "com.amazonaws.codestarconnections#LimitExceededException":
530
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
531
- case "ThrottlingException":
532
- case "com.amazonaws.codestarconnections#ThrottlingException":
533
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
534
- default:
535
- const parsedBody = parsedOutput.body;
536
- return throwDefaultError({
537
- output,
538
- parsedBody,
539
- errorCode,
540
- });
541
- }
542
- };
543
- const de_GetConnectionCommand = async (output, context) => {
544
- if (output.statusCode >= 300) {
545
- return de_GetConnectionCommandError(output, context);
546
- }
547
- const data = await parseBody(output.body, context);
548
- let contents = {};
549
- contents = (0, smithy_client_1._json)(data);
550
- const response = {
551
- $metadata: deserializeMetadata(output),
552
- ...contents,
553
- };
554
- return response;
555
- };
556
- exports.de_GetConnectionCommand = de_GetConnectionCommand;
557
- const de_GetConnectionCommandError = async (output, context) => {
558
- const parsedOutput = {
559
- ...output,
560
- body: await parseErrorBody(output.body, context),
561
- };
562
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
563
- switch (errorCode) {
564
- case "ResourceNotFoundException":
565
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
566
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
567
- case "ResourceUnavailableException":
568
- case "com.amazonaws.codestarconnections#ResourceUnavailableException":
569
- throw await de_ResourceUnavailableExceptionRes(parsedOutput, context);
570
- default:
571
- const parsedBody = parsedOutput.body;
572
- return throwDefaultError({
573
- output,
574
- parsedBody,
575
- errorCode,
576
- });
577
- }
578
- };
579
- const de_GetHostCommand = async (output, context) => {
580
- if (output.statusCode >= 300) {
581
- return de_GetHostCommandError(output, context);
582
- }
583
- const data = await parseBody(output.body, context);
584
- let contents = {};
585
- contents = (0, smithy_client_1._json)(data);
586
- const response = {
587
- $metadata: deserializeMetadata(output),
588
- ...contents,
589
- };
590
- return response;
591
- };
592
- exports.de_GetHostCommand = de_GetHostCommand;
593
- const de_GetHostCommandError = async (output, context) => {
594
- const parsedOutput = {
595
- ...output,
596
- body: await parseErrorBody(output.body, context),
597
- };
598
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
599
- switch (errorCode) {
600
- case "ResourceNotFoundException":
601
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
602
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
603
- case "ResourceUnavailableException":
604
- case "com.amazonaws.codestarconnections#ResourceUnavailableException":
605
- throw await de_ResourceUnavailableExceptionRes(parsedOutput, context);
606
- default:
607
- const parsedBody = parsedOutput.body;
608
- return throwDefaultError({
609
- output,
610
- parsedBody,
611
- errorCode,
612
- });
613
- }
614
- };
615
- const de_GetRepositoryLinkCommand = async (output, context) => {
616
- if (output.statusCode >= 300) {
617
- return de_GetRepositoryLinkCommandError(output, context);
618
- }
619
- const data = await parseBody(output.body, context);
620
- let contents = {};
621
- contents = (0, smithy_client_1._json)(data);
622
- const response = {
623
- $metadata: deserializeMetadata(output),
624
- ...contents,
625
- };
626
- return response;
627
- };
628
- exports.de_GetRepositoryLinkCommand = de_GetRepositoryLinkCommand;
629
- const de_GetRepositoryLinkCommandError = async (output, context) => {
630
- const parsedOutput = {
631
- ...output,
632
- body: await parseErrorBody(output.body, context),
633
- };
634
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
635
- switch (errorCode) {
636
- case "AccessDeniedException":
637
- case "com.amazonaws.codestarconnections#AccessDeniedException":
638
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
639
- case "ConcurrentModificationException":
640
- case "com.amazonaws.codestarconnections#ConcurrentModificationException":
641
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
642
- case "InternalServerException":
643
- case "com.amazonaws.codestarconnections#InternalServerException":
644
- throw await de_InternalServerExceptionRes(parsedOutput, context);
645
- case "InvalidInputException":
646
- case "com.amazonaws.codestarconnections#InvalidInputException":
647
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
648
- case "ResourceNotFoundException":
649
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
650
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
651
- case "ThrottlingException":
652
- case "com.amazonaws.codestarconnections#ThrottlingException":
653
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
654
- default:
655
- const parsedBody = parsedOutput.body;
656
- return throwDefaultError({
657
- output,
658
- parsedBody,
659
- errorCode,
660
- });
661
- }
662
- };
663
- const de_GetRepositorySyncStatusCommand = async (output, context) => {
664
- if (output.statusCode >= 300) {
665
- return de_GetRepositorySyncStatusCommandError(output, context);
666
- }
667
- const data = await parseBody(output.body, context);
668
- let contents = {};
669
- contents = de_GetRepositorySyncStatusOutput(data, context);
670
- const response = {
671
- $metadata: deserializeMetadata(output),
672
- ...contents,
673
- };
674
- return response;
675
- };
676
- exports.de_GetRepositorySyncStatusCommand = de_GetRepositorySyncStatusCommand;
677
- const de_GetRepositorySyncStatusCommandError = async (output, context) => {
678
- const parsedOutput = {
679
- ...output,
680
- body: await parseErrorBody(output.body, context),
681
- };
682
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
683
- switch (errorCode) {
684
- case "AccessDeniedException":
685
- case "com.amazonaws.codestarconnections#AccessDeniedException":
686
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
687
- case "InternalServerException":
688
- case "com.amazonaws.codestarconnections#InternalServerException":
689
- throw await de_InternalServerExceptionRes(parsedOutput, context);
690
- case "InvalidInputException":
691
- case "com.amazonaws.codestarconnections#InvalidInputException":
692
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
693
- case "ResourceNotFoundException":
694
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
695
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
696
- case "ThrottlingException":
697
- case "com.amazonaws.codestarconnections#ThrottlingException":
698
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
699
- default:
700
- const parsedBody = parsedOutput.body;
701
- return throwDefaultError({
702
- output,
703
- parsedBody,
704
- errorCode,
705
- });
706
- }
707
- };
708
- const de_GetResourceSyncStatusCommand = async (output, context) => {
709
- if (output.statusCode >= 300) {
710
- return de_GetResourceSyncStatusCommandError(output, context);
711
- }
712
- const data = await parseBody(output.body, context);
713
- let contents = {};
714
- contents = de_GetResourceSyncStatusOutput(data, context);
715
- const response = {
716
- $metadata: deserializeMetadata(output),
717
- ...contents,
718
- };
719
- return response;
720
- };
721
- exports.de_GetResourceSyncStatusCommand = de_GetResourceSyncStatusCommand;
722
- const de_GetResourceSyncStatusCommandError = async (output, context) => {
723
- const parsedOutput = {
724
- ...output,
725
- body: await parseErrorBody(output.body, context),
726
- };
727
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
728
- switch (errorCode) {
729
- case "AccessDeniedException":
730
- case "com.amazonaws.codestarconnections#AccessDeniedException":
731
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
732
- case "InternalServerException":
733
- case "com.amazonaws.codestarconnections#InternalServerException":
734
- throw await de_InternalServerExceptionRes(parsedOutput, context);
735
- case "InvalidInputException":
736
- case "com.amazonaws.codestarconnections#InvalidInputException":
737
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
738
- case "ResourceNotFoundException":
739
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
740
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
741
- case "ThrottlingException":
742
- case "com.amazonaws.codestarconnections#ThrottlingException":
743
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
744
- default:
745
- const parsedBody = parsedOutput.body;
746
- return throwDefaultError({
747
- output,
748
- parsedBody,
749
- errorCode,
750
- });
751
- }
752
- };
753
- const de_GetSyncBlockerSummaryCommand = async (output, context) => {
754
- if (output.statusCode >= 300) {
755
- return de_GetSyncBlockerSummaryCommandError(output, context);
756
- }
757
- const data = await parseBody(output.body, context);
758
- let contents = {};
759
- contents = de_GetSyncBlockerSummaryOutput(data, context);
760
- const response = {
761
- $metadata: deserializeMetadata(output),
762
- ...contents,
763
- };
764
- return response;
765
- };
766
- exports.de_GetSyncBlockerSummaryCommand = de_GetSyncBlockerSummaryCommand;
767
- const de_GetSyncBlockerSummaryCommandError = async (output, context) => {
768
- const parsedOutput = {
769
- ...output,
770
- body: await parseErrorBody(output.body, context),
771
- };
772
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
773
- switch (errorCode) {
774
- case "AccessDeniedException":
775
- case "com.amazonaws.codestarconnections#AccessDeniedException":
776
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
777
- case "InternalServerException":
778
- case "com.amazonaws.codestarconnections#InternalServerException":
779
- throw await de_InternalServerExceptionRes(parsedOutput, context);
780
- case "InvalidInputException":
781
- case "com.amazonaws.codestarconnections#InvalidInputException":
782
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
783
- case "ResourceNotFoundException":
784
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
785
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
786
- case "ThrottlingException":
787
- case "com.amazonaws.codestarconnections#ThrottlingException":
788
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
789
- default:
790
- const parsedBody = parsedOutput.body;
791
- return throwDefaultError({
792
- output,
793
- parsedBody,
794
- errorCode,
795
- });
796
- }
797
- };
798
- const de_GetSyncConfigurationCommand = async (output, context) => {
799
- if (output.statusCode >= 300) {
800
- return de_GetSyncConfigurationCommandError(output, context);
801
- }
802
- const data = await parseBody(output.body, context);
803
- let contents = {};
804
- contents = (0, smithy_client_1._json)(data);
805
- const response = {
806
- $metadata: deserializeMetadata(output),
807
- ...contents,
808
- };
809
- return response;
810
- };
811
- exports.de_GetSyncConfigurationCommand = de_GetSyncConfigurationCommand;
812
- const de_GetSyncConfigurationCommandError = async (output, context) => {
813
- const parsedOutput = {
814
- ...output,
815
- body: await parseErrorBody(output.body, context),
816
- };
817
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
818
- switch (errorCode) {
819
- case "AccessDeniedException":
820
- case "com.amazonaws.codestarconnections#AccessDeniedException":
821
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
822
- case "InternalServerException":
823
- case "com.amazonaws.codestarconnections#InternalServerException":
824
- throw await de_InternalServerExceptionRes(parsedOutput, context);
825
- case "InvalidInputException":
826
- case "com.amazonaws.codestarconnections#InvalidInputException":
827
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
828
- case "ResourceNotFoundException":
829
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
830
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
831
- case "ThrottlingException":
832
- case "com.amazonaws.codestarconnections#ThrottlingException":
833
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
834
- default:
835
- const parsedBody = parsedOutput.body;
836
- return throwDefaultError({
837
- output,
838
- parsedBody,
839
- errorCode,
840
- });
841
- }
842
- };
843
- const de_ListConnectionsCommand = async (output, context) => {
844
- if (output.statusCode >= 300) {
845
- return de_ListConnectionsCommandError(output, context);
846
- }
847
- const data = await parseBody(output.body, context);
848
- let contents = {};
849
- contents = (0, smithy_client_1._json)(data);
850
- const response = {
851
- $metadata: deserializeMetadata(output),
852
- ...contents,
853
- };
854
- return response;
855
- };
856
- exports.de_ListConnectionsCommand = de_ListConnectionsCommand;
857
- const de_ListConnectionsCommandError = async (output, context) => {
858
- const parsedOutput = {
859
- ...output,
860
- body: await parseErrorBody(output.body, context),
861
- };
862
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
863
- switch (errorCode) {
864
- case "ResourceNotFoundException":
865
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
866
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
867
- default:
868
- const parsedBody = parsedOutput.body;
869
- return throwDefaultError({
870
- output,
871
- parsedBody,
872
- errorCode,
873
- });
874
- }
875
- };
876
- const de_ListHostsCommand = async (output, context) => {
877
- if (output.statusCode >= 300) {
878
- return de_ListHostsCommandError(output, context);
879
- }
880
- const data = await parseBody(output.body, context);
881
- let contents = {};
882
- contents = (0, smithy_client_1._json)(data);
883
- const response = {
884
- $metadata: deserializeMetadata(output),
885
- ...contents,
886
- };
887
- return response;
888
- };
889
- exports.de_ListHostsCommand = de_ListHostsCommand;
890
- const de_ListHostsCommandError = async (output, context) => {
891
- const parsedOutput = {
892
- ...output,
893
- body: await parseErrorBody(output.body, context),
894
- };
895
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
896
- const parsedBody = parsedOutput.body;
897
- return throwDefaultError({
898
- output,
899
- parsedBody,
900
- errorCode,
901
- });
902
- };
903
- const de_ListRepositoryLinksCommand = async (output, context) => {
904
- if (output.statusCode >= 300) {
905
- return de_ListRepositoryLinksCommandError(output, context);
906
- }
907
- const data = await parseBody(output.body, context);
908
- let contents = {};
909
- contents = (0, smithy_client_1._json)(data);
910
- const response = {
911
- $metadata: deserializeMetadata(output),
912
- ...contents,
913
- };
914
- return response;
915
- };
916
- exports.de_ListRepositoryLinksCommand = de_ListRepositoryLinksCommand;
917
- const de_ListRepositoryLinksCommandError = async (output, context) => {
918
- const parsedOutput = {
919
- ...output,
920
- body: await parseErrorBody(output.body, context),
921
- };
922
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
923
- switch (errorCode) {
924
- case "AccessDeniedException":
925
- case "com.amazonaws.codestarconnections#AccessDeniedException":
926
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
927
- case "ConcurrentModificationException":
928
- case "com.amazonaws.codestarconnections#ConcurrentModificationException":
929
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
930
- case "InternalServerException":
931
- case "com.amazonaws.codestarconnections#InternalServerException":
932
- throw await de_InternalServerExceptionRes(parsedOutput, context);
933
- case "InvalidInputException":
934
- case "com.amazonaws.codestarconnections#InvalidInputException":
935
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
936
- case "ResourceNotFoundException":
937
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
938
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
939
- case "ThrottlingException":
940
- case "com.amazonaws.codestarconnections#ThrottlingException":
941
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
942
- default:
943
- const parsedBody = parsedOutput.body;
944
- return throwDefaultError({
945
- output,
946
- parsedBody,
947
- errorCode,
948
- });
949
- }
950
- };
951
- const de_ListRepositorySyncDefinitionsCommand = async (output, context) => {
952
- if (output.statusCode >= 300) {
953
- return de_ListRepositorySyncDefinitionsCommandError(output, context);
954
- }
955
- const data = await parseBody(output.body, context);
956
- let contents = {};
957
- contents = (0, smithy_client_1._json)(data);
958
- const response = {
959
- $metadata: deserializeMetadata(output),
960
- ...contents,
961
- };
962
- return response;
963
- };
964
- exports.de_ListRepositorySyncDefinitionsCommand = de_ListRepositorySyncDefinitionsCommand;
965
- const de_ListRepositorySyncDefinitionsCommandError = async (output, context) => {
966
- const parsedOutput = {
967
- ...output,
968
- body: await parseErrorBody(output.body, context),
969
- };
970
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
971
- switch (errorCode) {
972
- case "AccessDeniedException":
973
- case "com.amazonaws.codestarconnections#AccessDeniedException":
974
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
975
- case "InternalServerException":
976
- case "com.amazonaws.codestarconnections#InternalServerException":
977
- throw await de_InternalServerExceptionRes(parsedOutput, context);
978
- case "InvalidInputException":
979
- case "com.amazonaws.codestarconnections#InvalidInputException":
980
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
981
- case "ResourceNotFoundException":
982
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
983
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
984
- case "ThrottlingException":
985
- case "com.amazonaws.codestarconnections#ThrottlingException":
986
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
987
- default:
988
- const parsedBody = parsedOutput.body;
989
- return throwDefaultError({
990
- output,
991
- parsedBody,
992
- errorCode,
993
- });
994
- }
995
- };
996
- const de_ListSyncConfigurationsCommand = async (output, context) => {
997
- if (output.statusCode >= 300) {
998
- return de_ListSyncConfigurationsCommandError(output, context);
999
- }
1000
- const data = await parseBody(output.body, context);
1001
- let contents = {};
1002
- contents = (0, smithy_client_1._json)(data);
1003
- const response = {
1004
- $metadata: deserializeMetadata(output),
1005
- ...contents,
1006
- };
1007
- return response;
1008
- };
1009
- exports.de_ListSyncConfigurationsCommand = de_ListSyncConfigurationsCommand;
1010
- const de_ListSyncConfigurationsCommandError = async (output, context) => {
1011
- const parsedOutput = {
1012
- ...output,
1013
- body: await parseErrorBody(output.body, context),
1014
- };
1015
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1016
- switch (errorCode) {
1017
- case "AccessDeniedException":
1018
- case "com.amazonaws.codestarconnections#AccessDeniedException":
1019
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1020
- case "InternalServerException":
1021
- case "com.amazonaws.codestarconnections#InternalServerException":
1022
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1023
- case "InvalidInputException":
1024
- case "com.amazonaws.codestarconnections#InvalidInputException":
1025
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1026
- case "ResourceNotFoundException":
1027
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
1028
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1029
- case "ThrottlingException":
1030
- case "com.amazonaws.codestarconnections#ThrottlingException":
1031
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1032
- default:
1033
- const parsedBody = parsedOutput.body;
1034
- return throwDefaultError({
1035
- output,
1036
- parsedBody,
1037
- errorCode,
1038
- });
1039
- }
1040
- };
1041
- const de_ListTagsForResourceCommand = async (output, context) => {
1042
- if (output.statusCode >= 300) {
1043
- return de_ListTagsForResourceCommandError(output, context);
1044
- }
1045
- const data = await parseBody(output.body, context);
1046
- let contents = {};
1047
- contents = (0, smithy_client_1._json)(data);
1048
- const response = {
1049
- $metadata: deserializeMetadata(output),
1050
- ...contents,
1051
- };
1052
- return response;
1053
- };
1054
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
1055
- const de_ListTagsForResourceCommandError = async (output, context) => {
1056
- const parsedOutput = {
1057
- ...output,
1058
- body: await parseErrorBody(output.body, context),
1059
- };
1060
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1061
- switch (errorCode) {
1062
- case "ResourceNotFoundException":
1063
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
1064
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1065
- default:
1066
- const parsedBody = parsedOutput.body;
1067
- return throwDefaultError({
1068
- output,
1069
- parsedBody,
1070
- errorCode,
1071
- });
1072
- }
1073
- };
1074
- const de_TagResourceCommand = async (output, context) => {
1075
- if (output.statusCode >= 300) {
1076
- return de_TagResourceCommandError(output, context);
1077
- }
1078
- const data = await parseBody(output.body, context);
1079
- let contents = {};
1080
- contents = (0, smithy_client_1._json)(data);
1081
- const response = {
1082
- $metadata: deserializeMetadata(output),
1083
- ...contents,
1084
- };
1085
- return response;
1086
- };
1087
- exports.de_TagResourceCommand = de_TagResourceCommand;
1088
- const de_TagResourceCommandError = async (output, context) => {
1089
- const parsedOutput = {
1090
- ...output,
1091
- body: await parseErrorBody(output.body, context),
1092
- };
1093
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1094
- switch (errorCode) {
1095
- case "LimitExceededException":
1096
- case "com.amazonaws.codestarconnections#LimitExceededException":
1097
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1098
- case "ResourceNotFoundException":
1099
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
1100
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1101
- default:
1102
- const parsedBody = parsedOutput.body;
1103
- return throwDefaultError({
1104
- output,
1105
- parsedBody,
1106
- errorCode,
1107
- });
1108
- }
1109
- };
1110
- const de_UntagResourceCommand = async (output, context) => {
1111
- if (output.statusCode >= 300) {
1112
- return de_UntagResourceCommandError(output, context);
1113
- }
1114
- const data = await parseBody(output.body, context);
1115
- let contents = {};
1116
- contents = (0, smithy_client_1._json)(data);
1117
- const response = {
1118
- $metadata: deserializeMetadata(output),
1119
- ...contents,
1120
- };
1121
- return response;
1122
- };
1123
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
1124
- const de_UntagResourceCommandError = async (output, context) => {
1125
- const parsedOutput = {
1126
- ...output,
1127
- body: await parseErrorBody(output.body, context),
1128
- };
1129
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1130
- switch (errorCode) {
1131
- case "ResourceNotFoundException":
1132
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
1133
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1134
- default:
1135
- const parsedBody = parsedOutput.body;
1136
- return throwDefaultError({
1137
- output,
1138
- parsedBody,
1139
- errorCode,
1140
- });
1141
- }
1142
- };
1143
- const de_UpdateHostCommand = async (output, context) => {
1144
- if (output.statusCode >= 300) {
1145
- return de_UpdateHostCommandError(output, context);
1146
- }
1147
- const data = await parseBody(output.body, context);
1148
- let contents = {};
1149
- contents = (0, smithy_client_1._json)(data);
1150
- const response = {
1151
- $metadata: deserializeMetadata(output),
1152
- ...contents,
1153
- };
1154
- return response;
1155
- };
1156
- exports.de_UpdateHostCommand = de_UpdateHostCommand;
1157
- const de_UpdateHostCommandError = 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 "ConflictException":
1165
- case "com.amazonaws.codestarconnections#ConflictException":
1166
- throw await de_ConflictExceptionRes(parsedOutput, context);
1167
- case "ResourceNotFoundException":
1168
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
1169
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1170
- case "ResourceUnavailableException":
1171
- case "com.amazonaws.codestarconnections#ResourceUnavailableException":
1172
- throw await de_ResourceUnavailableExceptionRes(parsedOutput, context);
1173
- case "UnsupportedOperationException":
1174
- case "com.amazonaws.codestarconnections#UnsupportedOperationException":
1175
- throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
1176
- default:
1177
- const parsedBody = parsedOutput.body;
1178
- return throwDefaultError({
1179
- output,
1180
- parsedBody,
1181
- errorCode,
1182
- });
1183
- }
1184
- };
1185
- const de_UpdateRepositoryLinkCommand = async (output, context) => {
1186
- if (output.statusCode >= 300) {
1187
- return de_UpdateRepositoryLinkCommandError(output, context);
1188
- }
1189
- const data = await parseBody(output.body, context);
1190
- let contents = {};
1191
- contents = (0, smithy_client_1._json)(data);
1192
- const response = {
1193
- $metadata: deserializeMetadata(output),
1194
- ...contents,
1195
- };
1196
- return response;
1197
- };
1198
- exports.de_UpdateRepositoryLinkCommand = de_UpdateRepositoryLinkCommand;
1199
- const de_UpdateRepositoryLinkCommandError = async (output, context) => {
1200
- const parsedOutput = {
1201
- ...output,
1202
- body: await parseErrorBody(output.body, context),
1203
- };
1204
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1205
- switch (errorCode) {
1206
- case "AccessDeniedException":
1207
- case "com.amazonaws.codestarconnections#AccessDeniedException":
1208
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1209
- case "ConditionalCheckFailedException":
1210
- case "com.amazonaws.codestarconnections#ConditionalCheckFailedException":
1211
- throw await de_ConditionalCheckFailedExceptionRes(parsedOutput, context);
1212
- case "InternalServerException":
1213
- case "com.amazonaws.codestarconnections#InternalServerException":
1214
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1215
- case "InvalidInputException":
1216
- case "com.amazonaws.codestarconnections#InvalidInputException":
1217
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1218
- case "ResourceNotFoundException":
1219
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
1220
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1221
- case "ThrottlingException":
1222
- case "com.amazonaws.codestarconnections#ThrottlingException":
1223
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1224
- case "UpdateOutOfSyncException":
1225
- case "com.amazonaws.codestarconnections#UpdateOutOfSyncException":
1226
- throw await de_UpdateOutOfSyncExceptionRes(parsedOutput, context);
1227
- default:
1228
- const parsedBody = parsedOutput.body;
1229
- return throwDefaultError({
1230
- output,
1231
- parsedBody,
1232
- errorCode,
1233
- });
1234
- }
1235
- };
1236
- const de_UpdateSyncBlockerCommand = async (output, context) => {
1237
- if (output.statusCode >= 300) {
1238
- return de_UpdateSyncBlockerCommandError(output, context);
1239
- }
1240
- const data = await parseBody(output.body, context);
1241
- let contents = {};
1242
- contents = de_UpdateSyncBlockerOutput(data, context);
1243
- const response = {
1244
- $metadata: deserializeMetadata(output),
1245
- ...contents,
1246
- };
1247
- return response;
1248
- };
1249
- exports.de_UpdateSyncBlockerCommand = de_UpdateSyncBlockerCommand;
1250
- const de_UpdateSyncBlockerCommandError = async (output, context) => {
1251
- const parsedOutput = {
1252
- ...output,
1253
- body: await parseErrorBody(output.body, context),
1254
- };
1255
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1256
- switch (errorCode) {
1257
- case "AccessDeniedException":
1258
- case "com.amazonaws.codestarconnections#AccessDeniedException":
1259
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1260
- case "InternalServerException":
1261
- case "com.amazonaws.codestarconnections#InternalServerException":
1262
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1263
- case "InvalidInputException":
1264
- case "com.amazonaws.codestarconnections#InvalidInputException":
1265
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1266
- case "ResourceNotFoundException":
1267
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
1268
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1269
- case "RetryLatestCommitFailedException":
1270
- case "com.amazonaws.codestarconnections#RetryLatestCommitFailedException":
1271
- throw await de_RetryLatestCommitFailedExceptionRes(parsedOutput, context);
1272
- case "SyncBlockerDoesNotExistException":
1273
- case "com.amazonaws.codestarconnections#SyncBlockerDoesNotExistException":
1274
- throw await de_SyncBlockerDoesNotExistExceptionRes(parsedOutput, context);
1275
- case "ThrottlingException":
1276
- case "com.amazonaws.codestarconnections#ThrottlingException":
1277
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1278
- default:
1279
- const parsedBody = parsedOutput.body;
1280
- return throwDefaultError({
1281
- output,
1282
- parsedBody,
1283
- errorCode,
1284
- });
1285
- }
1286
- };
1287
- const de_UpdateSyncConfigurationCommand = async (output, context) => {
1288
- if (output.statusCode >= 300) {
1289
- return de_UpdateSyncConfigurationCommandError(output, context);
1290
- }
1291
- const data = await parseBody(output.body, context);
1292
- let contents = {};
1293
- contents = (0, smithy_client_1._json)(data);
1294
- const response = {
1295
- $metadata: deserializeMetadata(output),
1296
- ...contents,
1297
- };
1298
- return response;
1299
- };
1300
- exports.de_UpdateSyncConfigurationCommand = de_UpdateSyncConfigurationCommand;
1301
- const de_UpdateSyncConfigurationCommandError = 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 "AccessDeniedException":
1309
- case "com.amazonaws.codestarconnections#AccessDeniedException":
1310
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1311
- case "ConcurrentModificationException":
1312
- case "com.amazonaws.codestarconnections#ConcurrentModificationException":
1313
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1314
- case "InternalServerException":
1315
- case "com.amazonaws.codestarconnections#InternalServerException":
1316
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1317
- case "InvalidInputException":
1318
- case "com.amazonaws.codestarconnections#InvalidInputException":
1319
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1320
- case "ResourceNotFoundException":
1321
- case "com.amazonaws.codestarconnections#ResourceNotFoundException":
1322
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1323
- case "ThrottlingException":
1324
- case "com.amazonaws.codestarconnections#ThrottlingException":
1325
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1326
- case "UpdateOutOfSyncException":
1327
- case "com.amazonaws.codestarconnections#UpdateOutOfSyncException":
1328
- throw await de_UpdateOutOfSyncExceptionRes(parsedOutput, context);
1329
- default:
1330
- const parsedBody = parsedOutput.body;
1331
- return throwDefaultError({
1332
- output,
1333
- parsedBody,
1334
- errorCode,
1335
- });
1336
- }
1337
- };
1338
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1339
- const body = parsedOutput.body;
1340
- const deserialized = (0, smithy_client_1._json)(body);
1341
- const exception = new models_0_1.AccessDeniedException({
1342
- $metadata: deserializeMetadata(parsedOutput),
1343
- ...deserialized,
1344
- });
1345
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1346
- };
1347
- const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
1348
- const body = parsedOutput.body;
1349
- const deserialized = (0, smithy_client_1._json)(body);
1350
- const exception = new models_0_1.ConcurrentModificationException({
1351
- $metadata: deserializeMetadata(parsedOutput),
1352
- ...deserialized,
1353
- });
1354
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1355
- };
1356
- const de_ConditionalCheckFailedExceptionRes = async (parsedOutput, context) => {
1357
- const body = parsedOutput.body;
1358
- const deserialized = (0, smithy_client_1._json)(body);
1359
- const exception = new models_0_1.ConditionalCheckFailedException({
1360
- $metadata: deserializeMetadata(parsedOutput),
1361
- ...deserialized,
1362
- });
1363
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1364
- };
1365
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
1366
- const body = parsedOutput.body;
1367
- const deserialized = (0, smithy_client_1._json)(body);
1368
- const exception = new models_0_1.ConflictException({
1369
- $metadata: deserializeMetadata(parsedOutput),
1370
- ...deserialized,
1371
- });
1372
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1373
- };
1374
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1375
- const body = parsedOutput.body;
1376
- const deserialized = (0, smithy_client_1._json)(body);
1377
- const exception = new models_0_1.InternalServerException({
1378
- $metadata: deserializeMetadata(parsedOutput),
1379
- ...deserialized,
1380
- });
1381
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1382
- };
1383
- const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
1384
- const body = parsedOutput.body;
1385
- const deserialized = (0, smithy_client_1._json)(body);
1386
- const exception = new models_0_1.InvalidInputException({
1387
- $metadata: deserializeMetadata(parsedOutput),
1388
- ...deserialized,
1389
- });
1390
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1391
- };
1392
- const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1393
- const body = parsedOutput.body;
1394
- const deserialized = (0, smithy_client_1._json)(body);
1395
- const exception = new models_0_1.LimitExceededException({
1396
- $metadata: deserializeMetadata(parsedOutput),
1397
- ...deserialized,
1398
- });
1399
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1400
- };
1401
- const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
1402
- const body = parsedOutput.body;
1403
- const deserialized = (0, smithy_client_1._json)(body);
1404
- const exception = new models_0_1.ResourceAlreadyExistsException({
1405
- $metadata: deserializeMetadata(parsedOutput),
1406
- ...deserialized,
1407
- });
1408
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1409
- };
1410
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1411
- const body = parsedOutput.body;
1412
- const deserialized = (0, smithy_client_1._json)(body);
1413
- const exception = new models_0_1.ResourceNotFoundException({
1414
- $metadata: deserializeMetadata(parsedOutput),
1415
- ...deserialized,
1416
- });
1417
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1418
- };
1419
- const de_ResourceUnavailableExceptionRes = async (parsedOutput, context) => {
1420
- const body = parsedOutput.body;
1421
- const deserialized = (0, smithy_client_1._json)(body);
1422
- const exception = new models_0_1.ResourceUnavailableException({
1423
- $metadata: deserializeMetadata(parsedOutput),
1424
- ...deserialized,
1425
- });
1426
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1427
- };
1428
- const de_RetryLatestCommitFailedExceptionRes = async (parsedOutput, context) => {
1429
- const body = parsedOutput.body;
1430
- const deserialized = (0, smithy_client_1._json)(body);
1431
- const exception = new models_0_1.RetryLatestCommitFailedException({
1432
- $metadata: deserializeMetadata(parsedOutput),
1433
- ...deserialized,
1434
- });
1435
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1436
- };
1437
- const de_SyncBlockerDoesNotExistExceptionRes = async (parsedOutput, context) => {
1438
- const body = parsedOutput.body;
1439
- const deserialized = (0, smithy_client_1._json)(body);
1440
- const exception = new models_0_1.SyncBlockerDoesNotExistException({
1441
- $metadata: deserializeMetadata(parsedOutput),
1442
- ...deserialized,
1443
- });
1444
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1445
- };
1446
- const de_SyncConfigurationStillExistsExceptionRes = async (parsedOutput, context) => {
1447
- const body = parsedOutput.body;
1448
- const deserialized = (0, smithy_client_1._json)(body);
1449
- const exception = new models_0_1.SyncConfigurationStillExistsException({
1450
- $metadata: deserializeMetadata(parsedOutput),
1451
- ...deserialized,
1452
- });
1453
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1454
- };
1455
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1456
- const body = parsedOutput.body;
1457
- const deserialized = (0, smithy_client_1._json)(body);
1458
- const exception = new models_0_1.ThrottlingException({
1459
- $metadata: deserializeMetadata(parsedOutput),
1460
- ...deserialized,
1461
- });
1462
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1463
- };
1464
- const de_UnsupportedOperationExceptionRes = async (parsedOutput, context) => {
1465
- const body = parsedOutput.body;
1466
- const deserialized = (0, smithy_client_1._json)(body);
1467
- const exception = new models_0_1.UnsupportedOperationException({
1468
- $metadata: deserializeMetadata(parsedOutput),
1469
- ...deserialized,
1470
- });
1471
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1472
- };
1473
- const de_UnsupportedProviderTypeExceptionRes = async (parsedOutput, context) => {
1474
- const body = parsedOutput.body;
1475
- const deserialized = (0, smithy_client_1._json)(body);
1476
- const exception = new models_0_1.UnsupportedProviderTypeException({
1477
- $metadata: deserializeMetadata(parsedOutput),
1478
- ...deserialized,
1479
- });
1480
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1481
- };
1482
- const de_UpdateOutOfSyncExceptionRes = async (parsedOutput, context) => {
1483
- const body = parsedOutput.body;
1484
- const deserialized = (0, smithy_client_1._json)(body);
1485
- const exception = new models_0_1.UpdateOutOfSyncException({
1486
- $metadata: deserializeMetadata(parsedOutput),
1487
- ...deserialized,
1488
- });
1489
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1490
- };
1491
- const de_GetRepositorySyncStatusOutput = (output, context) => {
1492
- return (0, smithy_client_1.take)(output, {
1493
- LatestSync: (_) => de_RepositorySyncAttempt(_, context),
1494
- });
1495
- };
1496
- const de_GetResourceSyncStatusOutput = (output, context) => {
1497
- return (0, smithy_client_1.take)(output, {
1498
- DesiredState: smithy_client_1._json,
1499
- LatestSuccessfulSync: (_) => de_ResourceSyncAttempt(_, context),
1500
- LatestSync: (_) => de_ResourceSyncAttempt(_, context),
1501
- });
1502
- };
1503
- const de_GetSyncBlockerSummaryOutput = (output, context) => {
1504
- return (0, smithy_client_1.take)(output, {
1505
- SyncBlockerSummary: (_) => de_SyncBlockerSummary(_, context),
1506
- });
1507
- };
1508
- const de_LatestSyncBlockerList = (output, context) => {
1509
- const retVal = (output || [])
1510
- .filter((e) => e != null)
1511
- .map((entry) => {
1512
- return de_SyncBlocker(entry, context);
1513
- });
1514
- return retVal;
1515
- };
1516
- const de_RepositorySyncAttempt = (output, context) => {
1517
- return (0, smithy_client_1.take)(output, {
1518
- Events: (_) => de_RepositorySyncEventList(_, context),
1519
- StartedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1520
- Status: smithy_client_1.expectString,
1521
- });
1522
- };
1523
- const de_RepositorySyncEvent = (output, context) => {
1524
- return (0, smithy_client_1.take)(output, {
1525
- Event: smithy_client_1.expectString,
1526
- ExternalId: smithy_client_1.expectString,
1527
- Time: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1528
- Type: smithy_client_1.expectString,
1529
- });
1530
- };
1531
- const de_RepositorySyncEventList = (output, context) => {
1532
- const retVal = (output || [])
1533
- .filter((e) => e != null)
1534
- .map((entry) => {
1535
- return de_RepositorySyncEvent(entry, context);
1536
- });
1537
- return retVal;
1538
- };
1539
- const de_ResourceSyncAttempt = (output, context) => {
1540
- return (0, smithy_client_1.take)(output, {
1541
- Events: (_) => de_ResourceSyncEventList(_, context),
1542
- InitialRevision: smithy_client_1._json,
1543
- StartedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1544
- Status: smithy_client_1.expectString,
1545
- Target: smithy_client_1.expectString,
1546
- TargetRevision: smithy_client_1._json,
1547
- });
1548
- };
1549
- const de_ResourceSyncEvent = (output, context) => {
1550
- return (0, smithy_client_1.take)(output, {
1551
- Event: smithy_client_1.expectString,
1552
- ExternalId: smithy_client_1.expectString,
1553
- Time: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1554
- Type: smithy_client_1.expectString,
1555
- });
1556
- };
1557
- const de_ResourceSyncEventList = (output, context) => {
1558
- const retVal = (output || [])
1559
- .filter((e) => e != null)
1560
- .map((entry) => {
1561
- return de_ResourceSyncEvent(entry, context);
1562
- });
1563
- return retVal;
1564
- };
1565
- const de_SyncBlocker = (output, context) => {
1566
- return (0, smithy_client_1.take)(output, {
1567
- Contexts: smithy_client_1._json,
1568
- CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1569
- CreatedReason: smithy_client_1.expectString,
1570
- Id: smithy_client_1.expectString,
1571
- ResolvedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1572
- ResolvedReason: smithy_client_1.expectString,
1573
- Status: smithy_client_1.expectString,
1574
- Type: smithy_client_1.expectString,
1575
- });
1576
- };
1577
- const de_SyncBlockerSummary = (output, context) => {
1578
- return (0, smithy_client_1.take)(output, {
1579
- LatestBlockers: (_) => de_LatestSyncBlockerList(_, context),
1580
- ParentResourceName: smithy_client_1.expectString,
1581
- ResourceName: smithy_client_1.expectString,
1582
- });
1583
- };
1584
- const de_UpdateSyncBlockerOutput = (output, context) => {
1585
- return (0, smithy_client_1.take)(output, {
1586
- ParentResourceName: smithy_client_1.expectString,
1587
- ResourceName: smithy_client_1.expectString,
1588
- SyncBlocker: (_) => de_SyncBlocker(_, context),
1589
- });
1590
- };
1591
- const deserializeMetadata = (output) => ({
1592
- httpStatusCode: output.statusCode,
1593
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1594
- extendedRequestId: output.headers["x-amz-id-2"],
1595
- cfId: output.headers["x-amz-cf-id"],
1596
- });
1597
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
1598
- const throwDefaultError = (0, smithy_client_1.withBaseException)(CodeStarConnectionsServiceException_1.CodeStarConnectionsServiceException);
1599
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1600
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1601
- const contents = {
1602
- protocol,
1603
- hostname,
1604
- port,
1605
- method: "POST",
1606
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1607
- headers,
1608
- };
1609
- if (resolvedHostname !== undefined) {
1610
- contents.hostname = resolvedHostname;
1611
- }
1612
- if (body !== undefined) {
1613
- contents.body = body;
1614
- }
1615
- return new protocol_http_1.HttpRequest(contents);
1616
- };
1617
- function sharedHeaders(operation) {
1618
- return {
1619
- "content-type": "application/x-amz-json-1.0",
1620
- "x-amz-target": `CodeStar_connections_20191201.${operation}`,
1621
- };
1622
- }
1623
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1624
- if (encoded.length) {
1625
- return JSON.parse(encoded);
1626
- }
1627
- return {};
1628
- });
1629
- const parseErrorBody = async (errorBody, context) => {
1630
- const value = await parseBody(errorBody, context);
1631
- value.message = value.message ?? value.Message;
1632
- return value;
1633
- };
1634
- const loadRestJsonErrorCode = (output, data) => {
1635
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1636
- const sanitizeErrorCode = (rawValue) => {
1637
- let cleanValue = rawValue;
1638
- if (typeof cleanValue === "number") {
1639
- cleanValue = cleanValue.toString();
1640
- }
1641
- if (cleanValue.indexOf(",") >= 0) {
1642
- cleanValue = cleanValue.split(",")[0];
1643
- }
1644
- if (cleanValue.indexOf(":") >= 0) {
1645
- cleanValue = cleanValue.split(":")[0];
1646
- }
1647
- if (cleanValue.indexOf("#") >= 0) {
1648
- cleanValue = cleanValue.split("#")[1];
1649
- }
1650
- return cleanValue;
1651
- };
1652
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1653
- if (headerKey !== undefined) {
1654
- return sanitizeErrorCode(output.headers[headerKey]);
1655
- }
1656
- if (data.code !== undefined) {
1657
- return sanitizeErrorCode(data.code);
1658
- }
1659
- if (data["__type"] !== undefined) {
1660
- return sanitizeErrorCode(data["__type"]);
1661
- }
1662
- };
1
+ module.exports = require("../index.js");