@aws-sdk/client-codepipeline 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 (59) hide show
  1. package/dist-cjs/CodePipeline.js +1 -89
  2. package/dist-cjs/CodePipelineClient.js +1 -43
  3. package/dist-cjs/commands/AcknowledgeJobCommand.js +1 -28
  4. package/dist-cjs/commands/AcknowledgeThirdPartyJobCommand.js +1 -28
  5. package/dist-cjs/commands/CreateCustomActionTypeCommand.js +1 -28
  6. package/dist-cjs/commands/CreatePipelineCommand.js +1 -28
  7. package/dist-cjs/commands/DeleteCustomActionTypeCommand.js +1 -28
  8. package/dist-cjs/commands/DeletePipelineCommand.js +1 -28
  9. package/dist-cjs/commands/DeleteWebhookCommand.js +1 -28
  10. package/dist-cjs/commands/DeregisterWebhookWithThirdPartyCommand.js +1 -28
  11. package/dist-cjs/commands/DisableStageTransitionCommand.js +1 -28
  12. package/dist-cjs/commands/EnableStageTransitionCommand.js +1 -28
  13. package/dist-cjs/commands/GetActionTypeCommand.js +1 -28
  14. package/dist-cjs/commands/GetJobDetailsCommand.js +1 -29
  15. package/dist-cjs/commands/GetPipelineCommand.js +1 -28
  16. package/dist-cjs/commands/GetPipelineExecutionCommand.js +1 -28
  17. package/dist-cjs/commands/GetPipelineStateCommand.js +1 -28
  18. package/dist-cjs/commands/GetThirdPartyJobDetailsCommand.js +1 -29
  19. package/dist-cjs/commands/ListActionExecutionsCommand.js +1 -28
  20. package/dist-cjs/commands/ListActionTypesCommand.js +1 -28
  21. package/dist-cjs/commands/ListPipelineExecutionsCommand.js +1 -28
  22. package/dist-cjs/commands/ListPipelinesCommand.js +1 -28
  23. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  24. package/dist-cjs/commands/ListWebhooksCommand.js +1 -28
  25. package/dist-cjs/commands/PollForJobsCommand.js +1 -29
  26. package/dist-cjs/commands/PollForThirdPartyJobsCommand.js +1 -28
  27. package/dist-cjs/commands/PutActionRevisionCommand.js +1 -28
  28. package/dist-cjs/commands/PutApprovalResultCommand.js +1 -28
  29. package/dist-cjs/commands/PutJobFailureResultCommand.js +1 -28
  30. package/dist-cjs/commands/PutJobSuccessResultCommand.js +1 -28
  31. package/dist-cjs/commands/PutThirdPartyJobFailureResultCommand.js +1 -28
  32. package/dist-cjs/commands/PutThirdPartyJobSuccessResultCommand.js +1 -28
  33. package/dist-cjs/commands/PutWebhookCommand.js +1 -28
  34. package/dist-cjs/commands/RegisterWebhookWithThirdPartyCommand.js +1 -28
  35. package/dist-cjs/commands/RetryStageExecutionCommand.js +1 -28
  36. package/dist-cjs/commands/StartPipelineExecutionCommand.js +1 -28
  37. package/dist-cjs/commands/StopPipelineExecutionCommand.js +1 -28
  38. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  39. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  40. package/dist-cjs/commands/UpdateActionTypeCommand.js +1 -28
  41. package/dist-cjs/commands/UpdatePipelineCommand.js +1 -28
  42. package/dist-cjs/commands/index.js +1 -42
  43. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  44. package/dist-cjs/extensionConfiguration.js +1 -2
  45. package/dist-cjs/index.js +4299 -11
  46. package/dist-cjs/models/CodePipelineServiceException.js +1 -12
  47. package/dist-cjs/models/index.js +1 -4
  48. package/dist-cjs/models/models_0.js +1 -633
  49. package/dist-cjs/pagination/Interfaces.js +1 -2
  50. package/dist-cjs/pagination/ListActionExecutionsPaginator.js +1 -7
  51. package/dist-cjs/pagination/ListActionTypesPaginator.js +1 -7
  52. package/dist-cjs/pagination/ListPipelineExecutionsPaginator.js +1 -7
  53. package/dist-cjs/pagination/ListPipelinesPaginator.js +1 -7
  54. package/dist-cjs/pagination/ListTagsForResourcePaginator.js +1 -7
  55. package/dist-cjs/pagination/ListWebhooksPaginator.js +1 -7
  56. package/dist-cjs/pagination/index.js +1 -10
  57. package/dist-cjs/protocols/Aws_json1_1.js +1 -2528
  58. package/dist-cjs/runtimeExtensions.js +1 -22
  59. package/package.json +40 -40
