@aws-sdk/client-codebuild 3.490.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 (71) hide show
  1. package/dist-cjs/CodeBuild.js +1 -101
  2. package/dist-cjs/CodeBuildClient.js +1 -43
  3. package/dist-cjs/commands/BatchDeleteBuildsCommand.js +1 -28
  4. package/dist-cjs/commands/BatchGetBuildBatchesCommand.js +1 -28
  5. package/dist-cjs/commands/BatchGetBuildsCommand.js +1 -28
  6. package/dist-cjs/commands/BatchGetProjectsCommand.js +1 -28
  7. package/dist-cjs/commands/BatchGetReportGroupsCommand.js +1 -28
  8. package/dist-cjs/commands/BatchGetReportsCommand.js +1 -28
  9. package/dist-cjs/commands/CreateProjectCommand.js +1 -28
  10. package/dist-cjs/commands/CreateReportGroupCommand.js +1 -28
  11. package/dist-cjs/commands/CreateWebhookCommand.js +1 -28
  12. package/dist-cjs/commands/DeleteBuildBatchCommand.js +1 -28
  13. package/dist-cjs/commands/DeleteProjectCommand.js +1 -28
  14. package/dist-cjs/commands/DeleteReportCommand.js +1 -28
  15. package/dist-cjs/commands/DeleteReportGroupCommand.js +1 -28
  16. package/dist-cjs/commands/DeleteResourcePolicyCommand.js +1 -28
  17. package/dist-cjs/commands/DeleteSourceCredentialsCommand.js +1 -28
  18. package/dist-cjs/commands/DeleteWebhookCommand.js +1 -28
  19. package/dist-cjs/commands/DescribeCodeCoveragesCommand.js +1 -28
  20. package/dist-cjs/commands/DescribeTestCasesCommand.js +1 -28
  21. package/dist-cjs/commands/GetReportGroupTrendCommand.js +1 -28
  22. package/dist-cjs/commands/GetResourcePolicyCommand.js +1 -28
  23. package/dist-cjs/commands/ImportSourceCredentialsCommand.js +1 -29
  24. package/dist-cjs/commands/InvalidateProjectCacheCommand.js +1 -28
  25. package/dist-cjs/commands/ListBuildBatchesCommand.js +1 -28
  26. package/dist-cjs/commands/ListBuildBatchesForProjectCommand.js +1 -28
  27. package/dist-cjs/commands/ListBuildsCommand.js +1 -28
  28. package/dist-cjs/commands/ListBuildsForProjectCommand.js +1 -28
  29. package/dist-cjs/commands/ListCuratedEnvironmentImagesCommand.js +1 -28
  30. package/dist-cjs/commands/ListProjectsCommand.js +1 -28
  31. package/dist-cjs/commands/ListReportGroupsCommand.js +1 -28
  32. package/dist-cjs/commands/ListReportsCommand.js +1 -28
  33. package/dist-cjs/commands/ListReportsForReportGroupCommand.js +1 -28
  34. package/dist-cjs/commands/ListSharedProjectsCommand.js +1 -28
  35. package/dist-cjs/commands/ListSharedReportGroupsCommand.js +1 -28
  36. package/dist-cjs/commands/ListSourceCredentialsCommand.js +1 -28
  37. package/dist-cjs/commands/PutResourcePolicyCommand.js +1 -28
  38. package/dist-cjs/commands/RetryBuildBatchCommand.js +1 -28
  39. package/dist-cjs/commands/RetryBuildCommand.js +1 -28
  40. package/dist-cjs/commands/StartBuildBatchCommand.js +1 -28
  41. package/dist-cjs/commands/StartBuildCommand.js +1 -28
  42. package/dist-cjs/commands/StopBuildBatchCommand.js +1 -28
  43. package/dist-cjs/commands/StopBuildCommand.js +1 -28
  44. package/dist-cjs/commands/UpdateProjectCommand.js +1 -28
  45. package/dist-cjs/commands/UpdateProjectVisibilityCommand.js +1 -28
  46. package/dist-cjs/commands/UpdateReportGroupCommand.js +1 -28
  47. package/dist-cjs/commands/UpdateWebhookCommand.js +1 -28
  48. package/dist-cjs/commands/index.js +1 -48
  49. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  50. package/dist-cjs/extensionConfiguration.js +1 -2
  51. package/dist-cjs/index.js +3842 -11
  52. package/dist-cjs/models/CodeBuildServiceException.js +1 -12
  53. package/dist-cjs/models/index.js +1 -4
  54. package/dist-cjs/models/models_0.js +1 -293
  55. package/dist-cjs/pagination/DescribeCodeCoveragesPaginator.js +1 -7
  56. package/dist-cjs/pagination/DescribeTestCasesPaginator.js +1 -7
  57. package/dist-cjs/pagination/Interfaces.js +1 -2
  58. package/dist-cjs/pagination/ListBuildBatchesForProjectPaginator.js +1 -7
  59. package/dist-cjs/pagination/ListBuildBatchesPaginator.js +1 -7
  60. package/dist-cjs/pagination/ListBuildsForProjectPaginator.js +1 -7
  61. package/dist-cjs/pagination/ListBuildsPaginator.js +1 -7
  62. package/dist-cjs/pagination/ListProjectsPaginator.js +1 -7
  63. package/dist-cjs/pagination/ListReportGroupsPaginator.js +1 -7
  64. package/dist-cjs/pagination/ListReportsForReportGroupPaginator.js +1 -7
  65. package/dist-cjs/pagination/ListReportsPaginator.js +1 -7
  66. package/dist-cjs/pagination/ListSharedProjectsPaginator.js +1 -7
  67. package/dist-cjs/pagination/ListSharedReportGroupsPaginator.js +1 -7
  68. package/dist-cjs/pagination/index.js +1 -16
  69. package/dist-cjs/protocols/Aws_json1_1.js +1 -2434
  70. package/dist-cjs/runtimeExtensions.js +1 -22
  71. package/package.json +40 -40
