@aws-sdk/client-codeguru-reviewer 3.180.0 → 3.183.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.
- package/CHANGELOG.md +20 -0
- package/dist-cjs/protocols/Aws_restJson1.js +20 -14
- package/dist-es/CodeGuruReviewer.js +58 -65
- package/dist-es/CodeGuruReviewerClient.js +22 -28
- package/dist-es/commands/AssociateRepositoryCommand.js +21 -28
- package/dist-es/commands/CreateCodeReviewCommand.js +21 -28
- package/dist-es/commands/DescribeCodeReviewCommand.js +21 -28
- package/dist-es/commands/DescribeRecommendationFeedbackCommand.js +21 -28
- package/dist-es/commands/DescribeRepositoryAssociationCommand.js +21 -28
- package/dist-es/commands/DisassociateRepositoryCommand.js +21 -28
- package/dist-es/commands/ListCodeReviewsCommand.js +21 -28
- package/dist-es/commands/ListRecommendationFeedbackCommand.js +21 -28
- package/dist-es/commands/ListRecommendationsCommand.js +21 -28
- package/dist-es/commands/ListRepositoryAssociationsCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/PutRecommendationFeedbackCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/CodeGuruReviewerServiceException.js +5 -10
- package/dist-es/models/models_0.js +246 -139
- package/dist-es/pagination/ListCodeReviewsPaginator.js +25 -68
- package/dist-es/pagination/ListRecommendationFeedbackPaginator.js +25 -68
- package/dist-es/pagination/ListRecommendationsPaginator.js +25 -68
- package/dist-es/pagination/ListRepositoryAssociationsPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +1180 -1564
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/dist-es/waiters/waitForCodeReviewCompleted.js +45 -65
- package/dist-es/waiters/waitForRepositoryAssociationSucceeded.js +45 -65
- package/package.json +34 -34
|
@@ -1,1556 +1,1176 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
4
|
import { CodeGuruReviewerServiceException as __BaseException } from "../models/CodeGuruReviewerServiceException";
|
|
6
5
|
import { AccessDeniedException, ConflictException, InternalServerException, NotFoundException, ResourceNotFoundException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
})), (input.Repository != null && { Repository: serializeAws_restJson1Repository(input.Repository, context) })), (input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
|
|
22
|
-
return [2, new __HttpRequest({
|
|
23
|
-
protocol: protocol,
|
|
24
|
-
hostname: hostname,
|
|
25
|
-
port: port,
|
|
26
|
-
method: "POST",
|
|
27
|
-
headers: headers,
|
|
28
|
-
path: resolvedPath,
|
|
29
|
-
body: body,
|
|
30
|
-
})];
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
}); };
|
|
34
|
-
export var serializeAws_restJson1CreateCodeReviewCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
35
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
36
|
-
var _c;
|
|
37
|
-
return __generator(this, function (_d) {
|
|
38
|
-
switch (_d.label) {
|
|
39
|
-
case 0: return [4, context.endpoint()];
|
|
40
|
-
case 1:
|
|
41
|
-
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
42
|
-
headers = {
|
|
43
|
-
"content-type": "application/json",
|
|
44
|
-
};
|
|
45
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/codereviews";
|
|
46
|
-
body = JSON.stringify(__assign(__assign(__assign({ ClientRequestToken: (_c = input.ClientRequestToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.Name != null && { Name: input.Name })), (input.RepositoryAssociationArn != null && { RepositoryAssociationArn: input.RepositoryAssociationArn })), (input.Type != null && { Type: serializeAws_restJson1CodeReviewType(input.Type, context) })));
|
|
47
|
-
return [2, new __HttpRequest({
|
|
48
|
-
protocol: protocol,
|
|
49
|
-
hostname: hostname,
|
|
50
|
-
port: port,
|
|
51
|
-
method: "POST",
|
|
52
|
-
headers: headers,
|
|
53
|
-
path: resolvedPath,
|
|
54
|
-
body: body,
|
|
55
|
-
})];
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
}); };
|
|
59
|
-
export var serializeAws_restJson1DescribeCodeReviewCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
60
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
61
|
-
return __generator(this, function (_c) {
|
|
62
|
-
switch (_c.label) {
|
|
63
|
-
case 0: return [4, context.endpoint()];
|
|
64
|
-
case 1:
|
|
65
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
66
|
-
headers = {};
|
|
67
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/codereviews/{CodeReviewArn}";
|
|
68
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "CodeReviewArn", function () { return input.CodeReviewArn; }, "{CodeReviewArn}", false);
|
|
69
|
-
return [2, new __HttpRequest({
|
|
70
|
-
protocol: protocol,
|
|
71
|
-
hostname: hostname,
|
|
72
|
-
port: port,
|
|
73
|
-
method: "GET",
|
|
74
|
-
headers: headers,
|
|
75
|
-
path: resolvedPath,
|
|
76
|
-
body: body,
|
|
77
|
-
})];
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
}); };
|
|
81
|
-
export var serializeAws_restJson1DescribeRecommendationFeedbackCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
82
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
83
|
-
return __generator(this, function (_c) {
|
|
84
|
-
switch (_c.label) {
|
|
85
|
-
case 0: return [4, context.endpoint()];
|
|
86
|
-
case 1:
|
|
87
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
88
|
-
headers = {};
|
|
89
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/feedback/{CodeReviewArn}";
|
|
90
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "CodeReviewArn", function () { return input.CodeReviewArn; }, "{CodeReviewArn}", false);
|
|
91
|
-
query = map({
|
|
92
|
-
RecommendationId: [, input.RecommendationId],
|
|
93
|
-
UserId: [, input.UserId],
|
|
94
|
-
});
|
|
95
|
-
return [2, new __HttpRequest({
|
|
96
|
-
protocol: protocol,
|
|
97
|
-
hostname: hostname,
|
|
98
|
-
port: port,
|
|
99
|
-
method: "GET",
|
|
100
|
-
headers: headers,
|
|
101
|
-
path: resolvedPath,
|
|
102
|
-
query: query,
|
|
103
|
-
body: body,
|
|
104
|
-
})];
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
}); };
|
|
108
|
-
export var serializeAws_restJson1DescribeRepositoryAssociationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
109
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
110
|
-
return __generator(this, function (_c) {
|
|
111
|
-
switch (_c.label) {
|
|
112
|
-
case 0: return [4, context.endpoint()];
|
|
113
|
-
case 1:
|
|
114
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
115
|
-
headers = {};
|
|
116
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/associations/{AssociationArn}";
|
|
117
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "AssociationArn", function () { return input.AssociationArn; }, "{AssociationArn}", false);
|
|
118
|
-
return [2, new __HttpRequest({
|
|
119
|
-
protocol: protocol,
|
|
120
|
-
hostname: hostname,
|
|
121
|
-
port: port,
|
|
122
|
-
method: "GET",
|
|
123
|
-
headers: headers,
|
|
124
|
-
path: resolvedPath,
|
|
125
|
-
body: body,
|
|
126
|
-
})];
|
|
127
|
-
}
|
|
6
|
+
export const serializeAws_restJson1AssociateRepositoryCommand = async (input, context) => {
|
|
7
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
|
+
const headers = {
|
|
9
|
+
"content-type": "application/json",
|
|
10
|
+
};
|
|
11
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associations";
|
|
12
|
+
let body;
|
|
13
|
+
body = JSON.stringify({
|
|
14
|
+
ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
|
|
15
|
+
...(input.KMSKeyDetails != null && {
|
|
16
|
+
KMSKeyDetails: serializeAws_restJson1KMSKeyDetails(input.KMSKeyDetails, context),
|
|
17
|
+
}),
|
|
18
|
+
...(input.Repository != null && { Repository: serializeAws_restJson1Repository(input.Repository, context) }),
|
|
19
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
128
20
|
});
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
headers = {};
|
|
138
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/associations/{AssociationArn}";
|
|
139
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "AssociationArn", function () { return input.AssociationArn; }, "{AssociationArn}", false);
|
|
140
|
-
return [2, new __HttpRequest({
|
|
141
|
-
protocol: protocol,
|
|
142
|
-
hostname: hostname,
|
|
143
|
-
port: port,
|
|
144
|
-
method: "DELETE",
|
|
145
|
-
headers: headers,
|
|
146
|
-
path: resolvedPath,
|
|
147
|
-
body: body,
|
|
148
|
-
})];
|
|
149
|
-
}
|
|
21
|
+
return new __HttpRequest({
|
|
22
|
+
protocol,
|
|
23
|
+
hostname,
|
|
24
|
+
port,
|
|
25
|
+
method: "POST",
|
|
26
|
+
headers,
|
|
27
|
+
path: resolvedPath,
|
|
28
|
+
body,
|
|
150
29
|
});
|
|
151
|
-
}
|
|
152
|
-
export
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
function () { return (input.ProviderTypes || []).map(function (_entry) { return _entry; }); },
|
|
165
|
-
],
|
|
166
|
-
States: [function () { return input.States !== void 0; }, function () { return (input.States || []).map(function (_entry) { return _entry; }); }],
|
|
167
|
-
RepositoryNames: [
|
|
168
|
-
function () { return input.RepositoryNames !== void 0; },
|
|
169
|
-
function () { return (input.RepositoryNames || []).map(function (_entry) { return _entry; }); },
|
|
170
|
-
],
|
|
171
|
-
Type: [, input.Type],
|
|
172
|
-
MaxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
|
|
173
|
-
NextToken: [, input.NextToken],
|
|
174
|
-
});
|
|
175
|
-
return [2, new __HttpRequest({
|
|
176
|
-
protocol: protocol,
|
|
177
|
-
hostname: hostname,
|
|
178
|
-
port: port,
|
|
179
|
-
method: "GET",
|
|
180
|
-
headers: headers,
|
|
181
|
-
path: resolvedPath,
|
|
182
|
-
query: query,
|
|
183
|
-
body: body,
|
|
184
|
-
})];
|
|
185
|
-
}
|
|
30
|
+
};
|
|
31
|
+
export const serializeAws_restJson1CreateCodeReviewCommand = async (input, context) => {
|
|
32
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
33
|
+
const headers = {
|
|
34
|
+
"content-type": "application/json",
|
|
35
|
+
};
|
|
36
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/codereviews";
|
|
37
|
+
let body;
|
|
38
|
+
body = JSON.stringify({
|
|
39
|
+
ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
|
|
40
|
+
...(input.Name != null && { Name: input.Name }),
|
|
41
|
+
...(input.RepositoryAssociationArn != null && { RepositoryAssociationArn: input.RepositoryAssociationArn }),
|
|
42
|
+
...(input.Type != null && { Type: serializeAws_restJson1CodeReviewType(input.Type, context) }),
|
|
186
43
|
});
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
headers = {};
|
|
196
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
197
|
-
"/feedback/{CodeReviewArn}/RecommendationFeedback";
|
|
198
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "CodeReviewArn", function () { return input.CodeReviewArn; }, "{CodeReviewArn}", false);
|
|
199
|
-
query = map({
|
|
200
|
-
NextToken: [, input.NextToken],
|
|
201
|
-
MaxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
|
|
202
|
-
UserIds: [function () { return input.UserIds !== void 0; }, function () { return (input.UserIds || []).map(function (_entry) { return _entry; }); }],
|
|
203
|
-
RecommendationIds: [
|
|
204
|
-
function () { return input.RecommendationIds !== void 0; },
|
|
205
|
-
function () { return (input.RecommendationIds || []).map(function (_entry) { return _entry; }); },
|
|
206
|
-
],
|
|
207
|
-
});
|
|
208
|
-
return [2, new __HttpRequest({
|
|
209
|
-
protocol: protocol,
|
|
210
|
-
hostname: hostname,
|
|
211
|
-
port: port,
|
|
212
|
-
method: "GET",
|
|
213
|
-
headers: headers,
|
|
214
|
-
path: resolvedPath,
|
|
215
|
-
query: query,
|
|
216
|
-
body: body,
|
|
217
|
-
})];
|
|
218
|
-
}
|
|
44
|
+
return new __HttpRequest({
|
|
45
|
+
protocol,
|
|
46
|
+
hostname,
|
|
47
|
+
port,
|
|
48
|
+
method: "POST",
|
|
49
|
+
headers,
|
|
50
|
+
path: resolvedPath,
|
|
51
|
+
body,
|
|
219
52
|
});
|
|
220
|
-
}
|
|
221
|
-
export
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
});
|
|
236
|
-
return [2, new __HttpRequest({
|
|
237
|
-
protocol: protocol,
|
|
238
|
-
hostname: hostname,
|
|
239
|
-
port: port,
|
|
240
|
-
method: "GET",
|
|
241
|
-
headers: headers,
|
|
242
|
-
path: resolvedPath,
|
|
243
|
-
query: query,
|
|
244
|
-
body: body,
|
|
245
|
-
})];
|
|
246
|
-
}
|
|
53
|
+
};
|
|
54
|
+
export const serializeAws_restJson1DescribeCodeReviewCommand = async (input, context) => {
|
|
55
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
56
|
+
const headers = {};
|
|
57
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/codereviews/{CodeReviewArn}";
|
|
58
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
|
|
59
|
+
let body;
|
|
60
|
+
return new __HttpRequest({
|
|
61
|
+
protocol,
|
|
62
|
+
hostname,
|
|
63
|
+
port,
|
|
64
|
+
method: "GET",
|
|
65
|
+
headers,
|
|
66
|
+
path: resolvedPath,
|
|
67
|
+
body,
|
|
247
68
|
});
|
|
248
|
-
}
|
|
249
|
-
export
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/associations";
|
|
258
|
-
query = map({
|
|
259
|
-
ProviderType: [
|
|
260
|
-
function () { return input.ProviderTypes !== void 0; },
|
|
261
|
-
function () { return (input.ProviderTypes || []).map(function (_entry) { return _entry; }); },
|
|
262
|
-
],
|
|
263
|
-
State: [function () { return input.States !== void 0; }, function () { return (input.States || []).map(function (_entry) { return _entry; }); }],
|
|
264
|
-
Name: [function () { return input.Names !== void 0; }, function () { return (input.Names || []).map(function (_entry) { return _entry; }); }],
|
|
265
|
-
Owner: [function () { return input.Owners !== void 0; }, function () { return (input.Owners || []).map(function (_entry) { return _entry; }); }],
|
|
266
|
-
MaxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
|
|
267
|
-
NextToken: [, input.NextToken],
|
|
268
|
-
});
|
|
269
|
-
return [2, new __HttpRequest({
|
|
270
|
-
protocol: protocol,
|
|
271
|
-
hostname: hostname,
|
|
272
|
-
port: port,
|
|
273
|
-
method: "GET",
|
|
274
|
-
headers: headers,
|
|
275
|
-
path: resolvedPath,
|
|
276
|
-
query: query,
|
|
277
|
-
body: body,
|
|
278
|
-
})];
|
|
279
|
-
}
|
|
69
|
+
};
|
|
70
|
+
export const serializeAws_restJson1DescribeRecommendationFeedbackCommand = async (input, context) => {
|
|
71
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
72
|
+
const headers = {};
|
|
73
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/feedback/{CodeReviewArn}";
|
|
74
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
|
|
75
|
+
const query = map({
|
|
76
|
+
RecommendationId: [, input.RecommendationId],
|
|
77
|
+
UserId: [, input.UserId],
|
|
280
78
|
});
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
|
|
292
|
-
return [2, new __HttpRequest({
|
|
293
|
-
protocol: protocol,
|
|
294
|
-
hostname: hostname,
|
|
295
|
-
port: port,
|
|
296
|
-
method: "GET",
|
|
297
|
-
headers: headers,
|
|
298
|
-
path: resolvedPath,
|
|
299
|
-
body: body,
|
|
300
|
-
})];
|
|
301
|
-
}
|
|
79
|
+
let body;
|
|
80
|
+
return new __HttpRequest({
|
|
81
|
+
protocol,
|
|
82
|
+
hostname,
|
|
83
|
+
port,
|
|
84
|
+
method: "GET",
|
|
85
|
+
headers,
|
|
86
|
+
path: resolvedPath,
|
|
87
|
+
query,
|
|
88
|
+
body,
|
|
302
89
|
});
|
|
303
|
-
}
|
|
304
|
-
export
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
hostname: hostname,
|
|
319
|
-
port: port,
|
|
320
|
-
method: "PUT",
|
|
321
|
-
headers: headers,
|
|
322
|
-
path: resolvedPath,
|
|
323
|
-
body: body,
|
|
324
|
-
})];
|
|
325
|
-
}
|
|
90
|
+
};
|
|
91
|
+
export const serializeAws_restJson1DescribeRepositoryAssociationCommand = async (input, context) => {
|
|
92
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
93
|
+
const headers = {};
|
|
94
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associations/{AssociationArn}";
|
|
95
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "AssociationArn", () => input.AssociationArn, "{AssociationArn}", false);
|
|
96
|
+
let body;
|
|
97
|
+
return new __HttpRequest({
|
|
98
|
+
protocol,
|
|
99
|
+
hostname,
|
|
100
|
+
port,
|
|
101
|
+
method: "GET",
|
|
102
|
+
headers,
|
|
103
|
+
path: resolvedPath,
|
|
104
|
+
body,
|
|
326
105
|
});
|
|
327
|
-
}
|
|
328
|
-
export
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
protocol: protocol,
|
|
343
|
-
hostname: hostname,
|
|
344
|
-
port: port,
|
|
345
|
-
method: "POST",
|
|
346
|
-
headers: headers,
|
|
347
|
-
path: resolvedPath,
|
|
348
|
-
body: body,
|
|
349
|
-
})];
|
|
350
|
-
}
|
|
106
|
+
};
|
|
107
|
+
export const serializeAws_restJson1DisassociateRepositoryCommand = async (input, context) => {
|
|
108
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
109
|
+
const headers = {};
|
|
110
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associations/{AssociationArn}";
|
|
111
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "AssociationArn", () => input.AssociationArn, "{AssociationArn}", false);
|
|
112
|
+
let body;
|
|
113
|
+
return new __HttpRequest({
|
|
114
|
+
protocol,
|
|
115
|
+
hostname,
|
|
116
|
+
port,
|
|
117
|
+
method: "DELETE",
|
|
118
|
+
headers,
|
|
119
|
+
path: resolvedPath,
|
|
120
|
+
body,
|
|
351
121
|
});
|
|
352
|
-
}
|
|
353
|
-
export
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
method: "DELETE",
|
|
371
|
-
headers: headers,
|
|
372
|
-
path: resolvedPath,
|
|
373
|
-
query: query,
|
|
374
|
-
body: body,
|
|
375
|
-
})];
|
|
376
|
-
}
|
|
122
|
+
};
|
|
123
|
+
export const serializeAws_restJson1ListCodeReviewsCommand = async (input, context) => {
|
|
124
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
125
|
+
const headers = {};
|
|
126
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/codereviews";
|
|
127
|
+
const query = map({
|
|
128
|
+
ProviderTypes: [
|
|
129
|
+
() => input.ProviderTypes !== void 0,
|
|
130
|
+
() => (input.ProviderTypes || []).map((_entry) => _entry),
|
|
131
|
+
],
|
|
132
|
+
States: [() => input.States !== void 0, () => (input.States || []).map((_entry) => _entry)],
|
|
133
|
+
RepositoryNames: [
|
|
134
|
+
() => input.RepositoryNames !== void 0,
|
|
135
|
+
() => (input.RepositoryNames || []).map((_entry) => _entry),
|
|
136
|
+
],
|
|
137
|
+
Type: [, input.Type],
|
|
138
|
+
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
139
|
+
NextToken: [, input.NextToken],
|
|
377
140
|
});
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
$metadata: deserializeMetadata(output),
|
|
389
|
-
});
|
|
390
|
-
_a = __expectNonNull;
|
|
391
|
-
_b = __expectObject;
|
|
392
|
-
return [4, parseBody(output.body, context)];
|
|
393
|
-
case 1:
|
|
394
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
395
|
-
if (data.RepositoryAssociation != null) {
|
|
396
|
-
contents.RepositoryAssociation = deserializeAws_restJson1RepositoryAssociation(data.RepositoryAssociation, context);
|
|
397
|
-
}
|
|
398
|
-
if (data.Tags != null) {
|
|
399
|
-
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
400
|
-
}
|
|
401
|
-
return [2, contents];
|
|
402
|
-
}
|
|
141
|
+
let body;
|
|
142
|
+
return new __HttpRequest({
|
|
143
|
+
protocol,
|
|
144
|
+
hostname,
|
|
145
|
+
port,
|
|
146
|
+
method: "GET",
|
|
147
|
+
headers,
|
|
148
|
+
path: resolvedPath,
|
|
149
|
+
query,
|
|
150
|
+
body,
|
|
403
151
|
});
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
case "AccessDeniedException": return [3, 2];
|
|
420
|
-
case "com.amazonaws.codegurureviewer#AccessDeniedException": return [3, 2];
|
|
421
|
-
case "ConflictException": return [3, 4];
|
|
422
|
-
case "com.amazonaws.codegurureviewer#ConflictException": return [3, 4];
|
|
423
|
-
case "InternalServerException": return [3, 6];
|
|
424
|
-
case "com.amazonaws.codegurureviewer#InternalServerException": return [3, 6];
|
|
425
|
-
case "ThrottlingException": return [3, 8];
|
|
426
|
-
case "com.amazonaws.codegurureviewer#ThrottlingException": return [3, 8];
|
|
427
|
-
case "ValidationException": return [3, 10];
|
|
428
|
-
case "com.amazonaws.codegurureviewer#ValidationException": return [3, 10];
|
|
429
|
-
}
|
|
430
|
-
return [3, 12];
|
|
431
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
432
|
-
case 3: throw _d.sent();
|
|
433
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
434
|
-
case 5: throw _d.sent();
|
|
435
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
436
|
-
case 7: throw _d.sent();
|
|
437
|
-
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
438
|
-
case 9: throw _d.sent();
|
|
439
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
440
|
-
case 11: throw _d.sent();
|
|
441
|
-
case 12:
|
|
442
|
-
parsedBody = parsedOutput.body;
|
|
443
|
-
throwDefaultError({
|
|
444
|
-
output: output,
|
|
445
|
-
parsedBody: parsedBody,
|
|
446
|
-
exceptionCtor: __BaseException,
|
|
447
|
-
errorCode: errorCode,
|
|
448
|
-
});
|
|
449
|
-
_d.label = 13;
|
|
450
|
-
case 13: return [2];
|
|
451
|
-
}
|
|
152
|
+
};
|
|
153
|
+
export const serializeAws_restJson1ListRecommendationFeedbackCommand = async (input, context) => {
|
|
154
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
155
|
+
const headers = {};
|
|
156
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
157
|
+
"/feedback/{CodeReviewArn}/RecommendationFeedback";
|
|
158
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
|
|
159
|
+
const query = map({
|
|
160
|
+
NextToken: [, input.NextToken],
|
|
161
|
+
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
162
|
+
UserIds: [() => input.UserIds !== void 0, () => (input.UserIds || []).map((_entry) => _entry)],
|
|
163
|
+
RecommendationIds: [
|
|
164
|
+
() => input.RecommendationIds !== void 0,
|
|
165
|
+
() => (input.RecommendationIds || []).map((_entry) => _entry),
|
|
166
|
+
],
|
|
452
167
|
});
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
$metadata: deserializeMetadata(output),
|
|
464
|
-
});
|
|
465
|
-
_a = __expectNonNull;
|
|
466
|
-
_b = __expectObject;
|
|
467
|
-
return [4, parseBody(output.body, context)];
|
|
468
|
-
case 1:
|
|
469
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
470
|
-
if (data.CodeReview != null) {
|
|
471
|
-
contents.CodeReview = deserializeAws_restJson1CodeReview(data.CodeReview, context);
|
|
472
|
-
}
|
|
473
|
-
return [2, contents];
|
|
474
|
-
}
|
|
168
|
+
let body;
|
|
169
|
+
return new __HttpRequest({
|
|
170
|
+
protocol,
|
|
171
|
+
hostname,
|
|
172
|
+
port,
|
|
173
|
+
method: "GET",
|
|
174
|
+
headers,
|
|
175
|
+
path: resolvedPath,
|
|
176
|
+
query,
|
|
177
|
+
body,
|
|
475
178
|
});
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
case 1:
|
|
487
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
488
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
489
|
-
_b = errorCode;
|
|
490
|
-
switch (_b) {
|
|
491
|
-
case "AccessDeniedException": return [3, 2];
|
|
492
|
-
case "com.amazonaws.codegurureviewer#AccessDeniedException": return [3, 2];
|
|
493
|
-
case "ConflictException": return [3, 4];
|
|
494
|
-
case "com.amazonaws.codegurureviewer#ConflictException": return [3, 4];
|
|
495
|
-
case "InternalServerException": return [3, 6];
|
|
496
|
-
case "com.amazonaws.codegurureviewer#InternalServerException": return [3, 6];
|
|
497
|
-
case "ResourceNotFoundException": return [3, 8];
|
|
498
|
-
case "com.amazonaws.codegurureviewer#ResourceNotFoundException": return [3, 8];
|
|
499
|
-
case "ThrottlingException": return [3, 10];
|
|
500
|
-
case "com.amazonaws.codegurureviewer#ThrottlingException": return [3, 10];
|
|
501
|
-
case "ValidationException": return [3, 12];
|
|
502
|
-
case "com.amazonaws.codegurureviewer#ValidationException": return [3, 12];
|
|
503
|
-
}
|
|
504
|
-
return [3, 14];
|
|
505
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
506
|
-
case 3: throw _d.sent();
|
|
507
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
508
|
-
case 5: throw _d.sent();
|
|
509
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
510
|
-
case 7: throw _d.sent();
|
|
511
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
512
|
-
case 9: throw _d.sent();
|
|
513
|
-
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
514
|
-
case 11: throw _d.sent();
|
|
515
|
-
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
516
|
-
case 13: throw _d.sent();
|
|
517
|
-
case 14:
|
|
518
|
-
parsedBody = parsedOutput.body;
|
|
519
|
-
throwDefaultError({
|
|
520
|
-
output: output,
|
|
521
|
-
parsedBody: parsedBody,
|
|
522
|
-
exceptionCtor: __BaseException,
|
|
523
|
-
errorCode: errorCode,
|
|
524
|
-
});
|
|
525
|
-
_d.label = 15;
|
|
526
|
-
case 15: return [2];
|
|
527
|
-
}
|
|
179
|
+
};
|
|
180
|
+
export const serializeAws_restJson1ListRecommendationsCommand = async (input, context) => {
|
|
181
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
182
|
+
const headers = {};
|
|
183
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
184
|
+
"/codereviews/{CodeReviewArn}/Recommendations";
|
|
185
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
|
|
186
|
+
const query = map({
|
|
187
|
+
NextToken: [, input.NextToken],
|
|
188
|
+
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
528
189
|
});
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
$metadata: deserializeMetadata(output),
|
|
540
|
-
});
|
|
541
|
-
_a = __expectNonNull;
|
|
542
|
-
_b = __expectObject;
|
|
543
|
-
return [4, parseBody(output.body, context)];
|
|
544
|
-
case 1:
|
|
545
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
546
|
-
if (data.CodeReview != null) {
|
|
547
|
-
contents.CodeReview = deserializeAws_restJson1CodeReview(data.CodeReview, context);
|
|
548
|
-
}
|
|
549
|
-
return [2, contents];
|
|
550
|
-
}
|
|
190
|
+
let body;
|
|
191
|
+
return new __HttpRequest({
|
|
192
|
+
protocol,
|
|
193
|
+
hostname,
|
|
194
|
+
port,
|
|
195
|
+
method: "GET",
|
|
196
|
+
headers,
|
|
197
|
+
path: resolvedPath,
|
|
198
|
+
query,
|
|
199
|
+
body,
|
|
551
200
|
});
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
case "AccessDeniedException": return [3, 2];
|
|
568
|
-
case "com.amazonaws.codegurureviewer#AccessDeniedException": return [3, 2];
|
|
569
|
-
case "InternalServerException": return [3, 4];
|
|
570
|
-
case "com.amazonaws.codegurureviewer#InternalServerException": return [3, 4];
|
|
571
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
572
|
-
case "com.amazonaws.codegurureviewer#ResourceNotFoundException": return [3, 6];
|
|
573
|
-
case "ThrottlingException": return [3, 8];
|
|
574
|
-
case "com.amazonaws.codegurureviewer#ThrottlingException": return [3, 8];
|
|
575
|
-
case "ValidationException": return [3, 10];
|
|
576
|
-
case "com.amazonaws.codegurureviewer#ValidationException": return [3, 10];
|
|
577
|
-
}
|
|
578
|
-
return [3, 12];
|
|
579
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
580
|
-
case 3: throw _d.sent();
|
|
581
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
582
|
-
case 5: throw _d.sent();
|
|
583
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
584
|
-
case 7: throw _d.sent();
|
|
585
|
-
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
586
|
-
case 9: throw _d.sent();
|
|
587
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
588
|
-
case 11: throw _d.sent();
|
|
589
|
-
case 12:
|
|
590
|
-
parsedBody = parsedOutput.body;
|
|
591
|
-
throwDefaultError({
|
|
592
|
-
output: output,
|
|
593
|
-
parsedBody: parsedBody,
|
|
594
|
-
exceptionCtor: __BaseException,
|
|
595
|
-
errorCode: errorCode,
|
|
596
|
-
});
|
|
597
|
-
_d.label = 13;
|
|
598
|
-
case 13: return [2];
|
|
599
|
-
}
|
|
201
|
+
};
|
|
202
|
+
export const serializeAws_restJson1ListRepositoryAssociationsCommand = async (input, context) => {
|
|
203
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
204
|
+
const headers = {};
|
|
205
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associations";
|
|
206
|
+
const query = map({
|
|
207
|
+
ProviderType: [
|
|
208
|
+
() => input.ProviderTypes !== void 0,
|
|
209
|
+
() => (input.ProviderTypes || []).map((_entry) => _entry),
|
|
210
|
+
],
|
|
211
|
+
State: [() => input.States !== void 0, () => (input.States || []).map((_entry) => _entry)],
|
|
212
|
+
Name: [() => input.Names !== void 0, () => (input.Names || []).map((_entry) => _entry)],
|
|
213
|
+
Owner: [() => input.Owners !== void 0, () => (input.Owners || []).map((_entry) => _entry)],
|
|
214
|
+
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
215
|
+
NextToken: [, input.NextToken],
|
|
600
216
|
});
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
$metadata: deserializeMetadata(output),
|
|
612
|
-
});
|
|
613
|
-
_a = __expectNonNull;
|
|
614
|
-
_b = __expectObject;
|
|
615
|
-
return [4, parseBody(output.body, context)];
|
|
616
|
-
case 1:
|
|
617
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
618
|
-
if (data.RecommendationFeedback != null) {
|
|
619
|
-
contents.RecommendationFeedback = deserializeAws_restJson1RecommendationFeedback(data.RecommendationFeedback, context);
|
|
620
|
-
}
|
|
621
|
-
return [2, contents];
|
|
622
|
-
}
|
|
217
|
+
let body;
|
|
218
|
+
return new __HttpRequest({
|
|
219
|
+
protocol,
|
|
220
|
+
hostname,
|
|
221
|
+
port,
|
|
222
|
+
method: "GET",
|
|
223
|
+
headers,
|
|
224
|
+
path: resolvedPath,
|
|
225
|
+
query,
|
|
226
|
+
body,
|
|
623
227
|
});
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
case "AccessDeniedException": return [3, 2];
|
|
640
|
-
case "com.amazonaws.codegurureviewer#AccessDeniedException": return [3, 2];
|
|
641
|
-
case "InternalServerException": return [3, 4];
|
|
642
|
-
case "com.amazonaws.codegurureviewer#InternalServerException": return [3, 4];
|
|
643
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
644
|
-
case "com.amazonaws.codegurureviewer#ResourceNotFoundException": return [3, 6];
|
|
645
|
-
case "ThrottlingException": return [3, 8];
|
|
646
|
-
case "com.amazonaws.codegurureviewer#ThrottlingException": return [3, 8];
|
|
647
|
-
case "ValidationException": return [3, 10];
|
|
648
|
-
case "com.amazonaws.codegurureviewer#ValidationException": return [3, 10];
|
|
649
|
-
}
|
|
650
|
-
return [3, 12];
|
|
651
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
652
|
-
case 3: throw _d.sent();
|
|
653
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
654
|
-
case 5: throw _d.sent();
|
|
655
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
656
|
-
case 7: throw _d.sent();
|
|
657
|
-
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
658
|
-
case 9: throw _d.sent();
|
|
659
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
660
|
-
case 11: throw _d.sent();
|
|
661
|
-
case 12:
|
|
662
|
-
parsedBody = parsedOutput.body;
|
|
663
|
-
throwDefaultError({
|
|
664
|
-
output: output,
|
|
665
|
-
parsedBody: parsedBody,
|
|
666
|
-
exceptionCtor: __BaseException,
|
|
667
|
-
errorCode: errorCode,
|
|
668
|
-
});
|
|
669
|
-
_d.label = 13;
|
|
670
|
-
case 13: return [2];
|
|
671
|
-
}
|
|
228
|
+
};
|
|
229
|
+
export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
230
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
231
|
+
const headers = {};
|
|
232
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
233
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
234
|
+
let body;
|
|
235
|
+
return new __HttpRequest({
|
|
236
|
+
protocol,
|
|
237
|
+
hostname,
|
|
238
|
+
port,
|
|
239
|
+
method: "GET",
|
|
240
|
+
headers,
|
|
241
|
+
path: resolvedPath,
|
|
242
|
+
body,
|
|
672
243
|
});
|
|
673
|
-
}
|
|
674
|
-
export
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
_a = __expectNonNull;
|
|
686
|
-
_b = __expectObject;
|
|
687
|
-
return [4, parseBody(output.body, context)];
|
|
688
|
-
case 1:
|
|
689
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
690
|
-
if (data.RepositoryAssociation != null) {
|
|
691
|
-
contents.RepositoryAssociation = deserializeAws_restJson1RepositoryAssociation(data.RepositoryAssociation, context);
|
|
692
|
-
}
|
|
693
|
-
if (data.Tags != null) {
|
|
694
|
-
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
695
|
-
}
|
|
696
|
-
return [2, contents];
|
|
697
|
-
}
|
|
244
|
+
};
|
|
245
|
+
export const serializeAws_restJson1PutRecommendationFeedbackCommand = async (input, context) => {
|
|
246
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
247
|
+
const headers = {
|
|
248
|
+
"content-type": "application/json",
|
|
249
|
+
};
|
|
250
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/feedback";
|
|
251
|
+
let body;
|
|
252
|
+
body = JSON.stringify({
|
|
253
|
+
...(input.CodeReviewArn != null && { CodeReviewArn: input.CodeReviewArn }),
|
|
254
|
+
...(input.Reactions != null && { Reactions: serializeAws_restJson1Reactions(input.Reactions, context) }),
|
|
255
|
+
...(input.RecommendationId != null && { RecommendationId: input.RecommendationId }),
|
|
698
256
|
});
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
_c = {};
|
|
708
|
-
return [4, parseBody(output.body, context)];
|
|
709
|
-
case 1:
|
|
710
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
711
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
712
|
-
_b = errorCode;
|
|
713
|
-
switch (_b) {
|
|
714
|
-
case "AccessDeniedException": return [3, 2];
|
|
715
|
-
case "com.amazonaws.codegurureviewer#AccessDeniedException": return [3, 2];
|
|
716
|
-
case "InternalServerException": return [3, 4];
|
|
717
|
-
case "com.amazonaws.codegurureviewer#InternalServerException": return [3, 4];
|
|
718
|
-
case "NotFoundException": return [3, 6];
|
|
719
|
-
case "com.amazonaws.codegurureviewer#NotFoundException": return [3, 6];
|
|
720
|
-
case "ThrottlingException": return [3, 8];
|
|
721
|
-
case "com.amazonaws.codegurureviewer#ThrottlingException": return [3, 8];
|
|
722
|
-
case "ValidationException": return [3, 10];
|
|
723
|
-
case "com.amazonaws.codegurureviewer#ValidationException": return [3, 10];
|
|
724
|
-
}
|
|
725
|
-
return [3, 12];
|
|
726
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
727
|
-
case 3: throw _d.sent();
|
|
728
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
729
|
-
case 5: throw _d.sent();
|
|
730
|
-
case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
731
|
-
case 7: throw _d.sent();
|
|
732
|
-
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
733
|
-
case 9: throw _d.sent();
|
|
734
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
735
|
-
case 11: throw _d.sent();
|
|
736
|
-
case 12:
|
|
737
|
-
parsedBody = parsedOutput.body;
|
|
738
|
-
throwDefaultError({
|
|
739
|
-
output: output,
|
|
740
|
-
parsedBody: parsedBody,
|
|
741
|
-
exceptionCtor: __BaseException,
|
|
742
|
-
errorCode: errorCode,
|
|
743
|
-
});
|
|
744
|
-
_d.label = 13;
|
|
745
|
-
case 13: return [2];
|
|
746
|
-
}
|
|
257
|
+
return new __HttpRequest({
|
|
258
|
+
protocol,
|
|
259
|
+
hostname,
|
|
260
|
+
port,
|
|
261
|
+
method: "PUT",
|
|
262
|
+
headers,
|
|
263
|
+
path: resolvedPath,
|
|
264
|
+
body,
|
|
747
265
|
});
|
|
748
|
-
}
|
|
749
|
-
export
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
});
|
|
760
|
-
_a = __expectNonNull;
|
|
761
|
-
_b = __expectObject;
|
|
762
|
-
return [4, parseBody(output.body, context)];
|
|
763
|
-
case 1:
|
|
764
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
765
|
-
if (data.RepositoryAssociation != null) {
|
|
766
|
-
contents.RepositoryAssociation = deserializeAws_restJson1RepositoryAssociation(data.RepositoryAssociation, context);
|
|
767
|
-
}
|
|
768
|
-
if (data.Tags != null) {
|
|
769
|
-
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
770
|
-
}
|
|
771
|
-
return [2, contents];
|
|
772
|
-
}
|
|
266
|
+
};
|
|
267
|
+
export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
268
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
269
|
+
const headers = {
|
|
270
|
+
"content-type": "application/json",
|
|
271
|
+
};
|
|
272
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
273
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
274
|
+
let body;
|
|
275
|
+
body = JSON.stringify({
|
|
276
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
773
277
|
});
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
_c = {};
|
|
783
|
-
return [4, parseBody(output.body, context)];
|
|
784
|
-
case 1:
|
|
785
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
786
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
787
|
-
_b = errorCode;
|
|
788
|
-
switch (_b) {
|
|
789
|
-
case "AccessDeniedException": return [3, 2];
|
|
790
|
-
case "com.amazonaws.codegurureviewer#AccessDeniedException": return [3, 2];
|
|
791
|
-
case "ConflictException": return [3, 4];
|
|
792
|
-
case "com.amazonaws.codegurureviewer#ConflictException": return [3, 4];
|
|
793
|
-
case "InternalServerException": return [3, 6];
|
|
794
|
-
case "com.amazonaws.codegurureviewer#InternalServerException": return [3, 6];
|
|
795
|
-
case "NotFoundException": return [3, 8];
|
|
796
|
-
case "com.amazonaws.codegurureviewer#NotFoundException": return [3, 8];
|
|
797
|
-
case "ThrottlingException": return [3, 10];
|
|
798
|
-
case "com.amazonaws.codegurureviewer#ThrottlingException": return [3, 10];
|
|
799
|
-
case "ValidationException": return [3, 12];
|
|
800
|
-
case "com.amazonaws.codegurureviewer#ValidationException": return [3, 12];
|
|
801
|
-
}
|
|
802
|
-
return [3, 14];
|
|
803
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
804
|
-
case 3: throw _d.sent();
|
|
805
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
806
|
-
case 5: throw _d.sent();
|
|
807
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
808
|
-
case 7: throw _d.sent();
|
|
809
|
-
case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
810
|
-
case 9: throw _d.sent();
|
|
811
|
-
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
812
|
-
case 11: throw _d.sent();
|
|
813
|
-
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
814
|
-
case 13: throw _d.sent();
|
|
815
|
-
case 14:
|
|
816
|
-
parsedBody = parsedOutput.body;
|
|
817
|
-
throwDefaultError({
|
|
818
|
-
output: output,
|
|
819
|
-
parsedBody: parsedBody,
|
|
820
|
-
exceptionCtor: __BaseException,
|
|
821
|
-
errorCode: errorCode,
|
|
822
|
-
});
|
|
823
|
-
_d.label = 15;
|
|
824
|
-
case 15: return [2];
|
|
825
|
-
}
|
|
278
|
+
return new __HttpRequest({
|
|
279
|
+
protocol,
|
|
280
|
+
hostname,
|
|
281
|
+
port,
|
|
282
|
+
method: "POST",
|
|
283
|
+
headers,
|
|
284
|
+
path: resolvedPath,
|
|
285
|
+
body,
|
|
826
286
|
});
|
|
827
|
-
}
|
|
828
|
-
export
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
}
|
|
836
|
-
contents = map({
|
|
837
|
-
$metadata: deserializeMetadata(output),
|
|
838
|
-
});
|
|
839
|
-
_a = __expectNonNull;
|
|
840
|
-
_b = __expectObject;
|
|
841
|
-
return [4, parseBody(output.body, context)];
|
|
842
|
-
case 1:
|
|
843
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
844
|
-
if (data.CodeReviewSummaries != null) {
|
|
845
|
-
contents.CodeReviewSummaries = deserializeAws_restJson1CodeReviewSummaries(data.CodeReviewSummaries, context);
|
|
846
|
-
}
|
|
847
|
-
if (data.NextToken != null) {
|
|
848
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
849
|
-
}
|
|
850
|
-
return [2, contents];
|
|
851
|
-
}
|
|
287
|
+
};
|
|
288
|
+
export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
289
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
290
|
+
const headers = {};
|
|
291
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
292
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
293
|
+
const query = map({
|
|
294
|
+
tagKeys: [() => input.TagKeys !== void 0, () => (input.TagKeys || []).map((_entry) => _entry)],
|
|
852
295
|
});
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
case 1:
|
|
864
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
865
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
866
|
-
_b = errorCode;
|
|
867
|
-
switch (_b) {
|
|
868
|
-
case "AccessDeniedException": return [3, 2];
|
|
869
|
-
case "com.amazonaws.codegurureviewer#AccessDeniedException": return [3, 2];
|
|
870
|
-
case "InternalServerException": return [3, 4];
|
|
871
|
-
case "com.amazonaws.codegurureviewer#InternalServerException": return [3, 4];
|
|
872
|
-
case "ThrottlingException": return [3, 6];
|
|
873
|
-
case "com.amazonaws.codegurureviewer#ThrottlingException": return [3, 6];
|
|
874
|
-
case "ValidationException": return [3, 8];
|
|
875
|
-
case "com.amazonaws.codegurureviewer#ValidationException": return [3, 8];
|
|
876
|
-
}
|
|
877
|
-
return [3, 10];
|
|
878
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
879
|
-
case 3: throw _d.sent();
|
|
880
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
881
|
-
case 5: throw _d.sent();
|
|
882
|
-
case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
883
|
-
case 7: throw _d.sent();
|
|
884
|
-
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
885
|
-
case 9: throw _d.sent();
|
|
886
|
-
case 10:
|
|
887
|
-
parsedBody = parsedOutput.body;
|
|
888
|
-
throwDefaultError({
|
|
889
|
-
output: output,
|
|
890
|
-
parsedBody: parsedBody,
|
|
891
|
-
exceptionCtor: __BaseException,
|
|
892
|
-
errorCode: errorCode,
|
|
893
|
-
});
|
|
894
|
-
_d.label = 11;
|
|
895
|
-
case 11: return [2];
|
|
896
|
-
}
|
|
296
|
+
let body;
|
|
297
|
+
return new __HttpRequest({
|
|
298
|
+
protocol,
|
|
299
|
+
hostname,
|
|
300
|
+
port,
|
|
301
|
+
method: "DELETE",
|
|
302
|
+
headers,
|
|
303
|
+
path: resolvedPath,
|
|
304
|
+
query,
|
|
305
|
+
body,
|
|
897
306
|
});
|
|
898
|
-
}
|
|
899
|
-
export
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
return [2, deserializeAws_restJson1ListRecommendationFeedbackCommandError(output, context)];
|
|
906
|
-
}
|
|
907
|
-
contents = map({
|
|
908
|
-
$metadata: deserializeMetadata(output),
|
|
909
|
-
});
|
|
910
|
-
_a = __expectNonNull;
|
|
911
|
-
_b = __expectObject;
|
|
912
|
-
return [4, parseBody(output.body, context)];
|
|
913
|
-
case 1:
|
|
914
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
915
|
-
if (data.NextToken != null) {
|
|
916
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
917
|
-
}
|
|
918
|
-
if (data.RecommendationFeedbackSummaries != null) {
|
|
919
|
-
contents.RecommendationFeedbackSummaries = deserializeAws_restJson1RecommendationFeedbackSummaries(data.RecommendationFeedbackSummaries, context);
|
|
920
|
-
}
|
|
921
|
-
return [2, contents];
|
|
922
|
-
}
|
|
307
|
+
};
|
|
308
|
+
export const deserializeAws_restJson1AssociateRepositoryCommand = async (output, context) => {
|
|
309
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
310
|
+
return deserializeAws_restJson1AssociateRepositoryCommandError(output, context);
|
|
311
|
+
}
|
|
312
|
+
const contents = map({
|
|
313
|
+
$metadata: deserializeMetadata(output),
|
|
923
314
|
});
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
}
|
|
315
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
316
|
+
if (data.RepositoryAssociation != null) {
|
|
317
|
+
contents.RepositoryAssociation = deserializeAws_restJson1RepositoryAssociation(data.RepositoryAssociation, context);
|
|
318
|
+
}
|
|
319
|
+
if (data.Tags != null) {
|
|
320
|
+
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
321
|
+
}
|
|
322
|
+
return contents;
|
|
323
|
+
};
|
|
324
|
+
const deserializeAws_restJson1AssociateRepositoryCommandError = async (output, context) => {
|
|
325
|
+
const parsedOutput = {
|
|
326
|
+
...output,
|
|
327
|
+
body: await parseErrorBody(output.body, context),
|
|
328
|
+
};
|
|
329
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
330
|
+
switch (errorCode) {
|
|
331
|
+
case "AccessDeniedException":
|
|
332
|
+
case "com.amazonaws.codegurureviewer#AccessDeniedException":
|
|
333
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
334
|
+
case "ConflictException":
|
|
335
|
+
case "com.amazonaws.codegurureviewer#ConflictException":
|
|
336
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
337
|
+
case "InternalServerException":
|
|
338
|
+
case "com.amazonaws.codegurureviewer#InternalServerException":
|
|
339
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
340
|
+
case "ThrottlingException":
|
|
341
|
+
case "com.amazonaws.codegurureviewer#ThrottlingException":
|
|
342
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
343
|
+
case "ValidationException":
|
|
344
|
+
case "com.amazonaws.codegurureviewer#ValidationException":
|
|
345
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
346
|
+
default:
|
|
347
|
+
const parsedBody = parsedOutput.body;
|
|
348
|
+
throwDefaultError({
|
|
349
|
+
output,
|
|
350
|
+
parsedBody,
|
|
351
|
+
exceptionCtor: __BaseException,
|
|
352
|
+
errorCode,
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
export const deserializeAws_restJson1CreateCodeReviewCommand = async (output, context) => {
|
|
357
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
358
|
+
return deserializeAws_restJson1CreateCodeReviewCommandError(output, context);
|
|
359
|
+
}
|
|
360
|
+
const contents = map({
|
|
361
|
+
$metadata: deserializeMetadata(output),
|
|
972
362
|
});
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
363
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
364
|
+
if (data.CodeReview != null) {
|
|
365
|
+
contents.CodeReview = deserializeAws_restJson1CodeReview(data.CodeReview, context);
|
|
366
|
+
}
|
|
367
|
+
return contents;
|
|
368
|
+
};
|
|
369
|
+
const deserializeAws_restJson1CreateCodeReviewCommandError = async (output, context) => {
|
|
370
|
+
const parsedOutput = {
|
|
371
|
+
...output,
|
|
372
|
+
body: await parseErrorBody(output.body, context),
|
|
373
|
+
};
|
|
374
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
375
|
+
switch (errorCode) {
|
|
376
|
+
case "AccessDeniedException":
|
|
377
|
+
case "com.amazonaws.codegurureviewer#AccessDeniedException":
|
|
378
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
379
|
+
case "ConflictException":
|
|
380
|
+
case "com.amazonaws.codegurureviewer#ConflictException":
|
|
381
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
382
|
+
case "InternalServerException":
|
|
383
|
+
case "com.amazonaws.codegurureviewer#InternalServerException":
|
|
384
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
385
|
+
case "ResourceNotFoundException":
|
|
386
|
+
case "com.amazonaws.codegurureviewer#ResourceNotFoundException":
|
|
387
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
388
|
+
case "ThrottlingException":
|
|
389
|
+
case "com.amazonaws.codegurureviewer#ThrottlingException":
|
|
390
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
391
|
+
case "ValidationException":
|
|
392
|
+
case "com.amazonaws.codegurureviewer#ValidationException":
|
|
393
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
394
|
+
default:
|
|
395
|
+
const parsedBody = parsedOutput.body;
|
|
396
|
+
throwDefaultError({
|
|
397
|
+
output,
|
|
398
|
+
parsedBody,
|
|
399
|
+
exceptionCtor: __BaseException,
|
|
400
|
+
errorCode,
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
};
|
|
404
|
+
export const deserializeAws_restJson1DescribeCodeReviewCommand = async (output, context) => {
|
|
405
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
406
|
+
return deserializeAws_restJson1DescribeCodeReviewCommandError(output, context);
|
|
407
|
+
}
|
|
408
|
+
const contents = map({
|
|
409
|
+
$metadata: deserializeMetadata(output),
|
|
998
410
|
});
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
return
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
});
|
|
1044
|
-
_d.label = 13;
|
|
1045
|
-
case 13: return [2];
|
|
1046
|
-
}
|
|
411
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
412
|
+
if (data.CodeReview != null) {
|
|
413
|
+
contents.CodeReview = deserializeAws_restJson1CodeReview(data.CodeReview, context);
|
|
414
|
+
}
|
|
415
|
+
return contents;
|
|
416
|
+
};
|
|
417
|
+
const deserializeAws_restJson1DescribeCodeReviewCommandError = async (output, context) => {
|
|
418
|
+
const parsedOutput = {
|
|
419
|
+
...output,
|
|
420
|
+
body: await parseErrorBody(output.body, context),
|
|
421
|
+
};
|
|
422
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
423
|
+
switch (errorCode) {
|
|
424
|
+
case "AccessDeniedException":
|
|
425
|
+
case "com.amazonaws.codegurureviewer#AccessDeniedException":
|
|
426
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
427
|
+
case "InternalServerException":
|
|
428
|
+
case "com.amazonaws.codegurureviewer#InternalServerException":
|
|
429
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
430
|
+
case "ResourceNotFoundException":
|
|
431
|
+
case "com.amazonaws.codegurureviewer#ResourceNotFoundException":
|
|
432
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
433
|
+
case "ThrottlingException":
|
|
434
|
+
case "com.amazonaws.codegurureviewer#ThrottlingException":
|
|
435
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
436
|
+
case "ValidationException":
|
|
437
|
+
case "com.amazonaws.codegurureviewer#ValidationException":
|
|
438
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
439
|
+
default:
|
|
440
|
+
const parsedBody = parsedOutput.body;
|
|
441
|
+
throwDefaultError({
|
|
442
|
+
output,
|
|
443
|
+
parsedBody,
|
|
444
|
+
exceptionCtor: __BaseException,
|
|
445
|
+
errorCode,
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
export const deserializeAws_restJson1DescribeRecommendationFeedbackCommand = async (output, context) => {
|
|
450
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
451
|
+
return deserializeAws_restJson1DescribeRecommendationFeedbackCommandError(output, context);
|
|
452
|
+
}
|
|
453
|
+
const contents = map({
|
|
454
|
+
$metadata: deserializeMetadata(output),
|
|
1047
455
|
});
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
456
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
457
|
+
if (data.RecommendationFeedback != null) {
|
|
458
|
+
contents.RecommendationFeedback = deserializeAws_restJson1RecommendationFeedback(data.RecommendationFeedback, context);
|
|
459
|
+
}
|
|
460
|
+
return contents;
|
|
461
|
+
};
|
|
462
|
+
const deserializeAws_restJson1DescribeRecommendationFeedbackCommandError = async (output, context) => {
|
|
463
|
+
const parsedOutput = {
|
|
464
|
+
...output,
|
|
465
|
+
body: await parseErrorBody(output.body, context),
|
|
466
|
+
};
|
|
467
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
468
|
+
switch (errorCode) {
|
|
469
|
+
case "AccessDeniedException":
|
|
470
|
+
case "com.amazonaws.codegurureviewer#AccessDeniedException":
|
|
471
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
472
|
+
case "InternalServerException":
|
|
473
|
+
case "com.amazonaws.codegurureviewer#InternalServerException":
|
|
474
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
475
|
+
case "ResourceNotFoundException":
|
|
476
|
+
case "com.amazonaws.codegurureviewer#ResourceNotFoundException":
|
|
477
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
478
|
+
case "ThrottlingException":
|
|
479
|
+
case "com.amazonaws.codegurureviewer#ThrottlingException":
|
|
480
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
481
|
+
case "ValidationException":
|
|
482
|
+
case "com.amazonaws.codegurureviewer#ValidationException":
|
|
483
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
484
|
+
default:
|
|
485
|
+
const parsedBody = parsedOutput.body;
|
|
486
|
+
throwDefaultError({
|
|
487
|
+
output,
|
|
488
|
+
parsedBody,
|
|
489
|
+
exceptionCtor: __BaseException,
|
|
490
|
+
errorCode,
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
};
|
|
494
|
+
export const deserializeAws_restJson1DescribeRepositoryAssociationCommand = async (output, context) => {
|
|
495
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
496
|
+
return deserializeAws_restJson1DescribeRepositoryAssociationCommandError(output, context);
|
|
497
|
+
}
|
|
498
|
+
const contents = map({
|
|
499
|
+
$metadata: deserializeMetadata(output),
|
|
1073
500
|
});
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
501
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
502
|
+
if (data.RepositoryAssociation != null) {
|
|
503
|
+
contents.RepositoryAssociation = deserializeAws_restJson1RepositoryAssociation(data.RepositoryAssociation, context);
|
|
504
|
+
}
|
|
505
|
+
if (data.Tags != null) {
|
|
506
|
+
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
507
|
+
}
|
|
508
|
+
return contents;
|
|
509
|
+
};
|
|
510
|
+
const deserializeAws_restJson1DescribeRepositoryAssociationCommandError = async (output, context) => {
|
|
511
|
+
const parsedOutput = {
|
|
512
|
+
...output,
|
|
513
|
+
body: await parseErrorBody(output.body, context),
|
|
514
|
+
};
|
|
515
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
516
|
+
switch (errorCode) {
|
|
517
|
+
case "AccessDeniedException":
|
|
518
|
+
case "com.amazonaws.codegurureviewer#AccessDeniedException":
|
|
519
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
520
|
+
case "InternalServerException":
|
|
521
|
+
case "com.amazonaws.codegurureviewer#InternalServerException":
|
|
522
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
523
|
+
case "NotFoundException":
|
|
524
|
+
case "com.amazonaws.codegurureviewer#NotFoundException":
|
|
525
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
526
|
+
case "ThrottlingException":
|
|
527
|
+
case "com.amazonaws.codegurureviewer#ThrottlingException":
|
|
528
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
529
|
+
case "ValidationException":
|
|
530
|
+
case "com.amazonaws.codegurureviewer#ValidationException":
|
|
531
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
532
|
+
default:
|
|
533
|
+
const parsedBody = parsedOutput.body;
|
|
534
|
+
throwDefaultError({
|
|
535
|
+
output,
|
|
536
|
+
parsedBody,
|
|
537
|
+
exceptionCtor: __BaseException,
|
|
538
|
+
errorCode,
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
};
|
|
542
|
+
export const deserializeAws_restJson1DisassociateRepositoryCommand = async (output, context) => {
|
|
543
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
544
|
+
return deserializeAws_restJson1DisassociateRepositoryCommandError(output, context);
|
|
545
|
+
}
|
|
546
|
+
const contents = map({
|
|
547
|
+
$metadata: deserializeMetadata(output),
|
|
1114
548
|
});
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
549
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
550
|
+
if (data.RepositoryAssociation != null) {
|
|
551
|
+
contents.RepositoryAssociation = deserializeAws_restJson1RepositoryAssociation(data.RepositoryAssociation, context);
|
|
552
|
+
}
|
|
553
|
+
if (data.Tags != null) {
|
|
554
|
+
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
555
|
+
}
|
|
556
|
+
return contents;
|
|
557
|
+
};
|
|
558
|
+
const deserializeAws_restJson1DisassociateRepositoryCommandError = async (output, context) => {
|
|
559
|
+
const parsedOutput = {
|
|
560
|
+
...output,
|
|
561
|
+
body: await parseErrorBody(output.body, context),
|
|
562
|
+
};
|
|
563
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
564
|
+
switch (errorCode) {
|
|
565
|
+
case "AccessDeniedException":
|
|
566
|
+
case "com.amazonaws.codegurureviewer#AccessDeniedException":
|
|
567
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
568
|
+
case "ConflictException":
|
|
569
|
+
case "com.amazonaws.codegurureviewer#ConflictException":
|
|
570
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
571
|
+
case "InternalServerException":
|
|
572
|
+
case "com.amazonaws.codegurureviewer#InternalServerException":
|
|
573
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
574
|
+
case "NotFoundException":
|
|
575
|
+
case "com.amazonaws.codegurureviewer#NotFoundException":
|
|
576
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
577
|
+
case "ThrottlingException":
|
|
578
|
+
case "com.amazonaws.codegurureviewer#ThrottlingException":
|
|
579
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
580
|
+
case "ValidationException":
|
|
581
|
+
case "com.amazonaws.codegurureviewer#ValidationException":
|
|
582
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
583
|
+
default:
|
|
584
|
+
const parsedBody = parsedOutput.body;
|
|
585
|
+
throwDefaultError({
|
|
586
|
+
output,
|
|
587
|
+
parsedBody,
|
|
588
|
+
exceptionCtor: __BaseException,
|
|
589
|
+
errorCode,
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
};
|
|
593
|
+
export const deserializeAws_restJson1ListCodeReviewsCommand = async (output, context) => {
|
|
594
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
595
|
+
return deserializeAws_restJson1ListCodeReviewsCommandError(output, context);
|
|
596
|
+
}
|
|
597
|
+
const contents = map({
|
|
598
|
+
$metadata: deserializeMetadata(output),
|
|
1137
599
|
});
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
600
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
601
|
+
if (data.CodeReviewSummaries != null) {
|
|
602
|
+
contents.CodeReviewSummaries = deserializeAws_restJson1CodeReviewSummaries(data.CodeReviewSummaries, context);
|
|
603
|
+
}
|
|
604
|
+
if (data.NextToken != null) {
|
|
605
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
606
|
+
}
|
|
607
|
+
return contents;
|
|
608
|
+
};
|
|
609
|
+
const deserializeAws_restJson1ListCodeReviewsCommandError = async (output, context) => {
|
|
610
|
+
const parsedOutput = {
|
|
611
|
+
...output,
|
|
612
|
+
body: await parseErrorBody(output.body, context),
|
|
613
|
+
};
|
|
614
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
615
|
+
switch (errorCode) {
|
|
616
|
+
case "AccessDeniedException":
|
|
617
|
+
case "com.amazonaws.codegurureviewer#AccessDeniedException":
|
|
618
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
619
|
+
case "InternalServerException":
|
|
620
|
+
case "com.amazonaws.codegurureviewer#InternalServerException":
|
|
621
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
622
|
+
case "ThrottlingException":
|
|
623
|
+
case "com.amazonaws.codegurureviewer#ThrottlingException":
|
|
624
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
625
|
+
case "ValidationException":
|
|
626
|
+
case "com.amazonaws.codegurureviewer#ValidationException":
|
|
627
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
628
|
+
default:
|
|
629
|
+
const parsedBody = parsedOutput.body;
|
|
630
|
+
throwDefaultError({
|
|
631
|
+
output,
|
|
632
|
+
parsedBody,
|
|
633
|
+
exceptionCtor: __BaseException,
|
|
634
|
+
errorCode,
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
};
|
|
638
|
+
export const deserializeAws_restJson1ListRecommendationFeedbackCommand = async (output, context) => {
|
|
639
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
640
|
+
return deserializeAws_restJson1ListRecommendationFeedbackCommandError(output, context);
|
|
641
|
+
}
|
|
642
|
+
const contents = map({
|
|
643
|
+
$metadata: deserializeMetadata(output),
|
|
1178
644
|
});
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
645
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
646
|
+
if (data.NextToken != null) {
|
|
647
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
648
|
+
}
|
|
649
|
+
if (data.RecommendationFeedbackSummaries != null) {
|
|
650
|
+
contents.RecommendationFeedbackSummaries = deserializeAws_restJson1RecommendationFeedbackSummaries(data.RecommendationFeedbackSummaries, context);
|
|
651
|
+
}
|
|
652
|
+
return contents;
|
|
653
|
+
};
|
|
654
|
+
const deserializeAws_restJson1ListRecommendationFeedbackCommandError = async (output, context) => {
|
|
655
|
+
const parsedOutput = {
|
|
656
|
+
...output,
|
|
657
|
+
body: await parseErrorBody(output.body, context),
|
|
658
|
+
};
|
|
659
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
660
|
+
switch (errorCode) {
|
|
661
|
+
case "AccessDeniedException":
|
|
662
|
+
case "com.amazonaws.codegurureviewer#AccessDeniedException":
|
|
663
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
664
|
+
case "InternalServerException":
|
|
665
|
+
case "com.amazonaws.codegurureviewer#InternalServerException":
|
|
666
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
667
|
+
case "ResourceNotFoundException":
|
|
668
|
+
case "com.amazonaws.codegurureviewer#ResourceNotFoundException":
|
|
669
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
670
|
+
case "ThrottlingException":
|
|
671
|
+
case "com.amazonaws.codegurureviewer#ThrottlingException":
|
|
672
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
673
|
+
case "ValidationException":
|
|
674
|
+
case "com.amazonaws.codegurureviewer#ValidationException":
|
|
675
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
676
|
+
default:
|
|
677
|
+
const parsedBody = parsedOutput.body;
|
|
678
|
+
throwDefaultError({
|
|
679
|
+
output,
|
|
680
|
+
parsedBody,
|
|
681
|
+
exceptionCtor: __BaseException,
|
|
682
|
+
errorCode,
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
};
|
|
686
|
+
export const deserializeAws_restJson1ListRecommendationsCommand = async (output, context) => {
|
|
687
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
688
|
+
return deserializeAws_restJson1ListRecommendationsCommandError(output, context);
|
|
689
|
+
}
|
|
690
|
+
const contents = map({
|
|
691
|
+
$metadata: deserializeMetadata(output),
|
|
1196
692
|
});
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
}
|
|
693
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
694
|
+
if (data.NextToken != null) {
|
|
695
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
696
|
+
}
|
|
697
|
+
if (data.RecommendationSummaries != null) {
|
|
698
|
+
contents.RecommendationSummaries = deserializeAws_restJson1RecommendationSummaries(data.RecommendationSummaries, context);
|
|
699
|
+
}
|
|
700
|
+
return contents;
|
|
701
|
+
};
|
|
702
|
+
const deserializeAws_restJson1ListRecommendationsCommandError = async (output, context) => {
|
|
703
|
+
const parsedOutput = {
|
|
704
|
+
...output,
|
|
705
|
+
body: await parseErrorBody(output.body, context),
|
|
706
|
+
};
|
|
707
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
708
|
+
switch (errorCode) {
|
|
709
|
+
case "AccessDeniedException":
|
|
710
|
+
case "com.amazonaws.codegurureviewer#AccessDeniedException":
|
|
711
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
712
|
+
case "InternalServerException":
|
|
713
|
+
case "com.amazonaws.codegurureviewer#InternalServerException":
|
|
714
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
715
|
+
case "ResourceNotFoundException":
|
|
716
|
+
case "com.amazonaws.codegurureviewer#ResourceNotFoundException":
|
|
717
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
718
|
+
case "ThrottlingException":
|
|
719
|
+
case "com.amazonaws.codegurureviewer#ThrottlingException":
|
|
720
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
721
|
+
case "ValidationException":
|
|
722
|
+
case "com.amazonaws.codegurureviewer#ValidationException":
|
|
723
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
724
|
+
default:
|
|
725
|
+
const parsedBody = parsedOutput.body;
|
|
726
|
+
throwDefaultError({
|
|
727
|
+
output,
|
|
728
|
+
parsedBody,
|
|
729
|
+
exceptionCtor: __BaseException,
|
|
730
|
+
errorCode,
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
};
|
|
734
|
+
export const deserializeAws_restJson1ListRepositoryAssociationsCommand = async (output, context) => {
|
|
735
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
736
|
+
return deserializeAws_restJson1ListRepositoryAssociationsCommandError(output, context);
|
|
737
|
+
}
|
|
738
|
+
const contents = map({
|
|
739
|
+
$metadata: deserializeMetadata(output),
|
|
1245
740
|
});
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
741
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
742
|
+
if (data.NextToken != null) {
|
|
743
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
744
|
+
}
|
|
745
|
+
if (data.RepositoryAssociationSummaries != null) {
|
|
746
|
+
contents.RepositoryAssociationSummaries = deserializeAws_restJson1RepositoryAssociationSummaries(data.RepositoryAssociationSummaries, context);
|
|
747
|
+
}
|
|
748
|
+
return contents;
|
|
749
|
+
};
|
|
750
|
+
const deserializeAws_restJson1ListRepositoryAssociationsCommandError = async (output, context) => {
|
|
751
|
+
const parsedOutput = {
|
|
752
|
+
...output,
|
|
753
|
+
body: await parseErrorBody(output.body, context),
|
|
754
|
+
};
|
|
755
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
756
|
+
switch (errorCode) {
|
|
757
|
+
case "InternalServerException":
|
|
758
|
+
case "com.amazonaws.codegurureviewer#InternalServerException":
|
|
759
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
760
|
+
case "ThrottlingException":
|
|
761
|
+
case "com.amazonaws.codegurureviewer#ThrottlingException":
|
|
762
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
763
|
+
case "ValidationException":
|
|
764
|
+
case "com.amazonaws.codegurureviewer#ValidationException":
|
|
765
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
766
|
+
default:
|
|
767
|
+
const parsedBody = parsedOutput.body;
|
|
768
|
+
throwDefaultError({
|
|
769
|
+
output,
|
|
770
|
+
parsedBody,
|
|
771
|
+
exceptionCtor: __BaseException,
|
|
772
|
+
errorCode,
|
|
773
|
+
});
|
|
774
|
+
}
|
|
775
|
+
};
|
|
776
|
+
export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
777
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
778
|
+
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
779
|
+
}
|
|
780
|
+
const contents = map({
|
|
781
|
+
$metadata: deserializeMetadata(output),
|
|
1263
782
|
});
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
return
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
case 9: return [2];
|
|
1303
|
-
}
|
|
783
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
784
|
+
if (data.Tags != null) {
|
|
785
|
+
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
786
|
+
}
|
|
787
|
+
return contents;
|
|
788
|
+
};
|
|
789
|
+
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
790
|
+
const parsedOutput = {
|
|
791
|
+
...output,
|
|
792
|
+
body: await parseErrorBody(output.body, context),
|
|
793
|
+
};
|
|
794
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
795
|
+
switch (errorCode) {
|
|
796
|
+
case "InternalServerException":
|
|
797
|
+
case "com.amazonaws.codegurureviewer#InternalServerException":
|
|
798
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
799
|
+
case "ResourceNotFoundException":
|
|
800
|
+
case "com.amazonaws.codegurureviewer#ResourceNotFoundException":
|
|
801
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
802
|
+
case "ValidationException":
|
|
803
|
+
case "com.amazonaws.codegurureviewer#ValidationException":
|
|
804
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
805
|
+
default:
|
|
806
|
+
const parsedBody = parsedOutput.body;
|
|
807
|
+
throwDefaultError({
|
|
808
|
+
output,
|
|
809
|
+
parsedBody,
|
|
810
|
+
exceptionCtor: __BaseException,
|
|
811
|
+
errorCode,
|
|
812
|
+
});
|
|
813
|
+
}
|
|
814
|
+
};
|
|
815
|
+
export const deserializeAws_restJson1PutRecommendationFeedbackCommand = async (output, context) => {
|
|
816
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
817
|
+
return deserializeAws_restJson1PutRecommendationFeedbackCommandError(output, context);
|
|
818
|
+
}
|
|
819
|
+
const contents = map({
|
|
820
|
+
$metadata: deserializeMetadata(output),
|
|
1304
821
|
});
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
822
|
+
await collectBody(output.body, context);
|
|
823
|
+
return contents;
|
|
824
|
+
};
|
|
825
|
+
const deserializeAws_restJson1PutRecommendationFeedbackCommandError = async (output, context) => {
|
|
826
|
+
const parsedOutput = {
|
|
827
|
+
...output,
|
|
828
|
+
body: await parseErrorBody(output.body, context),
|
|
829
|
+
};
|
|
830
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
831
|
+
switch (errorCode) {
|
|
832
|
+
case "AccessDeniedException":
|
|
833
|
+
case "com.amazonaws.codegurureviewer#AccessDeniedException":
|
|
834
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
835
|
+
case "InternalServerException":
|
|
836
|
+
case "com.amazonaws.codegurureviewer#InternalServerException":
|
|
837
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
838
|
+
case "ResourceNotFoundException":
|
|
839
|
+
case "com.amazonaws.codegurureviewer#ResourceNotFoundException":
|
|
840
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
841
|
+
case "ThrottlingException":
|
|
842
|
+
case "com.amazonaws.codegurureviewer#ThrottlingException":
|
|
843
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
844
|
+
case "ValidationException":
|
|
845
|
+
case "com.amazonaws.codegurureviewer#ValidationException":
|
|
846
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
847
|
+
default:
|
|
848
|
+
const parsedBody = parsedOutput.body;
|
|
849
|
+
throwDefaultError({
|
|
850
|
+
output,
|
|
851
|
+
parsedBody,
|
|
852
|
+
exceptionCtor: __BaseException,
|
|
853
|
+
errorCode,
|
|
854
|
+
});
|
|
855
|
+
}
|
|
856
|
+
};
|
|
857
|
+
export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
858
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
859
|
+
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
860
|
+
}
|
|
861
|
+
const contents = map({
|
|
862
|
+
$metadata: deserializeMetadata(output),
|
|
1322
863
|
});
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
errorCode: errorCode,
|
|
1359
|
-
});
|
|
1360
|
-
_d.label = 9;
|
|
1361
|
-
case 9: return [2];
|
|
1362
|
-
}
|
|
864
|
+
await collectBody(output.body, context);
|
|
865
|
+
return contents;
|
|
866
|
+
};
|
|
867
|
+
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
868
|
+
const parsedOutput = {
|
|
869
|
+
...output,
|
|
870
|
+
body: await parseErrorBody(output.body, context),
|
|
871
|
+
};
|
|
872
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
873
|
+
switch (errorCode) {
|
|
874
|
+
case "InternalServerException":
|
|
875
|
+
case "com.amazonaws.codegurureviewer#InternalServerException":
|
|
876
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
877
|
+
case "ResourceNotFoundException":
|
|
878
|
+
case "com.amazonaws.codegurureviewer#ResourceNotFoundException":
|
|
879
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
880
|
+
case "ValidationException":
|
|
881
|
+
case "com.amazonaws.codegurureviewer#ValidationException":
|
|
882
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
883
|
+
default:
|
|
884
|
+
const parsedBody = parsedOutput.body;
|
|
885
|
+
throwDefaultError({
|
|
886
|
+
output,
|
|
887
|
+
parsedBody,
|
|
888
|
+
exceptionCtor: __BaseException,
|
|
889
|
+
errorCode,
|
|
890
|
+
});
|
|
891
|
+
}
|
|
892
|
+
};
|
|
893
|
+
export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
894
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
895
|
+
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
896
|
+
}
|
|
897
|
+
const contents = map({
|
|
898
|
+
$metadata: deserializeMetadata(output),
|
|
1363
899
|
});
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
900
|
+
await collectBody(output.body, context);
|
|
901
|
+
return contents;
|
|
902
|
+
};
|
|
903
|
+
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
904
|
+
const parsedOutput = {
|
|
905
|
+
...output,
|
|
906
|
+
body: await parseErrorBody(output.body, context),
|
|
907
|
+
};
|
|
908
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
909
|
+
switch (errorCode) {
|
|
910
|
+
case "InternalServerException":
|
|
911
|
+
case "com.amazonaws.codegurureviewer#InternalServerException":
|
|
912
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
913
|
+
case "ResourceNotFoundException":
|
|
914
|
+
case "com.amazonaws.codegurureviewer#ResourceNotFoundException":
|
|
915
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
916
|
+
case "ValidationException":
|
|
917
|
+
case "com.amazonaws.codegurureviewer#ValidationException":
|
|
918
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
919
|
+
default:
|
|
920
|
+
const parsedBody = parsedOutput.body;
|
|
921
|
+
throwDefaultError({
|
|
922
|
+
output,
|
|
923
|
+
parsedBody,
|
|
924
|
+
exceptionCtor: __BaseException,
|
|
925
|
+
errorCode,
|
|
926
|
+
});
|
|
927
|
+
}
|
|
928
|
+
};
|
|
929
|
+
const map = __map;
|
|
930
|
+
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
931
|
+
const contents = map({});
|
|
932
|
+
const data = parsedOutput.body;
|
|
933
|
+
if (data.Message != null) {
|
|
934
|
+
contents.Message = __expectString(data.Message);
|
|
935
|
+
}
|
|
936
|
+
const exception = new AccessDeniedException({
|
|
937
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
938
|
+
...contents,
|
|
1376
939
|
});
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
940
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
941
|
+
};
|
|
942
|
+
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
943
|
+
const contents = map({});
|
|
944
|
+
const data = parsedOutput.body;
|
|
945
|
+
if (data.Message != null) {
|
|
946
|
+
contents.Message = __expectString(data.Message);
|
|
947
|
+
}
|
|
948
|
+
const exception = new ConflictException({
|
|
949
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
950
|
+
...contents,
|
|
1388
951
|
});
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
952
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
953
|
+
};
|
|
954
|
+
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
955
|
+
const contents = map({});
|
|
956
|
+
const data = parsedOutput.body;
|
|
957
|
+
if (data.Message != null) {
|
|
958
|
+
contents.Message = __expectString(data.Message);
|
|
959
|
+
}
|
|
960
|
+
const exception = new InternalServerException({
|
|
961
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
962
|
+
...contents,
|
|
1400
963
|
});
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
964
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
965
|
+
};
|
|
966
|
+
const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
967
|
+
const contents = map({});
|
|
968
|
+
const data = parsedOutput.body;
|
|
969
|
+
if (data.Message != null) {
|
|
970
|
+
contents.Message = __expectString(data.Message);
|
|
971
|
+
}
|
|
972
|
+
const exception = new NotFoundException({
|
|
973
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
974
|
+
...contents,
|
|
1412
975
|
});
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
976
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
977
|
+
};
|
|
978
|
+
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
979
|
+
const contents = map({});
|
|
980
|
+
const data = parsedOutput.body;
|
|
981
|
+
if (data.Message != null) {
|
|
982
|
+
contents.Message = __expectString(data.Message);
|
|
983
|
+
}
|
|
984
|
+
const exception = new ResourceNotFoundException({
|
|
985
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
986
|
+
...contents,
|
|
1424
987
|
});
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
988
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
989
|
+
};
|
|
990
|
+
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
991
|
+
const contents = map({});
|
|
992
|
+
const data = parsedOutput.body;
|
|
993
|
+
if (data.Message != null) {
|
|
994
|
+
contents.Message = __expectString(data.Message);
|
|
995
|
+
}
|
|
996
|
+
const exception = new ThrottlingException({
|
|
997
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
998
|
+
...contents,
|
|
1436
999
|
});
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1000
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1001
|
+
};
|
|
1002
|
+
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
1003
|
+
const contents = map({});
|
|
1004
|
+
const data = parsedOutput.body;
|
|
1005
|
+
if (data.Message != null) {
|
|
1006
|
+
contents.Message = __expectString(data.Message);
|
|
1007
|
+
}
|
|
1008
|
+
const exception = new ValidationException({
|
|
1009
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1010
|
+
...contents,
|
|
1448
1011
|
});
|
|
1449
|
-
|
|
1450
|
-
|
|
1012
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1013
|
+
};
|
|
1014
|
+
const serializeAws_restJson1AnalysisTypes = (input, context) => {
|
|
1451
1015
|
return input
|
|
1452
|
-
.filter(
|
|
1453
|
-
.map(
|
|
1016
|
+
.filter((e) => e != null)
|
|
1017
|
+
.map((entry) => {
|
|
1454
1018
|
return entry;
|
|
1455
1019
|
});
|
|
1456
1020
|
};
|
|
1457
|
-
|
|
1458
|
-
return
|
|
1021
|
+
const serializeAws_restJson1BranchDiffSourceCodeType = (input, context) => {
|
|
1022
|
+
return {
|
|
1023
|
+
...(input.DestinationBranchName != null && { DestinationBranchName: input.DestinationBranchName }),
|
|
1024
|
+
...(input.SourceBranchName != null && { SourceBranchName: input.SourceBranchName }),
|
|
1025
|
+
};
|
|
1459
1026
|
};
|
|
1460
|
-
|
|
1461
|
-
return
|
|
1462
|
-
|
|
1463
|
-
|
|
1027
|
+
const serializeAws_restJson1CodeArtifacts = (input, context) => {
|
|
1028
|
+
return {
|
|
1029
|
+
...(input.BuildArtifactsObjectKey != null && { BuildArtifactsObjectKey: input.BuildArtifactsObjectKey }),
|
|
1030
|
+
...(input.SourceCodeArtifactsObjectKey != null && {
|
|
1031
|
+
SourceCodeArtifactsObjectKey: input.SourceCodeArtifactsObjectKey,
|
|
1032
|
+
}),
|
|
1033
|
+
};
|
|
1464
1034
|
};
|
|
1465
|
-
|
|
1466
|
-
return
|
|
1035
|
+
const serializeAws_restJson1CodeCommitRepository = (input, context) => {
|
|
1036
|
+
return {
|
|
1037
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1038
|
+
};
|
|
1467
1039
|
};
|
|
1468
|
-
|
|
1469
|
-
return
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1040
|
+
const serializeAws_restJson1CodeReviewType = (input, context) => {
|
|
1041
|
+
return {
|
|
1042
|
+
...(input.AnalysisTypes != null && {
|
|
1043
|
+
AnalysisTypes: serializeAws_restJson1AnalysisTypes(input.AnalysisTypes, context),
|
|
1044
|
+
}),
|
|
1045
|
+
...(input.RepositoryAnalysis != null && {
|
|
1046
|
+
RepositoryAnalysis: serializeAws_restJson1RepositoryAnalysis(input.RepositoryAnalysis, context),
|
|
1047
|
+
}),
|
|
1048
|
+
};
|
|
1474
1049
|
};
|
|
1475
|
-
|
|
1476
|
-
return
|
|
1050
|
+
const serializeAws_restJson1CommitDiffSourceCodeType = (input, context) => {
|
|
1051
|
+
return {
|
|
1052
|
+
...(input.DestinationCommit != null && { DestinationCommit: input.DestinationCommit }),
|
|
1053
|
+
...(input.MergeBaseCommit != null && { MergeBaseCommit: input.MergeBaseCommit }),
|
|
1054
|
+
...(input.SourceCommit != null && { SourceCommit: input.SourceCommit }),
|
|
1055
|
+
};
|
|
1477
1056
|
};
|
|
1478
|
-
|
|
1479
|
-
return
|
|
1057
|
+
const serializeAws_restJson1EventInfo = (input, context) => {
|
|
1058
|
+
return {
|
|
1059
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1060
|
+
...(input.State != null && { State: input.State }),
|
|
1061
|
+
};
|
|
1480
1062
|
};
|
|
1481
|
-
|
|
1482
|
-
return
|
|
1063
|
+
const serializeAws_restJson1KMSKeyDetails = (input, context) => {
|
|
1064
|
+
return {
|
|
1065
|
+
...(input.EncryptionOption != null && { EncryptionOption: input.EncryptionOption }),
|
|
1066
|
+
...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }),
|
|
1067
|
+
};
|
|
1483
1068
|
};
|
|
1484
|
-
|
|
1069
|
+
const serializeAws_restJson1Reactions = (input, context) => {
|
|
1485
1070
|
return input
|
|
1486
|
-
.filter(
|
|
1487
|
-
.map(
|
|
1071
|
+
.filter((e) => e != null)
|
|
1072
|
+
.map((entry) => {
|
|
1488
1073
|
return entry;
|
|
1489
1074
|
});
|
|
1490
1075
|
};
|
|
1491
|
-
|
|
1492
|
-
return
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
}
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
}
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
};
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1076
|
+
const serializeAws_restJson1Repository = (input, context) => {
|
|
1077
|
+
return {
|
|
1078
|
+
...(input.Bitbucket != null && {
|
|
1079
|
+
Bitbucket: serializeAws_restJson1ThirdPartySourceRepository(input.Bitbucket, context),
|
|
1080
|
+
}),
|
|
1081
|
+
...(input.CodeCommit != null && {
|
|
1082
|
+
CodeCommit: serializeAws_restJson1CodeCommitRepository(input.CodeCommit, context),
|
|
1083
|
+
}),
|
|
1084
|
+
...(input.GitHubEnterpriseServer != null && {
|
|
1085
|
+
GitHubEnterpriseServer: serializeAws_restJson1ThirdPartySourceRepository(input.GitHubEnterpriseServer, context),
|
|
1086
|
+
}),
|
|
1087
|
+
...(input.S3Bucket != null && { S3Bucket: serializeAws_restJson1S3Repository(input.S3Bucket, context) }),
|
|
1088
|
+
};
|
|
1089
|
+
};
|
|
1090
|
+
const serializeAws_restJson1RepositoryAnalysis = (input, context) => {
|
|
1091
|
+
return {
|
|
1092
|
+
...(input.RepositoryHead != null && {
|
|
1093
|
+
RepositoryHead: serializeAws_restJson1RepositoryHeadSourceCodeType(input.RepositoryHead, context),
|
|
1094
|
+
}),
|
|
1095
|
+
...(input.SourceCodeType != null && {
|
|
1096
|
+
SourceCodeType: serializeAws_restJson1SourceCodeType(input.SourceCodeType, context),
|
|
1097
|
+
}),
|
|
1098
|
+
};
|
|
1099
|
+
};
|
|
1100
|
+
const serializeAws_restJson1RepositoryHeadSourceCodeType = (input, context) => {
|
|
1101
|
+
return {
|
|
1102
|
+
...(input.BranchName != null && { BranchName: input.BranchName }),
|
|
1103
|
+
};
|
|
1104
|
+
};
|
|
1105
|
+
const serializeAws_restJson1RequestMetadata = (input, context) => {
|
|
1106
|
+
return {
|
|
1107
|
+
...(input.EventInfo != null && { EventInfo: serializeAws_restJson1EventInfo(input.EventInfo, context) }),
|
|
1108
|
+
...(input.RequestId != null && { RequestId: input.RequestId }),
|
|
1109
|
+
...(input.Requester != null && { Requester: input.Requester }),
|
|
1110
|
+
...(input.VendorName != null && { VendorName: input.VendorName }),
|
|
1111
|
+
};
|
|
1112
|
+
};
|
|
1113
|
+
const serializeAws_restJson1S3BucketRepository = (input, context) => {
|
|
1114
|
+
return {
|
|
1115
|
+
...(input.Details != null && { Details: serializeAws_restJson1S3RepositoryDetails(input.Details, context) }),
|
|
1116
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1117
|
+
};
|
|
1118
|
+
};
|
|
1119
|
+
const serializeAws_restJson1S3Repository = (input, context) => {
|
|
1120
|
+
return {
|
|
1121
|
+
...(input.BucketName != null && { BucketName: input.BucketName }),
|
|
1122
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1123
|
+
};
|
|
1124
|
+
};
|
|
1125
|
+
const serializeAws_restJson1S3RepositoryDetails = (input, context) => {
|
|
1126
|
+
return {
|
|
1127
|
+
...(input.BucketName != null && { BucketName: input.BucketName }),
|
|
1128
|
+
...(input.CodeArtifacts != null && {
|
|
1129
|
+
CodeArtifacts: serializeAws_restJson1CodeArtifacts(input.CodeArtifacts, context),
|
|
1130
|
+
}),
|
|
1131
|
+
};
|
|
1132
|
+
};
|
|
1133
|
+
const serializeAws_restJson1SourceCodeType = (input, context) => {
|
|
1134
|
+
return {
|
|
1135
|
+
...(input.BranchDiff != null && {
|
|
1136
|
+
BranchDiff: serializeAws_restJson1BranchDiffSourceCodeType(input.BranchDiff, context),
|
|
1137
|
+
}),
|
|
1138
|
+
...(input.CommitDiff != null && {
|
|
1139
|
+
CommitDiff: serializeAws_restJson1CommitDiffSourceCodeType(input.CommitDiff, context),
|
|
1140
|
+
}),
|
|
1141
|
+
...(input.RepositoryHead != null && {
|
|
1142
|
+
RepositoryHead: serializeAws_restJson1RepositoryHeadSourceCodeType(input.RepositoryHead, context),
|
|
1143
|
+
}),
|
|
1144
|
+
...(input.RequestMetadata != null && {
|
|
1145
|
+
RequestMetadata: serializeAws_restJson1RequestMetadata(input.RequestMetadata, context),
|
|
1146
|
+
}),
|
|
1147
|
+
...(input.S3BucketRepository != null && {
|
|
1148
|
+
S3BucketRepository: serializeAws_restJson1S3BucketRepository(input.S3BucketRepository, context),
|
|
1149
|
+
}),
|
|
1150
|
+
};
|
|
1151
|
+
};
|
|
1152
|
+
const serializeAws_restJson1TagMap = (input, context) => {
|
|
1153
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1541
1154
|
if (value === null) {
|
|
1542
1155
|
return acc;
|
|
1543
1156
|
}
|
|
1544
|
-
return
|
|
1157
|
+
return {
|
|
1158
|
+
...acc,
|
|
1159
|
+
[key]: value,
|
|
1160
|
+
};
|
|
1545
1161
|
}, {});
|
|
1546
1162
|
};
|
|
1547
|
-
|
|
1548
|
-
return
|
|
1163
|
+
const serializeAws_restJson1ThirdPartySourceRepository = (input, context) => {
|
|
1164
|
+
return {
|
|
1165
|
+
...(input.ConnectionArn != null && { ConnectionArn: input.ConnectionArn }),
|
|
1166
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1167
|
+
...(input.Owner != null && { Owner: input.Owner }),
|
|
1168
|
+
};
|
|
1549
1169
|
};
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
.filter(
|
|
1553
|
-
.map(
|
|
1170
|
+
const deserializeAws_restJson1AnalysisTypes = (output, context) => {
|
|
1171
|
+
const retVal = (output || [])
|
|
1172
|
+
.filter((e) => e != null)
|
|
1173
|
+
.map((entry) => {
|
|
1554
1174
|
if (entry === null) {
|
|
1555
1175
|
return null;
|
|
1556
1176
|
}
|
|
@@ -1558,19 +1178,19 @@ var deserializeAws_restJson1AnalysisTypes = function (output, context) {
|
|
|
1558
1178
|
});
|
|
1559
1179
|
return retVal;
|
|
1560
1180
|
};
|
|
1561
|
-
|
|
1181
|
+
const deserializeAws_restJson1BranchDiffSourceCodeType = (output, context) => {
|
|
1562
1182
|
return {
|
|
1563
1183
|
DestinationBranchName: __expectString(output.DestinationBranchName),
|
|
1564
1184
|
SourceBranchName: __expectString(output.SourceBranchName),
|
|
1565
1185
|
};
|
|
1566
1186
|
};
|
|
1567
|
-
|
|
1187
|
+
const deserializeAws_restJson1CodeArtifacts = (output, context) => {
|
|
1568
1188
|
return {
|
|
1569
1189
|
BuildArtifactsObjectKey: __expectString(output.BuildArtifactsObjectKey),
|
|
1570
1190
|
SourceCodeArtifactsObjectKey: __expectString(output.SourceCodeArtifactsObjectKey),
|
|
1571
1191
|
};
|
|
1572
1192
|
};
|
|
1573
|
-
|
|
1193
|
+
const deserializeAws_restJson1CodeReview = (output, context) => {
|
|
1574
1194
|
return {
|
|
1575
1195
|
AnalysisTypes: output.AnalysisTypes != null ? deserializeAws_restJson1AnalysisTypes(output.AnalysisTypes, context) : undefined,
|
|
1576
1196
|
AssociationArn: __expectString(output.AssociationArn),
|
|
@@ -1596,10 +1216,10 @@ var deserializeAws_restJson1CodeReview = function (output, context) {
|
|
|
1596
1216
|
Type: __expectString(output.Type),
|
|
1597
1217
|
};
|
|
1598
1218
|
};
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
.filter(
|
|
1602
|
-
.map(
|
|
1219
|
+
const deserializeAws_restJson1CodeReviewSummaries = (output, context) => {
|
|
1220
|
+
const retVal = (output || [])
|
|
1221
|
+
.filter((e) => e != null)
|
|
1222
|
+
.map((entry) => {
|
|
1603
1223
|
if (entry === null) {
|
|
1604
1224
|
return null;
|
|
1605
1225
|
}
|
|
@@ -1607,7 +1227,7 @@ var deserializeAws_restJson1CodeReviewSummaries = function (output, context) {
|
|
|
1607
1227
|
});
|
|
1608
1228
|
return retVal;
|
|
1609
1229
|
};
|
|
1610
|
-
|
|
1230
|
+
const deserializeAws_restJson1CodeReviewSummary = (output, context) => {
|
|
1611
1231
|
return {
|
|
1612
1232
|
CodeReviewArn: __expectString(output.CodeReviewArn),
|
|
1613
1233
|
CreatedTimeStamp: output.CreatedTimeStamp != null
|
|
@@ -1631,43 +1251,43 @@ var deserializeAws_restJson1CodeReviewSummary = function (output, context) {
|
|
|
1631
1251
|
Type: __expectString(output.Type),
|
|
1632
1252
|
};
|
|
1633
1253
|
};
|
|
1634
|
-
|
|
1254
|
+
const deserializeAws_restJson1CommitDiffSourceCodeType = (output, context) => {
|
|
1635
1255
|
return {
|
|
1636
1256
|
DestinationCommit: __expectString(output.DestinationCommit),
|
|
1637
1257
|
MergeBaseCommit: __expectString(output.MergeBaseCommit),
|
|
1638
1258
|
SourceCommit: __expectString(output.SourceCommit),
|
|
1639
1259
|
};
|
|
1640
1260
|
};
|
|
1641
|
-
|
|
1261
|
+
const deserializeAws_restJson1EventInfo = (output, context) => {
|
|
1642
1262
|
return {
|
|
1643
1263
|
Name: __expectString(output.Name),
|
|
1644
1264
|
State: __expectString(output.State),
|
|
1645
1265
|
};
|
|
1646
1266
|
};
|
|
1647
|
-
|
|
1267
|
+
const deserializeAws_restJson1KMSKeyDetails = (output, context) => {
|
|
1648
1268
|
return {
|
|
1649
1269
|
EncryptionOption: __expectString(output.EncryptionOption),
|
|
1650
1270
|
KMSKeyId: __expectString(output.KMSKeyId),
|
|
1651
1271
|
};
|
|
1652
1272
|
};
|
|
1653
|
-
|
|
1273
|
+
const deserializeAws_restJson1Metrics = (output, context) => {
|
|
1654
1274
|
return {
|
|
1655
1275
|
FindingsCount: __expectLong(output.FindingsCount),
|
|
1656
1276
|
MeteredLinesOfCodeCount: __expectLong(output.MeteredLinesOfCodeCount),
|
|
1657
1277
|
SuppressedLinesOfCodeCount: __expectLong(output.SuppressedLinesOfCodeCount),
|
|
1658
1278
|
};
|
|
1659
1279
|
};
|
|
1660
|
-
|
|
1280
|
+
const deserializeAws_restJson1MetricsSummary = (output, context) => {
|
|
1661
1281
|
return {
|
|
1662
1282
|
FindingsCount: __expectLong(output.FindingsCount),
|
|
1663
1283
|
MeteredLinesOfCodeCount: __expectLong(output.MeteredLinesOfCodeCount),
|
|
1664
1284
|
SuppressedLinesOfCodeCount: __expectLong(output.SuppressedLinesOfCodeCount),
|
|
1665
1285
|
};
|
|
1666
1286
|
};
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
.filter(
|
|
1670
|
-
.map(
|
|
1287
|
+
const deserializeAws_restJson1Reactions = (output, context) => {
|
|
1288
|
+
const retVal = (output || [])
|
|
1289
|
+
.filter((e) => e != null)
|
|
1290
|
+
.map((entry) => {
|
|
1671
1291
|
if (entry === null) {
|
|
1672
1292
|
return null;
|
|
1673
1293
|
}
|
|
@@ -1675,7 +1295,7 @@ var deserializeAws_restJson1Reactions = function (output, context) {
|
|
|
1675
1295
|
});
|
|
1676
1296
|
return retVal;
|
|
1677
1297
|
};
|
|
1678
|
-
|
|
1298
|
+
const deserializeAws_restJson1RecommendationFeedback = (output, context) => {
|
|
1679
1299
|
return {
|
|
1680
1300
|
CodeReviewArn: __expectString(output.CodeReviewArn),
|
|
1681
1301
|
CreatedTimeStamp: output.CreatedTimeStamp != null
|
|
@@ -1689,10 +1309,10 @@ var deserializeAws_restJson1RecommendationFeedback = function (output, context)
|
|
|
1689
1309
|
UserId: __expectString(output.UserId),
|
|
1690
1310
|
};
|
|
1691
1311
|
};
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
.filter(
|
|
1695
|
-
.map(
|
|
1312
|
+
const deserializeAws_restJson1RecommendationFeedbackSummaries = (output, context) => {
|
|
1313
|
+
const retVal = (output || [])
|
|
1314
|
+
.filter((e) => e != null)
|
|
1315
|
+
.map((entry) => {
|
|
1696
1316
|
if (entry === null) {
|
|
1697
1317
|
return null;
|
|
1698
1318
|
}
|
|
@@ -1700,17 +1320,17 @@ var deserializeAws_restJson1RecommendationFeedbackSummaries = function (output,
|
|
|
1700
1320
|
});
|
|
1701
1321
|
return retVal;
|
|
1702
1322
|
};
|
|
1703
|
-
|
|
1323
|
+
const deserializeAws_restJson1RecommendationFeedbackSummary = (output, context) => {
|
|
1704
1324
|
return {
|
|
1705
1325
|
Reactions: output.Reactions != null ? deserializeAws_restJson1Reactions(output.Reactions, context) : undefined,
|
|
1706
1326
|
RecommendationId: __expectString(output.RecommendationId),
|
|
1707
1327
|
UserId: __expectString(output.UserId),
|
|
1708
1328
|
};
|
|
1709
1329
|
};
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
.filter(
|
|
1713
|
-
.map(
|
|
1330
|
+
const deserializeAws_restJson1RecommendationSummaries = (output, context) => {
|
|
1331
|
+
const retVal = (output || [])
|
|
1332
|
+
.filter((e) => e != null)
|
|
1333
|
+
.map((entry) => {
|
|
1714
1334
|
if (entry === null) {
|
|
1715
1335
|
return null;
|
|
1716
1336
|
}
|
|
@@ -1718,7 +1338,7 @@ var deserializeAws_restJson1RecommendationSummaries = function (output, context)
|
|
|
1718
1338
|
});
|
|
1719
1339
|
return retVal;
|
|
1720
1340
|
};
|
|
1721
|
-
|
|
1341
|
+
const deserializeAws_restJson1RecommendationSummary = (output, context) => {
|
|
1722
1342
|
return {
|
|
1723
1343
|
Description: __expectString(output.Description),
|
|
1724
1344
|
EndLine: __expectInt32(output.EndLine),
|
|
@@ -1730,7 +1350,7 @@ var deserializeAws_restJson1RecommendationSummary = function (output, context) {
|
|
|
1730
1350
|
StartLine: __expectInt32(output.StartLine),
|
|
1731
1351
|
};
|
|
1732
1352
|
};
|
|
1733
|
-
|
|
1353
|
+
const deserializeAws_restJson1RepositoryAssociation = (output, context) => {
|
|
1734
1354
|
return {
|
|
1735
1355
|
AssociationArn: __expectString(output.AssociationArn),
|
|
1736
1356
|
AssociationId: __expectString(output.AssociationId),
|
|
@@ -1752,10 +1372,10 @@ var deserializeAws_restJson1RepositoryAssociation = function (output, context) {
|
|
|
1752
1372
|
StateReason: __expectString(output.StateReason),
|
|
1753
1373
|
};
|
|
1754
1374
|
};
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
.filter(
|
|
1758
|
-
.map(
|
|
1375
|
+
const deserializeAws_restJson1RepositoryAssociationSummaries = (output, context) => {
|
|
1376
|
+
const retVal = (output || [])
|
|
1377
|
+
.filter((e) => e != null)
|
|
1378
|
+
.map((entry) => {
|
|
1759
1379
|
if (entry === null) {
|
|
1760
1380
|
return null;
|
|
1761
1381
|
}
|
|
@@ -1763,7 +1383,7 @@ var deserializeAws_restJson1RepositoryAssociationSummaries = function (output, c
|
|
|
1763
1383
|
});
|
|
1764
1384
|
return retVal;
|
|
1765
1385
|
};
|
|
1766
|
-
|
|
1386
|
+
const deserializeAws_restJson1RepositoryAssociationSummary = (output, context) => {
|
|
1767
1387
|
return {
|
|
1768
1388
|
AssociationArn: __expectString(output.AssociationArn),
|
|
1769
1389
|
AssociationId: __expectString(output.AssociationId),
|
|
@@ -1777,12 +1397,12 @@ var deserializeAws_restJson1RepositoryAssociationSummary = function (output, con
|
|
|
1777
1397
|
State: __expectString(output.State),
|
|
1778
1398
|
};
|
|
1779
1399
|
};
|
|
1780
|
-
|
|
1400
|
+
const deserializeAws_restJson1RepositoryHeadSourceCodeType = (output, context) => {
|
|
1781
1401
|
return {
|
|
1782
1402
|
BranchName: __expectString(output.BranchName),
|
|
1783
1403
|
};
|
|
1784
1404
|
};
|
|
1785
|
-
|
|
1405
|
+
const deserializeAws_restJson1RequestMetadata = (output, context) => {
|
|
1786
1406
|
return {
|
|
1787
1407
|
EventInfo: output.EventInfo != null ? deserializeAws_restJson1EventInfo(output.EventInfo, context) : undefined,
|
|
1788
1408
|
RequestId: __expectString(output.RequestId),
|
|
@@ -1790,7 +1410,7 @@ var deserializeAws_restJson1RequestMetadata = function (output, context) {
|
|
|
1790
1410
|
VendorName: __expectString(output.VendorName),
|
|
1791
1411
|
};
|
|
1792
1412
|
};
|
|
1793
|
-
|
|
1413
|
+
const deserializeAws_restJson1RuleMetadata = (output, context) => {
|
|
1794
1414
|
return {
|
|
1795
1415
|
LongDescription: __expectString(output.LongDescription),
|
|
1796
1416
|
RuleId: __expectString(output.RuleId),
|
|
@@ -1799,10 +1419,10 @@ var deserializeAws_restJson1RuleMetadata = function (output, context) {
|
|
|
1799
1419
|
ShortDescription: __expectString(output.ShortDescription),
|
|
1800
1420
|
};
|
|
1801
1421
|
};
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
.filter(
|
|
1805
|
-
.map(
|
|
1422
|
+
const deserializeAws_restJson1RuleTags = (output, context) => {
|
|
1423
|
+
const retVal = (output || [])
|
|
1424
|
+
.filter((e) => e != null)
|
|
1425
|
+
.map((entry) => {
|
|
1806
1426
|
if (entry === null) {
|
|
1807
1427
|
return null;
|
|
1808
1428
|
}
|
|
@@ -1810,19 +1430,19 @@ var deserializeAws_restJson1RuleTags = function (output, context) {
|
|
|
1810
1430
|
});
|
|
1811
1431
|
return retVal;
|
|
1812
1432
|
};
|
|
1813
|
-
|
|
1433
|
+
const deserializeAws_restJson1S3BucketRepository = (output, context) => {
|
|
1814
1434
|
return {
|
|
1815
1435
|
Details: output.Details != null ? deserializeAws_restJson1S3RepositoryDetails(output.Details, context) : undefined,
|
|
1816
1436
|
Name: __expectString(output.Name),
|
|
1817
1437
|
};
|
|
1818
1438
|
};
|
|
1819
|
-
|
|
1439
|
+
const deserializeAws_restJson1S3RepositoryDetails = (output, context) => {
|
|
1820
1440
|
return {
|
|
1821
1441
|
BucketName: __expectString(output.BucketName),
|
|
1822
1442
|
CodeArtifacts: output.CodeArtifacts != null ? deserializeAws_restJson1CodeArtifacts(output.CodeArtifacts, context) : undefined,
|
|
1823
1443
|
};
|
|
1824
1444
|
};
|
|
1825
|
-
|
|
1445
|
+
const deserializeAws_restJson1SourceCodeType = (output, context) => {
|
|
1826
1446
|
return {
|
|
1827
1447
|
BranchDiff: output.BranchDiff != null
|
|
1828
1448
|
? deserializeAws_restJson1BranchDiffSourceCodeType(output.BranchDiff, context)
|
|
@@ -1841,54 +1461,50 @@ var deserializeAws_restJson1SourceCodeType = function (output, context) {
|
|
|
1841
1461
|
: undefined,
|
|
1842
1462
|
};
|
|
1843
1463
|
};
|
|
1844
|
-
|
|
1845
|
-
return Object.entries(output).reduce(
|
|
1846
|
-
var _b;
|
|
1847
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1464
|
+
const deserializeAws_restJson1TagMap = (output, context) => {
|
|
1465
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1848
1466
|
if (value === null) {
|
|
1849
1467
|
return acc;
|
|
1850
1468
|
}
|
|
1851
|
-
return
|
|
1469
|
+
return {
|
|
1470
|
+
...acc,
|
|
1471
|
+
[key]: __expectString(value),
|
|
1472
|
+
};
|
|
1852
1473
|
}, {});
|
|
1853
1474
|
};
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
});
|
|
1862
|
-
};
|
|
1863
|
-
var collectBody = function (streamBody, context) {
|
|
1864
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1475
|
+
const deserializeMetadata = (output) => ({
|
|
1476
|
+
httpStatusCode: output.statusCode,
|
|
1477
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
1478
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1479
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1480
|
+
});
|
|
1481
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
1865
1482
|
if (streamBody instanceof Uint8Array) {
|
|
1866
1483
|
return Promise.resolve(streamBody);
|
|
1867
1484
|
}
|
|
1868
1485
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1869
1486
|
};
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
}
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
});
|
|
1487
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1488
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1489
|
+
value !== null &&
|
|
1490
|
+
value !== "" &&
|
|
1491
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1492
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1493
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1494
|
+
if (encoded.length) {
|
|
1495
|
+
return JSON.parse(encoded);
|
|
1496
|
+
}
|
|
1497
|
+
return {};
|
|
1498
|
+
});
|
|
1499
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1500
|
+
const value = await parseBody(errorBody, context);
|
|
1501
|
+
value.message = value.message ?? value.Message;
|
|
1502
|
+
return value;
|
|
1887
1503
|
};
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1504
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1505
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1506
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1507
|
+
let cleanValue = rawValue;
|
|
1892
1508
|
if (typeof cleanValue === "number") {
|
|
1893
1509
|
cleanValue = cleanValue.toString();
|
|
1894
1510
|
}
|
|
@@ -1903,7 +1519,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
1903
1519
|
}
|
|
1904
1520
|
return cleanValue;
|
|
1905
1521
|
};
|
|
1906
|
-
|
|
1522
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1907
1523
|
if (headerKey !== undefined) {
|
|
1908
1524
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1909
1525
|
}
|