@@ -1,2528 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_GetActionTypeCommand = exports.de_EnableStageTransitionCommand = exports.de_DisableStageTransitionCommand = exports.de_DeregisterWebhookWithThirdPartyCommand = exports.de_DeleteWebhookCommand = exports.de_DeletePipelineCommand = exports.de_DeleteCustomActionTypeCommand = exports.de_CreatePipelineCommand = exports.de_CreateCustomActionTypeCommand = exports.de_AcknowledgeThirdPartyJobCommand = exports.de_AcknowledgeJobCommand = exports.se_UpdatePipelineCommand = exports.se_UpdateActionTypeCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopPipelineExecutionCommand = exports.se_StartPipelineExecutionCommand = exports.se_RetryStageExecutionCommand = exports.se_RegisterWebhookWithThirdPartyCommand = exports.se_PutWebhookCommand = exports.se_PutThirdPartyJobSuccessResultCommand = exports.se_PutThirdPartyJobFailureResultCommand = exports.se_PutJobSuccessResultCommand = exports.se_PutJobFailureResultCommand = exports.se_PutApprovalResultCommand = exports.se_PutActionRevisionCommand = exports.se_PollForThirdPartyJobsCommand = exports.se_PollForJobsCommand = exports.se_ListWebhooksCommand = exports.se_ListTagsForResourceCommand = exports.se_ListPipelinesCommand = exports.se_ListPipelineExecutionsCommand = exports.se_ListActionTypesCommand = exports.se_ListActionExecutionsCommand = exports.se_GetThirdPartyJobDetailsCommand = exports.se_GetPipelineStateCommand = exports.se_GetPipelineExecutionCommand = exports.se_GetPipelineCommand = exports.se_GetJobDetailsCommand = exports.se_GetActionTypeCommand = exports.se_EnableStageTransitionCommand = exports.se_DisableStageTransitionCommand = exports.se_DeregisterWebhookWithThirdPartyCommand = exports.se_DeleteWebhookCommand = exports.se_DeletePipelineCommand = exports.se_DeleteCustomActionTypeCommand = exports.se_CreatePipelineCommand = exports.se_CreateCustomActionTypeCommand = exports.se_AcknowledgeThirdPartyJobCommand = exports.se_AcknowledgeJobCommand = void 0;
4
- exports.de_UpdatePipelineCommand = exports.de_UpdateActionTypeCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopPipelineExecutionCommand = exports.de_StartPipelineExecutionCommand = exports.de_RetryStageExecutionCommand = exports.de_RegisterWebhookWithThirdPartyCommand = exports.de_PutWebhookCommand = exports.de_PutThirdPartyJobSuccessResultCommand = exports.de_PutThirdPartyJobFailureResultCommand = exports.de_PutJobSuccessResultCommand = exports.de_PutJobFailureResultCommand = exports.de_PutApprovalResultCommand = exports.de_PutActionRevisionCommand = exports.de_PollForThirdPartyJobsCommand = exports.de_PollForJobsCommand = exports.de_ListWebhooksCommand = exports.de_ListTagsForResourceCommand = exports.de_ListPipelinesCommand = exports.de_ListPipelineExecutionsCommand = exports.de_ListActionTypesCommand = exports.de_ListActionExecutionsCommand = exports.de_GetThirdPartyJobDetailsCommand = exports.de_GetPipelineStateCommand = exports.de_GetPipelineExecutionCommand = exports.de_GetPipelineCommand = exports.de_GetJobDetailsCommand = void 0;
5
- const protocol_http_1 = require("@smithy/protocol-http");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const uuid_1 = require("uuid");
8
- const CodePipelineServiceException_1 = require("../models/CodePipelineServiceException");
9
- const models_0_1 = require("../models/models_0");
10
- const se_AcknowledgeJobCommand = async (input, context) => {
11
- const headers = sharedHeaders("AcknowledgeJob");
12
- let body;
13
- body = JSON.stringify((0, smithy_client_1._json)(input));
14
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
15
- };
16
- exports.se_AcknowledgeJobCommand = se_AcknowledgeJobCommand;
17
- const se_AcknowledgeThirdPartyJobCommand = async (input, context) => {
18
- const headers = sharedHeaders("AcknowledgeThirdPartyJob");
19
- let body;
20
- body = JSON.stringify((0, smithy_client_1._json)(input));
21
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
- };
23
- exports.se_AcknowledgeThirdPartyJobCommand = se_AcknowledgeThirdPartyJobCommand;
24
- const se_CreateCustomActionTypeCommand = async (input, context) => {
25
- const headers = sharedHeaders("CreateCustomActionType");
26
- let body;
27
- body = JSON.stringify((0, smithy_client_1._json)(input));
28
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
- };
30
- exports.se_CreateCustomActionTypeCommand = se_CreateCustomActionTypeCommand;
31
- const se_CreatePipelineCommand = async (input, context) => {
32
- const headers = sharedHeaders("CreatePipeline");
33
- let body;
34
- body = JSON.stringify((0, smithy_client_1._json)(input));
35
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
36
- };
37
- exports.se_CreatePipelineCommand = se_CreatePipelineCommand;
38
- const se_DeleteCustomActionTypeCommand = async (input, context) => {
39
- const headers = sharedHeaders("DeleteCustomActionType");
40
- let body;
41
- body = JSON.stringify((0, smithy_client_1._json)(input));
42
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
43
- };
44
- exports.se_DeleteCustomActionTypeCommand = se_DeleteCustomActionTypeCommand;
45
- const se_DeletePipelineCommand = async (input, context) => {
46
- const headers = sharedHeaders("DeletePipeline");
47
- let body;
48
- body = JSON.stringify((0, smithy_client_1._json)(input));
49
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
50
- };
51
- exports.se_DeletePipelineCommand = se_DeletePipelineCommand;
52
- const se_DeleteWebhookCommand = async (input, context) => {
53
- const headers = sharedHeaders("DeleteWebhook");
54
- let body;
55
- body = JSON.stringify((0, smithy_client_1._json)(input));
56
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
57
- };
58
- exports.se_DeleteWebhookCommand = se_DeleteWebhookCommand;
59
- const se_DeregisterWebhookWithThirdPartyCommand = async (input, context) => {
60
- const headers = sharedHeaders("DeregisterWebhookWithThirdParty");
61
- let body;
62
- body = JSON.stringify((0, smithy_client_1._json)(input));
63
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
64
- };
65
- exports.se_DeregisterWebhookWithThirdPartyCommand = se_DeregisterWebhookWithThirdPartyCommand;
66
- const se_DisableStageTransitionCommand = async (input, context) => {
67
- const headers = sharedHeaders("DisableStageTransition");
68
- let body;
69
- body = JSON.stringify((0, smithy_client_1._json)(input));
70
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
71
- };
72
- exports.se_DisableStageTransitionCommand = se_DisableStageTransitionCommand;
73
- const se_EnableStageTransitionCommand = async (input, context) => {
74
- const headers = sharedHeaders("EnableStageTransition");
75
- let body;
76
- body = JSON.stringify((0, smithy_client_1._json)(input));
77
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
78
- };
79
- exports.se_EnableStageTransitionCommand = se_EnableStageTransitionCommand;
80
- const se_GetActionTypeCommand = async (input, context) => {
81
- const headers = sharedHeaders("GetActionType");
82
- let body;
83
- body = JSON.stringify((0, smithy_client_1._json)(input));
84
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
- };
86
- exports.se_GetActionTypeCommand = se_GetActionTypeCommand;
87
- const se_GetJobDetailsCommand = async (input, context) => {
88
- const headers = sharedHeaders("GetJobDetails");
89
- let body;
90
- body = JSON.stringify((0, smithy_client_1._json)(input));
91
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
92
- };
93
- exports.se_GetJobDetailsCommand = se_GetJobDetailsCommand;
94
- const se_GetPipelineCommand = async (input, context) => {
95
- const headers = sharedHeaders("GetPipeline");
96
- let body;
97
- body = JSON.stringify((0, smithy_client_1._json)(input));
98
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
99
- };
100
- exports.se_GetPipelineCommand = se_GetPipelineCommand;
101
- const se_GetPipelineExecutionCommand = async (input, context) => {
102
- const headers = sharedHeaders("GetPipelineExecution");
103
- let body;
104
- body = JSON.stringify((0, smithy_client_1._json)(input));
105
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
106
- };
107
- exports.se_GetPipelineExecutionCommand = se_GetPipelineExecutionCommand;
108
- const se_GetPipelineStateCommand = async (input, context) => {
109
- const headers = sharedHeaders("GetPipelineState");
110
- let body;
111
- body = JSON.stringify((0, smithy_client_1._json)(input));
112
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
- };
114
- exports.se_GetPipelineStateCommand = se_GetPipelineStateCommand;
115
- const se_GetThirdPartyJobDetailsCommand = async (input, context) => {
116
- const headers = sharedHeaders("GetThirdPartyJobDetails");
117
- let body;
118
- body = JSON.stringify((0, smithy_client_1._json)(input));
119
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
120
- };
121
- exports.se_GetThirdPartyJobDetailsCommand = se_GetThirdPartyJobDetailsCommand;
122
- const se_ListActionExecutionsCommand = async (input, context) => {
123
- const headers = sharedHeaders("ListActionExecutions");
124
- let body;
125
- body = JSON.stringify((0, smithy_client_1._json)(input));
126
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
127
- };
128
- exports.se_ListActionExecutionsCommand = se_ListActionExecutionsCommand;
129
- const se_ListActionTypesCommand = async (input, context) => {
130
- const headers = sharedHeaders("ListActionTypes");
131
- let body;
132
- body = JSON.stringify((0, smithy_client_1._json)(input));
133
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
134
- };
135
- exports.se_ListActionTypesCommand = se_ListActionTypesCommand;
136
- const se_ListPipelineExecutionsCommand = async (input, context) => {
137
- const headers = sharedHeaders("ListPipelineExecutions");
138
- let body;
139
- body = JSON.stringify((0, smithy_client_1._json)(input));
140
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
141
- };
142
- exports.se_ListPipelineExecutionsCommand = se_ListPipelineExecutionsCommand;
143
- const se_ListPipelinesCommand = async (input, context) => {
144
- const headers = sharedHeaders("ListPipelines");
145
- let body;
146
- body = JSON.stringify((0, smithy_client_1._json)(input));
147
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
- };
149
- exports.se_ListPipelinesCommand = se_ListPipelinesCommand;
150
- const se_ListTagsForResourceCommand = async (input, context) => {
151
- const headers = sharedHeaders("ListTagsForResource");
152
- let body;
153
- body = JSON.stringify((0, smithy_client_1._json)(input));
154
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
155
- };
156
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
157
- const se_ListWebhooksCommand = async (input, context) => {
158
- const headers = sharedHeaders("ListWebhooks");
159
- let body;
160
- body = JSON.stringify((0, smithy_client_1._json)(input));
161
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
162
- };
163
- exports.se_ListWebhooksCommand = se_ListWebhooksCommand;
164
- const se_PollForJobsCommand = async (input, context) => {
165
- const headers = sharedHeaders("PollForJobs");
166
- let body;
167
- body = JSON.stringify((0, smithy_client_1._json)(input));
168
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
169
- };
170
- exports.se_PollForJobsCommand = se_PollForJobsCommand;
171
- const se_PollForThirdPartyJobsCommand = async (input, context) => {
172
- const headers = sharedHeaders("PollForThirdPartyJobs");
173
- let body;
174
- body = JSON.stringify((0, smithy_client_1._json)(input));
175
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
176
- };
177
- exports.se_PollForThirdPartyJobsCommand = se_PollForThirdPartyJobsCommand;
178
- const se_PutActionRevisionCommand = async (input, context) => {
179
- const headers = sharedHeaders("PutActionRevision");
180
- let body;
181
- body = JSON.stringify(se_PutActionRevisionInput(input, context));
182
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
183
- };
184
- exports.se_PutActionRevisionCommand = se_PutActionRevisionCommand;
185
- const se_PutApprovalResultCommand = async (input, context) => {
186
- const headers = sharedHeaders("PutApprovalResult");
187
- let body;
188
- body = JSON.stringify((0, smithy_client_1._json)(input));
189
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
190
- };
191
- exports.se_PutApprovalResultCommand = se_PutApprovalResultCommand;
192
- const se_PutJobFailureResultCommand = async (input, context) => {
193
- const headers = sharedHeaders("PutJobFailureResult");
194
- let body;
195
- body = JSON.stringify((0, smithy_client_1._json)(input));
196
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
197
- };
198
- exports.se_PutJobFailureResultCommand = se_PutJobFailureResultCommand;
199
- const se_PutJobSuccessResultCommand = async (input, context) => {
200
- const headers = sharedHeaders("PutJobSuccessResult");
201
- let body;
202
- body = JSON.stringify(se_PutJobSuccessResultInput(input, context));
203
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
204
- };
205
- exports.se_PutJobSuccessResultCommand = se_PutJobSuccessResultCommand;
206
- const se_PutThirdPartyJobFailureResultCommand = async (input, context) => {
207
- const headers = sharedHeaders("PutThirdPartyJobFailureResult");
208
- let body;
209
- body = JSON.stringify((0, smithy_client_1._json)(input));
210
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
211
- };
212
- exports.se_PutThirdPartyJobFailureResultCommand = se_PutThirdPartyJobFailureResultCommand;
213
- const se_PutThirdPartyJobSuccessResultCommand = async (input, context) => {
214
- const headers = sharedHeaders("PutThirdPartyJobSuccessResult");
215
- let body;
216
- body = JSON.stringify(se_PutThirdPartyJobSuccessResultInput(input, context));
217
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
218
- };
219
- exports.se_PutThirdPartyJobSuccessResultCommand = se_PutThirdPartyJobSuccessResultCommand;
220
- const se_PutWebhookCommand = async (input, context) => {
221
- const headers = sharedHeaders("PutWebhook");
222
- let body;
223
- body = JSON.stringify((0, smithy_client_1._json)(input));
224
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
225
- };
226
- exports.se_PutWebhookCommand = se_PutWebhookCommand;
227
- const se_RegisterWebhookWithThirdPartyCommand = async (input, context) => {
228
- const headers = sharedHeaders("RegisterWebhookWithThirdParty");
229
- let body;
230
- body = JSON.stringify((0, smithy_client_1._json)(input));
231
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
232
- };
233
- exports.se_RegisterWebhookWithThirdPartyCommand = se_RegisterWebhookWithThirdPartyCommand;
234
- const se_RetryStageExecutionCommand = async (input, context) => {
235
- const headers = sharedHeaders("RetryStageExecution");
236
- let body;
237
- body = JSON.stringify((0, smithy_client_1._json)(input));
238
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
239
- };
240
- exports.se_RetryStageExecutionCommand = se_RetryStageExecutionCommand;
241
- const se_StartPipelineExecutionCommand = async (input, context) => {
242
- const headers = sharedHeaders("StartPipelineExecution");
243
- let body;
244
- body = JSON.stringify(se_StartPipelineExecutionInput(input, context));
245
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
246
- };
247
- exports.se_StartPipelineExecutionCommand = se_StartPipelineExecutionCommand;
248
- const se_StopPipelineExecutionCommand = async (input, context) => {
249
- const headers = sharedHeaders("StopPipelineExecution");
250
- let body;
251
- body = JSON.stringify((0, smithy_client_1._json)(input));
252
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
253
- };
254
- exports.se_StopPipelineExecutionCommand = se_StopPipelineExecutionCommand;
255
- const se_TagResourceCommand = async (input, context) => {
256
- const headers = sharedHeaders("TagResource");
257
- let body;
258
- body = JSON.stringify((0, smithy_client_1._json)(input));
259
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
260
- };
261
- exports.se_TagResourceCommand = se_TagResourceCommand;
262
- const se_UntagResourceCommand = async (input, context) => {
263
- const headers = sharedHeaders("UntagResource");
264
- let body;
265
- body = JSON.stringify((0, smithy_client_1._json)(input));
266
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
267
- };
268
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
269
- const se_UpdateActionTypeCommand = async (input, context) => {
270
- const headers = sharedHeaders("UpdateActionType");
271
- let body;
272
- body = JSON.stringify((0, smithy_client_1._json)(input));
273
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
274
- };
275
- exports.se_UpdateActionTypeCommand = se_UpdateActionTypeCommand;
276
- const se_UpdatePipelineCommand = async (input, context) => {
277
- const headers = sharedHeaders("UpdatePipeline");
278
- let body;
279
- body = JSON.stringify((0, smithy_client_1._json)(input));
280
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
281
- };
282
- exports.se_UpdatePipelineCommand = se_UpdatePipelineCommand;
283
- const de_AcknowledgeJobCommand = async (output, context) => {
284
- if (output.statusCode >= 300) {
285
- return de_AcknowledgeJobCommandError(output, context);
286
- }
287
- const data = await parseBody(output.body, context);
288
- let contents = {};
289
- contents = (0, smithy_client_1._json)(data);
290
- const response = {
291
- $metadata: deserializeMetadata(output),
292
- ...contents,
293
- };
294
- return response;
295
- };
296
- exports.de_AcknowledgeJobCommand = de_AcknowledgeJobCommand;
297
- const de_AcknowledgeJobCommandError = async (output, context) => {
298
- const parsedOutput = {
299
- ...output,
300
- body: await parseErrorBody(output.body, context),
301
- };
302
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
303
- switch (errorCode) {
304
- case "InvalidNonceException":
305
- case "com.amazonaws.codepipeline#InvalidNonceException":
306
- throw await de_InvalidNonceExceptionRes(parsedOutput, context);
307
- case "JobNotFoundException":
308
- case "com.amazonaws.codepipeline#JobNotFoundException":
309
- throw await de_JobNotFoundExceptionRes(parsedOutput, context);
310
- case "ValidationException":
311
- case "com.amazonaws.codepipeline#ValidationException":
312
- throw await de_ValidationExceptionRes(parsedOutput, context);
313
- default:
314
- const parsedBody = parsedOutput.body;
315
- return throwDefaultError({
316
- output,
317
- parsedBody,
318
- errorCode,
319
- });
320
- }
321
- };
322
- const de_AcknowledgeThirdPartyJobCommand = async (output, context) => {
323
- if (output.statusCode >= 300) {
324
- return de_AcknowledgeThirdPartyJobCommandError(output, context);
325
- }
326
- const data = await parseBody(output.body, context);
327
- let contents = {};
328
- contents = (0, smithy_client_1._json)(data);
329
- const response = {
330
- $metadata: deserializeMetadata(output),
331
- ...contents,
332
- };
333
- return response;
334
- };
335
- exports.de_AcknowledgeThirdPartyJobCommand = de_AcknowledgeThirdPartyJobCommand;
336
- const de_AcknowledgeThirdPartyJobCommandError = async (output, context) => {
337
- const parsedOutput = {
338
- ...output,
339
- body: await parseErrorBody(output.body, context),
340
- };
341
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
342
- switch (errorCode) {
343
- case "InvalidClientTokenException":
344
- case "com.amazonaws.codepipeline#InvalidClientTokenException":
345
- throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
346
- case "InvalidNonceException":
347
- case "com.amazonaws.codepipeline#InvalidNonceException":
348
- throw await de_InvalidNonceExceptionRes(parsedOutput, context);
349
- case "JobNotFoundException":
350
- case "com.amazonaws.codepipeline#JobNotFoundException":
351
- throw await de_JobNotFoundExceptionRes(parsedOutput, context);
352
- case "ValidationException":
353
- case "com.amazonaws.codepipeline#ValidationException":
354
- throw await de_ValidationExceptionRes(parsedOutput, context);
355
- default:
356
- const parsedBody = parsedOutput.body;
357
- return throwDefaultError({
358
- output,
359
- parsedBody,
360
- errorCode,
361
- });
362
- }
363
- };
364
- const de_CreateCustomActionTypeCommand = async (output, context) => {
365
- if (output.statusCode >= 300) {
366
- return de_CreateCustomActionTypeCommandError(output, context);
367
- }
368
- const data = await parseBody(output.body, context);
369
- let contents = {};
370
- contents = (0, smithy_client_1._json)(data);
371
- const response = {
372
- $metadata: deserializeMetadata(output),
373
- ...contents,
374
- };
375
- return response;
376
- };
377
- exports.de_CreateCustomActionTypeCommand = de_CreateCustomActionTypeCommand;
378
- const de_CreateCustomActionTypeCommandError = async (output, context) => {
379
- const parsedOutput = {
380
- ...output,
381
- body: await parseErrorBody(output.body, context),
382
- };
383
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
384
- switch (errorCode) {
385
- case "ConcurrentModificationException":
386
- case "com.amazonaws.codepipeline#ConcurrentModificationException":
387
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
388
- case "InvalidTagsException":
389
- case "com.amazonaws.codepipeline#InvalidTagsException":
390
- throw await de_InvalidTagsExceptionRes(parsedOutput, context);
391
- case "LimitExceededException":
392
- case "com.amazonaws.codepipeline#LimitExceededException":
393
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
394
- case "TooManyTagsException":
395
- case "com.amazonaws.codepipeline#TooManyTagsException":
396
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
397
- case "ValidationException":
398
- case "com.amazonaws.codepipeline#ValidationException":
399
- throw await de_ValidationExceptionRes(parsedOutput, context);
400
- default:
401
- const parsedBody = parsedOutput.body;
402
- return throwDefaultError({
403
- output,
404
- parsedBody,
405
- errorCode,
406
- });
407
- }
408
- };
409
- const de_CreatePipelineCommand = async (output, context) => {
410
- if (output.statusCode >= 300) {
411
- return de_CreatePipelineCommandError(output, context);
412
- }
413
- const data = await parseBody(output.body, context);
414
- let contents = {};
415
- contents = (0, smithy_client_1._json)(data);
416
- const response = {
417
- $metadata: deserializeMetadata(output),
418
- ...contents,
419
- };
420
- return response;
421
- };
422
- exports.de_CreatePipelineCommand = de_CreatePipelineCommand;
423
- const de_CreatePipelineCommandError = async (output, context) => {
424
- const parsedOutput = {
425
- ...output,
426
- body: await parseErrorBody(output.body, context),
427
- };
428
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
429
- switch (errorCode) {
430
- case "ConcurrentModificationException":
431
- case "com.amazonaws.codepipeline#ConcurrentModificationException":
432
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
433
- case "InvalidActionDeclarationException":
434
- case "com.amazonaws.codepipeline#InvalidActionDeclarationException":
435
- throw await de_InvalidActionDeclarationExceptionRes(parsedOutput, context);
436
- case "InvalidBlockerDeclarationException":
437
- case "com.amazonaws.codepipeline#InvalidBlockerDeclarationException":
438
- throw await de_InvalidBlockerDeclarationExceptionRes(parsedOutput, context);
439
- case "InvalidStageDeclarationException":
440
- case "com.amazonaws.codepipeline#InvalidStageDeclarationException":
441
- throw await de_InvalidStageDeclarationExceptionRes(parsedOutput, context);
442
- case "InvalidStructureException":
443
- case "com.amazonaws.codepipeline#InvalidStructureException":
444
- throw await de_InvalidStructureExceptionRes(parsedOutput, context);
445
- case "InvalidTagsException":
446
- case "com.amazonaws.codepipeline#InvalidTagsException":
447
- throw await de_InvalidTagsExceptionRes(parsedOutput, context);
448
- case "LimitExceededException":
449
- case "com.amazonaws.codepipeline#LimitExceededException":
450
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
451
- case "PipelineNameInUseException":
452
- case "com.amazonaws.codepipeline#PipelineNameInUseException":
453
- throw await de_PipelineNameInUseExceptionRes(parsedOutput, context);
454
- case "TooManyTagsException":
455
- case "com.amazonaws.codepipeline#TooManyTagsException":
456
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
457
- case "ValidationException":
458
- case "com.amazonaws.codepipeline#ValidationException":
459
- throw await de_ValidationExceptionRes(parsedOutput, context);
460
- default:
461
- const parsedBody = parsedOutput.body;
462
- return throwDefaultError({
463
- output,
464
- parsedBody,
465
- errorCode,
466
- });
467
- }
468
- };
469
- const de_DeleteCustomActionTypeCommand = async (output, context) => {
470
- if (output.statusCode >= 300) {
471
- return de_DeleteCustomActionTypeCommandError(output, context);
472
- }
473
- await (0, smithy_client_1.collectBody)(output.body, context);
474
- const response = {
475
- $metadata: deserializeMetadata(output),
476
- };
477
- return response;
478
- };
479
- exports.de_DeleteCustomActionTypeCommand = de_DeleteCustomActionTypeCommand;
480
- const de_DeleteCustomActionTypeCommandError = async (output, context) => {
481
- const parsedOutput = {
482
- ...output,
483
- body: await parseErrorBody(output.body, context),
484
- };
485
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
486
- switch (errorCode) {
487
- case "ConcurrentModificationException":
488
- case "com.amazonaws.codepipeline#ConcurrentModificationException":
489
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
490
- case "ValidationException":
491
- case "com.amazonaws.codepipeline#ValidationException":
492
- throw await de_ValidationExceptionRes(parsedOutput, context);
493
- default:
494
- const parsedBody = parsedOutput.body;
495
- return throwDefaultError({
496
- output,
497
- parsedBody,
498
- errorCode,
499
- });
500
- }
501
- };
502
- const de_DeletePipelineCommand = async (output, context) => {
503
- if (output.statusCode >= 300) {
504
- return de_DeletePipelineCommandError(output, context);
505
- }
506
- await (0, smithy_client_1.collectBody)(output.body, context);
507
- const response = {
508
- $metadata: deserializeMetadata(output),
509
- };
510
- return response;
511
- };
512
- exports.de_DeletePipelineCommand = de_DeletePipelineCommand;
513
- const de_DeletePipelineCommandError = async (output, context) => {
514
- const parsedOutput = {
515
- ...output,
516
- body: await parseErrorBody(output.body, context),
517
- };
518
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
519
- switch (errorCode) {
520
- case "ConcurrentModificationException":
521
- case "com.amazonaws.codepipeline#ConcurrentModificationException":
522
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
523
- case "ValidationException":
524
- case "com.amazonaws.codepipeline#ValidationException":
525
- throw await de_ValidationExceptionRes(parsedOutput, context);
526
- default:
527
- const parsedBody = parsedOutput.body;
528
- return throwDefaultError({
529
- output,
530
- parsedBody,
531
- errorCode,
532
- });
533
- }
534
- };
535
- const de_DeleteWebhookCommand = async (output, context) => {
536
- if (output.statusCode >= 300) {
537
- return de_DeleteWebhookCommandError(output, context);
538
- }
539
- const data = await parseBody(output.body, context);
540
- let contents = {};
541
- contents = (0, smithy_client_1._json)(data);
542
- const response = {
543
- $metadata: deserializeMetadata(output),
544
- ...contents,
545
- };
546
- return response;
547
- };
548
- exports.de_DeleteWebhookCommand = de_DeleteWebhookCommand;
549
- const de_DeleteWebhookCommandError = async (output, context) => {
550
- const parsedOutput = {
551
- ...output,
552
- body: await parseErrorBody(output.body, context),
553
- };
554
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
555
- switch (errorCode) {
556
- case "ConcurrentModificationException":
557
- case "com.amazonaws.codepipeline#ConcurrentModificationException":
558
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
559
- case "ValidationException":
560
- case "com.amazonaws.codepipeline#ValidationException":
561
- throw await de_ValidationExceptionRes(parsedOutput, context);
562
- default:
563
- const parsedBody = parsedOutput.body;
564
- return throwDefaultError({
565
- output,
566
- parsedBody,
567
- errorCode,
568
- });
569
- }
570
- };
571
- const de_DeregisterWebhookWithThirdPartyCommand = async (output, context) => {
572
- if (output.statusCode >= 300) {
573
- return de_DeregisterWebhookWithThirdPartyCommandError(output, context);
574
- }
575
- const data = await parseBody(output.body, context);
576
- let contents = {};
577
- contents = (0, smithy_client_1._json)(data);
578
- const response = {
579
- $metadata: deserializeMetadata(output),
580
- ...contents,
581
- };
582
- return response;
583
- };
584
- exports.de_DeregisterWebhookWithThirdPartyCommand = de_DeregisterWebhookWithThirdPartyCommand;
585
- const de_DeregisterWebhookWithThirdPartyCommandError = async (output, context) => {
586
- const parsedOutput = {
587
- ...output,
588
- body: await parseErrorBody(output.body, context),
589
- };
590
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
591
- switch (errorCode) {
592
- case "ValidationException":
593
- case "com.amazonaws.codepipeline#ValidationException":
594
- throw await de_ValidationExceptionRes(parsedOutput, context);
595
- case "WebhookNotFoundException":
596
- case "com.amazonaws.codepipeline#WebhookNotFoundException":
597
- throw await de_WebhookNotFoundExceptionRes(parsedOutput, context);
598
- default:
599
- const parsedBody = parsedOutput.body;
600
- return throwDefaultError({
601
- output,
602
- parsedBody,
603
- errorCode,
604
- });
605
- }
606
- };
607
- const de_DisableStageTransitionCommand = async (output, context) => {
608
- if (output.statusCode >= 300) {
609
- return de_DisableStageTransitionCommandError(output, context);
610
- }
611
- await (0, smithy_client_1.collectBody)(output.body, context);
612
- const response = {
613
- $metadata: deserializeMetadata(output),
614
- };
615
- return response;
616
- };
617
- exports.de_DisableStageTransitionCommand = de_DisableStageTransitionCommand;
618
- const de_DisableStageTransitionCommandError = async (output, context) => {
619
- const parsedOutput = {
620
- ...output,
621
- body: await parseErrorBody(output.body, context),
622
- };
623
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
624
- switch (errorCode) {
625
- case "PipelineNotFoundException":
626
- case "com.amazonaws.codepipeline#PipelineNotFoundException":
627
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
628
- case "StageNotFoundException":
629
- case "com.amazonaws.codepipeline#StageNotFoundException":
630
- throw await de_StageNotFoundExceptionRes(parsedOutput, context);
631
- case "ValidationException":
632
- case "com.amazonaws.codepipeline#ValidationException":
633
- throw await de_ValidationExceptionRes(parsedOutput, context);
634
- default:
635
- const parsedBody = parsedOutput.body;
636
- return throwDefaultError({
637
- output,
638
- parsedBody,
639
- errorCode,
640
- });
641
- }
642
- };
643
- const de_EnableStageTransitionCommand = async (output, context) => {
644
- if (output.statusCode >= 300) {
645
- return de_EnableStageTransitionCommandError(output, context);
646
- }
647
- await (0, smithy_client_1.collectBody)(output.body, context);
648
- const response = {
649
- $metadata: deserializeMetadata(output),
650
- };
651
- return response;
652
- };
653
- exports.de_EnableStageTransitionCommand = de_EnableStageTransitionCommand;
654
- const de_EnableStageTransitionCommandError = async (output, context) => {
655
- const parsedOutput = {
656
- ...output,
657
- body: await parseErrorBody(output.body, context),
658
- };
659
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
660
- switch (errorCode) {
661
- case "PipelineNotFoundException":
662
- case "com.amazonaws.codepipeline#PipelineNotFoundException":
663
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
664
- case "StageNotFoundException":
665
- case "com.amazonaws.codepipeline#StageNotFoundException":
666
- throw await de_StageNotFoundExceptionRes(parsedOutput, context);
667
- case "ValidationException":
668
- case "com.amazonaws.codepipeline#ValidationException":
669
- throw await de_ValidationExceptionRes(parsedOutput, context);
670
- default:
671
- const parsedBody = parsedOutput.body;
672
- return throwDefaultError({
673
- output,
674
- parsedBody,
675
- errorCode,
676
- });
677
- }
678
- };
679
- const de_GetActionTypeCommand = async (output, context) => {
680
- if (output.statusCode >= 300) {
681
- return de_GetActionTypeCommandError(output, context);
682
- }
683
- const data = await parseBody(output.body, context);
684
- let contents = {};
685
- contents = (0, smithy_client_1._json)(data);
686
- const response = {
687
- $metadata: deserializeMetadata(output),
688
- ...contents,
689
- };
690
- return response;
691
- };
692
- exports.de_GetActionTypeCommand = de_GetActionTypeCommand;
693
- const de_GetActionTypeCommandError = async (output, context) => {
694
- const parsedOutput = {
695
- ...output,
696
- body: await parseErrorBody(output.body, context),
697
- };
698
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
699
- switch (errorCode) {
700
- case "ActionTypeNotFoundException":
701
- case "com.amazonaws.codepipeline#ActionTypeNotFoundException":
702
- throw await de_ActionTypeNotFoundExceptionRes(parsedOutput, context);
703
- case "ValidationException":
704
- case "com.amazonaws.codepipeline#ValidationException":
705
- throw await de_ValidationExceptionRes(parsedOutput, context);
706
- default:
707
- const parsedBody = parsedOutput.body;
708
- return throwDefaultError({
709
- output,
710
- parsedBody,
711
- errorCode,
712
- });
713
- }
714
- };
715
- const de_GetJobDetailsCommand = async (output, context) => {
716
- if (output.statusCode >= 300) {
717
- return de_GetJobDetailsCommandError(output, context);
718
- }
719
- const data = await parseBody(output.body, context);
720
- let contents = {};
721
- contents = (0, smithy_client_1._json)(data);
722
- const response = {
723
- $metadata: deserializeMetadata(output),
724
- ...contents,
725
- };
726
- return response;
727
- };
728
- exports.de_GetJobDetailsCommand = de_GetJobDetailsCommand;
729
- const de_GetJobDetailsCommandError = async (output, context) => {
730
- const parsedOutput = {
731
- ...output,
732
- body: await parseErrorBody(output.body, context),
733
- };
734
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
735
- switch (errorCode) {
736
- case "JobNotFoundException":
737
- case "com.amazonaws.codepipeline#JobNotFoundException":
738
- throw await de_JobNotFoundExceptionRes(parsedOutput, context);
739
- case "ValidationException":
740
- case "com.amazonaws.codepipeline#ValidationException":
741
- throw await de_ValidationExceptionRes(parsedOutput, context);
742
- default:
743
- const parsedBody = parsedOutput.body;
744
- return throwDefaultError({
745
- output,
746
- parsedBody,
747
- errorCode,
748
- });
749
- }
750
- };
751
- const de_GetPipelineCommand = async (output, context) => {
752
- if (output.statusCode >= 300) {
753
- return de_GetPipelineCommandError(output, context);
754
- }
755
- const data = await parseBody(output.body, context);
756
- let contents = {};
757
- contents = de_GetPipelineOutput(data, context);
758
- const response = {
759
- $metadata: deserializeMetadata(output),
760
- ...contents,
761
- };
762
- return response;
763
- };
764
- exports.de_GetPipelineCommand = de_GetPipelineCommand;
765
- const de_GetPipelineCommandError = async (output, context) => {
766
- const parsedOutput = {
767
- ...output,
768
- body: await parseErrorBody(output.body, context),
769
- };
770
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
771
- switch (errorCode) {
772
- case "PipelineNotFoundException":
773
- case "com.amazonaws.codepipeline#PipelineNotFoundException":
774
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
775
- case "PipelineVersionNotFoundException":
776
- case "com.amazonaws.codepipeline#PipelineVersionNotFoundException":
777
- throw await de_PipelineVersionNotFoundExceptionRes(parsedOutput, context);
778
- case "ValidationException":
779
- case "com.amazonaws.codepipeline#ValidationException":
780
- throw await de_ValidationExceptionRes(parsedOutput, context);
781
- default:
782
- const parsedBody = parsedOutput.body;
783
- return throwDefaultError({
784
- output,
785
- parsedBody,
786
- errorCode,
787
- });
788
- }
789
- };
790
- const de_GetPipelineExecutionCommand = async (output, context) => {
791
- if (output.statusCode >= 300) {
792
- return de_GetPipelineExecutionCommandError(output, context);
793
- }
794
- const data = await parseBody(output.body, context);
795
- let contents = {};
796
- contents = de_GetPipelineExecutionOutput(data, context);
797
- const response = {
798
- $metadata: deserializeMetadata(output),
799
- ...contents,
800
- };
801
- return response;
802
- };
803
- exports.de_GetPipelineExecutionCommand = de_GetPipelineExecutionCommand;
804
- const de_GetPipelineExecutionCommandError = async (output, context) => {
805
- const parsedOutput = {
806
- ...output,
807
- body: await parseErrorBody(output.body, context),
808
- };
809
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
810
- switch (errorCode) {
811
- case "PipelineExecutionNotFoundException":
812
- case "com.amazonaws.codepipeline#PipelineExecutionNotFoundException":
813
- throw await de_PipelineExecutionNotFoundExceptionRes(parsedOutput, context);
814
- case "PipelineNotFoundException":
815
- case "com.amazonaws.codepipeline#PipelineNotFoundException":
816
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
817
- case "ValidationException":
818
- case "com.amazonaws.codepipeline#ValidationException":
819
- throw await de_ValidationExceptionRes(parsedOutput, context);
820
- default:
821
- const parsedBody = parsedOutput.body;
822
- return throwDefaultError({
823
- output,
824
- parsedBody,
825
- errorCode,
826
- });
827
- }
828
- };
829
- const de_GetPipelineStateCommand = async (output, context) => {
830
- if (output.statusCode >= 300) {
831
- return de_GetPipelineStateCommandError(output, context);
832
- }
833
- const data = await parseBody(output.body, context);
834
- let contents = {};
835
- contents = de_GetPipelineStateOutput(data, context);
836
- const response = {
837
- $metadata: deserializeMetadata(output),
838
- ...contents,
839
- };
840
- return response;
841
- };
842
- exports.de_GetPipelineStateCommand = de_GetPipelineStateCommand;
843
- const de_GetPipelineStateCommandError = async (output, context) => {
844
- const parsedOutput = {
845
- ...output,
846
- body: await parseErrorBody(output.body, context),
847
- };
848
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
849
- switch (errorCode) {
850
- case "PipelineNotFoundException":
851
- case "com.amazonaws.codepipeline#PipelineNotFoundException":
852
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
853
- case "ValidationException":
854
- case "com.amazonaws.codepipeline#ValidationException":
855
- throw await de_ValidationExceptionRes(parsedOutput, context);
856
- default:
857
- const parsedBody = parsedOutput.body;
858
- return throwDefaultError({
859
- output,
860
- parsedBody,
861
- errorCode,
862
- });
863
- }
864
- };
865
- const de_GetThirdPartyJobDetailsCommand = async (output, context) => {
866
- if (output.statusCode >= 300) {
867
- return de_GetThirdPartyJobDetailsCommandError(output, context);
868
- }
869
- const data = await parseBody(output.body, context);
870
- let contents = {};
871
- contents = (0, smithy_client_1._json)(data);
872
- const response = {
873
- $metadata: deserializeMetadata(output),
874
- ...contents,
875
- };
876
- return response;
877
- };
878
- exports.de_GetThirdPartyJobDetailsCommand = de_GetThirdPartyJobDetailsCommand;
879
- const de_GetThirdPartyJobDetailsCommandError = async (output, context) => {
880
- const parsedOutput = {
881
- ...output,
882
- body: await parseErrorBody(output.body, context),
883
- };
884
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
885
- switch (errorCode) {
886
- case "InvalidClientTokenException":
887
- case "com.amazonaws.codepipeline#InvalidClientTokenException":
888
- throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
889
- case "InvalidJobException":
890
- case "com.amazonaws.codepipeline#InvalidJobException":
891
- throw await de_InvalidJobExceptionRes(parsedOutput, context);
892
- case "JobNotFoundException":
893
- case "com.amazonaws.codepipeline#JobNotFoundException":
894
- throw await de_JobNotFoundExceptionRes(parsedOutput, context);
895
- case "ValidationException":
896
- case "com.amazonaws.codepipeline#ValidationException":
897
- throw await de_ValidationExceptionRes(parsedOutput, context);
898
- default:
899
- const parsedBody = parsedOutput.body;
900
- return throwDefaultError({
901
- output,
902
- parsedBody,
903
- errorCode,
904
- });
905
- }
906
- };
907
- const de_ListActionExecutionsCommand = async (output, context) => {
908
- if (output.statusCode >= 300) {
909
- return de_ListActionExecutionsCommandError(output, context);
910
- }
911
- const data = await parseBody(output.body, context);
912
- let contents = {};
913
- contents = de_ListActionExecutionsOutput(data, context);
914
- const response = {
915
- $metadata: deserializeMetadata(output),
916
- ...contents,
917
- };
918
- return response;
919
- };
920
- exports.de_ListActionExecutionsCommand = de_ListActionExecutionsCommand;
921
- const de_ListActionExecutionsCommandError = async (output, context) => {
922
- const parsedOutput = {
923
- ...output,
924
- body: await parseErrorBody(output.body, context),
925
- };
926
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
927
- switch (errorCode) {
928
- case "InvalidNextTokenException":
929
- case "com.amazonaws.codepipeline#InvalidNextTokenException":
930
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
931
- case "PipelineExecutionNotFoundException":
932
- case "com.amazonaws.codepipeline#PipelineExecutionNotFoundException":
933
- throw await de_PipelineExecutionNotFoundExceptionRes(parsedOutput, context);
934
- case "PipelineNotFoundException":
935
- case "com.amazonaws.codepipeline#PipelineNotFoundException":
936
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
937
- case "ValidationException":
938
- case "com.amazonaws.codepipeline#ValidationException":
939
- throw await de_ValidationExceptionRes(parsedOutput, context);
940
- default:
941
- const parsedBody = parsedOutput.body;
942
- return throwDefaultError({
943
- output,
944
- parsedBody,
945
- errorCode,
946
- });
947
- }
948
- };
949
- const de_ListActionTypesCommand = async (output, context) => {
950
- if (output.statusCode >= 300) {
951
- return de_ListActionTypesCommandError(output, context);
952
- }
953
- const data = await parseBody(output.body, context);
954
- let contents = {};
955
- contents = (0, smithy_client_1._json)(data);
956
- const response = {
957
- $metadata: deserializeMetadata(output),
958
- ...contents,
959
- };
960
- return response;
961
- };
962
- exports.de_ListActionTypesCommand = de_ListActionTypesCommand;
963
- const de_ListActionTypesCommandError = async (output, context) => {
964
- const parsedOutput = {
965
- ...output,
966
- body: await parseErrorBody(output.body, context),
967
- };
968
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
969
- switch (errorCode) {
970
- case "InvalidNextTokenException":
971
- case "com.amazonaws.codepipeline#InvalidNextTokenException":
972
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
973
- case "ValidationException":
974
- case "com.amazonaws.codepipeline#ValidationException":
975
- throw await de_ValidationExceptionRes(parsedOutput, context);
976
- default:
977
- const parsedBody = parsedOutput.body;
978
- return throwDefaultError({
979
- output,
980
- parsedBody,
981
- errorCode,
982
- });
983
- }
984
- };
985
- const de_ListPipelineExecutionsCommand = async (output, context) => {
986
- if (output.statusCode >= 300) {
987
- return de_ListPipelineExecutionsCommandError(output, context);
988
- }
989
- const data = await parseBody(output.body, context);
990
- let contents = {};
991
- contents = de_ListPipelineExecutionsOutput(data, context);
992
- const response = {
993
- $metadata: deserializeMetadata(output),
994
- ...contents,
995
- };
996
- return response;
997
- };
998
- exports.de_ListPipelineExecutionsCommand = de_ListPipelineExecutionsCommand;
999
- const de_ListPipelineExecutionsCommandError = async (output, context) => {
1000
- const parsedOutput = {
1001
- ...output,
1002
- body: await parseErrorBody(output.body, context),
1003
- };
1004
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1005
- switch (errorCode) {
1006
- case "InvalidNextTokenException":
1007
- case "com.amazonaws.codepipeline#InvalidNextTokenException":
1008
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1009
- case "PipelineNotFoundException":
1010
- case "com.amazonaws.codepipeline#PipelineNotFoundException":
1011
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
1012
- case "ValidationException":
1013
- case "com.amazonaws.codepipeline#ValidationException":
1014
- throw await de_ValidationExceptionRes(parsedOutput, context);
1015
- default:
1016
- const parsedBody = parsedOutput.body;
1017
- return throwDefaultError({
1018
- output,
1019
- parsedBody,
1020
- errorCode,
1021
- });
1022
- }
1023
- };
1024
- const de_ListPipelinesCommand = async (output, context) => {
1025
- if (output.statusCode >= 300) {
1026
- return de_ListPipelinesCommandError(output, context);
1027
- }
1028
- const data = await parseBody(output.body, context);
1029
- let contents = {};
1030
- contents = de_ListPipelinesOutput(data, context);
1031
- const response = {
1032
- $metadata: deserializeMetadata(output),
1033
- ...contents,
1034
- };
1035
- return response;
1036
- };
1037
- exports.de_ListPipelinesCommand = de_ListPipelinesCommand;
1038
- const de_ListPipelinesCommandError = async (output, context) => {
1039
- const parsedOutput = {
1040
- ...output,
1041
- body: await parseErrorBody(output.body, context),
1042
- };
1043
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1044
- switch (errorCode) {
1045
- case "InvalidNextTokenException":
1046
- case "com.amazonaws.codepipeline#InvalidNextTokenException":
1047
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1048
- case "ValidationException":
1049
- case "com.amazonaws.codepipeline#ValidationException":
1050
- throw await de_ValidationExceptionRes(parsedOutput, context);
1051
- default:
1052
- const parsedBody = parsedOutput.body;
1053
- return throwDefaultError({
1054
- output,
1055
- parsedBody,
1056
- errorCode,
1057
- });
1058
- }
1059
- };
1060
- const de_ListTagsForResourceCommand = async (output, context) => {
1061
- if (output.statusCode >= 300) {
1062
- return de_ListTagsForResourceCommandError(output, context);
1063
- }
1064
- const data = await parseBody(output.body, context);
1065
- let contents = {};
1066
- contents = (0, smithy_client_1._json)(data);
1067
- const response = {
1068
- $metadata: deserializeMetadata(output),
1069
- ...contents,
1070
- };
1071
- return response;
1072
- };
1073
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
1074
- const de_ListTagsForResourceCommandError = async (output, context) => {
1075
- const parsedOutput = {
1076
- ...output,
1077
- body: await parseErrorBody(output.body, context),
1078
- };
1079
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1080
- switch (errorCode) {
1081
- case "InvalidArnException":
1082
- case "com.amazonaws.codepipeline#InvalidArnException":
1083
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
1084
- case "InvalidNextTokenException":
1085
- case "com.amazonaws.codepipeline#InvalidNextTokenException":
1086
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1087
- case "ResourceNotFoundException":
1088
- case "com.amazonaws.codepipeline#ResourceNotFoundException":
1089
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1090
- case "ValidationException":
1091
- case "com.amazonaws.codepipeline#ValidationException":
1092
- throw await de_ValidationExceptionRes(parsedOutput, context);
1093
- default:
1094
- const parsedBody = parsedOutput.body;
1095
- return throwDefaultError({
1096
- output,
1097
- parsedBody,
1098
- errorCode,
1099
- });
1100
- }
1101
- };
1102
- const de_ListWebhooksCommand = async (output, context) => {
1103
- if (output.statusCode >= 300) {
1104
- return de_ListWebhooksCommandError(output, context);
1105
- }
1106
- const data = await parseBody(output.body, context);
1107
- let contents = {};
1108
- contents = de_ListWebhooksOutput(data, context);
1109
- const response = {
1110
- $metadata: deserializeMetadata(output),
1111
- ...contents,
1112
- };
1113
- return response;
1114
- };
1115
- exports.de_ListWebhooksCommand = de_ListWebhooksCommand;
1116
- const de_ListWebhooksCommandError = async (output, context) => {
1117
- const parsedOutput = {
1118
- ...output,
1119
- body: await parseErrorBody(output.body, context),
1120
- };
1121
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1122
- switch (errorCode) {
1123
- case "InvalidNextTokenException":
1124
- case "com.amazonaws.codepipeline#InvalidNextTokenException":
1125
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1126
- case "ValidationException":
1127
- case "com.amazonaws.codepipeline#ValidationException":
1128
- throw await de_ValidationExceptionRes(parsedOutput, context);
1129
- default:
1130
- const parsedBody = parsedOutput.body;
1131
- return throwDefaultError({
1132
- output,
1133
- parsedBody,
1134
- errorCode,
1135
- });
1136
- }
1137
- };
1138
- const de_PollForJobsCommand = async (output, context) => {
1139
- if (output.statusCode >= 300) {
1140
- return de_PollForJobsCommandError(output, context);
1141
- }
1142
- const data = await parseBody(output.body, context);
1143
- let contents = {};
1144
- contents = (0, smithy_client_1._json)(data);
1145
- const response = {
1146
- $metadata: deserializeMetadata(output),
1147
- ...contents,
1148
- };
1149
- return response;
1150
- };
1151
- exports.de_PollForJobsCommand = de_PollForJobsCommand;
1152
- const de_PollForJobsCommandError = async (output, context) => {
1153
- const parsedOutput = {
1154
- ...output,
1155
- body: await parseErrorBody(output.body, context),
1156
- };
1157
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1158
- switch (errorCode) {
1159
- case "ActionTypeNotFoundException":
1160
- case "com.amazonaws.codepipeline#ActionTypeNotFoundException":
1161
- throw await de_ActionTypeNotFoundExceptionRes(parsedOutput, context);
1162
- case "ValidationException":
1163
- case "com.amazonaws.codepipeline#ValidationException":
1164
- throw await de_ValidationExceptionRes(parsedOutput, context);
1165
- default:
1166
- const parsedBody = parsedOutput.body;
1167
- return throwDefaultError({
1168
- output,
1169
- parsedBody,
1170
- errorCode,
1171
- });
1172
- }
1173
- };
1174
- const de_PollForThirdPartyJobsCommand = async (output, context) => {
1175
- if (output.statusCode >= 300) {
1176
- return de_PollForThirdPartyJobsCommandError(output, context);
1177
- }
1178
- const data = await parseBody(output.body, context);
1179
- let contents = {};
1180
- contents = (0, smithy_client_1._json)(data);
1181
- const response = {
1182
- $metadata: deserializeMetadata(output),
1183
- ...contents,
1184
- };
1185
- return response;
1186
- };
1187
- exports.de_PollForThirdPartyJobsCommand = de_PollForThirdPartyJobsCommand;
1188
- const de_PollForThirdPartyJobsCommandError = async (output, context) => {
1189
- const parsedOutput = {
1190
- ...output,
1191
- body: await parseErrorBody(output.body, context),
1192
- };
1193
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1194
- switch (errorCode) {
1195
- case "ActionTypeNotFoundException":
1196
- case "com.amazonaws.codepipeline#ActionTypeNotFoundException":
1197
- throw await de_ActionTypeNotFoundExceptionRes(parsedOutput, context);
1198
- case "ValidationException":
1199
- case "com.amazonaws.codepipeline#ValidationException":
1200
- throw await de_ValidationExceptionRes(parsedOutput, context);
1201
- default:
1202
- const parsedBody = parsedOutput.body;
1203
- return throwDefaultError({
1204
- output,
1205
- parsedBody,
1206
- errorCode,
1207
- });
1208
- }
1209
- };
1210
- const de_PutActionRevisionCommand = async (output, context) => {
1211
- if (output.statusCode >= 300) {
1212
- return de_PutActionRevisionCommandError(output, context);
1213
- }
1214
- const data = await parseBody(output.body, context);
1215
- let contents = {};
1216
- contents = (0, smithy_client_1._json)(data);
1217
- const response = {
1218
- $metadata: deserializeMetadata(output),
1219
- ...contents,
1220
- };
1221
- return response;
1222
- };
1223
- exports.de_PutActionRevisionCommand = de_PutActionRevisionCommand;
1224
- const de_PutActionRevisionCommandError = async (output, context) => {
1225
- const parsedOutput = {
1226
- ...output,
1227
- body: await parseErrorBody(output.body, context),
1228
- };
1229
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1230
- switch (errorCode) {
1231
- case "ActionNotFoundException":
1232
- case "com.amazonaws.codepipeline#ActionNotFoundException":
1233
- throw await de_ActionNotFoundExceptionRes(parsedOutput, context);
1234
- case "PipelineNotFoundException":
1235
- case "com.amazonaws.codepipeline#PipelineNotFoundException":
1236
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
1237
- case "StageNotFoundException":
1238
- case "com.amazonaws.codepipeline#StageNotFoundException":
1239
- throw await de_StageNotFoundExceptionRes(parsedOutput, context);
1240
- case "ValidationException":
1241
- case "com.amazonaws.codepipeline#ValidationException":
1242
- throw await de_ValidationExceptionRes(parsedOutput, context);
1243
- default:
1244
- const parsedBody = parsedOutput.body;
1245
- return throwDefaultError({
1246
- output,
1247
- parsedBody,
1248
- errorCode,
1249
- });
1250
- }
1251
- };
1252
- const de_PutApprovalResultCommand = async (output, context) => {
1253
- if (output.statusCode >= 300) {
1254
- return de_PutApprovalResultCommandError(output, context);
1255
- }
1256
- const data = await parseBody(output.body, context);
1257
- let contents = {};
1258
- contents = de_PutApprovalResultOutput(data, context);
1259
- const response = {
1260
- $metadata: deserializeMetadata(output),
1261
- ...contents,
1262
- };
1263
- return response;
1264
- };
1265
- exports.de_PutApprovalResultCommand = de_PutApprovalResultCommand;
1266
- const de_PutApprovalResultCommandError = async (output, context) => {
1267
- const parsedOutput = {
1268
- ...output,
1269
- body: await parseErrorBody(output.body, context),
1270
- };
1271
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1272
- switch (errorCode) {
1273
- case "ActionNotFoundException":
1274
- case "com.amazonaws.codepipeline#ActionNotFoundException":
1275
- throw await de_ActionNotFoundExceptionRes(parsedOutput, context);
1276
- case "ApprovalAlreadyCompletedException":
1277
- case "com.amazonaws.codepipeline#ApprovalAlreadyCompletedException":
1278
- throw await de_ApprovalAlreadyCompletedExceptionRes(parsedOutput, context);
1279
- case "InvalidApprovalTokenException":
1280
- case "com.amazonaws.codepipeline#InvalidApprovalTokenException":
1281
- throw await de_InvalidApprovalTokenExceptionRes(parsedOutput, context);
1282
- case "PipelineNotFoundException":
1283
- case "com.amazonaws.codepipeline#PipelineNotFoundException":
1284
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
1285
- case "StageNotFoundException":
1286
- case "com.amazonaws.codepipeline#StageNotFoundException":
1287
- throw await de_StageNotFoundExceptionRes(parsedOutput, context);
1288
- case "ValidationException":
1289
- case "com.amazonaws.codepipeline#ValidationException":
1290
- throw await de_ValidationExceptionRes(parsedOutput, context);
1291
- default:
1292
- const parsedBody = parsedOutput.body;
1293
- return throwDefaultError({
1294
- output,
1295
- parsedBody,
1296
- errorCode,
1297
- });
1298
- }
1299
- };
1300
- const de_PutJobFailureResultCommand = async (output, context) => {
1301
- if (output.statusCode >= 300) {
1302
- return de_PutJobFailureResultCommandError(output, context);
1303
- }
1304
- await (0, smithy_client_1.collectBody)(output.body, context);
1305
- const response = {
1306
- $metadata: deserializeMetadata(output),
1307
- };
1308
- return response;
1309
- };
1310
- exports.de_PutJobFailureResultCommand = de_PutJobFailureResultCommand;
1311
- const de_PutJobFailureResultCommandError = async (output, context) => {
1312
- const parsedOutput = {
1313
- ...output,
1314
- body: await parseErrorBody(output.body, context),
1315
- };
1316
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1317
- switch (errorCode) {
1318
- case "InvalidJobStateException":
1319
- case "com.amazonaws.codepipeline#InvalidJobStateException":
1320
- throw await de_InvalidJobStateExceptionRes(parsedOutput, context);
1321
- case "JobNotFoundException":
1322
- case "com.amazonaws.codepipeline#JobNotFoundException":
1323
- throw await de_JobNotFoundExceptionRes(parsedOutput, context);
1324
- case "ValidationException":
1325
- case "com.amazonaws.codepipeline#ValidationException":
1326
- throw await de_ValidationExceptionRes(parsedOutput, context);
1327
- default:
1328
- const parsedBody = parsedOutput.body;
1329
- return throwDefaultError({
1330
- output,
1331
- parsedBody,
1332
- errorCode,
1333
- });
1334
- }
1335
- };
1336
- const de_PutJobSuccessResultCommand = async (output, context) => {
1337
- if (output.statusCode >= 300) {
1338
- return de_PutJobSuccessResultCommandError(output, context);
1339
- }
1340
- await (0, smithy_client_1.collectBody)(output.body, context);
1341
- const response = {
1342
- $metadata: deserializeMetadata(output),
1343
- };
1344
- return response;
1345
- };
1346
- exports.de_PutJobSuccessResultCommand = de_PutJobSuccessResultCommand;
1347
- const de_PutJobSuccessResultCommandError = async (output, context) => {
1348
- const parsedOutput = {
1349
- ...output,
1350
- body: await parseErrorBody(output.body, context),
1351
- };
1352
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1353
- switch (errorCode) {
1354
- case "InvalidJobStateException":
1355
- case "com.amazonaws.codepipeline#InvalidJobStateException":
1356
- throw await de_InvalidJobStateExceptionRes(parsedOutput, context);
1357
- case "JobNotFoundException":
1358
- case "com.amazonaws.codepipeline#JobNotFoundException":
1359
- throw await de_JobNotFoundExceptionRes(parsedOutput, context);
1360
- case "OutputVariablesSizeExceededException":
1361
- case "com.amazonaws.codepipeline#OutputVariablesSizeExceededException":
1362
- throw await de_OutputVariablesSizeExceededExceptionRes(parsedOutput, context);
1363
- case "ValidationException":
1364
- case "com.amazonaws.codepipeline#ValidationException":
1365
- throw await de_ValidationExceptionRes(parsedOutput, context);
1366
- default:
1367
- const parsedBody = parsedOutput.body;
1368
- return throwDefaultError({
1369
- output,
1370
- parsedBody,
1371
- errorCode,
1372
- });
1373
- }
1374
- };
1375
- const de_PutThirdPartyJobFailureResultCommand = async (output, context) => {
1376
- if (output.statusCode >= 300) {
1377
- return de_PutThirdPartyJobFailureResultCommandError(output, context);
1378
- }
1379
- await (0, smithy_client_1.collectBody)(output.body, context);
1380
- const response = {
1381
- $metadata: deserializeMetadata(output),
1382
- };
1383
- return response;
1384
- };
1385
- exports.de_PutThirdPartyJobFailureResultCommand = de_PutThirdPartyJobFailureResultCommand;
1386
- const de_PutThirdPartyJobFailureResultCommandError = async (output, context) => {
1387
- const parsedOutput = {
1388
- ...output,
1389
- body: await parseErrorBody(output.body, context),
1390
- };
1391
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1392
- switch (errorCode) {
1393
- case "InvalidClientTokenException":
1394
- case "com.amazonaws.codepipeline#InvalidClientTokenException":
1395
- throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
1396
- case "InvalidJobStateException":
1397
- case "com.amazonaws.codepipeline#InvalidJobStateException":
1398
- throw await de_InvalidJobStateExceptionRes(parsedOutput, context);
1399
- case "JobNotFoundException":
1400
- case "com.amazonaws.codepipeline#JobNotFoundException":
1401
- throw await de_JobNotFoundExceptionRes(parsedOutput, context);
1402
- case "ValidationException":
1403
- case "com.amazonaws.codepipeline#ValidationException":
1404
- throw await de_ValidationExceptionRes(parsedOutput, context);
1405
- default:
1406
- const parsedBody = parsedOutput.body;
1407
- return throwDefaultError({
1408
- output,
1409
- parsedBody,
1410
- errorCode,
1411
- });
1412
- }
1413
- };
1414
- const de_PutThirdPartyJobSuccessResultCommand = async (output, context) => {
1415
- if (output.statusCode >= 300) {
1416
- return de_PutThirdPartyJobSuccessResultCommandError(output, context);
1417
- }
1418
- await (0, smithy_client_1.collectBody)(output.body, context);
1419
- const response = {
1420
- $metadata: deserializeMetadata(output),
1421
- };
1422
- return response;
1423
- };
1424
- exports.de_PutThirdPartyJobSuccessResultCommand = de_PutThirdPartyJobSuccessResultCommand;
1425
- const de_PutThirdPartyJobSuccessResultCommandError = async (output, context) => {
1426
- const parsedOutput = {
1427
- ...output,
1428
- body: await parseErrorBody(output.body, context),
1429
- };
1430
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1431
- switch (errorCode) {
1432
- case "InvalidClientTokenException":
1433
- case "com.amazonaws.codepipeline#InvalidClientTokenException":
1434
- throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
1435
- case "InvalidJobStateException":
1436
- case "com.amazonaws.codepipeline#InvalidJobStateException":
1437
- throw await de_InvalidJobStateExceptionRes(parsedOutput, context);
1438
- case "JobNotFoundException":
1439
- case "com.amazonaws.codepipeline#JobNotFoundException":
1440
- throw await de_JobNotFoundExceptionRes(parsedOutput, context);
1441
- case "ValidationException":
1442
- case "com.amazonaws.codepipeline#ValidationException":
1443
- throw await de_ValidationExceptionRes(parsedOutput, context);
1444
- default:
1445
- const parsedBody = parsedOutput.body;
1446
- return throwDefaultError({
1447
- output,
1448
- parsedBody,
1449
- errorCode,
1450
- });
1451
- }
1452
- };
1453
- const de_PutWebhookCommand = async (output, context) => {
1454
- if (output.statusCode >= 300) {
1455
- return de_PutWebhookCommandError(output, context);
1456
- }
1457
- const data = await parseBody(output.body, context);
1458
- let contents = {};
1459
- contents = de_PutWebhookOutput(data, context);
1460
- const response = {
1461
- $metadata: deserializeMetadata(output),
1462
- ...contents,
1463
- };
1464
- return response;
1465
- };
1466
- exports.de_PutWebhookCommand = de_PutWebhookCommand;
1467
- const de_PutWebhookCommandError = async (output, context) => {
1468
- const parsedOutput = {
1469
- ...output,
1470
- body: await parseErrorBody(output.body, context),
1471
- };
1472
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1473
- switch (errorCode) {
1474
- case "ConcurrentModificationException":
1475
- case "com.amazonaws.codepipeline#ConcurrentModificationException":
1476
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1477
- case "InvalidTagsException":
1478
- case "com.amazonaws.codepipeline#InvalidTagsException":
1479
- throw await de_InvalidTagsExceptionRes(parsedOutput, context);
1480
- case "InvalidWebhookAuthenticationParametersException":
1481
- case "com.amazonaws.codepipeline#InvalidWebhookAuthenticationParametersException":
1482
- throw await de_InvalidWebhookAuthenticationParametersExceptionRes(parsedOutput, context);
1483
- case "InvalidWebhookFilterPatternException":
1484
- case "com.amazonaws.codepipeline#InvalidWebhookFilterPatternException":
1485
- throw await de_InvalidWebhookFilterPatternExceptionRes(parsedOutput, context);
1486
- case "LimitExceededException":
1487
- case "com.amazonaws.codepipeline#LimitExceededException":
1488
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1489
- case "PipelineNotFoundException":
1490
- case "com.amazonaws.codepipeline#PipelineNotFoundException":
1491
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
1492
- case "TooManyTagsException":
1493
- case "com.amazonaws.codepipeline#TooManyTagsException":
1494
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1495
- case "ValidationException":
1496
- case "com.amazonaws.codepipeline#ValidationException":
1497
- throw await de_ValidationExceptionRes(parsedOutput, context);
1498
- default:
1499
- const parsedBody = parsedOutput.body;
1500
- return throwDefaultError({
1501
- output,
1502
- parsedBody,
1503
- errorCode,
1504
- });
1505
- }
1506
- };
1507
- const de_RegisterWebhookWithThirdPartyCommand = async (output, context) => {
1508
- if (output.statusCode >= 300) {
1509
- return de_RegisterWebhookWithThirdPartyCommandError(output, context);
1510
- }
1511
- const data = await parseBody(output.body, context);
1512
- let contents = {};
1513
- contents = (0, smithy_client_1._json)(data);
1514
- const response = {
1515
- $metadata: deserializeMetadata(output),
1516
- ...contents,
1517
- };
1518
- return response;
1519
- };
1520
- exports.de_RegisterWebhookWithThirdPartyCommand = de_RegisterWebhookWithThirdPartyCommand;
1521
- const de_RegisterWebhookWithThirdPartyCommandError = async (output, context) => {
1522
- const parsedOutput = {
1523
- ...output,
1524
- body: await parseErrorBody(output.body, context),
1525
- };
1526
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1527
- switch (errorCode) {
1528
- case "ValidationException":
1529
- case "com.amazonaws.codepipeline#ValidationException":
1530
- throw await de_ValidationExceptionRes(parsedOutput, context);
1531
- case "WebhookNotFoundException":
1532
- case "com.amazonaws.codepipeline#WebhookNotFoundException":
1533
- throw await de_WebhookNotFoundExceptionRes(parsedOutput, context);
1534
- default:
1535
- const parsedBody = parsedOutput.body;
1536
- return throwDefaultError({
1537
- output,
1538
- parsedBody,
1539
- errorCode,
1540
- });
1541
- }
1542
- };
1543
- const de_RetryStageExecutionCommand = async (output, context) => {
1544
- if (output.statusCode >= 300) {
1545
- return de_RetryStageExecutionCommandError(output, context);
1546
- }
1547
- const data = await parseBody(output.body, context);
1548
- let contents = {};
1549
- contents = (0, smithy_client_1._json)(data);
1550
- const response = {
1551
- $metadata: deserializeMetadata(output),
1552
- ...contents,
1553
- };
1554
- return response;
1555
- };
1556
- exports.de_RetryStageExecutionCommand = de_RetryStageExecutionCommand;
1557
- const de_RetryStageExecutionCommandError = async (output, context) => {
1558
- const parsedOutput = {
1559
- ...output,
1560
- body: await parseErrorBody(output.body, context),
1561
- };
1562
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1563
- switch (errorCode) {
1564
- case "ConflictException":
1565
- case "com.amazonaws.codepipeline#ConflictException":
1566
- throw await de_ConflictExceptionRes(parsedOutput, context);
1567
- case "NotLatestPipelineExecutionException":
1568
- case "com.amazonaws.codepipeline#NotLatestPipelineExecutionException":
1569
- throw await de_NotLatestPipelineExecutionExceptionRes(parsedOutput, context);
1570
- case "PipelineNotFoundException":
1571
- case "com.amazonaws.codepipeline#PipelineNotFoundException":
1572
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
1573
- case "StageNotFoundException":
1574
- case "com.amazonaws.codepipeline#StageNotFoundException":
1575
- throw await de_StageNotFoundExceptionRes(parsedOutput, context);
1576
- case "StageNotRetryableException":
1577
- case "com.amazonaws.codepipeline#StageNotRetryableException":
1578
- throw await de_StageNotRetryableExceptionRes(parsedOutput, context);
1579
- case "ValidationException":
1580
- case "com.amazonaws.codepipeline#ValidationException":
1581
- throw await de_ValidationExceptionRes(parsedOutput, context);
1582
- default:
1583
- const parsedBody = parsedOutput.body;
1584
- return throwDefaultError({
1585
- output,
1586
- parsedBody,
1587
- errorCode,
1588
- });
1589
- }
1590
- };
1591
- const de_StartPipelineExecutionCommand = async (output, context) => {
1592
- if (output.statusCode >= 300) {
1593
- return de_StartPipelineExecutionCommandError(output, context);
1594
- }
1595
- const data = await parseBody(output.body, context);
1596
- let contents = {};
1597
- contents = (0, smithy_client_1._json)(data);
1598
- const response = {
1599
- $metadata: deserializeMetadata(output),
1600
- ...contents,
1601
- };
1602
- return response;
1603
- };
1604
- exports.de_StartPipelineExecutionCommand = de_StartPipelineExecutionCommand;
1605
- const de_StartPipelineExecutionCommandError = async (output, context) => {
1606
- const parsedOutput = {
1607
- ...output,
1608
- body: await parseErrorBody(output.body, context),
1609
- };
1610
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1611
- switch (errorCode) {
1612
- case "ConflictException":
1613
- case "com.amazonaws.codepipeline#ConflictException":
1614
- throw await de_ConflictExceptionRes(parsedOutput, context);
1615
- case "PipelineNotFoundException":
1616
- case "com.amazonaws.codepipeline#PipelineNotFoundException":
1617
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
1618
- case "ValidationException":
1619
- case "com.amazonaws.codepipeline#ValidationException":
1620
- throw await de_ValidationExceptionRes(parsedOutput, context);
1621
- default:
1622
- const parsedBody = parsedOutput.body;
1623
- return throwDefaultError({
1624
- output,
1625
- parsedBody,
1626
- errorCode,
1627
- });
1628
- }
1629
- };
1630
- const de_StopPipelineExecutionCommand = async (output, context) => {
1631
- if (output.statusCode >= 300) {
1632
- return de_StopPipelineExecutionCommandError(output, context);
1633
- }
1634
- const data = await parseBody(output.body, context);
1635
- let contents = {};
1636
- contents = (0, smithy_client_1._json)(data);
1637
- const response = {
1638
- $metadata: deserializeMetadata(output),
1639
- ...contents,
1640
- };
1641
- return response;
1642
- };
1643
- exports.de_StopPipelineExecutionCommand = de_StopPipelineExecutionCommand;
1644
- const de_StopPipelineExecutionCommandError = async (output, context) => {
1645
- const parsedOutput = {
1646
- ...output,
1647
- body: await parseErrorBody(output.body, context),
1648
- };
1649
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1650
- switch (errorCode) {
1651
- case "ConflictException":
1652
- case "com.amazonaws.codepipeline#ConflictException":
1653
- throw await de_ConflictExceptionRes(parsedOutput, context);
1654
- case "DuplicatedStopRequestException":
1655
- case "com.amazonaws.codepipeline#DuplicatedStopRequestException":
1656
- throw await de_DuplicatedStopRequestExceptionRes(parsedOutput, context);
1657
- case "PipelineExecutionNotStoppableException":
1658
- case "com.amazonaws.codepipeline#PipelineExecutionNotStoppableException":
1659
- throw await de_PipelineExecutionNotStoppableExceptionRes(parsedOutput, context);
1660
- case "PipelineNotFoundException":
1661
- case "com.amazonaws.codepipeline#PipelineNotFoundException":
1662
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
1663
- case "ValidationException":
1664
- case "com.amazonaws.codepipeline#ValidationException":
1665
- throw await de_ValidationExceptionRes(parsedOutput, context);
1666
- default:
1667
- const parsedBody = parsedOutput.body;
1668
- return throwDefaultError({
1669
- output,
1670
- parsedBody,
1671
- errorCode,
1672
- });
1673
- }
1674
- };
1675
- const de_TagResourceCommand = async (output, context) => {
1676
- if (output.statusCode >= 300) {
1677
- return de_TagResourceCommandError(output, context);
1678
- }
1679
- const data = await parseBody(output.body, context);
1680
- let contents = {};
1681
- contents = (0, smithy_client_1._json)(data);
1682
- const response = {
1683
- $metadata: deserializeMetadata(output),
1684
- ...contents,
1685
- };
1686
- return response;
1687
- };
1688
- exports.de_TagResourceCommand = de_TagResourceCommand;
1689
- const de_TagResourceCommandError = async (output, context) => {
1690
- const parsedOutput = {
1691
- ...output,
1692
- body: await parseErrorBody(output.body, context),
1693
- };
1694
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1695
- switch (errorCode) {
1696
- case "ConcurrentModificationException":
1697
- case "com.amazonaws.codepipeline#ConcurrentModificationException":
1698
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1699
- case "InvalidArnException":
1700
- case "com.amazonaws.codepipeline#InvalidArnException":
1701
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
1702
- case "InvalidTagsException":
1703
- case "com.amazonaws.codepipeline#InvalidTagsException":
1704
- throw await de_InvalidTagsExceptionRes(parsedOutput, context);
1705
- case "ResourceNotFoundException":
1706
- case "com.amazonaws.codepipeline#ResourceNotFoundException":
1707
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1708
- case "TooManyTagsException":
1709
- case "com.amazonaws.codepipeline#TooManyTagsException":
1710
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1711
- case "ValidationException":
1712
- case "com.amazonaws.codepipeline#ValidationException":
1713
- throw await de_ValidationExceptionRes(parsedOutput, context);
1714
- default:
1715
- const parsedBody = parsedOutput.body;
1716
- return throwDefaultError({
1717
- output,
1718
- parsedBody,
1719
- errorCode,
1720
- });
1721
- }
1722
- };
1723
- const de_UntagResourceCommand = async (output, context) => {
1724
- if (output.statusCode >= 300) {
1725
- return de_UntagResourceCommandError(output, context);
1726
- }
1727
- const data = await parseBody(output.body, context);
1728
- let contents = {};
1729
- contents = (0, smithy_client_1._json)(data);
1730
- const response = {
1731
- $metadata: deserializeMetadata(output),
1732
- ...contents,
1733
- };
1734
- return response;
1735
- };
1736
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
1737
- const de_UntagResourceCommandError = async (output, context) => {
1738
- const parsedOutput = {
1739
- ...output,
1740
- body: await parseErrorBody(output.body, context),
1741
- };
1742
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1743
- switch (errorCode) {
1744
- case "ConcurrentModificationException":
1745
- case "com.amazonaws.codepipeline#ConcurrentModificationException":
1746
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1747
- case "InvalidArnException":
1748
- case "com.amazonaws.codepipeline#InvalidArnException":
1749
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
1750
- case "InvalidTagsException":
1751
- case "com.amazonaws.codepipeline#InvalidTagsException":
1752
- throw await de_InvalidTagsExceptionRes(parsedOutput, context);
1753
- case "ResourceNotFoundException":
1754
- case "com.amazonaws.codepipeline#ResourceNotFoundException":
1755
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1756
- case "ValidationException":
1757
- case "com.amazonaws.codepipeline#ValidationException":
1758
- throw await de_ValidationExceptionRes(parsedOutput, context);
1759
- default:
1760
- const parsedBody = parsedOutput.body;
1761
- return throwDefaultError({
1762
- output,
1763
- parsedBody,
1764
- errorCode,
1765
- });
1766
- }
1767
- };
1768
- const de_UpdateActionTypeCommand = async (output, context) => {
1769
- if (output.statusCode >= 300) {
1770
- return de_UpdateActionTypeCommandError(output, context);
1771
- }
1772
- await (0, smithy_client_1.collectBody)(output.body, context);
1773
- const response = {
1774
- $metadata: deserializeMetadata(output),
1775
- };
1776
- return response;
1777
- };
1778
- exports.de_UpdateActionTypeCommand = de_UpdateActionTypeCommand;
1779
- const de_UpdateActionTypeCommandError = async (output, context) => {
1780
- const parsedOutput = {
1781
- ...output,
1782
- body: await parseErrorBody(output.body, context),
1783
- };
1784
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1785
- switch (errorCode) {
1786
- case "ActionTypeNotFoundException":
1787
- case "com.amazonaws.codepipeline#ActionTypeNotFoundException":
1788
- throw await de_ActionTypeNotFoundExceptionRes(parsedOutput, context);
1789
- case "RequestFailedException":
1790
- case "com.amazonaws.codepipeline#RequestFailedException":
1791
- throw await de_RequestFailedExceptionRes(parsedOutput, context);
1792
- case "ValidationException":
1793
- case "com.amazonaws.codepipeline#ValidationException":
1794
- throw await de_ValidationExceptionRes(parsedOutput, context);
1795
- default:
1796
- const parsedBody = parsedOutput.body;
1797
- return throwDefaultError({
1798
- output,
1799
- parsedBody,
1800
- errorCode,
1801
- });
1802
- }
1803
- };
1804
- const de_UpdatePipelineCommand = async (output, context) => {
1805
- if (output.statusCode >= 300) {
1806
- return de_UpdatePipelineCommandError(output, context);
1807
- }
1808
- const data = await parseBody(output.body, context);
1809
- let contents = {};
1810
- contents = (0, smithy_client_1._json)(data);
1811
- const response = {
1812
- $metadata: deserializeMetadata(output),
1813
- ...contents,
1814
- };
1815
- return response;
1816
- };
1817
- exports.de_UpdatePipelineCommand = de_UpdatePipelineCommand;
1818
- const de_UpdatePipelineCommandError = async (output, context) => {
1819
- const parsedOutput = {
1820
- ...output,
1821
- body: await parseErrorBody(output.body, context),
1822
- };
1823
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1824
- switch (errorCode) {
1825
- case "InvalidActionDeclarationException":
1826
- case "com.amazonaws.codepipeline#InvalidActionDeclarationException":
1827
- throw await de_InvalidActionDeclarationExceptionRes(parsedOutput, context);
1828
- case "InvalidBlockerDeclarationException":
1829
- case "com.amazonaws.codepipeline#InvalidBlockerDeclarationException":
1830
- throw await de_InvalidBlockerDeclarationExceptionRes(parsedOutput, context);
1831
- case "InvalidStageDeclarationException":
1832
- case "com.amazonaws.codepipeline#InvalidStageDeclarationException":
1833
- throw await de_InvalidStageDeclarationExceptionRes(parsedOutput, context);
1834
- case "InvalidStructureException":
1835
- case "com.amazonaws.codepipeline#InvalidStructureException":
1836
- throw await de_InvalidStructureExceptionRes(parsedOutput, context);
1837
- case "LimitExceededException":
1838
- case "com.amazonaws.codepipeline#LimitExceededException":
1839
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1840
- case "ValidationException":
1841
- case "com.amazonaws.codepipeline#ValidationException":
1842
- throw await de_ValidationExceptionRes(parsedOutput, context);
1843
- default:
1844
- const parsedBody = parsedOutput.body;
1845
- return throwDefaultError({
1846
- output,
1847
- parsedBody,
1848
- errorCode,
1849
- });
1850
- }
1851
- };
1852
- const de_ActionNotFoundExceptionRes = async (parsedOutput, context) => {
1853
- const body = parsedOutput.body;
1854
- const deserialized = (0, smithy_client_1._json)(body);
1855
- const exception = new models_0_1.ActionNotFoundException({
1856
- $metadata: deserializeMetadata(parsedOutput),
1857
- ...deserialized,
1858
- });
1859
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1860
- };
1861
- const de_ActionTypeNotFoundExceptionRes = async (parsedOutput, context) => {
1862
- const body = parsedOutput.body;
1863
- const deserialized = (0, smithy_client_1._json)(body);
1864
- const exception = new models_0_1.ActionTypeNotFoundException({
1865
- $metadata: deserializeMetadata(parsedOutput),
1866
- ...deserialized,
1867
- });
1868
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1869
- };
1870
- const de_ApprovalAlreadyCompletedExceptionRes = async (parsedOutput, context) => {
1871
- const body = parsedOutput.body;
1872
- const deserialized = (0, smithy_client_1._json)(body);
1873
- const exception = new models_0_1.ApprovalAlreadyCompletedException({
1874
- $metadata: deserializeMetadata(parsedOutput),
1875
- ...deserialized,
1876
- });
1877
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1878
- };
1879
- const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
1880
- const body = parsedOutput.body;
1881
- const deserialized = (0, smithy_client_1._json)(body);
1882
- const exception = new models_0_1.ConcurrentModificationException({
1883
- $metadata: deserializeMetadata(parsedOutput),
1884
- ...deserialized,
1885
- });
1886
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1887
- };
1888
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
1889
- const body = parsedOutput.body;
1890
- const deserialized = (0, smithy_client_1._json)(body);
1891
- const exception = new models_0_1.ConflictException({
1892
- $metadata: deserializeMetadata(parsedOutput),
1893
- ...deserialized,
1894
- });
1895
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1896
- };
1897
- const de_DuplicatedStopRequestExceptionRes = async (parsedOutput, context) => {
1898
- const body = parsedOutput.body;
1899
- const deserialized = (0, smithy_client_1._json)(body);
1900
- const exception = new models_0_1.DuplicatedStopRequestException({
1901
- $metadata: deserializeMetadata(parsedOutput),
1902
- ...deserialized,
1903
- });
1904
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1905
- };
1906
- const de_InvalidActionDeclarationExceptionRes = async (parsedOutput, context) => {
1907
- const body = parsedOutput.body;
1908
- const deserialized = (0, smithy_client_1._json)(body);
1909
- const exception = new models_0_1.InvalidActionDeclarationException({
1910
- $metadata: deserializeMetadata(parsedOutput),
1911
- ...deserialized,
1912
- });
1913
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1914
- };
1915
- const de_InvalidApprovalTokenExceptionRes = async (parsedOutput, context) => {
1916
- const body = parsedOutput.body;
1917
- const deserialized = (0, smithy_client_1._json)(body);
1918
- const exception = new models_0_1.InvalidApprovalTokenException({
1919
- $metadata: deserializeMetadata(parsedOutput),
1920
- ...deserialized,
1921
- });
1922
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1923
- };
1924
- const de_InvalidArnExceptionRes = async (parsedOutput, context) => {
1925
- const body = parsedOutput.body;
1926
- const deserialized = (0, smithy_client_1._json)(body);
1927
- const exception = new models_0_1.InvalidArnException({
1928
- $metadata: deserializeMetadata(parsedOutput),
1929
- ...deserialized,
1930
- });
1931
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1932
- };
1933
- const de_InvalidBlockerDeclarationExceptionRes = async (parsedOutput, context) => {
1934
- const body = parsedOutput.body;
1935
- const deserialized = (0, smithy_client_1._json)(body);
1936
- const exception = new models_0_1.InvalidBlockerDeclarationException({
1937
- $metadata: deserializeMetadata(parsedOutput),
1938
- ...deserialized,
1939
- });
1940
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1941
- };
1942
- const de_InvalidClientTokenExceptionRes = async (parsedOutput, context) => {
1943
- const body = parsedOutput.body;
1944
- const deserialized = (0, smithy_client_1._json)(body);
1945
- const exception = new models_0_1.InvalidClientTokenException({
1946
- $metadata: deserializeMetadata(parsedOutput),
1947
- ...deserialized,
1948
- });
1949
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1950
- };
1951
- const de_InvalidJobExceptionRes = async (parsedOutput, context) => {
1952
- const body = parsedOutput.body;
1953
- const deserialized = (0, smithy_client_1._json)(body);
1954
- const exception = new models_0_1.InvalidJobException({
1955
- $metadata: deserializeMetadata(parsedOutput),
1956
- ...deserialized,
1957
- });
1958
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1959
- };
1960
- const de_InvalidJobStateExceptionRes = async (parsedOutput, context) => {
1961
- const body = parsedOutput.body;
1962
- const deserialized = (0, smithy_client_1._json)(body);
1963
- const exception = new models_0_1.InvalidJobStateException({
1964
- $metadata: deserializeMetadata(parsedOutput),
1965
- ...deserialized,
1966
- });
1967
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1968
- };
1969
- const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
1970
- const body = parsedOutput.body;
1971
- const deserialized = (0, smithy_client_1._json)(body);
1972
- const exception = new models_0_1.InvalidNextTokenException({
1973
- $metadata: deserializeMetadata(parsedOutput),
1974
- ...deserialized,
1975
- });
1976
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1977
- };
1978
- const de_InvalidNonceExceptionRes = async (parsedOutput, context) => {
1979
- const body = parsedOutput.body;
1980
- const deserialized = (0, smithy_client_1._json)(body);
1981
- const exception = new models_0_1.InvalidNonceException({
1982
- $metadata: deserializeMetadata(parsedOutput),
1983
- ...deserialized,
1984
- });
1985
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1986
- };
1987
- const de_InvalidStageDeclarationExceptionRes = async (parsedOutput, context) => {
1988
- const body = parsedOutput.body;
1989
- const deserialized = (0, smithy_client_1._json)(body);
1990
- const exception = new models_0_1.InvalidStageDeclarationException({
1991
- $metadata: deserializeMetadata(parsedOutput),
1992
- ...deserialized,
1993
- });
1994
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1995
- };
1996
- const de_InvalidStructureExceptionRes = async (parsedOutput, context) => {
1997
- const body = parsedOutput.body;
1998
- const deserialized = (0, smithy_client_1._json)(body);
1999
- const exception = new models_0_1.InvalidStructureException({
2000
- $metadata: deserializeMetadata(parsedOutput),
2001
- ...deserialized,
2002
- });
2003
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2004
- };
2005
- const de_InvalidTagsExceptionRes = async (parsedOutput, context) => {
2006
- const body = parsedOutput.body;
2007
- const deserialized = (0, smithy_client_1._json)(body);
2008
- const exception = new models_0_1.InvalidTagsException({
2009
- $metadata: deserializeMetadata(parsedOutput),
2010
- ...deserialized,
2011
- });
2012
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2013
- };
2014
- const de_InvalidWebhookAuthenticationParametersExceptionRes = async (parsedOutput, context) => {
2015
- const body = parsedOutput.body;
2016
- const deserialized = (0, smithy_client_1._json)(body);
2017
- const exception = new models_0_1.InvalidWebhookAuthenticationParametersException({
2018
- $metadata: deserializeMetadata(parsedOutput),
2019
- ...deserialized,
2020
- });
2021
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2022
- };
2023
- const de_InvalidWebhookFilterPatternExceptionRes = async (parsedOutput, context) => {
2024
- const body = parsedOutput.body;
2025
- const deserialized = (0, smithy_client_1._json)(body);
2026
- const exception = new models_0_1.InvalidWebhookFilterPatternException({
2027
- $metadata: deserializeMetadata(parsedOutput),
2028
- ...deserialized,
2029
- });
2030
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2031
- };
2032
- const de_JobNotFoundExceptionRes = async (parsedOutput, context) => {
2033
- const body = parsedOutput.body;
2034
- const deserialized = (0, smithy_client_1._json)(body);
2035
- const exception = new models_0_1.JobNotFoundException({
2036
- $metadata: deserializeMetadata(parsedOutput),
2037
- ...deserialized,
2038
- });
2039
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2040
- };
2041
- const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
2042
- const body = parsedOutput.body;
2043
- const deserialized = (0, smithy_client_1._json)(body);
2044
- const exception = new models_0_1.LimitExceededException({
2045
- $metadata: deserializeMetadata(parsedOutput),
2046
- ...deserialized,
2047
- });
2048
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2049
- };
2050
- const de_NotLatestPipelineExecutionExceptionRes = async (parsedOutput, context) => {
2051
- const body = parsedOutput.body;
2052
- const deserialized = (0, smithy_client_1._json)(body);
2053
- const exception = new models_0_1.NotLatestPipelineExecutionException({
2054
- $metadata: deserializeMetadata(parsedOutput),
2055
- ...deserialized,
2056
- });
2057
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2058
- };
2059
- const de_OutputVariablesSizeExceededExceptionRes = async (parsedOutput, context) => {
2060
- const body = parsedOutput.body;
2061
- const deserialized = (0, smithy_client_1._json)(body);
2062
- const exception = new models_0_1.OutputVariablesSizeExceededException({
2063
- $metadata: deserializeMetadata(parsedOutput),
2064
- ...deserialized,
2065
- });
2066
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2067
- };
2068
- const de_PipelineExecutionNotFoundExceptionRes = async (parsedOutput, context) => {
2069
- const body = parsedOutput.body;
2070
- const deserialized = (0, smithy_client_1._json)(body);
2071
- const exception = new models_0_1.PipelineExecutionNotFoundException({
2072
- $metadata: deserializeMetadata(parsedOutput),
2073
- ...deserialized,
2074
- });
2075
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2076
- };
2077
- const de_PipelineExecutionNotStoppableExceptionRes = async (parsedOutput, context) => {
2078
- const body = parsedOutput.body;
2079
- const deserialized = (0, smithy_client_1._json)(body);
2080
- const exception = new models_0_1.PipelineExecutionNotStoppableException({
2081
- $metadata: deserializeMetadata(parsedOutput),
2082
- ...deserialized,
2083
- });
2084
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2085
- };
2086
- const de_PipelineNameInUseExceptionRes = async (parsedOutput, context) => {
2087
- const body = parsedOutput.body;
2088
- const deserialized = (0, smithy_client_1._json)(body);
2089
- const exception = new models_0_1.PipelineNameInUseException({
2090
- $metadata: deserializeMetadata(parsedOutput),
2091
- ...deserialized,
2092
- });
2093
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2094
- };
2095
- const de_PipelineNotFoundExceptionRes = async (parsedOutput, context) => {
2096
- const body = parsedOutput.body;
2097
- const deserialized = (0, smithy_client_1._json)(body);
2098
- const exception = new models_0_1.PipelineNotFoundException({
2099
- $metadata: deserializeMetadata(parsedOutput),
2100
- ...deserialized,
2101
- });
2102
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2103
- };
2104
- const de_PipelineVersionNotFoundExceptionRes = async (parsedOutput, context) => {
2105
- const body = parsedOutput.body;
2106
- const deserialized = (0, smithy_client_1._json)(body);
2107
- const exception = new models_0_1.PipelineVersionNotFoundException({
2108
- $metadata: deserializeMetadata(parsedOutput),
2109
- ...deserialized,
2110
- });
2111
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2112
- };
2113
- const de_RequestFailedExceptionRes = async (parsedOutput, context) => {
2114
- const body = parsedOutput.body;
2115
- const deserialized = (0, smithy_client_1._json)(body);
2116
- const exception = new models_0_1.RequestFailedException({
2117
- $metadata: deserializeMetadata(parsedOutput),
2118
- ...deserialized,
2119
- });
2120
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2121
- };
2122
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2123
- const body = parsedOutput.body;
2124
- const deserialized = (0, smithy_client_1._json)(body);
2125
- const exception = new models_0_1.ResourceNotFoundException({
2126
- $metadata: deserializeMetadata(parsedOutput),
2127
- ...deserialized,
2128
- });
2129
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2130
- };
2131
- const de_StageNotFoundExceptionRes = async (parsedOutput, context) => {
2132
- const body = parsedOutput.body;
2133
- const deserialized = (0, smithy_client_1._json)(body);
2134
- const exception = new models_0_1.StageNotFoundException({
2135
- $metadata: deserializeMetadata(parsedOutput),
2136
- ...deserialized,
2137
- });
2138
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2139
- };
2140
- const de_StageNotRetryableExceptionRes = async (parsedOutput, context) => {
2141
- const body = parsedOutput.body;
2142
- const deserialized = (0, smithy_client_1._json)(body);
2143
- const exception = new models_0_1.StageNotRetryableException({
2144
- $metadata: deserializeMetadata(parsedOutput),
2145
- ...deserialized,
2146
- });
2147
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2148
- };
2149
- const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
2150
- const body = parsedOutput.body;
2151
- const deserialized = (0, smithy_client_1._json)(body);
2152
- const exception = new models_0_1.TooManyTagsException({
2153
- $metadata: deserializeMetadata(parsedOutput),
2154
- ...deserialized,
2155
- });
2156
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2157
- };
2158
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
2159
- const body = parsedOutput.body;
2160
- const deserialized = (0, smithy_client_1._json)(body);
2161
- const exception = new models_0_1.ValidationException({
2162
- $metadata: deserializeMetadata(parsedOutput),
2163
- ...deserialized,
2164
- });
2165
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2166
- };
2167
- const de_WebhookNotFoundExceptionRes = async (parsedOutput, context) => {
2168
- const body = parsedOutput.body;
2169
- const deserialized = (0, smithy_client_1._json)(body);
2170
- const exception = new models_0_1.WebhookNotFoundException({
2171
- $metadata: deserializeMetadata(parsedOutput),
2172
- ...deserialized,
2173
- });
2174
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2175
- };
2176
- const se_ActionRevision = (input, context) => {
2177
- return (0, smithy_client_1.take)(input, {
2178
- created: (_) => Math.round(_.getTime() / 1000),
2179
- revisionChangeId: [],
2180
- revisionId: [],
2181
- });
2182
- };
2183
- const se_CurrentRevision = (input, context) => {
2184
- return (0, smithy_client_1.take)(input, {
2185
- changeIdentifier: [],
2186
- created: (_) => Math.round(_.getTime() / 1000),
2187
- revision: [],
2188
- revisionSummary: [],
2189
- });
2190
- };
2191
- const se_PutActionRevisionInput = (input, context) => {
2192
- return (0, smithy_client_1.take)(input, {
2193
- actionName: [],
2194
- actionRevision: (_) => se_ActionRevision(_, context),
2195
- pipelineName: [],
2196
- stageName: [],
2197
- });
2198
- };
2199
- const se_PutJobSuccessResultInput = (input, context) => {
2200
- return (0, smithy_client_1.take)(input, {
2201
- continuationToken: [],
2202
- currentRevision: (_) => se_CurrentRevision(_, context),
2203
- executionDetails: smithy_client_1._json,
2204
- jobId: [],
2205
- outputVariables: smithy_client_1._json,
2206
- });
2207
- };
2208
- const se_PutThirdPartyJobSuccessResultInput = (input, context) => {
2209
- return (0, smithy_client_1.take)(input, {
2210
- clientToken: [],
2211
- continuationToken: [],
2212
- currentRevision: (_) => se_CurrentRevision(_, context),
2213
- executionDetails: smithy_client_1._json,
2214
- jobId: [],
2215
- });
2216
- };
2217
- const se_StartPipelineExecutionInput = (input, context) => {
2218
- return (0, smithy_client_1.take)(input, {
2219
- clientRequestToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
2220
- name: [],
2221
- sourceRevisions: smithy_client_1._json,
2222
- variables: smithy_client_1._json,
2223
- });
2224
- };
2225
- const de_ActionExecution = (output, context) => {
2226
- return (0, smithy_client_1.take)(output, {
2227
- actionExecutionId: smithy_client_1.expectString,
2228
- errorDetails: smithy_client_1._json,
2229
- externalExecutionId: smithy_client_1.expectString,
2230
- externalExecutionUrl: smithy_client_1.expectString,
2231
- lastStatusChange: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2232
- lastUpdatedBy: smithy_client_1.expectString,
2233
- percentComplete: smithy_client_1.expectInt32,
2234
- status: smithy_client_1.expectString,
2235
- summary: smithy_client_1.expectString,
2236
- token: smithy_client_1.expectString,
2237
- });
2238
- };
2239
- const de_ActionExecutionDetail = (output, context) => {
2240
- return (0, smithy_client_1.take)(output, {
2241
- actionExecutionId: smithy_client_1.expectString,
2242
- actionName: smithy_client_1.expectString,
2243
- input: smithy_client_1._json,
2244
- lastUpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2245
- output: smithy_client_1._json,
2246
- pipelineExecutionId: smithy_client_1.expectString,
2247
- pipelineVersion: smithy_client_1.expectInt32,
2248
- stageName: smithy_client_1.expectString,
2249
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2250
- status: smithy_client_1.expectString,
2251
- });
2252
- };
2253
- const de_ActionExecutionDetailList = (output, context) => {
2254
- const retVal = (output || [])
2255
- .filter((e) => e != null)
2256
- .map((entry) => {
2257
- return de_ActionExecutionDetail(entry, context);
2258
- });
2259
- return retVal;
2260
- };
2261
- const de_ActionRevision = (output, context) => {
2262
- return (0, smithy_client_1.take)(output, {
2263
- created: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2264
- revisionChangeId: smithy_client_1.expectString,
2265
- revisionId: smithy_client_1.expectString,
2266
- });
2267
- };
2268
- const de_ActionState = (output, context) => {
2269
- return (0, smithy_client_1.take)(output, {
2270
- actionName: smithy_client_1.expectString,
2271
- currentRevision: (_) => de_ActionRevision(_, context),
2272
- entityUrl: smithy_client_1.expectString,
2273
- latestExecution: (_) => de_ActionExecution(_, context),
2274
- revisionUrl: smithy_client_1.expectString,
2275
- });
2276
- };
2277
- const de_ActionStateList = (output, context) => {
2278
- const retVal = (output || [])
2279
- .filter((e) => e != null)
2280
- .map((entry) => {
2281
- return de_ActionState(entry, context);
2282
- });
2283
- return retVal;
2284
- };
2285
- const de_ArtifactRevision = (output, context) => {
2286
- return (0, smithy_client_1.take)(output, {
2287
- created: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2288
- name: smithy_client_1.expectString,
2289
- revisionChangeIdentifier: smithy_client_1.expectString,
2290
- revisionId: smithy_client_1.expectString,
2291
- revisionSummary: smithy_client_1.expectString,
2292
- revisionUrl: smithy_client_1.expectString,
2293
- });
2294
- };
2295
- const de_ArtifactRevisionList = (output, context) => {
2296
- const retVal = (output || [])
2297
- .filter((e) => e != null)
2298
- .map((entry) => {
2299
- return de_ArtifactRevision(entry, context);
2300
- });
2301
- return retVal;
2302
- };
2303
- const de_GetPipelineExecutionOutput = (output, context) => {
2304
- return (0, smithy_client_1.take)(output, {
2305
- pipelineExecution: (_) => de_PipelineExecution(_, context),
2306
- });
2307
- };
2308
- const de_GetPipelineOutput = (output, context) => {
2309
- return (0, smithy_client_1.take)(output, {
2310
- metadata: (_) => de_PipelineMetadata(_, context),
2311
- pipeline: smithy_client_1._json,
2312
- });
2313
- };
2314
- const de_GetPipelineStateOutput = (output, context) => {
2315
- return (0, smithy_client_1.take)(output, {
2316
- created: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2317
- pipelineName: smithy_client_1.expectString,
2318
- pipelineVersion: smithy_client_1.expectInt32,
2319
- stageStates: (_) => de_StageStateList(_, context),
2320
- updated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2321
- });
2322
- };
2323
- const de_ListActionExecutionsOutput = (output, context) => {
2324
- return (0, smithy_client_1.take)(output, {
2325
- actionExecutionDetails: (_) => de_ActionExecutionDetailList(_, context),
2326
- nextToken: smithy_client_1.expectString,
2327
- });
2328
- };
2329
- const de_ListPipelineExecutionsOutput = (output, context) => {
2330
- return (0, smithy_client_1.take)(output, {
2331
- nextToken: smithy_client_1.expectString,
2332
- pipelineExecutionSummaries: (_) => de_PipelineExecutionSummaryList(_, context),
2333
- });
2334
- };
2335
- const de_ListPipelinesOutput = (output, context) => {
2336
- return (0, smithy_client_1.take)(output, {
2337
- nextToken: smithy_client_1.expectString,
2338
- pipelines: (_) => de_PipelineList(_, context),
2339
- });
2340
- };
2341
- const de_ListWebhookItem = (output, context) => {
2342
- return (0, smithy_client_1.take)(output, {
2343
- arn: smithy_client_1.expectString,
2344
- definition: smithy_client_1._json,
2345
- errorCode: smithy_client_1.expectString,
2346
- errorMessage: smithy_client_1.expectString,
2347
- lastTriggered: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2348
- tags: smithy_client_1._json,
2349
- url: smithy_client_1.expectString,
2350
- });
2351
- };
2352
- const de_ListWebhooksOutput = (output, context) => {
2353
- return (0, smithy_client_1.take)(output, {
2354
- NextToken: smithy_client_1.expectString,
2355
- webhooks: (_) => de_WebhookList(_, context),
2356
- });
2357
- };
2358
- const de_PipelineExecution = (output, context) => {
2359
- return (0, smithy_client_1.take)(output, {
2360
- artifactRevisions: (_) => de_ArtifactRevisionList(_, context),
2361
- pipelineExecutionId: smithy_client_1.expectString,
2362
- pipelineName: smithy_client_1.expectString,
2363
- pipelineVersion: smithy_client_1.expectInt32,
2364
- status: smithy_client_1.expectString,
2365
- statusSummary: smithy_client_1.expectString,
2366
- trigger: smithy_client_1._json,
2367
- variables: smithy_client_1._json,
2368
- });
2369
- };
2370
- const de_PipelineExecutionSummary = (output, context) => {
2371
- return (0, smithy_client_1.take)(output, {
2372
- lastUpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2373
- pipelineExecutionId: smithy_client_1.expectString,
2374
- sourceRevisions: smithy_client_1._json,
2375
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2376
- status: smithy_client_1.expectString,
2377
- stopTrigger: smithy_client_1._json,
2378
- trigger: smithy_client_1._json,
2379
- });
2380
- };
2381
- const de_PipelineExecutionSummaryList = (output, context) => {
2382
- const retVal = (output || [])
2383
- .filter((e) => e != null)
2384
- .map((entry) => {
2385
- return de_PipelineExecutionSummary(entry, context);
2386
- });
2387
- return retVal;
2388
- };
2389
- const de_PipelineList = (output, context) => {
2390
- const retVal = (output || [])
2391
- .filter((e) => e != null)
2392
- .map((entry) => {
2393
- return de_PipelineSummary(entry, context);
2394
- });
2395
- return retVal;
2396
- };
2397
- const de_PipelineMetadata = (output, context) => {
2398
- return (0, smithy_client_1.take)(output, {
2399
- created: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2400
- pipelineArn: smithy_client_1.expectString,
2401
- pollingDisabledAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2402
- updated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2403
- });
2404
- };
2405
- const de_PipelineSummary = (output, context) => {
2406
- return (0, smithy_client_1.take)(output, {
2407
- created: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2408
- name: smithy_client_1.expectString,
2409
- pipelineType: smithy_client_1.expectString,
2410
- updated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2411
- version: smithy_client_1.expectInt32,
2412
- });
2413
- };
2414
- const de_PutApprovalResultOutput = (output, context) => {
2415
- return (0, smithy_client_1.take)(output, {
2416
- approvedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2417
- });
2418
- };
2419
- const de_PutWebhookOutput = (output, context) => {
2420
- return (0, smithy_client_1.take)(output, {
2421
- webhook: (_) => de_ListWebhookItem(_, context),
2422
- });
2423
- };
2424
- const de_StageState = (output, context) => {
2425
- return (0, smithy_client_1.take)(output, {
2426
- actionStates: (_) => de_ActionStateList(_, context),
2427
- inboundExecution: smithy_client_1._json,
2428
- inboundTransitionState: (_) => de_TransitionState(_, context),
2429
- latestExecution: smithy_client_1._json,
2430
- stageName: smithy_client_1.expectString,
2431
- });
2432
- };
2433
- const de_StageStateList = (output, context) => {
2434
- const retVal = (output || [])
2435
- .filter((e) => e != null)
2436
- .map((entry) => {
2437
- return de_StageState(entry, context);
2438
- });
2439
- return retVal;
2440
- };
2441
- const de_TransitionState = (output, context) => {
2442
- return (0, smithy_client_1.take)(output, {
2443
- disabledReason: smithy_client_1.expectString,
2444
- enabled: smithy_client_1.expectBoolean,
2445
- lastChangedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2446
- lastChangedBy: smithy_client_1.expectString,
2447
- });
2448
- };
2449
- const de_WebhookList = (output, context) => {
2450
- const retVal = (output || [])
2451
- .filter((e) => e != null)
2452
- .map((entry) => {
2453
- return de_ListWebhookItem(entry, context);
2454
- });
2455
- return retVal;
2456
- };
2457
- const deserializeMetadata = (output) => ({
2458
- httpStatusCode: output.statusCode,
2459
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2460
- extendedRequestId: output.headers["x-amz-id-2"],
2461
- cfId: output.headers["x-amz-cf-id"],
2462
- });
2463
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
2464
- const throwDefaultError = (0, smithy_client_1.withBaseException)(CodePipelineServiceException_1.CodePipelineServiceException);
2465
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2466
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2467
- const contents = {
2468
- protocol,
2469
- hostname,
2470
- port,
2471
- method: "POST",
2472
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2473
- headers,
2474
- };
2475
- if (resolvedHostname !== undefined) {
2476
- contents.hostname = resolvedHostname;
2477
- }
2478
- if (body !== undefined) {
2479
- contents.body = body;
2480
- }
2481
- return new protocol_http_1.HttpRequest(contents);
2482
- };
2483
- function sharedHeaders(operation) {
2484
- return {
2485
- "content-type": "application/x-amz-json-1.1",
2486
- "x-amz-target": `CodePipeline_20150709.${operation}`,
2487
- };
2488
- }
2489
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2490
- if (encoded.length) {
2491
- return JSON.parse(encoded);
2492
- }
2493
- return {};
2494
- });
2495
- const parseErrorBody = async (errorBody, context) => {
2496
- const value = await parseBody(errorBody, context);
2497
- value.message = value.message ?? value.Message;
2498
- return value;
2499
- };
2500
- const loadRestJsonErrorCode = (output, data) => {
2501
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2502
- const sanitizeErrorCode = (rawValue) => {
2503
- let cleanValue = rawValue;
2504
- if (typeof cleanValue === "number") {
2505
- cleanValue = cleanValue.toString();
2506
- }
2507
- if (cleanValue.indexOf(",") >= 0) {
2508
- cleanValue = cleanValue.split(",")[0];
2509
- }
2510
- if (cleanValue.indexOf(":") >= 0) {
2511
- cleanValue = cleanValue.split(":")[0];
2512
- }
2513
- if (cleanValue.indexOf("#") >= 0) {
2514
- cleanValue = cleanValue.split("#")[1];
2515
- }
2516
- return cleanValue;
2517
- };
2518
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2519
- if (headerKey !== undefined) {
2520
- return sanitizeErrorCode(output.headers[headerKey]);
2521
- }
2522
- if (data.code !== undefined) {
2523
- return sanitizeErrorCode(data.code);
2524
- }
2525
- if (data["__type"] !== undefined) {
2526
- return sanitizeErrorCode(data["__type"]);
2527
- }
2528
- };
1
+ module.exports = require("../index.js");