@@ -1,2434 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_BatchGetReportGroupsCommand = exports.de_BatchGetProjectsCommand = exports.de_BatchGetBuildsCommand = exports.de_BatchGetBuildBatchesCommand = exports.de_BatchDeleteBuildsCommand = exports.se_UpdateWebhookCommand = exports.se_UpdateReportGroupCommand = exports.se_UpdateProjectVisibilityCommand = exports.se_UpdateProjectCommand = exports.se_StopBuildBatchCommand = exports.se_StopBuildCommand = exports.se_StartBuildBatchCommand = exports.se_StartBuildCommand = exports.se_RetryBuildBatchCommand = exports.se_RetryBuildCommand = exports.se_PutResourcePolicyCommand = exports.se_ListSourceCredentialsCommand = exports.se_ListSharedReportGroupsCommand = exports.se_ListSharedProjectsCommand = exports.se_ListReportsForReportGroupCommand = exports.se_ListReportsCommand = exports.se_ListReportGroupsCommand = exports.se_ListProjectsCommand = exports.se_ListCuratedEnvironmentImagesCommand = exports.se_ListBuildsForProjectCommand = exports.se_ListBuildsCommand = exports.se_ListBuildBatchesForProjectCommand = exports.se_ListBuildBatchesCommand = exports.se_InvalidateProjectCacheCommand = exports.se_ImportSourceCredentialsCommand = exports.se_GetResourcePolicyCommand = exports.se_GetReportGroupTrendCommand = exports.se_DescribeTestCasesCommand = exports.se_DescribeCodeCoveragesCommand = exports.se_DeleteWebhookCommand = exports.se_DeleteSourceCredentialsCommand = exports.se_DeleteResourcePolicyCommand = exports.se_DeleteReportGroupCommand = exports.se_DeleteReportCommand = exports.se_DeleteProjectCommand = exports.se_DeleteBuildBatchCommand = exports.se_CreateWebhookCommand = exports.se_CreateReportGroupCommand = exports.se_CreateProjectCommand = exports.se_BatchGetReportsCommand = exports.se_BatchGetReportGroupsCommand = exports.se_BatchGetProjectsCommand = exports.se_BatchGetBuildsCommand = exports.se_BatchGetBuildBatchesCommand = exports.se_BatchDeleteBuildsCommand = void 0;
4
- exports.de_UpdateWebhookCommand = exports.de_UpdateReportGroupCommand = exports.de_UpdateProjectVisibilityCommand = exports.de_UpdateProjectCommand = exports.de_StopBuildBatchCommand = exports.de_StopBuildCommand = exports.de_StartBuildBatchCommand = exports.de_StartBuildCommand = exports.de_RetryBuildBatchCommand = exports.de_RetryBuildCommand = exports.de_PutResourcePolicyCommand = exports.de_ListSourceCredentialsCommand = exports.de_ListSharedReportGroupsCommand = exports.de_ListSharedProjectsCommand = exports.de_ListReportsForReportGroupCommand = exports.de_ListReportsCommand = exports.de_ListReportGroupsCommand = exports.de_ListProjectsCommand = exports.de_ListCuratedEnvironmentImagesCommand = exports.de_ListBuildsForProjectCommand = exports.de_ListBuildsCommand = exports.de_ListBuildBatchesForProjectCommand = exports.de_ListBuildBatchesCommand = exports.de_InvalidateProjectCacheCommand = exports.de_ImportSourceCredentialsCommand = exports.de_GetResourcePolicyCommand = exports.de_GetReportGroupTrendCommand = exports.de_DescribeTestCasesCommand = exports.de_DescribeCodeCoveragesCommand = exports.de_DeleteWebhookCommand = exports.de_DeleteSourceCredentialsCommand = exports.de_DeleteResourcePolicyCommand = exports.de_DeleteReportGroupCommand = exports.de_DeleteReportCommand = exports.de_DeleteProjectCommand = exports.de_DeleteBuildBatchCommand = exports.de_CreateWebhookCommand = exports.de_CreateReportGroupCommand = exports.de_CreateProjectCommand = exports.de_BatchGetReportsCommand = void 0;
5
- const protocol_http_1 = require("@smithy/protocol-http");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const CodeBuildServiceException_1 = require("../models/CodeBuildServiceException");
8
- const models_0_1 = require("../models/models_0");
9
- const se_BatchDeleteBuildsCommand = async (input, context) => {
10
- const headers = sharedHeaders("BatchDeleteBuilds");
11
- let body;
12
- body = JSON.stringify((0, smithy_client_1._json)(input));
13
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
- };
15
- exports.se_BatchDeleteBuildsCommand = se_BatchDeleteBuildsCommand;
16
- const se_BatchGetBuildBatchesCommand = async (input, context) => {
17
- const headers = sharedHeaders("BatchGetBuildBatches");
18
- let body;
19
- body = JSON.stringify((0, smithy_client_1._json)(input));
20
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
21
- };
22
- exports.se_BatchGetBuildBatchesCommand = se_BatchGetBuildBatchesCommand;
23
- const se_BatchGetBuildsCommand = async (input, context) => {
24
- const headers = sharedHeaders("BatchGetBuilds");
25
- let body;
26
- body = JSON.stringify((0, smithy_client_1._json)(input));
27
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
- };
29
- exports.se_BatchGetBuildsCommand = se_BatchGetBuildsCommand;
30
- const se_BatchGetProjectsCommand = async (input, context) => {
31
- const headers = sharedHeaders("BatchGetProjects");
32
- let body;
33
- body = JSON.stringify((0, smithy_client_1._json)(input));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- exports.se_BatchGetProjectsCommand = se_BatchGetProjectsCommand;
37
- const se_BatchGetReportGroupsCommand = async (input, context) => {
38
- const headers = sharedHeaders("BatchGetReportGroups");
39
- let body;
40
- body = JSON.stringify((0, smithy_client_1._json)(input));
41
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
42
- };
43
- exports.se_BatchGetReportGroupsCommand = se_BatchGetReportGroupsCommand;
44
- const se_BatchGetReportsCommand = async (input, context) => {
45
- const headers = sharedHeaders("BatchGetReports");
46
- let body;
47
- body = JSON.stringify((0, smithy_client_1._json)(input));
48
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
- };
50
- exports.se_BatchGetReportsCommand = se_BatchGetReportsCommand;
51
- const se_CreateProjectCommand = async (input, context) => {
52
- const headers = sharedHeaders("CreateProject");
53
- let body;
54
- body = JSON.stringify((0, smithy_client_1._json)(input));
55
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
56
- };
57
- exports.se_CreateProjectCommand = se_CreateProjectCommand;
58
- const se_CreateReportGroupCommand = async (input, context) => {
59
- const headers = sharedHeaders("CreateReportGroup");
60
- let body;
61
- body = JSON.stringify((0, smithy_client_1._json)(input));
62
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
63
- };
64
- exports.se_CreateReportGroupCommand = se_CreateReportGroupCommand;
65
- const se_CreateWebhookCommand = async (input, context) => {
66
- const headers = sharedHeaders("CreateWebhook");
67
- let body;
68
- body = JSON.stringify((0, smithy_client_1._json)(input));
69
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
- };
71
- exports.se_CreateWebhookCommand = se_CreateWebhookCommand;
72
- const se_DeleteBuildBatchCommand = async (input, context) => {
73
- const headers = sharedHeaders("DeleteBuildBatch");
74
- let body;
75
- body = JSON.stringify((0, smithy_client_1._json)(input));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- exports.se_DeleteBuildBatchCommand = se_DeleteBuildBatchCommand;
79
- const se_DeleteProjectCommand = async (input, context) => {
80
- const headers = sharedHeaders("DeleteProject");
81
- let body;
82
- body = JSON.stringify((0, smithy_client_1._json)(input));
83
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
84
- };
85
- exports.se_DeleteProjectCommand = se_DeleteProjectCommand;
86
- const se_DeleteReportCommand = async (input, context) => {
87
- const headers = sharedHeaders("DeleteReport");
88
- let body;
89
- body = JSON.stringify((0, smithy_client_1._json)(input));
90
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
91
- };
92
- exports.se_DeleteReportCommand = se_DeleteReportCommand;
93
- const se_DeleteReportGroupCommand = async (input, context) => {
94
- const headers = sharedHeaders("DeleteReportGroup");
95
- let body;
96
- body = JSON.stringify((0, smithy_client_1._json)(input));
97
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
98
- };
99
- exports.se_DeleteReportGroupCommand = se_DeleteReportGroupCommand;
100
- const se_DeleteResourcePolicyCommand = async (input, context) => {
101
- const headers = sharedHeaders("DeleteResourcePolicy");
102
- let body;
103
- body = JSON.stringify((0, smithy_client_1._json)(input));
104
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
105
- };
106
- exports.se_DeleteResourcePolicyCommand = se_DeleteResourcePolicyCommand;
107
- const se_DeleteSourceCredentialsCommand = async (input, context) => {
108
- const headers = sharedHeaders("DeleteSourceCredentials");
109
- let body;
110
- body = JSON.stringify((0, smithy_client_1._json)(input));
111
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
- };
113
- exports.se_DeleteSourceCredentialsCommand = se_DeleteSourceCredentialsCommand;
114
- const se_DeleteWebhookCommand = async (input, context) => {
115
- const headers = sharedHeaders("DeleteWebhook");
116
- let body;
117
- body = JSON.stringify((0, smithy_client_1._json)(input));
118
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
- };
120
- exports.se_DeleteWebhookCommand = se_DeleteWebhookCommand;
121
- const se_DescribeCodeCoveragesCommand = async (input, context) => {
122
- const headers = sharedHeaders("DescribeCodeCoverages");
123
- let body;
124
- body = JSON.stringify(se_DescribeCodeCoveragesInput(input, context));
125
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
126
- };
127
- exports.se_DescribeCodeCoveragesCommand = se_DescribeCodeCoveragesCommand;
128
- const se_DescribeTestCasesCommand = async (input, context) => {
129
- const headers = sharedHeaders("DescribeTestCases");
130
- let body;
131
- body = JSON.stringify((0, smithy_client_1._json)(input));
132
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
133
- };
134
- exports.se_DescribeTestCasesCommand = se_DescribeTestCasesCommand;
135
- const se_GetReportGroupTrendCommand = async (input, context) => {
136
- const headers = sharedHeaders("GetReportGroupTrend");
137
- let body;
138
- body = JSON.stringify((0, smithy_client_1._json)(input));
139
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
140
- };
141
- exports.se_GetReportGroupTrendCommand = se_GetReportGroupTrendCommand;
142
- const se_GetResourcePolicyCommand = async (input, context) => {
143
- const headers = sharedHeaders("GetResourcePolicy");
144
- let body;
145
- body = JSON.stringify((0, smithy_client_1._json)(input));
146
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
147
- };
148
- exports.se_GetResourcePolicyCommand = se_GetResourcePolicyCommand;
149
- const se_ImportSourceCredentialsCommand = async (input, context) => {
150
- const headers = sharedHeaders("ImportSourceCredentials");
151
- let body;
152
- body = JSON.stringify((0, smithy_client_1._json)(input));
153
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
154
- };
155
- exports.se_ImportSourceCredentialsCommand = se_ImportSourceCredentialsCommand;
156
- const se_InvalidateProjectCacheCommand = async (input, context) => {
157
- const headers = sharedHeaders("InvalidateProjectCache");
158
- let body;
159
- body = JSON.stringify((0, smithy_client_1._json)(input));
160
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
161
- };
162
- exports.se_InvalidateProjectCacheCommand = se_InvalidateProjectCacheCommand;
163
- const se_ListBuildBatchesCommand = async (input, context) => {
164
- const headers = sharedHeaders("ListBuildBatches");
165
- let body;
166
- body = JSON.stringify((0, smithy_client_1._json)(input));
167
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
168
- };
169
- exports.se_ListBuildBatchesCommand = se_ListBuildBatchesCommand;
170
- const se_ListBuildBatchesForProjectCommand = async (input, context) => {
171
- const headers = sharedHeaders("ListBuildBatchesForProject");
172
- let body;
173
- body = JSON.stringify((0, smithy_client_1._json)(input));
174
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
- };
176
- exports.se_ListBuildBatchesForProjectCommand = se_ListBuildBatchesForProjectCommand;
177
- const se_ListBuildsCommand = async (input, context) => {
178
- const headers = sharedHeaders("ListBuilds");
179
- let body;
180
- body = JSON.stringify((0, smithy_client_1._json)(input));
181
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
182
- };
183
- exports.se_ListBuildsCommand = se_ListBuildsCommand;
184
- const se_ListBuildsForProjectCommand = async (input, context) => {
185
- const headers = sharedHeaders("ListBuildsForProject");
186
- let body;
187
- body = JSON.stringify((0, smithy_client_1._json)(input));
188
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
189
- };
190
- exports.se_ListBuildsForProjectCommand = se_ListBuildsForProjectCommand;
191
- const se_ListCuratedEnvironmentImagesCommand = async (input, context) => {
192
- const headers = sharedHeaders("ListCuratedEnvironmentImages");
193
- let body;
194
- body = JSON.stringify((0, smithy_client_1._json)(input));
195
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
196
- };
197
- exports.se_ListCuratedEnvironmentImagesCommand = se_ListCuratedEnvironmentImagesCommand;
198
- const se_ListProjectsCommand = async (input, context) => {
199
- const headers = sharedHeaders("ListProjects");
200
- let body;
201
- body = JSON.stringify((0, smithy_client_1._json)(input));
202
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
203
- };
204
- exports.se_ListProjectsCommand = se_ListProjectsCommand;
205
- const se_ListReportGroupsCommand = async (input, context) => {
206
- const headers = sharedHeaders("ListReportGroups");
207
- let body;
208
- body = JSON.stringify((0, smithy_client_1._json)(input));
209
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
210
- };
211
- exports.se_ListReportGroupsCommand = se_ListReportGroupsCommand;
212
- const se_ListReportsCommand = async (input, context) => {
213
- const headers = sharedHeaders("ListReports");
214
- let body;
215
- body = JSON.stringify((0, smithy_client_1._json)(input));
216
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
217
- };
218
- exports.se_ListReportsCommand = se_ListReportsCommand;
219
- const se_ListReportsForReportGroupCommand = async (input, context) => {
220
- const headers = sharedHeaders("ListReportsForReportGroup");
221
- let body;
222
- body = JSON.stringify((0, smithy_client_1._json)(input));
223
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
224
- };
225
- exports.se_ListReportsForReportGroupCommand = se_ListReportsForReportGroupCommand;
226
- const se_ListSharedProjectsCommand = async (input, context) => {
227
- const headers = sharedHeaders("ListSharedProjects");
228
- let body;
229
- body = JSON.stringify((0, smithy_client_1._json)(input));
230
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
231
- };
232
- exports.se_ListSharedProjectsCommand = se_ListSharedProjectsCommand;
233
- const se_ListSharedReportGroupsCommand = async (input, context) => {
234
- const headers = sharedHeaders("ListSharedReportGroups");
235
- let body;
236
- body = JSON.stringify((0, smithy_client_1._json)(input));
237
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
238
- };
239
- exports.se_ListSharedReportGroupsCommand = se_ListSharedReportGroupsCommand;
240
- const se_ListSourceCredentialsCommand = async (input, context) => {
241
- const headers = sharedHeaders("ListSourceCredentials");
242
- let body;
243
- body = JSON.stringify((0, smithy_client_1._json)(input));
244
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
245
- };
246
- exports.se_ListSourceCredentialsCommand = se_ListSourceCredentialsCommand;
247
- const se_PutResourcePolicyCommand = async (input, context) => {
248
- const headers = sharedHeaders("PutResourcePolicy");
249
- let body;
250
- body = JSON.stringify((0, smithy_client_1._json)(input));
251
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
252
- };
253
- exports.se_PutResourcePolicyCommand = se_PutResourcePolicyCommand;
254
- const se_RetryBuildCommand = async (input, context) => {
255
- const headers = sharedHeaders("RetryBuild");
256
- let body;
257
- body = JSON.stringify((0, smithy_client_1._json)(input));
258
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
259
- };
260
- exports.se_RetryBuildCommand = se_RetryBuildCommand;
261
- const se_RetryBuildBatchCommand = async (input, context) => {
262
- const headers = sharedHeaders("RetryBuildBatch");
263
- let body;
264
- body = JSON.stringify((0, smithy_client_1._json)(input));
265
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
266
- };
267
- exports.se_RetryBuildBatchCommand = se_RetryBuildBatchCommand;
268
- const se_StartBuildCommand = async (input, context) => {
269
- const headers = sharedHeaders("StartBuild");
270
- let body;
271
- body = JSON.stringify((0, smithy_client_1._json)(input));
272
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
273
- };
274
- exports.se_StartBuildCommand = se_StartBuildCommand;
275
- const se_StartBuildBatchCommand = async (input, context) => {
276
- const headers = sharedHeaders("StartBuildBatch");
277
- let body;
278
- body = JSON.stringify((0, smithy_client_1._json)(input));
279
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
280
- };
281
- exports.se_StartBuildBatchCommand = se_StartBuildBatchCommand;
282
- const se_StopBuildCommand = async (input, context) => {
283
- const headers = sharedHeaders("StopBuild");
284
- let body;
285
- body = JSON.stringify((0, smithy_client_1._json)(input));
286
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
287
- };
288
- exports.se_StopBuildCommand = se_StopBuildCommand;
289
- const se_StopBuildBatchCommand = async (input, context) => {
290
- const headers = sharedHeaders("StopBuildBatch");
291
- let body;
292
- body = JSON.stringify((0, smithy_client_1._json)(input));
293
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
294
- };
295
- exports.se_StopBuildBatchCommand = se_StopBuildBatchCommand;
296
- const se_UpdateProjectCommand = async (input, context) => {
297
- const headers = sharedHeaders("UpdateProject");
298
- let body;
299
- body = JSON.stringify((0, smithy_client_1._json)(input));
300
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
301
- };
302
- exports.se_UpdateProjectCommand = se_UpdateProjectCommand;
303
- const se_UpdateProjectVisibilityCommand = async (input, context) => {
304
- const headers = sharedHeaders("UpdateProjectVisibility");
305
- let body;
306
- body = JSON.stringify((0, smithy_client_1._json)(input));
307
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
308
- };
309
- exports.se_UpdateProjectVisibilityCommand = se_UpdateProjectVisibilityCommand;
310
- const se_UpdateReportGroupCommand = async (input, context) => {
311
- const headers = sharedHeaders("UpdateReportGroup");
312
- let body;
313
- body = JSON.stringify((0, smithy_client_1._json)(input));
314
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
315
- };
316
- exports.se_UpdateReportGroupCommand = se_UpdateReportGroupCommand;
317
- const se_UpdateWebhookCommand = async (input, context) => {
318
- const headers = sharedHeaders("UpdateWebhook");
319
- let body;
320
- body = JSON.stringify((0, smithy_client_1._json)(input));
321
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
322
- };
323
- exports.se_UpdateWebhookCommand = se_UpdateWebhookCommand;
324
- const de_BatchDeleteBuildsCommand = async (output, context) => {
325
- if (output.statusCode >= 300) {
326
- return de_BatchDeleteBuildsCommandError(output, context);
327
- }
328
- const data = await parseBody(output.body, context);
329
- let contents = {};
330
- contents = (0, smithy_client_1._json)(data);
331
- const response = {
332
- $metadata: deserializeMetadata(output),
333
- ...contents,
334
- };
335
- return response;
336
- };
337
- exports.de_BatchDeleteBuildsCommand = de_BatchDeleteBuildsCommand;
338
- const de_BatchDeleteBuildsCommandError = async (output, context) => {
339
- const parsedOutput = {
340
- ...output,
341
- body: await parseErrorBody(output.body, context),
342
- };
343
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
344
- switch (errorCode) {
345
- case "InvalidInputException":
346
- case "com.amazonaws.codebuild#InvalidInputException":
347
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
348
- default:
349
- const parsedBody = parsedOutput.body;
350
- return throwDefaultError({
351
- output,
352
- parsedBody,
353
- errorCode,
354
- });
355
- }
356
- };
357
- const de_BatchGetBuildBatchesCommand = async (output, context) => {
358
- if (output.statusCode >= 300) {
359
- return de_BatchGetBuildBatchesCommandError(output, context);
360
- }
361
- const data = await parseBody(output.body, context);
362
- let contents = {};
363
- contents = de_BatchGetBuildBatchesOutput(data, context);
364
- const response = {
365
- $metadata: deserializeMetadata(output),
366
- ...contents,
367
- };
368
- return response;
369
- };
370
- exports.de_BatchGetBuildBatchesCommand = de_BatchGetBuildBatchesCommand;
371
- const de_BatchGetBuildBatchesCommandError = async (output, context) => {
372
- const parsedOutput = {
373
- ...output,
374
- body: await parseErrorBody(output.body, context),
375
- };
376
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
377
- switch (errorCode) {
378
- case "InvalidInputException":
379
- case "com.amazonaws.codebuild#InvalidInputException":
380
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
381
- default:
382
- const parsedBody = parsedOutput.body;
383
- return throwDefaultError({
384
- output,
385
- parsedBody,
386
- errorCode,
387
- });
388
- }
389
- };
390
- const de_BatchGetBuildsCommand = async (output, context) => {
391
- if (output.statusCode >= 300) {
392
- return de_BatchGetBuildsCommandError(output, context);
393
- }
394
- const data = await parseBody(output.body, context);
395
- let contents = {};
396
- contents = de_BatchGetBuildsOutput(data, context);
397
- const response = {
398
- $metadata: deserializeMetadata(output),
399
- ...contents,
400
- };
401
- return response;
402
- };
403
- exports.de_BatchGetBuildsCommand = de_BatchGetBuildsCommand;
404
- const de_BatchGetBuildsCommandError = async (output, context) => {
405
- const parsedOutput = {
406
- ...output,
407
- body: await parseErrorBody(output.body, context),
408
- };
409
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
410
- switch (errorCode) {
411
- case "InvalidInputException":
412
- case "com.amazonaws.codebuild#InvalidInputException":
413
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
414
- default:
415
- const parsedBody = parsedOutput.body;
416
- return throwDefaultError({
417
- output,
418
- parsedBody,
419
- errorCode,
420
- });
421
- }
422
- };
423
- const de_BatchGetProjectsCommand = async (output, context) => {
424
- if (output.statusCode >= 300) {
425
- return de_BatchGetProjectsCommandError(output, context);
426
- }
427
- const data = await parseBody(output.body, context);
428
- let contents = {};
429
- contents = de_BatchGetProjectsOutput(data, context);
430
- const response = {
431
- $metadata: deserializeMetadata(output),
432
- ...contents,
433
- };
434
- return response;
435
- };
436
- exports.de_BatchGetProjectsCommand = de_BatchGetProjectsCommand;
437
- const de_BatchGetProjectsCommandError = async (output, context) => {
438
- const parsedOutput = {
439
- ...output,
440
- body: await parseErrorBody(output.body, context),
441
- };
442
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
443
- switch (errorCode) {
444
- case "InvalidInputException":
445
- case "com.amazonaws.codebuild#InvalidInputException":
446
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
447
- default:
448
- const parsedBody = parsedOutput.body;
449
- return throwDefaultError({
450
- output,
451
- parsedBody,
452
- errorCode,
453
- });
454
- }
455
- };
456
- const de_BatchGetReportGroupsCommand = async (output, context) => {
457
- if (output.statusCode >= 300) {
458
- return de_BatchGetReportGroupsCommandError(output, context);
459
- }
460
- const data = await parseBody(output.body, context);
461
- let contents = {};
462
- contents = de_BatchGetReportGroupsOutput(data, context);
463
- const response = {
464
- $metadata: deserializeMetadata(output),
465
- ...contents,
466
- };
467
- return response;
468
- };
469
- exports.de_BatchGetReportGroupsCommand = de_BatchGetReportGroupsCommand;
470
- const de_BatchGetReportGroupsCommandError = async (output, context) => {
471
- const parsedOutput = {
472
- ...output,
473
- body: await parseErrorBody(output.body, context),
474
- };
475
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
476
- switch (errorCode) {
477
- case "InvalidInputException":
478
- case "com.amazonaws.codebuild#InvalidInputException":
479
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
480
- default:
481
- const parsedBody = parsedOutput.body;
482
- return throwDefaultError({
483
- output,
484
- parsedBody,
485
- errorCode,
486
- });
487
- }
488
- };
489
- const de_BatchGetReportsCommand = async (output, context) => {
490
- if (output.statusCode >= 300) {
491
- return de_BatchGetReportsCommandError(output, context);
492
- }
493
- const data = await parseBody(output.body, context);
494
- let contents = {};
495
- contents = de_BatchGetReportsOutput(data, context);
496
- const response = {
497
- $metadata: deserializeMetadata(output),
498
- ...contents,
499
- };
500
- return response;
501
- };
502
- exports.de_BatchGetReportsCommand = de_BatchGetReportsCommand;
503
- const de_BatchGetReportsCommandError = async (output, context) => {
504
- const parsedOutput = {
505
- ...output,
506
- body: await parseErrorBody(output.body, context),
507
- };
508
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
509
- switch (errorCode) {
510
- case "InvalidInputException":
511
- case "com.amazonaws.codebuild#InvalidInputException":
512
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
513
- default:
514
- const parsedBody = parsedOutput.body;
515
- return throwDefaultError({
516
- output,
517
- parsedBody,
518
- errorCode,
519
- });
520
- }
521
- };
522
- const de_CreateProjectCommand = async (output, context) => {
523
- if (output.statusCode >= 300) {
524
- return de_CreateProjectCommandError(output, context);
525
- }
526
- const data = await parseBody(output.body, context);
527
- let contents = {};
528
- contents = de_CreateProjectOutput(data, context);
529
- const response = {
530
- $metadata: deserializeMetadata(output),
531
- ...contents,
532
- };
533
- return response;
534
- };
535
- exports.de_CreateProjectCommand = de_CreateProjectCommand;
536
- const de_CreateProjectCommandError = async (output, context) => {
537
- const parsedOutput = {
538
- ...output,
539
- body: await parseErrorBody(output.body, context),
540
- };
541
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
542
- switch (errorCode) {
543
- case "AccountLimitExceededException":
544
- case "com.amazonaws.codebuild#AccountLimitExceededException":
545
- throw await de_AccountLimitExceededExceptionRes(parsedOutput, context);
546
- case "InvalidInputException":
547
- case "com.amazonaws.codebuild#InvalidInputException":
548
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
549
- case "ResourceAlreadyExistsException":
550
- case "com.amazonaws.codebuild#ResourceAlreadyExistsException":
551
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
552
- default:
553
- const parsedBody = parsedOutput.body;
554
- return throwDefaultError({
555
- output,
556
- parsedBody,
557
- errorCode,
558
- });
559
- }
560
- };
561
- const de_CreateReportGroupCommand = async (output, context) => {
562
- if (output.statusCode >= 300) {
563
- return de_CreateReportGroupCommandError(output, context);
564
- }
565
- const data = await parseBody(output.body, context);
566
- let contents = {};
567
- contents = de_CreateReportGroupOutput(data, context);
568
- const response = {
569
- $metadata: deserializeMetadata(output),
570
- ...contents,
571
- };
572
- return response;
573
- };
574
- exports.de_CreateReportGroupCommand = de_CreateReportGroupCommand;
575
- const de_CreateReportGroupCommandError = async (output, context) => {
576
- const parsedOutput = {
577
- ...output,
578
- body: await parseErrorBody(output.body, context),
579
- };
580
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
581
- switch (errorCode) {
582
- case "AccountLimitExceededException":
583
- case "com.amazonaws.codebuild#AccountLimitExceededException":
584
- throw await de_AccountLimitExceededExceptionRes(parsedOutput, context);
585
- case "InvalidInputException":
586
- case "com.amazonaws.codebuild#InvalidInputException":
587
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
588
- case "ResourceAlreadyExistsException":
589
- case "com.amazonaws.codebuild#ResourceAlreadyExistsException":
590
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
591
- default:
592
- const parsedBody = parsedOutput.body;
593
- return throwDefaultError({
594
- output,
595
- parsedBody,
596
- errorCode,
597
- });
598
- }
599
- };
600
- const de_CreateWebhookCommand = async (output, context) => {
601
- if (output.statusCode >= 300) {
602
- return de_CreateWebhookCommandError(output, context);
603
- }
604
- const data = await parseBody(output.body, context);
605
- let contents = {};
606
- contents = de_CreateWebhookOutput(data, context);
607
- const response = {
608
- $metadata: deserializeMetadata(output),
609
- ...contents,
610
- };
611
- return response;
612
- };
613
- exports.de_CreateWebhookCommand = de_CreateWebhookCommand;
614
- const de_CreateWebhookCommandError = async (output, context) => {
615
- const parsedOutput = {
616
- ...output,
617
- body: await parseErrorBody(output.body, context),
618
- };
619
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
620
- switch (errorCode) {
621
- case "InvalidInputException":
622
- case "com.amazonaws.codebuild#InvalidInputException":
623
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
624
- case "OAuthProviderException":
625
- case "com.amazonaws.codebuild#OAuthProviderException":
626
- throw await de_OAuthProviderExceptionRes(parsedOutput, context);
627
- case "ResourceAlreadyExistsException":
628
- case "com.amazonaws.codebuild#ResourceAlreadyExistsException":
629
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
630
- case "ResourceNotFoundException":
631
- case "com.amazonaws.codebuild#ResourceNotFoundException":
632
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
633
- default:
634
- const parsedBody = parsedOutput.body;
635
- return throwDefaultError({
636
- output,
637
- parsedBody,
638
- errorCode,
639
- });
640
- }
641
- };
642
- const de_DeleteBuildBatchCommand = async (output, context) => {
643
- if (output.statusCode >= 300) {
644
- return de_DeleteBuildBatchCommandError(output, context);
645
- }
646
- const data = await parseBody(output.body, context);
647
- let contents = {};
648
- contents = (0, smithy_client_1._json)(data);
649
- const response = {
650
- $metadata: deserializeMetadata(output),
651
- ...contents,
652
- };
653
- return response;
654
- };
655
- exports.de_DeleteBuildBatchCommand = de_DeleteBuildBatchCommand;
656
- const de_DeleteBuildBatchCommandError = async (output, context) => {
657
- const parsedOutput = {
658
- ...output,
659
- body: await parseErrorBody(output.body, context),
660
- };
661
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
662
- switch (errorCode) {
663
- case "InvalidInputException":
664
- case "com.amazonaws.codebuild#InvalidInputException":
665
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
666
- default:
667
- const parsedBody = parsedOutput.body;
668
- return throwDefaultError({
669
- output,
670
- parsedBody,
671
- errorCode,
672
- });
673
- }
674
- };
675
- const de_DeleteProjectCommand = async (output, context) => {
676
- if (output.statusCode >= 300) {
677
- return de_DeleteProjectCommandError(output, context);
678
- }
679
- const data = await parseBody(output.body, context);
680
- let contents = {};
681
- contents = (0, smithy_client_1._json)(data);
682
- const response = {
683
- $metadata: deserializeMetadata(output),
684
- ...contents,
685
- };
686
- return response;
687
- };
688
- exports.de_DeleteProjectCommand = de_DeleteProjectCommand;
689
- const de_DeleteProjectCommandError = async (output, context) => {
690
- const parsedOutput = {
691
- ...output,
692
- body: await parseErrorBody(output.body, context),
693
- };
694
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
695
- switch (errorCode) {
696
- case "InvalidInputException":
697
- case "com.amazonaws.codebuild#InvalidInputException":
698
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
699
- default:
700
- const parsedBody = parsedOutput.body;
701
- return throwDefaultError({
702
- output,
703
- parsedBody,
704
- errorCode,
705
- });
706
- }
707
- };
708
- const de_DeleteReportCommand = async (output, context) => {
709
- if (output.statusCode >= 300) {
710
- return de_DeleteReportCommandError(output, context);
711
- }
712
- const data = await parseBody(output.body, context);
713
- let contents = {};
714
- contents = (0, smithy_client_1._json)(data);
715
- const response = {
716
- $metadata: deserializeMetadata(output),
717
- ...contents,
718
- };
719
- return response;
720
- };
721
- exports.de_DeleteReportCommand = de_DeleteReportCommand;
722
- const de_DeleteReportCommandError = async (output, context) => {
723
- const parsedOutput = {
724
- ...output,
725
- body: await parseErrorBody(output.body, context),
726
- };
727
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
728
- switch (errorCode) {
729
- case "InvalidInputException":
730
- case "com.amazonaws.codebuild#InvalidInputException":
731
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
732
- default:
733
- const parsedBody = parsedOutput.body;
734
- return throwDefaultError({
735
- output,
736
- parsedBody,
737
- errorCode,
738
- });
739
- }
740
- };
741
- const de_DeleteReportGroupCommand = async (output, context) => {
742
- if (output.statusCode >= 300) {
743
- return de_DeleteReportGroupCommandError(output, context);
744
- }
745
- const data = await parseBody(output.body, context);
746
- let contents = {};
747
- contents = (0, smithy_client_1._json)(data);
748
- const response = {
749
- $metadata: deserializeMetadata(output),
750
- ...contents,
751
- };
752
- return response;
753
- };
754
- exports.de_DeleteReportGroupCommand = de_DeleteReportGroupCommand;
755
- const de_DeleteReportGroupCommandError = async (output, context) => {
756
- const parsedOutput = {
757
- ...output,
758
- body: await parseErrorBody(output.body, context),
759
- };
760
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
761
- switch (errorCode) {
762
- case "InvalidInputException":
763
- case "com.amazonaws.codebuild#InvalidInputException":
764
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
765
- default:
766
- const parsedBody = parsedOutput.body;
767
- return throwDefaultError({
768
- output,
769
- parsedBody,
770
- errorCode,
771
- });
772
- }
773
- };
774
- const de_DeleteResourcePolicyCommand = async (output, context) => {
775
- if (output.statusCode >= 300) {
776
- return de_DeleteResourcePolicyCommandError(output, context);
777
- }
778
- const data = await parseBody(output.body, context);
779
- let contents = {};
780
- contents = (0, smithy_client_1._json)(data);
781
- const response = {
782
- $metadata: deserializeMetadata(output),
783
- ...contents,
784
- };
785
- return response;
786
- };
787
- exports.de_DeleteResourcePolicyCommand = de_DeleteResourcePolicyCommand;
788
- const de_DeleteResourcePolicyCommandError = async (output, context) => {
789
- const parsedOutput = {
790
- ...output,
791
- body: await parseErrorBody(output.body, context),
792
- };
793
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
794
- switch (errorCode) {
795
- case "InvalidInputException":
796
- case "com.amazonaws.codebuild#InvalidInputException":
797
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
798
- default:
799
- const parsedBody = parsedOutput.body;
800
- return throwDefaultError({
801
- output,
802
- parsedBody,
803
- errorCode,
804
- });
805
- }
806
- };
807
- const de_DeleteSourceCredentialsCommand = async (output, context) => {
808
- if (output.statusCode >= 300) {
809
- return de_DeleteSourceCredentialsCommandError(output, context);
810
- }
811
- const data = await parseBody(output.body, context);
812
- let contents = {};
813
- contents = (0, smithy_client_1._json)(data);
814
- const response = {
815
- $metadata: deserializeMetadata(output),
816
- ...contents,
817
- };
818
- return response;
819
- };
820
- exports.de_DeleteSourceCredentialsCommand = de_DeleteSourceCredentialsCommand;
821
- const de_DeleteSourceCredentialsCommandError = async (output, context) => {
822
- const parsedOutput = {
823
- ...output,
824
- body: await parseErrorBody(output.body, context),
825
- };
826
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
827
- switch (errorCode) {
828
- case "InvalidInputException":
829
- case "com.amazonaws.codebuild#InvalidInputException":
830
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
831
- case "ResourceNotFoundException":
832
- case "com.amazonaws.codebuild#ResourceNotFoundException":
833
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
834
- default:
835
- const parsedBody = parsedOutput.body;
836
- return throwDefaultError({
837
- output,
838
- parsedBody,
839
- errorCode,
840
- });
841
- }
842
- };
843
- const de_DeleteWebhookCommand = async (output, context) => {
844
- if (output.statusCode >= 300) {
845
- return de_DeleteWebhookCommandError(output, context);
846
- }
847
- const data = await parseBody(output.body, context);
848
- let contents = {};
849
- contents = (0, smithy_client_1._json)(data);
850
- const response = {
851
- $metadata: deserializeMetadata(output),
852
- ...contents,
853
- };
854
- return response;
855
- };
856
- exports.de_DeleteWebhookCommand = de_DeleteWebhookCommand;
857
- const de_DeleteWebhookCommandError = async (output, context) => {
858
- const parsedOutput = {
859
- ...output,
860
- body: await parseErrorBody(output.body, context),
861
- };
862
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
863
- switch (errorCode) {
864
- case "InvalidInputException":
865
- case "com.amazonaws.codebuild#InvalidInputException":
866
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
867
- case "OAuthProviderException":
868
- case "com.amazonaws.codebuild#OAuthProviderException":
869
- throw await de_OAuthProviderExceptionRes(parsedOutput, context);
870
- case "ResourceNotFoundException":
871
- case "com.amazonaws.codebuild#ResourceNotFoundException":
872
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
873
- default:
874
- const parsedBody = parsedOutput.body;
875
- return throwDefaultError({
876
- output,
877
- parsedBody,
878
- errorCode,
879
- });
880
- }
881
- };
882
- const de_DescribeCodeCoveragesCommand = async (output, context) => {
883
- if (output.statusCode >= 300) {
884
- return de_DescribeCodeCoveragesCommandError(output, context);
885
- }
886
- const data = await parseBody(output.body, context);
887
- let contents = {};
888
- contents = de_DescribeCodeCoveragesOutput(data, context);
889
- const response = {
890
- $metadata: deserializeMetadata(output),
891
- ...contents,
892
- };
893
- return response;
894
- };
895
- exports.de_DescribeCodeCoveragesCommand = de_DescribeCodeCoveragesCommand;
896
- const de_DescribeCodeCoveragesCommandError = async (output, context) => {
897
- const parsedOutput = {
898
- ...output,
899
- body: await parseErrorBody(output.body, context),
900
- };
901
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
902
- switch (errorCode) {
903
- case "InvalidInputException":
904
- case "com.amazonaws.codebuild#InvalidInputException":
905
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
906
- default:
907
- const parsedBody = parsedOutput.body;
908
- return throwDefaultError({
909
- output,
910
- parsedBody,
911
- errorCode,
912
- });
913
- }
914
- };
915
- const de_DescribeTestCasesCommand = async (output, context) => {
916
- if (output.statusCode >= 300) {
917
- return de_DescribeTestCasesCommandError(output, context);
918
- }
919
- const data = await parseBody(output.body, context);
920
- let contents = {};
921
- contents = de_DescribeTestCasesOutput(data, context);
922
- const response = {
923
- $metadata: deserializeMetadata(output),
924
- ...contents,
925
- };
926
- return response;
927
- };
928
- exports.de_DescribeTestCasesCommand = de_DescribeTestCasesCommand;
929
- const de_DescribeTestCasesCommandError = async (output, context) => {
930
- const parsedOutput = {
931
- ...output,
932
- body: await parseErrorBody(output.body, context),
933
- };
934
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
935
- switch (errorCode) {
936
- case "InvalidInputException":
937
- case "com.amazonaws.codebuild#InvalidInputException":
938
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
939
- case "ResourceNotFoundException":
940
- case "com.amazonaws.codebuild#ResourceNotFoundException":
941
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
942
- default:
943
- const parsedBody = parsedOutput.body;
944
- return throwDefaultError({
945
- output,
946
- parsedBody,
947
- errorCode,
948
- });
949
- }
950
- };
951
- const de_GetReportGroupTrendCommand = async (output, context) => {
952
- if (output.statusCode >= 300) {
953
- return de_GetReportGroupTrendCommandError(output, context);
954
- }
955
- const data = await parseBody(output.body, context);
956
- let contents = {};
957
- contents = (0, smithy_client_1._json)(data);
958
- const response = {
959
- $metadata: deserializeMetadata(output),
960
- ...contents,
961
- };
962
- return response;
963
- };
964
- exports.de_GetReportGroupTrendCommand = de_GetReportGroupTrendCommand;
965
- const de_GetReportGroupTrendCommandError = async (output, context) => {
966
- const parsedOutput = {
967
- ...output,
968
- body: await parseErrorBody(output.body, context),
969
- };
970
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
971
- switch (errorCode) {
972
- case "InvalidInputException":
973
- case "com.amazonaws.codebuild#InvalidInputException":
974
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
975
- case "ResourceNotFoundException":
976
- case "com.amazonaws.codebuild#ResourceNotFoundException":
977
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
978
- default:
979
- const parsedBody = parsedOutput.body;
980
- return throwDefaultError({
981
- output,
982
- parsedBody,
983
- errorCode,
984
- });
985
- }
986
- };
987
- const de_GetResourcePolicyCommand = async (output, context) => {
988
- if (output.statusCode >= 300) {
989
- return de_GetResourcePolicyCommandError(output, context);
990
- }
991
- const data = await parseBody(output.body, context);
992
- let contents = {};
993
- contents = (0, smithy_client_1._json)(data);
994
- const response = {
995
- $metadata: deserializeMetadata(output),
996
- ...contents,
997
- };
998
- return response;
999
- };
1000
- exports.de_GetResourcePolicyCommand = de_GetResourcePolicyCommand;
1001
- const de_GetResourcePolicyCommandError = async (output, context) => {
1002
- const parsedOutput = {
1003
- ...output,
1004
- body: await parseErrorBody(output.body, context),
1005
- };
1006
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1007
- switch (errorCode) {
1008
- case "InvalidInputException":
1009
- case "com.amazonaws.codebuild#InvalidInputException":
1010
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1011
- case "ResourceNotFoundException":
1012
- case "com.amazonaws.codebuild#ResourceNotFoundException":
1013
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1014
- default:
1015
- const parsedBody = parsedOutput.body;
1016
- return throwDefaultError({
1017
- output,
1018
- parsedBody,
1019
- errorCode,
1020
- });
1021
- }
1022
- };
1023
- const de_ImportSourceCredentialsCommand = async (output, context) => {
1024
- if (output.statusCode >= 300) {
1025
- return de_ImportSourceCredentialsCommandError(output, context);
1026
- }
1027
- const data = await parseBody(output.body, context);
1028
- let contents = {};
1029
- contents = (0, smithy_client_1._json)(data);
1030
- const response = {
1031
- $metadata: deserializeMetadata(output),
1032
- ...contents,
1033
- };
1034
- return response;
1035
- };
1036
- exports.de_ImportSourceCredentialsCommand = de_ImportSourceCredentialsCommand;
1037
- const de_ImportSourceCredentialsCommandError = async (output, context) => {
1038
- const parsedOutput = {
1039
- ...output,
1040
- body: await parseErrorBody(output.body, context),
1041
- };
1042
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1043
- switch (errorCode) {
1044
- case "AccountLimitExceededException":
1045
- case "com.amazonaws.codebuild#AccountLimitExceededException":
1046
- throw await de_AccountLimitExceededExceptionRes(parsedOutput, context);
1047
- case "InvalidInputException":
1048
- case "com.amazonaws.codebuild#InvalidInputException":
1049
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1050
- case "ResourceAlreadyExistsException":
1051
- case "com.amazonaws.codebuild#ResourceAlreadyExistsException":
1052
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
1053
- default:
1054
- const parsedBody = parsedOutput.body;
1055
- return throwDefaultError({
1056
- output,
1057
- parsedBody,
1058
- errorCode,
1059
- });
1060
- }
1061
- };
1062
- const de_InvalidateProjectCacheCommand = async (output, context) => {
1063
- if (output.statusCode >= 300) {
1064
- return de_InvalidateProjectCacheCommandError(output, context);
1065
- }
1066
- const data = await parseBody(output.body, context);
1067
- let contents = {};
1068
- contents = (0, smithy_client_1._json)(data);
1069
- const response = {
1070
- $metadata: deserializeMetadata(output),
1071
- ...contents,
1072
- };
1073
- return response;
1074
- };
1075
- exports.de_InvalidateProjectCacheCommand = de_InvalidateProjectCacheCommand;
1076
- const de_InvalidateProjectCacheCommandError = async (output, context) => {
1077
- const parsedOutput = {
1078
- ...output,
1079
- body: await parseErrorBody(output.body, context),
1080
- };
1081
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1082
- switch (errorCode) {
1083
- case "InvalidInputException":
1084
- case "com.amazonaws.codebuild#InvalidInputException":
1085
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1086
- case "ResourceNotFoundException":
1087
- case "com.amazonaws.codebuild#ResourceNotFoundException":
1088
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1089
- default:
1090
- const parsedBody = parsedOutput.body;
1091
- return throwDefaultError({
1092
- output,
1093
- parsedBody,
1094
- errorCode,
1095
- });
1096
- }
1097
- };
1098
- const de_ListBuildBatchesCommand = async (output, context) => {
1099
- if (output.statusCode >= 300) {
1100
- return de_ListBuildBatchesCommandError(output, context);
1101
- }
1102
- const data = await parseBody(output.body, context);
1103
- let contents = {};
1104
- contents = (0, smithy_client_1._json)(data);
1105
- const response = {
1106
- $metadata: deserializeMetadata(output),
1107
- ...contents,
1108
- };
1109
- return response;
1110
- };
1111
- exports.de_ListBuildBatchesCommand = de_ListBuildBatchesCommand;
1112
- const de_ListBuildBatchesCommandError = async (output, context) => {
1113
- const parsedOutput = {
1114
- ...output,
1115
- body: await parseErrorBody(output.body, context),
1116
- };
1117
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1118
- switch (errorCode) {
1119
- case "InvalidInputException":
1120
- case "com.amazonaws.codebuild#InvalidInputException":
1121
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1122
- default:
1123
- const parsedBody = parsedOutput.body;
1124
- return throwDefaultError({
1125
- output,
1126
- parsedBody,
1127
- errorCode,
1128
- });
1129
- }
1130
- };
1131
- const de_ListBuildBatchesForProjectCommand = async (output, context) => {
1132
- if (output.statusCode >= 300) {
1133
- return de_ListBuildBatchesForProjectCommandError(output, context);
1134
- }
1135
- const data = await parseBody(output.body, context);
1136
- let contents = {};
1137
- contents = (0, smithy_client_1._json)(data);
1138
- const response = {
1139
- $metadata: deserializeMetadata(output),
1140
- ...contents,
1141
- };
1142
- return response;
1143
- };
1144
- exports.de_ListBuildBatchesForProjectCommand = de_ListBuildBatchesForProjectCommand;
1145
- const de_ListBuildBatchesForProjectCommandError = async (output, context) => {
1146
- const parsedOutput = {
1147
- ...output,
1148
- body: await parseErrorBody(output.body, context),
1149
- };
1150
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1151
- switch (errorCode) {
1152
- case "InvalidInputException":
1153
- case "com.amazonaws.codebuild#InvalidInputException":
1154
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1155
- case "ResourceNotFoundException":
1156
- case "com.amazonaws.codebuild#ResourceNotFoundException":
1157
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1158
- default:
1159
- const parsedBody = parsedOutput.body;
1160
- return throwDefaultError({
1161
- output,
1162
- parsedBody,
1163
- errorCode,
1164
- });
1165
- }
1166
- };
1167
- const de_ListBuildsCommand = async (output, context) => {
1168
- if (output.statusCode >= 300) {
1169
- return de_ListBuildsCommandError(output, context);
1170
- }
1171
- const data = await parseBody(output.body, context);
1172
- let contents = {};
1173
- contents = (0, smithy_client_1._json)(data);
1174
- const response = {
1175
- $metadata: deserializeMetadata(output),
1176
- ...contents,
1177
- };
1178
- return response;
1179
- };
1180
- exports.de_ListBuildsCommand = de_ListBuildsCommand;
1181
- const de_ListBuildsCommandError = async (output, context) => {
1182
- const parsedOutput = {
1183
- ...output,
1184
- body: await parseErrorBody(output.body, context),
1185
- };
1186
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1187
- switch (errorCode) {
1188
- case "InvalidInputException":
1189
- case "com.amazonaws.codebuild#InvalidInputException":
1190
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1191
- default:
1192
- const parsedBody = parsedOutput.body;
1193
- return throwDefaultError({
1194
- output,
1195
- parsedBody,
1196
- errorCode,
1197
- });
1198
- }
1199
- };
1200
- const de_ListBuildsForProjectCommand = async (output, context) => {
1201
- if (output.statusCode >= 300) {
1202
- return de_ListBuildsForProjectCommandError(output, context);
1203
- }
1204
- const data = await parseBody(output.body, context);
1205
- let contents = {};
1206
- contents = (0, smithy_client_1._json)(data);
1207
- const response = {
1208
- $metadata: deserializeMetadata(output),
1209
- ...contents,
1210
- };
1211
- return response;
1212
- };
1213
- exports.de_ListBuildsForProjectCommand = de_ListBuildsForProjectCommand;
1214
- const de_ListBuildsForProjectCommandError = async (output, context) => {
1215
- const parsedOutput = {
1216
- ...output,
1217
- body: await parseErrorBody(output.body, context),
1218
- };
1219
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1220
- switch (errorCode) {
1221
- case "InvalidInputException":
1222
- case "com.amazonaws.codebuild#InvalidInputException":
1223
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1224
- case "ResourceNotFoundException":
1225
- case "com.amazonaws.codebuild#ResourceNotFoundException":
1226
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1227
- default:
1228
- const parsedBody = parsedOutput.body;
1229
- return throwDefaultError({
1230
- output,
1231
- parsedBody,
1232
- errorCode,
1233
- });
1234
- }
1235
- };
1236
- const de_ListCuratedEnvironmentImagesCommand = async (output, context) => {
1237
- if (output.statusCode >= 300) {
1238
- return de_ListCuratedEnvironmentImagesCommandError(output, context);
1239
- }
1240
- const data = await parseBody(output.body, context);
1241
- let contents = {};
1242
- contents = (0, smithy_client_1._json)(data);
1243
- const response = {
1244
- $metadata: deserializeMetadata(output),
1245
- ...contents,
1246
- };
1247
- return response;
1248
- };
1249
- exports.de_ListCuratedEnvironmentImagesCommand = de_ListCuratedEnvironmentImagesCommand;
1250
- const de_ListCuratedEnvironmentImagesCommandError = async (output, context) => {
1251
- const parsedOutput = {
1252
- ...output,
1253
- body: await parseErrorBody(output.body, context),
1254
- };
1255
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1256
- const parsedBody = parsedOutput.body;
1257
- return throwDefaultError({
1258
- output,
1259
- parsedBody,
1260
- errorCode,
1261
- });
1262
- };
1263
- const de_ListProjectsCommand = async (output, context) => {
1264
- if (output.statusCode >= 300) {
1265
- return de_ListProjectsCommandError(output, context);
1266
- }
1267
- const data = await parseBody(output.body, context);
1268
- let contents = {};
1269
- contents = (0, smithy_client_1._json)(data);
1270
- const response = {
1271
- $metadata: deserializeMetadata(output),
1272
- ...contents,
1273
- };
1274
- return response;
1275
- };
1276
- exports.de_ListProjectsCommand = de_ListProjectsCommand;
1277
- const de_ListProjectsCommandError = async (output, context) => {
1278
- const parsedOutput = {
1279
- ...output,
1280
- body: await parseErrorBody(output.body, context),
1281
- };
1282
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1283
- switch (errorCode) {
1284
- case "InvalidInputException":
1285
- case "com.amazonaws.codebuild#InvalidInputException":
1286
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1287
- default:
1288
- const parsedBody = parsedOutput.body;
1289
- return throwDefaultError({
1290
- output,
1291
- parsedBody,
1292
- errorCode,
1293
- });
1294
- }
1295
- };
1296
- const de_ListReportGroupsCommand = async (output, context) => {
1297
- if (output.statusCode >= 300) {
1298
- return de_ListReportGroupsCommandError(output, context);
1299
- }
1300
- const data = await parseBody(output.body, context);
1301
- let contents = {};
1302
- contents = (0, smithy_client_1._json)(data);
1303
- const response = {
1304
- $metadata: deserializeMetadata(output),
1305
- ...contents,
1306
- };
1307
- return response;
1308
- };
1309
- exports.de_ListReportGroupsCommand = de_ListReportGroupsCommand;
1310
- const de_ListReportGroupsCommandError = async (output, context) => {
1311
- const parsedOutput = {
1312
- ...output,
1313
- body: await parseErrorBody(output.body, context),
1314
- };
1315
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1316
- switch (errorCode) {
1317
- case "InvalidInputException":
1318
- case "com.amazonaws.codebuild#InvalidInputException":
1319
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1320
- default:
1321
- const parsedBody = parsedOutput.body;
1322
- return throwDefaultError({
1323
- output,
1324
- parsedBody,
1325
- errorCode,
1326
- });
1327
- }
1328
- };
1329
- const de_ListReportsCommand = async (output, context) => {
1330
- if (output.statusCode >= 300) {
1331
- return de_ListReportsCommandError(output, context);
1332
- }
1333
- const data = await parseBody(output.body, context);
1334
- let contents = {};
1335
- contents = (0, smithy_client_1._json)(data);
1336
- const response = {
1337
- $metadata: deserializeMetadata(output),
1338
- ...contents,
1339
- };
1340
- return response;
1341
- };
1342
- exports.de_ListReportsCommand = de_ListReportsCommand;
1343
- const de_ListReportsCommandError = async (output, context) => {
1344
- const parsedOutput = {
1345
- ...output,
1346
- body: await parseErrorBody(output.body, context),
1347
- };
1348
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1349
- switch (errorCode) {
1350
- case "InvalidInputException":
1351
- case "com.amazonaws.codebuild#InvalidInputException":
1352
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1353
- default:
1354
- const parsedBody = parsedOutput.body;
1355
- return throwDefaultError({
1356
- output,
1357
- parsedBody,
1358
- errorCode,
1359
- });
1360
- }
1361
- };
1362
- const de_ListReportsForReportGroupCommand = async (output, context) => {
1363
- if (output.statusCode >= 300) {
1364
- return de_ListReportsForReportGroupCommandError(output, context);
1365
- }
1366
- const data = await parseBody(output.body, context);
1367
- let contents = {};
1368
- contents = (0, smithy_client_1._json)(data);
1369
- const response = {
1370
- $metadata: deserializeMetadata(output),
1371
- ...contents,
1372
- };
1373
- return response;
1374
- };
1375
- exports.de_ListReportsForReportGroupCommand = de_ListReportsForReportGroupCommand;
1376
- const de_ListReportsForReportGroupCommandError = async (output, context) => {
1377
- const parsedOutput = {
1378
- ...output,
1379
- body: await parseErrorBody(output.body, context),
1380
- };
1381
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1382
- switch (errorCode) {
1383
- case "InvalidInputException":
1384
- case "com.amazonaws.codebuild#InvalidInputException":
1385
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1386
- case "ResourceNotFoundException":
1387
- case "com.amazonaws.codebuild#ResourceNotFoundException":
1388
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1389
- default:
1390
- const parsedBody = parsedOutput.body;
1391
- return throwDefaultError({
1392
- output,
1393
- parsedBody,
1394
- errorCode,
1395
- });
1396
- }
1397
- };
1398
- const de_ListSharedProjectsCommand = async (output, context) => {
1399
- if (output.statusCode >= 300) {
1400
- return de_ListSharedProjectsCommandError(output, context);
1401
- }
1402
- const data = await parseBody(output.body, context);
1403
- let contents = {};
1404
- contents = (0, smithy_client_1._json)(data);
1405
- const response = {
1406
- $metadata: deserializeMetadata(output),
1407
- ...contents,
1408
- };
1409
- return response;
1410
- };
1411
- exports.de_ListSharedProjectsCommand = de_ListSharedProjectsCommand;
1412
- const de_ListSharedProjectsCommandError = async (output, context) => {
1413
- const parsedOutput = {
1414
- ...output,
1415
- body: await parseErrorBody(output.body, context),
1416
- };
1417
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1418
- switch (errorCode) {
1419
- case "InvalidInputException":
1420
- case "com.amazonaws.codebuild#InvalidInputException":
1421
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1422
- default:
1423
- const parsedBody = parsedOutput.body;
1424
- return throwDefaultError({
1425
- output,
1426
- parsedBody,
1427
- errorCode,
1428
- });
1429
- }
1430
- };
1431
- const de_ListSharedReportGroupsCommand = async (output, context) => {
1432
- if (output.statusCode >= 300) {
1433
- return de_ListSharedReportGroupsCommandError(output, context);
1434
- }
1435
- const data = await parseBody(output.body, context);
1436
- let contents = {};
1437
- contents = (0, smithy_client_1._json)(data);
1438
- const response = {
1439
- $metadata: deserializeMetadata(output),
1440
- ...contents,
1441
- };
1442
- return response;
1443
- };
1444
- exports.de_ListSharedReportGroupsCommand = de_ListSharedReportGroupsCommand;
1445
- const de_ListSharedReportGroupsCommandError = async (output, context) => {
1446
- const parsedOutput = {
1447
- ...output,
1448
- body: await parseErrorBody(output.body, context),
1449
- };
1450
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1451
- switch (errorCode) {
1452
- case "InvalidInputException":
1453
- case "com.amazonaws.codebuild#InvalidInputException":
1454
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1455
- default:
1456
- const parsedBody = parsedOutput.body;
1457
- return throwDefaultError({
1458
- output,
1459
- parsedBody,
1460
- errorCode,
1461
- });
1462
- }
1463
- };
1464
- const de_ListSourceCredentialsCommand = async (output, context) => {
1465
- if (output.statusCode >= 300) {
1466
- return de_ListSourceCredentialsCommandError(output, context);
1467
- }
1468
- const data = await parseBody(output.body, context);
1469
- let contents = {};
1470
- contents = (0, smithy_client_1._json)(data);
1471
- const response = {
1472
- $metadata: deserializeMetadata(output),
1473
- ...contents,
1474
- };
1475
- return response;
1476
- };
1477
- exports.de_ListSourceCredentialsCommand = de_ListSourceCredentialsCommand;
1478
- const de_ListSourceCredentialsCommandError = async (output, context) => {
1479
- const parsedOutput = {
1480
- ...output,
1481
- body: await parseErrorBody(output.body, context),
1482
- };
1483
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1484
- switch (errorCode) {
1485
- case "InvalidInputException":
1486
- case "com.amazonaws.codebuild#InvalidInputException":
1487
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1488
- default:
1489
- const parsedBody = parsedOutput.body;
1490
- return throwDefaultError({
1491
- output,
1492
- parsedBody,
1493
- errorCode,
1494
- });
1495
- }
1496
- };
1497
- const de_PutResourcePolicyCommand = async (output, context) => {
1498
- if (output.statusCode >= 300) {
1499
- return de_PutResourcePolicyCommandError(output, context);
1500
- }
1501
- const data = await parseBody(output.body, context);
1502
- let contents = {};
1503
- contents = (0, smithy_client_1._json)(data);
1504
- const response = {
1505
- $metadata: deserializeMetadata(output),
1506
- ...contents,
1507
- };
1508
- return response;
1509
- };
1510
- exports.de_PutResourcePolicyCommand = de_PutResourcePolicyCommand;
1511
- const de_PutResourcePolicyCommandError = async (output, context) => {
1512
- const parsedOutput = {
1513
- ...output,
1514
- body: await parseErrorBody(output.body, context),
1515
- };
1516
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1517
- switch (errorCode) {
1518
- case "InvalidInputException":
1519
- case "com.amazonaws.codebuild#InvalidInputException":
1520
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1521
- case "ResourceNotFoundException":
1522
- case "com.amazonaws.codebuild#ResourceNotFoundException":
1523
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1524
- default:
1525
- const parsedBody = parsedOutput.body;
1526
- return throwDefaultError({
1527
- output,
1528
- parsedBody,
1529
- errorCode,
1530
- });
1531
- }
1532
- };
1533
- const de_RetryBuildCommand = async (output, context) => {
1534
- if (output.statusCode >= 300) {
1535
- return de_RetryBuildCommandError(output, context);
1536
- }
1537
- const data = await parseBody(output.body, context);
1538
- let contents = {};
1539
- contents = de_RetryBuildOutput(data, context);
1540
- const response = {
1541
- $metadata: deserializeMetadata(output),
1542
- ...contents,
1543
- };
1544
- return response;
1545
- };
1546
- exports.de_RetryBuildCommand = de_RetryBuildCommand;
1547
- const de_RetryBuildCommandError = async (output, context) => {
1548
- const parsedOutput = {
1549
- ...output,
1550
- body: await parseErrorBody(output.body, context),
1551
- };
1552
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1553
- switch (errorCode) {
1554
- case "AccountLimitExceededException":
1555
- case "com.amazonaws.codebuild#AccountLimitExceededException":
1556
- throw await de_AccountLimitExceededExceptionRes(parsedOutput, context);
1557
- case "InvalidInputException":
1558
- case "com.amazonaws.codebuild#InvalidInputException":
1559
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1560
- case "ResourceNotFoundException":
1561
- case "com.amazonaws.codebuild#ResourceNotFoundException":
1562
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1563
- default:
1564
- const parsedBody = parsedOutput.body;
1565
- return throwDefaultError({
1566
- output,
1567
- parsedBody,
1568
- errorCode,
1569
- });
1570
- }
1571
- };
1572
- const de_RetryBuildBatchCommand = async (output, context) => {
1573
- if (output.statusCode >= 300) {
1574
- return de_RetryBuildBatchCommandError(output, context);
1575
- }
1576
- const data = await parseBody(output.body, context);
1577
- let contents = {};
1578
- contents = de_RetryBuildBatchOutput(data, context);
1579
- const response = {
1580
- $metadata: deserializeMetadata(output),
1581
- ...contents,
1582
- };
1583
- return response;
1584
- };
1585
- exports.de_RetryBuildBatchCommand = de_RetryBuildBatchCommand;
1586
- const de_RetryBuildBatchCommandError = async (output, context) => {
1587
- const parsedOutput = {
1588
- ...output,
1589
- body: await parseErrorBody(output.body, context),
1590
- };
1591
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1592
- switch (errorCode) {
1593
- case "InvalidInputException":
1594
- case "com.amazonaws.codebuild#InvalidInputException":
1595
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1596
- case "ResourceNotFoundException":
1597
- case "com.amazonaws.codebuild#ResourceNotFoundException":
1598
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1599
- default:
1600
- const parsedBody = parsedOutput.body;
1601
- return throwDefaultError({
1602
- output,
1603
- parsedBody,
1604
- errorCode,
1605
- });
1606
- }
1607
- };
1608
- const de_StartBuildCommand = async (output, context) => {
1609
- if (output.statusCode >= 300) {
1610
- return de_StartBuildCommandError(output, context);
1611
- }
1612
- const data = await parseBody(output.body, context);
1613
- let contents = {};
1614
- contents = de_StartBuildOutput(data, context);
1615
- const response = {
1616
- $metadata: deserializeMetadata(output),
1617
- ...contents,
1618
- };
1619
- return response;
1620
- };
1621
- exports.de_StartBuildCommand = de_StartBuildCommand;
1622
- const de_StartBuildCommandError = async (output, context) => {
1623
- const parsedOutput = {
1624
- ...output,
1625
- body: await parseErrorBody(output.body, context),
1626
- };
1627
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1628
- switch (errorCode) {
1629
- case "AccountLimitExceededException":
1630
- case "com.amazonaws.codebuild#AccountLimitExceededException":
1631
- throw await de_AccountLimitExceededExceptionRes(parsedOutput, context);
1632
- case "InvalidInputException":
1633
- case "com.amazonaws.codebuild#InvalidInputException":
1634
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1635
- case "ResourceNotFoundException":
1636
- case "com.amazonaws.codebuild#ResourceNotFoundException":
1637
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1638
- default:
1639
- const parsedBody = parsedOutput.body;
1640
- return throwDefaultError({
1641
- output,
1642
- parsedBody,
1643
- errorCode,
1644
- });
1645
- }
1646
- };
1647
- const de_StartBuildBatchCommand = async (output, context) => {
1648
- if (output.statusCode >= 300) {
1649
- return de_StartBuildBatchCommandError(output, context);
1650
- }
1651
- const data = await parseBody(output.body, context);
1652
- let contents = {};
1653
- contents = de_StartBuildBatchOutput(data, context);
1654
- const response = {
1655
- $metadata: deserializeMetadata(output),
1656
- ...contents,
1657
- };
1658
- return response;
1659
- };
1660
- exports.de_StartBuildBatchCommand = de_StartBuildBatchCommand;
1661
- const de_StartBuildBatchCommandError = async (output, context) => {
1662
- const parsedOutput = {
1663
- ...output,
1664
- body: await parseErrorBody(output.body, context),
1665
- };
1666
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1667
- switch (errorCode) {
1668
- case "InvalidInputException":
1669
- case "com.amazonaws.codebuild#InvalidInputException":
1670
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1671
- case "ResourceNotFoundException":
1672
- case "com.amazonaws.codebuild#ResourceNotFoundException":
1673
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1674
- default:
1675
- const parsedBody = parsedOutput.body;
1676
- return throwDefaultError({
1677
- output,
1678
- parsedBody,
1679
- errorCode,
1680
- });
1681
- }
1682
- };
1683
- const de_StopBuildCommand = async (output, context) => {
1684
- if (output.statusCode >= 300) {
1685
- return de_StopBuildCommandError(output, context);
1686
- }
1687
- const data = await parseBody(output.body, context);
1688
- let contents = {};
1689
- contents = de_StopBuildOutput(data, context);
1690
- const response = {
1691
- $metadata: deserializeMetadata(output),
1692
- ...contents,
1693
- };
1694
- return response;
1695
- };
1696
- exports.de_StopBuildCommand = de_StopBuildCommand;
1697
- const de_StopBuildCommandError = async (output, context) => {
1698
- const parsedOutput = {
1699
- ...output,
1700
- body: await parseErrorBody(output.body, context),
1701
- };
1702
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1703
- switch (errorCode) {
1704
- case "InvalidInputException":
1705
- case "com.amazonaws.codebuild#InvalidInputException":
1706
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1707
- case "ResourceNotFoundException":
1708
- case "com.amazonaws.codebuild#ResourceNotFoundException":
1709
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1710
- default:
1711
- const parsedBody = parsedOutput.body;
1712
- return throwDefaultError({
1713
- output,
1714
- parsedBody,
1715
- errorCode,
1716
- });
1717
- }
1718
- };
1719
- const de_StopBuildBatchCommand = async (output, context) => {
1720
- if (output.statusCode >= 300) {
1721
- return de_StopBuildBatchCommandError(output, context);
1722
- }
1723
- const data = await parseBody(output.body, context);
1724
- let contents = {};
1725
- contents = de_StopBuildBatchOutput(data, context);
1726
- const response = {
1727
- $metadata: deserializeMetadata(output),
1728
- ...contents,
1729
- };
1730
- return response;
1731
- };
1732
- exports.de_StopBuildBatchCommand = de_StopBuildBatchCommand;
1733
- const de_StopBuildBatchCommandError = async (output, context) => {
1734
- const parsedOutput = {
1735
- ...output,
1736
- body: await parseErrorBody(output.body, context),
1737
- };
1738
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1739
- switch (errorCode) {
1740
- case "InvalidInputException":
1741
- case "com.amazonaws.codebuild#InvalidInputException":
1742
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1743
- case "ResourceNotFoundException":
1744
- case "com.amazonaws.codebuild#ResourceNotFoundException":
1745
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1746
- default:
1747
- const parsedBody = parsedOutput.body;
1748
- return throwDefaultError({
1749
- output,
1750
- parsedBody,
1751
- errorCode,
1752
- });
1753
- }
1754
- };
1755
- const de_UpdateProjectCommand = async (output, context) => {
1756
- if (output.statusCode >= 300) {
1757
- return de_UpdateProjectCommandError(output, context);
1758
- }
1759
- const data = await parseBody(output.body, context);
1760
- let contents = {};
1761
- contents = de_UpdateProjectOutput(data, context);
1762
- const response = {
1763
- $metadata: deserializeMetadata(output),
1764
- ...contents,
1765
- };
1766
- return response;
1767
- };
1768
- exports.de_UpdateProjectCommand = de_UpdateProjectCommand;
1769
- const de_UpdateProjectCommandError = async (output, context) => {
1770
- const parsedOutput = {
1771
- ...output,
1772
- body: await parseErrorBody(output.body, context),
1773
- };
1774
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1775
- switch (errorCode) {
1776
- case "InvalidInputException":
1777
- case "com.amazonaws.codebuild#InvalidInputException":
1778
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1779
- case "ResourceNotFoundException":
1780
- case "com.amazonaws.codebuild#ResourceNotFoundException":
1781
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1782
- default:
1783
- const parsedBody = parsedOutput.body;
1784
- return throwDefaultError({
1785
- output,
1786
- parsedBody,
1787
- errorCode,
1788
- });
1789
- }
1790
- };
1791
- const de_UpdateProjectVisibilityCommand = async (output, context) => {
1792
- if (output.statusCode >= 300) {
1793
- return de_UpdateProjectVisibilityCommandError(output, context);
1794
- }
1795
- const data = await parseBody(output.body, context);
1796
- let contents = {};
1797
- contents = (0, smithy_client_1._json)(data);
1798
- const response = {
1799
- $metadata: deserializeMetadata(output),
1800
- ...contents,
1801
- };
1802
- return response;
1803
- };
1804
- exports.de_UpdateProjectVisibilityCommand = de_UpdateProjectVisibilityCommand;
1805
- const de_UpdateProjectVisibilityCommandError = async (output, context) => {
1806
- const parsedOutput = {
1807
- ...output,
1808
- body: await parseErrorBody(output.body, context),
1809
- };
1810
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1811
- switch (errorCode) {
1812
- case "InvalidInputException":
1813
- case "com.amazonaws.codebuild#InvalidInputException":
1814
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1815
- case "ResourceNotFoundException":
1816
- case "com.amazonaws.codebuild#ResourceNotFoundException":
1817
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1818
- default:
1819
- const parsedBody = parsedOutput.body;
1820
- return throwDefaultError({
1821
- output,
1822
- parsedBody,
1823
- errorCode,
1824
- });
1825
- }
1826
- };
1827
- const de_UpdateReportGroupCommand = async (output, context) => {
1828
- if (output.statusCode >= 300) {
1829
- return de_UpdateReportGroupCommandError(output, context);
1830
- }
1831
- const data = await parseBody(output.body, context);
1832
- let contents = {};
1833
- contents = de_UpdateReportGroupOutput(data, context);
1834
- const response = {
1835
- $metadata: deserializeMetadata(output),
1836
- ...contents,
1837
- };
1838
- return response;
1839
- };
1840
- exports.de_UpdateReportGroupCommand = de_UpdateReportGroupCommand;
1841
- const de_UpdateReportGroupCommandError = async (output, context) => {
1842
- const parsedOutput = {
1843
- ...output,
1844
- body: await parseErrorBody(output.body, context),
1845
- };
1846
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1847
- switch (errorCode) {
1848
- case "InvalidInputException":
1849
- case "com.amazonaws.codebuild#InvalidInputException":
1850
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1851
- case "ResourceNotFoundException":
1852
- case "com.amazonaws.codebuild#ResourceNotFoundException":
1853
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1854
- default:
1855
- const parsedBody = parsedOutput.body;
1856
- return throwDefaultError({
1857
- output,
1858
- parsedBody,
1859
- errorCode,
1860
- });
1861
- }
1862
- };
1863
- const de_UpdateWebhookCommand = async (output, context) => {
1864
- if (output.statusCode >= 300) {
1865
- return de_UpdateWebhookCommandError(output, context);
1866
- }
1867
- const data = await parseBody(output.body, context);
1868
- let contents = {};
1869
- contents = de_UpdateWebhookOutput(data, context);
1870
- const response = {
1871
- $metadata: deserializeMetadata(output),
1872
- ...contents,
1873
- };
1874
- return response;
1875
- };
1876
- exports.de_UpdateWebhookCommand = de_UpdateWebhookCommand;
1877
- const de_UpdateWebhookCommandError = async (output, context) => {
1878
- const parsedOutput = {
1879
- ...output,
1880
- body: await parseErrorBody(output.body, context),
1881
- };
1882
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1883
- switch (errorCode) {
1884
- case "InvalidInputException":
1885
- case "com.amazonaws.codebuild#InvalidInputException":
1886
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1887
- case "OAuthProviderException":
1888
- case "com.amazonaws.codebuild#OAuthProviderException":
1889
- throw await de_OAuthProviderExceptionRes(parsedOutput, context);
1890
- case "ResourceNotFoundException":
1891
- case "com.amazonaws.codebuild#ResourceNotFoundException":
1892
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1893
- default:
1894
- const parsedBody = parsedOutput.body;
1895
- return throwDefaultError({
1896
- output,
1897
- parsedBody,
1898
- errorCode,
1899
- });
1900
- }
1901
- };
1902
- const de_AccountLimitExceededExceptionRes = async (parsedOutput, context) => {
1903
- const body = parsedOutput.body;
1904
- const deserialized = (0, smithy_client_1._json)(body);
1905
- const exception = new models_0_1.AccountLimitExceededException({
1906
- $metadata: deserializeMetadata(parsedOutput),
1907
- ...deserialized,
1908
- });
1909
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1910
- };
1911
- const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
1912
- const body = parsedOutput.body;
1913
- const deserialized = (0, smithy_client_1._json)(body);
1914
- const exception = new models_0_1.InvalidInputException({
1915
- $metadata: deserializeMetadata(parsedOutput),
1916
- ...deserialized,
1917
- });
1918
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1919
- };
1920
- const de_OAuthProviderExceptionRes = async (parsedOutput, context) => {
1921
- const body = parsedOutput.body;
1922
- const deserialized = (0, smithy_client_1._json)(body);
1923
- const exception = new models_0_1.OAuthProviderException({
1924
- $metadata: deserializeMetadata(parsedOutput),
1925
- ...deserialized,
1926
- });
1927
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1928
- };
1929
- const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
1930
- const body = parsedOutput.body;
1931
- const deserialized = (0, smithy_client_1._json)(body);
1932
- const exception = new models_0_1.ResourceAlreadyExistsException({
1933
- $metadata: deserializeMetadata(parsedOutput),
1934
- ...deserialized,
1935
- });
1936
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1937
- };
1938
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1939
- const body = parsedOutput.body;
1940
- const deserialized = (0, smithy_client_1._json)(body);
1941
- const exception = new models_0_1.ResourceNotFoundException({
1942
- $metadata: deserializeMetadata(parsedOutput),
1943
- ...deserialized,
1944
- });
1945
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1946
- };
1947
- const se_DescribeCodeCoveragesInput = (input, context) => {
1948
- return (0, smithy_client_1.take)(input, {
1949
- maxLineCoveragePercentage: smithy_client_1.serializeFloat,
1950
- maxResults: [],
1951
- minLineCoveragePercentage: smithy_client_1.serializeFloat,
1952
- nextToken: [],
1953
- reportArn: [],
1954
- sortBy: [],
1955
- sortOrder: [],
1956
- });
1957
- };
1958
- const de_BatchGetBuildBatchesOutput = (output, context) => {
1959
- return (0, smithy_client_1.take)(output, {
1960
- buildBatches: (_) => de_BuildBatches(_, context),
1961
- buildBatchesNotFound: smithy_client_1._json,
1962
- });
1963
- };
1964
- const de_BatchGetBuildsOutput = (output, context) => {
1965
- return (0, smithy_client_1.take)(output, {
1966
- builds: (_) => de_Builds(_, context),
1967
- buildsNotFound: smithy_client_1._json,
1968
- });
1969
- };
1970
- const de_BatchGetProjectsOutput = (output, context) => {
1971
- return (0, smithy_client_1.take)(output, {
1972
- projects: (_) => de_Projects(_, context),
1973
- projectsNotFound: smithy_client_1._json,
1974
- });
1975
- };
1976
- const de_BatchGetReportGroupsOutput = (output, context) => {
1977
- return (0, smithy_client_1.take)(output, {
1978
- reportGroups: (_) => de_ReportGroups(_, context),
1979
- reportGroupsNotFound: smithy_client_1._json,
1980
- });
1981
- };
1982
- const de_BatchGetReportsOutput = (output, context) => {
1983
- return (0, smithy_client_1.take)(output, {
1984
- reports: (_) => de_Reports(_, context),
1985
- reportsNotFound: smithy_client_1._json,
1986
- });
1987
- };
1988
- const de_Build = (output, context) => {
1989
- return (0, smithy_client_1.take)(output, {
1990
- arn: smithy_client_1.expectString,
1991
- artifacts: smithy_client_1._json,
1992
- buildBatchArn: smithy_client_1.expectString,
1993
- buildComplete: smithy_client_1.expectBoolean,
1994
- buildNumber: smithy_client_1.expectLong,
1995
- buildStatus: smithy_client_1.expectString,
1996
- cache: smithy_client_1._json,
1997
- currentPhase: smithy_client_1.expectString,
1998
- debugSession: smithy_client_1._json,
1999
- encryptionKey: smithy_client_1.expectString,
2000
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2001
- environment: smithy_client_1._json,
2002
- exportedEnvironmentVariables: smithy_client_1._json,
2003
- fileSystemLocations: smithy_client_1._json,
2004
- id: smithy_client_1.expectString,
2005
- initiator: smithy_client_1.expectString,
2006
- logs: smithy_client_1._json,
2007
- networkInterface: smithy_client_1._json,
2008
- phases: (_) => de_BuildPhases(_, context),
2009
- projectName: smithy_client_1.expectString,
2010
- queuedTimeoutInMinutes: smithy_client_1.expectInt32,
2011
- reportArns: smithy_client_1._json,
2012
- resolvedSourceVersion: smithy_client_1.expectString,
2013
- secondaryArtifacts: smithy_client_1._json,
2014
- secondarySourceVersions: smithy_client_1._json,
2015
- secondarySources: smithy_client_1._json,
2016
- serviceRole: smithy_client_1.expectString,
2017
- source: smithy_client_1._json,
2018
- sourceVersion: smithy_client_1.expectString,
2019
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2020
- timeoutInMinutes: smithy_client_1.expectInt32,
2021
- vpcConfig: smithy_client_1._json,
2022
- });
2023
- };
2024
- const de_BuildBatch = (output, context) => {
2025
- return (0, smithy_client_1.take)(output, {
2026
- arn: smithy_client_1.expectString,
2027
- artifacts: smithy_client_1._json,
2028
- buildBatchConfig: smithy_client_1._json,
2029
- buildBatchNumber: smithy_client_1.expectLong,
2030
- buildBatchStatus: smithy_client_1.expectString,
2031
- buildGroups: (_) => de_BuildGroups(_, context),
2032
- buildTimeoutInMinutes: smithy_client_1.expectInt32,
2033
- cache: smithy_client_1._json,
2034
- complete: smithy_client_1.expectBoolean,
2035
- currentPhase: smithy_client_1.expectString,
2036
- debugSessionEnabled: smithy_client_1.expectBoolean,
2037
- encryptionKey: smithy_client_1.expectString,
2038
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2039
- environment: smithy_client_1._json,
2040
- fileSystemLocations: smithy_client_1._json,
2041
- id: smithy_client_1.expectString,
2042
- initiator: smithy_client_1.expectString,
2043
- logConfig: smithy_client_1._json,
2044
- phases: (_) => de_BuildBatchPhases(_, context),
2045
- projectName: smithy_client_1.expectString,
2046
- queuedTimeoutInMinutes: smithy_client_1.expectInt32,
2047
- resolvedSourceVersion: smithy_client_1.expectString,
2048
- secondaryArtifacts: smithy_client_1._json,
2049
- secondarySourceVersions: smithy_client_1._json,
2050
- secondarySources: smithy_client_1._json,
2051
- serviceRole: smithy_client_1.expectString,
2052
- source: smithy_client_1._json,
2053
- sourceVersion: smithy_client_1.expectString,
2054
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2055
- vpcConfig: smithy_client_1._json,
2056
- });
2057
- };
2058
- const de_BuildBatches = (output, context) => {
2059
- const retVal = (output || [])
2060
- .filter((e) => e != null)
2061
- .map((entry) => {
2062
- return de_BuildBatch(entry, context);
2063
- });
2064
- return retVal;
2065
- };
2066
- const de_BuildBatchPhase = (output, context) => {
2067
- return (0, smithy_client_1.take)(output, {
2068
- contexts: smithy_client_1._json,
2069
- durationInSeconds: smithy_client_1.expectLong,
2070
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2071
- phaseStatus: smithy_client_1.expectString,
2072
- phaseType: smithy_client_1.expectString,
2073
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2074
- });
2075
- };
2076
- const de_BuildBatchPhases = (output, context) => {
2077
- const retVal = (output || [])
2078
- .filter((e) => e != null)
2079
- .map((entry) => {
2080
- return de_BuildBatchPhase(entry, context);
2081
- });
2082
- return retVal;
2083
- };
2084
- const de_BuildGroup = (output, context) => {
2085
- return (0, smithy_client_1.take)(output, {
2086
- currentBuildSummary: (_) => de_BuildSummary(_, context),
2087
- dependsOn: smithy_client_1._json,
2088
- identifier: smithy_client_1.expectString,
2089
- ignoreFailure: smithy_client_1.expectBoolean,
2090
- priorBuildSummaryList: (_) => de_BuildSummaries(_, context),
2091
- });
2092
- };
2093
- const de_BuildGroups = (output, context) => {
2094
- const retVal = (output || [])
2095
- .filter((e) => e != null)
2096
- .map((entry) => {
2097
- return de_BuildGroup(entry, context);
2098
- });
2099
- return retVal;
2100
- };
2101
- const de_BuildPhase = (output, context) => {
2102
- return (0, smithy_client_1.take)(output, {
2103
- contexts: smithy_client_1._json,
2104
- durationInSeconds: smithy_client_1.expectLong,
2105
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2106
- phaseStatus: smithy_client_1.expectString,
2107
- phaseType: smithy_client_1.expectString,
2108
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2109
- });
2110
- };
2111
- const de_BuildPhases = (output, context) => {
2112
- const retVal = (output || [])
2113
- .filter((e) => e != null)
2114
- .map((entry) => {
2115
- return de_BuildPhase(entry, context);
2116
- });
2117
- return retVal;
2118
- };
2119
- const de_Builds = (output, context) => {
2120
- const retVal = (output || [])
2121
- .filter((e) => e != null)
2122
- .map((entry) => {
2123
- return de_Build(entry, context);
2124
- });
2125
- return retVal;
2126
- };
2127
- const de_BuildSummaries = (output, context) => {
2128
- const retVal = (output || [])
2129
- .filter((e) => e != null)
2130
- .map((entry) => {
2131
- return de_BuildSummary(entry, context);
2132
- });
2133
- return retVal;
2134
- };
2135
- const de_BuildSummary = (output, context) => {
2136
- return (0, smithy_client_1.take)(output, {
2137
- arn: smithy_client_1.expectString,
2138
- buildStatus: smithy_client_1.expectString,
2139
- primaryArtifact: smithy_client_1._json,
2140
- requestedOn: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2141
- secondaryArtifacts: smithy_client_1._json,
2142
- });
2143
- };
2144
- const de_CodeCoverage = (output, context) => {
2145
- return (0, smithy_client_1.take)(output, {
2146
- branchCoveragePercentage: smithy_client_1.limitedParseDouble,
2147
- branchesCovered: smithy_client_1.expectInt32,
2148
- branchesMissed: smithy_client_1.expectInt32,
2149
- expired: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2150
- filePath: smithy_client_1.expectString,
2151
- id: smithy_client_1.expectString,
2152
- lineCoveragePercentage: smithy_client_1.limitedParseDouble,
2153
- linesCovered: smithy_client_1.expectInt32,
2154
- linesMissed: smithy_client_1.expectInt32,
2155
- reportARN: smithy_client_1.expectString,
2156
- });
2157
- };
2158
- const de_CodeCoverageReportSummary = (output, context) => {
2159
- return (0, smithy_client_1.take)(output, {
2160
- branchCoveragePercentage: smithy_client_1.limitedParseDouble,
2161
- branchesCovered: smithy_client_1.expectInt32,
2162
- branchesMissed: smithy_client_1.expectInt32,
2163
- lineCoveragePercentage: smithy_client_1.limitedParseDouble,
2164
- linesCovered: smithy_client_1.expectInt32,
2165
- linesMissed: smithy_client_1.expectInt32,
2166
- });
2167
- };
2168
- const de_CodeCoverages = (output, context) => {
2169
- const retVal = (output || [])
2170
- .filter((e) => e != null)
2171
- .map((entry) => {
2172
- return de_CodeCoverage(entry, context);
2173
- });
2174
- return retVal;
2175
- };
2176
- const de_CreateProjectOutput = (output, context) => {
2177
- return (0, smithy_client_1.take)(output, {
2178
- project: (_) => de_Project(_, context),
2179
- });
2180
- };
2181
- const de_CreateReportGroupOutput = (output, context) => {
2182
- return (0, smithy_client_1.take)(output, {
2183
- reportGroup: (_) => de_ReportGroup(_, context),
2184
- });
2185
- };
2186
- const de_CreateWebhookOutput = (output, context) => {
2187
- return (0, smithy_client_1.take)(output, {
2188
- webhook: (_) => de_Webhook(_, context),
2189
- });
2190
- };
2191
- const de_DescribeCodeCoveragesOutput = (output, context) => {
2192
- return (0, smithy_client_1.take)(output, {
2193
- codeCoverages: (_) => de_CodeCoverages(_, context),
2194
- nextToken: smithy_client_1.expectString,
2195
- });
2196
- };
2197
- const de_DescribeTestCasesOutput = (output, context) => {
2198
- return (0, smithy_client_1.take)(output, {
2199
- nextToken: smithy_client_1.expectString,
2200
- testCases: (_) => de_TestCases(_, context),
2201
- });
2202
- };
2203
- const de_Project = (output, context) => {
2204
- return (0, smithy_client_1.take)(output, {
2205
- arn: smithy_client_1.expectString,
2206
- artifacts: smithy_client_1._json,
2207
- badge: smithy_client_1._json,
2208
- buildBatchConfig: smithy_client_1._json,
2209
- cache: smithy_client_1._json,
2210
- concurrentBuildLimit: smithy_client_1.expectInt32,
2211
- created: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2212
- description: smithy_client_1.expectString,
2213
- encryptionKey: smithy_client_1.expectString,
2214
- environment: smithy_client_1._json,
2215
- fileSystemLocations: smithy_client_1._json,
2216
- lastModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2217
- logsConfig: smithy_client_1._json,
2218
- name: smithy_client_1.expectString,
2219
- projectVisibility: smithy_client_1.expectString,
2220
- publicProjectAlias: smithy_client_1.expectString,
2221
- queuedTimeoutInMinutes: smithy_client_1.expectInt32,
2222
- resourceAccessRole: smithy_client_1.expectString,
2223
- secondaryArtifacts: smithy_client_1._json,
2224
- secondarySourceVersions: smithy_client_1._json,
2225
- secondarySources: smithy_client_1._json,
2226
- serviceRole: smithy_client_1.expectString,
2227
- source: smithy_client_1._json,
2228
- sourceVersion: smithy_client_1.expectString,
2229
- tags: smithy_client_1._json,
2230
- timeoutInMinutes: smithy_client_1.expectInt32,
2231
- vpcConfig: smithy_client_1._json,
2232
- webhook: (_) => de_Webhook(_, context),
2233
- });
2234
- };
2235
- const de_Projects = (output, context) => {
2236
- const retVal = (output || [])
2237
- .filter((e) => e != null)
2238
- .map((entry) => {
2239
- return de_Project(entry, context);
2240
- });
2241
- return retVal;
2242
- };
2243
- const de_Report = (output, context) => {
2244
- return (0, smithy_client_1.take)(output, {
2245
- arn: smithy_client_1.expectString,
2246
- codeCoverageSummary: (_) => de_CodeCoverageReportSummary(_, context),
2247
- created: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2248
- executionId: smithy_client_1.expectString,
2249
- expired: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2250
- exportConfig: smithy_client_1._json,
2251
- name: smithy_client_1.expectString,
2252
- reportGroupArn: smithy_client_1.expectString,
2253
- status: smithy_client_1.expectString,
2254
- testSummary: smithy_client_1._json,
2255
- truncated: smithy_client_1.expectBoolean,
2256
- type: smithy_client_1.expectString,
2257
- });
2258
- };
2259
- const de_ReportGroup = (output, context) => {
2260
- return (0, smithy_client_1.take)(output, {
2261
- arn: smithy_client_1.expectString,
2262
- created: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2263
- exportConfig: smithy_client_1._json,
2264
- lastModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2265
- name: smithy_client_1.expectString,
2266
- status: smithy_client_1.expectString,
2267
- tags: smithy_client_1._json,
2268
- type: smithy_client_1.expectString,
2269
- });
2270
- };
2271
- const de_ReportGroups = (output, context) => {
2272
- const retVal = (output || [])
2273
- .filter((e) => e != null)
2274
- .map((entry) => {
2275
- return de_ReportGroup(entry, context);
2276
- });
2277
- return retVal;
2278
- };
2279
- const de_Reports = (output, context) => {
2280
- const retVal = (output || [])
2281
- .filter((e) => e != null)
2282
- .map((entry) => {
2283
- return de_Report(entry, context);
2284
- });
2285
- return retVal;
2286
- };
2287
- const de_RetryBuildBatchOutput = (output, context) => {
2288
- return (0, smithy_client_1.take)(output, {
2289
- buildBatch: (_) => de_BuildBatch(_, context),
2290
- });
2291
- };
2292
- const de_RetryBuildOutput = (output, context) => {
2293
- return (0, smithy_client_1.take)(output, {
2294
- build: (_) => de_Build(_, context),
2295
- });
2296
- };
2297
- const de_StartBuildBatchOutput = (output, context) => {
2298
- return (0, smithy_client_1.take)(output, {
2299
- buildBatch: (_) => de_BuildBatch(_, context),
2300
- });
2301
- };
2302
- const de_StartBuildOutput = (output, context) => {
2303
- return (0, smithy_client_1.take)(output, {
2304
- build: (_) => de_Build(_, context),
2305
- });
2306
- };
2307
- const de_StopBuildBatchOutput = (output, context) => {
2308
- return (0, smithy_client_1.take)(output, {
2309
- buildBatch: (_) => de_BuildBatch(_, context),
2310
- });
2311
- };
2312
- const de_StopBuildOutput = (output, context) => {
2313
- return (0, smithy_client_1.take)(output, {
2314
- build: (_) => de_Build(_, context),
2315
- });
2316
- };
2317
- const de_TestCase = (output, context) => {
2318
- return (0, smithy_client_1.take)(output, {
2319
- durationInNanoSeconds: smithy_client_1.expectLong,
2320
- expired: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2321
- message: smithy_client_1.expectString,
2322
- name: smithy_client_1.expectString,
2323
- prefix: smithy_client_1.expectString,
2324
- reportArn: smithy_client_1.expectString,
2325
- status: smithy_client_1.expectString,
2326
- testRawDataPath: smithy_client_1.expectString,
2327
- });
2328
- };
2329
- const de_TestCases = (output, context) => {
2330
- const retVal = (output || [])
2331
- .filter((e) => e != null)
2332
- .map((entry) => {
2333
- return de_TestCase(entry, context);
2334
- });
2335
- return retVal;
2336
- };
2337
- const de_UpdateProjectOutput = (output, context) => {
2338
- return (0, smithy_client_1.take)(output, {
2339
- project: (_) => de_Project(_, context),
2340
- });
2341
- };
2342
- const de_UpdateReportGroupOutput = (output, context) => {
2343
- return (0, smithy_client_1.take)(output, {
2344
- reportGroup: (_) => de_ReportGroup(_, context),
2345
- });
2346
- };
2347
- const de_UpdateWebhookOutput = (output, context) => {
2348
- return (0, smithy_client_1.take)(output, {
2349
- webhook: (_) => de_Webhook(_, context),
2350
- });
2351
- };
2352
- const de_Webhook = (output, context) => {
2353
- return (0, smithy_client_1.take)(output, {
2354
- branchFilter: smithy_client_1.expectString,
2355
- buildType: smithy_client_1.expectString,
2356
- filterGroups: smithy_client_1._json,
2357
- lastModifiedSecret: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2358
- payloadUrl: smithy_client_1.expectString,
2359
- secret: smithy_client_1.expectString,
2360
- url: smithy_client_1.expectString,
2361
- });
2362
- };
2363
- const deserializeMetadata = (output) => ({
2364
- httpStatusCode: output.statusCode,
2365
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2366
- extendedRequestId: output.headers["x-amz-id-2"],
2367
- cfId: output.headers["x-amz-cf-id"],
2368
- });
2369
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
2370
- const throwDefaultError = (0, smithy_client_1.withBaseException)(CodeBuildServiceException_1.CodeBuildServiceException);
2371
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2372
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2373
- const contents = {
2374
- protocol,
2375
- hostname,
2376
- port,
2377
- method: "POST",
2378
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2379
- headers,
2380
- };
2381
- if (resolvedHostname !== undefined) {
2382
- contents.hostname = resolvedHostname;
2383
- }
2384
- if (body !== undefined) {
2385
- contents.body = body;
2386
- }
2387
- return new protocol_http_1.HttpRequest(contents);
2388
- };
2389
- function sharedHeaders(operation) {
2390
- return {
2391
- "content-type": "application/x-amz-json-1.1",
2392
- "x-amz-target": `CodeBuild_20161006.${operation}`,
2393
- };
2394
- }
2395
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2396
- if (encoded.length) {
2397
- return JSON.parse(encoded);
2398
- }
2399
- return {};
2400
- });
2401
- const parseErrorBody = async (errorBody, context) => {
2402
- const value = await parseBody(errorBody, context);
2403
- value.message = value.message ?? value.Message;
2404
- return value;
2405
- };
2406
- const loadRestJsonErrorCode = (output, data) => {
2407
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2408
- const sanitizeErrorCode = (rawValue) => {
2409
- let cleanValue = rawValue;
2410
- if (typeof cleanValue === "number") {
2411
- cleanValue = cleanValue.toString();
2412
- }
2413
- if (cleanValue.indexOf(",") >= 0) {
2414
- cleanValue = cleanValue.split(",")[0];
2415
- }
2416
- if (cleanValue.indexOf(":") >= 0) {
2417
- cleanValue = cleanValue.split(":")[0];
2418
- }
2419
- if (cleanValue.indexOf("#") >= 0) {
2420
- cleanValue = cleanValue.split("#")[1];
2421
- }
2422
- return cleanValue;
2423
- };
2424
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2425
- if (headerKey !== undefined) {
2426
- return sanitizeErrorCode(output.headers[headerKey]);
2427
- }
2428
- if (data.code !== undefined) {
2429
- return sanitizeErrorCode(data.code);
2430
- }
2431
- if (data["__type"] !== undefined) {
2432
- return sanitizeErrorCode(data["__type"]);
2433
- }
2434
- };
1
+ module.exports = require("../index.js");