@aws-sdk/client-codecatalyst 3.489.0 → 3.495.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist-cjs/CodeCatalyst.js +1 -87
  2. package/dist-cjs/CodeCatalystClient.js +1 -56
  3. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +1 -43
  4. package/dist-cjs/commands/CreateAccessTokenCommand.js +1 -29
  5. package/dist-cjs/commands/CreateDevEnvironmentCommand.js +1 -28
  6. package/dist-cjs/commands/CreateProjectCommand.js +1 -28
  7. package/dist-cjs/commands/CreateSourceRepositoryBranchCommand.js +1 -28
  8. package/dist-cjs/commands/CreateSourceRepositoryCommand.js +1 -28
  9. package/dist-cjs/commands/DeleteAccessTokenCommand.js +1 -28
  10. package/dist-cjs/commands/DeleteDevEnvironmentCommand.js +1 -28
  11. package/dist-cjs/commands/DeleteProjectCommand.js +1 -28
  12. package/dist-cjs/commands/DeleteSourceRepositoryCommand.js +1 -28
  13. package/dist-cjs/commands/DeleteSpaceCommand.js +1 -28
  14. package/dist-cjs/commands/GetDevEnvironmentCommand.js +1 -28
  15. package/dist-cjs/commands/GetProjectCommand.js +1 -28
  16. package/dist-cjs/commands/GetSourceRepositoryCloneUrlsCommand.js +1 -28
  17. package/dist-cjs/commands/GetSourceRepositoryCommand.js +1 -28
  18. package/dist-cjs/commands/GetSpaceCommand.js +1 -28
  19. package/dist-cjs/commands/GetSubscriptionCommand.js +1 -28
  20. package/dist-cjs/commands/GetUserDetailsCommand.js +1 -28
  21. package/dist-cjs/commands/GetWorkflowCommand.js +1 -28
  22. package/dist-cjs/commands/GetWorkflowRunCommand.js +1 -28
  23. package/dist-cjs/commands/ListAccessTokensCommand.js +1 -28
  24. package/dist-cjs/commands/ListDevEnvironmentSessionsCommand.js +1 -28
  25. package/dist-cjs/commands/ListDevEnvironmentsCommand.js +1 -28
  26. package/dist-cjs/commands/ListEventLogsCommand.js +1 -28
  27. package/dist-cjs/commands/ListProjectsCommand.js +1 -28
  28. package/dist-cjs/commands/ListSourceRepositoriesCommand.js +1 -28
  29. package/dist-cjs/commands/ListSourceRepositoryBranchesCommand.js +1 -28
  30. package/dist-cjs/commands/ListSpacesCommand.js +1 -28
  31. package/dist-cjs/commands/ListWorkflowRunsCommand.js +1 -28
  32. package/dist-cjs/commands/ListWorkflowsCommand.js +1 -28
  33. package/dist-cjs/commands/StartDevEnvironmentCommand.js +1 -28
  34. package/dist-cjs/commands/StartDevEnvironmentSessionCommand.js +1 -29
  35. package/dist-cjs/commands/StartWorkflowRunCommand.js +1 -28
  36. package/dist-cjs/commands/StopDevEnvironmentCommand.js +1 -28
  37. package/dist-cjs/commands/StopDevEnvironmentSessionCommand.js +1 -28
  38. package/dist-cjs/commands/UpdateDevEnvironmentCommand.js +1 -28
  39. package/dist-cjs/commands/UpdateProjectCommand.js +1 -28
  40. package/dist-cjs/commands/UpdateSpaceCommand.js +1 -28
  41. package/dist-cjs/commands/VerifySessionCommand.js +1 -28
  42. package/dist-cjs/commands/index.js +1 -41
  43. package/dist-cjs/endpoint/EndpointParameters.js +1 -16
  44. package/dist-cjs/extensionConfiguration.js +1 -2
  45. package/dist-cjs/index.js +4028 -11
  46. package/dist-cjs/models/CodeCatalystServiceException.js +1 -12
  47. package/dist-cjs/models/index.js +1 -4
  48. package/dist-cjs/models/models_0.js +1 -163
  49. package/dist-cjs/pagination/Interfaces.js +1 -2
  50. package/dist-cjs/pagination/ListAccessTokensPaginator.js +1 -7
  51. package/dist-cjs/pagination/ListDevEnvironmentSessionsPaginator.js +1 -7
  52. package/dist-cjs/pagination/ListDevEnvironmentsPaginator.js +1 -7
  53. package/dist-cjs/pagination/ListEventLogsPaginator.js +1 -7
  54. package/dist-cjs/pagination/ListProjectsPaginator.js +1 -7
  55. package/dist-cjs/pagination/ListSourceRepositoriesPaginator.js +1 -7
  56. package/dist-cjs/pagination/ListSourceRepositoryBranchesPaginator.js +1 -7
  57. package/dist-cjs/pagination/ListSpacesPaginator.js +1 -7
  58. package/dist-cjs/pagination/ListWorkflowRunsPaginator.js +1 -7
  59. package/dist-cjs/pagination/ListWorkflowsPaginator.js +1 -7
  60. package/dist-cjs/pagination/index.js +1 -14
  61. package/dist-cjs/protocols/Aws_restJson1.js +1 -2838
  62. package/dist-cjs/runtimeExtensions.js +1 -25
  63. package/dist-es/CodeCatalystClient.js +8 -8
  64. package/dist-types/CodeCatalystClient.d.ts +2 -2
  65. package/dist-types/ts3.4/CodeCatalystClient.d.ts +2 -2
  66. package/package.json +39 -39
@@ -1,2838 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_GetProjectCommand = exports.de_GetDevEnvironmentCommand = exports.de_DeleteSpaceCommand = exports.de_DeleteSourceRepositoryCommand = exports.de_DeleteProjectCommand = exports.de_DeleteDevEnvironmentCommand = exports.de_DeleteAccessTokenCommand = exports.de_CreateSourceRepositoryBranchCommand = exports.de_CreateSourceRepositoryCommand = exports.de_CreateProjectCommand = exports.de_CreateDevEnvironmentCommand = exports.de_CreateAccessTokenCommand = exports.se_VerifySessionCommand = exports.se_UpdateSpaceCommand = exports.se_UpdateProjectCommand = exports.se_UpdateDevEnvironmentCommand = exports.se_StopDevEnvironmentSessionCommand = exports.se_StopDevEnvironmentCommand = exports.se_StartWorkflowRunCommand = exports.se_StartDevEnvironmentSessionCommand = exports.se_StartDevEnvironmentCommand = exports.se_ListWorkflowsCommand = exports.se_ListWorkflowRunsCommand = exports.se_ListSpacesCommand = exports.se_ListSourceRepositoryBranchesCommand = exports.se_ListSourceRepositoriesCommand = exports.se_ListProjectsCommand = exports.se_ListEventLogsCommand = exports.se_ListDevEnvironmentSessionsCommand = exports.se_ListDevEnvironmentsCommand = exports.se_ListAccessTokensCommand = exports.se_GetWorkflowRunCommand = exports.se_GetWorkflowCommand = exports.se_GetUserDetailsCommand = exports.se_GetSubscriptionCommand = exports.se_GetSpaceCommand = exports.se_GetSourceRepositoryCloneUrlsCommand = exports.se_GetSourceRepositoryCommand = exports.se_GetProjectCommand = exports.se_GetDevEnvironmentCommand = exports.se_DeleteSpaceCommand = exports.se_DeleteSourceRepositoryCommand = exports.se_DeleteProjectCommand = exports.se_DeleteDevEnvironmentCommand = exports.se_DeleteAccessTokenCommand = exports.se_CreateSourceRepositoryBranchCommand = exports.se_CreateSourceRepositoryCommand = exports.se_CreateProjectCommand = exports.se_CreateDevEnvironmentCommand = exports.se_CreateAccessTokenCommand = void 0;
4
- exports.de_VerifySessionCommand = exports.de_UpdateSpaceCommand = exports.de_UpdateProjectCommand = exports.de_UpdateDevEnvironmentCommand = exports.de_StopDevEnvironmentSessionCommand = exports.de_StopDevEnvironmentCommand = exports.de_StartWorkflowRunCommand = exports.de_StartDevEnvironmentSessionCommand = exports.de_StartDevEnvironmentCommand = exports.de_ListWorkflowsCommand = exports.de_ListWorkflowRunsCommand = exports.de_ListSpacesCommand = exports.de_ListSourceRepositoryBranchesCommand = exports.de_ListSourceRepositoriesCommand = exports.de_ListProjectsCommand = exports.de_ListEventLogsCommand = exports.de_ListDevEnvironmentSessionsCommand = exports.de_ListDevEnvironmentsCommand = exports.de_ListAccessTokensCommand = exports.de_GetWorkflowRunCommand = exports.de_GetWorkflowCommand = exports.de_GetUserDetailsCommand = exports.de_GetSubscriptionCommand = exports.de_GetSpaceCommand = exports.de_GetSourceRepositoryCloneUrlsCommand = exports.de_GetSourceRepositoryCommand = void 0;
5
- const core_1 = require("@smithy/core");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const uuid_1 = require("uuid");
8
- const CodeCatalystServiceException_1 = require("../models/CodeCatalystServiceException");
9
- const models_0_1 = require("../models/models_0");
10
- const se_CreateAccessTokenCommand = async (input, context) => {
11
- const b = (0, core_1.requestBuilder)(input, context);
12
- const headers = {
13
- "content-type": "application/json",
14
- };
15
- b.bp("/v1/accessTokens");
16
- let body;
17
- body = JSON.stringify((0, smithy_client_1.take)(input, {
18
- expiresTime: (_) => _.toISOString().split(".")[0] + "Z",
19
- name: [],
20
- }));
21
- b.m("PUT").h(headers).b(body);
22
- return b.build();
23
- };
24
- exports.se_CreateAccessTokenCommand = se_CreateAccessTokenCommand;
25
- const se_CreateDevEnvironmentCommand = async (input, context) => {
26
- const b = (0, core_1.requestBuilder)(input, context);
27
- const headers = {
28
- "content-type": "application/json",
29
- };
30
- b.bp("/v1/spaces/{spaceName}/projects/{projectName}/devEnvironments");
31
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
32
- b.p("projectName", () => input.projectName, "{projectName}", false);
33
- let body;
34
- body = JSON.stringify((0, smithy_client_1.take)(input, {
35
- alias: [],
36
- clientToken: [],
37
- ides: (_) => (0, smithy_client_1._json)(_),
38
- inactivityTimeoutMinutes: [],
39
- instanceType: [],
40
- persistentStorage: (_) => (0, smithy_client_1._json)(_),
41
- repositories: (_) => (0, smithy_client_1._json)(_),
42
- vpcConnectionName: [],
43
- }));
44
- b.m("PUT").h(headers).b(body);
45
- return b.build();
46
- };
47
- exports.se_CreateDevEnvironmentCommand = se_CreateDevEnvironmentCommand;
48
- const se_CreateProjectCommand = async (input, context) => {
49
- const b = (0, core_1.requestBuilder)(input, context);
50
- const headers = {
51
- "content-type": "application/json",
52
- };
53
- b.bp("/v1/spaces/{spaceName}/projects");
54
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
55
- let body;
56
- body = JSON.stringify((0, smithy_client_1.take)(input, {
57
- description: [],
58
- displayName: [],
59
- }));
60
- b.m("PUT").h(headers).b(body);
61
- return b.build();
62
- };
63
- exports.se_CreateProjectCommand = se_CreateProjectCommand;
64
- const se_CreateSourceRepositoryCommand = async (input, context) => {
65
- const b = (0, core_1.requestBuilder)(input, context);
66
- const headers = {
67
- "content-type": "application/json",
68
- };
69
- b.bp("/v1/spaces/{spaceName}/projects/{projectName}/sourceRepositories/{name}");
70
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
71
- b.p("projectName", () => input.projectName, "{projectName}", false);
72
- b.p("name", () => input.name, "{name}", false);
73
- let body;
74
- body = JSON.stringify((0, smithy_client_1.take)(input, {
75
- description: [],
76
- }));
77
- b.m("PUT").h(headers).b(body);
78
- return b.build();
79
- };
80
- exports.se_CreateSourceRepositoryCommand = se_CreateSourceRepositoryCommand;
81
- const se_CreateSourceRepositoryBranchCommand = async (input, context) => {
82
- const b = (0, core_1.requestBuilder)(input, context);
83
- const headers = {
84
- "content-type": "application/json",
85
- };
86
- b.bp("/v1/spaces/{spaceName}/projects/{projectName}/sourceRepositories/{sourceRepositoryName}/branches/{name}");
87
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
88
- b.p("projectName", () => input.projectName, "{projectName}", false);
89
- b.p("sourceRepositoryName", () => input.sourceRepositoryName, "{sourceRepositoryName}", false);
90
- b.p("name", () => input.name, "{name}", false);
91
- let body;
92
- body = JSON.stringify((0, smithy_client_1.take)(input, {
93
- headCommitId: [],
94
- }));
95
- b.m("PUT").h(headers).b(body);
96
- return b.build();
97
- };
98
- exports.se_CreateSourceRepositoryBranchCommand = se_CreateSourceRepositoryBranchCommand;
99
- const se_DeleteAccessTokenCommand = async (input, context) => {
100
- const b = (0, core_1.requestBuilder)(input, context);
101
- const headers = {};
102
- b.bp("/v1/accessTokens/{id}");
103
- b.p("id", () => input.id, "{id}", false);
104
- let body;
105
- b.m("DELETE").h(headers).b(body);
106
- return b.build();
107
- };
108
- exports.se_DeleteAccessTokenCommand = se_DeleteAccessTokenCommand;
109
- const se_DeleteDevEnvironmentCommand = async (input, context) => {
110
- const b = (0, core_1.requestBuilder)(input, context);
111
- const headers = {};
112
- b.bp("/v1/spaces/{spaceName}/projects/{projectName}/devEnvironments/{id}");
113
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
114
- b.p("projectName", () => input.projectName, "{projectName}", false);
115
- b.p("id", () => input.id, "{id}", false);
116
- let body;
117
- b.m("DELETE").h(headers).b(body);
118
- return b.build();
119
- };
120
- exports.se_DeleteDevEnvironmentCommand = se_DeleteDevEnvironmentCommand;
121
- const se_DeleteProjectCommand = async (input, context) => {
122
- const b = (0, core_1.requestBuilder)(input, context);
123
- const headers = {};
124
- b.bp("/v1/spaces/{spaceName}/projects/{name}");
125
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
126
- b.p("name", () => input.name, "{name}", false);
127
- let body;
128
- b.m("DELETE").h(headers).b(body);
129
- return b.build();
130
- };
131
- exports.se_DeleteProjectCommand = se_DeleteProjectCommand;
132
- const se_DeleteSourceRepositoryCommand = async (input, context) => {
133
- const b = (0, core_1.requestBuilder)(input, context);
134
- const headers = {};
135
- b.bp("/v1/spaces/{spaceName}/projects/{projectName}/sourceRepositories/{name}");
136
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
137
- b.p("projectName", () => input.projectName, "{projectName}", false);
138
- b.p("name", () => input.name, "{name}", false);
139
- let body;
140
- b.m("DELETE").h(headers).b(body);
141
- return b.build();
142
- };
143
- exports.se_DeleteSourceRepositoryCommand = se_DeleteSourceRepositoryCommand;
144
- const se_DeleteSpaceCommand = async (input, context) => {
145
- const b = (0, core_1.requestBuilder)(input, context);
146
- const headers = {};
147
- b.bp("/v1/spaces/{name}");
148
- b.p("name", () => input.name, "{name}", false);
149
- let body;
150
- b.m("DELETE").h(headers).b(body);
151
- return b.build();
152
- };
153
- exports.se_DeleteSpaceCommand = se_DeleteSpaceCommand;
154
- const se_GetDevEnvironmentCommand = async (input, context) => {
155
- const b = (0, core_1.requestBuilder)(input, context);
156
- const headers = {};
157
- b.bp("/v1/spaces/{spaceName}/projects/{projectName}/devEnvironments/{id}");
158
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
159
- b.p("projectName", () => input.projectName, "{projectName}", false);
160
- b.p("id", () => input.id, "{id}", false);
161
- let body;
162
- b.m("GET").h(headers).b(body);
163
- return b.build();
164
- };
165
- exports.se_GetDevEnvironmentCommand = se_GetDevEnvironmentCommand;
166
- const se_GetProjectCommand = async (input, context) => {
167
- const b = (0, core_1.requestBuilder)(input, context);
168
- const headers = {};
169
- b.bp("/v1/spaces/{spaceName}/projects/{name}");
170
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
171
- b.p("name", () => input.name, "{name}", false);
172
- let body;
173
- b.m("GET").h(headers).b(body);
174
- return b.build();
175
- };
176
- exports.se_GetProjectCommand = se_GetProjectCommand;
177
- const se_GetSourceRepositoryCommand = async (input, context) => {
178
- const b = (0, core_1.requestBuilder)(input, context);
179
- const headers = {};
180
- b.bp("/v1/spaces/{spaceName}/projects/{projectName}/sourceRepositories/{name}");
181
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
182
- b.p("projectName", () => input.projectName, "{projectName}", false);
183
- b.p("name", () => input.name, "{name}", false);
184
- let body;
185
- b.m("GET").h(headers).b(body);
186
- return b.build();
187
- };
188
- exports.se_GetSourceRepositoryCommand = se_GetSourceRepositoryCommand;
189
- const se_GetSourceRepositoryCloneUrlsCommand = async (input, context) => {
190
- const b = (0, core_1.requestBuilder)(input, context);
191
- const headers = {};
192
- b.bp("/v1/spaces/{spaceName}/projects/{projectName}/sourceRepositories/{sourceRepositoryName}/cloneUrls");
193
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
194
- b.p("projectName", () => input.projectName, "{projectName}", false);
195
- b.p("sourceRepositoryName", () => input.sourceRepositoryName, "{sourceRepositoryName}", false);
196
- let body;
197
- b.m("GET").h(headers).b(body);
198
- return b.build();
199
- };
200
- exports.se_GetSourceRepositoryCloneUrlsCommand = se_GetSourceRepositoryCloneUrlsCommand;
201
- const se_GetSpaceCommand = async (input, context) => {
202
- const b = (0, core_1.requestBuilder)(input, context);
203
- const headers = {};
204
- b.bp("/v1/spaces/{name}");
205
- b.p("name", () => input.name, "{name}", false);
206
- let body;
207
- b.m("GET").h(headers).b(body);
208
- return b.build();
209
- };
210
- exports.se_GetSpaceCommand = se_GetSpaceCommand;
211
- const se_GetSubscriptionCommand = async (input, context) => {
212
- const b = (0, core_1.requestBuilder)(input, context);
213
- const headers = {};
214
- b.bp("/v1/spaces/{spaceName}/subscription");
215
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
216
- let body;
217
- b.m("GET").h(headers).b(body);
218
- return b.build();
219
- };
220
- exports.se_GetSubscriptionCommand = se_GetSubscriptionCommand;
221
- const se_GetUserDetailsCommand = async (input, context) => {
222
- const b = (0, core_1.requestBuilder)(input, context);
223
- const headers = {};
224
- b.bp("/userDetails");
225
- const query = (0, smithy_client_1.map)({
226
- [_i]: [, input[_i]],
227
- [_uN]: [, input[_uN]],
228
- });
229
- let body;
230
- b.m("GET").h(headers).q(query).b(body);
231
- return b.build();
232
- };
233
- exports.se_GetUserDetailsCommand = se_GetUserDetailsCommand;
234
- const se_GetWorkflowCommand = async (input, context) => {
235
- const b = (0, core_1.requestBuilder)(input, context);
236
- const headers = {};
237
- b.bp("/v1/spaces/{spaceName}/projects/{projectName}/workflows/{id}");
238
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
239
- b.p("id", () => input.id, "{id}", false);
240
- b.p("projectName", () => input.projectName, "{projectName}", false);
241
- let body;
242
- b.m("GET").h(headers).b(body);
243
- return b.build();
244
- };
245
- exports.se_GetWorkflowCommand = se_GetWorkflowCommand;
246
- const se_GetWorkflowRunCommand = async (input, context) => {
247
- const b = (0, core_1.requestBuilder)(input, context);
248
- const headers = {};
249
- b.bp("/v1/spaces/{spaceName}/projects/{projectName}/workflowRuns/{id}");
250
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
251
- b.p("id", () => input.id, "{id}", false);
252
- b.p("projectName", () => input.projectName, "{projectName}", false);
253
- let body;
254
- b.m("GET").h(headers).b(body);
255
- return b.build();
256
- };
257
- exports.se_GetWorkflowRunCommand = se_GetWorkflowRunCommand;
258
- const se_ListAccessTokensCommand = async (input, context) => {
259
- const b = (0, core_1.requestBuilder)(input, context);
260
- const headers = {
261
- "content-type": "application/json",
262
- };
263
- b.bp("/v1/accessTokens");
264
- let body;
265
- body = JSON.stringify((0, smithy_client_1.take)(input, {
266
- maxResults: [],
267
- nextToken: [],
268
- }));
269
- b.m("POST").h(headers).b(body);
270
- return b.build();
271
- };
272
- exports.se_ListAccessTokensCommand = se_ListAccessTokensCommand;
273
- const se_ListDevEnvironmentsCommand = async (input, context) => {
274
- const b = (0, core_1.requestBuilder)(input, context);
275
- const headers = {
276
- "content-type": "application/json",
277
- };
278
- b.bp("/v1/spaces/{spaceName}/devEnvironments");
279
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
280
- let body;
281
- body = JSON.stringify((0, smithy_client_1.take)(input, {
282
- filters: (_) => (0, smithy_client_1._json)(_),
283
- maxResults: [],
284
- nextToken: [],
285
- projectName: [],
286
- }));
287
- b.m("POST").h(headers).b(body);
288
- return b.build();
289
- };
290
- exports.se_ListDevEnvironmentsCommand = se_ListDevEnvironmentsCommand;
291
- const se_ListDevEnvironmentSessionsCommand = async (input, context) => {
292
- const b = (0, core_1.requestBuilder)(input, context);
293
- const headers = {
294
- "content-type": "application/json",
295
- };
296
- b.bp("/v1/spaces/{spaceName}/projects/{projectName}/devEnvironments/{devEnvironmentId}/sessions");
297
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
298
- b.p("projectName", () => input.projectName, "{projectName}", false);
299
- b.p("devEnvironmentId", () => input.devEnvironmentId, "{devEnvironmentId}", false);
300
- let body;
301
- body = JSON.stringify((0, smithy_client_1.take)(input, {
302
- maxResults: [],
303
- nextToken: [],
304
- }));
305
- b.m("POST").h(headers).b(body);
306
- return b.build();
307
- };
308
- exports.se_ListDevEnvironmentSessionsCommand = se_ListDevEnvironmentSessionsCommand;
309
- const se_ListEventLogsCommand = async (input, context) => {
310
- const b = (0, core_1.requestBuilder)(input, context);
311
- const headers = {
312
- "content-type": "application/json",
313
- };
314
- b.bp("/v1/spaces/{spaceName}/eventLogs");
315
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
316
- let body;
317
- body = JSON.stringify((0, smithy_client_1.take)(input, {
318
- endTime: (_) => _.toISOString().split(".")[0] + "Z",
319
- eventName: [],
320
- maxResults: [],
321
- nextToken: [],
322
- startTime: (_) => _.toISOString().split(".")[0] + "Z",
323
- }));
324
- b.m("POST").h(headers).b(body);
325
- return b.build();
326
- };
327
- exports.se_ListEventLogsCommand = se_ListEventLogsCommand;
328
- const se_ListProjectsCommand = async (input, context) => {
329
- const b = (0, core_1.requestBuilder)(input, context);
330
- const headers = {
331
- "content-type": "application/json",
332
- };
333
- b.bp("/v1/spaces/{spaceName}/projects");
334
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
335
- let body;
336
- body = JSON.stringify((0, smithy_client_1.take)(input, {
337
- filters: (_) => (0, smithy_client_1._json)(_),
338
- maxResults: [],
339
- nextToken: [],
340
- }));
341
- b.m("POST").h(headers).b(body);
342
- return b.build();
343
- };
344
- exports.se_ListProjectsCommand = se_ListProjectsCommand;
345
- const se_ListSourceRepositoriesCommand = async (input, context) => {
346
- const b = (0, core_1.requestBuilder)(input, context);
347
- const headers = {
348
- "content-type": "application/json",
349
- };
350
- b.bp("/v1/spaces/{spaceName}/projects/{projectName}/sourceRepositories");
351
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
352
- b.p("projectName", () => input.projectName, "{projectName}", false);
353
- let body;
354
- body = JSON.stringify((0, smithy_client_1.take)(input, {
355
- maxResults: [],
356
- nextToken: [],
357
- }));
358
- b.m("POST").h(headers).b(body);
359
- return b.build();
360
- };
361
- exports.se_ListSourceRepositoriesCommand = se_ListSourceRepositoriesCommand;
362
- const se_ListSourceRepositoryBranchesCommand = async (input, context) => {
363
- const b = (0, core_1.requestBuilder)(input, context);
364
- const headers = {
365
- "content-type": "application/json",
366
- };
367
- b.bp("/v1/spaces/{spaceName}/projects/{projectName}/sourceRepositories/{sourceRepositoryName}/branches");
368
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
369
- b.p("projectName", () => input.projectName, "{projectName}", false);
370
- b.p("sourceRepositoryName", () => input.sourceRepositoryName, "{sourceRepositoryName}", false);
371
- let body;
372
- body = JSON.stringify((0, smithy_client_1.take)(input, {
373
- maxResults: [],
374
- nextToken: [],
375
- }));
376
- b.m("POST").h(headers).b(body);
377
- return b.build();
378
- };
379
- exports.se_ListSourceRepositoryBranchesCommand = se_ListSourceRepositoryBranchesCommand;
380
- const se_ListSpacesCommand = async (input, context) => {
381
- const b = (0, core_1.requestBuilder)(input, context);
382
- const headers = {
383
- "content-type": "application/json",
384
- };
385
- b.bp("/v1/spaces");
386
- let body;
387
- body = JSON.stringify((0, smithy_client_1.take)(input, {
388
- nextToken: [],
389
- }));
390
- b.m("POST").h(headers).b(body);
391
- return b.build();
392
- };
393
- exports.se_ListSpacesCommand = se_ListSpacesCommand;
394
- const se_ListWorkflowRunsCommand = async (input, context) => {
395
- const b = (0, core_1.requestBuilder)(input, context);
396
- const headers = {
397
- "content-type": "application/json",
398
- };
399
- b.bp("/v1/spaces/{spaceName}/projects/{projectName}/workflowRuns");
400
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
401
- b.p("projectName", () => input.projectName, "{projectName}", false);
402
- const query = (0, smithy_client_1.map)({
403
- [_wI]: [, input[_wI]],
404
- [_nT]: [, input[_nT]],
405
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
406
- });
407
- let body;
408
- body = JSON.stringify((0, smithy_client_1.take)(input, {
409
- sortBy: (_) => (0, smithy_client_1._json)(_),
410
- }));
411
- b.m("POST").h(headers).q(query).b(body);
412
- return b.build();
413
- };
414
- exports.se_ListWorkflowRunsCommand = se_ListWorkflowRunsCommand;
415
- const se_ListWorkflowsCommand = async (input, context) => {
416
- const b = (0, core_1.requestBuilder)(input, context);
417
- const headers = {
418
- "content-type": "application/json",
419
- };
420
- b.bp("/v1/spaces/{spaceName}/projects/{projectName}/workflows");
421
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
422
- b.p("projectName", () => input.projectName, "{projectName}", false);
423
- const query = (0, smithy_client_1.map)({
424
- [_nT]: [, input[_nT]],
425
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
426
- });
427
- let body;
428
- body = JSON.stringify((0, smithy_client_1.take)(input, {
429
- sortBy: (_) => (0, smithy_client_1._json)(_),
430
- }));
431
- b.m("POST").h(headers).q(query).b(body);
432
- return b.build();
433
- };
434
- exports.se_ListWorkflowsCommand = se_ListWorkflowsCommand;
435
- const se_StartDevEnvironmentCommand = async (input, context) => {
436
- const b = (0, core_1.requestBuilder)(input, context);
437
- const headers = {
438
- "content-type": "application/json",
439
- };
440
- b.bp("/v1/spaces/{spaceName}/projects/{projectName}/devEnvironments/{id}/start");
441
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
442
- b.p("projectName", () => input.projectName, "{projectName}", false);
443
- b.p("id", () => input.id, "{id}", false);
444
- let body;
445
- body = JSON.stringify((0, smithy_client_1.take)(input, {
446
- ides: (_) => (0, smithy_client_1._json)(_),
447
- inactivityTimeoutMinutes: [],
448
- instanceType: [],
449
- }));
450
- b.m("PUT").h(headers).b(body);
451
- return b.build();
452
- };
453
- exports.se_StartDevEnvironmentCommand = se_StartDevEnvironmentCommand;
454
- const se_StartDevEnvironmentSessionCommand = async (input, context) => {
455
- const b = (0, core_1.requestBuilder)(input, context);
456
- const headers = {
457
- "content-type": "application/json",
458
- };
459
- b.bp("/v1/spaces/{spaceName}/projects/{projectName}/devEnvironments/{id}/session");
460
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
461
- b.p("projectName", () => input.projectName, "{projectName}", false);
462
- b.p("id", () => input.id, "{id}", false);
463
- let body;
464
- body = JSON.stringify((0, smithy_client_1.take)(input, {
465
- sessionConfiguration: (_) => (0, smithy_client_1._json)(_),
466
- }));
467
- b.m("PUT").h(headers).b(body);
468
- return b.build();
469
- };
470
- exports.se_StartDevEnvironmentSessionCommand = se_StartDevEnvironmentSessionCommand;
471
- const se_StartWorkflowRunCommand = async (input, context) => {
472
- const b = (0, core_1.requestBuilder)(input, context);
473
- const headers = {
474
- "content-type": "application/json",
475
- };
476
- b.bp("/v1/spaces/{spaceName}/projects/{projectName}/workflowRuns");
477
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
478
- b.p("projectName", () => input.projectName, "{projectName}", false);
479
- const query = (0, smithy_client_1.map)({
480
- [_wI]: [, (0, smithy_client_1.expectNonNull)(input[_wI], `workflowId`)],
481
- });
482
- let body;
483
- body = JSON.stringify((0, smithy_client_1.take)(input, {
484
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
485
- }));
486
- b.m("PUT").h(headers).q(query).b(body);
487
- return b.build();
488
- };
489
- exports.se_StartWorkflowRunCommand = se_StartWorkflowRunCommand;
490
- const se_StopDevEnvironmentCommand = async (input, context) => {
491
- const b = (0, core_1.requestBuilder)(input, context);
492
- const headers = {};
493
- b.bp("/v1/spaces/{spaceName}/projects/{projectName}/devEnvironments/{id}/stop");
494
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
495
- b.p("projectName", () => input.projectName, "{projectName}", false);
496
- b.p("id", () => input.id, "{id}", false);
497
- let body;
498
- b.m("PUT").h(headers).b(body);
499
- return b.build();
500
- };
501
- exports.se_StopDevEnvironmentCommand = se_StopDevEnvironmentCommand;
502
- const se_StopDevEnvironmentSessionCommand = async (input, context) => {
503
- const b = (0, core_1.requestBuilder)(input, context);
504
- const headers = {};
505
- b.bp("/v1/spaces/{spaceName}/projects/{projectName}/devEnvironments/{id}/session/{sessionId}");
506
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
507
- b.p("projectName", () => input.projectName, "{projectName}", false);
508
- b.p("id", () => input.id, "{id}", false);
509
- b.p("sessionId", () => input.sessionId, "{sessionId}", false);
510
- let body;
511
- b.m("DELETE").h(headers).b(body);
512
- return b.build();
513
- };
514
- exports.se_StopDevEnvironmentSessionCommand = se_StopDevEnvironmentSessionCommand;
515
- const se_UpdateDevEnvironmentCommand = async (input, context) => {
516
- const b = (0, core_1.requestBuilder)(input, context);
517
- const headers = {
518
- "content-type": "application/json",
519
- };
520
- b.bp("/v1/spaces/{spaceName}/projects/{projectName}/devEnvironments/{id}");
521
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
522
- b.p("projectName", () => input.projectName, "{projectName}", false);
523
- b.p("id", () => input.id, "{id}", false);
524
- let body;
525
- body = JSON.stringify((0, smithy_client_1.take)(input, {
526
- alias: [],
527
- clientToken: [],
528
- ides: (_) => (0, smithy_client_1._json)(_),
529
- inactivityTimeoutMinutes: [],
530
- instanceType: [],
531
- }));
532
- b.m("PATCH").h(headers).b(body);
533
- return b.build();
534
- };
535
- exports.se_UpdateDevEnvironmentCommand = se_UpdateDevEnvironmentCommand;
536
- const se_UpdateProjectCommand = async (input, context) => {
537
- const b = (0, core_1.requestBuilder)(input, context);
538
- const headers = {
539
- "content-type": "application/json",
540
- };
541
- b.bp("/v1/spaces/{spaceName}/projects/{name}");
542
- b.p("spaceName", () => input.spaceName, "{spaceName}", false);
543
- b.p("name", () => input.name, "{name}", false);
544
- let body;
545
- body = JSON.stringify((0, smithy_client_1.take)(input, {
546
- description: [],
547
- }));
548
- b.m("PATCH").h(headers).b(body);
549
- return b.build();
550
- };
551
- exports.se_UpdateProjectCommand = se_UpdateProjectCommand;
552
- const se_UpdateSpaceCommand = async (input, context) => {
553
- const b = (0, core_1.requestBuilder)(input, context);
554
- const headers = {
555
- "content-type": "application/json",
556
- };
557
- b.bp("/v1/spaces/{name}");
558
- b.p("name", () => input.name, "{name}", false);
559
- let body;
560
- body = JSON.stringify((0, smithy_client_1.take)(input, {
561
- description: [],
562
- }));
563
- b.m("PATCH").h(headers).b(body);
564
- return b.build();
565
- };
566
- exports.se_UpdateSpaceCommand = se_UpdateSpaceCommand;
567
- const se_VerifySessionCommand = async (input, context) => {
568
- const b = (0, core_1.requestBuilder)(input, context);
569
- const headers = {
570
- "content-type": "application/json",
571
- };
572
- b.bp("/session");
573
- let body;
574
- body = "";
575
- b.m("GET").h(headers).b(body);
576
- return b.build();
577
- };
578
- exports.se_VerifySessionCommand = se_VerifySessionCommand;
579
- const de_CreateAccessTokenCommand = async (output, context) => {
580
- if (output.statusCode !== 201 && output.statusCode >= 300) {
581
- return de_CreateAccessTokenCommandError(output, context);
582
- }
583
- const contents = (0, smithy_client_1.map)({
584
- $metadata: deserializeMetadata(output),
585
- });
586
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
587
- const doc = (0, smithy_client_1.take)(data, {
588
- accessTokenId: smithy_client_1.expectString,
589
- expiresTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
590
- name: smithy_client_1.expectString,
591
- secret: smithy_client_1.expectString,
592
- });
593
- Object.assign(contents, doc);
594
- return contents;
595
- };
596
- exports.de_CreateAccessTokenCommand = de_CreateAccessTokenCommand;
597
- const de_CreateAccessTokenCommandError = async (output, context) => {
598
- const parsedOutput = {
599
- ...output,
600
- body: await parseErrorBody(output.body, context),
601
- };
602
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
603
- switch (errorCode) {
604
- case "AccessDeniedException":
605
- case "com.amazonaws.codecatalyst#AccessDeniedException":
606
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
607
- case "ConflictException":
608
- case "com.amazonaws.codecatalyst#ConflictException":
609
- throw await de_ConflictExceptionRes(parsedOutput, context);
610
- case "ResourceNotFoundException":
611
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
612
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
613
- case "ServiceQuotaExceededException":
614
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
615
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
616
- case "ThrottlingException":
617
- case "com.amazonaws.codecatalyst#ThrottlingException":
618
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
619
- case "ValidationException":
620
- case "com.amazonaws.codecatalyst#ValidationException":
621
- throw await de_ValidationExceptionRes(parsedOutput, context);
622
- default:
623
- const parsedBody = parsedOutput.body;
624
- return throwDefaultError({
625
- output,
626
- parsedBody,
627
- errorCode,
628
- });
629
- }
630
- };
631
- const de_CreateDevEnvironmentCommand = async (output, context) => {
632
- if (output.statusCode !== 201 && output.statusCode >= 300) {
633
- return de_CreateDevEnvironmentCommandError(output, context);
634
- }
635
- const contents = (0, smithy_client_1.map)({
636
- $metadata: deserializeMetadata(output),
637
- });
638
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
639
- const doc = (0, smithy_client_1.take)(data, {
640
- id: smithy_client_1.expectString,
641
- projectName: smithy_client_1.expectString,
642
- spaceName: smithy_client_1.expectString,
643
- vpcConnectionName: smithy_client_1.expectString,
644
- });
645
- Object.assign(contents, doc);
646
- return contents;
647
- };
648
- exports.de_CreateDevEnvironmentCommand = de_CreateDevEnvironmentCommand;
649
- const de_CreateDevEnvironmentCommandError = async (output, context) => {
650
- const parsedOutput = {
651
- ...output,
652
- body: await parseErrorBody(output.body, context),
653
- };
654
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
655
- switch (errorCode) {
656
- case "AccessDeniedException":
657
- case "com.amazonaws.codecatalyst#AccessDeniedException":
658
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
659
- case "ConflictException":
660
- case "com.amazonaws.codecatalyst#ConflictException":
661
- throw await de_ConflictExceptionRes(parsedOutput, context);
662
- case "ResourceNotFoundException":
663
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
664
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
665
- case "ServiceQuotaExceededException":
666
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
667
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
668
- case "ThrottlingException":
669
- case "com.amazonaws.codecatalyst#ThrottlingException":
670
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
671
- case "ValidationException":
672
- case "com.amazonaws.codecatalyst#ValidationException":
673
- throw await de_ValidationExceptionRes(parsedOutput, context);
674
- default:
675
- const parsedBody = parsedOutput.body;
676
- return throwDefaultError({
677
- output,
678
- parsedBody,
679
- errorCode,
680
- });
681
- }
682
- };
683
- const de_CreateProjectCommand = async (output, context) => {
684
- if (output.statusCode !== 201 && output.statusCode >= 300) {
685
- return de_CreateProjectCommandError(output, context);
686
- }
687
- const contents = (0, smithy_client_1.map)({
688
- $metadata: deserializeMetadata(output),
689
- });
690
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
691
- const doc = (0, smithy_client_1.take)(data, {
692
- description: smithy_client_1.expectString,
693
- displayName: smithy_client_1.expectString,
694
- name: smithy_client_1.expectString,
695
- spaceName: smithy_client_1.expectString,
696
- });
697
- Object.assign(contents, doc);
698
- return contents;
699
- };
700
- exports.de_CreateProjectCommand = de_CreateProjectCommand;
701
- const de_CreateProjectCommandError = async (output, context) => {
702
- const parsedOutput = {
703
- ...output,
704
- body: await parseErrorBody(output.body, context),
705
- };
706
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
707
- switch (errorCode) {
708
- case "AccessDeniedException":
709
- case "com.amazonaws.codecatalyst#AccessDeniedException":
710
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
711
- case "ConflictException":
712
- case "com.amazonaws.codecatalyst#ConflictException":
713
- throw await de_ConflictExceptionRes(parsedOutput, context);
714
- case "ResourceNotFoundException":
715
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
716
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
717
- case "ServiceQuotaExceededException":
718
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
719
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
720
- case "ThrottlingException":
721
- case "com.amazonaws.codecatalyst#ThrottlingException":
722
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
723
- case "ValidationException":
724
- case "com.amazonaws.codecatalyst#ValidationException":
725
- throw await de_ValidationExceptionRes(parsedOutput, context);
726
- default:
727
- const parsedBody = parsedOutput.body;
728
- return throwDefaultError({
729
- output,
730
- parsedBody,
731
- errorCode,
732
- });
733
- }
734
- };
735
- const de_CreateSourceRepositoryCommand = async (output, context) => {
736
- if (output.statusCode !== 201 && output.statusCode >= 300) {
737
- return de_CreateSourceRepositoryCommandError(output, context);
738
- }
739
- const contents = (0, smithy_client_1.map)({
740
- $metadata: deserializeMetadata(output),
741
- });
742
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
743
- const doc = (0, smithy_client_1.take)(data, {
744
- description: smithy_client_1.expectString,
745
- name: smithy_client_1.expectString,
746
- projectName: smithy_client_1.expectString,
747
- spaceName: smithy_client_1.expectString,
748
- });
749
- Object.assign(contents, doc);
750
- return contents;
751
- };
752
- exports.de_CreateSourceRepositoryCommand = de_CreateSourceRepositoryCommand;
753
- const de_CreateSourceRepositoryCommandError = async (output, context) => {
754
- const parsedOutput = {
755
- ...output,
756
- body: await parseErrorBody(output.body, context),
757
- };
758
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
759
- switch (errorCode) {
760
- case "AccessDeniedException":
761
- case "com.amazonaws.codecatalyst#AccessDeniedException":
762
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
763
- case "ConflictException":
764
- case "com.amazonaws.codecatalyst#ConflictException":
765
- throw await de_ConflictExceptionRes(parsedOutput, context);
766
- case "ResourceNotFoundException":
767
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
768
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
769
- case "ServiceQuotaExceededException":
770
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
771
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
772
- case "ThrottlingException":
773
- case "com.amazonaws.codecatalyst#ThrottlingException":
774
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
775
- case "ValidationException":
776
- case "com.amazonaws.codecatalyst#ValidationException":
777
- throw await de_ValidationExceptionRes(parsedOutput, context);
778
- default:
779
- const parsedBody = parsedOutput.body;
780
- return throwDefaultError({
781
- output,
782
- parsedBody,
783
- errorCode,
784
- });
785
- }
786
- };
787
- const de_CreateSourceRepositoryBranchCommand = async (output, context) => {
788
- if (output.statusCode !== 201 && output.statusCode >= 300) {
789
- return de_CreateSourceRepositoryBranchCommandError(output, context);
790
- }
791
- const contents = (0, smithy_client_1.map)({
792
- $metadata: deserializeMetadata(output),
793
- });
794
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
795
- const doc = (0, smithy_client_1.take)(data, {
796
- headCommitId: smithy_client_1.expectString,
797
- lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
798
- name: smithy_client_1.expectString,
799
- ref: smithy_client_1.expectString,
800
- });
801
- Object.assign(contents, doc);
802
- return contents;
803
- };
804
- exports.de_CreateSourceRepositoryBranchCommand = de_CreateSourceRepositoryBranchCommand;
805
- const de_CreateSourceRepositoryBranchCommandError = async (output, context) => {
806
- const parsedOutput = {
807
- ...output,
808
- body: await parseErrorBody(output.body, context),
809
- };
810
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
811
- switch (errorCode) {
812
- case "AccessDeniedException":
813
- case "com.amazonaws.codecatalyst#AccessDeniedException":
814
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
815
- case "ConflictException":
816
- case "com.amazonaws.codecatalyst#ConflictException":
817
- throw await de_ConflictExceptionRes(parsedOutput, context);
818
- case "ResourceNotFoundException":
819
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
820
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
821
- case "ServiceQuotaExceededException":
822
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
823
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
824
- case "ThrottlingException":
825
- case "com.amazonaws.codecatalyst#ThrottlingException":
826
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
827
- case "ValidationException":
828
- case "com.amazonaws.codecatalyst#ValidationException":
829
- throw await de_ValidationExceptionRes(parsedOutput, context);
830
- default:
831
- const parsedBody = parsedOutput.body;
832
- return throwDefaultError({
833
- output,
834
- parsedBody,
835
- errorCode,
836
- });
837
- }
838
- };
839
- const de_DeleteAccessTokenCommand = async (output, context) => {
840
- if (output.statusCode !== 200 && output.statusCode >= 300) {
841
- return de_DeleteAccessTokenCommandError(output, context);
842
- }
843
- const contents = (0, smithy_client_1.map)({
844
- $metadata: deserializeMetadata(output),
845
- });
846
- await (0, smithy_client_1.collectBody)(output.body, context);
847
- return contents;
848
- };
849
- exports.de_DeleteAccessTokenCommand = de_DeleteAccessTokenCommand;
850
- const de_DeleteAccessTokenCommandError = async (output, context) => {
851
- const parsedOutput = {
852
- ...output,
853
- body: await parseErrorBody(output.body, context),
854
- };
855
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
856
- switch (errorCode) {
857
- case "AccessDeniedException":
858
- case "com.amazonaws.codecatalyst#AccessDeniedException":
859
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
860
- case "ConflictException":
861
- case "com.amazonaws.codecatalyst#ConflictException":
862
- throw await de_ConflictExceptionRes(parsedOutput, context);
863
- case "ResourceNotFoundException":
864
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
865
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
866
- case "ServiceQuotaExceededException":
867
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
868
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
869
- case "ThrottlingException":
870
- case "com.amazonaws.codecatalyst#ThrottlingException":
871
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
872
- case "ValidationException":
873
- case "com.amazonaws.codecatalyst#ValidationException":
874
- throw await de_ValidationExceptionRes(parsedOutput, context);
875
- default:
876
- const parsedBody = parsedOutput.body;
877
- return throwDefaultError({
878
- output,
879
- parsedBody,
880
- errorCode,
881
- });
882
- }
883
- };
884
- const de_DeleteDevEnvironmentCommand = async (output, context) => {
885
- if (output.statusCode !== 200 && output.statusCode >= 300) {
886
- return de_DeleteDevEnvironmentCommandError(output, context);
887
- }
888
- const contents = (0, smithy_client_1.map)({
889
- $metadata: deserializeMetadata(output),
890
- });
891
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
892
- const doc = (0, smithy_client_1.take)(data, {
893
- id: smithy_client_1.expectString,
894
- projectName: smithy_client_1.expectString,
895
- spaceName: smithy_client_1.expectString,
896
- });
897
- Object.assign(contents, doc);
898
- return contents;
899
- };
900
- exports.de_DeleteDevEnvironmentCommand = de_DeleteDevEnvironmentCommand;
901
- const de_DeleteDevEnvironmentCommandError = async (output, context) => {
902
- const parsedOutput = {
903
- ...output,
904
- body: await parseErrorBody(output.body, context),
905
- };
906
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
907
- switch (errorCode) {
908
- case "AccessDeniedException":
909
- case "com.amazonaws.codecatalyst#AccessDeniedException":
910
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
911
- case "ConflictException":
912
- case "com.amazonaws.codecatalyst#ConflictException":
913
- throw await de_ConflictExceptionRes(parsedOutput, context);
914
- case "ResourceNotFoundException":
915
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
916
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
917
- case "ServiceQuotaExceededException":
918
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
919
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
920
- case "ThrottlingException":
921
- case "com.amazonaws.codecatalyst#ThrottlingException":
922
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
923
- case "ValidationException":
924
- case "com.amazonaws.codecatalyst#ValidationException":
925
- throw await de_ValidationExceptionRes(parsedOutput, context);
926
- default:
927
- const parsedBody = parsedOutput.body;
928
- return throwDefaultError({
929
- output,
930
- parsedBody,
931
- errorCode,
932
- });
933
- }
934
- };
935
- const de_DeleteProjectCommand = async (output, context) => {
936
- if (output.statusCode !== 200 && output.statusCode >= 300) {
937
- return de_DeleteProjectCommandError(output, context);
938
- }
939
- const contents = (0, smithy_client_1.map)({
940
- $metadata: deserializeMetadata(output),
941
- });
942
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
943
- const doc = (0, smithy_client_1.take)(data, {
944
- displayName: smithy_client_1.expectString,
945
- name: smithy_client_1.expectString,
946
- spaceName: smithy_client_1.expectString,
947
- });
948
- Object.assign(contents, doc);
949
- return contents;
950
- };
951
- exports.de_DeleteProjectCommand = de_DeleteProjectCommand;
952
- const de_DeleteProjectCommandError = async (output, context) => {
953
- const parsedOutput = {
954
- ...output,
955
- body: await parseErrorBody(output.body, context),
956
- };
957
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
958
- switch (errorCode) {
959
- case "AccessDeniedException":
960
- case "com.amazonaws.codecatalyst#AccessDeniedException":
961
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
962
- case "ConflictException":
963
- case "com.amazonaws.codecatalyst#ConflictException":
964
- throw await de_ConflictExceptionRes(parsedOutput, context);
965
- case "ResourceNotFoundException":
966
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
967
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
968
- case "ServiceQuotaExceededException":
969
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
970
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
971
- case "ThrottlingException":
972
- case "com.amazonaws.codecatalyst#ThrottlingException":
973
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
974
- case "ValidationException":
975
- case "com.amazonaws.codecatalyst#ValidationException":
976
- throw await de_ValidationExceptionRes(parsedOutput, context);
977
- default:
978
- const parsedBody = parsedOutput.body;
979
- return throwDefaultError({
980
- output,
981
- parsedBody,
982
- errorCode,
983
- });
984
- }
985
- };
986
- const de_DeleteSourceRepositoryCommand = async (output, context) => {
987
- if (output.statusCode !== 200 && output.statusCode >= 300) {
988
- return de_DeleteSourceRepositoryCommandError(output, context);
989
- }
990
- const contents = (0, smithy_client_1.map)({
991
- $metadata: deserializeMetadata(output),
992
- });
993
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
994
- const doc = (0, smithy_client_1.take)(data, {
995
- name: smithy_client_1.expectString,
996
- projectName: smithy_client_1.expectString,
997
- spaceName: smithy_client_1.expectString,
998
- });
999
- Object.assign(contents, doc);
1000
- return contents;
1001
- };
1002
- exports.de_DeleteSourceRepositoryCommand = de_DeleteSourceRepositoryCommand;
1003
- const de_DeleteSourceRepositoryCommandError = async (output, context) => {
1004
- const parsedOutput = {
1005
- ...output,
1006
- body: await parseErrorBody(output.body, context),
1007
- };
1008
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1009
- switch (errorCode) {
1010
- case "AccessDeniedException":
1011
- case "com.amazonaws.codecatalyst#AccessDeniedException":
1012
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1013
- case "ConflictException":
1014
- case "com.amazonaws.codecatalyst#ConflictException":
1015
- throw await de_ConflictExceptionRes(parsedOutput, context);
1016
- case "ResourceNotFoundException":
1017
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
1018
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1019
- case "ServiceQuotaExceededException":
1020
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
1021
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1022
- case "ThrottlingException":
1023
- case "com.amazonaws.codecatalyst#ThrottlingException":
1024
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1025
- case "ValidationException":
1026
- case "com.amazonaws.codecatalyst#ValidationException":
1027
- throw await de_ValidationExceptionRes(parsedOutput, context);
1028
- default:
1029
- const parsedBody = parsedOutput.body;
1030
- return throwDefaultError({
1031
- output,
1032
- parsedBody,
1033
- errorCode,
1034
- });
1035
- }
1036
- };
1037
- const de_DeleteSpaceCommand = async (output, context) => {
1038
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1039
- return de_DeleteSpaceCommandError(output, context);
1040
- }
1041
- const contents = (0, smithy_client_1.map)({
1042
- $metadata: deserializeMetadata(output),
1043
- });
1044
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1045
- const doc = (0, smithy_client_1.take)(data, {
1046
- displayName: smithy_client_1.expectString,
1047
- name: smithy_client_1.expectString,
1048
- });
1049
- Object.assign(contents, doc);
1050
- return contents;
1051
- };
1052
- exports.de_DeleteSpaceCommand = de_DeleteSpaceCommand;
1053
- const de_DeleteSpaceCommandError = async (output, context) => {
1054
- const parsedOutput = {
1055
- ...output,
1056
- body: await parseErrorBody(output.body, context),
1057
- };
1058
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1059
- switch (errorCode) {
1060
- case "AccessDeniedException":
1061
- case "com.amazonaws.codecatalyst#AccessDeniedException":
1062
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1063
- case "ConflictException":
1064
- case "com.amazonaws.codecatalyst#ConflictException":
1065
- throw await de_ConflictExceptionRes(parsedOutput, context);
1066
- case "ResourceNotFoundException":
1067
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
1068
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1069
- case "ServiceQuotaExceededException":
1070
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
1071
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1072
- case "ThrottlingException":
1073
- case "com.amazonaws.codecatalyst#ThrottlingException":
1074
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1075
- case "ValidationException":
1076
- case "com.amazonaws.codecatalyst#ValidationException":
1077
- throw await de_ValidationExceptionRes(parsedOutput, context);
1078
- default:
1079
- const parsedBody = parsedOutput.body;
1080
- return throwDefaultError({
1081
- output,
1082
- parsedBody,
1083
- errorCode,
1084
- });
1085
- }
1086
- };
1087
- const de_GetDevEnvironmentCommand = async (output, context) => {
1088
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1089
- return de_GetDevEnvironmentCommandError(output, context);
1090
- }
1091
- const contents = (0, smithy_client_1.map)({
1092
- $metadata: deserializeMetadata(output),
1093
- });
1094
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1095
- const doc = (0, smithy_client_1.take)(data, {
1096
- alias: smithy_client_1.expectString,
1097
- creatorId: smithy_client_1.expectString,
1098
- id: smithy_client_1.expectString,
1099
- ides: smithy_client_1._json,
1100
- inactivityTimeoutMinutes: smithy_client_1.expectInt32,
1101
- instanceType: smithy_client_1.expectString,
1102
- lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1103
- persistentStorage: smithy_client_1._json,
1104
- projectName: smithy_client_1.expectString,
1105
- repositories: smithy_client_1._json,
1106
- spaceName: smithy_client_1.expectString,
1107
- status: smithy_client_1.expectString,
1108
- statusReason: smithy_client_1.expectString,
1109
- vpcConnectionName: smithy_client_1.expectString,
1110
- });
1111
- Object.assign(contents, doc);
1112
- return contents;
1113
- };
1114
- exports.de_GetDevEnvironmentCommand = de_GetDevEnvironmentCommand;
1115
- const de_GetDevEnvironmentCommandError = async (output, context) => {
1116
- const parsedOutput = {
1117
- ...output,
1118
- body: await parseErrorBody(output.body, context),
1119
- };
1120
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1121
- switch (errorCode) {
1122
- case "AccessDeniedException":
1123
- case "com.amazonaws.codecatalyst#AccessDeniedException":
1124
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1125
- case "ConflictException":
1126
- case "com.amazonaws.codecatalyst#ConflictException":
1127
- throw await de_ConflictExceptionRes(parsedOutput, context);
1128
- case "ResourceNotFoundException":
1129
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
1130
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1131
- case "ServiceQuotaExceededException":
1132
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
1133
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1134
- case "ThrottlingException":
1135
- case "com.amazonaws.codecatalyst#ThrottlingException":
1136
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1137
- case "ValidationException":
1138
- case "com.amazonaws.codecatalyst#ValidationException":
1139
- throw await de_ValidationExceptionRes(parsedOutput, context);
1140
- default:
1141
- const parsedBody = parsedOutput.body;
1142
- return throwDefaultError({
1143
- output,
1144
- parsedBody,
1145
- errorCode,
1146
- });
1147
- }
1148
- };
1149
- const de_GetProjectCommand = async (output, context) => {
1150
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1151
- return de_GetProjectCommandError(output, context);
1152
- }
1153
- const contents = (0, smithy_client_1.map)({
1154
- $metadata: deserializeMetadata(output),
1155
- });
1156
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1157
- const doc = (0, smithy_client_1.take)(data, {
1158
- description: smithy_client_1.expectString,
1159
- displayName: smithy_client_1.expectString,
1160
- name: smithy_client_1.expectString,
1161
- spaceName: smithy_client_1.expectString,
1162
- });
1163
- Object.assign(contents, doc);
1164
- return contents;
1165
- };
1166
- exports.de_GetProjectCommand = de_GetProjectCommand;
1167
- const de_GetProjectCommandError = async (output, context) => {
1168
- const parsedOutput = {
1169
- ...output,
1170
- body: await parseErrorBody(output.body, context),
1171
- };
1172
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1173
- switch (errorCode) {
1174
- case "AccessDeniedException":
1175
- case "com.amazonaws.codecatalyst#AccessDeniedException":
1176
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1177
- case "ConflictException":
1178
- case "com.amazonaws.codecatalyst#ConflictException":
1179
- throw await de_ConflictExceptionRes(parsedOutput, context);
1180
- case "ResourceNotFoundException":
1181
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
1182
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1183
- case "ServiceQuotaExceededException":
1184
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
1185
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1186
- case "ThrottlingException":
1187
- case "com.amazonaws.codecatalyst#ThrottlingException":
1188
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1189
- case "ValidationException":
1190
- case "com.amazonaws.codecatalyst#ValidationException":
1191
- throw await de_ValidationExceptionRes(parsedOutput, context);
1192
- default:
1193
- const parsedBody = parsedOutput.body;
1194
- return throwDefaultError({
1195
- output,
1196
- parsedBody,
1197
- errorCode,
1198
- });
1199
- }
1200
- };
1201
- const de_GetSourceRepositoryCommand = async (output, context) => {
1202
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1203
- return de_GetSourceRepositoryCommandError(output, context);
1204
- }
1205
- const contents = (0, smithy_client_1.map)({
1206
- $metadata: deserializeMetadata(output),
1207
- });
1208
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1209
- const doc = (0, smithy_client_1.take)(data, {
1210
- createdTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1211
- description: smithy_client_1.expectString,
1212
- lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1213
- name: smithy_client_1.expectString,
1214
- projectName: smithy_client_1.expectString,
1215
- spaceName: smithy_client_1.expectString,
1216
- });
1217
- Object.assign(contents, doc);
1218
- return contents;
1219
- };
1220
- exports.de_GetSourceRepositoryCommand = de_GetSourceRepositoryCommand;
1221
- const de_GetSourceRepositoryCommandError = async (output, context) => {
1222
- const parsedOutput = {
1223
- ...output,
1224
- body: await parseErrorBody(output.body, context),
1225
- };
1226
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1227
- switch (errorCode) {
1228
- case "AccessDeniedException":
1229
- case "com.amazonaws.codecatalyst#AccessDeniedException":
1230
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1231
- case "ConflictException":
1232
- case "com.amazonaws.codecatalyst#ConflictException":
1233
- throw await de_ConflictExceptionRes(parsedOutput, context);
1234
- case "ResourceNotFoundException":
1235
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
1236
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1237
- case "ServiceQuotaExceededException":
1238
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
1239
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1240
- case "ThrottlingException":
1241
- case "com.amazonaws.codecatalyst#ThrottlingException":
1242
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1243
- case "ValidationException":
1244
- case "com.amazonaws.codecatalyst#ValidationException":
1245
- throw await de_ValidationExceptionRes(parsedOutput, context);
1246
- default:
1247
- const parsedBody = parsedOutput.body;
1248
- return throwDefaultError({
1249
- output,
1250
- parsedBody,
1251
- errorCode,
1252
- });
1253
- }
1254
- };
1255
- const de_GetSourceRepositoryCloneUrlsCommand = async (output, context) => {
1256
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1257
- return de_GetSourceRepositoryCloneUrlsCommandError(output, context);
1258
- }
1259
- const contents = (0, smithy_client_1.map)({
1260
- $metadata: deserializeMetadata(output),
1261
- });
1262
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1263
- const doc = (0, smithy_client_1.take)(data, {
1264
- https: smithy_client_1.expectString,
1265
- });
1266
- Object.assign(contents, doc);
1267
- return contents;
1268
- };
1269
- exports.de_GetSourceRepositoryCloneUrlsCommand = de_GetSourceRepositoryCloneUrlsCommand;
1270
- const de_GetSourceRepositoryCloneUrlsCommandError = async (output, context) => {
1271
- const parsedOutput = {
1272
- ...output,
1273
- body: await parseErrorBody(output.body, context),
1274
- };
1275
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1276
- switch (errorCode) {
1277
- case "AccessDeniedException":
1278
- case "com.amazonaws.codecatalyst#AccessDeniedException":
1279
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1280
- case "ConflictException":
1281
- case "com.amazonaws.codecatalyst#ConflictException":
1282
- throw await de_ConflictExceptionRes(parsedOutput, context);
1283
- case "ResourceNotFoundException":
1284
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
1285
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1286
- case "ServiceQuotaExceededException":
1287
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
1288
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1289
- case "ThrottlingException":
1290
- case "com.amazonaws.codecatalyst#ThrottlingException":
1291
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1292
- case "ValidationException":
1293
- case "com.amazonaws.codecatalyst#ValidationException":
1294
- throw await de_ValidationExceptionRes(parsedOutput, context);
1295
- default:
1296
- const parsedBody = parsedOutput.body;
1297
- return throwDefaultError({
1298
- output,
1299
- parsedBody,
1300
- errorCode,
1301
- });
1302
- }
1303
- };
1304
- const de_GetSpaceCommand = async (output, context) => {
1305
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1306
- return de_GetSpaceCommandError(output, context);
1307
- }
1308
- const contents = (0, smithy_client_1.map)({
1309
- $metadata: deserializeMetadata(output),
1310
- });
1311
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1312
- const doc = (0, smithy_client_1.take)(data, {
1313
- description: smithy_client_1.expectString,
1314
- displayName: smithy_client_1.expectString,
1315
- name: smithy_client_1.expectString,
1316
- regionName: smithy_client_1.expectString,
1317
- });
1318
- Object.assign(contents, doc);
1319
- return contents;
1320
- };
1321
- exports.de_GetSpaceCommand = de_GetSpaceCommand;
1322
- const de_GetSpaceCommandError = async (output, context) => {
1323
- const parsedOutput = {
1324
- ...output,
1325
- body: await parseErrorBody(output.body, context),
1326
- };
1327
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1328
- switch (errorCode) {
1329
- case "AccessDeniedException":
1330
- case "com.amazonaws.codecatalyst#AccessDeniedException":
1331
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1332
- case "ConflictException":
1333
- case "com.amazonaws.codecatalyst#ConflictException":
1334
- throw await de_ConflictExceptionRes(parsedOutput, context);
1335
- case "ResourceNotFoundException":
1336
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
1337
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1338
- case "ServiceQuotaExceededException":
1339
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
1340
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1341
- case "ThrottlingException":
1342
- case "com.amazonaws.codecatalyst#ThrottlingException":
1343
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1344
- case "ValidationException":
1345
- case "com.amazonaws.codecatalyst#ValidationException":
1346
- throw await de_ValidationExceptionRes(parsedOutput, context);
1347
- default:
1348
- const parsedBody = parsedOutput.body;
1349
- return throwDefaultError({
1350
- output,
1351
- parsedBody,
1352
- errorCode,
1353
- });
1354
- }
1355
- };
1356
- const de_GetSubscriptionCommand = async (output, context) => {
1357
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1358
- return de_GetSubscriptionCommandError(output, context);
1359
- }
1360
- const contents = (0, smithy_client_1.map)({
1361
- $metadata: deserializeMetadata(output),
1362
- });
1363
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1364
- const doc = (0, smithy_client_1.take)(data, {
1365
- awsAccountName: smithy_client_1.expectString,
1366
- subscriptionType: smithy_client_1.expectString,
1367
- });
1368
- Object.assign(contents, doc);
1369
- return contents;
1370
- };
1371
- exports.de_GetSubscriptionCommand = de_GetSubscriptionCommand;
1372
- const de_GetSubscriptionCommandError = async (output, context) => {
1373
- const parsedOutput = {
1374
- ...output,
1375
- body: await parseErrorBody(output.body, context),
1376
- };
1377
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1378
- switch (errorCode) {
1379
- case "AccessDeniedException":
1380
- case "com.amazonaws.codecatalyst#AccessDeniedException":
1381
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1382
- case "ConflictException":
1383
- case "com.amazonaws.codecatalyst#ConflictException":
1384
- throw await de_ConflictExceptionRes(parsedOutput, context);
1385
- case "ResourceNotFoundException":
1386
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
1387
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1388
- case "ServiceQuotaExceededException":
1389
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
1390
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1391
- case "ThrottlingException":
1392
- case "com.amazonaws.codecatalyst#ThrottlingException":
1393
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1394
- case "ValidationException":
1395
- case "com.amazonaws.codecatalyst#ValidationException":
1396
- throw await de_ValidationExceptionRes(parsedOutput, context);
1397
- default:
1398
- const parsedBody = parsedOutput.body;
1399
- return throwDefaultError({
1400
- output,
1401
- parsedBody,
1402
- errorCode,
1403
- });
1404
- }
1405
- };
1406
- const de_GetUserDetailsCommand = async (output, context) => {
1407
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1408
- return de_GetUserDetailsCommandError(output, context);
1409
- }
1410
- const contents = (0, smithy_client_1.map)({
1411
- $metadata: deserializeMetadata(output),
1412
- });
1413
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1414
- const doc = (0, smithy_client_1.take)(data, {
1415
- displayName: smithy_client_1.expectString,
1416
- primaryEmail: smithy_client_1._json,
1417
- userId: smithy_client_1.expectString,
1418
- userName: smithy_client_1.expectString,
1419
- version: smithy_client_1.expectString,
1420
- });
1421
- Object.assign(contents, doc);
1422
- return contents;
1423
- };
1424
- exports.de_GetUserDetailsCommand = de_GetUserDetailsCommand;
1425
- const de_GetUserDetailsCommandError = async (output, context) => {
1426
- const parsedOutput = {
1427
- ...output,
1428
- body: await parseErrorBody(output.body, context),
1429
- };
1430
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1431
- switch (errorCode) {
1432
- case "AccessDeniedException":
1433
- case "com.amazonaws.codecatalyst#AccessDeniedException":
1434
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1435
- case "ConflictException":
1436
- case "com.amazonaws.codecatalyst#ConflictException":
1437
- throw await de_ConflictExceptionRes(parsedOutput, context);
1438
- case "ResourceNotFoundException":
1439
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
1440
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1441
- case "ServiceQuotaExceededException":
1442
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
1443
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1444
- case "ThrottlingException":
1445
- case "com.amazonaws.codecatalyst#ThrottlingException":
1446
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1447
- case "ValidationException":
1448
- case "com.amazonaws.codecatalyst#ValidationException":
1449
- throw await de_ValidationExceptionRes(parsedOutput, context);
1450
- default:
1451
- const parsedBody = parsedOutput.body;
1452
- return throwDefaultError({
1453
- output,
1454
- parsedBody,
1455
- errorCode,
1456
- });
1457
- }
1458
- };
1459
- const de_GetWorkflowCommand = async (output, context) => {
1460
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1461
- return de_GetWorkflowCommandError(output, context);
1462
- }
1463
- const contents = (0, smithy_client_1.map)({
1464
- $metadata: deserializeMetadata(output),
1465
- });
1466
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1467
- const doc = (0, smithy_client_1.take)(data, {
1468
- createdTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1469
- definition: smithy_client_1._json,
1470
- id: smithy_client_1.expectString,
1471
- lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1472
- name: smithy_client_1.expectString,
1473
- projectName: smithy_client_1.expectString,
1474
- runMode: smithy_client_1.expectString,
1475
- sourceBranchName: smithy_client_1.expectString,
1476
- sourceRepositoryName: smithy_client_1.expectString,
1477
- spaceName: smithy_client_1.expectString,
1478
- status: smithy_client_1.expectString,
1479
- });
1480
- Object.assign(contents, doc);
1481
- return contents;
1482
- };
1483
- exports.de_GetWorkflowCommand = de_GetWorkflowCommand;
1484
- const de_GetWorkflowCommandError = async (output, context) => {
1485
- const parsedOutput = {
1486
- ...output,
1487
- body: await parseErrorBody(output.body, context),
1488
- };
1489
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1490
- switch (errorCode) {
1491
- case "AccessDeniedException":
1492
- case "com.amazonaws.codecatalyst#AccessDeniedException":
1493
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1494
- case "ConflictException":
1495
- case "com.amazonaws.codecatalyst#ConflictException":
1496
- throw await de_ConflictExceptionRes(parsedOutput, context);
1497
- case "ResourceNotFoundException":
1498
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
1499
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1500
- case "ServiceQuotaExceededException":
1501
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
1502
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1503
- case "ThrottlingException":
1504
- case "com.amazonaws.codecatalyst#ThrottlingException":
1505
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1506
- case "ValidationException":
1507
- case "com.amazonaws.codecatalyst#ValidationException":
1508
- throw await de_ValidationExceptionRes(parsedOutput, context);
1509
- default:
1510
- const parsedBody = parsedOutput.body;
1511
- return throwDefaultError({
1512
- output,
1513
- parsedBody,
1514
- errorCode,
1515
- });
1516
- }
1517
- };
1518
- const de_GetWorkflowRunCommand = async (output, context) => {
1519
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1520
- return de_GetWorkflowRunCommandError(output, context);
1521
- }
1522
- const contents = (0, smithy_client_1.map)({
1523
- $metadata: deserializeMetadata(output),
1524
- });
1525
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1526
- const doc = (0, smithy_client_1.take)(data, {
1527
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1528
- id: smithy_client_1.expectString,
1529
- lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1530
- projectName: smithy_client_1.expectString,
1531
- spaceName: smithy_client_1.expectString,
1532
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1533
- status: smithy_client_1.expectString,
1534
- statusReasons: smithy_client_1._json,
1535
- workflowId: smithy_client_1.expectString,
1536
- });
1537
- Object.assign(contents, doc);
1538
- return contents;
1539
- };
1540
- exports.de_GetWorkflowRunCommand = de_GetWorkflowRunCommand;
1541
- const de_GetWorkflowRunCommandError = async (output, context) => {
1542
- const parsedOutput = {
1543
- ...output,
1544
- body: await parseErrorBody(output.body, context),
1545
- };
1546
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1547
- switch (errorCode) {
1548
- case "AccessDeniedException":
1549
- case "com.amazonaws.codecatalyst#AccessDeniedException":
1550
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1551
- case "ConflictException":
1552
- case "com.amazonaws.codecatalyst#ConflictException":
1553
- throw await de_ConflictExceptionRes(parsedOutput, context);
1554
- case "ResourceNotFoundException":
1555
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
1556
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1557
- case "ServiceQuotaExceededException":
1558
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
1559
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1560
- case "ThrottlingException":
1561
- case "com.amazonaws.codecatalyst#ThrottlingException":
1562
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1563
- case "ValidationException":
1564
- case "com.amazonaws.codecatalyst#ValidationException":
1565
- throw await de_ValidationExceptionRes(parsedOutput, context);
1566
- default:
1567
- const parsedBody = parsedOutput.body;
1568
- return throwDefaultError({
1569
- output,
1570
- parsedBody,
1571
- errorCode,
1572
- });
1573
- }
1574
- };
1575
- const de_ListAccessTokensCommand = async (output, context) => {
1576
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1577
- return de_ListAccessTokensCommandError(output, context);
1578
- }
1579
- const contents = (0, smithy_client_1.map)({
1580
- $metadata: deserializeMetadata(output),
1581
- });
1582
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1583
- const doc = (0, smithy_client_1.take)(data, {
1584
- items: (_) => de_AccessTokenSummaries(_, context),
1585
- nextToken: smithy_client_1.expectString,
1586
- });
1587
- Object.assign(contents, doc);
1588
- return contents;
1589
- };
1590
- exports.de_ListAccessTokensCommand = de_ListAccessTokensCommand;
1591
- const de_ListAccessTokensCommandError = async (output, context) => {
1592
- const parsedOutput = {
1593
- ...output,
1594
- body: await parseErrorBody(output.body, context),
1595
- };
1596
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1597
- switch (errorCode) {
1598
- case "AccessDeniedException":
1599
- case "com.amazonaws.codecatalyst#AccessDeniedException":
1600
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1601
- case "ConflictException":
1602
- case "com.amazonaws.codecatalyst#ConflictException":
1603
- throw await de_ConflictExceptionRes(parsedOutput, context);
1604
- case "ResourceNotFoundException":
1605
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
1606
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1607
- case "ServiceQuotaExceededException":
1608
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
1609
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1610
- case "ThrottlingException":
1611
- case "com.amazonaws.codecatalyst#ThrottlingException":
1612
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1613
- case "ValidationException":
1614
- case "com.amazonaws.codecatalyst#ValidationException":
1615
- throw await de_ValidationExceptionRes(parsedOutput, context);
1616
- default:
1617
- const parsedBody = parsedOutput.body;
1618
- return throwDefaultError({
1619
- output,
1620
- parsedBody,
1621
- errorCode,
1622
- });
1623
- }
1624
- };
1625
- const de_ListDevEnvironmentsCommand = async (output, context) => {
1626
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1627
- return de_ListDevEnvironmentsCommandError(output, context);
1628
- }
1629
- const contents = (0, smithy_client_1.map)({
1630
- $metadata: deserializeMetadata(output),
1631
- });
1632
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1633
- const doc = (0, smithy_client_1.take)(data, {
1634
- items: (_) => de_DevEnvironmentSummaryList(_, context),
1635
- nextToken: smithy_client_1.expectString,
1636
- });
1637
- Object.assign(contents, doc);
1638
- return contents;
1639
- };
1640
- exports.de_ListDevEnvironmentsCommand = de_ListDevEnvironmentsCommand;
1641
- const de_ListDevEnvironmentsCommandError = async (output, context) => {
1642
- const parsedOutput = {
1643
- ...output,
1644
- body: await parseErrorBody(output.body, context),
1645
- };
1646
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1647
- switch (errorCode) {
1648
- case "AccessDeniedException":
1649
- case "com.amazonaws.codecatalyst#AccessDeniedException":
1650
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1651
- case "ConflictException":
1652
- case "com.amazonaws.codecatalyst#ConflictException":
1653
- throw await de_ConflictExceptionRes(parsedOutput, context);
1654
- case "ResourceNotFoundException":
1655
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
1656
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1657
- case "ServiceQuotaExceededException":
1658
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
1659
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1660
- case "ThrottlingException":
1661
- case "com.amazonaws.codecatalyst#ThrottlingException":
1662
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1663
- case "ValidationException":
1664
- case "com.amazonaws.codecatalyst#ValidationException":
1665
- throw await de_ValidationExceptionRes(parsedOutput, context);
1666
- default:
1667
- const parsedBody = parsedOutput.body;
1668
- return throwDefaultError({
1669
- output,
1670
- parsedBody,
1671
- errorCode,
1672
- });
1673
- }
1674
- };
1675
- const de_ListDevEnvironmentSessionsCommand = async (output, context) => {
1676
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1677
- return de_ListDevEnvironmentSessionsCommandError(output, context);
1678
- }
1679
- const contents = (0, smithy_client_1.map)({
1680
- $metadata: deserializeMetadata(output),
1681
- });
1682
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1683
- const doc = (0, smithy_client_1.take)(data, {
1684
- items: (_) => de_DevEnvironmentSessionsSummaryList(_, context),
1685
- nextToken: smithy_client_1.expectString,
1686
- });
1687
- Object.assign(contents, doc);
1688
- return contents;
1689
- };
1690
- exports.de_ListDevEnvironmentSessionsCommand = de_ListDevEnvironmentSessionsCommand;
1691
- const de_ListDevEnvironmentSessionsCommandError = async (output, context) => {
1692
- const parsedOutput = {
1693
- ...output,
1694
- body: await parseErrorBody(output.body, context),
1695
- };
1696
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1697
- switch (errorCode) {
1698
- case "AccessDeniedException":
1699
- case "com.amazonaws.codecatalyst#AccessDeniedException":
1700
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1701
- case "ConflictException":
1702
- case "com.amazonaws.codecatalyst#ConflictException":
1703
- throw await de_ConflictExceptionRes(parsedOutput, context);
1704
- case "ResourceNotFoundException":
1705
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
1706
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1707
- case "ServiceQuotaExceededException":
1708
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
1709
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1710
- case "ThrottlingException":
1711
- case "com.amazonaws.codecatalyst#ThrottlingException":
1712
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1713
- case "ValidationException":
1714
- case "com.amazonaws.codecatalyst#ValidationException":
1715
- throw await de_ValidationExceptionRes(parsedOutput, context);
1716
- default:
1717
- const parsedBody = parsedOutput.body;
1718
- return throwDefaultError({
1719
- output,
1720
- parsedBody,
1721
- errorCode,
1722
- });
1723
- }
1724
- };
1725
- const de_ListEventLogsCommand = async (output, context) => {
1726
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1727
- return de_ListEventLogsCommandError(output, context);
1728
- }
1729
- const contents = (0, smithy_client_1.map)({
1730
- $metadata: deserializeMetadata(output),
1731
- });
1732
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1733
- const doc = (0, smithy_client_1.take)(data, {
1734
- items: (_) => de_EventLogEntries(_, context),
1735
- nextToken: smithy_client_1.expectString,
1736
- });
1737
- Object.assign(contents, doc);
1738
- return contents;
1739
- };
1740
- exports.de_ListEventLogsCommand = de_ListEventLogsCommand;
1741
- const de_ListEventLogsCommandError = async (output, context) => {
1742
- const parsedOutput = {
1743
- ...output,
1744
- body: await parseErrorBody(output.body, context),
1745
- };
1746
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1747
- switch (errorCode) {
1748
- case "AccessDeniedException":
1749
- case "com.amazonaws.codecatalyst#AccessDeniedException":
1750
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1751
- case "ConflictException":
1752
- case "com.amazonaws.codecatalyst#ConflictException":
1753
- throw await de_ConflictExceptionRes(parsedOutput, context);
1754
- case "ResourceNotFoundException":
1755
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
1756
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1757
- case "ServiceQuotaExceededException":
1758
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
1759
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1760
- case "ThrottlingException":
1761
- case "com.amazonaws.codecatalyst#ThrottlingException":
1762
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1763
- case "ValidationException":
1764
- case "com.amazonaws.codecatalyst#ValidationException":
1765
- throw await de_ValidationExceptionRes(parsedOutput, context);
1766
- default:
1767
- const parsedBody = parsedOutput.body;
1768
- return throwDefaultError({
1769
- output,
1770
- parsedBody,
1771
- errorCode,
1772
- });
1773
- }
1774
- };
1775
- const de_ListProjectsCommand = async (output, context) => {
1776
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1777
- return de_ListProjectsCommandError(output, context);
1778
- }
1779
- const contents = (0, smithy_client_1.map)({
1780
- $metadata: deserializeMetadata(output),
1781
- });
1782
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1783
- const doc = (0, smithy_client_1.take)(data, {
1784
- items: smithy_client_1._json,
1785
- nextToken: smithy_client_1.expectString,
1786
- });
1787
- Object.assign(contents, doc);
1788
- return contents;
1789
- };
1790
- exports.de_ListProjectsCommand = de_ListProjectsCommand;
1791
- const de_ListProjectsCommandError = async (output, context) => {
1792
- const parsedOutput = {
1793
- ...output,
1794
- body: await parseErrorBody(output.body, context),
1795
- };
1796
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1797
- switch (errorCode) {
1798
- case "AccessDeniedException":
1799
- case "com.amazonaws.codecatalyst#AccessDeniedException":
1800
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1801
- case "ConflictException":
1802
- case "com.amazonaws.codecatalyst#ConflictException":
1803
- throw await de_ConflictExceptionRes(parsedOutput, context);
1804
- case "ResourceNotFoundException":
1805
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
1806
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1807
- case "ServiceQuotaExceededException":
1808
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
1809
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1810
- case "ThrottlingException":
1811
- case "com.amazonaws.codecatalyst#ThrottlingException":
1812
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1813
- case "ValidationException":
1814
- case "com.amazonaws.codecatalyst#ValidationException":
1815
- throw await de_ValidationExceptionRes(parsedOutput, context);
1816
- default:
1817
- const parsedBody = parsedOutput.body;
1818
- return throwDefaultError({
1819
- output,
1820
- parsedBody,
1821
- errorCode,
1822
- });
1823
- }
1824
- };
1825
- const de_ListSourceRepositoriesCommand = async (output, context) => {
1826
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1827
- return de_ListSourceRepositoriesCommandError(output, context);
1828
- }
1829
- const contents = (0, smithy_client_1.map)({
1830
- $metadata: deserializeMetadata(output),
1831
- });
1832
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1833
- const doc = (0, smithy_client_1.take)(data, {
1834
- items: (_) => de_ListSourceRepositoriesItems(_, context),
1835
- nextToken: smithy_client_1.expectString,
1836
- });
1837
- Object.assign(contents, doc);
1838
- return contents;
1839
- };
1840
- exports.de_ListSourceRepositoriesCommand = de_ListSourceRepositoriesCommand;
1841
- const de_ListSourceRepositoriesCommandError = 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 "AccessDeniedException":
1849
- case "com.amazonaws.codecatalyst#AccessDeniedException":
1850
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1851
- case "ConflictException":
1852
- case "com.amazonaws.codecatalyst#ConflictException":
1853
- throw await de_ConflictExceptionRes(parsedOutput, context);
1854
- case "ResourceNotFoundException":
1855
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
1856
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1857
- case "ServiceQuotaExceededException":
1858
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
1859
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1860
- case "ThrottlingException":
1861
- case "com.amazonaws.codecatalyst#ThrottlingException":
1862
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1863
- case "ValidationException":
1864
- case "com.amazonaws.codecatalyst#ValidationException":
1865
- throw await de_ValidationExceptionRes(parsedOutput, context);
1866
- default:
1867
- const parsedBody = parsedOutput.body;
1868
- return throwDefaultError({
1869
- output,
1870
- parsedBody,
1871
- errorCode,
1872
- });
1873
- }
1874
- };
1875
- const de_ListSourceRepositoryBranchesCommand = async (output, context) => {
1876
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1877
- return de_ListSourceRepositoryBranchesCommandError(output, context);
1878
- }
1879
- const contents = (0, smithy_client_1.map)({
1880
- $metadata: deserializeMetadata(output),
1881
- });
1882
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1883
- const doc = (0, smithy_client_1.take)(data, {
1884
- items: (_) => de_ListSourceRepositoryBranchesItems(_, context),
1885
- nextToken: smithy_client_1.expectString,
1886
- });
1887
- Object.assign(contents, doc);
1888
- return contents;
1889
- };
1890
- exports.de_ListSourceRepositoryBranchesCommand = de_ListSourceRepositoryBranchesCommand;
1891
- const de_ListSourceRepositoryBranchesCommandError = async (output, context) => {
1892
- const parsedOutput = {
1893
- ...output,
1894
- body: await parseErrorBody(output.body, context),
1895
- };
1896
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1897
- switch (errorCode) {
1898
- case "AccessDeniedException":
1899
- case "com.amazonaws.codecatalyst#AccessDeniedException":
1900
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1901
- case "ConflictException":
1902
- case "com.amazonaws.codecatalyst#ConflictException":
1903
- throw await de_ConflictExceptionRes(parsedOutput, context);
1904
- case "ResourceNotFoundException":
1905
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
1906
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1907
- case "ServiceQuotaExceededException":
1908
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
1909
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1910
- case "ThrottlingException":
1911
- case "com.amazonaws.codecatalyst#ThrottlingException":
1912
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1913
- case "ValidationException":
1914
- case "com.amazonaws.codecatalyst#ValidationException":
1915
- throw await de_ValidationExceptionRes(parsedOutput, context);
1916
- default:
1917
- const parsedBody = parsedOutput.body;
1918
- return throwDefaultError({
1919
- output,
1920
- parsedBody,
1921
- errorCode,
1922
- });
1923
- }
1924
- };
1925
- const de_ListSpacesCommand = async (output, context) => {
1926
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1927
- return de_ListSpacesCommandError(output, context);
1928
- }
1929
- const contents = (0, smithy_client_1.map)({
1930
- $metadata: deserializeMetadata(output),
1931
- });
1932
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1933
- const doc = (0, smithy_client_1.take)(data, {
1934
- items: smithy_client_1._json,
1935
- nextToken: smithy_client_1.expectString,
1936
- });
1937
- Object.assign(contents, doc);
1938
- return contents;
1939
- };
1940
- exports.de_ListSpacesCommand = de_ListSpacesCommand;
1941
- const de_ListSpacesCommandError = async (output, context) => {
1942
- const parsedOutput = {
1943
- ...output,
1944
- body: await parseErrorBody(output.body, context),
1945
- };
1946
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1947
- switch (errorCode) {
1948
- case "AccessDeniedException":
1949
- case "com.amazonaws.codecatalyst#AccessDeniedException":
1950
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1951
- case "ConflictException":
1952
- case "com.amazonaws.codecatalyst#ConflictException":
1953
- throw await de_ConflictExceptionRes(parsedOutput, context);
1954
- case "ResourceNotFoundException":
1955
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
1956
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1957
- case "ServiceQuotaExceededException":
1958
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
1959
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1960
- case "ThrottlingException":
1961
- case "com.amazonaws.codecatalyst#ThrottlingException":
1962
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1963
- case "ValidationException":
1964
- case "com.amazonaws.codecatalyst#ValidationException":
1965
- throw await de_ValidationExceptionRes(parsedOutput, context);
1966
- default:
1967
- const parsedBody = parsedOutput.body;
1968
- return throwDefaultError({
1969
- output,
1970
- parsedBody,
1971
- errorCode,
1972
- });
1973
- }
1974
- };
1975
- const de_ListWorkflowRunsCommand = async (output, context) => {
1976
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1977
- return de_ListWorkflowRunsCommandError(output, context);
1978
- }
1979
- const contents = (0, smithy_client_1.map)({
1980
- $metadata: deserializeMetadata(output),
1981
- });
1982
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1983
- const doc = (0, smithy_client_1.take)(data, {
1984
- items: (_) => de_WorkflowRunSummaries(_, context),
1985
- nextToken: smithy_client_1.expectString,
1986
- });
1987
- Object.assign(contents, doc);
1988
- return contents;
1989
- };
1990
- exports.de_ListWorkflowRunsCommand = de_ListWorkflowRunsCommand;
1991
- const de_ListWorkflowRunsCommandError = async (output, context) => {
1992
- const parsedOutput = {
1993
- ...output,
1994
- body: await parseErrorBody(output.body, context),
1995
- };
1996
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1997
- switch (errorCode) {
1998
- case "AccessDeniedException":
1999
- case "com.amazonaws.codecatalyst#AccessDeniedException":
2000
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2001
- case "ConflictException":
2002
- case "com.amazonaws.codecatalyst#ConflictException":
2003
- throw await de_ConflictExceptionRes(parsedOutput, context);
2004
- case "ResourceNotFoundException":
2005
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
2006
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2007
- case "ServiceQuotaExceededException":
2008
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
2009
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2010
- case "ThrottlingException":
2011
- case "com.amazonaws.codecatalyst#ThrottlingException":
2012
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2013
- case "ValidationException":
2014
- case "com.amazonaws.codecatalyst#ValidationException":
2015
- throw await de_ValidationExceptionRes(parsedOutput, context);
2016
- default:
2017
- const parsedBody = parsedOutput.body;
2018
- return throwDefaultError({
2019
- output,
2020
- parsedBody,
2021
- errorCode,
2022
- });
2023
- }
2024
- };
2025
- const de_ListWorkflowsCommand = async (output, context) => {
2026
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2027
- return de_ListWorkflowsCommandError(output, context);
2028
- }
2029
- const contents = (0, smithy_client_1.map)({
2030
- $metadata: deserializeMetadata(output),
2031
- });
2032
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2033
- const doc = (0, smithy_client_1.take)(data, {
2034
- items: (_) => de_WorkflowSummaries(_, context),
2035
- nextToken: smithy_client_1.expectString,
2036
- });
2037
- Object.assign(contents, doc);
2038
- return contents;
2039
- };
2040
- exports.de_ListWorkflowsCommand = de_ListWorkflowsCommand;
2041
- const de_ListWorkflowsCommandError = async (output, context) => {
2042
- const parsedOutput = {
2043
- ...output,
2044
- body: await parseErrorBody(output.body, context),
2045
- };
2046
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2047
- switch (errorCode) {
2048
- case "AccessDeniedException":
2049
- case "com.amazonaws.codecatalyst#AccessDeniedException":
2050
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2051
- case "ConflictException":
2052
- case "com.amazonaws.codecatalyst#ConflictException":
2053
- throw await de_ConflictExceptionRes(parsedOutput, context);
2054
- case "ResourceNotFoundException":
2055
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
2056
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2057
- case "ServiceQuotaExceededException":
2058
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
2059
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2060
- case "ThrottlingException":
2061
- case "com.amazonaws.codecatalyst#ThrottlingException":
2062
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2063
- case "ValidationException":
2064
- case "com.amazonaws.codecatalyst#ValidationException":
2065
- throw await de_ValidationExceptionRes(parsedOutput, context);
2066
- default:
2067
- const parsedBody = parsedOutput.body;
2068
- return throwDefaultError({
2069
- output,
2070
- parsedBody,
2071
- errorCode,
2072
- });
2073
- }
2074
- };
2075
- const de_StartDevEnvironmentCommand = async (output, context) => {
2076
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2077
- return de_StartDevEnvironmentCommandError(output, context);
2078
- }
2079
- const contents = (0, smithy_client_1.map)({
2080
- $metadata: deserializeMetadata(output),
2081
- });
2082
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2083
- const doc = (0, smithy_client_1.take)(data, {
2084
- id: smithy_client_1.expectString,
2085
- projectName: smithy_client_1.expectString,
2086
- spaceName: smithy_client_1.expectString,
2087
- status: smithy_client_1.expectString,
2088
- });
2089
- Object.assign(contents, doc);
2090
- return contents;
2091
- };
2092
- exports.de_StartDevEnvironmentCommand = de_StartDevEnvironmentCommand;
2093
- const de_StartDevEnvironmentCommandError = async (output, context) => {
2094
- const parsedOutput = {
2095
- ...output,
2096
- body: await parseErrorBody(output.body, context),
2097
- };
2098
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2099
- switch (errorCode) {
2100
- case "AccessDeniedException":
2101
- case "com.amazonaws.codecatalyst#AccessDeniedException":
2102
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2103
- case "ConflictException":
2104
- case "com.amazonaws.codecatalyst#ConflictException":
2105
- throw await de_ConflictExceptionRes(parsedOutput, context);
2106
- case "ResourceNotFoundException":
2107
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
2108
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2109
- case "ServiceQuotaExceededException":
2110
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
2111
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2112
- case "ThrottlingException":
2113
- case "com.amazonaws.codecatalyst#ThrottlingException":
2114
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2115
- case "ValidationException":
2116
- case "com.amazonaws.codecatalyst#ValidationException":
2117
- throw await de_ValidationExceptionRes(parsedOutput, context);
2118
- default:
2119
- const parsedBody = parsedOutput.body;
2120
- return throwDefaultError({
2121
- output,
2122
- parsedBody,
2123
- errorCode,
2124
- });
2125
- }
2126
- };
2127
- const de_StartDevEnvironmentSessionCommand = async (output, context) => {
2128
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2129
- return de_StartDevEnvironmentSessionCommandError(output, context);
2130
- }
2131
- const contents = (0, smithy_client_1.map)({
2132
- $metadata: deserializeMetadata(output),
2133
- });
2134
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2135
- const doc = (0, smithy_client_1.take)(data, {
2136
- accessDetails: smithy_client_1._json,
2137
- id: smithy_client_1.expectString,
2138
- projectName: smithy_client_1.expectString,
2139
- sessionId: smithy_client_1.expectString,
2140
- spaceName: smithy_client_1.expectString,
2141
- });
2142
- Object.assign(contents, doc);
2143
- return contents;
2144
- };
2145
- exports.de_StartDevEnvironmentSessionCommand = de_StartDevEnvironmentSessionCommand;
2146
- const de_StartDevEnvironmentSessionCommandError = async (output, context) => {
2147
- const parsedOutput = {
2148
- ...output,
2149
- body: await parseErrorBody(output.body, context),
2150
- };
2151
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2152
- switch (errorCode) {
2153
- case "AccessDeniedException":
2154
- case "com.amazonaws.codecatalyst#AccessDeniedException":
2155
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2156
- case "ConflictException":
2157
- case "com.amazonaws.codecatalyst#ConflictException":
2158
- throw await de_ConflictExceptionRes(parsedOutput, context);
2159
- case "ResourceNotFoundException":
2160
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
2161
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2162
- case "ServiceQuotaExceededException":
2163
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
2164
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2165
- case "ThrottlingException":
2166
- case "com.amazonaws.codecatalyst#ThrottlingException":
2167
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2168
- case "ValidationException":
2169
- case "com.amazonaws.codecatalyst#ValidationException":
2170
- throw await de_ValidationExceptionRes(parsedOutput, context);
2171
- default:
2172
- const parsedBody = parsedOutput.body;
2173
- return throwDefaultError({
2174
- output,
2175
- parsedBody,
2176
- errorCode,
2177
- });
2178
- }
2179
- };
2180
- const de_StartWorkflowRunCommand = async (output, context) => {
2181
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2182
- return de_StartWorkflowRunCommandError(output, context);
2183
- }
2184
- const contents = (0, smithy_client_1.map)({
2185
- $metadata: deserializeMetadata(output),
2186
- });
2187
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2188
- const doc = (0, smithy_client_1.take)(data, {
2189
- id: smithy_client_1.expectString,
2190
- projectName: smithy_client_1.expectString,
2191
- spaceName: smithy_client_1.expectString,
2192
- workflowId: smithy_client_1.expectString,
2193
- });
2194
- Object.assign(contents, doc);
2195
- return contents;
2196
- };
2197
- exports.de_StartWorkflowRunCommand = de_StartWorkflowRunCommand;
2198
- const de_StartWorkflowRunCommandError = async (output, context) => {
2199
- const parsedOutput = {
2200
- ...output,
2201
- body: await parseErrorBody(output.body, context),
2202
- };
2203
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2204
- switch (errorCode) {
2205
- case "AccessDeniedException":
2206
- case "com.amazonaws.codecatalyst#AccessDeniedException":
2207
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2208
- case "ConflictException":
2209
- case "com.amazonaws.codecatalyst#ConflictException":
2210
- throw await de_ConflictExceptionRes(parsedOutput, context);
2211
- case "ResourceNotFoundException":
2212
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
2213
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2214
- case "ServiceQuotaExceededException":
2215
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
2216
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2217
- case "ThrottlingException":
2218
- case "com.amazonaws.codecatalyst#ThrottlingException":
2219
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2220
- case "ValidationException":
2221
- case "com.amazonaws.codecatalyst#ValidationException":
2222
- throw await de_ValidationExceptionRes(parsedOutput, context);
2223
- default:
2224
- const parsedBody = parsedOutput.body;
2225
- return throwDefaultError({
2226
- output,
2227
- parsedBody,
2228
- errorCode,
2229
- });
2230
- }
2231
- };
2232
- const de_StopDevEnvironmentCommand = async (output, context) => {
2233
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2234
- return de_StopDevEnvironmentCommandError(output, context);
2235
- }
2236
- const contents = (0, smithy_client_1.map)({
2237
- $metadata: deserializeMetadata(output),
2238
- });
2239
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2240
- const doc = (0, smithy_client_1.take)(data, {
2241
- id: smithy_client_1.expectString,
2242
- projectName: smithy_client_1.expectString,
2243
- spaceName: smithy_client_1.expectString,
2244
- status: smithy_client_1.expectString,
2245
- });
2246
- Object.assign(contents, doc);
2247
- return contents;
2248
- };
2249
- exports.de_StopDevEnvironmentCommand = de_StopDevEnvironmentCommand;
2250
- const de_StopDevEnvironmentCommandError = async (output, context) => {
2251
- const parsedOutput = {
2252
- ...output,
2253
- body: await parseErrorBody(output.body, context),
2254
- };
2255
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2256
- switch (errorCode) {
2257
- case "AccessDeniedException":
2258
- case "com.amazonaws.codecatalyst#AccessDeniedException":
2259
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2260
- case "ConflictException":
2261
- case "com.amazonaws.codecatalyst#ConflictException":
2262
- throw await de_ConflictExceptionRes(parsedOutput, context);
2263
- case "ResourceNotFoundException":
2264
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
2265
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2266
- case "ServiceQuotaExceededException":
2267
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
2268
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2269
- case "ThrottlingException":
2270
- case "com.amazonaws.codecatalyst#ThrottlingException":
2271
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2272
- case "ValidationException":
2273
- case "com.amazonaws.codecatalyst#ValidationException":
2274
- throw await de_ValidationExceptionRes(parsedOutput, context);
2275
- default:
2276
- const parsedBody = parsedOutput.body;
2277
- return throwDefaultError({
2278
- output,
2279
- parsedBody,
2280
- errorCode,
2281
- });
2282
- }
2283
- };
2284
- const de_StopDevEnvironmentSessionCommand = async (output, context) => {
2285
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2286
- return de_StopDevEnvironmentSessionCommandError(output, context);
2287
- }
2288
- const contents = (0, smithy_client_1.map)({
2289
- $metadata: deserializeMetadata(output),
2290
- });
2291
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2292
- const doc = (0, smithy_client_1.take)(data, {
2293
- id: smithy_client_1.expectString,
2294
- projectName: smithy_client_1.expectString,
2295
- sessionId: smithy_client_1.expectString,
2296
- spaceName: smithy_client_1.expectString,
2297
- });
2298
- Object.assign(contents, doc);
2299
- return contents;
2300
- };
2301
- exports.de_StopDevEnvironmentSessionCommand = de_StopDevEnvironmentSessionCommand;
2302
- const de_StopDevEnvironmentSessionCommandError = async (output, context) => {
2303
- const parsedOutput = {
2304
- ...output,
2305
- body: await parseErrorBody(output.body, context),
2306
- };
2307
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2308
- switch (errorCode) {
2309
- case "AccessDeniedException":
2310
- case "com.amazonaws.codecatalyst#AccessDeniedException":
2311
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2312
- case "ConflictException":
2313
- case "com.amazonaws.codecatalyst#ConflictException":
2314
- throw await de_ConflictExceptionRes(parsedOutput, context);
2315
- case "ResourceNotFoundException":
2316
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
2317
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2318
- case "ServiceQuotaExceededException":
2319
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
2320
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2321
- case "ThrottlingException":
2322
- case "com.amazonaws.codecatalyst#ThrottlingException":
2323
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2324
- case "ValidationException":
2325
- case "com.amazonaws.codecatalyst#ValidationException":
2326
- throw await de_ValidationExceptionRes(parsedOutput, context);
2327
- default:
2328
- const parsedBody = parsedOutput.body;
2329
- return throwDefaultError({
2330
- output,
2331
- parsedBody,
2332
- errorCode,
2333
- });
2334
- }
2335
- };
2336
- const de_UpdateDevEnvironmentCommand = async (output, context) => {
2337
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2338
- return de_UpdateDevEnvironmentCommandError(output, context);
2339
- }
2340
- const contents = (0, smithy_client_1.map)({
2341
- $metadata: deserializeMetadata(output),
2342
- });
2343
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2344
- const doc = (0, smithy_client_1.take)(data, {
2345
- alias: smithy_client_1.expectString,
2346
- clientToken: smithy_client_1.expectString,
2347
- id: smithy_client_1.expectString,
2348
- ides: smithy_client_1._json,
2349
- inactivityTimeoutMinutes: smithy_client_1.expectInt32,
2350
- instanceType: smithy_client_1.expectString,
2351
- projectName: smithy_client_1.expectString,
2352
- spaceName: smithy_client_1.expectString,
2353
- });
2354
- Object.assign(contents, doc);
2355
- return contents;
2356
- };
2357
- exports.de_UpdateDevEnvironmentCommand = de_UpdateDevEnvironmentCommand;
2358
- const de_UpdateDevEnvironmentCommandError = async (output, context) => {
2359
- const parsedOutput = {
2360
- ...output,
2361
- body: await parseErrorBody(output.body, context),
2362
- };
2363
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2364
- switch (errorCode) {
2365
- case "AccessDeniedException":
2366
- case "com.amazonaws.codecatalyst#AccessDeniedException":
2367
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2368
- case "ConflictException":
2369
- case "com.amazonaws.codecatalyst#ConflictException":
2370
- throw await de_ConflictExceptionRes(parsedOutput, context);
2371
- case "ResourceNotFoundException":
2372
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
2373
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2374
- case "ServiceQuotaExceededException":
2375
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
2376
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2377
- case "ThrottlingException":
2378
- case "com.amazonaws.codecatalyst#ThrottlingException":
2379
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2380
- case "ValidationException":
2381
- case "com.amazonaws.codecatalyst#ValidationException":
2382
- throw await de_ValidationExceptionRes(parsedOutput, context);
2383
- default:
2384
- const parsedBody = parsedOutput.body;
2385
- return throwDefaultError({
2386
- output,
2387
- parsedBody,
2388
- errorCode,
2389
- });
2390
- }
2391
- };
2392
- const de_UpdateProjectCommand = async (output, context) => {
2393
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2394
- return de_UpdateProjectCommandError(output, context);
2395
- }
2396
- const contents = (0, smithy_client_1.map)({
2397
- $metadata: deserializeMetadata(output),
2398
- });
2399
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2400
- const doc = (0, smithy_client_1.take)(data, {
2401
- description: smithy_client_1.expectString,
2402
- displayName: smithy_client_1.expectString,
2403
- name: smithy_client_1.expectString,
2404
- spaceName: smithy_client_1.expectString,
2405
- });
2406
- Object.assign(contents, doc);
2407
- return contents;
2408
- };
2409
- exports.de_UpdateProjectCommand = de_UpdateProjectCommand;
2410
- const de_UpdateProjectCommandError = async (output, context) => {
2411
- const parsedOutput = {
2412
- ...output,
2413
- body: await parseErrorBody(output.body, context),
2414
- };
2415
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2416
- switch (errorCode) {
2417
- case "AccessDeniedException":
2418
- case "com.amazonaws.codecatalyst#AccessDeniedException":
2419
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2420
- case "ConflictException":
2421
- case "com.amazonaws.codecatalyst#ConflictException":
2422
- throw await de_ConflictExceptionRes(parsedOutput, context);
2423
- case "ResourceNotFoundException":
2424
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
2425
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2426
- case "ServiceQuotaExceededException":
2427
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
2428
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2429
- case "ThrottlingException":
2430
- case "com.amazonaws.codecatalyst#ThrottlingException":
2431
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2432
- case "ValidationException":
2433
- case "com.amazonaws.codecatalyst#ValidationException":
2434
- throw await de_ValidationExceptionRes(parsedOutput, context);
2435
- default:
2436
- const parsedBody = parsedOutput.body;
2437
- return throwDefaultError({
2438
- output,
2439
- parsedBody,
2440
- errorCode,
2441
- });
2442
- }
2443
- };
2444
- const de_UpdateSpaceCommand = async (output, context) => {
2445
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2446
- return de_UpdateSpaceCommandError(output, context);
2447
- }
2448
- const contents = (0, smithy_client_1.map)({
2449
- $metadata: deserializeMetadata(output),
2450
- });
2451
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2452
- const doc = (0, smithy_client_1.take)(data, {
2453
- description: smithy_client_1.expectString,
2454
- displayName: smithy_client_1.expectString,
2455
- name: smithy_client_1.expectString,
2456
- });
2457
- Object.assign(contents, doc);
2458
- return contents;
2459
- };
2460
- exports.de_UpdateSpaceCommand = de_UpdateSpaceCommand;
2461
- const de_UpdateSpaceCommandError = async (output, context) => {
2462
- const parsedOutput = {
2463
- ...output,
2464
- body: await parseErrorBody(output.body, context),
2465
- };
2466
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2467
- switch (errorCode) {
2468
- case "AccessDeniedException":
2469
- case "com.amazonaws.codecatalyst#AccessDeniedException":
2470
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2471
- case "ConflictException":
2472
- case "com.amazonaws.codecatalyst#ConflictException":
2473
- throw await de_ConflictExceptionRes(parsedOutput, context);
2474
- case "ResourceNotFoundException":
2475
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
2476
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2477
- case "ServiceQuotaExceededException":
2478
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
2479
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2480
- case "ThrottlingException":
2481
- case "com.amazonaws.codecatalyst#ThrottlingException":
2482
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2483
- case "ValidationException":
2484
- case "com.amazonaws.codecatalyst#ValidationException":
2485
- throw await de_ValidationExceptionRes(parsedOutput, context);
2486
- default:
2487
- const parsedBody = parsedOutput.body;
2488
- return throwDefaultError({
2489
- output,
2490
- parsedBody,
2491
- errorCode,
2492
- });
2493
- }
2494
- };
2495
- const de_VerifySessionCommand = async (output, context) => {
2496
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2497
- return de_VerifySessionCommandError(output, context);
2498
- }
2499
- const contents = (0, smithy_client_1.map)({
2500
- $metadata: deserializeMetadata(output),
2501
- });
2502
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2503
- const doc = (0, smithy_client_1.take)(data, {
2504
- identity: smithy_client_1.expectString,
2505
- });
2506
- Object.assign(contents, doc);
2507
- return contents;
2508
- };
2509
- exports.de_VerifySessionCommand = de_VerifySessionCommand;
2510
- const de_VerifySessionCommandError = async (output, context) => {
2511
- const parsedOutput = {
2512
- ...output,
2513
- body: await parseErrorBody(output.body, context),
2514
- };
2515
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2516
- switch (errorCode) {
2517
- case "AccessDeniedException":
2518
- case "com.amazonaws.codecatalyst#AccessDeniedException":
2519
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2520
- case "ConflictException":
2521
- case "com.amazonaws.codecatalyst#ConflictException":
2522
- throw await de_ConflictExceptionRes(parsedOutput, context);
2523
- case "ResourceNotFoundException":
2524
- case "com.amazonaws.codecatalyst#ResourceNotFoundException":
2525
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2526
- case "ServiceQuotaExceededException":
2527
- case "com.amazonaws.codecatalyst#ServiceQuotaExceededException":
2528
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2529
- case "ThrottlingException":
2530
- case "com.amazonaws.codecatalyst#ThrottlingException":
2531
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2532
- case "ValidationException":
2533
- case "com.amazonaws.codecatalyst#ValidationException":
2534
- throw await de_ValidationExceptionRes(parsedOutput, context);
2535
- default:
2536
- const parsedBody = parsedOutput.body;
2537
- return throwDefaultError({
2538
- output,
2539
- parsedBody,
2540
- errorCode,
2541
- });
2542
- }
2543
- };
2544
- const throwDefaultError = (0, smithy_client_1.withBaseException)(CodeCatalystServiceException_1.CodeCatalystServiceException);
2545
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2546
- const contents = (0, smithy_client_1.map)({});
2547
- const data = parsedOutput.body;
2548
- const doc = (0, smithy_client_1.take)(data, {
2549
- message: smithy_client_1.expectString,
2550
- });
2551
- Object.assign(contents, doc);
2552
- const exception = new models_0_1.AccessDeniedException({
2553
- $metadata: deserializeMetadata(parsedOutput),
2554
- ...contents,
2555
- });
2556
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2557
- };
2558
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
2559
- const contents = (0, smithy_client_1.map)({});
2560
- const data = parsedOutput.body;
2561
- const doc = (0, smithy_client_1.take)(data, {
2562
- message: smithy_client_1.expectString,
2563
- });
2564
- Object.assign(contents, doc);
2565
- const exception = new models_0_1.ConflictException({
2566
- $metadata: deserializeMetadata(parsedOutput),
2567
- ...contents,
2568
- });
2569
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2570
- };
2571
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2572
- const contents = (0, smithy_client_1.map)({});
2573
- const data = parsedOutput.body;
2574
- const doc = (0, smithy_client_1.take)(data, {
2575
- message: smithy_client_1.expectString,
2576
- });
2577
- Object.assign(contents, doc);
2578
- const exception = new models_0_1.ResourceNotFoundException({
2579
- $metadata: deserializeMetadata(parsedOutput),
2580
- ...contents,
2581
- });
2582
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2583
- };
2584
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2585
- const contents = (0, smithy_client_1.map)({});
2586
- const data = parsedOutput.body;
2587
- const doc = (0, smithy_client_1.take)(data, {
2588
- message: smithy_client_1.expectString,
2589
- });
2590
- Object.assign(contents, doc);
2591
- const exception = new models_0_1.ServiceQuotaExceededException({
2592
- $metadata: deserializeMetadata(parsedOutput),
2593
- ...contents,
2594
- });
2595
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2596
- };
2597
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2598
- const contents = (0, smithy_client_1.map)({});
2599
- const data = parsedOutput.body;
2600
- const doc = (0, smithy_client_1.take)(data, {
2601
- message: smithy_client_1.expectString,
2602
- });
2603
- Object.assign(contents, doc);
2604
- const exception = new models_0_1.ThrottlingException({
2605
- $metadata: deserializeMetadata(parsedOutput),
2606
- ...contents,
2607
- });
2608
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2609
- };
2610
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
2611
- const contents = (0, smithy_client_1.map)({});
2612
- const data = parsedOutput.body;
2613
- const doc = (0, smithy_client_1.take)(data, {
2614
- message: smithy_client_1.expectString,
2615
- });
2616
- Object.assign(contents, doc);
2617
- const exception = new models_0_1.ValidationException({
2618
- $metadata: deserializeMetadata(parsedOutput),
2619
- ...contents,
2620
- });
2621
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2622
- };
2623
- const de_AccessTokenSummaries = (output, context) => {
2624
- const retVal = (output || [])
2625
- .filter((e) => e != null)
2626
- .map((entry) => {
2627
- return de_AccessTokenSummary(entry, context);
2628
- });
2629
- return retVal;
2630
- };
2631
- const de_AccessTokenSummary = (output, context) => {
2632
- return (0, smithy_client_1.take)(output, {
2633
- expiresTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2634
- id: smithy_client_1.expectString,
2635
- name: smithy_client_1.expectString,
2636
- });
2637
- };
2638
- const de_DevEnvironmentSessionsSummaryList = (output, context) => {
2639
- const retVal = (output || [])
2640
- .filter((e) => e != null)
2641
- .map((entry) => {
2642
- return de_DevEnvironmentSessionSummary(entry, context);
2643
- });
2644
- return retVal;
2645
- };
2646
- const de_DevEnvironmentSessionSummary = (output, context) => {
2647
- return (0, smithy_client_1.take)(output, {
2648
- devEnvironmentId: smithy_client_1.expectString,
2649
- id: smithy_client_1.expectString,
2650
- projectName: smithy_client_1.expectString,
2651
- spaceName: smithy_client_1.expectString,
2652
- startedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2653
- });
2654
- };
2655
- const de_DevEnvironmentSummary = (output, context) => {
2656
- return (0, smithy_client_1.take)(output, {
2657
- alias: smithy_client_1.expectString,
2658
- creatorId: smithy_client_1.expectString,
2659
- id: smithy_client_1.expectString,
2660
- ides: smithy_client_1._json,
2661
- inactivityTimeoutMinutes: smithy_client_1.expectInt32,
2662
- instanceType: smithy_client_1.expectString,
2663
- lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2664
- persistentStorage: smithy_client_1._json,
2665
- projectName: smithy_client_1.expectString,
2666
- repositories: smithy_client_1._json,
2667
- spaceName: smithy_client_1.expectString,
2668
- status: smithy_client_1.expectString,
2669
- statusReason: smithy_client_1.expectString,
2670
- vpcConnectionName: smithy_client_1.expectString,
2671
- });
2672
- };
2673
- const de_DevEnvironmentSummaryList = (output, context) => {
2674
- const retVal = (output || [])
2675
- .filter((e) => e != null)
2676
- .map((entry) => {
2677
- return de_DevEnvironmentSummary(entry, context);
2678
- });
2679
- return retVal;
2680
- };
2681
- const de_EventLogEntries = (output, context) => {
2682
- const retVal = (output || [])
2683
- .filter((e) => e != null)
2684
- .map((entry) => {
2685
- return de_EventLogEntry(entry, context);
2686
- });
2687
- return retVal;
2688
- };
2689
- const de_EventLogEntry = (output, context) => {
2690
- return (0, smithy_client_1.take)(output, {
2691
- errorCode: smithy_client_1.expectString,
2692
- eventCategory: smithy_client_1.expectString,
2693
- eventName: smithy_client_1.expectString,
2694
- eventSource: smithy_client_1.expectString,
2695
- eventTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2696
- eventType: smithy_client_1.expectString,
2697
- id: smithy_client_1.expectString,
2698
- operationType: smithy_client_1.expectString,
2699
- projectInformation: smithy_client_1._json,
2700
- requestId: smithy_client_1.expectString,
2701
- requestPayload: smithy_client_1._json,
2702
- responsePayload: smithy_client_1._json,
2703
- sourceIpAddress: smithy_client_1.expectString,
2704
- userAgent: smithy_client_1.expectString,
2705
- userIdentity: smithy_client_1._json,
2706
- });
2707
- };
2708
- const de_ListSourceRepositoriesItem = (output, context) => {
2709
- return (0, smithy_client_1.take)(output, {
2710
- createdTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2711
- description: smithy_client_1.expectString,
2712
- id: smithy_client_1.expectString,
2713
- lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2714
- name: smithy_client_1.expectString,
2715
- });
2716
- };
2717
- const de_ListSourceRepositoriesItems = (output, context) => {
2718
- const retVal = (output || [])
2719
- .filter((e) => e != null)
2720
- .map((entry) => {
2721
- return de_ListSourceRepositoriesItem(entry, context);
2722
- });
2723
- return retVal;
2724
- };
2725
- const de_ListSourceRepositoryBranchesItem = (output, context) => {
2726
- return (0, smithy_client_1.take)(output, {
2727
- headCommitId: smithy_client_1.expectString,
2728
- lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2729
- name: smithy_client_1.expectString,
2730
- ref: smithy_client_1.expectString,
2731
- });
2732
- };
2733
- const de_ListSourceRepositoryBranchesItems = (output, context) => {
2734
- const retVal = (output || [])
2735
- .filter((e) => e != null)
2736
- .map((entry) => {
2737
- return de_ListSourceRepositoryBranchesItem(entry, context);
2738
- });
2739
- return retVal;
2740
- };
2741
- const de_WorkflowRunSummaries = (output, context) => {
2742
- const retVal = (output || [])
2743
- .filter((e) => e != null)
2744
- .map((entry) => {
2745
- return de_WorkflowRunSummary(entry, context);
2746
- });
2747
- return retVal;
2748
- };
2749
- const de_WorkflowRunSummary = (output, context) => {
2750
- return (0, smithy_client_1.take)(output, {
2751
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2752
- id: smithy_client_1.expectString,
2753
- lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2754
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2755
- status: smithy_client_1.expectString,
2756
- statusReasons: smithy_client_1._json,
2757
- workflowId: smithy_client_1.expectString,
2758
- workflowName: smithy_client_1.expectString,
2759
- });
2760
- };
2761
- const de_WorkflowSummaries = (output, context) => {
2762
- const retVal = (output || [])
2763
- .filter((e) => e != null)
2764
- .map((entry) => {
2765
- return de_WorkflowSummary(entry, context);
2766
- });
2767
- return retVal;
2768
- };
2769
- const de_WorkflowSummary = (output, context) => {
2770
- return (0, smithy_client_1.take)(output, {
2771
- createdTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2772
- definition: smithy_client_1._json,
2773
- id: smithy_client_1.expectString,
2774
- lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2775
- name: smithy_client_1.expectString,
2776
- runMode: smithy_client_1.expectString,
2777
- sourceBranchName: smithy_client_1.expectString,
2778
- sourceRepositoryName: smithy_client_1.expectString,
2779
- status: smithy_client_1.expectString,
2780
- });
2781
- };
2782
- const deserializeMetadata = (output) => ({
2783
- httpStatusCode: output.statusCode,
2784
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2785
- extendedRequestId: output.headers["x-amz-id-2"],
2786
- cfId: output.headers["x-amz-cf-id"],
2787
- });
2788
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
2789
- const isSerializableHeaderValue = (value) => value !== undefined &&
2790
- value !== null &&
2791
- value !== "" &&
2792
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2793
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2794
- const _i = "id";
2795
- const _mR = "maxResults";
2796
- const _nT = "nextToken";
2797
- const _uN = "userName";
2798
- const _wI = "workflowId";
2799
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2800
- if (encoded.length) {
2801
- return JSON.parse(encoded);
2802
- }
2803
- return {};
2804
- });
2805
- const parseErrorBody = async (errorBody, context) => {
2806
- const value = await parseBody(errorBody, context);
2807
- value.message = value.message ?? value.Message;
2808
- return value;
2809
- };
2810
- const loadRestJsonErrorCode = (output, data) => {
2811
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2812
- const sanitizeErrorCode = (rawValue) => {
2813
- let cleanValue = rawValue;
2814
- if (typeof cleanValue === "number") {
2815
- cleanValue = cleanValue.toString();
2816
- }
2817
- if (cleanValue.indexOf(",") >= 0) {
2818
- cleanValue = cleanValue.split(",")[0];
2819
- }
2820
- if (cleanValue.indexOf(":") >= 0) {
2821
- cleanValue = cleanValue.split(":")[0];
2822
- }
2823
- if (cleanValue.indexOf("#") >= 0) {
2824
- cleanValue = cleanValue.split("#")[1];
2825
- }
2826
- return cleanValue;
2827
- };
2828
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2829
- if (headerKey !== undefined) {
2830
- return sanitizeErrorCode(output.headers[headerKey]);
2831
- }
2832
- if (data.code !== undefined) {
2833
- return sanitizeErrorCode(data.code);
2834
- }
2835
- if (data["__type"] !== undefined) {
2836
- return sanitizeErrorCode(data["__type"]);
2837
- }
2838
- };
1
+ module.exports = require("../index.js");